]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
net: thunderx: Fix for HW issue while padding TSO packet
authorSunil Goutham <sgoutham@cavium.com>
Tue, 30 Aug 2016 06:06:26 +0000 (11:36 +0530)
committerKamal Mostafa <kamal@canonical.com>
Mon, 19 Sep 2016 16:05:20 +0000 (09:05 -0700)
BugLink: http://bugs.launchpad.net/bugs/1623627
There is a issue in HW where-in while sending GSO sized pkts
as part of TSO, if pkt len falls below configured min packet
size i.e 60, NIC will zero PAD packet and also updates IP total length.
Hence set this value to lessthan min pkt size of MAC + IP + TCP
headers, BGX will anyway do the padding to transmit 64 byte pkt
including FCS.

Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 57e81d44b0e1aa4dcb479ff8de8fc34cf635d0e8)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
drivers/net/ethernet/cavium/thunder/nic_main.c

index 95f17f8cadacc08637c485e555242e78aafb48c5..f13555282b72bb786cecf2cf499d7801c86aaa5c 100644 (file)
@@ -251,9 +251,14 @@ static void nic_set_tx_pkt_pad(struct nicpf *nic, int size)
        int lmac;
        u64 lmac_cfg;
 
-       /* Max value that can be set is 60 */
-       if (size > 60)
-               size = 60;
+       /* There is a issue in HW where-in while sending GSO sized
+        * pkts as part of TSO, if pkt len falls below this size
+        * NIC will zero PAD packet and also updates IP total length.
+        * Hence set this value to lessthan min pkt size of MAC+IP+TCP
+        * headers, BGX will do the padding to transmit 64 byte pkt.
+        */
+       if (size > 52)
+               size = 52;
 
        for (lmac = 0; lmac < (MAX_BGX_PER_CN88XX * MAX_LMAC_PER_BGX); lmac++) {
                lmac_cfg = nic_reg_read(nic, NIC_PF_LMAC_0_7_CFG | (lmac << 3));