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:
 <CH0PR18MB43399A15FB4322C391E79B4ACD302@CH0PR18MB4339.namprd18.prod.outlook.com>
Date: Thu, 5 Dec 2024 10:20:48 +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>,
        "horms@...nel.org" <horms@...nel.org>,
        "andrew+netdev@...n.ch" <andrew+netdev@...n.ch>,
        "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 PATCH] octeontx2-af: Fix installation of PF
 multicast rules



>-----Original Message-----
>From: Paolo Abeni <pabeni@...hat.com>
>Sent: Tuesday, December 3, 2024 3:11 PM
>To: Geethasowjanya Akula <gakula@...vell.com>; netdev@...r.kernel.org;
>linux-kernel@...r.kernel.org
>Cc: kuba@...nel.org; davem@...emloft.net; horms@...nel.org;
>andrew+netdev@...n.ch; edumazet@...gle.com; Sunil Kovvuri Goutham
><sgoutham@...vell.com>; Subbaraya Sundeep Bhatta
><sbhatta@...vell.com>; Hariprasad Kelam <hkelam@...vell.com>
>Subject: [EXTERNAL] Re: [net PATCH] octeontx2-af: Fix installation of PF
>multicast rules
>
>On 11/27/24 12:48, Geetha sowjanya wrote:
>> Due to target variable is being reassigned in npc_install_flow()
>> function, PF multicast rules are not getting installed.
>> This patch addresses the issue by fixing the "IF" condition checks
>> when rules are installed by AF.
>>
>> Fixes: 6c40ca957fe5 ("octeontx2-pf: Adds TC offload support").
>> Signed-off-by: Geetha sowjanya <gakula@...vell.com>
>> ---
>>  drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> 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 da69e454662a..8a2444a8b7d3 100644
>> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
>> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
>> @@ -1457,14 +1457,14 @@ int rvu_mbox_handler_npc_install_flow(struct
>rvu *rvu,
>>  		target = req->vf;
>>
>>  	/* PF installing for its VF */
>> -	if (!from_vf && req->vf && !from_rep_dev) {
>> +	else if (!from_vf && req->vf && !from_rep_dev) {
>
>This IMHO makes the code quite unreadable and error-prone, as the else
>branches are quite separate from the 'if' statement and easy to miss.
>
>It also breaks the kernel style, as you must apply the curly brackets on all the
>branches, if one of them is using them.
>
>Please restructure the code a bit:
Ok will restructure in next version.

Thanks,
Geetha.
>
>	if (!req->hdr.pcifunc) {
>		/* AF installing for a PF/VF */
>		target = req->vf;
>	} else if (!from_vf && req->vf && !from_rep_dev) {
>		/* PF installing for its VF */
>		...
>
>Thanks,
>
>Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ