[net-next,v5,0/7] net: lan966x: Extend xdp support

Message ID 20221123203139.3828548-1-horatiu.vultur@microchip.com
Headers
Series net: lan966x: Extend xdp support |

Message

Horatiu Vultur Nov. 23, 2022, 8:31 p.m. UTC
  Extend the current support of XDP in lan966x with the action XDP_TX and
XDP_REDIRECT.
The first patches just prepare the things such that it would be easier
to add XDP_TX and XDP_REDIRECT actions. Like adding XDP_PACKET_HEADROOM,
introduce helper functions, use the correct dma_dir for the page pool
The last 2 patches introduce the XDP actions XDP_TX and XDP_REDIRECT.

v4->v5:
- add iterator declaration inside for loops
- move the scope of port inside the function lan966x_fdma_rx_alloc_page_pool
- create union for skb and xdpf inside struct lan966x_tx_dcb_buf

v3->v4:
- use napi_consume_skb instead of dev_kfree_skb_any
- arrange members in struct lan966x_tx_dcb_buf not to have holes
- fix when xdp program is added the check for determining if page pool
  needs to be recreated was wrong
- change type for len in lan966x_tx_dcb_buf to u32

v2->v3:
- make sure to update rxq memory model
- update the page pool direction if there is any xdp program
- in case of action XDP_TX give back to reuse the page
- in case of action XDP_REDIRECT, remap the frame and make sure to
  unmap it when is transmitted.

v1->v2:
- use skb_reserve of using skb_put and skb_pull
- make sure that data_len doesn't include XDP_PACKET_HEADROOM


Horatiu Vultur (7):
  net: lan966x: Add XDP_PACKET_HEADROOM
  net: lan966x: Introduce helper functions
  net: lan966x: Add len field to lan966x_tx_dcb_buf
  net: lan966x: Update rxq memory model
  net: lan966x: Update dma_dir of page_pool_params
  net: lan966x: Add support for XDP_TX
  net: lan966x: Add support for XDP_REDIRECT

 .../ethernet/microchip/lan966x/lan966x_fdma.c | 264 +++++++++++++++---
 .../ethernet/microchip/lan966x/lan966x_main.c |   5 +-
 .../ethernet/microchip/lan966x/lan966x_main.h |  30 +-
 .../ethernet/microchip/lan966x/lan966x_xdp.c  |  66 ++++-
 4 files changed, 312 insertions(+), 53 deletions(-)
  

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 25, 2022, 10:50 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Wed, 23 Nov 2022 21:31:32 +0100 you wrote:
> Extend the current support of XDP in lan966x with the action XDP_TX and
> XDP_REDIRECT.
> The first patches just prepare the things such that it would be easier
> to add XDP_TX and XDP_REDIRECT actions. Like adding XDP_PACKET_HEADROOM,
> introduce helper functions, use the correct dma_dir for the page pool
> The last 2 patches introduce the XDP actions XDP_TX and XDP_REDIRECT.
> 
> [...]

Here is the summary with links:
  - [net-next,v5,1/7] net: lan966x: Add XDP_PACKET_HEADROOM
    https://git.kernel.org/netdev/net-next/c/7292bb064d62
  - [net-next,v5,2/7] net: lan966x: Introduce helper functions
    https://git.kernel.org/netdev/net-next/c/3d66bc578655
  - [net-next,v5,3/7] net: lan966x: Add len field to lan966x_tx_dcb_buf
    https://git.kernel.org/netdev/net-next/c/49f5eea8c4f5
  - [net-next,v5,4/7] net: lan966x: Update rxq memory model
    https://git.kernel.org/netdev/net-next/c/77ddda44411c
  - [net-next,v5,5/7] net: lan966x: Update dma_dir of page_pool_params
    https://git.kernel.org/netdev/net-next/c/560c7223d6e4
  - [net-next,v5,6/7] net: lan966x: Add support for XDP_TX
    https://git.kernel.org/netdev/net-next/c/19c6f534f636
  - [net-next,v5,7/7] net: lan966x: Add support for XDP_REDIRECT
    https://git.kernel.org/netdev/net-next/c/a825b611c7c1

You are awesome, thank you!