DPDK patches and discussions
 help / color / mirror / Atom feed
From: Igor Russkikh <Igor.Russkikh@aquantia.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: Pavel Belous <Pavel.Belous@aquantia.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>,
	John McNamara <john.mcnamara@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	Andrew Rybchenko <arybchenko@solarflare.com>,
	Igor Russkikh <Igor.Russkikh@aquantia.com>
Subject: [dpdk-dev] [PATCH 02/10] app/testpmd: use generic MACSEC API calls
Date: Wed, 10 Apr 2019 11:18:44 +0000	[thread overview]
Message-ID: <123a93a371be657e3e8481379db6f151350d4f90.1554894242.git.igor.russkikh@aquantia.com> (raw)
Message-ID: <20190410111844.1F-XBZo4CYUPfp-Bk0EZnbyo25mFjELvgPyT3MS5N-4@z> (raw)
In-Reply-To: <cover.1554894242.git.igor.russkikh@aquantia.com>

Here we do repace testpmd direct usage of IXGBE driver calls
with generic ethdev macsec API calls

Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
---
 app/test-pmd/cmdline.c | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 2ab03c111316..1730c76fe65c 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -13958,9 +13958,7 @@ cmd_set_macsec_offload_on_parsed(
 
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MACSEC_INSERT) {
-#ifdef RTE_LIBRTE_IXGBE_PMD
-		ret = rte_pmd_ixgbe_macsec_enable(port_id, en, rp);
-#endif
+		ret = rte_eth_macsec_enable(port_id, en, rp);
 	}
 	RTE_SET_USED(en);
 	RTE_SET_USED(rp);
@@ -14052,9 +14050,7 @@ cmd_set_macsec_offload_off_parsed(
 
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MACSEC_INSERT) {
-#ifdef RTE_LIBRTE_IXGBE_PMD
-		ret = rte_pmd_ixgbe_macsec_disable(port_id);
-#endif
+		ret = rte_eth_macsec_disable(port_id);
 	}
 	switch (ret) {
 	case 0:
@@ -14138,13 +14134,11 @@ cmd_set_macsec_sc_parsed(
 	int ret = -ENOTSUP;
 	int is_tx = (strcmp(res->tx_rx, "tx") == 0) ? 1 : 0;
 
-#ifdef RTE_LIBRTE_IXGBE_PMD
 	ret = is_tx ?
-		rte_pmd_ixgbe_macsec_config_txsc(res->port_id,
+		rte_eth_macsec_config_txsc(res->port_id,
 				res->mac.addr_bytes) :
-		rte_pmd_ixgbe_macsec_config_rxsc(res->port_id,
+		rte_eth_macsec_config_rxsc(res->port_id,
 				res->mac.addr_bytes, res->pi);
-#endif
 	RTE_SET_USED(is_tx);
 
 	switch (ret) {
@@ -14257,13 +14251,11 @@ cmd_set_macsec_sa_parsed(
 		key[i] = (uint8_t) ((xdgt0 * 16) + xdgt1);
 	}
 
-#ifdef RTE_LIBRTE_IXGBE_PMD
 	ret = is_tx ?
-		rte_pmd_ixgbe_macsec_select_txsa(res->port_id,
+		rte_eth_macsec_select_txsa(res->port_id,
 			res->idx, res->an, res->pn, key) :
-		rte_pmd_ixgbe_macsec_select_rxsa(res->port_id,
+		rte_eth_macsec_select_rxsa(res->port_id,
 			res->idx, res->an, res->pn, key);
-#endif
 	RTE_SET_USED(is_tx);
 	RTE_SET_USED(key);
 
-- 
2.17.1


  parent reply	other threads:[~2019-04-10 11:18 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 11:18 [dpdk-dev] [PATCH 00/10] add MACSEC hw offload to atlantic PMD Igor Russkikh
2019-04-10 11:18 ` Igor Russkikh
2019-04-10 11:18 ` [dpdk-dev] [PATCH 01/10] ethdev: introduce MACSEC device ops Igor Russkikh
2019-04-10 11:18   ` Igor Russkikh
2019-04-10 11:46   ` Thomas Monjalon
2019-04-10 11:46     ` Thomas Monjalon
2019-04-11 12:37     ` Igor Russkikh
2019-04-11 12:37       ` Igor Russkikh
2019-04-11 21:15       ` Thomas Monjalon
2019-04-11 21:15         ` Thomas Monjalon
2019-04-12  8:50         ` Igor Russkikh
2019-04-12  8:50           ` Igor Russkikh
2019-04-12 11:22           ` Thomas Monjalon
2019-04-12 11:22             ` Thomas Monjalon
2019-04-12 18:26   ` Ferruh Yigit
2019-04-12 18:26     ` Ferruh Yigit
2019-04-13  7:24     ` Igor Russkikh
2019-04-13  7:24       ` Igor Russkikh
2019-04-16  9:43       ` Ferruh Yigit
2019-04-16  9:43         ` Ferruh Yigit
2019-04-16  9:58         ` Andrew Rybchenko
2019-04-16  9:58           ` Andrew Rybchenko
2019-04-16 10:11           ` Thomas Monjalon
2019-04-16 10:11             ` Thomas Monjalon
2019-04-16 10:19             ` Igor Russkikh
2019-04-16 10:19               ` Igor Russkikh
2019-04-10 11:18 ` Igor Russkikh [this message]
2019-04-10 11:18   ` [dpdk-dev] [PATCH 02/10] app/testpmd: use generic MACSEC API calls Igor Russkikh
2019-04-10 11:50   ` Thomas Monjalon
2019-04-10 11:50     ` Thomas Monjalon
2019-04-10 11:18 ` [dpdk-dev] [PATCH 03/10] net/ixgbe: macsec callbacks implementation Igor Russkikh
2019-04-10 11:18   ` Igor Russkikh
2019-04-10 11:18 ` [dpdk-dev] [PATCH 04/10] net/atlantic: macsec hardware structures declaration Igor Russkikh
2019-04-10 11:18   ` Igor Russkikh
2019-04-10 11:18 ` [dpdk-dev] [PATCH 05/10] net/atlantic: macsec configuration code Igor Russkikh
2019-04-10 11:18   ` Igor Russkikh
2019-04-10 11:19 ` [dpdk-dev] [PATCH 06/10] net/atlantic: macsec firmware interface Igor Russkikh
2019-04-10 11:19   ` Igor Russkikh
2019-04-10 11:19 ` [dpdk-dev] [PATCH 07/10] net/atlantic: interrupt handling of macsec events Igor Russkikh
2019-04-10 11:19   ` Igor Russkikh
2019-04-10 11:19 ` [dpdk-dev] [PATCH 08/10] net/atlantic: implement macsec statistics Igor Russkikh
2019-04-10 11:19   ` Igor Russkikh
2019-04-10 11:19 ` [dpdk-dev] [PATCH 09/10] net/atlantic: bump internal driver version Igor Russkikh
2019-04-10 11:19   ` Igor Russkikh
2019-04-10 11:19 ` [dpdk-dev] [PATCH 10/10] net/atlantic: indicate macsec in NIC docs Igor Russkikh
2019-04-10 11:19   ` Igor Russkikh
2019-04-10 11:47   ` Thomas Monjalon
2019-04-10 11:47     ` Thomas Monjalon

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=123a93a371be657e3e8481379db6f151350d4f90.1554894242.git.igor.russkikh@aquantia.com \
    --to=igor.russkikh@aquantia.com \
    --cc=Pavel.Belous@aquantia.com \
    --cc=arybchenko@solarflare.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=john.mcnamara@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=thomas@monjalon.net \
    --cc=wenzhuo.lu@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).