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] [day] [month] [year] [list]
Message-ID:
 <PAXPR04MB9185AFBAF4B57B94612E0378893EA@PAXPR04MB9185.eurprd04.prod.outlook.com>
Date: Mon, 25 Aug 2025 18:57:33 +0000
From: Shenwei Wang <shenwei.wang@....com>
To: Wei Fang <wei.fang@....com>
CC: Clark Wang <xiaoning.wang@....com>, Stanislav Fomichev <sdf@...ichev.me>,
	"imx@...ts.linux.dev" <imx@...ts.linux.dev>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, dl-linux-imx <linux-imx@....com>, Andrew Lunn
	<andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric
 Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
	<pabeni@...hat.com>, Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann
	<daniel@...earbox.net>, Jesper Dangaard Brouer <hawk@...nel.org>, John
 Fastabend <john.fastabend@...il.com>
Subject: RE: [PATCH v3 net-next 3/5] net: fec: add rx_frame_size to support
 configurable RX length



> -----Original Message-----
> From: Wei Fang <wei.fang@....com>
> Sent: Sunday, August 24, 2025 9:47 PM
> To: Shenwei Wang <shenwei.wang@....com>
> Cc: Clark Wang <xiaoning.wang@....com>; Stanislav Fomichev
> <sdf@...ichev.me>; imx@...ts.linux.dev; netdev@...r.kernel.org; linux-
> kernel@...r.kernel.org; dl-linux-imx <linux-imx@....com>; Andrew Lunn
> <andrew+netdev@...n.ch>; David S. Miller <davem@...emloft.net>; Eric
> Dumazet <edumazet@...gle.com>; Jakub Kicinski <kuba@...nel.org>; Paolo
> Abeni <pabeni@...hat.com>; Alexei Starovoitov <ast@...nel.org>; Daniel
> Borkmann <daniel@...earbox.net>; Jesper Dangaard Brouer
> <hawk@...nel.org>; John Fastabend <john.fastabend@...il.com>
> Subject: RE: [PATCH v3 net-next 3/5] net: fec: add rx_frame_size to support
> configurable RX length
> 
> > -		writel(fep->max_buf_size, fep->hwp + FEC_FTRL);
> > +		writel(fep->rx_frame_size, fep->hwp + FEC_FTRL);
> >  	}
> >  #endif
> >
> > @@ -4560,6 +4560,7 @@ fec_probe(struct platform_device *pdev)
> >  	pinctrl_pm_select_sleep_state(&pdev->dev);
> >
> >  	fep->pagepool_order = 0;
> > +	fep->rx_frame_size = FEC_ENET_RX_FRSIZE;
> >  	fep->max_buf_size = PKT_MAXBUF_SIZE;
> >  	ndev->max_mtu = fep->max_buf_size - ETH_HLEN - ETH_FCS_LEN;
> >
> 
> The same comments as in v2, if max_buf_size < rx_frame_size, the packet will be
> received by multiple Rx BDs, but the current driver only supports one packet per
> Rx BD, so the Rx error statistic will be doubled with this patch.

That's not the case. In the old implementation, the oversized packets were counted
as the rx_length_errors. In this change, the oversized packets are truncated so the error
becomes rx_errors.

To maintain the same error behavior, I will keep the MAX_FL  and TRUNC_FL the same value
as the original implementation.

Thanks,
Shenwei


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ