[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230104194132.24637-1-gerhard@engleder-embedded.com>
Date: Wed, 4 Jan 2023 20:41:23 +0100
From: Gerhard Engleder <gerhard@...leder-embedded.com>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, edumazet@...gle.com,
pabeni@...hat.com, Gerhard Engleder <gerhard@...leder-embedded.com>
Subject: [PATCH net-next v3 0/9] tsnep: XDP support
Implement XDP support for tsnep driver. I tried to follow existing
drivers like igb/igc as far as possible. Some prework was already done
in previous patch series, so in this series only actual XDP stuff is
included.
Thanks for the NetDev 0x14 slides "Add XDP support on a NIC driver".
v3:
- use spin_lock_bh for TX (Paolo Abeni)
- add comment for XDP TX descriptor available check (Maciej Fijalkowski)
- return value bool for tsnep_xdp_xmit_frame_ring() (Saeed Mahameed)
- do not print DMA mapping error (Saeed Mahameed)
- use reverse xmas tree variable declaration (Saeed Mahameed)
- move struct xdp_rxq_info to end of struct tsnep_rx (Maciej Fijalkowski)
- check __TSNEP_DOWN flag on close to prevent double free (Saeed Mahameed)
- describe TSNEP_RX_INLINE_METADATA_SIZE in comment (Maciej Fijalkowski)
- substract TSNEP_RX_INLINE_METADATA_SIZE after DMA sync (Maciej Fijalkowski)
- use enum tsnep_tx_type for tsnep_xdp_tx_map (Saeed Mahameed)
- use nxmit as loop iterator in tsnep_netdev_xdp_xmit (Saeed Mahameed)
- stop netdev in tsnep_netdev_close() which is called during BPF prog setup
v2:
- move tsnep_xdp_xmit_back() to commit where it is used (Paolo Abeni)
- remove inline from tsnep_rx_offset() (Paolo Abeni)
- remove inline from tsnep_rx_offset_xdp() (Paolo Abeni)
- simplify tsnep_xdp_run_prog() call by moving xdp_status update to it (Paolo Abeni)
Gerhard Engleder (9):
tsnep: Use spin_lock_bh for TX
tsnep: Do not print DMA mapping error
tsnep: Add adapter down state
tsnep: Add XDP TX support
tsnep: Substract TSNEP_RX_INLINE_METADATA_SIZE once
tsnep: Support XDP BPF program setup
tsnep: Prepare RX buffer for XDP support
tsnep: Add RX queue info for XDP support
tsnep: Add XDP RX support
drivers/net/ethernet/engleder/Makefile | 2 +-
drivers/net/ethernet/engleder/tsnep.h | 32 +-
drivers/net/ethernet/engleder/tsnep_main.c | 468 +++++++++++++++++++--
drivers/net/ethernet/engleder/tsnep_xdp.c | 27 ++
4 files changed, 480 insertions(+), 49 deletions(-)
create mode 100644 drivers/net/ethernet/engleder/tsnep_xdp.c
--
2.30.2
Powered by blists - more mailing lists