<div dir="ltr"><div>Hi William,</div><div>Thanks for your reply. Please find the inline comments.</div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 30, 2019 at 9:26 PM William Tu <<a href="mailto:u9012063@gmail.com">u9012063@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Ramana,<br>
<br>
I'm trying to understand your setup.<br>
<br>
On Wed, Aug 28, 2019 at 4:11 AM Ramana Reddy <<a href="mailto:gtvrreddy@gmail.com" target="_blank">gtvrreddy@gmail.com</a>> wrote:<br>
><br>
> Hi Ben, Justin, Jesse and All,<br>
><br>
> Hope everyone doing great.<br>
><br>
> During my work, I create a socket using AF_PACKET with virtio_net_hdr and<br>
> filled all the fields in the virtio_net_hdr<br>
> and the flag to VIRTIO_NET_GSO_TCPV4 to enable TSO using af_packet.<br>
><br>
> vnet->gso_type = VIRTIO_NET_HDR_GSO_TCPV4;<br>
><br>
> The code is not working when I am trying to send large packets over OVS<br>
> VXLAN tunnel. It's dropping the large packets and<br>
> the application is resending the MTU sized packets. The code is working<br>
> fine in non ovs case (directly sending without ovs).<br>
<br>
Do you create AF_PACKET and bind its socket to OVS's vxlan device,<br>
ex: vxlan_sys_4789?<br></blockquote><div>No. We created a AF_PACKET and binding it our own interface in the container. It takes the help of the routing table in the container</div><div>and routes the packets to the OVS veth interface, and from there, the OVS rule selects the respective out_port based on the destination IP address. </div><div>We can't select vxlan_sys_4789 interface as it is in the host namespace. It's up to the OVS to select the respective interface (out_port).</div><div>And we are not aware and need not know about the underlying network (OVS bridge or linux or some docker bridge) in the host. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
In the non-ovs working case, do you bind AF_PACKET to the vxlan device created<br>
by using ip link command?<br>
<br>
><br>
> I understood that UDP tunneling offloading (VXLAN) not happening because of<br>
> nic may not support this offloading feature,<br>
> but when I send iperf (AF_INET) traffic, though the offloading is not<br>
> happening, but the large packets are fragmented and the<br>
> VXLAN tunneling sending the fragmented packets. Why are we seeing this<br>
> different behavior?<br>
<br>
OVS's vxlan device is a light-weight tunnel device, so it might not<br>
have all the<br>
features.<br></blockquote><div>This is the same question in my mind. OVS may not be handling AF_PACKET with vnet_hdr. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
><br>
> What is the expected behavior in AF_PACKET in OVS? Does OVS support<br>
> AF_PACKET offloading mechanism?<br>
<br>
AF_PACKET (see net/packet/af_packet.c) just from userspace send packet into<br>
kernel and to the device you bind to. It creates skb and invokes the<br>
device's xmit<br>
function.<br></blockquote><div>This I understood. But OVS should understand this and offload the packet to the driver or to the nic</div><div>when virtio_net_hdr is set. If we send the packets to the normal interface (eth0) without ovs, the kernel</div><div>is able to understand the TSO packets with virtio_net_hdr and handover the offloading to the driver (GSO) or nic (TSO). </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
William<br>
<br>
> If not, how we can avoid the retransmission of the packets. What are things<br>
> to be done so that the kernel fragments<br>
> large packets and send them out without dropping ( in case if offloading<br>
> feature not available)?<br>
><br>
> Looking forward to your reply.<br>
><br>
> Regards,<br>
> Ramana<br>
> _______________________________________________<br>
> dev mailing list<br>
> <a href="mailto:dev@openvswitch.org" target="_blank">dev@openvswitch.org</a><br>
> <a href="https://mail.openvswitch.org/mailman/listinfo/ovs-dev" rel="noreferrer" target="_blank">https://mail.openvswitch.org/mailman/listinfo/ovs-dev</a><br>
</blockquote></div></div>