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 20C75A0540; Wed, 6 Jul 2022 09:16:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE25E40DF7; Wed, 6 Jul 2022 09:16:44 +0200 (CEST) Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) by mails.dpdk.org (Postfix) with ESMTP id 8411A40691 for ; Wed, 6 Jul 2022 09:16:42 +0200 (CEST) Received: by mail-io1-f43.google.com with SMTP id p128so13260802iof.1 for ; Wed, 06 Jul 2022 00:16:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Wx1FKvoVLYsOGAaHBBaoWunCthR9satJOB9e22L7FmI=; b=IwOaPflkuH9nMSU2+UeD7hmfFg4yTjZ7P3x/fv/nvqcDhgOkbTkw7RsUc0DKUruRxU VYkGgxnVs14l8KaQ2wC8WVwz+4ajOb+mzSRf34bS6hZOnKNPWpR9ut9gd4SKCcDQSjIE Jq7BeqABBs8MfcWMiFCgh3829WZ4jIgPSi+sO5J0M98LVgwVaK/ouXrZGJJd5Uumu6T4 toS6OKROZ9qyoPMsIS/xpNvXcEt81G2YA+/1vsWit2W0QqpQNWZljce22akJANZnbF4r dDRN97IZMg6N9JTtSzLz8m89HQTs2eRkyw4G204U/FpgmjzszMDZvMQxLcFhvyMgjVkF nRAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Wx1FKvoVLYsOGAaHBBaoWunCthR9satJOB9e22L7FmI=; b=yu7H09mEr8sfrD6D6PNK55pBkrYbkIEdaRI7goqj+YgbtVXI0njlUEUyGjG4vbDtYc PQwTzWNKYy+spUq7ULmY3iRJlqZPNLd936/XbEbcrBd9o+iTH5AIamCV8qH0+gQ0ufmm 1dL37a0zcILeTQe0ooW7mQh+mzeNgHC6g4VPnx7pnm9knOCJcan0HcUKmOFjIrTcAm7d EgOQ/TKZOcTp5G+vvA4kjKP7JxunB2w4h2uhkkisJZNe6Ir9rrmxE9tt4+LP1B4axOcN bRA21BLck1CaG20ZabPRzJRuiAoAliSu1K0fCzsjfQQ29CjLikh+KOT2YvHFppYExwLq slWg== X-Gm-Message-State: AJIora+cXG6PFABCghVttKE7I9dY9/QZmeuoZw2I2UJ+t43qrDGj0xma NeTagnkN3BU2kP0yGlAM67Sa8shQekX5VunILn7htl+X+Wk= X-Google-Smtp-Source: AGRyM1vVMT4wq6VPZKg46wcwxdvfjKWmIApFkmOXUhN8lHJ65jMXiuB0bkZGcWaaM1J6U6apcjtvGqqJyMGQQc5l7hw= X-Received: by 2002:a02:9682:0:b0:33c:6a7d:87ca with SMTP id w2-20020a029682000000b0033c6a7d87camr25282610jai.136.1657091801539; Wed, 06 Jul 2022 00:16:41 -0700 (PDT) MIME-Version: 1.0 References: <20220529142850.76501-1-jawad.hussain@emumba.com> In-Reply-To: <20220529142850.76501-1-jawad.hussain@emumba.com> From: Muhammad Jawad Hussain Date: Wed, 6 Jul 2022 12:16:30 +0500 Message-ID: Subject: Re: [PATCH v2] examples/ethtool: update rxmode to increase functionality To: dev@dpdk.org Content-Type: multipart/alternative; boundary="00000000000030f80e05e31dc073" 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 --00000000000030f80e05e31dc073 Content-Type: text/plain; charset="UTF-8" Hi, I submitted this patch on 29th may,2022. I am getting a bad coding style warning because I did not email version 2 in the reply of version 1. Should I resend it in the reply? Regards, Jawad Hussain On Sun, May 29, 2022 at 7:29 PM Muhammad Jawad Hussain < jawad.hussain@emumba.com> wrote: > previously rxmode functionality did not allow the user to choose > between different vfs nor did it allow the user to choose rxmode settings > by default it was set to vf = 0, rxmode = AUPE and the on/off state toggled > without letting the user know what state it is in > also there were no error messages > > Changes: > - added flag for vf id > - added flags for AUPE|ROPE|BAM|MPE rxmodes > - added flag for on/off > - added error messages > - added info messages > > Signed-off-by: Muhammad Jawad Hussain > --- > doc/guides/sample_app_ug/ethtool.rst | 2 +- > examples/ethtool/ethtool-app/ethapp.c | 134 ++++++++++++++++++++------ > examples/ethtool/lib/rte_ethtool.c | 38 -------- > examples/ethtool/meson.build | 4 +- > 4 files changed, 110 insertions(+), 68 deletions(-) > > diff --git a/doc/guides/sample_app_ug/ethtool.rst > b/doc/guides/sample_app_ug/ethtool.rst > index 159e9e0639..2e53084cc3 100644 > --- a/doc/guides/sample_app_ug/ethtool.rst > +++ b/doc/guides/sample_app_ug/ethtool.rst > @@ -53,7 +53,7 @@ they do as follows: > * ``portstats``: Print port statistics > * ``regs``: Dump port register(s) to file > * ``ringparam``: Get/set ring parameters > -* ``rxmode``: Toggle port Rx mode > +* ``rxmode``: Set rxmode of vfs on ports > * ``stop``: Stop port > * ``validate``: Check that given MAC address is valid unicast address > * ``vlan``: Add/remove VLAN id > diff --git a/examples/ethtool/ethtool-app/ethapp.c > b/examples/ethtool/ethtool-app/ethapp.c > index 78e86534e8..214433a98b 100644 > --- a/examples/ethtool/ethtool-app/ethapp.c > +++ b/examples/ethtool/ethtool-app/ethapp.c > @@ -8,12 +8,30 @@ > #include > #include > #include > - > +#ifdef RTE_NET_IXGBE > +#include > +#endif > +#ifdef RTE_NET_BNXT > +#include > +#endif > #include "rte_ethtool.h" > #include "ethapp.h" > > #define EEPROM_DUMP_CHUNKSIZE 1024 > > +typedef uint16_t portid_t; > + > +/* *** CONFIGURE VF RECEIVE MODE *** */ > +struct cmd_set_vf_rxmode { > + cmdline_fixed_string_t set; > + cmdline_fixed_string_t port; > + portid_t port_id; > + cmdline_fixed_string_t vf; > + uint8_t vf_id; > + cmdline_fixed_string_t what; > + cmdline_fixed_string_t mode; > + cmdline_fixed_string_t on; > +}; > > struct pcmd_get_params { > cmdline_fixed_string_t cmd; > @@ -65,8 +83,6 @@ cmdline_parse_token_string_t pcmd_open_token_cmd = > TOKEN_STRING_INITIALIZER(struct pcmd_int_params, cmd, "open"); > cmdline_parse_token_string_t pcmd_stop_token_cmd = > TOKEN_STRING_INITIALIZER(struct pcmd_int_params, cmd, "stop"); > -cmdline_parse_token_string_t pcmd_rxmode_token_cmd = > - TOKEN_STRING_INITIALIZER(struct pcmd_int_params, cmd, "rxmode"); > cmdline_parse_token_string_t pcmd_portstats_token_cmd = > TOKEN_STRING_INITIALIZER(struct pcmd_int_params, cmd, "portstats"); > cmdline_parse_token_num_t pcmd_int_token_port = > @@ -133,6 +149,31 @@ cmdline_parse_token_string_t pcmd_vlan_token_mode = > cmdline_parse_token_num_t pcmd_vlan_token_vid = > TOKEN_NUM_INITIALIZER(struct pcmd_vlan_params, vid, RTE_UINT16); > > +/* rxmode */ > +cmdline_parse_token_string_t cmd_set_vf_rxmode_set = > + TOKEN_STRING_INITIALIZER(struct cmd_set_vf_rxmode, > + set, "set"); > +cmdline_parse_token_string_t cmd_set_vf_rxmode_port = > + TOKEN_STRING_INITIALIZER(struct cmd_set_vf_rxmode, > + port, "port"); > +cmdline_parse_token_num_t cmd_set_vf_rxmode_portid = > + TOKEN_NUM_INITIALIZER(struct cmd_set_vf_rxmode, > + port_id, RTE_UINT16); > +cmdline_parse_token_string_t cmd_set_vf_rxmode_vf = > + TOKEN_STRING_INITIALIZER(struct cmd_set_vf_rxmode, > + vf, "vf"); > +cmdline_parse_token_num_t cmd_set_vf_rxmode_vfid = > + TOKEN_NUM_INITIALIZER(struct cmd_set_vf_rxmode, > + vf_id, RTE_UINT8); > +cmdline_parse_token_string_t cmd_set_vf_rxmode_what = > + TOKEN_STRING_INITIALIZER(struct cmd_set_vf_rxmode, > + what, "rxmode"); > +cmdline_parse_token_string_t cmd_set_vf_rxmode_mode = > + TOKEN_STRING_INITIALIZER(struct cmd_set_vf_rxmode, > + mode, "AUPE#ROPE#BAM#MPE"); > +cmdline_parse_token_string_t cmd_set_vf_rxmode_on = > + TOKEN_STRING_INITIALIZER(struct cmd_set_vf_rxmode, > + on, "on#off"); > > static void > pcmd_quit_callback(__rte_unused void *ptr_params, > @@ -142,7 +183,6 @@ pcmd_quit_callback(__rte_unused void *ptr_params, > cmdline_quit(ctx); > } > > - > static void > pcmd_drvinfo_callback(__rte_unused void *ptr_params, > __rte_unused struct cmdline *ctx, > @@ -150,7 +190,6 @@ pcmd_drvinfo_callback(__rte_unused void *ptr_params, > { > struct ethtool_drvinfo info; > uint16_t id_port; > - > RTE_ETH_FOREACH_DEV(id_port) { > memset(&info, 0, sizeof(info)); > if (rte_ethtool_get_drvinfo(id_port, &info)) { > @@ -447,26 +486,57 @@ pcmd_stop_callback(__rte_unused void *ptr_params, > printf("Port %i: Error stopping device\n", params->port); > } > > - > static void > -pcmd_rxmode_callback(void *ptr_params, > - __rte_unused struct cmdline *ctx, > - __rte_unused void *ptr_data) > +pcmd_rxmode_callback(void *parsed_result, > + __rte_unused struct cmdline *cl, > + __rte_unused void *data) > { > - struct pcmd_intstr_params *params = ptr_params; > - int stat; > + int ret = -ENOTSUP; > + uint16_t vf_rxmode = 0; > + struct cmd_set_vf_rxmode *res = parsed_result; > + > + int is_on = (strcmp(res->on, "on") == 0) ? 1 : 0; > + if (!strcmp(res->what, "rxmode")) { > + if (!strcmp(res->mode, "AUPE")) > + vf_rxmode |= RTE_ETH_VMDQ_ACCEPT_UNTAG; > + else if (!strcmp(res->mode, "ROPE")) > + vf_rxmode |= RTE_ETH_VMDQ_ACCEPT_HASH_UC; > + else if (!strcmp(res->mode, "BAM")) > + vf_rxmode |= RTE_ETH_VMDQ_ACCEPT_BROADCAST; > + else if (!strncmp(res->mode, "MPE", 3)) > + vf_rxmode |= RTE_ETH_VMDQ_ACCEPT_MULTICAST; > + } > > - if (!rte_eth_dev_is_valid_port(params->port)) { > - printf("Error: Invalid port number %i\n", params->port); > - return; > + RTE_SET_USED(is_on); > + RTE_SET_USED(vf_rxmode); > + > +#ifdef RTE_NET_IXGBE > + if (ret == -ENOTSUP) { > + ret = rte_pmd_ixgbe_set_vf_rxmode(res->port_id, res->vf_id, > + vf_rxmode, > (uint8_t)is_on); > + if (ret == -ENOTSUP) > + printf("ixgbe not supported\n"); > } > - stat = rte_ethtool_net_set_rx_mode(params->port); > - if (stat == 0) > - return; > - else if (stat == -ENOTSUP) > - printf("Port %i: Operation not supported\n", params->port); > - else > - printf("Port %i: Error setting rx mode\n", params->port); > +#endif > +#ifdef RTE_NET_BNXT > + if (ret == -ENOTSUP) { > + ret = rte_pmd_bnxt_set_vf_rxmode(res->port_id, res->vf_id, > + vf_rxmode, > (uint8_t)is_on); > + if (ret == -ENOTSUP) > + printf("bnxt not supported\n"); > + } > +#endif > + int ret_offload = -ENOTSUP; > + if (!strcmp(res->mode, "AUPE")) { > + ret_offload = rte_eth_dev_set_vlan_offload(res->port_id, > RTE_ETH_VLAN_FILTER_MASK); > + if (ret_offload == -ENOTSUP) > + printf("Port %i: VLAN Filter setting mask not > supported\n", res->port_id); > + } > + if (ret < 0) > + fprintf(stderr, > + "bad VF receive mode parameter, return code = > %d\n", ret); > + else if (ret == 0) > + printf("Successful\n"); > } > > > @@ -763,16 +833,25 @@ cmdline_parse_inst_t pcmd_stop = { > NULL > }, > }; > -cmdline_parse_inst_t pcmd_rxmode = { > + > +cmdline_parse_inst_t cmd_set_vf_rxmode = { > .f = pcmd_rxmode_callback, > .data = NULL, > - .help_str = "rxmode \n Toggle port Rx mode", > + .help_str = "set port vf rxmode " > + "AUPE|ROPE|BAM|MPE on|off", > .tokens = { > - (void *)&pcmd_rxmode_token_cmd, > - (void *)&pcmd_int_token_port, > - NULL > + (void *)&cmd_set_vf_rxmode_set, > + (void *)&cmd_set_vf_rxmode_port, > + (void *)&cmd_set_vf_rxmode_portid, > + (void *)&cmd_set_vf_rxmode_vf, > + (void *)&cmd_set_vf_rxmode_vfid, > + (void *)&cmd_set_vf_rxmode_what, > + (void *)&cmd_set_vf_rxmode_mode, > + (void *)&cmd_set_vf_rxmode_on, > + NULL, > }, > }; > + > cmdline_parse_inst_t pcmd_macaddr_get = { > .f = pcmd_macaddr_callback, > .data = NULL, > @@ -869,7 +948,6 @@ cmdline_parse_inst_t pcmd_vlan = { > }, > }; > > - > cmdline_parse_ctx_t list_prompt_commands[] = { > (cmdline_parse_inst_t *)&pcmd_drvinfo, > (cmdline_parse_inst_t *)&pcmd_eeprom, > @@ -885,7 +963,7 @@ cmdline_parse_ctx_t list_prompt_commands[] = { > (cmdline_parse_inst_t *)&pcmd_regs, > (cmdline_parse_inst_t *)&pcmd_ringparam, > (cmdline_parse_inst_t *)&pcmd_ringparam_set, > - (cmdline_parse_inst_t *)&pcmd_rxmode, > + (cmdline_parse_inst_t *)&cmd_set_vf_rxmode, > (cmdline_parse_inst_t *)&pcmd_stop, > (cmdline_parse_inst_t *)&pcmd_validate, > (cmdline_parse_inst_t *)&pcmd_vlan, > diff --git a/examples/ethtool/lib/rte_ethtool.c > b/examples/ethtool/lib/rte_ethtool.c > index ffaad96498..6951f0c2a8 100644 > --- a/examples/ethtool/lib/rte_ethtool.c > +++ b/examples/ethtool/lib/rte_ethtool.c > @@ -373,44 +373,6 @@ rte_ethtool_net_vlan_rx_kill_vid(uint16_t port_id, > uint16_t vid) > return rte_eth_dev_vlan_filter(port_id, vid, 0); > } > > -/* > - * The set_rx_mode provides driver-specific rx mode setting. > - * This implementation implements rx mode setting based upon > - * ixgbe/igb drivers. Further improvement is to provide a > - * callback op field over struct rte_eth_dev::dev_ops so each > - * driver can register device-specific implementation > - */ > -int > -rte_ethtool_net_set_rx_mode(uint16_t port_id) > -{ > - uint16_t num_vfs; > - struct rte_eth_dev_info dev_info; > - uint16_t vf; > - int ret; > - > - ret = rte_eth_dev_info_get(port_id, &dev_info); > - if (ret != 0) > - return ret; > - > - num_vfs = dev_info.max_vfs; > - > - /* Set VF vf_rx_mode, VF unsupport status is discard */ > - for (vf = 0; vf < num_vfs; vf++) { > -#ifdef RTE_NET_IXGBE > - rte_pmd_ixgbe_set_vf_rxmode(port_id, vf, > - RTE_ETH_VMDQ_ACCEPT_UNTAG, 0); > -#endif > - } > - > - /* Enable Rx vlan filter, VF unsupported status is discard */ > - ret = rte_eth_dev_set_vlan_offload(port_id, > RTE_ETH_VLAN_FILTER_MASK); > - if (ret != 0) > - return ret; > - > - return 0; > -} > - > - > int > rte_ethtool_get_ringparam(uint16_t port_id, > struct ethtool_ringparam *ring_param) > diff --git a/examples/ethtool/meson.build b/examples/ethtool/meson.build > index d7f63d48af..175a5ddd7a 100644 > --- a/examples/ethtool/meson.build > +++ b/examples/ethtool/meson.build > @@ -22,5 +22,7 @@ deps += 'bus_pci' > if dpdk_conf.has('RTE_NET_IXGBE') > deps += 'net_ixgbe' > endif > - > +if dpdk_conf.has('RTE_NET_BNXT') > + deps += 'net_bnxt' > +endif > allow_experimental_apis = true > -- > 2.32.0 > > --00000000000030f80e05e31dc073 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
I submitted this patch on 29th may,2022. I am gett= ing a bad coding style=C2=A0warning because I did not email version 2 in th= e reply of version 1. Should I resend it in the=C2=A0reply?

<= /div>
Regards,
Jawad Hussain

On Sun, May 29, 2022 at 7:2= 9 PM Muhammad Jawad Hussain <jawad.hussain@emumba.com> wrote:
previously rxmode functionality did not allow the = user to choose
between different vfs nor did it allow the user to choose rxmode settings by default it was set to vf =3D 0, rxmode =3D AUPE and the on/off state tog= gled
without letting the user know what state it is in
also there were no error messages

Changes:
- added flag for vf id
- added flags for AUPE|ROPE|BAM|MPE rxmodes
- added flag for on/off
- added error messages
- added info messages

Signed-off-by: Muhammad Jawad Hussain <jawad.hussain@emumba.com>
---
=C2=A0doc/guides/sample_app_ug/ethtool.rst=C2=A0 |=C2=A0 =C2=A02 +-
=C2=A0examples/ethtool/ethtool-app/ethapp.c | 134 ++++++++++++++++++++-----= -
=C2=A0examples/ethtool/lib/rte_ethtool.c=C2=A0 =C2=A0 |=C2=A0 38 -------- =C2=A0examples/ethtool/meson.build=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2= =A0 =C2=A04 +-
=C2=A04 files changed, 110 insertions(+), 68 deletions(-)

diff --git a/doc/guides/sample_app_ug/ethtool.rst b/doc/guides/sample_app_u= g/ethtool.rst
index 159e9e0639..2e53084cc3 100644
--- a/doc/guides/sample_app_ug/ethtool.rst
+++ b/doc/guides/sample_app_ug/ethtool.rst
@@ -53,7 +53,7 @@ they do as follows:
=C2=A0* ``portstats``: Print port statistics
=C2=A0* ``regs``: Dump port register(s) to file
=C2=A0* ``ringparam``: Get/set ring parameters
-* ``rxmode``: Toggle port Rx mode
+* ``rxmode``: Set rxmode of vfs on ports
=C2=A0* ``stop``: Stop port
=C2=A0* ``validate``: Check that given MAC address is valid unicast address=
=C2=A0* ``vlan``: Add/remove VLAN id
diff --git a/examples/ethtool/ethtool-app/ethapp.c b/examples/ethtool/ethto= ol-app/ethapp.c
index 78e86534e8..214433a98b 100644
--- a/examples/ethtool/ethtool-app/ethapp.c
+++ b/examples/ethtool/ethtool-app/ethapp.c
@@ -8,12 +8,30 @@
=C2=A0#include <cmdline_parse_etheraddr.h>
=C2=A0#include <cmdline_socket.h>
=C2=A0#include <cmdline.h>
-
+#ifdef RTE_NET_IXGBE
+#include <rte_pmd_ixgbe.h>
+#endif
+#ifdef RTE_NET_BNXT
+#include <rte_pmd_bnxt.h>
+#endif
=C2=A0#include "rte_ethtool.h"
=C2=A0#include "ethapp.h"

=C2=A0#define EEPROM_DUMP_CHUNKSIZE 1024

+typedef uint16_t portid_t;
+
+/* *** CONFIGURE VF RECEIVE MODE *** */
+struct cmd_set_vf_rxmode {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0cmdline_fixed_string_t set;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0cmdline_fixed_string_t port;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0portid_t port_id;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0cmdline_fixed_string_t vf;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0uint8_t vf_id;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0cmdline_fixed_string_t what;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0cmdline_fixed_string_t mode;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0cmdline_fixed_string_t on;
+};

=C2=A0struct pcmd_get_params {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 cmdline_fixed_string_t cmd;
@@ -65,8 +83,6 @@ cmdline_parse_token_string_t pcmd_open_token_cmd =3D
=C2=A0 =C2=A0 =C2=A0 =C2=A0 TOKEN_STRING_INITIALIZER(struct pcmd_int_params= , cmd, "open");
=C2=A0cmdline_parse_token_string_t pcmd_stop_token_cmd =3D
=C2=A0 =C2=A0 =C2=A0 =C2=A0 TOKEN_STRING_INITIALIZER(struct pcmd_int_params= , cmd, "stop");
-cmdline_parse_token_string_t pcmd_rxmode_token_cmd =3D
-=C2=A0 =C2=A0 =C2=A0 =C2=A0TOKEN_STRING_INITIALIZER(struct pcmd_int_params= , cmd, "rxmode");
=C2=A0cmdline_parse_token_string_t pcmd_portstats_token_cmd =3D
=C2=A0 =C2=A0 =C2=A0 =C2=A0 TOKEN_STRING_INITIALIZER(struct pcmd_int_params= , cmd, "portstats");
=C2=A0cmdline_parse_token_num_t pcmd_int_token_port =3D
@@ -133,6 +149,31 @@ cmdline_parse_token_string_t pcmd_vlan_token_mode =3D<= br> =C2=A0cmdline_parse_token_num_t pcmd_vlan_token_vid =3D
=C2=A0 =C2=A0 =C2=A0 =C2=A0 TOKEN_NUM_INITIALIZER(struct pcmd_vlan_params, = vid, RTE_UINT16);

+/* rxmode */
+cmdline_parse_token_string_t cmd_set_vf_rxmode_set =3D
+=C2=A0 =C2=A0 =C2=A0 =C2=A0TOKEN_STRING_INITIALIZER(struct cmd_set_vf_rxmo= de,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 set, "set");
+cmdline_parse_token_string_t cmd_set_vf_rxmode_port =3D
+=C2=A0 =C2=A0 =C2=A0 =C2=A0TOKEN_STRING_INITIALIZER(struct cmd_set_vf_rxmo= de,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 port, "port");
+cmdline_parse_token_num_t cmd_set_vf_rxmode_portid =3D
+=C2=A0 =C2=A0 =C2=A0 =C2=A0TOKEN_NUM_INITIALIZER(struct cmd_set_vf_rxmode,=
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0port_id, RTE_UINT16);
+cmdline_parse_token_string_t cmd_set_vf_rxmode_vf =3D
+=C2=A0 =C2=A0 =C2=A0 =C2=A0TOKEN_STRING_INITIALIZER(struct cmd_set_vf_rxmo= de,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 vf, "vf");
+cmdline_parse_token_num_t cmd_set_vf_rxmode_vfid =3D
+=C2=A0 =C2=A0 =C2=A0 =C2=A0TOKEN_NUM_INITIALIZER(struct cmd_set_vf_rxmode,=
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0vf_id, RTE_UINT8);
+cmdline_parse_token_string_t cmd_set_vf_rxmode_what =3D
+=C2=A0 =C2=A0 =C2=A0 =C2=A0TOKEN_STRING_INITIALIZER(struct cmd_set_vf_rxmo= de,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 what, "rxmode");
+cmdline_parse_token_string_t cmd_set_vf_rxmode_mode =3D
+=C2=A0 =C2=A0 =C2=A0 =C2=A0TOKEN_STRING_INITIALIZER(struct cmd_set_vf_rxmo= de,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 mode, "AUPE#ROPE#BAM#MPE")= ;
+cmdline_parse_token_string_t cmd_set_vf_rxmode_on =3D
+=C2=A0 =C2=A0 =C2=A0 =C2=A0TOKEN_STRING_INITIALIZER(struct cmd_set_vf_rxmo= de,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 on, "on#off");

=C2=A0static void
=C2=A0pcmd_quit_callback(__rte_unused void *ptr_params,
@@ -142,7 +183,6 @@ pcmd_quit_callback(__rte_unused void *ptr_params,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 cmdline_quit(ctx);
=C2=A0}

-
=C2=A0static void
=C2=A0pcmd_drvinfo_callback(__rte_unused void *ptr_params,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 __rte_unused struct cmdline *ctx,
@@ -150,7 +190,6 @@ pcmd_drvinfo_callback(__rte_unused void *ptr_params, =C2=A0{
=C2=A0 =C2=A0 =C2=A0 =C2=A0 struct ethtool_drvinfo info;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 uint16_t id_port;
-
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RTE_ETH_FOREACH_DEV(id_port) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 memset(&info, 0= , sizeof(info));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (rte_ethtool_get= _drvinfo(id_port, &info)) {
@@ -447,26 +486,57 @@ pcmd_stop_callback(__rte_unused void *ptr_params,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("Port %= i: Error stopping device\n", params->port);
=C2=A0}

-
=C2=A0static void
-pcmd_rxmode_callback(void *ptr_params,
-=C2=A0 =C2=A0 =C2=A0 =C2=A0__rte_unused struct cmdline *ctx,
-=C2=A0 =C2=A0 =C2=A0 =C2=A0__rte_unused void *ptr_data)
+pcmd_rxmode_callback(void *parsed_result,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 __rte_unused struct cmdline *cl,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 __rte_unused void *data)
=C2=A0{
-=C2=A0 =C2=A0 =C2=A0 =C2=A0struct pcmd_intstr_params *params =3D ptr_param= s;
-=C2=A0 =C2=A0 =C2=A0 =C2=A0int stat;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0int ret =3D -ENOTSUP;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0uint16_t vf_rxmode =3D 0;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0struct cmd_set_vf_rxmode *res =3D parsed_result= ;
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0int is_on =3D (strcmp(res->on, "on"= ;) =3D=3D 0) ? 1 : 0;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (!strcmp(res->what, "rxmode")) = {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!strcmp(res->= ;mode, "AUPE"))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0vf_rxmode |=3D RTE_ETH_VMDQ_ACCEPT_UNTAG;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else if (!strcmp(re= s->mode, "ROPE"))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0vf_rxmode |=3D RTE_ETH_VMDQ_ACCEPT_HASH_UC;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else if (!strcmp(re= s->mode, "BAM"))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0vf_rxmode |=3D RTE_ETH_VMDQ_ACCEPT_BROADCAST;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else if (!strncmp(r= es->mode, "MPE", 3))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0vf_rxmode |=3D RTE_ETH_VMDQ_ACCEPT_MULTICAST;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0}

-=C2=A0 =C2=A0 =C2=A0 =C2=A0if (!rte_eth_dev_is_valid_port(params->port)= ) {
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0printf("Error:= Invalid port number %i\n", params->port);
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0RTE_SET_USED(is_on);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0RTE_SET_USED(vf_rxmode);
+
+#ifdef RTE_NET_IXGBE
+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (ret =3D=3D -ENOTSUP) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ret =3D rte_pmd_ixg= be_set_vf_rxmode(res->port_id, res->vf_id,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0vf_rxmode, (uint8_t)is_on);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (ret =3D=3D -ENO= TSUP)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0printf("ixgbe not supported\n");
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }
-=C2=A0 =C2=A0 =C2=A0 =C2=A0stat =3D rte_ethtool_net_set_rx_mode(params->= ;port);
-=C2=A0 =C2=A0 =C2=A0 =C2=A0if (stat =3D=3D 0)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
-=C2=A0 =C2=A0 =C2=A0 =C2=A0else if (stat =3D=3D -ENOTSUP)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0printf("Port %= i: Operation not supported\n", params->port);
-=C2=A0 =C2=A0 =C2=A0 =C2=A0else
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0printf("Port %= i: Error setting rx mode\n", params->port);
+#endif
+#ifdef RTE_NET_BNXT
+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (ret =3D=3D -ENOTSUP) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ret =3D rte_pmd_bnx= t_set_vf_rxmode(res->port_id, res->vf_id,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 vf_rxmode, (uint8_t)is_on);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (ret =3D=3D -ENO= TSUP)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0printf("bnxt not supported\n");
+=C2=A0 =C2=A0 =C2=A0 =C2=A0}
+#endif
+=C2=A0 =C2=A0 =C2=A0 =C2=A0int ret_offload =3D -ENOTSUP;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (!strcmp(res->mode, "AUPE")) {<= br> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ret_offload =3D rte= _eth_dev_set_vlan_offload(res->port_id, RTE_ETH_VLAN_FILTER_MASK);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (ret_offload =3D= =3D -ENOTSUP)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0printf("Port %i: VLAN Filter setting mask not supported\n&qu= ot;, res->port_id);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0}
+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (ret < 0)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fprintf(stderr,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0"bad VF receive mode parameter, return code =3D %d\n", = ret);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0else if (ret =3D=3D 0)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0printf("Succes= sful\n");
=C2=A0}


@@ -763,16 +833,25 @@ cmdline_parse_inst_t pcmd_stop =3D {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 NULL
=C2=A0 =C2=A0 =C2=A0 =C2=A0 },
=C2=A0};
-cmdline_parse_inst_t pcmd_rxmode =3D {
+
+cmdline_parse_inst_t cmd_set_vf_rxmode =3D {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 .f =3D pcmd_rxmode_callback,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 .data =3D NULL,
-=C2=A0 =C2=A0 =C2=A0 =C2=A0.help_str =3D "rxmode <port_id>\n=C2= =A0 =C2=A0 =C2=A0Toggle port Rx mode",
+=C2=A0 =C2=A0 =C2=A0 =C2=A0.help_str =3D "set port <port_id> vf= <vf_id> rxmode "
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"AUPE|ROPE|BAM= |MPE on|off",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 .tokens =3D {
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(void *)&pcmd_r= xmode_token_cmd,
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(void *)&pcmd_i= nt_token_port,
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0NULL
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(void *)&cmd_se= t_vf_rxmode_set,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(void *)&cmd_se= t_vf_rxmode_port,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(void *)&cmd_se= t_vf_rxmode_portid,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(void *)&cmd_se= t_vf_rxmode_vf,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(void *)&cmd_se= t_vf_rxmode_vfid,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(void *)&cmd_se= t_vf_rxmode_what,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(void *)&cmd_se= t_vf_rxmode_mode,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(void *)&cmd_se= t_vf_rxmode_on,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0NULL,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 },
=C2=A0};
+
=C2=A0cmdline_parse_inst_t pcmd_macaddr_get =3D {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 .f =3D pcmd_macaddr_callback,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 .data =3D NULL,
@@ -869,7 +948,6 @@ cmdline_parse_inst_t pcmd_vlan =3D {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 },
=C2=A0};

-
=C2=A0cmdline_parse_ctx_t list_prompt_commands[] =3D {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (cmdline_parse_inst_t *)&pcmd_drvinfo,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (cmdline_parse_inst_t *)&pcmd_eeprom,
@@ -885,7 +963,7 @@ cmdline_parse_ctx_t list_prompt_commands[] =3D {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (cmdline_parse_inst_t *)&pcmd_regs,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (cmdline_parse_inst_t *)&pcmd_ringparam, =C2=A0 =C2=A0 =C2=A0 =C2=A0 (cmdline_parse_inst_t *)&pcmd_ringparam_set= ,
-=C2=A0 =C2=A0 =C2=A0 =C2=A0(cmdline_parse_inst_t *)&pcmd_rxmode,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0(cmdline_parse_inst_t *)&cmd_set_vf_rxmode,=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (cmdline_parse_inst_t *)&pcmd_stop,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (cmdline_parse_inst_t *)&pcmd_validate,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (cmdline_parse_inst_t *)&pcmd_vlan,
diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_= ethtool.c
index ffaad96498..6951f0c2a8 100644
--- a/examples/ethtool/lib/rte_ethtool.c
+++ b/examples/ethtool/lib/rte_ethtool.c
@@ -373,44 +373,6 @@ rte_ethtool_net_vlan_rx_kill_vid(uint16_t port_id, uin= t16_t vid)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 return rte_eth_dev_vlan_filter(port_id, vid, 0)= ;
=C2=A0}

-/*
- * The set_rx_mode provides driver-specific rx mode setting.
- * This implementation implements rx mode setting based upon
- * ixgbe/igb drivers. Further improvement is to provide a
- * callback op field over struct rte_eth_dev::dev_ops so each
- * driver can register device-specific implementation
- */
-int
-rte_ethtool_net_set_rx_mode(uint16_t port_id)
-{
-=C2=A0 =C2=A0 =C2=A0 =C2=A0uint16_t num_vfs;
-=C2=A0 =C2=A0 =C2=A0 =C2=A0struct rte_eth_dev_info dev_info;
-=C2=A0 =C2=A0 =C2=A0 =C2=A0uint16_t vf;
-=C2=A0 =C2=A0 =C2=A0 =C2=A0int ret;
-
-=C2=A0 =C2=A0 =C2=A0 =C2=A0ret =3D rte_eth_dev_info_get(port_id, &dev_= info);
-=C2=A0 =C2=A0 =C2=A0 =C2=A0if (ret !=3D 0)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return ret;
-
-=C2=A0 =C2=A0 =C2=A0 =C2=A0num_vfs =3D dev_info.max_vfs;
-
-=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Set VF vf_rx_mode, VF unsupport status is di= scard */
-=C2=A0 =C2=A0 =C2=A0 =C2=A0for (vf =3D 0; vf < num_vfs; vf++) {
-#ifdef RTE_NET_IXGBE
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rte_pmd_ixgbe_set_v= f_rxmode(port_id, vf,
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0RTE_ETH_VMDQ_ACCEPT_UNTAG, 0);
-#endif
-=C2=A0 =C2=A0 =C2=A0 =C2=A0}
-
-=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Enable Rx vlan filter, VF unsupported status= is discard */
-=C2=A0 =C2=A0 =C2=A0 =C2=A0ret =3D rte_eth_dev_set_vlan_offload(port_id, R= TE_ETH_VLAN_FILTER_MASK);
-=C2=A0 =C2=A0 =C2=A0 =C2=A0if (ret !=3D 0)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return ret;
-
-=C2=A0 =C2=A0 =C2=A0 =C2=A0return 0;
-}
-
-
=C2=A0int
=C2=A0rte_ethtool_get_ringparam(uint16_t port_id,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 struct ethtool_ringparam *ring_param)
diff --git a/examples/ethtool/meson.build b/examples/ethtool/meson.build index d7f63d48af..175a5ddd7a 100644
--- a/examples/ethtool/meson.build
+++ b/examples/ethtool/meson.build
@@ -22,5 +22,7 @@ deps +=3D 'bus_pci'
=C2=A0if dpdk_conf.has('RTE_NET_IXGBE')
=C2=A0 =C2=A0 =C2=A0deps +=3D 'net_ixgbe'
=C2=A0endif
-
+if dpdk_conf.has('RTE_NET_BNXT')
+=C2=A0 =C2=A0 deps +=3D 'net_bnxt'
+endif
=C2=A0allow_experimental_apis =3D true
--
2.32.0

--00000000000030f80e05e31dc073--