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 0C173A0577; Mon, 6 Apr 2020 11:53:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4CD471BEDD; Mon, 6 Apr 2020 11:53:49 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 1A8931BED9 for ; Mon, 6 Apr 2020 11:53:47 +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 0369odOA011587 for ; Mon, 6 Apr 2020 02:53:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pfpt0818; bh=MRxq4/FumcjSplqr9FxM3uWQoOFuRLDkme3OhT3K4MU=; b=yK40DX0lmpsBaMJo2krbVstyViLIF8ppjqEjhj0BzijwcqR5wbFov6Ve+U2T/Yc4Vyb6 h9qv4Fj6PE/hdSW1bq9IRElEXnCsPtWkIQLAN7FF1B3tmaC0/OL/pyNtSqYJNzONabFF +y1MtUMgz7Ph6G6delUZpGDqSatlTX0dSrNxZScuaAq2GW2nIcXgkegM3UFR4vFqRPez QAyCHbA8zX0B9zFOcVZUvXkkSaLfIjWSAOGKCTLT9qkCKNGCKegp0Q8/6aOmJ473Pfpo TS9vyLtLaMNhNZ0DCkZxeodwpsJW2BnASKVPqQHtL6vsYw4Bfv91dyYCh/f8G2TIIYEr 3Q== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 306qkqwfrx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 06 Apr 2020 02:53:47 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 6 Apr 2020 02:53:45 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 6 Apr 2020 02:53:45 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 6 Apr 2020 02:53:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c22VKPi78a445fT7ENdumbTDVfG3cYRugDa8Dp9RacPR4DDBc7Cs7XG2rf3rinHgITxE/Kblxa+nwfisib+cIbJZBpuU+2A0dqz3yLo/O6Npq7HDP1wCMn8W79Z010tN3Vaw3l/Tog7trETADiNB9VKfEfL9qebp07mp+uHCMNkhdpPipOtZeVsmyWaNKTWdJ09wEgE5vdSjJgYf1yGUc8esqtdCJciJNl4+xeGExdWpbuBAujaIKKN2ifs3SbBkAaD7ritkCGf/ud+yhB8rPxhH6KFNXt4YICsvDvU0M8sQi1UXcLscj/fJHJjPdj2MyEILjEgHiwYWZJdOZqmHgw== 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=MRxq4/FumcjSplqr9FxM3uWQoOFuRLDkme3OhT3K4MU=; b=lgFbi/4I74AyvghPlTWeGjKwPcfF5GfRaznocbQkYOI8LLC402pyM86ow15BVNBR15Uxxt6MYUodZU/Qonr9iZgAruJq2MBYFuSQebNjdMrpbyW1p6jDEGFrO1K6+BpUOTVi3UE9oBWX+w1Um7qAof+loiDtqWY0WzGwqHhqphZEfsT4oBoRiwWXHjRCKZPL52echfGg/UJWxWe8p1alNmVeKaq1gf+UF33YHaSF18ueWu4nbn7HG/trJoOadeuhZSFb8DcDncHMad6OKyo1iMsNnECs8iFC13I9JupZCDz24cQVRjbu3m0TUMg6ypXP0qZlJXccUMV+2xEBW5ZS1Q== 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=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MRxq4/FumcjSplqr9FxM3uWQoOFuRLDkme3OhT3K4MU=; b=bkG0VE7Ed3lMFV0qd1++dK2jnLqtCohOPlemjNB85mPk1R0awkNDfX2Hj+jswAOKytpVloJiYd6Vhmeu15y7kW5/X4MWh3O3UZ4uBvEBkBk20NpKVqSYca1/5HHMfy+ON2+PbQFvcO6xjsjtriSP8SDWzCRGMrnByMLj1V16zpY= Received: from MN2PR18MB2848.namprd18.prod.outlook.com (2603:10b6:208:38::19) by MN2PR18MB2638.namprd18.prod.outlook.com (2603:10b6:208:108::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.19; Mon, 6 Apr 2020 09:53:43 +0000 Received: from MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::a8b1:45c4:b84:9c02]) by MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::a8b1:45c4:b84:9c02%7]) with mapi id 15.20.2878.021; Mon, 6 Apr 2020 09:53:43 +0000 Date: Mon, 6 Apr 2020 15:23:27 +0530 From: Harman Kalra To: CC: , Message-ID: <20200406095326.GA174491@outlook.office365.com> References: <1584372553-28710-1-git-send-email-hkalra@marvell.com> <1584372553-28710-4-git-send-email-hkalra@marvell.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1584372553-28710-4-git-send-email-hkalra@marvell.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-ClientProxiedBy: PN1PR01CA0114.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00::30) To MN2PR18MB2848.namprd18.prod.outlook.com (2603:10b6:208:38::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from outlook.office365.com (115.113.156.2) by PN1PR01CA0114.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15 via Frontend Transport; Mon, 6 Apr 2020 09:53:41 +0000 X-Originating-IP: [115.113.156.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4fcfb1a4-c266-4af3-eda0-08d7da1063a9 X-MS-TrafficTypeDiagnostic: MN2PR18MB2638: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:318; X-Forefront-PRVS: 0365C0E14B X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR18MB2848.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(136003)(366004)(396003)(346002)(376002)(39860400002)(4326008)(5660300002)(81166006)(55236004)(9686003)(8936002)(7696005)(52116002)(6636002)(186003)(26005)(55016002)(86362001)(956004)(8676002)(16526019)(6666004)(66946007)(478600001)(107886003)(81156014)(6506007)(66556008)(66476007)(1076003)(2906002)(316002)(33656002)(34206002); DIR:OUT; SFP:1101; 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: YNXA2KgtHkX72UEpfsczLpuMXs6tvqNjlEq+9mZ+4nVzfBOB1Hc6XYrl9P5Df/E9RX23xTBHxFYRW2FMVVicTUuqRDC6NLwud9pz0mS+FDYm3/gIckCW2T6B/H3+XEL2rHa3y3/otWgS+ZFJ3kUSiLO/kzNELCdV1+BnLZNZ2urZfBTO9XuYHR0v9aBecViT7Y8gx48pON3fA4ew0KuPCRW6pulg+o63jDj48o/rsFK9A3L7jRu95l1oIHPHZxTJhk6DpDxmTaN6FPGdnRM10ox3PIDR0D8wzLpdy7nRdeVOFs0hhf84w40gDL8+mXfx5FcJ4oMIuiK9N/Iihle2mPHl++9rgJPlMxKi9k9yhhKXJoErmU4MKTyzyd1wB53t6hoIDXXSCwfUPFxUI08yJFaeWiROWCYja8S1COlY9juM4cGbHI52OjgrX8s+qe16 X-MS-Exchange-AntiSpam-MessageData: MrK6YkjwjBmmFxBNeJOYzGX9xDTFzQ4NIPXsHEHcq2L48N/c46+ohCPoyEhzmHEAj9qTNn+DCqEUcjjraN3d0J2pEzrzXDTFh+qTkGkEmJ7AP0iiGELGZT8Iq5WtIwdxbPebjwLgSioGnxR0ieA6VQ== X-MS-Exchange-CrossTenant-Network-Message-Id: 4fcfb1a4-c266-4af3-eda0-08d7da1063a9 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2020 09:53:43.2541 (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: dgqKQpbxAdLIzVHkOSStGquTpx6dLARBe7l+iQQeKqROtOpiFeeqBQqo//nt9uQkInpRC4xm9uOnXSZpMFAAjQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2638 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-06_05:2020-04-03, 2020-04-06 signatures=0 Subject: Re: [dpdk-dev] [PATCH 3/4] event/octeontx: add VLAN filter offload 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Mar 16, 2020 at 08:59:12PM +0530, Harman Kalra wrote: > From: Vamsi Attunuru > > Adding rx burst function pointer hooks for vlan filter > offload in event PMD. > > Signed-off-by: Vamsi Attunuru Acked-by: Harman Kalra > --- > drivers/event/octeontx/ssovf_worker.c | 38 +++++++++++++++------------ > drivers/event/octeontx/ssovf_worker.h | 9 +++++++ > drivers/net/octeontx/octeontx_rxtx.h | 11 +++++--- > 3 files changed, 37 insertions(+), 21 deletions(-) > > diff --git a/drivers/event/octeontx/ssovf_worker.c b/drivers/event/octeontx/ssovf_worker.c > index 5d8e213ce..093f6f000 100644 > --- a/drivers/event/octeontx/ssovf_worker.c > +++ b/drivers/event/octeontx/ssovf_worker.c > @@ -91,7 +91,7 @@ ssows_release_event(struct ssows *ws) > ssows_swtag_untag(ws); > } > > -#define R(name, f0, flags) \ > +#define R(name, f1, f0, flags) \ > static uint16_t __rte_noinline __hot \ > ssows_deq_ ##name(void *port, struct rte_event *ev, uint64_t timeout_ticks) \ > { \ > @@ -347,49 +347,53 @@ SSO_TX_ADPTR_ENQ_FASTPATH_FUNC > dev->txa_enqueue_same_dest = dev->txa_enqueue; > > /* Assigning dequeue func pointers */ > - const event_dequeue_t ssow_deq[2] = { > -#define R(name, f0, flags) \ > - [f0] = ssows_deq_ ##name, > + const event_dequeue_t ssow_deq[2][2] = { > +#define R(name, f1, f0, flags) \ > + [f1][f0] = ssows_deq_ ##name, > > SSO_RX_ADPTR_ENQ_FASTPATH_FUNC > #undef R > }; > > dev->dequeue = ssow_deq > + [!!(edev->rx_offload_flags & OCCTX_RX_VLAN_FLTR_F)] > [!!(edev->rx_offload_flags & OCCTX_RX_MULTI_SEG_F)]; > > - const event_dequeue_burst_t ssow_deq_burst[2] = { > -#define R(name, f0, flags) \ > - [f0] = ssows_deq_burst_ ##name, > + const event_dequeue_burst_t ssow_deq_burst[2][2] = { > +#define R(name, f1, f0, flags) \ > + [f1][f0] = ssows_deq_burst_ ##name, > > SSO_RX_ADPTR_ENQ_FASTPATH_FUNC > #undef R > }; > > dev->dequeue_burst = ssow_deq_burst > + [!!(edev->rx_offload_flags & OCCTX_RX_VLAN_FLTR_F)] > [!!(edev->rx_offload_flags & OCCTX_RX_MULTI_SEG_F)]; > > if (edev->is_timeout_deq) { > - const event_dequeue_t ssow_deq_timeout[2] = { > -#define R(name, f0, flags) \ > - [f0] = ssows_deq_timeout_ ##name, > + const event_dequeue_t ssow_deq_timeout[2][2] = { > +#define R(name, f1, f0, flags) \ > + [f1][f0] = ssows_deq_timeout_ ##name, > > SSO_RX_ADPTR_ENQ_FASTPATH_FUNC > #undef R > }; > > - dev->dequeue = ssow_deq_timeout > - [!!(edev->rx_offload_flags & OCCTX_RX_MULTI_SEG_F)]; > + dev->dequeue = ssow_deq_timeout > + [!!(edev->rx_offload_flags & OCCTX_RX_VLAN_FLTR_F)] > + [!!(edev->rx_offload_flags & OCCTX_RX_MULTI_SEG_F)]; > > - const event_dequeue_burst_t ssow_deq_timeout_burst[2] = { > -#define R(name, f0, flags) \ > - [f0] = ssows_deq_timeout_burst_ ##name, > + const event_dequeue_burst_t ssow_deq_timeout_burst[2][2] = { > +#define R(name, f1, f0, flags) \ > + [f1][f0] = ssows_deq_timeout_burst_ ##name, > > SSO_RX_ADPTR_ENQ_FASTPATH_FUNC > #undef R > }; > > - dev->dequeue_burst = ssow_deq_timeout_burst > - [!!(edev->rx_offload_flags & OCCTX_RX_MULTI_SEG_F)]; > + dev->dequeue_burst = ssow_deq_timeout_burst > + [!!(edev->rx_offload_flags & OCCTX_RX_VLAN_FLTR_F)] > + [!!(edev->rx_offload_flags & OCCTX_RX_MULTI_SEG_F)]; > } > } > diff --git a/drivers/event/octeontx/ssovf_worker.h b/drivers/event/octeontx/ssovf_worker.h > index 61332304a..e23bd057e 100644 > --- a/drivers/event/octeontx/ssovf_worker.h > +++ b/drivers/event/octeontx/ssovf_worker.h > @@ -84,6 +84,15 @@ ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_info, > mbuf->data_len = mbuf->pkt_len; > } > > + if (!!(flag & OCCTX_RX_VLAN_FLTR_F)) { > + if (likely(wqe->s.w2.vv)) { > + mbuf->ol_flags |= PKT_RX_VLAN; > + mbuf->vlan_tci = > + ntohs(*((uint16_t *)((char *)mbuf->buf_addr + > + mbuf->data_off + wqe->s.w4.vlptr + 2))); > + } > + } > + > mbuf->port = rte_octeontx_pchan_map[port_info >> 4][port_info & 0xF]; > rte_mbuf_refcnt_set(mbuf, 1); > > diff --git a/drivers/net/octeontx/octeontx_rxtx.h b/drivers/net/octeontx/octeontx_rxtx.h > index e7656f333..515c4699a 100644 > --- a/drivers/net/octeontx/octeontx_rxtx.h > +++ b/drivers/net/octeontx/octeontx_rxtx.h > @@ -489,10 +489,13 @@ T(noff_ol3ol4csum_l3l4csum_mseg, 1, 1, 1, 1, 14, \ > MULT_F) > > /* RX offload macros */ > +#define VLAN_FLTR_F OCCTX_RX_VLAN_FLTR_F > #define MULT_RX_F OCCTX_RX_MULTI_SEG_F > -/* [MULTI_SEG] */ > -#define OCCTX_RX_FASTPATH_MODES \ > -R(no_offload, 0, OCCTX_RX_OFFLOAD_NONE) \ > -R(mseg, 1, MULT_RX_F) \ > +/* [VLAN_FLTR][MULTI_SEG] */ > +#define OCCTX_RX_FASTPATH_MODES \ > +R(no_offload, 0, 0, OCCTX_RX_OFFLOAD_NONE) \ > +R(mseg, 0, 1, MULT_RX_F) \ > +R(vlan, 1, 0, VLAN_FLTR_F) \ > +R(vlan_mseg, 1, 1, VLAN_FLTR_F | MULT_RX_F) > > #endif /* __OCTEONTX_RXTX_H__ */ > -- > 2.18.0 >