From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0082.outbound.protection.outlook.com [104.47.33.82]) by dpdk.org (Postfix) with ESMTP id ADA5F1B829 for ; Tue, 24 Oct 2017 16:19:09 +0200 (CEST) Received: from BN6PR03CA0002.namprd03.prod.outlook.com (10.168.230.140) by MWHPR03MB2701.namprd03.prod.outlook.com (10.168.207.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.156.4; Tue, 24 Oct 2017 14:19:07 +0000 Received: from BN1BFFO11FD039.protection.gbl (2a01:111:f400:7c10::1:195) by BN6PR03CA0002.outlook.office365.com (2603:10b6:404:23::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.77.21 via Frontend Transport; Tue, 24 Oct 2017 14:19:07 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD039.mail.protection.outlook.com (10.58.144.102) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.156.4 via Frontend Transport; Tue, 24 Oct 2017 14:19:07 +0000 Received: from netperf2.ap.freescale.net ([10.232.133.164]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v9OEIVHY029613; Tue, 24 Oct 2017 07:19:02 -0700 From: Akhil Goyal To: CC: , , , , , , , , , , , , Date: Tue, 24 Oct 2017 19:45:40 +0530 Message-ID: <20171024141545.30837-7-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171024141545.30837-1-akhil.goyal@nxp.com> References: <20171014221734.15511-1-akhil.goyal@nxp.com> <20171024141545.30837-1-akhil.goyal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131533283476382037; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(346002)(39860400002)(376002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(48376002)(8936002)(15650500001)(1076002)(498600001)(97736004)(77096006)(104016004)(50226002)(86362001)(305945005)(575784001)(7416002)(189998001)(8656005)(2906002)(6666003)(5660300001)(50986999)(6916009)(2351001)(33646002)(81156014)(47776003)(81166006)(105606002)(8656005)(356003)(68736007)(76176999)(4326008)(36756003)(16586007)(50466002)(316002)(106466001)(54906003)(85426001)(8676002)(5003940100001)(2950100002)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2701; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD039; 1:g9p5MzysUrtdURgrFhAwXqiXmzF9FhjzTgG8LY0C5sg2Gv367LPC99UODeigH47HRE7FxV7Dn9myUqatZmbTxBaTuwe9Xnqxu4JuSJifhO/jdEVrZEOkaxCD7kIWWoLS MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7f4621ca-ccb7-4a7b-bff4-08d51aea3034 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4628075)(201703131517081)(2017052603199); SRVR:MWHPR03MB2701; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2701; 3:3FPdBvVr7YQTdN2LSIstcFCVhm/XyvJWlp3s7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t65Zn/hetn04qg3R4+auAvRDH/8gMoWOkBjYZKCwADdFWEbBPzxmeS58Zl7+CA+GktiiwfZ4md5u19rOyWlRFbGwHv1jiQlU9UuhPOL59ZWIoOXkITvj2vYFP8Hhx23H9givRagfHE7bg3ebSt6n6Rs4VdoKDAJ0UOHsPoMDxImMmAERUHk66CXwz1hbbmBlpn35yfur/PW5Y+bOCRnSuyoQ63nAU/t0lpMSrREaUUXkAnnK7jX2JB/uIg== X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(3231020)(3002001)(10201501046)(6055026)(6096035)(20161123556025)(20161123563025)(20161123561025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123565025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR03MB2701; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR03MB2701; X-Forefront-PRVS: 047001DADA X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2701; 23:EnWSD87TWGW2iTRI/ntkD7WrUWLii5+ti6qoorZ8/?= =?us-ascii?Q?uK2fakRvVt0tt/ha3ZcYuqFhv60EVfcWsHwlVC1nCLnN59n2q1Dv6Ycco9lh?= =?us-ascii?Q?I0zweS1xDY0FQKjXOZfuCeOgDjPrzD77xrmj7/6PU5rkZsKA+rPQUhKhMQjB?= =?us-ascii?Q?HoGNaPTwOHXQHM+kvpIfPU/LdKofaOssJbbxSDDyRqR11cIZdWqhjBxHm/6C?= =?us-ascii?Q?puc4IRbmvSjZ4z2tDhBM7Dknr12/vSggN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nosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2017 14:19:07.3730 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7f4621ca-ccb7-4a7b-bff4-08d51aea3034 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB2701 Subject: [dpdk-dev] [PATCH v5 06/11] ethdev: support security APIs 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: , X-List-Received-Date: Tue, 24 Oct 2017 14:19:10 -0000 From: Declan Doherty rte_flow_action type and ethdev updated to support rte_security sessions for crypto offload to ethernet device. Signed-off-by: Boris Pismenny Signed-off-by: Aviad Yehezkel Signed-off-by: Radu Nicolau Signed-off-by: Declan Doherty --- lib/librte_ether/rte_ethdev.c | 7 +++++++ lib/librte_ether/rte_ethdev.h | 8 ++++++++ lib/librte_ether/rte_ethdev_version.map | 1 + 3 files changed, 16 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 0b1e928..a3b0e4e 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -301,6 +301,13 @@ rte_eth_dev_socket_id(uint16_t port_id) return rte_eth_devices[port_id].data->numa_node; } +void * +rte_eth_dev_get_sec_ctx(uint8_t port_id) +{ + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, NULL); + return rte_eth_devices[port_id].security_ctx; +} + uint16_t rte_eth_dev_count(void) { diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index b773589..119f7fc 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -180,6 +180,8 @@ extern "C" { #include #include #include +#include + #include "rte_ether.h" #include "rte_eth_ctrl.h" #include "rte_dev_info.h" @@ -963,6 +965,7 @@ struct rte_eth_conf { #define DEV_RX_OFFLOAD_CRC_STRIP 0x00001000 #define DEV_RX_OFFLOAD_SCATTER 0x00002000 #define DEV_RX_OFFLOAD_TIMESTAMP 0x00004000 +#define DEV_RX_OFFLOAD_SECURITY 0x00008000 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \ DEV_RX_OFFLOAD_UDP_CKSUM | \ DEV_RX_OFFLOAD_TCP_CKSUM) @@ -998,6 +1001,7 @@ struct rte_eth_conf { * When set application must guarantee that per-queue all mbufs comes from * the same mempool and has refcnt = 1. */ +#define DEV_TX_OFFLOAD_SECURITY 0x00020000 struct rte_pci_device; @@ -1741,8 +1745,12 @@ 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 */ } __rte_cache_aligned; +void * +rte_eth_dev_get_sec_ctx(uint8_t port_id); + struct rte_eth_dev_sriov { uint8_t active; /**< SRIOV is active with 16, 32 or 64 pools */ uint8_t nb_q_per_pool; /**< rx queue number per pool */ diff --git a/lib/librte_ether/rte_ethdev_version.map b/lib/librte_ether/rte_ethdev_version.map index 57d9b54..e9681ac 100644 --- a/lib/librte_ether/rte_ethdev_version.map +++ b/lib/librte_ether/rte_ethdev_version.map @@ -191,6 +191,7 @@ DPDK_17.08 { DPDK_17.11 { global: + rte_eth_dev_get_sec_ctx; rte_eth_dev_pool_ops_supported; rte_eth_dev_reset; rte_flow_error_set; -- 2.9.3