From: Andrey Vesnovaty <andreyv@nvidia.com>
To: dev@dpdk.org
Cc: thomas@nvidia.net, orika@nvidia.com, viacheslavo@nvidia.com,
andrey.vesnovaty@gmail.com, ozsh@nvidia.com, elibr@nvidia.com,
alexr@nvidia.com, roniba@nvidia.com,
Thomas Monjalon <thomas@monjalon.net>,
Ferruh Yigit <ferruh.yigit@intel.com>,
Andrew Rybchenko <arybchenko@solarflare.com>
Subject: [dpdk-dev] [RFC 2/3] ethdev: support SFT APIs
Date: Wed, 9 Sep 2020 23:30:09 +0300 [thread overview]
Message-ID: <20200909203008.25563-3-andreyv@nvidia.com> (raw)
In-Reply-To: <20200909203008.25563-1-andreyv@nvidia.com>
ethdev updated to support SFT lookup offload
to ethernet device.
Signed-off-by: Andrey Vesnovaty <andreyv@nvidia.com>
---
lib/librte_ethdev/rte_ethdev.c | 7 +++++++
lib/librte_ethdev/rte_ethdev.h | 16 ++++++++++++++++
lib/librte_ethdev/rte_ethdev_core.h | 1 +
3 files changed, 24 insertions(+)
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 7858ad5f11..fcdcfcce6d 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -752,6 +752,13 @@ rte_eth_dev_get_sec_ctx(uint16_t port_id)
return rte_eth_devices[port_id].security_ctx;
}
+void *
+rte_eth_dev_get_sft_ctx(uint16_t port_id)
+{
+ RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, NULL);
+ return rte_eth_devices[port_id].sft_ctx;
+}
+
uint16_t
rte_eth_dev_count_avail(void)
{
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 70295d7ab7..83a71a8532 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1228,6 +1228,7 @@ struct rte_eth_conf {
#define DEV_RX_OFFLOAD_SCTP_CKSUM 0x00020000
#define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM 0x00040000
#define DEV_RX_OFFLOAD_RSS_HASH 0x00080000
+#define DEV_RX_OFFLOAD_SFT 0x00100000
#define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
DEV_RX_OFFLOAD_UDP_CKSUM | \
@@ -4388,6 +4389,21 @@ rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool);
void *
rte_eth_dev_get_sec_ctx(uint16_t port_id);
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
+ *
+ * Get the SFT context for the Ethernet device.
+ *
+ * @param port_id
+ * Port identifier of the Ethernet device
+ * @return
+ * - NULL on error.
+ * - pointer to SFT context on success.
+ */
+void *
+rte_eth_dev_get_sft_ctx(uint16_t port_id);
+
/**
* @warning
* @b EXPERIMENTAL: this API may change, or be removed, without prior notice
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 32407dd418..4ff458bfe0 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -806,6 +806,7 @@ struct rte_eth_dev {
struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
enum rte_eth_dev_state state; /**< Flag indicating the port state */
void *security_ctx; /**< Context for security ops */
+ void *sft_ctx; /**< Context for SFT ops */
uint64_t reserved_64s[4]; /**< Reserved for future fields */
void *reserved_ptrs[4]; /**< Reserved for future fields */
--
2.26.2
next prev parent reply other threads:[~2020-09-09 20:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 20:30 [dpdk-dev] [RFC 0/3] introduce Stateful Flow Table Andrey Vesnovaty
2020-09-09 20:30 ` [dpdk-dev] [RFC 1/3] ethdev: add item/action for SFT Andrey Vesnovaty
2020-09-16 15:46 ` Ori Kam
2020-09-18 7:04 ` Andrew Rybchenko
2020-09-09 20:30 ` Andrey Vesnovaty [this message]
2020-09-09 20:30 ` [dpdk-dev] [RFC 3/3] sft: introduce API Andrey Vesnovaty
2020-09-16 18:33 ` Ori Kam
2020-09-18 7:43 ` Andrew Rybchenko
2020-11-02 10:49 ` Andrey Vesnovaty
2020-09-18 13:34 ` Kinsella, Ray
2020-09-15 11:59 ` [dpdk-dev] [RFC 0/3] introduce Stateful Flow Table Andrey Vesnovaty
2020-11-04 12:59 ` [dpdk-dev] [PATCH v2 0/2] introduce stateful flow table Ori Kam
2020-11-04 12:59 ` [dpdk-dev] [PATCH v2 1/2] ethdev: add item/action for SFT Ori Kam
2020-11-04 12:59 ` [dpdk-dev] [PATCH v2 2/2] ethdev: introduce sft lib Ori Kam
2020-11-04 13:17 ` [dpdk-dev] [RFC v3 0/2] introduce stateful flow table Ori Kam
2020-11-04 13:17 ` [dpdk-dev] [RFC v3 1/2] ethdev: add item/action for SFT Ori Kam
2020-11-04 13:17 ` [dpdk-dev] [RFC v3 2/2] ethdev: introduce sft lib Ori Kam
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=20200909203008.25563-3-andreyv@nvidia.com \
--to=andreyv@nvidia.com \
--cc=alexr@nvidia.com \
--cc=andrey.vesnovaty@gmail.com \
--cc=arybchenko@solarflare.com \
--cc=dev@dpdk.org \
--cc=elibr@nvidia.com \
--cc=ferruh.yigit@intel.com \
--cc=orika@nvidia.com \
--cc=ozsh@nvidia.com \
--cc=roniba@nvidia.com \
--cc=thomas@monjalon.net \
--cc=thomas@nvidia.net \
--cc=viacheslavo@nvidia.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).