lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 20 Jun 2022 09:03:38 +0200
From:   Lukasz Spintzyk <lukasz.spintzyk@...aptics.com>
To:     Oliver Neukum <oneukum@...e.com>, netdev@...r.kernel.org
Cc:     ppd-posix@...aptics.com
Subject: Re: [PATCH 2/2] net/cdc_ncm: Add ntb_max_rx,ntb_max_tx cdc_ncm module
 parameters

On 14/06/2022 12:24, Lukasz Spintzyk wrote:
> On 13/06/2022 16:54, Oliver Neukum wrote:
>> CAUTION: Email originated externally, do not click links or open 
>> attachments unless you recognize the sender and know the content is safe.
>>
>>
>> On 13.06.22 10:02, Łukasz Spintzyk wrote:
>>> This change allows to optionally adjust maximum RX and TX NTB size
>>> to better match specific device capabilities, leading to
>>> higher achievable Ethernet bandwidth.
>>>
>> Hi,
>>
>> this is awkward a patch. If some devices need bigger buffers, the
>> driver should grow its buffers for them without administrative
>> intervention.
>>
>>          Regards
>>                  Oliver
>>
> 
> This is true,
> Some of DisplayLink USB ethernet devices require values of TX and RX NTB 
> size higher then 32kb and this is more then defined 
> CDC_NCM_NTB_MAX_SIZE_TX/RX
> I wanted to be careful and not increase limit of NTB size for all 
> devices. But it would also by ok to me if we could increase 
> CDC_NCM_NTB_MAX_SIZE_TX/RX to 64kb.
> 
> Regards
> Lukasz Spintzyk
This whole patch could be changed to that two line fix:

diff --git a/include/linux/usb/cdc_ncm.h b/include/linux/usb/cdc_ncm.h
index f7cb3ddce7fb..2d207cb4837d 100644
--- a/include/linux/usb/cdc_ncm.h
+++ b/include/linux/usb/cdc_ncm.h
@@ -53,8 +53,8 @@
  #define USB_CDC_NCM_NDP32_LENGTH_MIN           0x20

  /* Maximum NTB length */
-#define        CDC_NCM_NTB_MAX_SIZE_TX                 32768   /* bytes */
-#define        CDC_NCM_NTB_MAX_SIZE_RX                 32768   /* bytes */
+#define        CDC_NCM_NTB_MAX_SIZE_TX                 65536   /* bytes */
+#define        CDC_NCM_NTB_MAX_SIZE_RX                 65536   /* bytes */

  /* Initial NTB length */
  #define        CDC_NCM_NTB_DEF_SIZE_TX                 16384   /* bytes */

Olivier, would it be acceptable to increase max NTB RX/TX size to 64kb?

regards
Lukasz Spintzyk

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ