From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0083.outbound.protection.outlook.com [104.47.36.83]) by dpdk.org (Postfix) with ESMTP id 3C2A87CC6 for ; Thu, 31 Aug 2017 16:56:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=RQU93OKDAnZWYGyU5sU9VcjrVOsJZwGOMPeaQ+LepT8=; b=YaAFA2NieGToleZOckssU/oIJ4CYLI4nOlPkowhcsBhkZnMIWehuVxP8r5aostwf814FmijvEql3DXYI6frGdLtP7sFB2oJ7LOCXVPnXKME9+O6KdtmOgz9AjXu7nqDc18ZZg9gurZaLEW+t9wQFqc0MR4mCCMQkgXxlJ9/RQV8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin.domain.name (171.76.126.71) by SN2PR07MB2526.namprd07.prod.outlook.com (2603:10b6:804:6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Thu, 31 Aug 2017 14:56:17 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: ferruh.yigit@intel.com, santosh.shukla@caviumnetworks.com, Jerin Jacob Date: Thu, 31 Aug 2017 20:24:34 +0530 Message-Id: <20170831145436.5397-25-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170831145436.5397-1-jerin.jacob@caviumnetworks.com> References: <20170831145436.5397-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.76.126.71] X-ClientProxiedBy: MA1PR01CA0109.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:1::25) To SN2PR07MB2526.namprd07.prod.outlook.com (2603:10b6:804:6::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6e93edba-958d-4c2c-354b-08d4f0806fd5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN2PR07MB2526; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2526; 3:AB+kXL38vArLoLd7gzSe51xFGxk/zaS9ONAmku6WBKxfkD0n6599p5j4vWo0JDwBTAwq3iCtHqSiL19e4LiloBJczhJS75auSBsvFgiB69/Mn5gbLIkYS5UFcPHB4WSyLglZjn0SMyfDgu4De3EbAJ3nZbi19jKVtDqmhGtKiQB6Ey8d3Jv7QgWqf+x8tyLq72REKBoZXlEm/f9swu8TVSS8LCsZFSKTgcVeRhMVSsDJ//BApCQHmhIUIuO8FDSd; 25:d2ezP7DA55GilnRCWCkOKNoCDXvuVnF1ni8E4bwxK43+CtSqzNFBSnMWyuZunYXQGcIeNF9PGd0wtNxT5n8hWIlIdAQVVKNDGczW028noFn/aHwnCjdpXYQCARx5E8ib0xTkrmgvyfxSpqx5wJhORKkM74rNT/pcCmhP+K5GQqyWX/JRlQXdH5Yt141EcFQiDLucKClngFTo2Lf6KXw049aCfN5vZU/sTShg8bwq5gbQw9UWzMEMfDsR7/7T2rrJGb9cqkzeeeryR2wLogDv85brXmp9Yaw93nldLILvO7rRT+GlyAl4LZgJchhsjhHaRaqztN8h7SBwi0v/OxeCVg==; 31:I+PvkgVbE+ZZSq2GuvwY6XWZjjDsa38q5/OyYyTJaJR1H/Mvj6lrpFL7qi6VOyRmwfizV4iKuFAMC5RF3ztBhMnc66FNmgWPJ6s8fAN/nG2WsO+D3Jn6/1RwzrJZ5fFLQqCbhG1LSTFjtSs8YjAXO1Cdf/7mbfkTQqPnOsPnmz7pLyGVRZSiYrT8hAWx53mzDkwBB45W3yXNnEpkCE6zWl7UV00gknR6vXB/qSB8DcM= X-MS-TrafficTypeDiagnostic: SN2PR07MB2526: X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2526; 20:fOxjz7e2ekTMGLBqEPqTXoCGZgzBC9ElrZ4ZaeT2WooLNAWwD0sWZm2pRhIN7DmQT61nNgiMDYO37V4ol+ytUIeSlL+dy7luaLyGhtI70nYQJuDpjgz9/NI2YXQj2RAKjmYcEv8vHbAVWC1/0POPrVEfEXQeF/ps11U0tZ+WbxkgxCEgmyexzOnh5Q5g6Dwvl3jZnXNdgHTOsHTJWDZfZX9r/3V9AKFyyybMq8CRWOI7HmWiAB2NfPQiGHGqK2LOMJ1K/MERyvaSmY9lloMlpNI7KHhi90APT+txz7JJB6YGMo7daFBj9ImBmXAW05M9YJ+3sbYXU3FJQi2ZROsbsf/kpyHRMB/Jf/Tyd4MU4uRqhVIAuelUXSfbQAXWSEzus2V14uv+viGKK95e9wv9vEuvBqD4H7DaIFTb74JhXYKkCiwAByBaVC/nsHxLTPrhThYQ4rSKnz7Hqwrjz3/5G9Y19R3QuwB5sjHIt1NPf1gE4nuuIljPEtvpvjoz0vQBfBh+hmAUHOFeCA4N+gd8eScZx5ngzwTrGn9n5ivxY67TqV1GCY57hxbnjsJhlRpz7S2GDuOJu7O1rc22GO8cmsS2by0BUOsQhkrlxu/g3Vs=; 4:Y57D0LueBO62Uo42BhHhQgjeUGC4LE29/K6ihdJdm9UW3FPK6P78qg7vR1sPen5hJEC+gTULCk/xfE82u8LaqeekNv/jPr70JqU5N129u+luxTeIsGNpxPB7NGryzKX6EwpF1kpeRzKItawTEndhKAuiHvt2g41MSUVMFvBsBW2v+1iIl0BYMV7VitNp1CL90j0gIZhBbV/UeqX2v7DRqe5sLWh8lOJ+lzwqVZPckV9jnjjK+XUZ1nKzc9k0n5z+ X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN2PR07MB2526; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN2PR07MB2526; X-Forefront-PRVS: 04163EF38A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(199003)(189002)(25786009)(1076002)(53936002)(3846002)(6116002)(575784001)(478600001)(110136004)(72206003)(7736002)(6666003)(107886003)(6512007)(305945005)(6506006)(36756003)(6486002)(68736007)(5003940100001)(189998001)(50986999)(42882006)(106356001)(101416001)(76176999)(2950100002)(6916009)(5660300001)(2361001)(33646002)(2351001)(2906002)(4326008)(97736004)(105586002)(48376002)(50466002)(81166006)(66066001)(69596002)(8936002)(47776003)(53416004)(8676002)(50226002)(81156014)(42186005); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2526; H:jerin.domain.name; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR07MB2526; 23:gSbhZ1YLbl2DOt9HUtthAp77WQO3+gIFqe+ly2hTV?= =?us-ascii?Q?e4tHLHXZ1mqYSOHKhh94MOGU1Owl5OuoX0vds73ESRsHBABo2pO9vQRTy6Hb?= =?us-ascii?Q?6MFboVJdxBoRFQpBPJoKOoocNLOf9UX89tDOprkDWzLiy4tn8eY2kzjJm0Vc?= =?us-ascii?Q?1dBVrZExw0lLJ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agnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2017 14:56:17.1150 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2526 Subject: [dpdk-dev] [PATCH 24/26] net/octeontx: add packet type parsing support 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: Thu, 31 Aug 2017 14:56:20 -0000 Mark Packet type parsing in features. Signed-off-by: Jerin Jacob Co-authored-by: Santosh Shukla --- doc/guides/nics/features/octeontx.ini | 1 + drivers/net/octeontx/octeontx_ethdev.c | 22 ++++++++ drivers/net/octeontx/octeontx_rxtx.c | 91 ++++++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+) diff --git a/doc/guides/nics/features/octeontx.ini b/doc/guides/nics/features/octeontx.ini index cf9167df9..c92d5aa07 100644 --- a/doc/guides/nics/features/octeontx.ini +++ b/doc/guides/nics/features/octeontx.ini @@ -12,6 +12,7 @@ Jumbo frame = Y Promiscuous mode = Y Unicast MAC filter = P CRC offload = Y +Packet type parsing = Y Basic stats = Y Linux VFIO = Y ARMv8 = Y diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c index c5e324346..cc0badb88 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c @@ -47,6 +47,7 @@ #include #include "octeontx_ethdev.h" +#include "octeontx_rxtx.h" #include "octeontx_logs.h" struct octeontx_vdev_init_params { @@ -840,6 +841,26 @@ octeontx_dev_rx_queue_release(void *rxq) rte_free(rxq); } +static const uint32_t * +octeontx_dev_supported_ptypes_get(struct rte_eth_dev *dev) +{ + static const uint32_t ptypes[] = { + RTE_PTYPE_L3_IPV4, + RTE_PTYPE_L3_IPV4_EXT, + RTE_PTYPE_L3_IPV6, + RTE_PTYPE_L3_IPV6_EXT, + RTE_PTYPE_L4_TCP, + RTE_PTYPE_L4_UDP, + RTE_PTYPE_L4_FRAG, + RTE_PTYPE_UNKNOWN + }; + + if (dev->rx_pkt_burst == octeontx_recv_pkts) + return ptypes; + + return NULL; +} + /* Initialize and register driver with DPDK Application */ static const struct eth_dev_ops octeontx_dev_ops = { .dev_configure = octeontx_dev_configure, @@ -856,6 +877,7 @@ static const struct eth_dev_ops octeontx_dev_ops = { .tx_queue_release = octeontx_dev_tx_queue_release, .rx_queue_setup = octeontx_dev_rx_queue_setup, .rx_queue_release = octeontx_dev_rx_queue_release, + .dev_supported_ptypes_get = octeontx_dev_supported_ptypes_get, }; /* Create Ethdev interface per BGX LMAC ports */ diff --git a/drivers/net/octeontx/octeontx_rxtx.c b/drivers/net/octeontx/octeontx_rxtx.c index 05f003649..0b158330c 100644 --- a/drivers/net/octeontx/octeontx_rxtx.c +++ b/drivers/net/octeontx/octeontx_rxtx.c @@ -47,6 +47,95 @@ #include "octeontx_rxtx.h" #include "octeontx_logs.h" +/* Packet type table */ +#define PTYPE_SIZE OCCTX_PKI_LTYPE_LAST + +static const uint32_t __rte_cache_aligned +ptype_table[PTYPE_SIZE][PTYPE_SIZE][PTYPE_SIZE] = { + [LC_NONE][LE_NONE][LF_NONE] = RTE_PTYPE_UNKNOWN, + [LC_NONE][LE_NONE][LF_IPSEC_ESP] = RTE_PTYPE_UNKNOWN, + [LC_NONE][LE_NONE][LF_IPFRAG] = RTE_PTYPE_L4_FRAG, + [LC_NONE][LE_NONE][LF_IPCOMP] = RTE_PTYPE_UNKNOWN, + [LC_NONE][LE_NONE][LF_TCP] = RTE_PTYPE_L4_TCP, + [LC_NONE][LE_NONE][LF_UDP] = RTE_PTYPE_L4_UDP, + [LC_NONE][LE_NONE][LF_GRE] = RTE_PTYPE_TUNNEL_GRE, + [LC_NONE][LE_NONE][LF_UDP_GENEVE] = RTE_PTYPE_TUNNEL_GENEVE, + [LC_NONE][LE_NONE][LF_UDP_VXLAN] = RTE_PTYPE_TUNNEL_VXLAN, + [LC_NONE][LE_NONE][LF_NVGRE] = RTE_PTYPE_TUNNEL_NVGRE, + + [LC_IPV4][LE_NONE][LF_NONE] = RTE_PTYPE_L3_IPV4 | RTE_PTYPE_UNKNOWN, + [LC_IPV4][LE_NONE][LF_IPSEC_ESP] = + RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L3_IPV4, + [LC_IPV4][LE_NONE][LF_IPFRAG] = RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_FRAG, + [LC_IPV4][LE_NONE][LF_IPCOMP] = RTE_PTYPE_L3_IPV4 | RTE_PTYPE_UNKNOWN, + [LC_IPV4][LE_NONE][LF_TCP] = RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_TCP, + [LC_IPV4][LE_NONE][LF_UDP] = RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_UDP, + [LC_IPV4][LE_NONE][LF_GRE] = RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_GRE, + [LC_IPV4][LE_NONE][LF_UDP_GENEVE] = + RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_GENEVE, + [LC_IPV4][LE_NONE][LF_UDP_VXLAN] = + RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_VXLAN, + [LC_IPV4][LE_NONE][LF_NVGRE] = + RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_NVGRE, + + [LC_IPV4_OPT][LE_NONE][LF_NONE] = + RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_UNKNOWN, + [LC_IPV4_OPT][LE_NONE][LF_IPSEC_ESP] = + RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L3_IPV4, + [LC_IPV4_OPT][LE_NONE][LF_IPFRAG] = + RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_FRAG, + [LC_IPV4_OPT][LE_NONE][LF_IPCOMP] = + RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_UNKNOWN, + [LC_IPV4_OPT][LE_NONE][LF_TCP] = + RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_TCP, + [LC_IPV4_OPT][LE_NONE][LF_UDP] = + RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_UDP, + [LC_IPV4_OPT][LE_NONE][LF_GRE] = + RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_GRE, + [LC_IPV4_OPT][LE_NONE][LF_UDP_GENEVE] = + RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_GENEVE, + [LC_IPV4_OPT][LE_NONE][LF_UDP_VXLAN] = + RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_VXLAN, + [LC_IPV4_OPT][LE_NONE][LF_NVGRE] = + RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_NVGRE, + + [LC_IPV6][LE_NONE][LF_NONE] = RTE_PTYPE_L3_IPV6 | RTE_PTYPE_UNKNOWN, + [LC_IPV6][LE_NONE][LF_IPSEC_ESP] = + RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L3_IPV4, + [LC_IPV6][LE_NONE][LF_IPFRAG] = RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_FRAG, + [LC_IPV6][LE_NONE][LF_IPCOMP] = RTE_PTYPE_L3_IPV6 | RTE_PTYPE_UNKNOWN, + [LC_IPV6][LE_NONE][LF_TCP] = RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_TCP, + [LC_IPV6][LE_NONE][LF_UDP] = RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_UDP, + [LC_IPV6][LE_NONE][LF_GRE] = RTE_PTYPE_L3_IPV6 | RTE_PTYPE_TUNNEL_GRE, + [LC_IPV6][LE_NONE][LF_UDP_GENEVE] = + RTE_PTYPE_L3_IPV6 | RTE_PTYPE_TUNNEL_GENEVE, + [LC_IPV6][LE_NONE][LF_UDP_VXLAN] = + RTE_PTYPE_L3_IPV6 | RTE_PTYPE_TUNNEL_VXLAN, + [LC_IPV6][LE_NONE][LF_NVGRE] = + RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_NVGRE, + [LC_IPV6_OPT][LE_NONE][LF_NONE] = + RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_UNKNOWN, + [LC_IPV6_OPT][LE_NONE][LF_IPSEC_ESP] = + RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L3_IPV4, + [LC_IPV6_OPT][LE_NONE][LF_IPFRAG] = + RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_FRAG, + [LC_IPV6_OPT][LE_NONE][LF_IPCOMP] = + RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_UNKNOWN, + [LC_IPV6_OPT][LE_NONE][LF_TCP] = + RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_TCP, + [LC_IPV6_OPT][LE_NONE][LF_UDP] = + RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_UDP, + [LC_IPV6_OPT][LE_NONE][LF_GRE] = + RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_TUNNEL_GRE, + [LC_IPV6_OPT][LE_NONE][LF_UDP_GENEVE] = + RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_TUNNEL_GENEVE, + [LC_IPV6_OPT][LE_NONE][LF_UDP_VXLAN] = + RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_TUNNEL_VXLAN, + [LC_IPV6_OPT][LE_NONE][LF_NVGRE] = + RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_TUNNEL_NVGRE, + +}; + static __rte_always_inline uint16_t __hot __octeontx_xmit_pkts(void *lmtline_va, void *ioreg_va, int64_t *fc_status_va, struct rte_mbuf *tx_pkt) @@ -128,6 +217,8 @@ octeontx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) /* Get mbuf from wqe */ mbuf = (struct rte_mbuf *)((uintptr_t)wqe - OCTTX_PACKET_WQE_SKIP); + mbuf->packet_type = + ptype_table[wqe->s.w2.lcty][wqe->s.w2.lety][wqe->s.w2.lfty]; mbuf->data_off = RTE_PTR_DIFF(wqe->s.w3.addr, mbuf->buf_addr); mbuf->pkt_len = wqe->s.w1.len; mbuf->data_len = mbuf->pkt_len; -- 2.14.1