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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: 
 <CH0PR18MB43390D633115E7843BB781AACD052@CH0PR18MB4339.namprd18.prod.outlook.com>
Date: Thu, 11 Apr 2024 12:45:33 +0000
From: Geethasowjanya Akula <gakula@...vell.com>
To: Paolo Abeni <pabeni@...hat.com>,
        "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>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        Sunil
 Kovvuri Goutham <sgoutham@...vell.com>,
        Subbaraya Sundeep Bhatta
	<sbhatta@...vell.com>,
        Hariprasad Kelam <hkelam@...vell.com>
Subject: RE: [EXTERNAL] Re: [net-next PATCH] octeontx2-pf: Add support for
 offload tc with skbedit mark action

Hi Paolo,

> -----Original Message-----
> From: Paolo Abeni <pabeni@...hat.com>
> Sent: Tuesday, April 9, 2024 5:37 PM
> To: Geethasowjanya Akula <gakula@...vell.com>; netdev@...r.kernel.org;
> linux-kernel@...r.kernel.org
> Cc: kuba@...nel.org; davem@...emloft.net; edumazet@...gle.com; Sunil
> Kovvuri Goutham <sgoutham@...vell.com>; Subbaraya Sundeep Bhatta
> <sbhatta@...vell.com>; Hariprasad Kelam <hkelam@...vell.com>
> Subject: [EXTERNAL] Re: [net-next PATCH] octeontx2-pf: Add support for
> offload tc with skbedit mark action
> ----------------------------------------------------------------------
> On Mon, 2024-04-08 at 12:56 +0530, Geetha sowjanya wrote:
> > Support offloading of skbedit mark action.
> >
> > For example, to mark with 0x0008, with dest ip 60.60.60.2 on eth2
> > interface:
> >
> >  # tc qdisc add dev eth2 ingress
> >  # tc filter add dev eth2 ingress protocol ip flower \
> >       dst_ip 60.60.60.2 action skbedit mark 0x0008 skip_sw
> >
> > Signed-off-by: Geetha sowjanya <gakula@...vell.com>
> > ---
> >  .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c  |  2 ++
> >  .../ethernet/marvell/octeontx2/nic/otx2_common.h    |  2 ++
> >  .../net/ethernet/marvell/octeontx2/nic/otx2_tc.c    | 13 +++++++++++++
> >  .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.c  |  3 +++
> > .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.h  |  3 +++
> >  5 files changed, 23 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
> > b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
> > index c75669c8fde7..6188921e9a20 100644
> > --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
> > +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
> > @@ -1183,6 +1183,8 @@ static int npc_update_rx_entry(struct rvu *rvu,
> struct rvu_pfvf *pfvf,
> >  			action.pf_func = target;
> >  			action.op = NIX_RX_ACTIONOP_UCAST;
> >  		}
> > +		if (req->match_id)
> > +			action.match_id = req->match_id;
> >  	}
> >
> >  	entry->action = *(u64 *)&action;
> > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
> > b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
> > index 06910307085e..815ae13c371c 100644
> > --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
> > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
> > @@ -363,6 +363,7 @@ struct otx2_flow_config {
> >  	struct list_head	flow_list;
> >  	u32			dmacflt_max_flows;
> >  	u16                     max_flows;
> > +	u16			mark_flows;
> 
> Since the above fields is used as (reference) counter for the
> OTX2_FLAG_TC_MARK_ENABLED bit, what about using a refcount_t, so you
> gain sanity checks for free?
> 
Ok, will submit v2 with suggested change.

Thank you.
Geetha.

> Thanks!
> 
> Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ