aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-10 14:07:19 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:24:44 -0400
commita16aeb36239ce612699ed64a75a03c88cbc657e8 (patch)
tree3b5427efa8fabe911d9dd2a3532a1107f33e6e5c /drivers
parent797659fb4a4a511649cd71028141c32ad1698a12 (diff)
[BONDING]: Introduce arp_pkt()
For consistency with all the other skb->nh.raw accessors. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bonding/bond_alb.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 916162ca0c98..36b8e860107e 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -104,6 +104,11 @@ struct arp_pkt {
104}; 104};
105#pragma pack() 105#pragma pack()
106 106
107static inline struct arp_pkt *arp_pkt(const struct sk_buff *skb)
108{
109 return (struct arp_pkt *)skb->nh.raw;
110}
111
107/* Forward declaration */ 112/* Forward declaration */
108static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[]); 113static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[]);
109 114
@@ -613,7 +618,7 @@ static void rlb_req_update_subnet_clients(struct bonding *bond, u32 src_ip)
613static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bond) 618static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bond)
614{ 619{
615 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); 620 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
616 struct arp_pkt *arp = (struct arp_pkt *)skb->nh.raw; 621 struct arp_pkt *arp = arp_pkt(skb);
617 struct slave *assigned_slave; 622 struct slave *assigned_slave;
618 struct rlb_client_info *client_info; 623 struct rlb_client_info *client_info;
619 u32 hash_index = 0; 624 u32 hash_index = 0;
@@ -701,7 +706,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
701 */ 706 */
702static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond) 707static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
703{ 708{
704 struct arp_pkt *arp = (struct arp_pkt *)skb->nh.raw; 709 struct arp_pkt *arp = arp_pkt(skb);
705 struct slave *tx_slave = NULL; 710 struct slave *tx_slave = NULL;
706 711
707 if (arp->op_code == __constant_htons(ARPOP_REPLY)) { 712 if (arp->op_code == __constant_htons(ARPOP_REPLY)) {