From: Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Parthiban.Veerasooran@microchip.com"
<Parthiban.Veerasooran@microchip.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"horms@kernel.org" <horms@kernel.org>,
"saeedm@nvidia.com" <saeedm@nvidia.com>,
"anthony.l.nguyen@intel.com" <anthony.l.nguyen@intel.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"corbet@lwn.net" <corbet@lwn.net>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"Horatiu.Vultur@microchip.com" <Horatiu.Vultur@microchip.com>,
"ruanjinjie@huawei.com" <ruanjinjie@huawei.com>,
"Steen.Hegelund@microchip.com" <Steen.Hegelund@microchip.com>,
"vladimir.oltean@nxp.com" <vladimir.oltean@nxp.com>,
"UNGLinuxDriver@microchip.com" <UNGLinuxDriver@microchip.com>,
"Thorsten.Kummermehr@microchip.com"
<Thorsten.Kummermehr@microchip.com>,
Piergiorgio Beruto <Pier.Beruto@onsemi.com>,
"Nicolas.Ferre@microchip.com" <Nicolas.Ferre@microchip.com>,
"benjamin.bigler@bernformulastudent.ch"
<benjamin.bigler@bernformulastudent.ch>
Subject: RE: [PATCH net-next v3 08/12] net: ethernet: oa_tc6: implement transmit path to transfer tx ethernet frames
Date: Fri, 22 Mar 2024 18:31:05 +0000 [thread overview]
Message-ID: <BYAPR02MB5958165A052E6EA11C353E6883312@BYAPR02MB5958.namprd02.prod.outlook.com> (raw)
In-Reply-To: <f9ded7f6-7f7d-4564-8b06-e73e603ef927@lunn.ch>
> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: Thursday, March 21, 2024 12:42 PM
> To: Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com>
> Cc: Parthiban.Veerasooran@microchip.com; davem@davemloft.net;
> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> horms@kernel.org; saeedm@nvidia.com; anthony.l.nguyen@intel.com;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; corbet@lwn.net;
> linux-doc@vger.kernel.org; robh+dt@kernel.org;
> krzysztof.kozlowski+dt@linaro.org; conor+dt@kernel.org;
> devicetree@vger.kernel.org; Horatiu.Vultur@microchip.com;
> ruanjinjie@huawei.com; Steen.Hegelund@microchip.com;
> vladimir.oltean@nxp.com; UNGLinuxDriver@microchip.com;
> Thorsten.Kummermehr@microchip.com; Piergiorgio Beruto
> <Pier.Beruto@onsemi.com>; Nicolas.Ferre@microchip.com;
> benjamin.bigler@bernformulastudent.ch
> Subject: Re: [PATCH net-next v3 08/12] net: ethernet: oa_tc6:
> implement transmit path to transfer tx ethernet frames
>
> [External Email]: This email arrived from an external source - Please
> exercise caution when opening any attachments or clicking on links.
>
> > > > This second part is clearly an optimisation. If you have lots of
> > > > full MTU packets, 1514 bytes, they take around 24 chunks. Having
> > > > the last chunk only 1/2 full does not waste too much bandwidth.
> > > > But if you are carrying lots of small packets, say voice, 130
> > > > bytes, the wasted bandwidth starts to add up. But is there a use
> > > > case for 10Mbps of small packets? I doubt it.
> > > Yes, for sure there is a possibility to get into this scenario and
> > > the protocol also supports that. But as proposed by you below, let's
> > > implement it as part of optimization later.
> > > >
> > > > So if you don't have the ability to combine two packets into one
> > > > chunk, i would do that later. Lets get the basics merged first, it
> > > > can be optimised later.
> > > Yes, I agree with this proposal to get the basic version merged first.
> >
> > While latency is important, so is using the available bandwidth
> > efficiently. Here is a suggestion. We know that the tx credit
> > available basically tells us, how many chunks could be transmitted
> without overflow. Instead of stopping the netif queue based on number
> of skbs queued, why not stop the queue based on number of bytes
> accumulated? Basically, at any given point of time, we enqueue the
> tx_skb_q until we are have enough bytes to cross the threshold of (tc6-
> >tc_credit * OA_TC6_CHUNK_PAYLOAD_SIZE).
> > This way, during the next transmit, we could utilize the whole available
> credits. Bandwidth utilization between bigger frames and smaller
> frames would be not be vastly different.
>
> Please configure your email client to wrap emails at around 70
> characters.
>
> tc_credit is 5 bits. So it is a maximum of 32.
>
> A 1514 frame takes around 24 chunks. So you only need two full size
> frames to consume all your possible credit.
>
> If you happen to have smaller voice packets, say 130 bytes, you need
> three chunks to send it. So you might want to have 10 such packets on
> hand in order to make use of all your credit. But if you have 10 voice
> packets to send in a burst, your voice quality is going to be bad, they
> should be 10ms to 20ms apart, not in a burst...
>
> I don't like the original idea of having lots of packets in a transmit queue.
> But having 1/2 dozen should not be an issue.
>
> In general, we prefer things to be simple. We can then optimise later,
> and use benchmarks to show the optimisations really do bring a benefit
> to justify the added complexity.
True. I should get some performance numbers to see where we are
with the current code. That would be time to look at the improvement.
>
> Andrew
next prev parent reply other threads:[~2024-03-22 18:31 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 8:50 [PATCH net-next v3 00/12] Add support for OPEN Alliance 10BASE-T1x MACPHY Serial Interface Parthiban Veerasooran
2024-03-06 8:50 ` [PATCH net-next v3 01/12] Documentation: networking: add OPEN Alliance 10BASE-T1x MAC-PHY serial interface Parthiban Veerasooran
2024-03-06 13:23 ` Andrew Lunn
2024-03-07 6:29 ` Parthiban.Veerasooran
2024-03-06 8:50 ` [PATCH net-next v3 02/12] net: ethernet: oa_tc6: implement register write operation Parthiban Veerasooran
2024-03-06 13:40 ` Andrew Lunn
2024-03-07 6:46 ` Parthiban.Veerasooran
2024-03-06 8:50 ` [PATCH net-next v3 03/12] net: ethernet: oa_tc6: implement register read operation Parthiban Veerasooran
2024-03-07 0:19 ` Andrew Lunn
2024-03-07 7:04 ` Parthiban.Veerasooran
2024-03-07 13:22 ` Andrew Lunn
2024-03-08 7:12 ` Parthiban.Veerasooran
2024-03-06 8:50 ` [PATCH net-next v3 04/12] net: ethernet: oa_tc6: implement software reset Parthiban Veerasooran
2024-03-07 0:35 ` Andrew Lunn
2024-03-07 7:39 ` Parthiban.Veerasooran
2024-03-07 13:24 ` Andrew Lunn
2024-03-08 8:25 ` Parthiban.Veerasooran
2024-03-06 8:50 ` [PATCH net-next v3 05/12] net: ethernet: oa_tc6: implement error interrupts unmasking Parthiban Veerasooran
2024-03-07 0:43 ` Andrew Lunn
2024-03-07 8:28 ` Parthiban.Veerasooran
2024-03-06 8:50 ` [PATCH net-next v3 06/12] net: ethernet: oa_tc6: implement internal PHY initialization Parthiban Veerasooran
2024-03-07 1:13 ` Andrew Lunn
2024-03-07 14:41 ` Parthiban.Veerasooran
2024-03-07 16:36 ` Andrew Lunn
2024-03-08 12:05 ` Parthiban.Veerasooran
2024-03-08 13:33 ` Andrew Lunn
2024-03-18 11:01 ` Parthiban.Veerasooran
2024-04-12 10:43 ` Parthiban.Veerasooran
2024-04-15 13:15 ` Andrew Lunn
2024-04-16 11:02 ` Parthiban.Veerasooran
2024-04-16 18:18 ` Andrew Lunn
2024-04-17 8:55 ` Parthiban.Veerasooran
2024-03-21 18:49 ` Selvamani Rajagopal
2024-03-22 5:50 ` Parthiban.Veerasooran
2024-03-06 8:50 ` [PATCH net-next v3 07/12] net: ethernet: oa_tc6: enable open alliance tc6 data communication Parthiban Veerasooran
2024-03-06 8:50 ` [PATCH net-next v3 08/12] net: ethernet: oa_tc6: implement transmit path to transfer tx ethernet frames Parthiban Veerasooran
2024-03-07 17:08 ` Andrew Lunn
2024-03-19 12:54 ` Parthiban.Veerasooran
2024-03-19 13:19 ` Andrew Lunn
2024-03-20 10:43 ` Parthiban.Veerasooran
2024-03-21 19:04 ` Selvamani Rajagopal
2024-03-21 19:42 ` Andrew Lunn
2024-03-22 18:31 ` Selvamani Rajagopal [this message]
2024-03-06 8:50 ` [PATCH net-next v3 09/12] net: ethernet: oa_tc6: implement receive path to receive rx " Parthiban Veerasooran
2024-03-08 0:14 ` Andrew Lunn
2024-03-19 12:54 ` Parthiban.Veerasooran
2024-03-19 13:20 ` Andrew Lunn
2024-03-20 5:55 ` Parthiban.Veerasooran
2024-03-06 8:50 ` [PATCH net-next v3 10/12] net: ethernet: oa_tc6: implement mac-phy interrupt Parthiban Veerasooran
2024-03-06 23:42 ` Woojung.Huh
2024-03-07 10:16 ` Parthiban.Veerasooran
2024-03-06 8:50 ` [PATCH net-next v3 11/12] microchip: lan865x: add driver support for Microchip's LAN865X MAC-PHY Parthiban Veerasooran
2024-03-06 23:44 ` Woojung.Huh
2024-03-07 9:13 ` Parthiban.Veerasooran
2024-03-06 8:50 ` [PATCH net-next v3 12/12] dt-bindings: net: add Microchip's LAN865X 10BASE-T1S MACPHY Parthiban Veerasooran
2024-03-06 18:16 ` Conor Dooley
2024-03-06 18:48 ` Andrew Lunn
2024-03-06 19:01 ` Conor Dooley
2024-03-20 8:40 ` Parthiban.Veerasooran
2024-03-20 9:53 ` Krzysztof Kozlowski
2024-03-21 8:38 ` Parthiban.Veerasooran
2024-03-21 8:40 ` Krzysztof Kozlowski
2024-03-21 12:00 ` Parthiban.Veerasooran
2024-03-21 15:34 ` Conor Dooley
2024-03-22 6:25 ` Parthiban.Veerasooran
2024-03-22 7:03 ` Krzysztof Kozlowski
2024-03-22 8:28 ` Parthiban.Veerasooran
2024-03-23 10:24 ` Krzysztof Kozlowski
2024-03-25 7:10 ` Parthiban.Veerasooran
2024-03-25 7:10 ` Parthiban.Veerasooran
2024-03-22 18:08 ` Conor Dooley
2024-03-25 7:12 ` Parthiban.Veerasooran
2024-03-20 8:40 ` Parthiban.Veerasooran
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=BYAPR02MB5958165A052E6EA11C353E6883312@BYAPR02MB5958.namprd02.prod.outlook.com \
--to=selvamani.rajagopal@onsemi.com \
--cc=Horatiu.Vultur@microchip.com \
--cc=Nicolas.Ferre@microchip.com \
--cc=Parthiban.Veerasooran@microchip.com \
--cc=Pier.Beruto@onsemi.com \
--cc=Steen.Hegelund@microchip.com \
--cc=Thorsten.Kummermehr@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=benjamin.bigler@bernformulastudent.ch \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=ruanjinjie@huawei.com \
--cc=saeedm@nvidia.com \
--cc=vladimir.oltean@nxp.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).