[PATCH 3/3] net: mhi: Increase the default MTU from 16K to 32K

Manivannan Sadhasivam posted 3 patches 2 years, 8 months ago
There is a newer version of this series
[PATCH 3/3] net: mhi: Increase the default MTU from 16K to 32K
Posted by Manivannan Sadhasivam 2 years, 8 months ago
Most of the Qualcomm endpoint devices are supporting 32K MTU for the
UL (Uplink) and DL (Downlink) channels. So let's use the same value
in the MHI NET driver also. This gives almost 2x increase in the throughput
for the UL channel.

Below is the comparision:

iperf on the UL channel with 16K MTU:

[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   353 MBytes   296 Mbits/sec

iperf on the UL channel with 32K MTU:

[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   695 MBytes   583 Mbits/sec

Cc: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 drivers/net/mhi_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c
index 3d322ac4f6a5..eddc2c701da4 100644
--- a/drivers/net/mhi_net.c
+++ b/drivers/net/mhi_net.c
@@ -14,7 +14,7 @@
 
 #define MHI_NET_MIN_MTU		ETH_MIN_MTU
 #define MHI_NET_MAX_MTU		0xffff
-#define MHI_NET_DEFAULT_MTU	0x4000
+#define MHI_NET_DEFAULT_MTU	0x8000
 
 struct mhi_net_stats {
 	u64_stats_t rx_packets;
-- 
2.25.1
Re: [PATCH 3/3] net: mhi: Increase the default MTU from 16K to 32K
Posted by Simon Horman 2 years, 8 months ago
On Tue, Jun 06, 2023 at 06:01:19PM +0530, Manivannan Sadhasivam wrote:
> Most of the Qualcomm endpoint devices are supporting 32K MTU for the
> UL (Uplink) and DL (Downlink) channels. So let's use the same value
> in the MHI NET driver also. This gives almost 2x increase in the throughput
> for the UL channel.
> 
> Below is the comparision:

Hi Manivannan,

as it looks like there will be a v2: comparision -> comparison

...
Re: [PATCH 3/3] net: mhi: Increase the default MTU from 16K to 32K
Posted by Jeffrey Hugo 2 years, 8 months ago
On 6/6/2023 6:31 AM, Manivannan Sadhasivam wrote:
> Most of the Qualcomm endpoint devices are supporting 32K MTU for the
> UL (Uplink) and DL (Downlink) channels. So let's use the same value
> in the MHI NET driver also. This gives almost 2x increase in the throughput
> for the UL channel.
> 
> Below is the comparision:
> 
> iperf on the UL channel with 16K MTU:
> 
> [ ID] Interval       Transfer     Bandwidth
> [  3]  0.0-10.0 sec   353 MBytes   296 Mbits/sec
> 
> iperf on the UL channel with 32K MTU:
> 
> [ ID] Interval       Transfer     Bandwidth
> [  3]  0.0-10.0 sec   695 MBytes   583 Mbits/sec
> 
> Cc: Loic Poulain <loic.poulain@linaro.org>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
>   drivers/net/mhi_net.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c
> index 3d322ac4f6a5..eddc2c701da4 100644
> --- a/drivers/net/mhi_net.c
> +++ b/drivers/net/mhi_net.c
> @@ -14,7 +14,7 @@
>   
>   #define MHI_NET_MIN_MTU		ETH_MIN_MTU
>   #define MHI_NET_MAX_MTU		0xffff
> -#define MHI_NET_DEFAULT_MTU	0x4000
> +#define MHI_NET_DEFAULT_MTU	0x8000

Why not SZ_32K?
Re: [PATCH 3/3] net: mhi: Increase the default MTU from 16K to 32K
Posted by Manivannan Sadhasivam 2 years, 8 months ago
On Tue, Jun 06, 2023 at 07:50:23AM -0600, Jeffrey Hugo wrote:
> On 6/6/2023 6:31 AM, Manivannan Sadhasivam wrote:
> > Most of the Qualcomm endpoint devices are supporting 32K MTU for the
> > UL (Uplink) and DL (Downlink) channels. So let's use the same value
> > in the MHI NET driver also. This gives almost 2x increase in the throughput
> > for the UL channel.
> > 
> > Below is the comparision:
> > 
> > iperf on the UL channel with 16K MTU:
> > 
> > [ ID] Interval       Transfer     Bandwidth
> > [  3]  0.0-10.0 sec   353 MBytes   296 Mbits/sec
> > 
> > iperf on the UL channel with 32K MTU:
> > 
> > [ ID] Interval       Transfer     Bandwidth
> > [  3]  0.0-10.0 sec   695 MBytes   583 Mbits/sec
> > 
> > Cc: Loic Poulain <loic.poulain@linaro.org>
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> >   drivers/net/mhi_net.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c
> > index 3d322ac4f6a5..eddc2c701da4 100644
> > --- a/drivers/net/mhi_net.c
> > +++ b/drivers/net/mhi_net.c
> > @@ -14,7 +14,7 @@
> >   #define MHI_NET_MIN_MTU		ETH_MIN_MTU
> >   #define MHI_NET_MAX_MTU		0xffff
> > -#define MHI_NET_DEFAULT_MTU	0x4000
> > +#define MHI_NET_DEFAULT_MTU	0x8000
> 
> Why not SZ_32K?

Makes sense. Will change it in next iteration.

- Mani

-- 
மணிவண்ணன் சதாசிவம்
Re: [PATCH 3/3] net: mhi: Increase the default MTU from 16K to 32K
Posted by Andrew Lunn 2 years, 8 months ago
On Wed, Jun 07, 2023 at 12:28:09PM +0530, Manivannan Sadhasivam wrote:
> On Tue, Jun 06, 2023 at 07:50:23AM -0600, Jeffrey Hugo wrote:
> > On 6/6/2023 6:31 AM, Manivannan Sadhasivam wrote:
> > > Most of the Qualcomm endpoint devices are supporting 32K MTU for the
> > > UL (Uplink) and DL (Downlink) channels. So let's use the same value
> > > in the MHI NET driver also. This gives almost 2x increase in the throughput
> > > for the UL channel.

You say here 'Most'. What happens on those which do not support 32K?
Do the packets get dropped and it turns into a black hole?

   Andrew
Re: [PATCH 3/3] net: mhi: Increase the default MTU from 16K to 32K
Posted by Manivannan Sadhasivam 2 years, 8 months ago
On Wed, Jun 07, 2023 at 02:25:50PM +0200, Andrew Lunn wrote:
> On Wed, Jun 07, 2023 at 12:28:09PM +0530, Manivannan Sadhasivam wrote:
> > On Tue, Jun 06, 2023 at 07:50:23AM -0600, Jeffrey Hugo wrote:
> > > On 6/6/2023 6:31 AM, Manivannan Sadhasivam wrote:
> > > > Most of the Qualcomm endpoint devices are supporting 32K MTU for the
> > > > UL (Uplink) and DL (Downlink) channels. So let's use the same value
> > > > in the MHI NET driver also. This gives almost 2x increase in the throughput
> > > > for the UL channel.
> 
> You say here 'Most'. What happens on those which do not support 32K?
> Do the packets get dropped and it turns into a black hole?
> 

Yeah, and the host has to retransmit. But I checked again with Qcom on the MTU
size and got a different answer that forced me to change "most" to "few". So
this patch is not needed for now. I'll drop it.

- Mani

>    Andrew
> 

-- 
மணிவண்ணன் சதாசிவம்