netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Or Gerlitz <ogerlitz@mellanox.com>
To: Jesse Gross <jesse@nicira.com>, Joe Stringer <joestringer@nicira.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: TX offloads for NVGRE (OVS GRE with inner protocol being TEB)
Date: Thu, 19 Feb 2015 16:05:17 +0200	[thread overview]
Message-ID: <54E5ED9D.8080206@mellanox.com> (raw)

Hi,

It seems that the OVS GRE code lacks handling of offloads (e.g to come 
into play with NICs that support NVGRE).

I assume we need to place a call to iptunnel_handle_offloads before 
invoking iptunnel_xmit, agree? so ~the quick patch below should do the 
work? I wasn't sure how to set the value of the 2nd param for 
iptunnel_handle_offloads().


Or.

diff --git a/net/openvswitch/vport-gre.c b/net/openvswitch/vport-gre.c
index f17ac96..524825f 100644
--- a/net/openvswitch/vport-gre.c
+++ b/net/openvswitch/vport-gre.c
@@ -187,6 +187,10 @@ static int gre_tnl_send(struct vport *vport, struct 
sk_buff *skb)
                 htons(IP_DF) : 0;

         skb->ignore_df = 1;
+
+       skb = iptunnel_handle_offloads(skb, false, SKB_GSO_GRE);
+       if (IS_ERR(skb))
+               goto err_free_rt;

         return iptunnel_xmit(skb->sk, rt, skb, fl.saddr,
                              tun_key->ipv4_dst, IPPROTO_GRE,

             reply	other threads:[~2015-02-19 14:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19 14:05 Or Gerlitz [this message]
2015-02-19 17:01 ` TX offloads for NVGRE (OVS GRE with inner protocol being TEB) Jesse Gross
2015-02-20  7:54   ` Or Gerlitz
2015-02-20 20:31     ` Jesse Gross

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=54E5ED9D.8080206@mellanox.com \
    --to=ogerlitz@mellanox.com \
    --cc=jesse@nicira.com \
    --cc=joestringer@nicira.com \
    --cc=netdev@vger.kernel.org \
    /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).