All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, "Min Hu (Connor)" <humin29@huawei.com>,
	ajit.khaparde@broadcom.com, stephen@networkplumber.org
Subject: Re: [dpdk-dev] [PATCH] kni: check code of allmulticast mode switch
Date: Thu, 24 Jun 2021 09:45:54 +0200	[thread overview]
Message-ID: <1850388.lIl0hZ3jcu@thomas> (raw)
In-Reply-To: <1619165562-50959-1-git-send-email-humin29@huawei.com>

Waiting for review

23/04/2021 10:12, Min Hu (Connor):
> From: Chengwen Feng <fengchengwen@huawei.com>
> 
> Some drivers may return errcode when switch allmulticast mode, so it's
> necessary to check the return code.
> 
> Fixes: b34801d1aa2e ("kni: support allmulticast mode set")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> ---
>  lib/kni/rte_kni.c | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c
> index 9dae6a8..aa9b5b7 100644
> --- a/lib/kni/rte_kni.c
> +++ b/lib/kni/rte_kni.c
> @@ -514,6 +514,8 @@ kni_config_promiscusity(uint16_t port_id, uint8_t to_on)
>  static int
>  kni_config_allmulticast(uint16_t port_id, uint8_t to_on)
>  {
> +	int ret;
> +
>  	if (!rte_eth_dev_is_valid_port(port_id)) {
>  		RTE_LOG(ERR, KNI, "Invalid port id %d\n", port_id);
>  		return -EINVAL;
> @@ -523,11 +525,16 @@ kni_config_allmulticast(uint16_t port_id, uint8_t to_on)
>  		port_id, to_on);
>  
>  	if (to_on)
> -		rte_eth_allmulticast_enable(port_id);
> +		ret = rte_eth_allmulticast_enable(port_id);
>  	else
> -		rte_eth_allmulticast_disable(port_id);
> +		ret = rte_eth_allmulticast_disable(port_id);
> +	if (ret != 0)
> +		RTE_LOG(ERR, KNI,
> +			"Failed to %s allmulticast mode for port %u: %s\n",
> +			to_on ? "enable" : "disable", port_id,
> +			rte_strerror(-ret));
>  
> -	return 0;
> +	return ret;
>  }






  reply	other threads:[~2021-06-24  7:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23  8:12 [dpdk-dev] [PATCH] kni: check code of allmulticast mode switch Min Hu (Connor)
2021-06-24  7:45 ` Thomas Monjalon [this message]
2021-06-24 11:33 ` Ferruh Yigit
2021-11-08 10:56   ` Thomas Monjalon

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=1850388.lIl0hZ3jcu@thomas \
    --to=thomas@monjalon.net \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=humin29@huawei.com \
    --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.