DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: "Hyong Youb Kim (hyonkim)" <hyonkim@cisco.com>,
	Igor Russkikh <igor.russkikh@aquantia.com>,
	Pavel Belous <pavel.belous@aquantia.com>,
	"Ravi Kumar" <ravi1.kumar@amd.com>,
	Rasesh Mody <rmody@marvell.com>,
	Shahed Shaikh <shshaikh@marvell.com>,
	Ajit Khaparde <ajit.khaparde@broadcom.com>,
	"Somnath Kotur" <somnath.kotur@broadcom.com>,
	Chas Williams <chas3@att.com>,
	"Rahul Lakkireddy" <rahul.lakkireddy@chelsio.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Sachin Saxena <sachin.saxena@nxp.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Gagandeep Singh <g.singh@nxp.com>,
	"John Daley (johndale)" <johndale@cisco.com>,
	Gaetan Rivet <gaetan.rivet@6wind.com>,
	"Qi Zhang" <qi.z.zhang@intel.com>,
	Xiao Wang <xiao.w.wang@intel.com>,
	Beilei Xing <beilei.xing@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Qiming Yang <qiming.yang@intel.com>,
	Rosen Xu <rosen.xu@intel.com>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>,
	Shijith Thotton <sthotton@marvell.com>,
	Srisivasubramanian Srinivasan <srinivasan@marvell.com>,
	Matan Azrad <matan@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>,
	Yongseok Koh <yskoh@mellanox.com>,
	Viacheslav Ovsiienko <viacheslavo@mellanox.com>,
	"Tomasz Duszynski" <tdu@semihalf.com>,
	Liron Himi <lironh@marvell.com>,
	"Stephen Hemminger" <sthemmin@microsoft.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Rastislav Cernay <cernay@netcope.com>,
	Jan Remes <remes@netcope.com>, Jerin Jacob <jerinj@marvell.com>,
	Nithin Dabilpuram <ndabilpuram@marvell.com>,
	"Kiran Kumar K" <kirankumark@marvell.com>,
	Keith Wiles <keith.wiles@intel.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	Tiwei Bie <tiwei.bie@intel.com>,
	Zhihong Wang <zhihong.wang@intel.com>,
	Yong Wang <yongwang@vmware.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Ivan Ilchenko <Ivan.Ilchenko@oktetlabs.ru>
Subject: Re: [dpdk-dev] [PATCH 4/7] ethdev: change allmulticast callbacks to return status
Date: Mon, 16 Sep 2019 10:29:43 +0300	[thread overview]
Message-ID: <03c9a921-20f7-88c4-5657-282e3cd9a144@solarflare.com> (raw)
In-Reply-To: <BN7PR11MB2738F4274BA7B20F877D6FD1BF8C0@BN7PR11MB2738.namprd11.prod.outlook.com>

Hi Hyong,

On 9/16/19 10:03 AM, Hyong Youb Kim (hyonkim) wrote:
>> -----Original Message-----
>> From: Andrew Rybchenko <arybchenko@solarflare.com>
>> Sent: Monday, September 9, 2019 9:13 PM
> [...]
>> Subject: [PATCH 4/7] ethdev: change allmulticast callbacks to return status
>>
>> From: Ivan Ilchenko <Ivan.Ilchenko@oktetlabs.ru>
>>
>> Enabling/disabling of allmulticast mode is not always successful and
>> it should be taken into account to be able to handle it properly.
>>
>> When correct return status is unclear from driver code, -EAGAIN is used.
>>
>> Signed-off-by: Ivan Ilchenko <Ivan.Ilchenko@oktetlabs.ru>
>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>> ---
> [...]
>>   drivers/net/enic/enic_ethdev.c          | 22 +++++++---
> [...]
>> diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
>> index 5d48930a9d..e12ca213ae 100644
>> --- a/drivers/net/enic/enic_ethdev.c
>> +++ b/drivers/net/enic/enic_ethdev.c
>> @@ -638,28 +638,38 @@ static int enicpmd_dev_promiscuous_disable(struct
>> rte_eth_dev *eth_dev)
>>   	return ret;
>>   }
>>
>> -static void enicpmd_dev_allmulticast_enable(struct rte_eth_dev *eth_dev)
>> +static int enicpmd_dev_allmulticast_enable(struct rte_eth_dev *eth_dev)
>>   {
>>   	struct enic *enic = pmd_priv(eth_dev);
>> +	int ret;
>>
>>   	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
>> -		return;
>> +		return -ENOTSUP;
> Hi Andrew,
>
> If you are making v2, could you make this to return -E_RTE_SECONDARY,
> as in the promisc patch?

Yes, of course. I'll do in v2.

>>   	ENICPMD_FUNC_TRACE();
>>   	enic->allmulti = 1;
>> -	enic_add_packet_filter(enic);
>> +	ret = enic_add_packet_filter(enic);
>> +	if (ret != 0)
>> +		enic->allmulti = 0;
>> +
>> +	return ret;
>>   }
>>
>> -static void enicpmd_dev_allmulticast_disable(struct rte_eth_dev *eth_dev)
>> +static int enicpmd_dev_allmulticast_disable(struct rte_eth_dev *eth_dev)
>>   {
>>   	struct enic *enic = pmd_priv(eth_dev);
>> +	int ret;
>>
>>   	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
>> -		return;
>> +		return -ENOTSUP;
> Here too.
>
> I tested all 5 series (promisc, allmulti, ...) with enic, and my test
> cases all passed.
>
> Acked-by: Hyong Youb Kim <hyonkim@cisco.com>

Thanks for the testing and review,
Andrew.

> Thanks.
> -Hyong
>
>>   	ENICPMD_FUNC_TRACE();
>>   	enic->allmulti = 0;
>> -	enic_add_packet_filter(enic);
>> +	ret = enic_add_packet_filter(enic);
>> +	if (ret != 0)
>> +		enic->allmulti = 1;
>> +
>> +	return ret;
>>   }
>>
>>   static int enicpmd_add_mac_addr(struct rte_eth_dev *eth_dev,


  reply	other threads:[~2019-09-16  7:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09 12:13 [dpdk-dev] [PATCH 0/7] ethdev: change allmulticast controls " Andrew Rybchenko
2019-09-09 12:13 ` [dpdk-dev] [PATCH 1/7] ethdev: change allmulticast mode controllers to return errors Andrew Rybchenko
2019-09-09 12:13 ` [dpdk-dev] [PATCH 2/7] net/failsafe: check code of allmulticast mode switch Andrew Rybchenko
2019-09-09 12:56   ` Gaëtan Rivet
2019-09-13 21:04     ` Andrew Rybchenko
2019-09-09 12:13 ` [dpdk-dev] [PATCH 3/7] net/bonding: " Andrew Rybchenko
2019-09-09 12:13 ` [dpdk-dev] [PATCH 4/7] ethdev: change allmulticast callbacks to return status Andrew Rybchenko
2019-09-16  7:03   ` Hyong Youb Kim (hyonkim)
2019-09-16  7:29     ` Andrew Rybchenko [this message]
2019-09-24  8:27   ` Ferruh Yigit
2019-09-24 12:14     ` Andrew Rybchenko
2019-09-09 12:13 ` [dpdk-dev] [PATCH 5/7] ethdev: do nothing if all-multicast mode is applied again Andrew Rybchenko
2019-09-24  8:36   ` Ferruh Yigit
2019-09-24  8:54     ` Andrew Rybchenko
2019-09-24 11:03       ` Ferruh Yigit
2019-09-24 11:50         ` Andrew Rybchenko
2019-09-09 12:13 ` [dpdk-dev] [PATCH 6/7] app/testpmd: check code of allmulticast mode switch Andrew Rybchenko
2019-09-09 12:13 ` [dpdk-dev] [PATCH 7/7] examples/ipv4_multicast: check allmulticast enable status Andrew Rybchenko

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=03c9a921-20f7-88c4-5657-282e3cd9a144@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=Ivan.Ilchenko@oktetlabs.ru \
    --cc=ajit.khaparde@broadcom.com \
    --cc=beilei.xing@intel.com \
    --cc=cernay@netcope.com \
    --cc=chas3@att.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=g.singh@nxp.com \
    --cc=gaetan.rivet@6wind.com \
    --cc=haiyangz@microsoft.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=hyonkim@cisco.com \
    --cc=igor.russkikh@aquantia.com \
    --cc=jerinj@marvell.com \
    --cc=jingjing.wu@intel.com \
    --cc=johndale@cisco.com \
    --cc=keith.wiles@intel.com \
    --cc=kirankumark@marvell.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=kys@microsoft.com \
    --cc=lironh@marvell.com \
    --cc=matan@mellanox.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=ndabilpuram@marvell.com \
    --cc=pavel.belous@aquantia.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=ravi1.kumar@amd.com \
    --cc=remes@netcope.com \
    --cc=rmody@marvell.com \
    --cc=rosen.xu@intel.com \
    --cc=sachin.saxena@nxp.com \
    --cc=shahafs@mellanox.com \
    --cc=shshaikh@marvell.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=srinivasan@marvell.com \
    --cc=sthemmin@microsoft.com \
    --cc=sthotton@marvell.com \
    --cc=tdu@semihalf.com \
    --cc=thomas@monjalon.net \
    --cc=tiwei.bie@intel.com \
    --cc=viacheslavo@mellanox.com \
    --cc=wenzhuo.lu@intel.com \
    --cc=xiao.w.wang@intel.com \
    --cc=yongwang@vmware.com \
    --cc=yskoh@mellanox.com \
    --cc=zhihong.wang@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).