Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122941
b: refs/heads/master
c: e727149
h: refs/heads/master
i:
  122939: 75bc7df
v: v3
  • Loading branch information
Holger Eitzenberger authored and David S. Miller committed Dec 26, 2008
1 parent 7a707b5 commit 498a9a4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4ac43200fd6b8b8de3b487e74e74d3742f70d79
refs/heads/master: e727149e26b08550269a7786fda977aed65578f6
16 changes: 6 additions & 10 deletions trunk/drivers/net/bonding/bond_3ad.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,13 +840,11 @@ static int ad_lacpdu_send(struct port *port)

lacpdu_header = (struct lacpdu_header *)skb_put(skb, length);

memcpy(lacpdu_header->ad_header.destination_address.mac_addr_value,
lacpdu_mcast_addr, ETH_ALEN);
memcpy(lacpdu_header->hdr.h_dest, lacpdu_mcast_addr, ETH_ALEN);
/* Note: source addres is set to be the member's PERMANENT address,
because we use it to identify loopback lacpdus in receive. */
memcpy(lacpdu_header->ad_header.source_address.mac_addr_value,
slave->perm_hwaddr, ETH_ALEN);
lacpdu_header->ad_header.length_type = PKT_TYPE_LACPDU;
memcpy(lacpdu_header->hdr.h_source, slave->perm_hwaddr, ETH_ALEN);
lacpdu_header->hdr.h_proto = PKT_TYPE_LACPDU;

lacpdu_header->lacpdu = port->lacpdu; // struct copy

Expand Down Expand Up @@ -884,13 +882,11 @@ static int ad_marker_send(struct port *port, struct bond_marker *marker)

marker_header = (struct bond_marker_header *)skb_put(skb, length);

memcpy(marker_header->ad_header.destination_address.mac_addr_value,
lacpdu_mcast_addr, ETH_ALEN);
memcpy(marker_header->hdr.h_dest, lacpdu_mcast_addr, ETH_ALEN);
/* Note: source addres is set to be the member's PERMANENT address,
because we use it to identify loopback MARKERs in receive. */
memcpy(marker_header->ad_header.source_address.mac_addr_value,
slave->perm_hwaddr, ETH_ALEN);
marker_header->ad_header.length_type = PKT_TYPE_LACPDU;
memcpy(marker_header->hdr.h_source, slave->perm_hwaddr, ETH_ALEN);
marker_header->hdr.h_proto = PKT_TYPE_LACPDU;

marker_header->marker = *marker; // struct copy

Expand Down
10 changes: 2 additions & 8 deletions trunk/drivers/net/bonding/bond_3ad.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,6 @@ typedef enum {

#pragma pack(1)

typedef struct ad_header {
struct mac_addr destination_address;
struct mac_addr source_address;
__be16 length_type;
} ad_header_t;

// Link Aggregation Control Protocol(LACP) data unit structure(43.4.2.2 in the 802.3ad standard)
typedef struct lacpdu {
u8 subtype; // = LACP(= 0x01)
Expand Down Expand Up @@ -143,7 +137,7 @@ typedef struct lacpdu {
} lacpdu_t;

typedef struct lacpdu_header {
struct ad_header ad_header;
struct ethhdr hdr;
struct lacpdu lacpdu;
} lacpdu_header_t;

Expand All @@ -164,7 +158,7 @@ typedef struct bond_marker {
} bond_marker_t;

typedef struct bond_marker_header {
struct ad_header ad_header;
struct ethhdr hdr;
struct bond_marker marker;
} bond_marker_header_t;

Expand Down

0 comments on commit 498a9a4

Please sign in to comment.