From: Zhichao Zeng <zhichaox.zeng@intel.com>
To: dev@dpdk.org
Cc: qi.z.zhang@intel.com, Zhichao Zeng <zhichaox.zeng@intel.com>,
Jingjing Wu <jingjing.wu@intel.com>,
Beilei Xing <beilei.xing@intel.com>
Subject: [PATCH v2 1/3] net/iavf: support Tx LLDP on scalar
Date: Thu, 14 Dec 2023 14:58:55 +0800 [thread overview]
Message-ID: <20231214065857.2142565-2-zhichaox.zeng@intel.com> (raw)
In-Reply-To: <20231214065857.2142565-1-zhichaox.zeng@intel.com>
This patch adds an mbuf dynflag IAVF_TX_LLDP_DYNFLAG to determine
whether or not to fill the SWTCH_UPLINK bit in the Tx context descriptor
to send LLDP packet.
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
drivers/net/iavf/iavf_rxtx.c | 5 +++++
drivers/net/iavf/rte_pmd_iavf.h | 2 ++
2 files changed, 7 insertions(+)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index f19aa14646..c986fa944a 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2427,6 +2427,8 @@ iavf_calc_context_desc(uint64_t flags, uint8_t vlan_flag)
if (flags & RTE_MBUF_F_TX_VLAN &&
vlan_flag & IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2)
return 1;
+ if (rte_mbuf_dynflag_lookup(IAVF_TX_LLDP_DYNFLAG, NULL) > 0)
+ return 1;
return 0;
}
@@ -2445,6 +2447,9 @@ iavf_fill_ctx_desc_cmd_field(volatile uint64_t *field, struct rte_mbuf *m,
cmd |= IAVF_TX_CTX_DESC_IL2TAG2
<< IAVF_TXD_CTX_QW1_CMD_SHIFT;
}
+ if (rte_mbuf_dynflag_lookup(IAVF_TX_LLDP_DYNFLAG, NULL) > 0)
+ cmd |= IAVF_TX_CTX_DESC_SWTCH_UPLINK
+ << IAVF_TXD_CTX_QW1_CMD_SHIFT;
*field |= cmd;
}
diff --git a/drivers/net/iavf/rte_pmd_iavf.h b/drivers/net/iavf/rte_pmd_iavf.h
index 56d453fc4c..2c442b6a05 100644
--- a/drivers/net/iavf/rte_pmd_iavf.h
+++ b/drivers/net/iavf/rte_pmd_iavf.h
@@ -23,6 +23,8 @@
extern "C" {
#endif
+#define IAVF_TX_LLDP_DYNFLAG "intel_pmd_dynflag_tx_lldp"
+
/**
* The supported network flexible descriptor's extraction metadata format.
*/
--
2.34.1
next prev parent reply other threads:[~2023-12-14 6:49 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 6:08 [PATCH] net/iavf: support Tx LLDP on scalar and AVX512 Zhichao Zeng
2023-12-14 6:58 ` [PATCH v2 0/3] " Zhichao Zeng
2023-12-14 6:58 ` Zhichao Zeng [this message]
2023-12-14 6:58 ` [PATCH v2 2/3] net/iavf: support Tx LLDP on AVX512 Zhichao Zeng
2023-12-14 6:58 ` [PATCH v2 3/3] net/iavf: add Tx LLDP command Zhichao Zeng
2023-12-20 9:32 ` [PATCH v3 0/3] net/iavf: support Tx LLDP on scalar and AVX512 Zhichao Zeng
2023-12-20 9:32 ` [PATCH v3 1/3] net/iavf: support Tx LLDP on scalar Zhichao Zeng
2023-12-21 7:28 ` [PATCH v4 0/3] net/iavf: support Tx LLDP on scalar and AVX512 Zhichao Zeng
2023-12-21 7:28 ` [PATCH v4 1/3] net/iavf: support Tx LLDP on scalar Zhichao Zeng
2023-12-27 4:34 ` Zhang, Qi Z
2023-12-21 7:28 ` [PATCH v4 2/3] net/iavf: support Tx LLDP on AVX512 Zhichao Zeng
2023-12-21 7:28 ` [PATCH v4 3/3] net/iavf: add Tx LLDP command Zhichao Zeng
2023-12-25 3:14 ` [PATCH v4 0/3] net/iavf: support Tx LLDP on scalar and AVX512 Zhichao Zeng
2023-12-25 3:14 ` [PATCH v4 1/3] net/iavf: support Tx LLDP on scalar Zhichao Zeng
2023-12-25 3:14 ` [PATCH v4 2/3] net/iavf: support Tx LLDP on AVX512 Zhichao Zeng
2023-12-25 3:14 ` [PATCH v4 3/3] net/iavf: add Tx LLDP command Zhichao Zeng
2023-12-28 3:22 ` [PATCH v5 0/3] net/iavf: support Tx LLDP on scalar and AVX512 Zhichao Zeng
2023-12-28 3:22 ` [PATCH v5 1/3] net/iavf: support Tx LLDP on scalar Zhichao Zeng
2023-12-28 3:22 ` [PATCH v5 2/3] net/iavf: support Tx LLDP on AVX512 Zhichao Zeng
2023-12-28 3:22 ` [PATCH v5 3/3] net/iavf: add Tx LLDP command Zhichao Zeng
2024-01-03 7:47 ` [PATCH v6 0/3] net/iavf: support Tx LLDP on scalar and AVX512 Zhichao Zeng
2024-01-03 7:47 ` [PATCH v6 1/3] net/iavf: support Tx LLDP on scalar Zhichao Zeng
2024-01-03 7:47 ` [PATCH v6 2/3] net/iavf: support Tx LLDP on AVX512 Zhichao Zeng
2024-01-03 7:47 ` [PATCH v6 3/3] net/iavf: add Tx LLDP command Zhichao Zeng
2024-01-04 0:26 ` [PATCH v5 0/3] net/iavf: support Tx LLDP on scalar and AVX512 Zhang, Qi Z
2023-12-20 9:32 ` [PATCH v3 2/3] net/iavf: support Tx LLDP on AVX512 Zhichao Zeng
2023-12-20 9:32 ` [PATCH v3 3/3] net/iavf: add Tx LLDP command Zhichao Zeng
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=20231214065857.2142565-2-zhichaox.zeng@intel.com \
--to=zhichaox.zeng@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=qi.z.zhang@intel.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).