[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SJ0PR18MB52165D5FA51E433CAD0E8CBBDB739@SJ0PR18MB5216.namprd18.prod.outlook.com>
Date: Wed, 24 Aug 2022 05:57:00 +0000
From: Suman Ghosh <sumang@...vell.com>
To: Andrew Lunn <andrew@...n.ch>
CC: Sunil Kovvuri Goutham <sgoutham@...vell.com>,
Linu Cherian <lcherian@...vell.com>,
Geethasowjanya Akula <gakula@...vell.com>,
Jerin Jacob Kollanukkaran <jerinj@...vell.com>,
Hariprasad Kelam <hkelam@...vell.com>,
Subbaraya Sundeep Bhatta <sbhatta@...vell.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [EXT] Re: [PATCH] octeontx2-pf: Add egress PFC support
Please see inline
Regards,
Suman
>-----Original Message-----
>From: Andrew Lunn <andrew@...n.ch>
>Sent: Tuesday, August 23, 2022 9:21 PM
>To: Suman Ghosh <sumang@...vell.com>
>Cc: Sunil Kovvuri Goutham <sgoutham@...vell.com>; Linu Cherian
><lcherian@...vell.com>; Geethasowjanya Akula <gakula@...vell.com>; Jerin
>Jacob Kollanukkaran <jerinj@...vell.com>; Hariprasad Kelam
><hkelam@...vell.com>; Subbaraya Sundeep Bhatta <sbhatta@...vell.com>;
>davem@...emloft.net; edumazet@...gle.com; kuba@...nel.org;
>pabeni@...hat.com; netdev@...r.kernel.org; linux-kernel@...r.kernel.org
>Subject: [EXT] Re: [PATCH] octeontx2-pf: Add egress PFC support
>
>External Email
>
>----------------------------------------------------------------------
>> -int otx2_txschq_config(struct otx2_nic *pfvf, int lvl)
>> +int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool
>> +txschq_for_pfc)
>> {
>> struct otx2_hw *hw = &pfvf->hw;
>> struct nix_txschq_config *req;
>> @@ -602,7 +602,13 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int
>lvl)
>> req->lvl = lvl;
>> req->num_regs = 1;
>>
>> - schq = hw->txschq_list[lvl][0];
>> +#ifdef CONFIG_DCB
>> + if (txschq_for_pfc)
>> + schq = pfvf->pfc_schq_list[lvl][prio];
>> + else
>> +#endif
>
>Please could you try to remove as many of these #ifdef CONFIG_DCB as
>possible. It makes build testing less efficient at finding build
>problems. Can you do:
>
>> + if (IS_ENABLED(CONFIG_DCB) && txschq_for_pfc)
>> + schq = pfvf->pfc_schq_list[lvl][prio];
>
[Suman] I will restructured the code. But we cannot use pfvf->pfc_schq_list outside #ifdef CONFIG_DCB as these are defined under the
macro in otx2_common.h
>> +#ifdef CONFIG_DCB
>> +int otx2_pfc_txschq_config(struct otx2_nic *pfvf) {
>> + u8 pfc_en, pfc_bit_set;
>> + int prio, lvl, err;
>> +
>> + pfc_en = pfvf->pfc_en;
>> + for (prio = 0; prio < NIX_PF_PFC_PRIO_MAX; prio++) {
>> + pfc_bit_set = pfc_en & (1 << prio);
>> +
>
>Maybe put all of this into a file of its own, and provide stubs for when
>it is not enabled?
[Suman] I will move these APIs to otx2_dcbnl.c. This file will be compiled when CONFIG_DCB is enabled.
>
> Andrew
Powered by blists - more mailing lists