Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2ccd8fa authored by David S. Miller's avatar David S. Miller Committed by David S. Miller
Browse files

[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: default avatarDavid S. Miller <davem@davemloft.net>
parent b6b99eb5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ aoenet_xmit(struct sk_buff *sl)
 * (1) len doesn't include the header by default.  I want this. 
 */
static int
aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt)
aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt, struct net_device *orig_dev)
{
	struct aoe_hdr *h;
	u32 n;
+4 −7
Original line number Diff line number Diff line
@@ -2419,22 +2419,19 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev)
	return 0;
}

int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype)
int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype, struct net_device *orig_dev)
{
	struct bonding *bond = dev->priv;
	struct slave *slave = NULL;
	int ret = NET_RX_DROP;

	if (!(dev->flags & IFF_MASTER)) {
	if (!(dev->flags & IFF_MASTER))
		goto out;
	}

	read_lock(&bond->lock);
	slave = bond_get_slave_by_dev((struct bonding *)dev->priv,
				      skb->real_dev);
	if (slave == NULL) {
	slave = bond_get_slave_by_dev((struct bonding *)dev->priv, orig_dev);
	if (!slave)
		goto out_unlock;
	}

	bond_3ad_rx_indication((struct lacpdu *) skb->data, slave, skb->len);

+1 −1
Original line number Diff line number Diff line
@@ -295,6 +295,6 @@ void bond_3ad_adapter_duplex_changed(struct slave *slave);
void bond_3ad_handle_link_change(struct slave *slave, char link);
int  bond_3ad_get_active_agg_info(struct bonding *bond, struct ad_info *ad_info);
int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev);
int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype);
int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype, struct net_device *orig_dev);
#endif //__BOND_3AD_H__
+2 −3
Original line number Diff line number Diff line
@@ -354,15 +354,14 @@ static void rlb_update_entry_from_arp(struct bonding *bond, struct arp_pkt *arp)
	_unlock_rx_hashtbl(bond);
}

static int rlb_arp_recv(struct sk_buff *skb, struct net_device *bond_dev, struct packet_type *ptype)
static int rlb_arp_recv(struct sk_buff *skb, struct net_device *bond_dev, struct packet_type *ptype, struct net_device *orig_dev)
{
	struct bonding *bond = bond_dev->priv;
	struct arp_pkt *arp = (struct arp_pkt *)skb->data;
	int res = NET_RX_DROP;

	if (!(bond_dev->flags & IFF_MASTER)) {
	if (!(bond_dev->flags & IFF_MASTER))
		goto out;
	}

	if (!arp) {
		dprintk("Packet has no ARP data\n");
+2 −2
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ static char bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};

static char bpq_eth_addr[6];

static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *);
static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *);
static int bpq_device_event(struct notifier_block *, unsigned long, void *);
static const char *bpq_print_ethaddr(const unsigned char *);

@@ -165,7 +165,7 @@ static inline int dev_is_ethdev(struct net_device *dev)
/*
 *	Receive an AX.25 frame via an ethernet interface.
 */
static int bpq_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *ptype)
static int bpq_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *ptype, struct net_device *orig_dev)
{
	int len;
	char * ptr;
Loading