Skip to content

net: safe guard net/core/tso.c users

Eric Dumazet netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9net: tso: add tso_features_check()include/net/tso.h net/core/tso.c+23 -05 replies
2/9net: mvneta: use tso_features_check()drivers/net/ethernet/marvell/mvneta.c+2 -00 replies
3/9net: thunderx: use tso_features_check()drivers/net/ethernet/cavium/thunder/nicvf_main.c drivers/net/ethernet/cavium/thunder/nicvf_queues.c+3 -00 replies
4/9dpaa2-eth: use tso_features_check()drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c+2 -00 replies
5/9net: enetc: use tso_features_check()drivers/net/ethernet/freescale/enetc/enetc.c drivers/net/ethernet/freescale/enetc/enetc4_pf.c drivers/net/ethernet/freescale/enetc/enetc_pf.c +1 more+8 -00 replies
6/9net: fec: use tso_features_check()drivers/net/ethernet/freescale/fec_main.c+2 -00 replies
7/9net: mv643xx_eth: use tso_features_check()drivers/net/ethernet/marvell/mv643xx_eth.c+2 -00 replies
8/9net: mvpp2: use tso_features_check()drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c+2 -00 replies
9/9octeontx2-pf: use tso_features_check()drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c +1 more+7 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/9] net: safe guard net/core/tso.c users

Most net/core/tso.c users assume headers length is smaller than TSO_HEADER_SIZE. This is because they use pre-allocated and pre-mapped piece of memory of (N * TSO_HEADER_SIZE) bytes.

Add tso_features_check() helper so that these drivers can request a fallback to GSO if headers are too big.

We could in the future add more checks in tso_features_check() against max number of segments per TSO packet, as many drivers also seem to drop packets if gso_size is too small relative to their TX ring sizes.

Eric Dumazet (9):
net: tso: add tso_features_check()
net: mvneta: use tso_features_check()
net: thunderx: use tso_features_check()
dpaa2-eth: use tso_features_check()
net: enetc: use tso_features_check()
net: fec: use tso_features_check()
net: mv643xx_eth: use tso_features_check()
net: mvpp2: use tso_features_check()
octeontx2-pf: use tso_features_check()

 drivers/net/ethernet/cavium/thunder/nicvf_main.c     |  2 ++
 drivers/net/ethernet/cavium/thunder/nicvf_queues.c   |  1 +
 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c     |  2 ++
 drivers/net/ethernet/freescale/enetc/enetc.c         |  2 ++
 drivers/net/ethernet/freescale/enetc/enetc4_pf.c     |  2 ++
 drivers/net/ethernet/freescale/enetc/enetc_pf.c      |  2 ++
 drivers/net/ethernet/freescale/enetc/enetc_vf.c      |  2 ++
 drivers/net/ethernet/freescale/fec_main.c            |  2 ++
 drivers/net/ethernet/marvell/mv643xx_eth.c           |  2 ++
 drivers/net/ethernet/marvell/mvneta.c                |  2 ++
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c      |  2 ++
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c |  2 ++
 .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.c   |  1 +
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c |  2 ++
 drivers/net/ethernet/marvell/octeontx2/nic/rep.c     |  2 ++
 include/net/tso.h                                    | 11 +++++++++++
 net/core/tso.c                                       | 12 ++++++++++++
 17 files changed, 51 insertions(+)
Signature · 1 line
2.53.0.1213.gd9a14994de-goog