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]
Message-ID: <lebai2y7xgrf72tbhwcxklhs5u3y6uz24vyrew2fjssspwn35d@pnxj5t6trnm4>
Date: Wed, 2 Oct 2024 21:21:03 +0300
From: Serge Semin <fancer.lancer@...il.com>
To: Minda Chen <minda.chen@...rfivetech.com>
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>, 
	Jose Abreu <joabreu@...opsys.com>, "David S . Miller" <davem@...emloft.net>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, Maxime Coquelin <mcoquelin.stm32@...il.com>, 
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-stm32@...md-mailman.stormreply.com
Subject: Re: [PATCH net-next v2] net: stmmac: dwmac4: Add ip payload error
 statistics

Hi Minda

On Mon, Sep 30, 2024 at 07:02:05PM GMT, Minda Chen wrote:

Since v3 is going to be required anyway, here are several nitpicks:

> Add dwmac4 ip payload error statistics, and rename discripter bit macro
> because latest version descriptor IPCE bit claims ip checksum error or
> l4 segment length error.

s/dwmac4/DW QoS Eth v4/v5
s/ip/IP

L4-segment is a too broad definition in this case. The doc says about
just three protocols: TCP, UDP, or ICMP, so

s/l4/TCP, UDP, or ICMP

Other than that the change looks good.

Reviewed-by: Serge Semin <fancer.lancer@...il.com>

-Serge(y)

> 
> Signed-off-by: Minda Chen <minda.chen@...rfivetech.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 2 ++
>  drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.h | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
> index e99401bcc1f8..a5fb31eb0192 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
> @@ -118,6 +118,8 @@ static int dwmac4_wrback_get_rx_status(struct stmmac_extra_stats *x,
>  		x->ipv4_pkt_rcvd++;
>  	if (rdes1 & RDES1_IPV6_HEADER)
>  		x->ipv6_pkt_rcvd++;
> +	if (rdes1 & RDES1_IP_PAYLOAD_ERROR)
> +		x->ip_payload_err++;
>  
>  	if (message_type == RDES_EXT_NO_PTP)
>  		x->no_ptp_rx_msg_type_ext++;
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.h
> index 6da070ccd737..1ce6f43d545a 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.h
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.h
> @@ -95,7 +95,7 @@
>  #define RDES1_IPV4_HEADER		BIT(4)
>  #define RDES1_IPV6_HEADER		BIT(5)
>  #define RDES1_IP_CSUM_BYPASSED		BIT(6)
> -#define RDES1_IP_CSUM_ERROR		BIT(7)
> +#define RDES1_IP_PAYLOAD_ERROR		BIT(7)
>  #define RDES1_PTP_MSG_TYPE_MASK		GENMASK(11, 8)
>  #define RDES1_PTP_PACKET_TYPE		BIT(12)
>  #define RDES1_PTP_VER			BIT(13)
> -- 
> 2.17.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ