[NET]: Kill skb->real_dev
Bonding just wants the device before the skb_bond() decapsulation occurs, so simply pass that original device into packet_type->func() as an argument. It remains to be seen whether we can use this same exact thing to get rid of skb->input_dev as well. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
b6b99eb540
commit
f2ccd8fa06
@@ -155,7 +155,6 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb,
|
||||
{
|
||||
struct net_device_stats *stats;
|
||||
|
||||
skb->real_dev = skb->dev;
|
||||
skb->dev = grp->vlan_devices[vlan_tag & VLAN_VID_MASK];
|
||||
if (skb->dev == NULL) {
|
||||
dev_kfree_skb_any(skb);
|
||||
|
||||
@@ -497,10 +497,12 @@ static inline void *netdev_priv(struct net_device *dev)
|
||||
#define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev))
|
||||
|
||||
struct packet_type {
|
||||
__be16 type; /* This is really htons(ether_type). */
|
||||
struct net_device *dev; /* NULL is wildcarded here */
|
||||
int (*func) (struct sk_buff *, struct net_device *,
|
||||
struct packet_type *);
|
||||
__be16 type; /* This is really htons(ether_type). */
|
||||
struct net_device *dev; /* NULL is wildcarded here */
|
||||
int (*func) (struct sk_buff *,
|
||||
struct net_device *,
|
||||
struct packet_type *,
|
||||
struct net_device *);
|
||||
void *af_packet_priv;
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
@@ -164,7 +164,6 @@ struct skb_shared_info {
|
||||
* @stamp: Time we arrived
|
||||
* @dev: Device we arrived on/are leaving by
|
||||
* @input_dev: Device we arrived on
|
||||
* @real_dev: The real device we are using
|
||||
* @h: Transport layer header
|
||||
* @nh: Network layer header
|
||||
* @mac: Link layer header
|
||||
@@ -206,7 +205,6 @@ struct sk_buff {
|
||||
struct timeval stamp;
|
||||
struct net_device *dev;
|
||||
struct net_device *input_dev;
|
||||
struct net_device *real_dev;
|
||||
|
||||
union {
|
||||
struct tcphdr *th;
|
||||
|
||||
Reference in New Issue
Block a user