From: Or Gerlitz <ogerlitz@mellanox.com>
To: Pravin B Shelar <pshelar@nicira.com>,
Joseph Gasparakis <joseph.gasparakis@intel.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: issues with vxlan RX checksum offload under OVS datapath
Date: Mon, 20 Jan 2014 00:05:15 +0200 [thread overview]
Message-ID: <52DC4C1B.5000309@mellanox.com> (raw)
Hi Pravin,
While testing the gro udp patches over a setup with openvswitch I noted
that the RX checksum offload support introduced by Joseph's commit
0afb166 "vxlan: Add capability of Rx checksum offload for inner packet"
works fine when you use a setup made of
NIC --> IP stack --> vxlan device --> bridge --> tap
but not when its
NIC --> IP stack --> ovs vxlan port --> OVS DP --> tap
I narrowed it down to the fact the when going the OVS
pathskb->encapsulation remains true also after the decap is done.
Basically, this is the original hunk
> @@ -607,7 +607,17 @@ static int vxlan_udp_encap_recv(struct sock *sk,
> struct sk_buff *skb)
>
> __skb_tunnel_rx(skb, vxlan->dev);
> skb_reset_network_header(skb);
> - skb->ip_summed = CHECKSUM_NONE;
> +
> + /* If the NIC driver gave us an encapsulated packet with
> + * CHECKSUM_UNNECESSARY and Rx checksum feature is enabled,
> + * leave the CHECKSUM_UNNECESSARY, the device checksummed it
> + * for us. Otherwise force the upper layers to verify it.
> + */
> + if (skb->ip_summed != CHECKSUM_UNNECESSARY ||
> !skb->encapsulation ||
> + !(vxlan->dev->features & NETIF_F_RXCSUM))
> + skb->ip_summed = CHECKSUM_NONE;
> +
> + skb->encapsulation = 0;
which was moved by your commits
5cfccc5 vxlan: Add vxlan recv demux.
7ce0475 vxlan: Restructure vxlan receive.
to a code which isn't shared by the vxlan driver and ovs vxlan datapath
code, and I was thinking lets just move it back to vxlan_udp_encap_recv.
However, we can't really make the "vxlan->dev->features &
NETIF_F_RXCSUM" check - since there's no vxlan device for ovs datapath,
any idea how to overcome this.
Moving this to shared code (while removing the check for
vxlan->dev->features) made things to work on my setup, but this misses
one of the original conditions, ideas?
I believe its too late for 3.13 unless there is going to be -rc9, but
lets first see what's the right fix.
Or.
next reply other threads:[~2014-01-19 22:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-19 22:05 Or Gerlitz [this message]
2014-01-21 17:30 ` issues with vxlan RX checksum offload under OVS datapath Pravin Shelar
2014-01-21 17:37 ` Jesse Gross
2014-01-21 20:55 ` Or Gerlitz
2014-01-21 21:47 ` Joseph Gasparakis
2014-01-21 21:43 ` Or Gerlitz
2014-01-21 22:35 ` Joseph Gasparakis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52DC4C1B.5000309@mellanox.com \
--to=ogerlitz@mellanox.com \
--cc=joseph.gasparakis@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).