[<prev] [next>] [day] [month] [year] [list]
Message-ID: <DM6PR18MB3212D8BA359A08B18004EB3BA2E90@DM6PR18MB3212.namprd18.prod.outlook.com>
Date: Tue, 10 Nov 2020 16:53:58 +0000
From: Naveen Mamindlapalli <naveenm@...vell.com>
To: Saeed Mahameed <saeed@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: "kuba@...nel.org" <kuba@...nel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
Sunil Kovvuri Goutham <sgoutham@...vell.com>,
"Linu Cherian" <lcherian@...vell.com>,
Geethasowjanya Akula <gakula@...vell.com>,
Jerin Jacob Kollanukkaran <jerinj@...vell.com>,
Subbaraya Sundeep Bhatta <sbhatta@...vell.com>,
Hariprasad Kelam <hkelam@...vell.com>
Subject: Re: [PATCH v2 net-next 06/13] octeontx2-pf: Add support for unicast
MAC address filtering
Hi Saeed,
Thanks for the review!
> -----Original Message-----
> From: Saeed Mahameed <saeed@...nel.org>
> Sent: Saturday, November 7, 2020 3:46 AM
> To: Naveen Mamindlapalli <naveenm@...vell.com>; netdev@...r.kernel.org;
> linux-kernel@...r.kernel.org
> Cc: kuba@...nel.org; davem@...emloft.net; Sunil Kovvuri Goutham
> <sgoutham@...vell.com>; Linu Cherian <lcherian@...vell.com>;
> Geethasowjanya Akula <gakula@...vell.com>; Jerin Jacob Kollanukkaran
> <jerinj@...vell.com>; Subbaraya Sundeep Bhatta <sbhatta@...vell.com>;
> Hariprasad Kelam <hkelam@...vell.com>
> Subject: Re: [PATCH v2 net-next 06/13] octeontx2-pf: Add support for
> unicast MAC address filtering
>
> On Thu, 2020-11-05 at 14:58 +0530, Naveen Mamindlapalli wrote:
> > From: Hariprasad Kelam <hkelam@...vell.com>
> >
> > Add unicast MAC address filtering support using install flow message.
> > Total of 8 MCAM entries are allocated for adding unicast mac filtering
> > rules. If the MCAM allocation fails, the unicast filtering support
> > will not be advertised.
> >
> > Signed-off-by: Hariprasad Kelam <hkelam@...vell.com>
> > Signed-off-by: Sunil Goutham <sgoutham@...vell.com>
> > Signed-off-by: Naveen Mamindlapalli <naveenm@...vell.com>
> > ---
> > .../ethernet/marvell/octeontx2/nic/otx2_common.h | 10 ++
> > .../ethernet/marvell/octeontx2/nic/otx2_flows.c | 138
> > +++++++++++++++++++--
> > .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 5 +
> > 3 files changed, 146 insertions(+), 7 deletions(-)
> >
>
> > +int otx2_add_macfilter(struct net_device *netdev, const u8 *mac) {
> > + struct otx2_nic *pf = netdev_priv(netdev);
> > + int err;
> > +
> > + err = otx2_do_add_macfilter(pf, mac);
> > + if (err) {
> > + netdev->flags |= IFF_PROMISC;
>
> I don't think you are allowed to change netdev->flags inside the driver like this,
> this can easily conflict with other users of this netdev; netdev promiscuity is
> managed by the stack via refcount Please see:
> __dev_set_promiscuity() and dev_set_promiscuity()
>
> And you will need to notify stack and userspace of flags changes.
Understood, will fix in v3.
Powered by blists - more mailing lists