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-next>] [day] [month] [year] [list]
Message-ID:
 <CO1PR18MB4666941A2B96DF6FC59E7119A13C2@CO1PR18MB4666.namprd18.prod.outlook.com>
Date: Mon, 9 Dec 2024 09:09:35 +0000
From: Subbaraya Sundeep Bhatta <sbhatta@...vell.com>
To: Jakub Kicinski <kuba@...nel.org>,
        Sai Krishna Gajula
	<saikrishnag@...vell.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com"
	<edumazet@...gle.com>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Sunil Kovvuri
 Goutham <sgoutham@...vell.com>,
        Geethasowjanya Akula <gakula@...vell.com>,
        Linu Cherian <lcherian@...vell.com>, Jerin Jacob <jerinj@...vell.com>,
        Hariprasad Kelam <hkelam@...vell.com>,
        "andrew+netdev@...n.ch"
	<andrew+netdev@...n.ch>,
        "kalesh-anakkur.purayil@...adcom.com"
	<kalesh-anakkur.purayil@...adcom.com>
Subject: RE: [EXTERNAL] Re: [net-next PATCH v5 1/6] octeontx2: Set appropriate
 PF, VF masks and shifts based on silicon


Hi Jakub,

>From: Jakub Kicinski <kuba@...nel.org>
>Sent: Sunday, December 8, 2024 8:08 AM
>To: Sai Krishna Gajula <saikrishnag@...vell.com>
>Cc: davem@...emloft.net; edumazet@...gle.com; pabeni@...hat.com;
>netdev@...r.kernel.org; linux-kernel@...r.kernel.org; Sunil Kovvuri Goutham
><sgoutham@...vell.com>; Geethasowjanya Akula <gakula@...vell.com>;
>Linu Cherian <lcherian@...vell.com>; Jerin Jacob <jerinj@...vell.com>;
>Hariprasad Kelam <hkelam@...vell.com>; Subbaraya Sundeep Bhatta
><sbhatta@...vell.com>; andrew+netdev@...n.ch; kalesh-
>anakkur.purayil@...adcom.com
>Subject: Re: [net-next PATCH v5 1/6] octeontx2: Set appropriate PF, VF masks
>and shifts based on silicon
>
>‌
>On Wed, 4 Dec 2024 19:38:16 +0530 Sai Krishna wrote:
>> -#define RVU_PFVF_PF_SHIFT	10
>> -#define RVU_PFVF_PF_MASK	0x3F
>> -#define RVU_PFVF_FUNC_SHIFT	0
>> -#define RVU_PFVF_FUNC_MASK	0x3FF
>> +#define RVU_PFVF_PF_SHIFT	rvu_pcifunc_pf_shift
>> +#define RVU_PFVF_PF_MASK	rvu_pcifunc_pf_mask
>> +#define RVU_PFVF_FUNC_SHIFT	rvu_pcifunc_func_shift
>> +#define RVU_PFVF_FUNC_MASK	rvu_pcifunc_func_mask
>
>Why do you maintain these defines? Looks like an unnecessary
>indirection.
>
>Given these are simple mask and shift values they probably have trivial
>users. Start by adding helpers which perform the conversions using
>those, then you can more easily update constants.
>

There are too many places these masks are used hence added this
indirection.
# grep RVU_PFVF_ drivers/* -inr | wc -l
135

Thanks,
Sundeep

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ