DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: dev@dpdk.org, Aman Singh <aman.deep.singh@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Ivan Malov <ivan.malov@arknetworks.am>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: "Konstantin Ananyev" <konstantin.ananyev@huawei.com>,
	"Morten Brørup" <mb@smartsharesystems.com>,
	"Bruce Richardson" <bruce.richardson@intel.com>
Subject: [PATCH v3 2/3] ethdev: Improve descriptions of RX and TX offloads
Date: Sun,  3 Aug 2025 19:42:17 +0000	[thread overview]
Message-ID: <20250803194218.683318-2-mb@smartsharesystems.com> (raw)
In-Reply-To: <20250803194218.683318-1-mb@smartsharesystems.com>

The descriptions of the RX and TX offloads have been improved, to
reflect that they are not only for device capability reporting, but
also for device and queue configuration purposes.

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
v3:
* Add notes about conflicts between fast mbuf release and
  multi segment send. (Stephen Hemminger)
---
 lib/ethdev/rte_ethdev.h | 34 ++++++++++++++++++++++++----------
 1 file changed, 24 insertions(+), 10 deletions(-)

diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index f9fb6ae549..724b2b149c 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -1550,7 +1550,7 @@ struct rte_eth_conf {
 };
 
 /**
- * Rx offload capabilities of a device.
+ * Rx offload capabilities/configuration of a device or queue.
  */
 #define RTE_ETH_RX_OFFLOAD_VLAN_STRIP       RTE_BIT64(0)
 #define RTE_ETH_RX_OFFLOAD_IPV4_CKSUM       RTE_BIT64(1)
@@ -1585,12 +1585,12 @@ struct rte_eth_conf {
 			     RTE_ETH_RX_OFFLOAD_QINQ_STRIP)
 
 /*
- * If new Rx offload capabilities are defined, they also must be
+ * If new Rx offloads are defined, they also must be
  * mentioned in rte_rx_offload_names in rte_ethdev.c file.
  */
 
 /**
- * Tx offload capabilities of a device.
+ * Tx offload capabilities/configuration of a device or queue.
  */
 #define RTE_ETH_TX_OFFLOAD_VLAN_INSERT      RTE_BIT64(0)
 #define RTE_ETH_TX_OFFLOAD_IPV4_CKSUM       RTE_BIT64(1)
@@ -1611,39 +1611,53 @@ struct rte_eth_conf {
  * Tx queue without SW lock.
  */
 #define RTE_ETH_TX_OFFLOAD_MT_LOCKFREE      RTE_BIT64(14)
-/** Device supports multi segment send. */
+/**
+ * Multi segment send.
+ *
+ * Note: If a port is configured for fast release of mbufs, the driver is expected to use an
+ * optimized Tx burst function relying on the preconditions for fast release of mbufs, which
+ * prohibits segmented packets, and thus multi segment send is unavailable.
+ * Note: If configuring a port for multi segment send, support for configuring a Tx queue for
+ * fast release of mbufs depends on the driver.
+ */
 #define RTE_ETH_TX_OFFLOAD_MULTI_SEGS       RTE_BIT64(15)
 /**
- * Device supports optimization for fast release of mbufs.
+ * Optimization for fast release of mbufs.
  * When set application must guarantee that per-queue all mbufs come from the same mempool,
  * are direct, have refcnt=1, next=NULL and nb_segs=1, as done by rte_pktmbuf_prefree_seg().
  *
+ * Note: If configuring a port for fast release of mbufs, the driver is expected to use an
+ * optimized Tx burst function relying on the preconditions for fast release of mbufs, which
+ * prohibits segmented packets, and thus multi segment send becomes unavailable.
+ * Note: If a port is configured for multi segment send, support for configuring a Tx queue
+ * for fast release of mbufs depends on the driver.
+ *
  * @see rte_mbuf_raw_free_bulk()
  */
 #define RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE   RTE_BIT64(16)
 #define RTE_ETH_TX_OFFLOAD_SECURITY         RTE_BIT64(17)
 /**
- * Device supports generic UDP tunneled packet TSO.
+ * Generic UDP tunneled packet TSO.
  * Application must set RTE_MBUF_F_TX_TUNNEL_UDP and other mbuf fields required
  * for tunnel TSO.
  */
 #define RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO      RTE_BIT64(18)
 /**
- * Device supports generic IP tunneled packet TSO.
+ * Generic IP tunneled packet TSO.
  * Application must set RTE_MBUF_F_TX_TUNNEL_IP and other mbuf fields required
  * for tunnel TSO.
  */
 #define RTE_ETH_TX_OFFLOAD_IP_TNL_TSO       RTE_BIT64(19)
-/** Device supports outer UDP checksum */
+/** Outer UDP checksum. Used for tunneling packet. */
 #define RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM  RTE_BIT64(20)
 /**
- * Device sends on time read from RTE_MBUF_DYNFIELD_TIMESTAMP_NAME
+ * Send on time read from RTE_MBUF_DYNFIELD_TIMESTAMP_NAME
  * if RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME is set in ol_flags.
  * The mbuf field and flag are registered when the offload is configured.
  */
 #define RTE_ETH_TX_OFFLOAD_SEND_ON_TIMESTAMP RTE_BIT64(21)
 /*
- * If new Tx offload capabilities are defined, they also must be
+ * If new Tx offloads are defined, they also must be
  * mentioned in rte_tx_offload_names in rte_ethdev.c file.
  */
 
-- 
2.43.0


  reply	other threads:[~2025-08-03 19:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-31  9:07 [PATCH] ethdev: Reject conflicting TX offloads configuration Morten Brørup
2025-07-31  9:24 ` Bruce Richardson
2025-07-31 10:07   ` Andrew Rybchenko
2025-07-31  9:27 ` Ivan Malov
2025-07-31  9:34   ` Morten Brørup
2025-07-31 11:32 ` Konstantin Ananyev
2025-07-31 12:56 ` [PATCH v2 1/3] testpmd: Do not enable mbuf fast release TX offload by default Morten Brørup
2025-07-31 12:56   ` [PATCH v2 2/3] ethdev: Improve descriptions of RX and TX offloads Morten Brørup
2025-07-31 12:56   ` [PATCH v2 3/3] ethdev: Reject conflicting TX offloads configuration Morten Brørup
2025-08-01  1:09     ` zhoumin
2025-08-02 20:53 ` [PATCH] " Stephen Hemminger
2025-08-02 21:33   ` Ivan Malov
2025-08-03 10:51     ` Morten Brørup
2025-08-03 15:56       ` Stephen Hemminger
2025-08-03 19:42 ` [PATCH v3 1/3] testpmd: Do not enable mbuf fast release TX offload by default Morten Brørup
2025-08-03 19:42   ` Morten Brørup [this message]
2025-08-03 19:42   ` [PATCH v3 3/3] ethdev: Reject conflicting TX offloads configuration Morten Brørup

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=20250803194218.683318-2-mb@smartsharesystems.com \
    --to=mb@smartsharesystems.com \
    --cc=aman.deep.singh@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ivan.malov@arknetworks.am \
    --cc=konstantin.ananyev@huawei.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).