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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <e894983c-eb35-4496-9639-6cb065d456b2@yunsilicon.com>
Date: Wed, 18 Dec 2024 19:13:13 +0800
From: "tianx" <tianx@...silicon.com>
To: "Andrew Lunn" <andrew@...n.ch>
Cc: <netdev@...r.kernel.org>, <davem@...emloft.net>, <weihg@...silicon.com>
Subject: Re: [PATCH 09/16] net-next/yunsilicon: Init net device

On 2024/12/9 21:47, Andrew Lunn wrote:
>> +#define SW_MIN_MTU		64
>> +#define SW_DEFAULT_MTU		1500
>> +#define SW_MAX_MTU		9600
> There are standard #defines for these. Please use them.
In v1 serious

64 replaced by ETH_MIN_MTU
1500 replaced by ETH_DATA_LEN

>> +#define XSC_ETH_HW_MTU_SEND	9800		/*need to obtain from hardware*/
>> +#define XSC_ETH_HW_MTU_RECV	9800		/*need to obtain from hardware*/
>> +#define XSC_SW2HW_MTU(mtu)	((mtu) + 14 + 4)
>> +#define XSC_SW2HW_FRAG_SIZE(mtu)	((mtu) + 14 + 8 + 4 + XSC_PPH_HEAD_LEN)
>> +#define XSC_SW2HW_RX_PKT_LEN(mtu)	((mtu) + 14 + 256)
> Please try to replace these magic numbers with #defines. Is 14 the
> Ethernet header?  ETH_HLEN?
>
> 	Andrew
Yes, 14 is ETH_HLEN, 4 is ETH_FCS_LEN, 8 is VLAN_HLEN * 2 and 256 is a 
remaining space needed by our hardware. This have been modified to 
MACROs in the v1 patch set. Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ