[PATCH 1/2] net: macb: Remove unnecessary alignment check for TSO

From: Harini Katakam
Date: Fri Jan 31 2020 - 05:28:05 EST


The IP TSO implementation does NOT require the length to be a
multiple of 8. That is only a requirement for UFO as per IP
documentation.

Signed-off-by: Harini Katakam <harini.katakam@xxxxxxxxxx>
---
drivers/net/ethernet/cadence/macb_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 7a2fe63..2e418b8 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -1792,7 +1792,7 @@ static netdev_features_t macb_features_check(struct sk_buff *skb,
/* Validate LSO compatibility */

/* there is only one buffer */
- if (!skb_is_nonlinear(skb))
+ if (!skb_is_nonlinear(skb) || (ip_hdr(skb)->protocol != IPPROTO_UDP))
return features;

/* length of header */
--
2.7.4