Thread (4 messages) 4 messages, 3 authors, 2015-02-20

TX offloads for NVGRE (OVS GRE with inner protocol being TEB)

flat view

From: Or Gerlitz <hidden>
Date: 2015-02-19 14:06:32
Subsystem: networking [general], openvswitch, the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Aaron Conole, Eelco Chaudron, Ilya Maximets, Linus Torvalds

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,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help