All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gaëtan Rivet" <grive@u256.net>
To: "Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>, dev@dpdk.org
Cc: stable@dpdk.org, "Andrew Rybchenko" <arybchenko@solarflare.com>,
	"Ian Stokes" <ian.stokes@intel.com>,
	"Stephen Hemminger" <stephen@networkplumber.org>,
	"Ferruh Yigit" <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev]  [PATCH] net/failsafe: report minimum and maximum MTU in device info
Date: Mon, 22 Feb 2021 15:28:02 +0000	[thread overview]
Message-ID: <27c32461-7795-47a4-8178-c11e292ec6c4@www.fastmail.com> (raw)
In-Reply-To: <20201222085149.848142-1-andrew.rybchenko@oktetlabs.ru>

On Tue, Dec 22, 2020, at 08:51, Andrew Rybchenko wrote:
> Take minimum and maximum MTU values for subdevices and
> report maximum of minimums and minimum of maximums.
> 
> Fixes: ad97ceece12c ("ethdev: add min/max MTU to device info")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
>  drivers/net/failsafe/failsafe_ops.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/failsafe/failsafe_ops.c 
> b/drivers/net/failsafe/failsafe_ops.c
> index 76d64871b4..5e6fb369e1 100644
> --- a/drivers/net/failsafe/failsafe_ops.c
> +++ b/drivers/net/failsafe/failsafe_ops.c
> @@ -1095,6 +1095,8 @@ static void
>  fs_dev_merge_info(struct rte_eth_dev_info *info,
>  		  const struct rte_eth_dev_info *sinfo)
>  {
> +	info->min_mtu = RTE_MAX(info->min_mtu, sinfo->min_mtu);
> +	info->max_mtu = RTE_MIN(info->max_mtu, sinfo->max_mtu);
>  	info->max_rx_pktlen = RTE_MIN(info->max_rx_pktlen, 
> sinfo->max_rx_pktlen);
>  	info->max_rx_queues = RTE_MIN(info->max_rx_queues, 
> sinfo->max_rx_queues);
>  	info->max_tx_queues = RTE_MIN(info->max_tx_queues, 
> sinfo->max_tx_queues);
> @@ -1172,6 +1174,8 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
>  	int ret;
>  
>  	/* Use maximum upper bounds by default */
> +	infos->min_mtu = RTE_ETHER_MIN_MTU;
> +	infos->max_mtu = UINT16_MAX;
>  	infos->max_rx_pktlen = UINT32_MAX;
>  	infos->max_rx_queues = RTE_MAX_QUEUES_PER_PORT;
>  	infos->max_tx_queues = RTE_MAX_QUEUES_PER_PORT;
> -- 
> 2.29.2
> 
>

Hi Andrew,

Sorry, I missed this patch before.
It looks ok to me:

Acked-by: Gaetan Rivet <grive@u256.net>

  reply	other threads:[~2021-02-22 15:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-22  8:51 [dpdk-dev] [PATCH] net/failsafe: report minimum and maximum MTU in device info Andrew Rybchenko
2021-02-22 15:28 ` Gaëtan Rivet [this message]
2021-02-22 16:44   ` Ferruh Yigit

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=27c32461-7795-47a4-8178-c11e292ec6c4@www.fastmail.com \
    --to=grive@u256.net \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=ian.stokes@intel.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.