[ovs-dev] [PATCH] datapath: Always initialize fix_segment for GSO packet.
Pravin B Shelar
pshelar at nicira.com
Thu Aug 28 18:30:05 UTC 2014
OVS tunnel compat code depends on this function pointer to
handle GSO packet. Currently we do not initialize for all
GRE GSO packets. Following patch fixes that.
Signed-off-by: Pravin B Shelar <pshelar at nicira.com>
---
datapath/linux/compat/gre.c | 2 ++
datapath/linux/compat/gso.h | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/datapath/linux/compat/gre.c b/datapath/linux/compat/gre.c
index 07b270a..8c133de 100644
--- a/datapath/linux/compat/gre.c
+++ b/datapath/linux/compat/gre.c
@@ -292,6 +292,8 @@ struct sk_buff *gre_handle_offloads(struct sk_buff *skb, bool gre_csum)
if (skb_is_gso(skb)) {
if (gre_csum)
OVS_GSO_CB(skb)->fix_segment = gre_csum_fix;
+ else
+ OVS_GSO_CB(skb)->fix_segment = NULL;
} else {
if (skb->ip_summed == CHECKSUM_PARTIAL && gre_csum) {
err = skb_checksum_help(skb);
diff --git a/datapath/linux/compat/gso.h b/datapath/linux/compat/gso.h
index 6281f29..20ec55c 100644
--- a/datapath/linux/compat/gso.h
+++ b/datapath/linux/compat/gso.h
@@ -12,13 +12,13 @@
struct ovs_gso_cb {
struct ovs_skb_cb dp_cb;
+ void (*fix_segment)(struct sk_buff *);
+ sk_buff_data_t inner_mac_header; /* Offset from skb->head */
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
__be16 inner_protocol;
#endif
u16 inner_network_header; /* Offset from
* inner_mac_header */
- sk_buff_data_t inner_mac_header; /* Offset from skb->head */
- void (*fix_segment)(struct sk_buff *);
};
#define OVS_GSO_CB(skb) ((struct ovs_gso_cb *)(skb)->cb)
--
1.7.1
More information about the dev
mailing list