2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00
Files
openvswitch/datapath/linux/compat/skbuff-openvswitch.c
Pravin B Shelar 5ebaf571f9 gre: Restructure tunneling.
Following patch restructures ovs tunneling and gre vport
implementation to make ovs tunneling more in sync with
upstream kernel tunneling.  Doing this tunneling code is
simplified as most of protocol processing on send and
recv is pushed to kernel tunneling.  For external ovs
module the code is moved to kernel compatibility code.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2013-06-20 23:04:29 -07:00

39 lines
812 B
C

#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#if !defined(HAVE_SKB_WARN_LRO) && defined(NETIF_F_LRO)
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
void __skb_warn_lro_forwarding(const struct sk_buff *skb)
{
if (net_ratelimit())
pr_warn("%s: received packets cannot be forwarded while LRO is enabled\n",
skb->dev->name);
}
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
int skb_checksum_help(struct sk_buff *skb, int inward)
#else
int skb_checksum_help(struct sk_buff *skb)
#endif
{
if (unlikely(skb_is_nonlinear(skb))) {
int err;
err = __skb_linearize(skb);
if (unlikely(err))
return err;
}
#undef skb_checksum_help
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
return skb_checksum_help(skb, 0);
#else
return skb_checksum_help(skb);
#endif
}