Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a16aeb36239ce612699ed64a75a03c88cbc657e8
Commit:     a16aeb36239ce612699ed64a75a03c88cbc657e8
Parent:     797659fb4a4a511649cd71028141c32ad1698a12
Author:     Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
AuthorDate: Sat Mar 10 16:07:19 2007 -0300
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:24:44 2007 -0700

    [BONDING]: Introduce arp_pkt()
    
    For consistency with all the other skb->nh.raw accessors.
    
    Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/bonding/bond_alb.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 916162c..36b8e86 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -104,6 +104,11 @@ struct arp_pkt {
 };
 #pragma pack()
 
+static inline struct arp_pkt *arp_pkt(const struct sk_buff *skb)
+{
+       return (struct arp_pkt *)skb->nh.raw;
+}
+
 /* Forward declaration */
 static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[]);
 
@@ -613,7 +618,7 @@ static void rlb_req_update_subnet_clients(struct bonding 
*bond, u32 src_ip)
 static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding 
*bond)
 {
        struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
-       struct arp_pkt *arp = (struct arp_pkt *)skb->nh.raw;
+       struct arp_pkt *arp = arp_pkt(skb);
        struct slave *assigned_slave;
        struct rlb_client_info *client_info;
        u32 hash_index = 0;
@@ -701,7 +706,7 @@ static struct slave *rlb_choose_channel(struct sk_buff 
*skb, struct bonding *bon
  */
 static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
 {
-       struct arp_pkt *arp = (struct arp_pkt *)skb->nh.raw;
+       struct arp_pkt *arp = arp_pkt(skb);
        struct slave *tx_slave = NULL;
 
        if (arp->op_code == __constant_htons(ARPOP_REPLY)) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to