From: Paolo Abeni <pabeni@redhat.com>
To: Suman Ghosh <sumang@marvell.com>,
sgoutham@marvell.com, lcherian@marvell.com, gakula@marvell.com,
jerinj@marvell.com, hkelam@marvell.com, sbhatta@marvell.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
netdev@vger.kernel.org
Subject: Re: [net-next PATCH V5] octeontx2-pf: Add egress PFC support
Date: Tue, 30 Aug 2022 13:18:15 +0200 [thread overview]
Message-ID: <686875c4c9b6d8c2ad17b506f7784a8fb8bf351b.camel@redhat.com> (raw)
In-Reply-To: <20220826075751.2005604-1-sumang@marvell.com>
Hello,
Just a couple of minor nit, see below.
On Fri, 2022-08-26 at 13:27 +0530, Suman Ghosh wrote:
[...]
> +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.
[...]
> @@ -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.
Cheers,
Paolo
next prev parent reply other threads:[~2022-08-30 11:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 7:57 [net-next PATCH V5] octeontx2-pf: Add egress PFC support Suman Ghosh
2022-08-30 11:18 ` Paolo Abeni [this message]
2022-08-30 12:03 ` [EXT] " Suman Ghosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=686875c4c9b6d8c2ad17b506f7784a8fb8bf351b.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=jerinj@marvell.com \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
--cc=sumang@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).