netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] gve: Add XDP support for GQI-QPL format
@ 2023-02-07 21:00 Praveen Kaligineedi
  2023-02-07 21:00 ` [PATCH net-next 1/4] gve: XDP support GQI-QPL: helper function changes Praveen Kaligineedi
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Praveen Kaligineedi @ 2023-02-07 21:00 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, Praveen Kaligineedi

Adding support for XDP DROP, PASS, TX, REDIRECT for GQI QPL format.
Add AF_XDP zero-copy support.

When an XDP program is installed, dedicated TX queues are created to
handle XDP traffic. The user needs to ensure that the number of 
configured TX queues is equal to the number of configured RX queues; and
the number of TX/RX queues is less than or equal to half the maximum
number of TX/RX queues.

The XDP traffic from AF_XDP sockets and from other NICs (arriving via
XDP_REDIRECT) will also egress through the dedicated XDP TX queues.

Although these changes support AF_XDP socket in zero-copy mode, there is
still a copy happening within the driver between XSK buffer pool and QPL
bounce buffers in GQI-QPL format.

The following example demonstrates how the XDP packets are mapped to
TX queues:

Example configuration:
Max RX queues : 2N, Max TX queues : 2N
Configured RX queues : N, Configured TX queues : N

TX queue mapping:
TX queues with queue id 0,...,N-1 will handle traffic from the stack.
TX queues with queue id N,...,2N-1 will handle XDP traffic.

For the XDP packets transmitted using XDP_TX action:
<Egress TX queue id> = N + <Ingress RX queue id>

For the XDP packets that arrive from other NICs via XDP_REDIRECT action:
<Egress TX queue id> = N + ( smp_processor_id % N )

For AF_XDP zero-copy mode:
<Egress TX queue id> = N + <AF_XDP TX queue id>

Praveen Kaligineedi (4):
  gve: XDP support GQI-QPL: helper function changes
  gve: Add XDP DROP and TX support for GQI-QPL format
  gve: Add XDP REDIRECT support for GQI-QPL format
  gve: Add AF_XDP zero-copy support for GQI-QPL format

 drivers/net/ethernet/google/gve/gve.h         |  50 ++-
 drivers/net/ethernet/google/gve/gve_ethtool.c |  91 +++--
 drivers/net/ethernet/google/gve/gve_main.c    | 325 +++++++++++++++++-
 drivers/net/ethernet/google/gve/gve_rx.c      | 143 +++++++-
 drivers/net/ethernet/google/gve/gve_rx_dqo.c  |   2 +-
 drivers/net/ethernet/google/gve/gve_tx.c      | 272 +++++++++++++--
 drivers/net/ethernet/google/gve/gve_utils.c   |   6 +-
 drivers/net/ethernet/google/gve/gve_utils.h   |   3 +-
 8 files changed, 823 insertions(+), 69 deletions(-)

-- 
2.39.1.519.gcb327c4b5f-goog


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-02-14 14:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-07 21:00 [PATCH net-next 0/4] gve: Add XDP support for GQI-QPL format Praveen Kaligineedi
2023-02-07 21:00 ` [PATCH net-next 1/4] gve: XDP support GQI-QPL: helper function changes Praveen Kaligineedi
2023-02-07 21:00 ` [PATCH net-next 2/4] gve: Add XDP DROP and TX support for GQI-QPL format Praveen Kaligineedi
2023-02-09  5:54   ` Jakub Kicinski
2023-02-14  0:46   ` Maciej Fijalkowski
2023-02-07 21:00 ` [PATCH net-next 3/4] gve: Add XDP REDIRECT " Praveen Kaligineedi
2023-02-14  1:03   ` Maciej Fijalkowski
2023-02-07 21:00 ` [PATCH net-next 4/4] gve: Add AF_XDP zero-copy " Praveen Kaligineedi
2023-02-14 14:46   ` Maciej Fijalkowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).