DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Lijun Ou <oulijun@huawei.com>, <thomas@monjalon.net>,
	<ferruh.yigit@intel.com>
Cc: <dev@dpdk.org>, <linuxarm@huawei.com>
Subject: Re: [dpdk-dev] [PATCH] ethdev: check for Rx RSS distribution and RSS hash
Date: Mon, 27 Apr 2020 15:49:36 +0300	[thread overview]
Message-ID: <b229ff77-6e92-ad5b-9dcb-b069ffe18e4e@solarflare.com> (raw)
In-Reply-To: <1587990889-56408-1-git-send-email-oulijun@huawei.com>

On 4/27/20 3:34 PM, Lijun Ou wrote:
> When rte api checks the Rx RSS distribution is enable but the RSS
> hash is disabled, it will return an error.
>
> Signed-off-by: Lijun Ou <oulijun@huawei.com>
> ---
>  lib/librte_ethdev/rte_ethdev.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
> index 0854ef8..07734c4 100644
> --- a/lib/librte_ethdev/rte_ethdev.c
> +++ b/lib/librte_ethdev/rte_ethdev.c
> @@ -1411,6 +1411,17 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
>  		goto rollback;
>  	}
>  
> +	/* Check if Rx RSS distribution is enable but RSS hash is disabled. */
> +	if (((dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) != 0) &&
> +	    !(dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_RSS_HASH)) {
> +		RTE_ETHDEV_LOG(ERR,
> +			"Ethdev port_id=%u config valid Rx mq_mode with RSS but %s offload is no-requested\n",
> +			port_id,
> +			rte_eth_dev_rx_offload_name(DEV_RX_OFFLOAD_RSS_HASH));
> +		ret = -EINVAL;
> +		goto rollback;
> +	}
> +
>  	/*
>  	 * Setup new number of RX/TX queues and reconfigure device.
>  	 */

NACK. It is perfectly fine to do distribution, but do not need RSS hash
information.
 - ETH_MQ_RX_RSS_FLAG controls RSS hash calculation and distribution
 - DEV_RX_OFFLOAD_RSS_HASH controls delivery of the hash value
   itself from HW to SW

  reply	other threads:[~2020-04-27 12:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27 12:34 Lijun Ou
2020-04-27 12:49 ` Andrew Rybchenko [this message]
2020-04-27 13:27   ` Ferruh Yigit
2020-04-29  6:41     ` oulijun
2020-04-29 12:42       ` Ferruh Yigit
2020-05-01 16:04         ` Ferruh Yigit
2020-04-29  6:31   ` oulijun

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=b229ff77-6e92-ad5b-9dcb-b069ffe18e4e@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=linuxarm@huawei.com \
    --cc=oulijun@huawei.com \
    --cc=thomas@monjalon.net \
    /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).