[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SJ0PR18MB52161CD6B76022B762944F4BDB799@SJ0PR18MB5216.namprd18.prod.outlook.com>
Date: Tue, 30 Aug 2022 12:03:48 +0000
From: Suman Ghosh <sumang@...vell.com>
To: Paolo Abeni <pabeni@...hat.com>,
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>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [EXT] Re: [net-next PATCH V5] octeontx2-pf: Add egress PFC
support
>> +int otx2_pfc_txschq_update(struct otx2_nic *pfvf) {
>> + u8 pfc_en = pfvf->pfc_en, pfc_bit_set;
>> + struct mbox *mbox = &pfvf->mbox;
>> + bool if_up = netif_running(pfvf->netdev);
>
>please, respect the reverse x-mas tree in variables declaration.
[Suman] Done
>
>[...]
>> @@ -1853,6 +1880,32 @@ static netdev_tx_t otx2_xmit(struct sk_buff
>*skb, struct net_device *netdev)
>> return NETDEV_TX_OK;
>> }
>>
>> +static u16 otx2_select_queue(struct net_device *netdev, struct
>sk_buff *skb,
>> + struct net_device *sb_dev)
>> +{
>> + struct otx2_nic *pf = netdev_priv(netdev); #ifdef CONFIG_DCB
>> + u8 vlan_prio;
>> +#endif
>> + int txq;
>> +
>> +#ifdef CONFIG_DCB
>> + if (!skb->vlan_present)
>> + goto pick_tx;
>> +
>> + vlan_prio = skb->vlan_tci >> 13;
>> + if ((vlan_prio > pf->hw.tx_queues - 1) ||
>> + !pf->pfc_alloc_status[vlan_prio])
>> + goto pick_tx;
>> +
>> + return vlan_prio;
>> +
>> +pick_tx:
>> +#endif
>> + txq = netdev_pick_tx(netdev, skb, NULL);
>> + return txq;
>
>You can just
> return netdev_pick_tx(netdev, skb, NULL);
>
>and avoid declaring txq.
[Suman] Done
>
>Cheers,
>
>Paolo
Powered by blists - more mailing lists