From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Sathya Perla <Sathya.Perla@Emulex.Com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v2 1/6] be2net: skip multicast promiscuos setting in already set
Date: Mon, 02 Jun 2014 14:51:22 +0400 [thread overview]
Message-ID: <538C572A.1060008@cogentembedded.com> (raw)
In-Reply-To: <CF9D1877D81D214CB0CA0669EFAE020C56C3651C@CMEXMB1.ad.emulex.com>
Hello.
On 02-06-2014 8:44, Sathya Perla wrote:
>>> From: Kalesh AP <kalesh.purayil@emulex.com>
>>> Set mc-promisc (multicast promiscuous) mode on an interface, only if it is
>>> *not already* in that mode.
>>> Also removed logs that report interface being set to multicast
>>> promiscous mode. In an earlier comment on the netdev list such log
>>> messages
>>> were deemed unnecessary as this behaviour is common across most of the
>>> ethernet drivers.
>>> Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
>>> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
>> [...]
>>> diff --git a/drivers/net/ethernet/emulex/benet/be_main.c
>> b/drivers/net/ethernet/emulex/benet/be_main.c
>>> index e1d445d..9116d5e 100644
>>> --- a/drivers/net/ethernet/emulex/benet/be_main.c
>>> +++ b/drivers/net/ethernet/emulex/benet/be_main.c
>> [...]
>>> @@ -1244,15 +1242,22 @@ static void be_set_rx_mode(struct net_device
>> *netdev)
>>> }
>>>
>>> status = be_cmd_rx_filter(adapter, IFF_MULTICAST, ON);
>>> -
>>> - /* Set to MCAST promisc mode if setting MULTICAST address fails */
>>> - if (status) {
>>> - dev_info(&adapter->pdev->dev,
>>> - "Exhausted multicast HW filters.\n");
>>> - dev_info(&adapter->pdev->dev,
>>> - "Disabling HW multicast filtering.\n");
>>> - be_cmd_rx_filter(adapter, IFF_ALLMULTI, ON);
>>> + if (!status) {
>>> + if (adapter->flags & BE_FLAGS_MCAST_PROMISC)
>>> + adapter->flags &= ~BE_FLAGS_MCAST_PROMISC;
>> Why not just clear it without prior check?
> Yes, can be done. But, what is wrong with clearing the flag after the check ?
More code, and not very justified, IMHO.
WBR, Sergei
next prev parent reply other threads:[~2014-06-02 10:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 13:36 [PATCH net-next v2 0/6] be2net: patch set Sathya Perla
2014-05-30 13:36 ` [PATCH net-next v2 1/6] be2net: skip multicast promiscuos setting in already set Sathya Perla
2014-05-30 13:51 ` Sergei Shtylyov
2014-06-02 4:44 ` Sathya Perla
2014-06-02 10:51 ` Sergei Shtylyov [this message]
2014-05-30 13:36 ` [PATCH net-next v2 2/6] be2net: fixup TX-rate setting code for Skyhawk-R Sathya Perla
2014-05-30 13:36 ` [PATCH net-next v2 3/6] be2net: support flashing new regions on Skyhawk-R Sathya Perla
2014-05-30 13:36 ` [PATCH net-next v2 4/6] be2net: re-factor MCCQ error status handling code Sathya Perla
2014-05-30 13:36 ` [PATCH net-next v2 5/6] be2net: move async cmd processing to a separate routine Sathya Perla
2014-05-30 13:36 ` [PATCH net-next v2 6/6] be2net: cleanup MCC async event processing code Sathya Perla
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=538C572A.1060008@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=Sathya.Perla@Emulex.Com \
--cc=netdev@vger.kernel.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 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).