From patchwork Wed Apr 10 11:18:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Russkikh X-Patchwork-Id: 52568 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 248B458CB; Wed, 10 Apr 2019 13:18:48 +0200 (CEST) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-eopbgr790073.outbound.protection.outlook.com [40.107.79.73]) by dpdk.org (Postfix) with ESMTP id 180D756A1 for ; Wed, 10 Apr 2019 13:18:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=AQUANTIA1COM.onmicrosoft.com; s=selector1-aquantia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=J11C+mo7XHreX3ZBaPv19Chh6VjRQzY/yBBvi1DDCUQ=; b=fM0xKFGB3cIgb3YvULiiBq4RjUfrX3WxaaRfHd+U6DM1TmzWbZovVLO/UTOE3TFWOCubkuS5aOU4yFb781Snbs19wO7tCvJ1b6hB7Vnoi5ki2lJgA5X0VAcrciDHKg/Z5fFBsSD/udB0J6bNNTXvPf2hp4Fvx8EYP7hXOHndTd4= Received: from BN8PR11MB3618.namprd11.prod.outlook.com (20.178.219.85) by BN8PR11MB3540.namprd11.prod.outlook.com (20.178.218.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.21; Wed, 10 Apr 2019 11:18:44 +0000 Received: from BN8PR11MB3618.namprd11.prod.outlook.com ([fe80::9d38:1845:842d:a489]) by BN8PR11MB3618.namprd11.prod.outlook.com ([fe80::9d38:1845:842d:a489%3]) with mapi id 15.20.1771.016; Wed, 10 Apr 2019 11:18:44 +0000 From: Igor Russkikh To: "dev@dpdk.org" CC: Pavel Belous , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , John McNamara , Marko Kovacevic , Konstantin Ananyev , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Igor Russkikh Thread-Topic: [PATCH 02/10] app/testpmd: use generic MACSEC API calls Thread-Index: AQHU748oEXpx8Dpp7Uy3q8NBnBnfSg== Date: Wed, 10 Apr 2019 11:18:44 +0000 Message-ID: <123a93a371be657e3e8481379db6f151350d4f90.1554894242.git.igor.russkikh@aquantia.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR05CA0061.namprd05.prod.outlook.com (2603:10b6:a03:74::38) To BN8PR11MB3618.namprd11.prod.outlook.com (2603:10b6:408:85::21) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Igor.Russkikh@aquantia.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [95.79.108.179] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d9fc63da-4a23-45f2-a5f9-08d6bda64b21 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(2017052603328)(7193020); SRVR:BN8PR11MB3540; x-ms-traffictypediagnostic: BN8PR11MB3540: x-microsoft-antispam-prvs: x-forefront-prvs: 00032065B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39850400004)(376002)(366004)(136003)(346002)(199004)(189003)(486006)(107886003)(6506007)(316002)(2616005)(386003)(54906003)(7416002)(53936002)(8936002)(68736007)(446003)(6916009)(476003)(72206003)(2501003)(105586002)(11346002)(44832011)(99286004)(2351001)(52116002)(186003)(26005)(118296001)(106356001)(14454004)(102836004)(76176011)(71200400001)(81156014)(7736002)(8676002)(81166006)(25786009)(256004)(6116002)(5660300002)(71190400001)(1730700003)(5640700003)(2906002)(66066001)(6512007)(478600001)(6486002)(50226002)(305945005)(97736004)(4326008)(3846002)(36756003)(6436002)(86362001)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN8PR11MB3540; H:BN8PR11MB3618.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: aquantia.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: SCF1n4+9s8pxas+rTyUoxB2daKDXT16L2kg9Te7BeDdPCSEufR0Tj1OBM7LkNKwx/wUiCnNcm2cvWbn/ZpVI2XxrScg2jl2bI4qJNBtoq5AH+FUUjKmNhfYnN+pK9ex2jlgp9VBEcUESnSzff/sengK8urYgHn+xJ/e2Mflryv2JllMlZbkNaUK5llyHQaeU+x/EXVy8q8OepCCPRDcpNMcf8kD4Gx3trbc6imvzHyMaJyBrWptB4F8fVgxbBsXr/WqxInii1M6+U1TgOiCeEm4v0aZpoVvdpXOk4z9BjjtI5nbJ2SR09tzmSPVThFNiTIT8lwqL+gFC0ZWIz75hNOvnw1gIRh7kzlkDk6cY92Jhc4eLaclgk21VOQ/KaSYgCOMkrJb2vxqlgB4RhQ1tlcrfuIxOkcLH8AmbB+esqYQ= MIME-Version: 1.0 X-OriginatorOrg: aquantia.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9fc63da-4a23-45f2-a5f9-08d6bda64b21 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2019 11:18:44.5293 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 83e2e134-991c-4ede-8ced-34d47e38e6b1 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3540 Subject: [dpdk-dev] [PATCH 02/10] app/testpmd: use generic MACSEC API calls X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Here we do repace testpmd direct usage of IXGBE driver calls with generic ethdev macsec API calls Signed-off-by: Igor Russkikh --- 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);