net/enic: fix TSO for packets greater than 9208 bytes
authorJohn Daley <johndale@cisco.com>
Thu, 2 Nov 2017 05:47:10 +0000 (22:47 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 2 Nov 2017 18:32:04 +0000 (19:32 +0100)
commitcafba10bc16905b974063ae3b5feb5f3fbba991d
treee2cf9aa7d733d94b70e1bf80810d432aac3e2702
parent8c22b59a173f1b53fe522ba4182947dd3ebb4d42
net/enic: fix TSO for packets greater than 9208 bytes

A check was previously added to drop Tx packets greater than what the Nic
is capable of sending since such packets can freeze the send queue. The
check did not account for TSO packets however, so TSO was limited to 9208
bytes.

Check packet length only for non-TSO packets. Also insure that TSO packet
segment size plus the headers do not exceed what the Nic is capable of
since this also can freeze the send queue.

Use the PKT_TX_TCP_SEG ol_flag instead of m->tso_segsz which is the
preferred way to check for TSO.

Fixes: ed6e564c214e ("net/enic: fix memory leak with oversized Tx packets")
Cc: stable@dpdk.org
Signed-off-by: John Daley <johndale@cisco.com>
drivers/net/enic/enic_rxtx.c