From: David S. Miller Date: Wed, 21 Jul 2010 01:25:24 +0000 (-0700) Subject: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 X-Git-Tag: v2.6.36-rc1~571^2~148 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11fe883936980fe242869d671092a466cf1db3e3;p=profile%2Fcommon%2Fkernel-common.git Merge branch 'master' of /linux/kernel/git/davem/net-2.6 Conflicts: drivers/vhost/net.c net/bridge/br_device.c Fix merge conflict in drivers/vhost/net.c with guidance from Stephen Rothwell. Revert the effects of net-2.6 commit 573201f36fd9c7c6d5218cdcd9948cee700b277d since net-next-2.6 has fixes that make bridge netpoll work properly thus we don't need it disabled. Signed-off-by: David S. Miller --- 11fe883936980fe242869d671092a466cf1db3e3 diff --cc drivers/vhost/net.c index 107af9e,2f6185c..7a104e2 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@@ -527,12 -527,15 +527,15 @@@ static long vhost_net_set_backend(struc /* start polling new socket */ oldsock = vq->private_data; - if (sock != oldsock){ - if (sock == oldsock) - goto done; ++ if (sock != oldsock) { + vhost_net_disable_vq(n, vq); + rcu_assign_pointer(vq->private_data, sock); + vhost_net_enable_vq(n, vq); + } - vhost_net_disable_vq(n, vq); - rcu_assign_pointer(vq->private_data, sock); - vhost_net_enable_vq(n, vq); + done: + mutex_unlock(&vq->mutex); + if (oldsock) { vhost_net_flush_vq(n, index); fput(oldsock->file); diff --cc net/core/dev.c index 9de75cd,0ea10f8..6e1b437 --- a/net/core/dev.c +++ b/net/core/dev.c @@@ -1910,26 -1911,18 +1910,34 @@@ static int dev_gso_segment(struct sk_bu */ static inline void skb_orphan_try(struct sk_buff *skb) { - if (!skb_tx(skb)->flags) + struct sock *sk = skb->sk; + + if (sk && !skb_tx(skb)->flags) { + /* skb_tx_hash() wont be able to get sk. + * We copy sk_hash into skb->rxhash + */ + if (!skb->rxhash) + skb->rxhash = sk->sk_hash; skb_orphan(skb); + } } +/* + * Returns true if either: + * 1. skb has frag_list and the device doesn't support FRAGLIST, or + * 2. skb is fragmented and the device does not support SG, or if + * at least one of fragments is in highmem and device does not + * support DMA from it. + */ +static inline int skb_needs_linearize(struct sk_buff *skb, + struct net_device *dev) +{ + return skb_is_nonlinear(skb) && + ((skb_has_frags(skb) && !(dev->features & NETIF_F_FRAGLIST)) || + (skb_shinfo(skb)->nr_frags && (!(dev->features & NETIF_F_SG) || + illegal_highdma(dev, skb)))); +} + int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, struct netdev_queue *txq) {