From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2DAABA2EDB for ; Sun, 29 Sep 2019 06:29:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 05AEC31FC; Sun, 29 Sep 2019 06:29:32 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 331B52B88 for ; Sun, 29 Sep 2019 06:29:30 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x8T4IKBL015646 for ; Sat, 28 Sep 2019 21:29:29 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=a9zzIY7MXv6cJZ331+0w2A5eVboH0acFrKDHaiKkhWg=; b=kLnz1XgidOpGXTrZLDwFhqIU7+0lyUbm+AEOWwiJCN5kwUd38UG9sbENWdj4fGpkEWDB paTYQ0y7VqBEfQWkAjl5BKeRCbtAyaPOQJvvySlKJaRN0omfCIhuiIFy5gON11nrWRHI 6q3VRYMJ1Yj6TIXqrzMStMGajT3K88J0RTyyD2ovkgiu3E6bsPmJMn03girS1T0yuhth kGQaiqJi9HjvWC4w40rS1HwaxFigJnbFZ+lqLxMHrrIvDj3xOheT/9xGiwqWY0Nt7vGO eDw1jU166ISW572NEi1JXZz2HlHCrm6W0I6sJ5VQ+6a/c0jRhPxIRVHHJAhJ1URwkCVy 7w== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2va4vrt9u1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sat, 28 Sep 2019 21:29:29 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sat, 28 Sep 2019 21:29:28 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (104.47.37.57) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Sat, 28 Sep 2019 21:29:28 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H1WQMcSO5vn0UjPgYjYffLkw9tIqH5rpxAjjnhfBpuckOJMjOF3u3+ntxt2Ivgjwiep6JLeBwjntdBG8maOc+4nWrI2uVotg9CD3RKcO+Tim4f8ZLS7RWDT+excs4iDxfmovxksDBrLwj1OXxvfCk2ZFgLlXhn5X3tw7T0awazr2NTLKM+hB3cFV0fEKviBavHO0jEMlS+LPWfBtRtNnz8n9yt5tfxjU1QmZsiRlEZ4oWAGGNvzQwau82TFWXwzHXjWGnIMv4oD30QcbQiB5zpU7cR0kBQCftp55C9jGoH9jD/7MqZ/pe5wZLk9WortK3VAC1d0fb6y+Si5KxzyknQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a9zzIY7MXv6cJZ331+0w2A5eVboH0acFrKDHaiKkhWg=; b=ST+6G8snko1ZV1HXSFv+veBM8VTy04Z3XbgmUb6VNRKqErN3EaYVQazkV8d9i6jWCgdi+w6mslItnd1m0ximQaIbeZO9pZa2+5Lbi1JlTA7RENuM53PcuE6h58OmQ2Xzh2Zw+8JDsjvWjqdOdZjiY0Xu85x2DjP5qzRnDZBBUlhYPd5cD77dQ3IMwVzdsCLl4pAviC3kwNdBFQCN+y8uWswvI8to4ftNVDKNNPFtuh5TZgP+fGTOM5wIJS9bQvSvKJyFrJsI1LgPRlgNwc+xpX90xFmRxptyccb/CiN8OK18vWTOOcvGL2ed6fk/v7TNsmbbHIEsXgBh3NxlkzOSPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a9zzIY7MXv6cJZ331+0w2A5eVboH0acFrKDHaiKkhWg=; b=MsaggKAFRFyspCbLcsywIjjSUefmkL+G/ebeOIsE4W7Yl3jQvi/e5O9qB/s1EbbKBkzzr9pFLY5cRVhl5EvgXpziCWUNKWvlFfhSACDskPoxpdq2+w3HbedsE8sRk1w8AITip4FHRgiqSzdei+K6csa6+ns94WJECMqBBdYhPSQ= Received: from CY4PR18MB1144.namprd18.prod.outlook.com (10.173.184.19) by CY4PR18MB0934.namprd18.prod.outlook.com (10.173.182.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2305.20; Sun, 29 Sep 2019 04:29:27 +0000 Received: from CY4PR18MB1144.namprd18.prod.outlook.com ([fe80::2d29:c0c6:4b83:374a]) by CY4PR18MB1144.namprd18.prod.outlook.com ([fe80::2d29:c0c6:4b83:374a%11]) with mapi id 15.20.2284.028; Sun, 29 Sep 2019 04:29:27 +0000 From: Vivek Kumar Sharma To: "dev@dpdk.org" CC: Jerin Jacob Kollanukkaran Thread-Topic: [PATCH] net/octeontx2: use updated LB ltypes Thread-Index: AQHVZEgGdtMinaDrukqfZjMPxVxlwKdCNF8J Date: Sun, 29 Sep 2019 04:29:27 +0000 Message-ID: References: <1567728839-11991-1-git-send-email-viveksharma@marvell.com> In-Reply-To: <1567728839-11991-1-git-send-email-viveksharma@marvell.com> Accept-Language: en-IN, en-US Content-Language: en-IN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [2401:4900:30e4:e02d:a8c6:fbb4:b8e3:e517] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0769f49a-6fd0-4c2a-488c-08d744959d22 x-ms-traffictypediagnostic: CY4PR18MB0934: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2803; x-forefront-prvs: 017589626D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(39850400004)(346002)(366004)(376002)(199004)(189003)(2906002)(86362001)(55016002)(6436002)(66446008)(76176011)(64756008)(66556008)(71200400001)(66476007)(6506007)(91956017)(5640700003)(53546011)(14444005)(66946007)(52536014)(33656002)(71190400001)(1730700003)(81166006)(81156014)(46003)(76116006)(2351001)(99286004)(6116002)(446003)(256004)(316002)(11346002)(229853002)(8676002)(107886003)(8936002)(102836004)(2501003)(14454004)(476003)(15650500001)(6246003)(25786009)(186003)(7696005)(4326008)(74316002)(305945005)(5660300002)(7736002)(9686003)(486006)(6916009)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR18MB0934; H:CY4PR18MB1144.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZfTIra0k3n+Y8QmiSvjZDrZwKI/t/bal37k8+5CLB0+8mgKmAJ3L6SXy5oR2y2F8r5n9dQJk0xv1eo1ch82XpBbQ2vbs8NuJX9uQMQO5WrqmjmT/OhTpnrkFg2yPqEXr2qqlNbnLRYjcmAvW/YYgv1KbN2vZoShTAIvX6gQwgO2lq2y8iKZSdrC8415FzrzIYHPAQjpnTYolNY/Q7wRSBVqXWkB2FQGgqQQxWXEVlLhyJ8QHiFyzc9U/8cFY3ZJaSwqolLs4TwUAxKacK8dLfi2Ey9+4hgKqgXV61nv1hIeAPXg9hOjdd2eEtZby+by22oC+FWNnZ1NEm19yR+whQWz9YAReFMujmdeHfaAmUjmF5tNDPmtw0BFs9b3ejUusGDy5kXgvxK8qaOH5cXDRsGAGa0GPurTFl5flvOzEBrU= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 0769f49a-6fd0-4c2a-488c-08d744959d22 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2019 04:29:27.2740 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: kiSI9Ph4PfmfyH2Zic9pKonRNdpy28jSZYhibgqVsyD2N1FJIsjf2qvl11oCgpPnkwhEIKd/P+HLq4MuHvquCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR18MB0934 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-09-29_02:2019-09-25,2019-09-29 signatures=0 Subject: Re: [dpdk-dev] [PATCH] net/octeontx2: use updated LB ltypes 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" Ping! Thanks, Vivek ________________________________________ From: viveksharma@marvell.com Sent: 06 September 2019 05:43 To: dev@dpdk.org Cc: Jerin Jacob Kollanukkaran; Vivek Kumar Sharma Subject: [PATCH] net/octeontx2: use updated LB ltypes From: Vivek Sharma Update LB ltypes and use the updated ones so as replace LB_STAG and LB_QINQ by single LB_STAG_QINQ ltype. Signed-off-by: Vivek Sharma --- drivers/common/octeontx2/hw/otx2_npc.h | 9 +++++++-- drivers/net/octeontx2/otx2_flow_parse.c | 4 ++-- drivers/net/octeontx2/otx2_lookup.c | 2 +- drivers/net/octeontx2/otx2_vlan.c | 14 +++++++++----- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/common/octeontx2/hw/otx2_npc.h b/drivers/common/octeon= tx2/hw/otx2_npc.h index 0f85d7f..5eccb9e 100644 --- a/drivers/common/octeontx2/hw/otx2_npc.h +++ b/drivers/common/octeontx2/hw/otx2_npc.h @@ -186,10 +186,15 @@ enum npc_kpu_la_ltype { enum npc_kpu_lb_ltype { NPC_LT_LB_ETAG =3D 1, NPC_LT_LB_CTAG, - NPC_LT_LB_STAG, + NPC_LT_LB_STAG_QINQ, NPC_LT_LB_BTAG, - NPC_LT_LB_QINQ, NPC_LT_LB_ITAG, + NPC_LT_LB_DSA, + NPC_LT_LB_DSA_VLAN, + NPC_LT_LB_EDSA, + NPC_LT_LB_EDSA_VLAN, + NPC_LT_LB_EXDSA, + NPC_LT_LB_EXDSA_VLAN, }; enum npc_kpu_lc_ltype { diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx= 2/otx2_flow_parse.c index 6670c1a..71650b5 100644 --- a/drivers/net/octeontx2/otx2_flow_parse.c +++ b/drivers/net/octeontx2/otx2_flow_parse.c @@ -599,11 +599,11 @@ otx2_flow_parse_lb(struct otx2_parse_state *pst) lt =3D NPC_LT_LB_CTAG; break; case 2: - lt =3D NPC_LT_LB_STAG; + lt =3D NPC_LT_LB_STAG_QINQ; lflags =3D NPC_F_STAG_CTAG; break; case 3: - lt =3D NPC_LT_LB_STAG; + lt =3D NPC_LT_LB_STAG_QINQ; lflags =3D NPC_F_STAG_STAG_CTAG; break; default: diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/ot= x2_lookup.c index 99199d0..2511386 100644 --- a/drivers/net/octeontx2/otx2_lookup.c +++ b/drivers/net/octeontx2/otx2_lookup.c @@ -88,7 +88,7 @@ nix_create_non_tunnel_ptype_array(uint16_t *ptype) val =3D RTE_PTYPE_UNKNOWN; switch (lb) { - case NPC_LT_LB_QINQ: + case NPC_LT_LB_STAG_QINQ: val |=3D RTE_PTYPE_L2_ETHER_QINQ; break; case NPC_LT_LB_CTAG: diff --git a/drivers/net/octeontx2/otx2_vlan.c b/drivers/net/octeontx2/otx2= _vlan.c index c01089b..14e3ee9 100644 --- a/drivers/net/octeontx2/otx2_vlan.c +++ b/drivers/net/octeontx2/otx2_vlan.c @@ -300,8 +300,11 @@ nix_vlan_mcam_config(struct rte_eth_dev *eth_dev, /* Adds vlan_id & LB CTAG flag to MCAM KW */ if (flags & VLAN_ID_MATCH) { - entry.kw[kwi] |=3D NPC_LT_LB_CTAG << mkex->lb_lt_offset; - entry.kw_mask[kwi] |=3D 0xFULL << mkex->lb_lt_offset; + entry.kw[kwi] |=3D (NPC_LT_LB_CTAG | NPC_LT_LB_STAG_QINQ) + << mkex->lb_lt_offs= et; + entry.kw_mask[kwi] |=3D + (0xF & ~(NPC_LT_LB_CTAG ^ NPC_LT_LB_STAG_QINQ)) + << mkex->lb_lt_offs= et; mcam_data =3D ((uint32_t)vlan_id << 16); mcam_mask =3D (BIT_ULL(16) - 1) << 16; @@ -313,15 +316,16 @@ nix_vlan_mcam_config(struct rte_eth_dev *eth_dev, /* Adds LB STAG flag to MCAM KW */ if (flags & QINQ_F_MATCH) { - entry.kw[kwi] |=3D NPC_LT_LB_STAG << mkex->lb_lt_offset; + entry.kw[kwi] |=3D NPC_LT_LB_STAG_QINQ << mkex->lb_lt_offse= t; entry.kw_mask[kwi] |=3D 0xFULL << mkex->lb_lt_offset; } /* Adds LB CTAG & LB STAG flags to MCAM KW */ if (flags & VTAG_F_MATCH) { - entry.kw[kwi] |=3D (NPC_LT_LB_CTAG | NPC_LT_LB_STAG) + entry.kw[kwi] |=3D (NPC_LT_LB_CTAG | NPC_LT_LB_STAG_QINQ) << mkex->lb_lt_offs= et; - entry.kw_mask[kwi] |=3D (NPC_LT_LB_CTAG & NPC_LT_LB_STAG) + entry.kw_mask[kwi] |=3D + (0xF & ~(NPC_LT_LB_CTAG ^ NPC_LT_LB_STAG_QINQ)) << mkex->lb_lt_offs= et; } -- 2.7.4