DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: "Topel, Bjorn" <bjorn.topel@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Xu, Qian Q" <qian.q.xu@intel.com>,
	"Yao, Lei A" <lei.a.yao@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	"thomas.monjalon@6wind.com" <thomas.monjalon@6wind.com>,
	"Topel, Bjorn" <bjorn.topel@intel.com>
Subject: Re: [dpdk-dev] [PATCH] examples/l3fwd: force CRC stripping for i40evf
Date: Wed, 9 Nov 2016 09:46:12 +0000	[thread overview]
Message-ID: <2601191342CEEE43887BDE71AB9772583F0D2F6C@irsmsx105.ger.corp.intel.com> (raw)
In-Reply-To: <20161109082341.19825-1-bjorn.topel@intel.com>


Hi,

> 
> Commit 1bbcc5d21129 ("i40evf: report error for unsupported CRC
> stripping config") broke l3fwd, since it was forcing that CRC was
> kept. Now, if i40evf is running, CRC stripping will be enabled.
> 
> Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
> ---
>  examples/l3fwd/main.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
> index 7223e773107e..b60278794135 100644
> --- a/examples/l3fwd/main.c
> +++ b/examples/l3fwd/main.c
> @@ -906,6 +906,14 @@ main(int argc, char **argv)
>  			n_tx_queue = MAX_TX_QUEUE_PER_PORT;
>  		printf("Creating queues: nb_rxq=%d nb_txq=%u... ",
>  			nb_rx_queue, (unsigned)n_tx_queue );
> +		rte_eth_dev_info_get(portid, &dev_info);
> +		if (dev_info.driver_name &&
> +		    strcmp(dev_info.driver_name, "net_i40e_vf") == 0) {
> +			/* i40evf require that CRC stripping is enabled. */
> +			port_conf.rxmode.hw_strip_crc = 1;
> +		} else {
> +			port_conf.rxmode.hw_strip_crc = 0;
> +		}

That's a common problem across Intel VF devices.
Bothe igb and ixgbe overcomes that problem just by forcing ' rxmode.hw_strip_crc = 1;'
at PMD itself:

 static int
ixgbevf_dev_configure(struct rte_eth_dev *dev)
{
...
       /*
         * VF has no ability to enable/disable HW CRC
         * Keep the persistent behavior the same as Host PF
         */
#ifndef RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC
        if (!conf->rxmode.hw_strip_crc) {
                PMD_INIT_LOG(NOTICE, "VF can't disable HW CRC Strip");
                conf->rxmode.hw_strip_crc = 1;
        }
#else
        if (conf->rxmode.hw_strip_crc) {
                PMD_INIT_LOG(NOTICE, "VF can't enable HW CRC Strip");
                conf->rxmode.hw_strip_crc = 0;
        }
#endif

Wonder, can't i40e VF do the same?
BTW, all other examples would experience same problem too, right?
Konstantin

>  		ret = rte_eth_dev_configure(portid, nb_rx_queue,
>  					(uint16_t)n_tx_queue, &port_conf);
>  		if (ret < 0)
> @@ -946,7 +954,6 @@ main(int argc, char **argv)
>  			printf("txq=%u,%d,%d ", lcore_id, queueid, socketid);
>  			fflush(stdout);
> 
> -			rte_eth_dev_info_get(portid, &dev_info);
>  			txconf = &dev_info.default_txconf;
>  			if (port_conf.rxmode.jumbo_frame)
>  				txconf->txq_flags = 0;
> --
> 2.9.3


  parent reply	other threads:[~2016-11-09  9:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09  8:23 Björn Töpel
2016-11-09  8:37 ` Yao, Lei A
2016-11-09  9:28 ` Thomas Monjalon
2016-11-09  9:39   ` Björn Töpel
2016-11-09  9:46 ` Ananyev, Konstantin [this message]
2016-11-09 10:05   ` Björn Töpel
2016-11-09 10:22     ` Thomas Monjalon
2016-11-09 11:08     ` Ananyev, Konstantin
2016-11-09 11:27       ` Björn Töpel
2016-11-09 12:13         ` Ananyev, Konstantin
2016-11-09 13:01         ` Zhang, Helin
2016-11-09 13:09           ` Björn Töpel
2016-11-10  5:49             ` Yao, Lei A
2016-11-10  6:17               ` Björn Töpel
2016-11-10  7:55                 ` Thomas Monjalon
2016-11-10  7:59                   ` Björn Töpel
2016-11-10 13:50 Mori, Naoyuki
2016-11-10 14:32 ` Thomas Monjalon
2016-11-10 14:43   ` Mori, Naoyuki

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=2601191342CEEE43887BDE71AB9772583F0D2F6C@irsmsx105.ger.corp.intel.com \
    --to=konstantin.ananyev@intel.com \
    --cc=bjorn.topel@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=lei.a.yao@intel.com \
    --cc=qian.q.xu@intel.com \
    --cc=thomas.monjalon@6wind.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).