]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: ensure linearized SKBs in case of tail taggers
authorLino Sanfilippo <LinoSanfilippo@gmx.de>
Wed, 21 Jul 2021 21:56:41 +0000 (23:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Jul 2021 06:14:49 +0000 (23:14 -0700)
commitc10fb93fa5f3247f6ad6f9a16b10a12f827392d4
tree02c402138731122d4e7ee36186da715af6564198
parent7a94a15452ce619728c71595e649f8a8e10d0514
net: dsa: ensure linearized SKBs in case of tail taggers

The function skb_put() that is used by tail taggers to make room for the
DSA tag must only be called for linearized SKBS. However in case that the
slave device inherited features like NETIF_F_HW_SG or NETIF_F_FRAGLIST the
SKB passed to the slaves transmit function may not be linearized.
Avoid those SKBs by clearing the NETIF_F_HW_SG and NETIF_F_FRAGLIST flags
for tail taggers.
Furthermore since the tagging protocol can be changed at runtime move the
code for setting up the slaves features into dsa_slave_setup_tagger().

Suggested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c