* [PATCH 2/3] net: Make skb->skb_iif always track skb->dev
@ 2012-07-23 23:45 David Miller
2012-07-24 21:43 ` Nicolas de Pesloüan
0 siblings, 1 reply; 2+ messages in thread
From: David Miller @ 2012-07-23 23:45 UTC (permalink / raw)
To: netdev; +Cc: ja
Make it follow device decapsulation, from things such as VLAN and
bonding.
The stuff that actually cares about pre-demuxed device pointers, is
handled by the "orig_dev" variable in __netif_receive_skb(). And
the only consumer of that is the po->origdev feature of AF_PACKET
sockets.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/core/dev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index cca02ae..0ebaea1 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3173,8 +3173,6 @@ static int __netif_receive_skb(struct sk_buff *skb)
if (netpoll_receive_skb(skb))
return NET_RX_DROP;
- if (!skb->skb_iif)
- skb->skb_iif = skb->dev->ifindex;
orig_dev = skb->dev;
skb_reset_network_header(skb);
@@ -3186,6 +3184,7 @@ static int __netif_receive_skb(struct sk_buff *skb)
rcu_read_lock();
another_round:
+ skb->skb_iif = skb->dev->ifindex;
__this_cpu_inc(softnet_data.processed);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/3] net: Make skb->skb_iif always track skb->dev
2012-07-23 23:45 [PATCH 2/3] net: Make skb->skb_iif always track skb->dev David Miller
@ 2012-07-24 21:43 ` Nicolas de Pesloüan
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas de Pesloüan @ 2012-07-24 21:43 UTC (permalink / raw)
To: David Miller; +Cc: netdev, ja, Jiri Pirko
Le 24/07/2012 01:45, David Miller a écrit :
>
> Make it follow device decapsulation, from things such as VLAN and
> bonding.
>
> The stuff that actually cares about pre-demuxed device pointers, is
> handled by the "orig_dev" variable in __netif_receive_skb(). And
> the only consumer of that is the po->origdev feature of AF_PACKET
> sockets.
>
> Signed-off-by: David S. Miller<davem@davemloft.net>
Jiri tried to remove this orig_dev usage in af_packet in march 2011, without success, by using the
value of skb_iif instead :-)
In case my opinion might be relevant:
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Nicolas.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-24 21:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-23 23:45 [PATCH 2/3] net: Make skb->skb_iif always track skb->dev David Miller
2012-07-24 21:43 ` Nicolas de Pesloüan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).