]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: Don't set ip checksum if did not enable tso.
authorJoe Jin <joe.jin@oracle.com>
Mon, 21 May 2012 01:30:57 +0000 (09:30 +0800)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Mon, 21 May 2012 21:32:42 +0000 (14:32 -0700)
After apply commit c108d12 - "ixgbe: Modify setup of descriptor flags to
avoid conditional jumps", X540-AT2 did not worked properly, it caused by
inconsistent olinfo_status, when enable ip checksum, make sure tso be
supported.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/ixgbe/ixgbe_main.c

index 8cd3a07ce1e2b5fc75779824781acd6938b64fee..b03a8ece97f738356b472e77a0804ab715480361 100644 (file)
@@ -6662,7 +6662,7 @@ static __le32 ixgbe_tx_olinfo_status(u32 tx_flags, unsigned int paylen)
                olinfo_status |= cpu_to_le32(IXGBE_ADVTXD_POPTS_TXSM);
 
        /* enble IPv4 checksum for TSO */
-       if (tx_flags & IXGBE_TX_FLAGS_IPV4)
+       if ((tx_flags & IXGBE_TX_FLAGS_TSO) && (tx_flags & IXGBE_TX_FLAGS_IPV4))
                olinfo_status |= cpu_to_le32(IXGBE_ADVTXD_POPTS_IXSM);
 
        /* use index 1 context for TSO/FSO/FCOE */