summaryrefslogtreecommitdiff
path: root/net/dsa
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2022-04-22 10:56:00 +0300
committerPaolo Abeni <pabeni@redhat.com>2022-04-22 10:56:00 +0300
commitf70925bf99406150d8133e775e49c9c459f78733 (patch)
tree392dd3854bf229c0c94b481819e4a67551ba6895 /net/dsa
parent9c8774e629a1950c24b44e3c8fb93d76fb644b49 (diff)
parent59f0c2447e2553b0918b4a9fd38763a5c0587d02 (diff)
downloadlinux-f70925bf99406150d8133e775e49c9c459f78733.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
drivers/net/ethernet/microchip/lan966x/lan966x_main.c d08ed852560e ("net: lan966x: Make sure to release ptp interrupt") c8349639324a ("net: lan966x: Add FDMA functionality") Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/tag_hellcreek.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/dsa/tag_hellcreek.c b/net/dsa/tag_hellcreek.c
index f64b805303cd..eb204ad36eee 100644
--- a/net/dsa/tag_hellcreek.c
+++ b/net/dsa/tag_hellcreek.c
@@ -21,6 +21,14 @@ static struct sk_buff *hellcreek_xmit(struct sk_buff *skb,
struct dsa_port *dp = dsa_slave_to_port(dev);
u8 *tag;
+ /* Calculate checksums (if required) before adding the trailer tag to
+ * avoid including it in calculations. That would lead to wrong
+ * checksums after the switch strips the tag.
+ */
+ if (skb->ip_summed == CHECKSUM_PARTIAL &&
+ skb_checksum_help(skb))
+ return NULL;
+
/* Tag encoding */
tag = skb_put(skb, HELLCREEK_TAG_LEN);
*tag = BIT(dp->index);