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] [thread-next>] [day] [month] [year] [list]
Date: Wed, 19 Jun 2024 12:16:02 +0000
From: Geethasowjanya Akula <gakula@...vell.com>
To: Simon Horman <horms@...nel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "davem@...emloft.net"
	<davem@...emloft.net>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "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 v5 05/10] octeontx2-af: Add packet
 path between representor and VF



From: Simon Horman <horms@...nel.org> 
Sent: Tuesday, June 18, 2024 2:09 PM
To: Geethasowjanya Akula <gakula@...vell.com>
Cc: netdev@...r.kernel.org; linux-kernel@...r.kernel.org; kuba@...nel.org; davem@...emloft.net; pabeni@...hat.com; 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 v5 05/10] octeontx2-af: Add packet path between representor and VF

>> Current HW, do not support in-built switch which will forward pkts
>> between representee and representor. When representor is put under
>> a bridge and pkts needs to be sent to representee, then pkts from
>> representor are sent on a HW internal loopback channel, which again
>> will be punted to ingress pkt parser. Now the rules that this patch
>> installs are the MCAM filters/rules which will match against these
>> pkts and forward them to representee.
>> The rules that this patch installs are for basic
>> representor <=> representee path similar to Tun/TAP between VM and
>> Host.
>> 
>> Signed-off-by: Geetha sowjanya <mailto:gakula@...vell.com>

...

>> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c

...

>> +void rvu_rep_update_rules(struct rvu *rvu, u16 pcifunc, bool ena)
>> +{
>> +	struct rvu_switch *rswitch = &rvu->rswitch;
>> +	struct npc_mcam *mcam = &rvu->hw->mcam;
>> +	u32 max = rswitch->used_entries;
>> +	int blkaddr;
>> +	u16 entry;
>> +
>> +	if (!rswitch->used_entries)
>> +		return;
>> +
>> +	blkaddr = rvu_get_blkaddr(rvu, BLKTYPE_NPC, 0);
>> +
>> +	if (blkaddr < 0)
>> +		return;
>> +
>> +	rvu_switch_enable_lbk_link(rvu, pcifunc, ena);
>> +	mutex_lock(&mcam->lock);
>> +	for (entry = 0; entry < max; entry++) {
>> +		if (rswitch->entry2pcifunc[entry] == pcifunc)
>> +			npc_enable_mcam_entry(rvu, mcam, blkaddr, entry, ena);
>> +	}
>> +	mutex_unlock(&mcam->lock);
>> +}
>> +
>> +int rvu_rep_pf_init(struct rvu *rvu)
>> +{
>> +	u16 pcifunc = rvu->rep_pcifunc;
>> +	struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc);

>nit: It would be nice to maintain reverse xmas tree order - longest line to
>    shortest - for local variable declarations in this file.
>
>     Here, I think that could be (completely untested!):
>
>	u16 pcifunc = rvu->rep_pcifunc;
>	struct rvu_pfvf *pfvf;
>
>	pfvf = rvu_get_pfvf(rvu, pcifunc);
>
Will fix it in the next version. 

>     Edward Cree's tool is useful here:
>     https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ecree->2Dsolarflare_xmastree&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=UiEt_nUeYFctu7JVLXVlXDhTmq_EAfooaZEYInfGuEQ&m=3t8aEWBx0->EE40JxcymujYfnr4381VZ2xrwKywPJdCxiVECpoRedKizncrz_KDOP&s=ekEqLe3i6dMVqmg0TQkbqv8R_C1kKewis3DwghvQ-ow&e=
>
>> +
>> +	set_bit(NIXLF_INITIALIZED, &pfvf->flags);
>> +	rvu_switch_enable_lbk_link(rvu, pcifunc, true);
>> +	rvu_rep_rx_vlan_cfg(rvu, pcifunc);
>> +	return 0;
>> +}

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ