From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BA722436E9; Thu, 14 Dec 2023 07:49:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A9D4E42FA9; Thu, 14 Dec 2023 07:49:42 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 0353042FA1 for ; Thu, 14 Dec 2023 07:49:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702536580; x=1734072580; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lM3487a78Nv7Q8oZ1LxOSEIkqs0mQtdimUx4wnTwMRg=; b=Gn+byhIouVf90+qLvmqNiIAsCHh/j39PtVgYdMUMlOO1eMyM3jYVa20T fT9RuG2knqM9aP2FRW4TcLxA5eKfAjyYmFgtiatsjWES0xU+ukXWqUNmw xOZC0io1LVDctQiHpFaL4+byjV42mtUM4whb4TmfPFAmEmbv0ojLi9jvS ecEQmsCy04Qf56vxfdjRDGvjApTNENhChA5gpL6kPoHXnR7uDR/J+quKn Hi9laN9Vha1KklfNZWrKwVgjJoxTDvulgyU9UAGCUG+UKTklBOf5Ks8IS qOR437lAWaZVxuIetxcRp6+W5ggjhgF4N89zNAnWdP38D9TEptBT4+wLQ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="8440320" X-IronPort-AV: E=Sophos;i="6.04,274,1695711600"; d="scan'208";a="8440320" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 22:49:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="1105584418" X-IronPort-AV: E=Sophos;i="6.04,274,1695711600"; d="scan'208";a="1105584418" Received: from unknown (HELO zhichao-dpdk..) ([10.239.252.103]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 22:49:37 -0800 From: Zhichao Zeng To: dev@dpdk.org Cc: qi.z.zhang@intel.com, Zhichao Zeng , Jingjing Wu , Beilei Xing Subject: [PATCH v2 1/3] net/iavf: support Tx LLDP on scalar Date: Thu, 14 Dec 2023 14:58:55 +0800 Message-Id: <20231214065857.2142565-2-zhichaox.zeng@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231214065857.2142565-1-zhichaox.zeng@intel.com> References: <20231206060828.3310347-1-zhichaox.zeng@intel.com> <20231214065857.2142565-1-zhichaox.zeng@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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