net/ixgbe: check for illegal Tx packets
authorXiao Zhang <xiao.zhang@intel.com>
Mon, 17 Feb 2020 14:51:15 +0000 (22:51 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 19 Feb 2020 12:51:06 +0000 (13:51 +0100)
commitfc6f59a0d61b3a27b04bf0603c3fc62afb2fa49a
tree42e67e5d80d4c21cc311fb34c321e6f94e437803
parent93a9afdb4b10f02aa06b8e58ffa403e10bc32bba
net/ixgbe: check for illegal Tx packets

For ixgbe, there is restriction that data buffers of any transmitted
packet must include at least 12 bytes of the src/dst Ethernet MAC
addresses as well as 2 bytes of the Type/Len field, otherwise, tx hang
would happen.

This patch adds check for those illegal packets and protects TX from
hanging.

Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/ixgbe/ixgbe_rxtx.c
drivers/net/ixgbe/ixgbe_rxtx.h