[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CF9D1877D81D214CB0CA0669EFAE020C56C3651C@CMEXMB1.ad.emulex.com>
Date: Mon, 2 Jun 2014 04:44:48 +0000
From: Sathya Perla <Sathya.Perla@...lex.Com>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH net-next v2 1/6] be2net: skip multicast promiscuos
setting in already set
> -----Original Message-----
> From: Sergei Shtylyov [mailto:sergei.shtylyov@...entembedded.com]
>
> Hello.
>
> On 05/30/2014 05:36 PM, Sathya Perla wrote:
>
> > From: Kalesh AP <kalesh.purayil@...lex.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@...lex.com>
> > Signed-off-by: Sathya Perla <sathya.perla@...lex.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 ?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists