aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorTatyana Nikolova <Tatyana.E.Nikolova@intel.com>2012-09-20 15:34:20 -0400
committerRoland Dreier <roland@purestorage.com>2012-09-30 23:34:52 -0400
commit6ad1be814b106e182d9b12898280d0c115541b72 (patch)
tree171a7f491da1cba4ea60c1d9a865324d25dc240b /drivers/infiniband
parentef3d0c4a5e8c7ad3429b9f9ef66cf5a7563cd513 (diff)
RDMA/nes: Fix for incorrect MSS when TSO is on
In TSO handling code, skb_shared_info() is used to get the MSS instead of the bool function skb_is_gso() (which always returns 1). Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/nes/nes_nic.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index f3a3ecf8d09e..1c02ba787536 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -390,10 +390,10 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev)
390 tcph = tcp_hdr(skb); 390 tcph = tcp_hdr(skb);
391 if (1) { 391 if (1) {
392 if (skb_is_gso(skb)) { 392 if (skb_is_gso(skb)) {
393 /* nes_debug(NES_DBG_NIC_TX, "%s: TSO request... seg size = %u\n", 393 /* nes_debug(NES_DBG_NIC_TX, "%s: TSO request... is_gso = %u seg size = %u\n",
394 netdev->name, skb_is_gso(skb)); */ 394 netdev->name, skb_is_gso(skb), skb_shinfo(skb)->gso_size); */
395 wqe_misc |= NES_NIC_SQ_WQE_LSO_ENABLE | 395 wqe_misc |= NES_NIC_SQ_WQE_LSO_ENABLE |
396 NES_NIC_SQ_WQE_COMPLETION | (u16)skb_is_gso(skb); 396 NES_NIC_SQ_WQE_COMPLETION | (u16)skb_shinfo(skb)->gso_size;
397 set_wqe_32bit_value(nic_sqe->wqe_words, NES_NIC_SQ_WQE_LSO_INFO_IDX, 397 set_wqe_32bit_value(nic_sqe->wqe_words, NES_NIC_SQ_WQE_LSO_INFO_IDX,
398 ((u32)tcph->doff) | 398 ((u32)tcph->doff) |
399 (((u32)(((unsigned char *)tcph) - skb->data)) << 4)); 399 (((u32)(((unsigned char *)tcph) - skb->data)) << 4));
@@ -597,10 +597,10 @@ tso_sq_no_longer_full:
597 nes_debug(NES_DBG_NIC_TX, "ERROR: SKB header too big, headlen=%u, FIRST_FRAG_SIZE=%u\n", 597 nes_debug(NES_DBG_NIC_TX, "ERROR: SKB header too big, headlen=%u, FIRST_FRAG_SIZE=%u\n",
598 original_first_length, NES_FIRST_FRAG_SIZE); 598 original_first_length, NES_FIRST_FRAG_SIZE);
599 nes_debug(NES_DBG_NIC_TX, "%s Request to tx NIC packet length %u, headlen %u," 599 nes_debug(NES_DBG_NIC_TX, "%s Request to tx NIC packet length %u, headlen %u,"
600 " (%u frags), tso_size=%u\n", 600 " (%u frags), is_gso = %u tso_size=%u\n",
601 netdev->name, 601 netdev->name,
602 skb->len, skb_headlen(skb), 602 skb->len, skb_headlen(skb),
603 skb_shinfo(skb)->nr_frags, skb_is_gso(skb)); 603 skb_shinfo(skb)->nr_frags, skb_is_gso(skb), skb_shinfo(skb)->gso_size);
604 } 604 }
605 memcpy(&nesnic->first_frag_vbase[nesnic->sq_head].buffer, 605 memcpy(&nesnic->first_frag_vbase[nesnic->sq_head].buffer,
606 skb->data, min(((unsigned int)NES_FIRST_FRAG_SIZE), 606 skb->data, min(((unsigned int)NES_FIRST_FRAG_SIZE),
@@ -652,8 +652,8 @@ tso_sq_no_longer_full:
652 } else { 652 } else {
653 nesnic->tx_skb[nesnic->sq_head] = NULL; 653 nesnic->tx_skb[nesnic->sq_head] = NULL;
654 } 654 }
655 wqe_misc |= NES_NIC_SQ_WQE_COMPLETION | (u16)skb_is_gso(skb); 655 wqe_misc |= NES_NIC_SQ_WQE_COMPLETION | (u16)skb_shinfo(skb)->gso_size;
656 if ((tso_wqe_length + original_first_length) > skb_is_gso(skb)) { 656 if ((tso_wqe_length + original_first_length) > skb_shinfo(skb)->gso_size) {
657 wqe_misc |= NES_NIC_SQ_WQE_LSO_ENABLE; 657 wqe_misc |= NES_NIC_SQ_WQE_LSO_ENABLE;
658 } else { 658 } else {
659 iph->tot_len = htons(tso_wqe_length + original_first_length - nhoffset); 659 iph->tot_len = htons(tso_wqe_length + original_first_length - nhoffset);