lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <DM6PR18MB3212928A5167ECEC681969F7A2E90@DM6PR18MB3212.namprd18.prod.outlook.com>
Date:   Tue, 10 Nov 2020 16:58:34 +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 09/13] octeontx2-pf: Implement ingress/egress
 VLAN offload

Hi Saeed,

Thanks for the review!

> -----Original Message-----
> From: Saeed Mahameed <saeed@...nel.org>
> Sent: Saturday, November 7, 2020 4:03 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 09/13] octeontx2-pf: Implement
> ingress/egress VLAN offload
> 
> On Thu, 2020-11-05 at 14:58 +0530, Naveen Mamindlapalli wrote:
> > From: Hariprasad Kelam <hkelam@...vell.com>
> >
> > This patch implements egress VLAN offload by appending NIX_SEND_EXT_S
> > header to NIX_SEND_HDR_S. The VLAN TCI information is specified in the
> > NIX_SEND_EXT_S. The VLAN offload in the ingress path is implemented by
> > configuring the NIX_RX_VTAG_ACTION_S to strip and capture the outer
> > vlan fields. The NIX PF allocates one MCAM entry for Rx VLAN offload.
> >
> > Signed-off-by: Hariprasad Kelam <hkelam@...vell.com>
> > Signed-off-by: Sunil Goutham <sgoutham@...vell.com>
> > Signed-off-by: Naveen Mamindlapalli <naveenm@...vell.com>
> > ---
> 
> ..
> 
> > @@ -56,6 +58,8 @@ void otx2_mcam_flow_del(struct otx2_nic *pf)  int
> > otx2_alloc_mcam_entries(struct otx2_nic *pfvf)  {
> >  	struct otx2_flow_config *flow_cfg = pfvf->flow_cfg;
> > +	netdev_features_t wanted = NETIF_F_HW_VLAN_STAG_RX |
> > +				   NETIF_F_HW_VLAN_CTAG_RX;
> >  	struct npc_mcam_alloc_entry_req *req;
> >  	struct npc_mcam_alloc_entry_rsp *rsp;
> >  	int i;
> > @@ -88,15 +92,22 @@ int otx2_alloc_mcam_entries(struct otx2_nic
> > *pfvf)
> >  	if (rsp->count != req->count) {
> >  		netdev_info(pfvf->netdev, "number of rules truncated to %d\n",
> >  			    rsp->count);
> > +		netdev_info(pfvf->netdev,
> > +			    "Disabling RX VLAN offload due to non-
> > availability of MCAM space\n");
> >  		/* support only ntuples here */
> >  		flow_cfg->ntuple_max_flows = rsp->count;
> >  		flow_cfg->ntuple_offset = 0;
> >  		pfvf->netdev->priv_flags &= ~IFF_UNICAST_FLT;
> >  		pfvf->flags &= ~OTX2_FLAG_UCAST_FLTR_SUPPORT;
> > +		pfvf->flags &= ~OTX2_FLAG_RX_VLAN_SUPPORT;
> > +		pfvf->netdev->features &= ~wanted;
> > +		pfvf->netdev->hw_features &= ~wanted;
> 
> Drivers are not allowed to change own features dynamically.
> 
> please see:
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__www.kernel.org_doc_html_latest_networking_netdev-
> 2Dfeatures.html&d=DwICaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=TwreqwV6mQ8K
> 9wIpqwFO8yjikO_w1jUOe2MzChg4Rmg&m=4bUL936Kl_JmPhgCgMxvCELhoEQ_
> WM_OitdlqyTRlHU&s=Lgcm811tFrMvuw-
> JvTq4BPl76Nqv_HW6CigvKR8LgGw&e=
> 
> Features dependencies must be resolved via:
> ndo_fix_features() and netdev_update_features();

Okay, will fix in v3.
> 
> 
> > +static netdev_features_t
> > +otx2_features_check(struct sk_buff *skb, struct net_device *dev,
> > +		    netdev_features_t features)
> > +{
> > +	return features;
> > +}
> > +
> 
> what is the point of no-op features_check ?
> 
Cross checked this and I don’t see any need for this check. I will remove in v3.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ