]> git.baikalelectronics.ru Git - kernel.git/commit
net: enetc: allow tc-etf offload even with NETIF_F_CSUM_MASK
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 27 Apr 2022 20:30:17 +0000 (23:30 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 Apr 2022 16:45:48 +0000 (09:45 -0700)
commit3158584b818248adc4c3fa4e03183cad0388160b
tree4084c1686802bf159586fca0d1f1267c1547f280
parent15a069253a4d2b34666f3288f9d5f2250014ee53
net: enetc: allow tc-etf offload even with NETIF_F_CSUM_MASK

The Time-Specified Departure feature is indeed mutually exclusive with
TX IP checksumming in ENETC, but TX checksumming in itself is broken and
was removed from this driver in commit 48b7802fc83f ("enetc: Remove Tx
checksumming offload code").

The blamed commit declared NETIF_F_HW_CSUM in dev->features to comply
with software TSO's expectations, and still did the checksumming in
software by calling skb_checksum_help(). So there isn't any restriction
for the Time-Specified Departure feature.

However, enetc_setup_tc_txtime() doesn't understand that, and blindly
looks for NETIF_F_CSUM_MASK.

Instead of checking for things which can literally never happen in the
current code base, just remove the check and let the driver offload
tc-etf qdiscs.

Fixes: d372c46a5f4e ("net: enetc: declare NETIF_F_HW_CSUM and do it in software")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20220427203017.1291634-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/enetc/enetc_qos.c