aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuval Mintz <yuvalmin@broadcom.com>2013-05-19 00:41:01 -0400
committerDavid S. Miller <davem@davemloft.net>2013-05-20 03:56:57 -0400
commit057cf65e4f715f62acccbd9125cf63eddfe69d30 (patch)
tree1c8299a134c89f746299b77995730bea5c196c81
parent96f5a846bdd60986992228bc7dae94d4d8eaacc0 (diff)
bnx2x: Fix GSO for 57710/57711 chips
Starting with commit 91226790bbe2dbfbba48dd79d49f2b38ef10eb97 `bnx2x: use FW 7.8.17', the bnx2x driver no longer requests the FW to perform IP checksums for IPv4 packets. This behaviour needs to be revised for 57710/57711 chips - when using GSO, if the driver will not set the IP checksum flag then packets will be transmitted by the chip without a valid IP checksum, resulting in a drop of all such packets on the receiver-side. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index b8fbe266ab68..be59ec4b2c30 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -3313,6 +3313,7 @@ static void bnx2x_set_pbd_gso_e2(struct sk_buff *skb, u32 *parsing_data,
3313 */ 3313 */
3314static void bnx2x_set_pbd_gso(struct sk_buff *skb, 3314static void bnx2x_set_pbd_gso(struct sk_buff *skb,
3315 struct eth_tx_parse_bd_e1x *pbd, 3315 struct eth_tx_parse_bd_e1x *pbd,
3316 struct eth_tx_start_bd *tx_start_bd,
3316 u32 xmit_type) 3317 u32 xmit_type)
3317{ 3318{
3318 pbd->lso_mss = cpu_to_le16(skb_shinfo(skb)->gso_size); 3319 pbd->lso_mss = cpu_to_le16(skb_shinfo(skb)->gso_size);
@@ -3326,11 +3327,14 @@ static void bnx2x_set_pbd_gso(struct sk_buff *skb,
3326 ip_hdr(skb)->daddr, 3327 ip_hdr(skb)->daddr,
3327 0, IPPROTO_TCP, 0)); 3328 0, IPPROTO_TCP, 0));
3328 3329
3329 } else 3330 /* GSO on 57710/57711 needs FW to calculate IP checksum */
3331 tx_start_bd->bd_flags.as_bitfield |= ETH_TX_BD_FLAGS_IP_CSUM;
3332 } else {
3330 pbd->tcp_pseudo_csum = 3333 pbd->tcp_pseudo_csum =
3331 bswab16(~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, 3334 bswab16(~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
3332 &ipv6_hdr(skb)->daddr, 3335 &ipv6_hdr(skb)->daddr,
3333 0, IPPROTO_TCP, 0)); 3336 0, IPPROTO_TCP, 0));
3337 }
3334 3338
3335 pbd->global_data |= 3339 pbd->global_data |=
3336 cpu_to_le16(ETH_TX_PARSE_BD_E1X_PSEUDO_CS_WITHOUT_LEN); 3340 cpu_to_le16(ETH_TX_PARSE_BD_E1X_PSEUDO_CS_WITHOUT_LEN);
@@ -3814,7 +3818,8 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
3814 bnx2x_set_pbd_gso_e2(skb, &pbd_e2_parsing_data, 3818 bnx2x_set_pbd_gso_e2(skb, &pbd_e2_parsing_data,
3815 xmit_type); 3819 xmit_type);
3816 else 3820 else
3817 bnx2x_set_pbd_gso(skb, pbd_e1x, xmit_type); 3821 bnx2x_set_pbd_gso(skb, pbd_e1x, tx_start_bd,
3822 xmit_type);
3818 } 3823 }
3819 3824
3820 /* Set the PBD's parsing_data field if not zero 3825 /* Set the PBD's parsing_data field if not zero