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] [thread-next>] [day] [month] [year] [list]
Message-ID: <902c3782-b562-457c-a610-91e4e53e2a19@lunn.ch>
Date: Mon, 9 Dec 2024 14:47:30 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Tian Xin <tianx@...silicon.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, weihg@...silicon.com
Subject: Re: [PATCH 09/16] net-next/yunsilicon: Init net device

> +#define SW_MIN_MTU		64
> +#define SW_DEFAULT_MTU		1500
> +#define SW_MAX_MTU		9600

There are standard #defines for these. Please use them.

> +#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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ