Re: [Patch net-next] openvswitch: adjust skb_gso_segment() for rx path
From: David Miller <davem@davemloft.net>
Date: 2013-01-31 03:46:31
From: Cong Wang <redacted> Date: Wed, 30 Jan 2013 16:38:09 +0800
From: Cong Wang <redacted> skb_gso_segment() is almost always called in tx path, except for openvswitch. It calls this function when it receives the packet and tries to queue it to user-space. In this special case, the ->ip_summed check inside skb_gso_segment() is no longer true, as ->ip_summed value has different meanings on rx path. This patch adjusts skb_gso_segment() so that we can at least avoid such warnings on checksum. I am not very sure if this is a real fix or just a workaround, at least this patch works fine for me, the kernel warning inside skb_gso_segment() disappears and the traffic is normal too. (Note I only tested it on 2.6.32, but ->ip_summed has never been changed since then.) Cc: Jesse Gross <redacted> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <redacted>
Instead of having the crazy test, make the caller
tell the context, TX or RX.
struct sk_buff *__skb_gso_segment(struct sk_buff *skb,
netdev_features_t features,
bool tx_path);
static inline struct sk_buff *
skb_gso_segment(struct sk_buff *skb, netdev_features_t features)
{
__skb_gso_segment(skb, features, true);
}