From: Biao Huang <biao.huang@mediatek.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: David Miller <davem@davemloft.net>,
Rob Herring <robh+dt@kernel.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Fabien Parent <fparent@baylibre.com>,
Felix Fietkau <nbd@nbd.name>, John Crispin <john@phrozen.org>,
Sean Wang <sean.wang@mediatek.com>,
Mark Lee <Mark-MC.Lee@mediatek.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
<netdev@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>,
Yinghua Pan <ot_yinghua.pan@mediatek.com>,
<srv_heupstream@mediatek.com>,
Macpaul Lin <macpaul.lin@mediatek.com>
Subject: Re: [PATCH net-next v2 9/9] net: ethernet: mtk-star-emac: separate tx/rx handling with two NAPIs
Date: Tue, 15 Mar 2022 08:59:35 +0800 [thread overview]
Message-ID: <b681a7e0abc76e196c6bc3afa14402af23bba454.camel@mediatek.com> (raw)
In-Reply-To: <20220314085705.32033308@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Dear Jakub,
Thanks for your comments~
On Mon, 2022-03-14 at 08:57 -0700, Jakub Kicinski wrote:
> On Mon, 14 Mar 2022 15:01:23 +0800 Biao Huang wrote:
> > > Drivers are expected to stop their queues at the end of xmit
> > > routine
> > > if
> > > the ring can't accommodate another frame. It's more efficient to
> > > stop
> > > the queues early than have to put skbs already dequeued from the
> > > qdisc
> > > layer back into the qdiscs.
> >
> > Yes, if descriptors ring is full, it's meaningful to stop the
> > queue
> > at the end of xmit;
> > But driver seems hard to know how many descriptors the next skb
> > will
> > request, e.g. 3 descriptors are available for next round send, but
> > the
> > next skb may need 4 descriptors, in this case, we still need judge
> > whether descriptors are enough for skb transmission, then decide
> > stop
> > the queue or not, at the beginning of xmit routine.
> >
> > Maybe we should judge ring is full or not at the beginning and the
> > end
> > of xmit routine(seems a little redundancy).
>
> Assume the worst case scenario. You set the default ring size to 512,
> skb can have at most MAX_SKB_FRAGS fragments (usually 17) so the max
> number of descriptors should not be very high, hard to pre-compute,
> or problematic compared to the total ring size.
Yes, we'll check the available descriptor number at the end of xmit
routine, and ensure it will larger than (MAX_SKB_FRAGS + 1) in next
send. (refer to stmmac_main.c)
Regards!
prev parent reply other threads:[~2022-03-15 0:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-27 1:58 [PATCH net-next v2 0/9] add more features for mtk-star-emac Biao Huang
2022-01-27 1:58 ` [PATCH net-next v2 1/9] net: ethernet: mtk-star-emac: store bit_clk_div in compat structure Biao Huang
2022-01-27 2:23 ` Macpaul Lin
2022-01-27 1:58 ` [PATCH net-next v2 2/9] net: ethernet: mtk-star-emac: modify IRQ trigger flags Biao Huang
2022-01-27 1:58 ` [PATCH net-next v2 3/9] net: ethernet: mtk-star-emac: add support for MT8365 SoC Biao Huang
2022-01-27 2:22 ` Macpaul Lin
2022-01-27 1:58 ` [PATCH net-next v2 4/9] dt-bindings: net: mtk-star-emac: add support for MT8365 Biao Huang
2022-02-09 3:35 ` Rob Herring
2022-01-27 1:58 ` [PATCH net-next v2 5/9] net: ethernet: mtk-star-emac: add clock pad selection for RMII Biao Huang
2022-01-27 2:26 ` Macpaul Lin
2022-01-27 1:58 ` [PATCH net-next v2 6/9] net: ethernet: mtk-star-emac: add timing adjustment support Biao Huang
2022-01-27 2:20 ` Macpaul Lin
2022-01-27 1:58 ` [PATCH net-next v2 7/9] dt-bindings: net: mtk-star-emac: add description for new properties Biao Huang
2022-02-09 3:36 ` Rob Herring
2022-01-27 1:58 ` [PATCH net-next v2 8/9] net: ethernet: mtk-star-emac: add support for MII interface Biao Huang
2022-01-27 2:17 ` Macpaul Lin
2022-01-27 1:58 ` [PATCH net-next v2 9/9] net: ethernet: mtk-star-emac: separate tx/rx handling with two NAPIs Biao Huang
2022-01-28 3:43 ` Jakub Kicinski
2022-01-28 7:05 ` Biao Huang
2022-01-28 15:44 ` Jakub Kicinski
2022-03-14 7:01 ` Biao Huang
2022-03-14 15:57 ` Jakub Kicinski
2022-03-15 0:59 ` Biao Huang [this message]
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=b681a7e0abc76e196c6bc3afa14402af23bba454.camel@mediatek.com \
--to=biao.huang@mediatek.com \
--cc=Mark-MC.Lee@mediatek.com \
--cc=brgl@bgdev.pl \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=fparent@baylibre.com \
--cc=john@phrozen.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=macpaul.lin@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=ot_yinghua.pan@mediatek.com \
--cc=robh+dt@kernel.org \
--cc=sean.wang@mediatek.com \
--cc=srv_heupstream@mediatek.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
all inboxes | Powered by JetHome®