From d3fd2cbebb6ac3a953632c79398b5da63f0010ec Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Sat, 25 Feb 2012 00:51:05 +0000 Subject: [PATCH] --- yaml --- r: 290485 b: refs/heads/master c: 622121719934f60378279eb440d3cec2fc3176d2 h: refs/heads/master i: 290483: cc48ad4c0cab282ce887a89e51872f1cc61f9264 v: v3 --- [refs] | 2 +- trunk/drivers/net/ethernet/mellanox/mlx4/en_tx.c | 15 +++------------ trunk/include/linux/mlx4/qp.h | 5 ++++- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index ef869b0fe40a..4b85cf0f02cb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0f298a285f2e365cb34f69d1f79bb9fc996f683d +refs/heads/master: 622121719934f60378279eb440d3cec2fc3176d2 diff --git a/trunk/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/trunk/drivers/net/ethernet/mellanox/mlx4/en_tx.c index ff3250586584..2fd51405a509 100644 --- a/trunk/drivers/net/ethernet/mellanox/mlx4/en_tx.c +++ b/trunk/drivers/net/ethernet/mellanox/mlx4/en_tx.c @@ -601,8 +601,6 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev) struct skb_frag_struct *frag; struct mlx4_en_tx_info *tx_info; struct ethhdr *ethh; - u64 mac; - u32 mac_l, mac_h; int tx_ind = 0; int nr_txbb; int desc_size; @@ -687,16 +685,9 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev) } /* Copy dst mac address to wqe */ - skb_reset_mac_header(skb); - ethh = eth_hdr(skb); - if (ethh && ethh->h_dest) { - mac = mlx4_en_mac_to_u64(ethh->h_dest); - mac_h = (u32) ((mac & 0xffff00000000ULL) >> 16); - mac_l = (u32) (mac & 0xffffffff); - tx_desc->ctrl.srcrb_flags |= cpu_to_be32(mac_h); - tx_desc->ctrl.imm = cpu_to_be32(mac_l); - } - + ethh = (struct ethhdr *)skb->data; + tx_desc->ctrl.srcrb_flags16[0] = get_unaligned((u16 *)ethh->h_dest); + tx_desc->ctrl.imm = get_unaligned((u32 *)(ethh->h_dest + 2)); /* Handle LSO (TSO) packets */ if (lso_header_size) { /* Mark opcode as LSO */ diff --git a/trunk/include/linux/mlx4/qp.h b/trunk/include/linux/mlx4/qp.h index bee8fa231276..091f9e7dc8b9 100644 --- a/trunk/include/linux/mlx4/qp.h +++ b/trunk/include/linux/mlx4/qp.h @@ -212,7 +212,10 @@ struct mlx4_wqe_ctrl_seg { * [1] SE (solicited event) * [0] FL (force loopback) */ - __be32 srcrb_flags; + union { + __be32 srcrb_flags; + __be16 srcrb_flags16[2]; + }; /* * imm is immediate data for send/RDMA write w/ immediate; * also invalidation key for send with invalidate; input