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 472404331F; Mon, 13 Nov 2023 22:05:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C8ED1402B0; Mon, 13 Nov 2023 22:05:58 +0100 (CET) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by mails.dpdk.org (Postfix) with ESMTP id ED4BF402AB for ; Mon, 13 Nov 2023 22:05:56 +0100 (CET) Received: from frapeml100007.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4SThgh69LHz6K6Fq for ; Tue, 14 Nov 2023 05:01:52 +0800 (CST) Received: from frapeml500007.china.huawei.com (7.182.85.172) by frapeml100007.china.huawei.com (7.182.85.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Mon, 13 Nov 2023 22:05:38 +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.031; Mon, 13 Nov 2023 22:05:38 +0100 From: Konstantin Ananyev To: Trevor Tao , "dev@dpdk.org" Subject: RE: [PATCH v5 1/2] examples/l3fwd: relax RSS requirement with option Thread-Topic: [PATCH v5 1/2] examples/l3fwd: relax RSS requirement with option Thread-Index: AQHaFkw+dAZ8PZ5wNkmv60qgfOBbcLB4vUkQ Date: Mon, 13 Nov 2023 21:05:37 +0000 Message-ID: References: <20231113161135.125307-1-taozj888@163.com> <20231113161135.125307-2-taozj888@163.com> In-Reply-To: <20231113161135.125307-2-taozj888@163.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.81.190.147] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected 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 > Now the port Rx mq_mode had been set to RTE_ETH_MQ_RX_RSS > by default, but some hw and/or virtual interface does not > support the RSS and offload mode presupposed, e.g., some > virtio interfaces in the cloud don't support > RSS and the error msg may like: >=20 > virtio_dev_configure(): RSS support requested but not supported by > the device > Port0 dev_configure =3D -95 >=20 > So to enable the l3fwd running in that environment, the Rx mode requireme= nt > can be relaxed to reflect the hardware feature reality here, and the l3fw= d > can run smoothly then. >=20 > An option named "disable-rss" is added to disable the RX RSS explicitly, > and it's disabled by default. >=20 > Signed-off-by: Trevor Tao > --- > examples/l3fwd/main.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) >=20 > diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c > index 6063eb1399..b42365ef1b 100644 > --- a/examples/l3fwd/main.c > +++ b/examples/l3fwd/main.c > @@ -73,6 +73,7 @@ static enum L3FWD_LOOKUP_MODE lookup_mode; > static int numa_on =3D 1; /**< NUMA is enabled by default. */ > static int parse_ptype; /**< Parse packet type using rx callback, and */ > /**< disabled by default */ > +static int disable_rss; /**< Disable the RX RSS mode */ > static int per_port_pool; /**< Use separate buffer pools per port; disab= led */ > /**< by default */ >=20 > @@ -678,6 +679,7 @@ static const char short_options[] =3D > #define CMD_LINE_OPT_MAX_PKT_LEN "max-pkt-len" > #define CMD_LINE_OPT_HASH_ENTRY_NUM "hash-entry-num" > #define CMD_LINE_OPT_PARSE_PTYPE "parse-ptype" > +#define CMD_LINE_OPT_DISABLE_RSS "disable-rss" > #define CMD_LINE_OPT_PER_PORT_POOL "per-port-pool" > #define CMD_LINE_OPT_MODE "mode" > #define CMD_LINE_OPT_EVENTQ_SYNC "eventq-sched" > @@ -705,6 +707,7 @@ enum { > CMD_LINE_OPT_MAX_PKT_LEN_NUM, > CMD_LINE_OPT_HASH_ENTRY_NUM_NUM, > CMD_LINE_OPT_PARSE_PTYPE_NUM, > + CMD_LINE_OPT_DISABLE_RSS_NUM, > CMD_LINE_OPT_RULE_IPV4_NUM, > CMD_LINE_OPT_RULE_IPV6_NUM, > CMD_LINE_OPT_ALG_NUM, > @@ -728,6 +731,7 @@ static const struct option lgopts[] =3D { > {CMD_LINE_OPT_MAX_PKT_LEN, 1, 0, CMD_LINE_OPT_MAX_PKT_LEN_NUM}, > {CMD_LINE_OPT_HASH_ENTRY_NUM, 1, 0, CMD_LINE_OPT_HASH_ENTRY_NUM_NUM}, > {CMD_LINE_OPT_PARSE_PTYPE, 0, 0, CMD_LINE_OPT_PARSE_PTYPE_NUM}, > + {CMD_LINE_OPT_DISABLE_RSS, 0, 0, CMD_LINE_OPT_DISABLE_RSS_NUM}, > {CMD_LINE_OPT_PER_PORT_POOL, 0, 0, CMD_LINE_OPT_PARSE_PER_PORT_POOL}, > {CMD_LINE_OPT_MODE, 1, 0, CMD_LINE_OPT_MODE_NUM}, > {CMD_LINE_OPT_EVENTQ_SYNC, 1, 0, CMD_LINE_OPT_EVENTQ_SYNC_NUM}, > @@ -853,6 +857,11 @@ parse_args(int argc, char **argv) > parse_ptype =3D 1; > break; >=20 > + case CMD_LINE_OPT_DISABLE_RSS_NUM: > + printf("Disable RX RSS\n"); > + disable_rss =3D 1; > + break; > + > case CMD_LINE_OPT_PARSE_PER_PORT_POOL: > printf("per port buffer pool is enabled\n"); > per_port_pool =3D 1; > @@ -1257,7 +1266,7 @@ l3fwd_poll_resource_setup(void) > local_port_conf.rx_adv_conf.rss_conf.rss_hf &=3D > dev_info.flow_type_rss_offloads; >=20 > - if (dev_info.max_rx_queues =3D=3D 1) > + if (disable_rss =3D=3D 1 || dev_info.max_rx_queues =3D=3D 1) > local_port_conf.rxmode.mq_mode =3D RTE_ETH_MQ_RX_NONE; >=20 > if (local_port_conf.rx_adv_conf.rss_conf.rss_hf !=3D > -- Acked-by: Konstantin Ananyev =20 > 2.34.1