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 232E343BA7; Thu, 7 Mar 2024 11:14:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A1A742E94; Thu, 7 Mar 2024 11:14:40 +0100 (CET) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by mails.dpdk.org (Postfix) with ESMTP id 3E6A740295 for ; Thu, 7 Mar 2024 11:14:39 +0100 (CET) Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Tr4nC6Jqhz6K999; Thu, 7 Mar 2024 18:10:39 +0800 (CST) Received: from frapeml100008.china.huawei.com (unknown [7.182.85.131]) by mail.maildlp.com (Postfix) with ESMTPS id 12B5A140D1D; Thu, 7 Mar 2024 18:14:38 +0800 (CST) Received: from frapeml500007.china.huawei.com (7.182.85.172) by frapeml100008.china.huawei.com (7.182.85.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 7 Mar 2024 11:14:37 +0100 Received: from frapeml500007.china.huawei.com ([7.182.85.172]) by frapeml500007.china.huawei.com ([7.182.85.172]) with mapi id 15.01.2507.035; Thu, 7 Mar 2024 11:14:37 +0100 From: Konstantin Ananyev To: Kamil Vojanec , "dev@dpdk.org" CC: Trevor Tao Subject: RE: [PATCH] examples/l3fwd: fix conf propagation to RX queues Thread-Topic: [PATCH] examples/l3fwd: fix conf propagation to RX queues Thread-Index: AQHaYNAcsVwL/pR0mUS9mVxugEX1lLEsKaDw Date: Thu, 7 Mar 2024 10:14:37 +0000 Message-ID: <29c7562593cf46eeacd648b681df3af6@huawei.com> References: <20240216120207.126025-1-vojanec@cesnet.cz> In-Reply-To: <20240216120207.126025-1-vojanec@cesnet.cz> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.206.138.42] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 > When configuring RX queues, the default port configuration was used, > even though it was modified before. This results in the > 'relax-rx-offload' not being respected for RX queues. > This commit uses 'rte_eth_dev_conf_get()' to obtain the device > configuration structure instead. >=20 > Fixes: 4b01cabfb0 ("examples/l3fwd: add option to relax Rx offload") > Signed-off-by: Kamil Vojanec > --- > examples/l3fwd/main.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) >=20 > diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c > index 3bf28aec0c..2b714a362a 100644 > --- a/examples/l3fwd/main.c > +++ b/examples/l3fwd/main.c > @@ -1388,6 +1388,7 @@ l3fwd_poll_resource_setup(void) > fflush(stdout); > /* init RX queues */ > for(queue =3D 0; queue < qconf->n_rx_queue; ++queue) { > + struct rte_eth_conf local_conf; > struct rte_eth_rxconf rxq_conf; >=20 > portid =3D qconf->rx_queue_list[queue].port_id; > @@ -1408,8 +1409,14 @@ l3fwd_poll_resource_setup(void) > "Error during getting device (port %u) info: %s\n", > portid, strerror(-ret)); >=20 > + ret =3D rte_eth_dev_conf_get(portid, &local_conf); > + if (ret !=3D 0) > + rte_exit(EXIT_FAILURE, > + "Error during getting device (port %u) configuration: %s\n", > + portid, strerror(-ret)); > + > rxq_conf =3D dev_info.default_rxconf; > - rxq_conf.offloads =3D port_conf.rxmode.offloads; > + rxq_conf.offloads =3D local_conf.rxmode.offloads; > if (!per_port_pool) > ret =3D rte_eth_rx_queue_setup(portid, queueid, > nb_rxd, socketid, > -- LGTM Acked-by: Konstantin Ananyev =20 > 2.39.3