From: Tariq Toukan <tariqt@nvidia.com>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Jesper Dangaard Brouer <brouer@redhat.com>,
Toke Hoiland-Jorgensen <toke@redhat.com>,
<netdev@vger.kernel.org>, Saeed Mahameed <saeedm@nvidia.com>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Gal Pressman <gal@nvidia.com>,
Henning Fehrmann <henning.fehrmann@aei.mpg.de>,
"Oliver Behnke" <oliver.behnke@aei.mpg.de>,
Tariq Toukan <tariqt@nvidia.com>
Subject: [PATCH net-next 01/15] net/mlx5e: Move XDP struct and enum to XDP header
Date: Mon, 17 Apr 2023 15:18:49 +0300 [thread overview]
Message-ID: <20230417121903.46218-2-tariqt@nvidia.com> (raw)
In-Reply-To: <20230417121903.46218-1-tariqt@nvidia.com>
Move struct mlx5e_xdp_info and enum mlx5e_xdp_xmit_mode from the generic
en.h to the XDP header, where they belong.
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en.h | 35 -------------------
.../net/ethernet/mellanox/mlx5/core/en/xdp.h | 35 +++++++++++++++++++
2 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index ba615b74bb8e..3f5463d42a1e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -475,41 +475,6 @@ struct mlx5e_txqsq {
cqe_ts_to_ns ptp_cyc2time;
} ____cacheline_aligned_in_smp;
-/* XDP packets can be transmitted in different ways. On completion, we need to
- * distinguish between them to clean up things in a proper way.
- */
-enum mlx5e_xdp_xmit_mode {
- /* An xdp_frame was transmitted due to either XDP_REDIRECT from another
- * device or XDP_TX from an XSK RQ. The frame has to be unmapped and
- * returned.
- */
- MLX5E_XDP_XMIT_MODE_FRAME,
-
- /* The xdp_frame was created in place as a result of XDP_TX from a
- * regular RQ. No DMA remapping happened, and the page belongs to us.
- */
- MLX5E_XDP_XMIT_MODE_PAGE,
-
- /* No xdp_frame was created at all, the transmit happened from a UMEM
- * page. The UMEM Completion Ring producer pointer has to be increased.
- */
- MLX5E_XDP_XMIT_MODE_XSK,
-};
-
-struct mlx5e_xdp_info {
- enum mlx5e_xdp_xmit_mode mode;
- union {
- struct {
- struct xdp_frame *xdpf;
- dma_addr_t dma_addr;
- } frame;
- struct {
- struct mlx5e_rq *rq;
- struct page *page;
- } page;
- };
-};
-
struct mlx5e_xmit_data {
dma_addr_t dma_addr;
void *data;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h
index 10bcfa6f88c1..8208692035f8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h
@@ -50,6 +50,41 @@ struct mlx5e_xdp_buff {
struct mlx5e_rq *rq;
};
+/* XDP packets can be transmitted in different ways. On completion, we need to
+ * distinguish between them to clean up things in a proper way.
+ */
+enum mlx5e_xdp_xmit_mode {
+ /* An xdp_frame was transmitted due to either XDP_REDIRECT from another
+ * device or XDP_TX from an XSK RQ. The frame has to be unmapped and
+ * returned.
+ */
+ MLX5E_XDP_XMIT_MODE_FRAME,
+
+ /* The xdp_frame was created in place as a result of XDP_TX from a
+ * regular RQ. No DMA remapping happened, and the page belongs to us.
+ */
+ MLX5E_XDP_XMIT_MODE_PAGE,
+
+ /* No xdp_frame was created at all, the transmit happened from a UMEM
+ * page. The UMEM Completion Ring producer pointer has to be increased.
+ */
+ MLX5E_XDP_XMIT_MODE_XSK,
+};
+
+struct mlx5e_xdp_info {
+ enum mlx5e_xdp_xmit_mode mode;
+ union {
+ struct {
+ struct xdp_frame *xdpf;
+ dma_addr_t dma_addr;
+ } frame;
+ struct {
+ struct mlx5e_rq *rq;
+ struct page *page;
+ } page;
+ };
+};
+
struct mlx5e_xsk_param;
int mlx5e_xdp_max_mtu(struct mlx5e_params *params, struct mlx5e_xsk_param *xsk);
bool mlx5e_xdp_handle(struct mlx5e_rq *rq,
--
2.34.1
next prev parent reply other threads:[~2023-04-17 12:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 12:18 [PATCH net-next 00/15] net/mlx5e: Extend XDP multi-buffer capabilities Tariq Toukan
2023-04-17 12:18 ` Tariq Toukan [this message]
2023-04-17 12:18 ` [PATCH net-next 02/15] net/mlx5e: Move struct mlx5e_xmit_data to datapath header Tariq Toukan
2023-04-17 12:18 ` [PATCH net-next 03/15] net/mlx5e: Introduce extended version for mlx5e_xmit_data Tariq Toukan
2023-04-17 12:18 ` [PATCH net-next 04/15] net/mlx5e: XDP, Remove doubtful unlikely calls Tariq Toukan
2023-04-17 12:18 ` [PATCH net-next 05/15] net/mlx5e: XDP, Use multiple single-entry objects in xdpi_fifo Tariq Toukan
2023-04-17 12:18 ` [PATCH net-next 06/15] net/mlx5e: XDP, Add support for multi-buffer XDP redirect-in Tariq Toukan
2023-04-17 12:18 ` [PATCH net-next 07/15] net/mlx5e: XDP, Improve Striding RQ check with XDP Tariq Toukan
2023-04-17 12:18 ` [PATCH net-next 08/15] net/mlx5e: XDP, Let XDP checker function get the params as input Tariq Toukan
2023-04-17 12:18 ` [PATCH net-next 09/15] net/mlx5e: XDP, Consider large muti-buffer packets in Striding RQ params calculations Tariq Toukan
2023-04-17 12:18 ` [PATCH net-next 10/15] net/mlx5e: XDP, Remove un-established assumptions on XDP buffer Tariq Toukan
2023-04-17 12:18 ` [PATCH net-next 11/15] net/mlx5e: XDP, Allow non-linear single-segment frames in XDP TX MPWQE Tariq Toukan
2023-04-17 12:19 ` [PATCH net-next 12/15] net/mlx5e: RX, Take shared info fragment addition into a function Tariq Toukan
2023-04-17 12:19 ` [PATCH net-next 13/15] net/mlx5e: RX, Generalize mlx5e_fill_mxbuf() Tariq Toukan
2023-04-17 12:19 ` [PATCH net-next 14/15] net/mlx5e: RX, Prepare non-linear striding RQ for XDP multi-buffer support Tariq Toukan
2023-04-17 12:19 ` [PATCH net-next 15/15] net/mlx5e: RX, Add XDP multi-buffer support in Striding RQ Tariq Toukan
2023-04-20 0:47 ` [PATCH net-next 00/15] net/mlx5e: Extend XDP multi-buffer capabilities Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230417121903.46218-2-tariqt@nvidia.com \
--to=tariqt@nvidia.com \
--cc=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=henning.fehrmann@aei.mpg.de \
--cc=kuba@kernel.org \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oliver.behnke@aei.mpg.de \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=toke@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).