From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0D217A0543; Fri, 7 Oct 2022 22:01:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA6B9400D5; Fri, 7 Oct 2022 22:01:57 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id E709E40042 for ; Fri, 7 Oct 2022 22:01:55 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 297FLX35006967 for ; Fri, 7 Oct 2022 13:01:55 -0700 Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2102.outbound.protection.outlook.com [104.47.70.102]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3k2ppes38g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 07 Oct 2022 13:01:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W4t2M0nzBeZMnWzUZEelDmM82t16q114vndQNbKEQvWqgAeomGFYbCnwtj+r9B1mkrtdlx2m8RtJ/AkLo7d2R8NRqeDMK/YqZCRAF5+Y1OVmh8xNYLKZngeJC0JmqbpcMtpML1ynp8nD07lwTLLbOKEQdHJxnCy+GyBXl6x80Z+nUeBcQ5CUTtwZlWWhCZX38oD0MgcyvibGToUkU1U1noB9tmhXc2tQMnZJk1iiuCLEk6caPDdnhzRARn1JUwrZctIhDpb448Jn1VNoFLHNWbIozNciJBYGnhbzXpqycb8STeQeVr3n85nheSwR8mZZF06CfAqOfBD+kVuU4Zc2VQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=e6NS2vW5she6THEJEQU58C9WjLWzVk4ndqDfJf9aZGg=; b=oFwavYckCBaXjWciFqjEzIvPp9H76HQYov8/QL3HfLTzXIG7I6+uQCnaoiSd09wsK1ilpaX78vGe0VQ5V8UdNEManpyCFiHCpCEWJrZgppXF/ZQTFe5kSOvn0C/ojJzc9/GNo3386595JkyewjOPUR3uByz4sBfLi4qXcw5P1YIhfHvtTLqZjiHAxEId25inel0cUSTeyDG8xZVqeFf0KmBFuuMKpreU+d11All6GDOort+FHEcFlQGCqRwvmAbIK8gugZL9KCrBzMI4qpM/V8MZfKcp9dt/VcHdo6Xe496QT2Bww0MglRgAmoLYc/TPgmXxg7XE4GSknPo3dCfHBw== 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=e6NS2vW5she6THEJEQU58C9WjLWzVk4ndqDfJf9aZGg=; b=TgFaxCc3k6YyLqLoH1JSiO8+LCzgGgRfqnSGh4x5eI/5vfsdA7u8CrzAMdtKwkob5QZOvzDAHYwpfmgYGaFuaofbc7QWP7EuoXmcRclYAi0NnqvbGa/ieRgrqg6TK/VTlQPB/fpZpUe1R9iJauLwaA7B3ZjzXtrudlzOIUFvyCA= Received: from PH0PR18MB4425.namprd18.prod.outlook.com (2603:10b6:510:ef::13) by CH0PR18MB4257.namprd18.prod.outlook.com (2603:10b6:610:b8::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15; Fri, 7 Oct 2022 20:01:51 +0000 Received: from PH0PR18MB4425.namprd18.prod.outlook.com ([fe80::16f8:9275:a441:cfec]) by PH0PR18MB4425.namprd18.prod.outlook.com ([fe80::16f8:9275:a441:cfec%6]) with mapi id 15.20.5676.028; Fri, 7 Oct 2022 20:01:51 +0000 From: Shijith Thotton To: Pavan Nikhilesh Bhagavatula , Jerin Jacob Kollanukkaran CC: "dev@dpdk.org" , Pavan Nikhilesh Bhagavatula Subject: RE: [EXT] [PATCH v3 5/5] examples/l3fwd: use em vector path for event vector Thread-Topic: [EXT] [PATCH v3 5/5] examples/l3fwd: use em vector path for event vector Thread-Index: AQHYxgo00MALCFQYyEuN9y7qNOUV+q4Dgvrg Date: Fri, 7 Oct 2022 20:01:50 +0000 Message-ID: References: <20220902091833.9074-1-pbhagavatula@marvell.com> <20220911181250.2286-1-pbhagavatula@marvell.com> <20220911181250.2286-5-pbhagavatula@marvell.com> In-Reply-To: <20220911181250.2286-5-pbhagavatula@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR18MB4425:EE_|CH0PR18MB4257:EE_ x-ms-office365-filtering-correlation-id: 442a65de-babb-45fa-5135-08daa89ec639 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fCiPwzHfBrPOH2w6OKHQtdEtXcpQUkBGIezfNlW3SRsPCDSUbCH+XtNfCQQZZRDsMaJ/DHDtGO1fXcU3nSy1oruhAMbb56hFPf+BtvP9BDK2V33xlLPxAt+kNIWMYdIJuUsHK3H6RwR+BiptTApKoy+Vd6FPqN636jUmNxFXj9UxZtD5P1dapP+hUxJqeNKjbUA473UFEtOBklYiv6Ho5mUqyrtIgKbuJ1ipVbPRZtpjvJsFrZtFsmQ8URuPbt8mbULQiNKuYVQ+rKGH1gSqC90IgknqzcwoIUo18qItMHdL76KGUd9sGZusjBCAQRW+TyNa9BRPllZDZwUYDMab1Y0vElrBsPWsDwqNfU9cCHemydzk8RHywflKxAPHGmhoTcUy1iOhGbODpaoZd0MDfjvgors6DrQ183v+UQgjdj60aL6e5tDhDjthFqdtk4/4ZQr3++Ng7/Nz7+rUb7twNKeazCwr8yDvKlcAf4AREV6hFl4t+Lu93vh2Oyp1A1g5B0GATNt/Wjk6xjCtH0z2HA9ybOuc8GdHeZLLIB36mWAGQrGT376QAMpqFHlQLMchxOwJ79KTfy8pL5IOnE9mIm8z/lC0Nc6Aq4pJfB5kaHxCFlBn+vI/FNs4IBEIrZ1v8yTT1Gr3eZlAvEVR3RVh1yUbttJmwbPHzsLIEfxabS/MmF5sBUVFF738KTUrZjK2bLraV0yvoVlG7E6ELzb8sgiO4Z8XpcanP/7hrqr6NMbC1ltglggjICgAjhQqze2cMznFbQRQdad5Dacn4tODkQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4425.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(346002)(39860400002)(376002)(366004)(396003)(451199015)(66446008)(110136005)(66476007)(6636002)(4326008)(66946007)(66556008)(8676002)(64756008)(107886003)(8936002)(38070700005)(33656002)(83380400001)(52536014)(54906003)(26005)(76116006)(41300700001)(122000001)(7696005)(6506007)(478600001)(38100700002)(86362001)(55016003)(2906002)(71200400001)(9686003)(316002)(5660300002)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?UIjaUM/jsl5soWiKPrHVkG7uYQYukuSkkCgo8M3GEEToh/dTrZPd3iIj0hHl?= =?us-ascii?Q?x8qwWhVyqGdmydO1b499Ud2AmaZaQY3mVHjfbNlgqQqngmyE/qMYzsSuBkiL?= =?us-ascii?Q?iiut97p8H5lMlbhS4AXdT2zEIjDorPK7ZxNJ7iifVDJg5bJHZe3vehmyZq58?= =?us-ascii?Q?2dlXvUSlBm9OnW8Gyq/YJZmuBL6ZAQTL1blIOj9yi04utVCMRP93+htncndT?= =?us-ascii?Q?wlxna2/akznNqpsKbBOIj65j9p+SgZduuw86DipYNc/jJsiSuzyQXku8thu+?= =?us-ascii?Q?2s8wH8lnz7Tr3mdvF4EcZOFvGM7XxVK2zCIeeTorBusheWevGZ6cL/Pycmze?= =?us-ascii?Q?tvSus4XXo110EorhO7Ki9TsnYpG6Qt3Q2aghazhfKUdqbUrzoRnllMgZW56a?= =?us-ascii?Q?iwl6Gm3Xzyb1Uj6scywGoRSHOGI2/6g6la8ToshC6mWtdqV+vPE2+Rup8LwA?= =?us-ascii?Q?aeB3ZEOFbrBoD+zgSKv7Y6OrwxXNrj2lC6Ol99cG0CVeiO3sj95DuIxW/UZK?= =?us-ascii?Q?lT9gwG9DnFayyhO2eYK3xnc6dCYkWTzcwa5hF599GzjMOOIRwsYsqUoqxBrT?= =?us-ascii?Q?y+ZxWYRviiWx935kyxFF3cvciF+Bn3gaMOvqmbQUF5YuVJ0rYNu4fz3ok5qE?= =?us-ascii?Q?ygE+mI3U5KmdhoeqfsTvsVZrRs6ZCMCtBNf6NuH1i4aA1zpDQhcWkp3ltmzZ?= =?us-ascii?Q?xd+RmZe/Wnhplube5Dt6slnLC/RWkufocHKFxZvciKsPy3nQW2geJThmg3ct?= =?us-ascii?Q?TqS9jw416AYBhyQyHvzB61P7MunbQgGR2b1NEVhAjNs7tpjb5XMyNJRIbM2b?= =?us-ascii?Q?UXwIFbE/Vwz2XB5WUBCRkU/ZOFw70n1KioWkZGS6couPPXmRCJZ7VxGAYjaF?= =?us-ascii?Q?vtK0m2tsUdTP05Wt1RxlB96b+TPYvy6Hu6U4dF0ehaPainozpqy14pbDbJbI?= =?us-ascii?Q?fgc4XBUf8vXraGXhojcHnRmxTqC5wj4SmdsBjlTp9A6FdhrfyhpPtLD8f+hO?= =?us-ascii?Q?xSEtkBSPoRboKPBZUjpvhJy3x7LpOPD1gW37gHsBMGKHc84pKpUQ+kid62GJ?= =?us-ascii?Q?eHt4ESrbfMGB1eBvbtJ/QABoeBBMBAze42ta+sKQ1qsgXIfEc3FT1dOPxYmp?= =?us-ascii?Q?vYJC8hYYkihrFfSFj5BVRV/RGYlLTd2mitGs9UzcB8LUY6KdTxs3PLv7nvq8?= =?us-ascii?Q?u9TcnXZgdjSBq2Rl0nQ9/bf80vZYJNQWU0hGqVgtRWZHAkr1IJh64H04JiB4?= =?us-ascii?Q?K9BEuDZxlGsUMrktHDvEuN2hyiu58jcpyij79HGkvmTGSk2jSjgcX0tOQgb4?= =?us-ascii?Q?QfGBbgt9BP4T8JlmQCOdMYpJrknuzvxJoA6oKFeVLSkN6SZ3GtZFG/E9q7t9?= =?us-ascii?Q?qLogLHrQtQ/o/OeJ8g4eew9q2PypjEIXkDOJ8wTZvZ06VpUR5NEo57aqY2sS?= =?us-ascii?Q?JRbqpSbXo+AH44qTWeIs/DCjR9hoWBRbiyyTeA765tRm2P2W9EEzbASQnPtP?= =?us-ascii?Q?DUFJbFiXRSsk5I0swoYGZ3Iq0TlxNUIo1zTRYc4LhfSJQqzQODjbsfXGQSB4?= =?us-ascii?Q?bJX1fQgzDRINIRMFC55mOJOFZknrraaHC+Hn0pQx?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4425.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 442a65de-babb-45fa-5135-08daa89ec639 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Oct 2022 20:01:51.0134 (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: WLwPEYVzYxQb35n0YZj6JN+u0jroVcGCgUWrLh5za/xo15ko+7RpDVb/q5Lay4/YtI+ynrx+W1sO23KEPaBfdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR18MB4257 X-Proofpoint-GUID: zl53PsNKtrGfs53w0DuFX_spYzR5t4DI X-Proofpoint-ORIG-GUID: zl53PsNKtrGfs53w0DuFX_spYzR5t4DI X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-10-07_04,2022-10-07_01,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org >Use em vector path to process event vector. > >Signed-off-by: Pavan Nikhilesh >--- > examples/l3fwd/l3fwd_em.c | 12 +++-- > examples/l3fwd/l3fwd_em.h | 29 +++++------ > examples/l3fwd/l3fwd_em_hlm.h | 72 +++++----------------------- > examples/l3fwd/l3fwd_em_sequential.h | 25 ++++++---- > examples/l3fwd/l3fwd_event.h | 21 -------- > 5 files changed, 47 insertions(+), 112 deletions(-) > >diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c >index 10be24c61d..e7b35cfbd9 100644 >--- a/examples/l3fwd/l3fwd_em.c >+++ b/examples/l3fwd/l3fwd_em.c >@@ -852,10 +852,15 @@ em_event_loop_vector(struct l3fwd_event_resources >*evt_rsrc, > int i, nb_enq =3D 0, nb_deq =3D 0; > struct lcore_conf *lconf; > unsigned int lcore_id; >+ uint16_t *dst_ports; > > if (event_p_id < 0) > return; > >+ dst_ports =3D rte_zmalloc("", sizeof(uint16_t) * evt_rsrc->vector_size, >+ RTE_CACHE_LINE_SIZE); Free missing. >+ if (dst_ports =3D=3D NULL) >+ return; > lcore_id =3D rte_lcore_id(); > lconf =3D &lcore_conf[lcore_id]; > >@@ -877,13 +882,12 @@ em_event_loop_vector(struct l3fwd_event_resources >*evt_rsrc, > } > > #if defined RTE_ARCH_X86 || defined __ARM_NEON >- l3fwd_em_process_event_vector(events[i].vec, lconf); >+ l3fwd_em_process_event_vector(events[i].vec, lconf, >+ dst_ports); > #else > l3fwd_em_no_opt_process_event_vector(events[i].vec, >- lconf); >+ lconf, dst_ports); > #endif >- if (flags & L3FWD_EVENT_TX_DIRECT) >- event_vector_txq_set(events[i].vec, 0); > } > > if (flags & L3FWD_EVENT_TX_ENQ) { >diff --git a/examples/l3fwd/l3fwd_em.h b/examples/l3fwd/l3fwd_em.h >index fe2ee59f6a..7d051fc076 100644 >--- a/examples/l3fwd/l3fwd_em.h >+++ b/examples/l3fwd/l3fwd_em.h >@@ -100,7 +100,7 @@ l3fwd_em_simple_forward(struct rte_mbuf *m, uint16_t >portid, > } > } > >-static __rte_always_inline void >+static __rte_always_inline uint16_t > l3fwd_em_simple_process(struct rte_mbuf *m, struct lcore_conf *qconf) > { > struct rte_ether_hdr *eth_hdr; >@@ -117,6 +117,8 @@ l3fwd_em_simple_process(struct rte_mbuf *m, struct >lcore_conf *qconf) > m->port =3D l3fwd_em_handle_ipv6(m, m->port, eth_hdr, qconf); > else > m->port =3D BAD_PORT; >+ >+ return m->port; > } > > /* >@@ -179,7 +181,8 @@ l3fwd_em_no_opt_process_events(int nb_rx, struct >rte_event **events, > > static inline void > l3fwd_em_no_opt_process_event_vector(struct rte_event_vector *vec, >- struct lcore_conf *qconf) >+ struct lcore_conf *qconf, >+ uint16_t *dst_ports) > { > struct rte_mbuf **mbufs =3D vec->mbufs; > int32_t i; >@@ -188,30 +191,20 @@ l3fwd_em_no_opt_process_event_vector(struct >rte_event_vector *vec, > for (i =3D 0; i < PREFETCH_OFFSET && i < vec->nb_elem; i++) > rte_prefetch0(rte_pktmbuf_mtod(mbufs[i], void *)); > >- /* Process first packet to init vector attributes */ >- l3fwd_em_simple_process(mbufs[0], qconf); >- if (vec->attr_valid) { >- if (mbufs[0]->port !=3D BAD_PORT) >- vec->port =3D mbufs[0]->port; >- else >- vec->attr_valid =3D 0; >- } >- > /* > * Prefetch and forward already prefetched packets. > */ >- for (i =3D 1; i < (vec->nb_elem - PREFETCH_OFFSET); i++) { >+ for (i =3D 0; i < (vec->nb_elem - PREFETCH_OFFSET); i++) { > rte_prefetch0( > rte_pktmbuf_mtod(mbufs[i + PREFETCH_OFFSET], void >*)); >- l3fwd_em_simple_process(mbufs[i], qconf); >- event_vector_attr_validate(vec, mbufs[i]); >+ dst_ports[i] =3D l3fwd_em_simple_process(mbufs[i], qconf); > } > > /* Forward remaining prefetched packets */ >- for (; i < vec->nb_elem; i++) { >- l3fwd_em_simple_process(mbufs[i], qconf); >- event_vector_attr_validate(vec, mbufs[i]); >- } >+ for (; i < vec->nb_elem; i++) >+ dst_ports[i] =3D l3fwd_em_simple_process(mbufs[i], qconf); >+ >+ process_event_vector(vec, dst_ports); > } > > #endif /* __L3FWD_EM_H__ */ >diff --git a/examples/l3fwd/l3fwd_em_hlm.h b/examples/l3fwd/l3fwd_em_hlm.h >index 12b997e477..2e11eefad7 100644 >--- a/examples/l3fwd/l3fwd_em_hlm.h >+++ b/examples/l3fwd/l3fwd_em_hlm.h >@@ -332,70 +332,20 @@ l3fwd_em_process_events(int nb_rx, struct rte_event >**ev, > > static inline void > l3fwd_em_process_event_vector(struct rte_event_vector *vec, >- struct lcore_conf *qconf) >+ struct lcore_conf *qconf, uint16_t *dst_port) > { >- struct rte_mbuf **mbufs =3D vec->mbufs; >- uint16_t dst_port[MAX_PKT_BURST]; >- int32_t i, j, n, pos; >- >- for (j =3D 0; j < EM_HASH_LOOKUP_COUNT && j < vec->nb_elem; j++) >- rte_prefetch0( >- rte_pktmbuf_mtod(mbufs[j], struct rte_ether_hdr *) + 1); >+ uint16_t i; > > if (vec->attr_valid) >- vec->port =3D em_get_dst_port(qconf, mbufs[0], mbufs[0]->port); >- >- n =3D RTE_ALIGN_FLOOR(vec->nb_elem, EM_HASH_LOOKUP_COUNT); >- for (j =3D 0; j < n; j +=3D EM_HASH_LOOKUP_COUNT) { >- uint32_t pkt_type =3D >- RTE_PTYPE_L3_MASK | RTE_PTYPE_L4_TCP | >RTE_PTYPE_L4_UDP; >- uint32_t l3_type, tcp_or_udp; >- >- for (i =3D 0; i < EM_HASH_LOOKUP_COUNT; i++) >- pkt_type &=3D mbufs[j + i]->packet_type; >- >- l3_type =3D pkt_type & RTE_PTYPE_L3_MASK; >- tcp_or_udp =3D pkt_type & (RTE_PTYPE_L4_TCP | >RTE_PTYPE_L4_UDP); >- >- for (i =3D 0, pos =3D j + EM_HASH_LOOKUP_COUNT; >- i < EM_HASH_LOOKUP_COUNT && pos < vec->nb_elem; >- i++, pos++) { >- rte_prefetch0(rte_pktmbuf_mtod(mbufs[pos], >- struct rte_ether_hdr *) + >- 1); >- } >- >- if (tcp_or_udp && (l3_type =3D=3D RTE_PTYPE_L3_IPV4)) { >- em_get_dst_port_ipv4xN_events(qconf, &mbufs[j], >- &dst_port[j]); >- } else if (tcp_or_udp && (l3_type =3D=3D RTE_PTYPE_L3_IPV6)) { >- em_get_dst_port_ipv6xN_events(qconf, &mbufs[j], >- &dst_port[j]); >- } else { >- for (i =3D 0; i < EM_HASH_LOOKUP_COUNT; i++) { >- mbufs[j + i]->port =3D >- em_get_dst_port(qconf, mbufs[j + i], >- mbufs[j + i]->port); >- process_packet(mbufs[j + i], >- &mbufs[j + i]->port); >- event_vector_attr_validate(vec, mbufs[j + i]); >- } >- continue; >- } >- processx4_step3(&mbufs[j], &dst_port[j]); >- >- for (i =3D 0; i < EM_HASH_LOOKUP_COUNT; i++) { >- mbufs[j + i]->port =3D dst_port[j + i]; >- event_vector_attr_validate(vec, mbufs[j + i]); >- } >- } >- >- for (; j < vec->nb_elem; j++) { >- mbufs[j]->port =3D >- em_get_dst_port(qconf, mbufs[j], mbufs[j]->port); >- process_packet(mbufs[j], &mbufs[j]->port); >- event_vector_attr_validate(vec, mbufs[j]); >- } >+ l3fwd_em_process_packets(vec->nb_elem, vec->mbufs, >dst_port, >+ vec->port, qconf, 1); >+ else >+ for (i =3D 0; i < vec->nb_elem; i++) >+ l3fwd_em_process_packets(1, &vec->mbufs[i], >+ &dst_port[i], >+ vec->mbufs[i]->port, qconf, 1); >+ >+ process_event_vector(vec, dst_port); > } > > #endif /* __L3FWD_EM_HLM_H__ */ >diff --git a/examples/l3fwd/l3fwd_em_sequential.h >b/examples/l3fwd/l3fwd_em_sequential.h >index d2f75edb8a..067f23889a 100644 >--- a/examples/l3fwd/l3fwd_em_sequential.h >+++ b/examples/l3fwd/l3fwd_em_sequential.h >@@ -113,39 +113,48 @@ l3fwd_em_process_events(int nb_rx, struct rte_event >**events, > > for (i =3D 1, j =3D 0; j < nb_rx; i++, j++) { > struct rte_mbuf *mbuf =3D events[j]->mbuf; >+ uint16_t port; > > if (i < nb_rx) { > rte_prefetch0(rte_pktmbuf_mtod( > events[i]->mbuf, > struct rte_ether_hdr *) + 1); > } >+ port =3D mbuf->port; > mbuf->port =3D em_get_dst_port(qconf, mbuf, mbuf->port); > process_packet(mbuf, &mbuf->port); >+ if (mbuf->port =3D=3D BAD_PORT) >+ mbuf->port =3D port; > } > } > > static inline void > l3fwd_em_process_event_vector(struct rte_event_vector *vec, >- struct lcore_conf *qconf) >+ struct lcore_conf *qconf, uint16_t *dst_ports) > { >+ const uint8_t attr_valid =3D vec->attr_valid; > struct rte_mbuf **mbufs =3D vec->mbufs; > int32_t i, j; > > rte_prefetch0(rte_pktmbuf_mtod(mbufs[0], struct rte_ether_hdr *) + 1); > >- if (vec->attr_valid) >- vec->port =3D em_get_dst_port(qconf, mbufs[0], mbufs[0]->port); >- > for (i =3D 0, j =3D 1; i < vec->nb_elem; i++, j++) { > if (j < vec->nb_elem) > rte_prefetch0(rte_pktmbuf_mtod(mbufs[j], > struct rte_ether_hdr *) + > 1); >- mbufs[i]->port =3D >- em_get_dst_port(qconf, mbufs[i], mbufs[i]->port); >- process_packet(mbufs[i], &mbufs[i]->port); >- event_vector_attr_validate(vec, mbufs[i]); >+ dst_ports[i] =3D em_get_dst_port(qconf, mbufs[i], >+ attr_valid ? vec->port : >+ mbufs[i]->port); > } >+ j =3D RTE_ALIGN_FLOOR(vec->nb_elem, FWDSTEP); >+ >+ for (i =3D 0; i !=3D j; i +=3D FWDSTEP) >+ processx4_step3(&vec->mbufs[i], &dst_ports[i]); >+ for (; i < vec->nb_elem; i++) >+ process_packet(vec->mbufs[i], &dst_ports[i]); >+ >+ process_event_vector(vec, dst_ports); > } > > #endif /* __L3FWD_EM_SEQUENTIAL_H__ */ >diff --git a/examples/l3fwd/l3fwd_event.h b/examples/l3fwd/l3fwd_event.h >index 3fe38aada0..e21817c36b 100644 >--- a/examples/l3fwd/l3fwd_event.h >+++ b/examples/l3fwd/l3fwd_event.h >@@ -103,27 +103,6 @@ process_dst_port(uint16_t *dst_ports, uint16_t >nb_elem) > } > #endif > >-static inline void >-event_vector_attr_validate(struct rte_event_vector *vec, struct rte_mbuf >*mbuf) >-{ >- /* l3fwd application only changes mbuf port while processing */ >- if (vec->attr_valid && (vec->port !=3D mbuf->port)) >- vec->attr_valid =3D 0; >-} >- >-static inline void >-event_vector_txq_set(struct rte_event_vector *vec, uint16_t txq) >-{ >- if (vec->attr_valid) { >- vec->queue =3D txq; >- } else { >- int i; >- >- for (i =3D 0; i < vec->nb_elem; i++) >- rte_event_eth_tx_adapter_txq_set(vec->mbufs[i], txq); >- } >-} >- > static inline uint16_t > filter_bad_packets(struct rte_mbuf **mbufs, uint16_t *dst_port, > uint16_t nb_pkts) >-- >2.25.1