projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
packet: on direct_xmit, limit tso and csum to supported devices
[cascardo/linux.git]
/
net
/
packet
/
af_packet.c
diff --git
a/net/packet/af_packet.c
b/net/packet/af_packet.c
index
33a4697
..
d2238b2
100644
(file)
--- a/
net/packet/af_packet.c
+++ b/
net/packet/af_packet.c
@@
-250,7
+250,7
@@
static void __fanout_link(struct sock *sk, struct packet_sock *po);
static int packet_direct_xmit(struct sk_buff *skb)
{
struct net_device *dev = skb->dev;
static int packet_direct_xmit(struct sk_buff *skb)
{
struct net_device *dev = skb->dev;
-
netdev_features_t features
;
+
struct sk_buff *orig_skb = skb
;
struct netdev_queue *txq;
int ret = NETDEV_TX_BUSY;
struct netdev_queue *txq;
int ret = NETDEV_TX_BUSY;
@@
-258,9
+258,8
@@
static int packet_direct_xmit(struct sk_buff *skb)
!netif_carrier_ok(dev)))
goto drop;
!netif_carrier_ok(dev)))
goto drop;
- features = netif_skb_features(skb);
- if (skb_needs_linearize(skb, features) &&
- __skb_linearize(skb))
+ skb = validate_xmit_skb_list(skb, dev);
+ if (skb != orig_skb)
goto drop;
txq = skb_get_tx_queue(dev, skb);
goto drop;
txq = skb_get_tx_queue(dev, skb);
@@
-280,7
+279,7
@@
static int packet_direct_xmit(struct sk_buff *skb)
return ret;
drop:
atomic_long_inc(&dev->tx_dropped);
return ret;
drop:
atomic_long_inc(&dev->tx_dropped);
- kfree_skb(skb);
+ kfree_skb
_list
(skb);
return NET_XMIT_DROP;
}
return NET_XMIT_DROP;
}
@@
-3952,6
+3951,7
@@
static int packet_notifier(struct notifier_block *this,
}
if (msg == NETDEV_UNREGISTER) {
packet_cached_dev_reset(po);
}
if (msg == NETDEV_UNREGISTER) {
packet_cached_dev_reset(po);
+ fanout_release(sk);
po->ifindex = -1;
if (po->prot_hook.dev)
dev_put(po->prot_hook.dev);
po->ifindex = -1;
if (po->prot_hook.dev)
dev_put(po->prot_hook.dev);