DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wu, Yanglong" <yanglong.wu@intel.com>
To: Shahaf Shuler <shahafs@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd:vlan filter fail
Date: Mon, 5 Feb 2018 01:51:38 +0000	[thread overview]
Message-ID: <B73B41DFFD120A45AEE57672FCA463BA01975CE1@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <VI1PR05MB3149C807F252B3988ECCD9D0C3FF0@VI1PR05MB3149.eurprd05.prod.outlook.com>

Hi,
Thanks for your review. I got it!

Yanglong Wu
-----Original Message-----
From: Shahaf Shuler [mailto:shahafs@mellanox.com] 
Sent: Sunday, February 4, 2018 2:27 PM
To: Wu, Yanglong <yanglong.wu@intel.com>; dev@dpdk.org
Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>
Subject: RE: [PATCH] app/testpmd:vlan filter fail

Hi Wu,

Indeed there is an issue here, but this is not the right fix.

Friday, February 2, 2018 7:10 AM, Yanglong Wu:
> Subject: [PATCH] app/testpmd:vlan filter fail
> 
> Removing out port_conf.rxmode.hw_vlan_filter = 1 will let it equal to 
> 0 and port_conf.rxmode.offloads is assigned as 0 again if 
> hw_vlan_filter = 1. So it will always lead to fail for vlan filter 
> setting
> 
> Fix:0074d02fc(convert to new Rx offloads API)
> Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
> ---
>  app/test-pmd/testpmd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 
> 5dc8ccac5..0751e573c 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -2328,7 +2328,7 @@ init_port_dcb_config(portid_t pid,
>  	retval = get_eth_dcb_conf(&port_conf, dcb_mode, num_tcs, pfc_en);
>  	if (retval < 0)
>  		return retval;
> -	port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_VLAN_FILTER;
> +	port_conf.rxmode.hw_vlan_filter = 1;

The VLAN filter resets because the rxmode.ignore_offload_bitfield is not set. If it was set, the ethdev rxmode convert functions would have convert the new flag to the old API (rxmode.hw_vlan_filter).

Am not much familiar with this configuration but here is a suggested fix:

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index d8ac43268..caf282386 100644                           
--- a/app/test-pmd/testpmd.c                                
+++ b/app/test-pmd/testpmd.c                                
@@ -2324,6 +2324,8 @@ init_port_dcb_config(portid_t pid,    
        rte_port = &ports[pid];                             
                                                            
        memset(&port_conf, 0, sizeof(struct rte_eth_conf)); 
+       port_conf.rxmode = rte_port->dev_conf.rxmode;       
+       port_conf.txmode = rte_port->dev_conf.txmode;       
        /* Enter DCB configuration status */                
        dcb_config = 1;                                     
                                                            

The port_conf for the dcb configuration will inherit the same configuration of the port (which has the ignore_offload_bitfield set).
Otherwise, at least the rxmode.ignore_offload_bitfield must be set. 
> 
>  	/**
>  	 * Write the configuration into the device.
> --
> 2.11.0

  reply	other threads:[~2018-02-05  1:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02  5:09 Yanglong Wu
2018-02-04  6:27 ` Shahaf Shuler
2018-02-05  1:51   ` Wu, Yanglong [this message]
2018-02-05  2:33 ` [dpdk-dev] [PATCH v2] " Yanglong Wu
2018-02-05  6:14   ` Shahaf Shuler
2018-02-05  7:36     ` Wu, Yanglong
2018-02-05  7:53   ` [dpdk-dev] [PATCH v3] app/testpmd: fix port_id alloction issue Yanglong Wu
2018-02-05  8:00     ` Yang, Zhiyong
2018-02-05  8:48   ` [dpdk-dev] [PATCH v3] app/testpmd: fix port DCB configuration Yanglong Wu
2018-02-05  8:59     ` Shahaf Shuler
2018-02-05  9:47     ` [dpdk-dev] [PATCH v4] " Yanglong Wu
2018-02-05  9:56     ` Yanglong Wu
2018-02-06 15:09       ` Zhang, Helin
  -- strict thread matches above, loose matches on Subject: below --
2018-02-01  1:26 [dpdk-dev] [PATCH] app/testpmd:vlan filter fail Yanglong Wu
2018-02-01  2:07 ` Thomas Monjalon
2018-02-01  5:57 ` Shahaf Shuler
2018-02-02  3:37   ` Wu, Yanglong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B73B41DFFD120A45AEE57672FCA463BA01975CE1@shsmsx102.ccr.corp.intel.com \
    --to=yanglong.wu@intel.com \
    --cc=dev@dpdk.org \
    --cc=shahafs@mellanox.com \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).