All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Parvathi Pudi <parvathi@couthit.com>
Cc: nm@ti.com, vigneshr@ti.com, tony@atomide.com,
	edumazet@google.com, glaroque@baylibre.com, pmohan@couthit.com,
	diogo.ivo@siemens.com, robh@kernel.org,
	javier.carrasco.cruz@gmail.com, praneeth@ti.com,
	m-karicheri2@ti.com, basharath@couthit.com, kuba@kernel.org,
	pabeni@redhat.com, richardcochran@gmail.com,
	devicetree@vger.kernel.org, conor+dt@kernel.org,
	schnelle@linux.ibm.com, mohan@couthit.com,
	s.hauer@pengutronix.de, prajith@ti.com, rogerq@kernel.org,
	jacob.e.keller@intel.com, ssantosh@kernel.org,
	linux-arm-kernel@lists.infradead.org, rogerq@ti.com, srk@ti.com,
	pratheesh@ti.com, m-malladi@ti.com, netdev@vger.kernel.org,
	rdunlap@infradead.org, linux-kernel@vger.kernel.org,
	danishanwar@ti.com, afd@ti.com, andrew+netdev@lunn.ch,
	krishna@couthit.com, krzk+dt@kernel.org, davem@davemloft.net
Subject: Re: [PATCH net-next v5 05/11] net: ti: prueth: Adds ethtool support for ICSSM PRUETH Driver
Date: Wed, 23 Apr 2025 17:28:16 +0100	[thread overview]
Message-ID: <20250423162816.GD2843373@horms.kernel.org> (raw)
In-Reply-To: <20250414130237.1915448-6-parvathi@couthit.com>

On Mon, Apr 14, 2025 at 06:32:31PM +0530, Parvathi Pudi wrote:
> From: Roger Quadros <rogerq@ti.com>
> 
> Changes for enabling ethtool support for the newly added PRU Ethernet
> interfaces. Extends the support for statistics collection from PRU internal
> memory and displays it in the user space. Along with statistics,
> enable/disable of features, configuring link speed etc.are now supported.
> 
> The firmware running on PRU maintains statistics in internal data memory.
> When requested ethtool collects all the statistics for the specified
> interface and displays it in the user space.
> 
> Makefile is updated to include ethtool support into PRUETH driver.
> 
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> Signed-off-by: Andrew F. Davis <afd@ti.com>
> Signed-off-by: Basharath Hussain Khaja <basharath@couthit.com>
> Signed-off-by: Parvathi Pudi <parvathi@couthit.com>

...

> diff --git a/drivers/net/ethernet/ti/icssm/icssm_prueth.h b/drivers/net/ethernet/ti/icssm/icssm_prueth.h

...

> @@ -108,6 +114,119 @@ struct prueth_packet_info {
>  	bool timestamp;
>  };
>  
> +/**
> + * struct port_statistics - Statistics structure for capturing statistics
> + *			    on PRUs
> + * @tx_bcast: Number of broadcast packets sent
> + * @tx_mcast:Number of multicast packets sent
> + * @tx_ucast:Number of unicast packets sent
> + *
> + * @tx_octets:Number of undersized frames rcvd
> + *
> + * @rx_bcast:Number of broadcast packets rcvd
> + * @rx_mcast:Number of multicast packets rcvd
> + * @rx_ucast:Number of unicast packets rcvd
> + *
> + * @rx_octets:Number of Rx packets
> + *
> + * @tx64byte:Number of 64 byte packets sent
> + * @tx65_127byte:Number of 65-127 byte packets sent
> + * @tx128_255byte:Number of 128-255 byte packets sent
> + * @tx256_511byte:Number of 256-511 byte packets sent
> + * @tx512_1023byte:Number of 512-1023 byte packets sent
> + * @tx1024byte:Number of 1024 and larger size packets sent
> + *
> + * @rx64byte:Number of 64 byte packets rcvd
> + * @rx65_127byte:Number of 65-127 byte packets rcvd
> + * @rx128_255byte:Number of 128-255 byte packets rcvd
> + * @rx256_511byte:Number of 256-511 byte packets rcvd
> + * @rx512_1023byte:Number of 512-1023 byte packets rcvd
> + * @rx1024byte:Number of 1024 and larger size packets rcvd
> + *
> + * @late_coll:Number of late collisions(Half Duplex)
> + * @single_coll:Number of single collisions (Half Duplex)
> + * @multi_coll:Number of multiple collisions (Half Duplex)
> + * @excess_coll:Number of excess collisions(Half Duplex)
> + *
> + * @rx_misalignment_frames:Number of non multiple of 8 byte frames rcvd
> + * @stormprev_counter:Number of packets dropped because of Storm Prevention

nit: It looks like the documentation of @stormprev_counter should
     be replaced by documentation of:
     @u32 stormprev_counter_bc;
     @u32 stormprev_counter_mc;
     @u32 stormprev_counter_uc;

> + * @mac_rxerror:Number of MAC receive errors
> + * @sfd_error:Number of invalid SFD
> + * @def_tx:Number of transmissions deferred
> + * @mac_txerror:Number of MAC transmit errors
> + * @rx_oversized_frames:Number of oversized frames rcvd
> + * @rx_undersized_frames:Number of undersized frames rcvd
> + * @rx_crc_frames:Number of CRC error frames rcvd
> + * @dropped_packets:Number of packets dropped due to link down on opposite port
> + *
> + * @tx_hwq_overflow:Hardware Tx Queue (on PRU) over flow count
> + * @tx_hwq_underflow:Hardware Tx Queue (on PRU) under flow count
> + *
> + * @u32 cs_error: Number of carrier sense errors

nit: @cs_error

     i.e. remove "u32 "

Documentation nits flagged by ./scripts/kernel-doc -none

> + * @sqe_test_error: Number of MAC receive errors
> + *
> + * Above fields are aligned so that it's consistent
> + * with the memory layout in PRU DRAM, this is to facilitate easy
> + * memcpy. Don't change the order of the fields.
> + *
> + * @vlan_dropped: Number of VLAN tagged packets dropped
> + * @multicast_dropped: Number of multicast packets dropped
> + */
> +struct port_statistics {
> +	u32 tx_bcast;
> +	u32 tx_mcast;
> +	u32 tx_ucast;
> +
> +	u32 tx_octets;
> +
> +	u32 rx_bcast;
> +	u32 rx_mcast;
> +	u32 rx_ucast;
> +
> +	u32 rx_octets;
> +
> +	u32 tx64byte;
> +	u32 tx65_127byte;
> +	u32 tx128_255byte;
> +	u32 tx256_511byte;
> +	u32 tx512_1023byte;
> +	u32 tx1024byte;
> +
> +	u32 rx64byte;
> +	u32 rx65_127byte;
> +	u32 rx128_255byte;
> +	u32 rx256_511byte;
> +	u32 rx512_1023byte;
> +	u32 rx1024byte;
> +
> +	u32 late_coll;
> +	u32 single_coll;
> +	u32 multi_coll;
> +	u32 excess_coll;
> +
> +	u32 rx_misalignment_frames;
> +	u32 stormprev_counter_bc;
> +	u32 stormprev_counter_mc;
> +	u32 stormprev_counter_uc;
> +	u32 mac_rxerror;
> +	u32 sfd_error;
> +	u32 def_tx;
> +	u32 mac_txerror;
> +	u32 rx_oversized_frames;
> +	u32 rx_undersized_frames;
> +	u32 rx_crc_frames;
> +	u32 dropped_packets;
> +
> +	u32 tx_hwq_overflow;
> +	u32 tx_hwq_underflow;
> +
> +	u32 cs_error;
> +	u32 sqe_test_error;
> +
> +	u32 vlan_dropped;
> +	u32 multicast_dropped;
> +} __packed;

...

The above notwithstanding, it seems based on comment's elsewhere in this
thread that there will be another revision of this patchset. Let patchwork
know about that.

pw-bot: changes-requested


WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Parvathi Pudi <parvathi@couthit.com>
Cc: danishanwar@ti.com, rogerq@kernel.org, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, nm@ti.com, ssantosh@kernel.org,
	tony@atomide.com, richardcochran@gmail.com,
	glaroque@baylibre.com, schnelle@linux.ibm.com,
	m-karicheri2@ti.com, s.hauer@pengutronix.de,
	rdunlap@infradead.org, diogo.ivo@siemens.com,
	basharath@couthit.com, jacob.e.keller@intel.com,
	m-malladi@ti.com, javier.carrasco.cruz@gmail.com, afd@ti.com,
	s-anna@ti.com, linux-arm-kernel@lists.infradead.org,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, pratheesh@ti.com, prajith@ti.com,
	vigneshr@ti.com, praneeth@ti.com, srk@ti.com, rogerq@ti.com,
	krishna@couthit.com, pmohan@couthit.com, mohan@couthit.com
Subject: Re: [PATCH net-next v5 05/11] net: ti: prueth: Adds ethtool support for ICSSM PRUETH Driver
Date: Wed, 23 Apr 2025 17:28:16 +0100	[thread overview]
Message-ID: <20250423162816.GD2843373@horms.kernel.org> (raw)
In-Reply-To: <20250414130237.1915448-6-parvathi@couthit.com>

On Mon, Apr 14, 2025 at 06:32:31PM +0530, Parvathi Pudi wrote:
> From: Roger Quadros <rogerq@ti.com>
> 
> Changes for enabling ethtool support for the newly added PRU Ethernet
> interfaces. Extends the support for statistics collection from PRU internal
> memory and displays it in the user space. Along with statistics,
> enable/disable of features, configuring link speed etc.are now supported.
> 
> The firmware running on PRU maintains statistics in internal data memory.
> When requested ethtool collects all the statistics for the specified
> interface and displays it in the user space.
> 
> Makefile is updated to include ethtool support into PRUETH driver.
> 
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> Signed-off-by: Andrew F. Davis <afd@ti.com>
> Signed-off-by: Basharath Hussain Khaja <basharath@couthit.com>
> Signed-off-by: Parvathi Pudi <parvathi@couthit.com>

...

> diff --git a/drivers/net/ethernet/ti/icssm/icssm_prueth.h b/drivers/net/ethernet/ti/icssm/icssm_prueth.h

...

> @@ -108,6 +114,119 @@ struct prueth_packet_info {
>  	bool timestamp;
>  };
>  
> +/**
> + * struct port_statistics - Statistics structure for capturing statistics
> + *			    on PRUs
> + * @tx_bcast: Number of broadcast packets sent
> + * @tx_mcast:Number of multicast packets sent
> + * @tx_ucast:Number of unicast packets sent
> + *
> + * @tx_octets:Number of undersized frames rcvd
> + *
> + * @rx_bcast:Number of broadcast packets rcvd
> + * @rx_mcast:Number of multicast packets rcvd
> + * @rx_ucast:Number of unicast packets rcvd
> + *
> + * @rx_octets:Number of Rx packets
> + *
> + * @tx64byte:Number of 64 byte packets sent
> + * @tx65_127byte:Number of 65-127 byte packets sent
> + * @tx128_255byte:Number of 128-255 byte packets sent
> + * @tx256_511byte:Number of 256-511 byte packets sent
> + * @tx512_1023byte:Number of 512-1023 byte packets sent
> + * @tx1024byte:Number of 1024 and larger size packets sent
> + *
> + * @rx64byte:Number of 64 byte packets rcvd
> + * @rx65_127byte:Number of 65-127 byte packets rcvd
> + * @rx128_255byte:Number of 128-255 byte packets rcvd
> + * @rx256_511byte:Number of 256-511 byte packets rcvd
> + * @rx512_1023byte:Number of 512-1023 byte packets rcvd
> + * @rx1024byte:Number of 1024 and larger size packets rcvd
> + *
> + * @late_coll:Number of late collisions(Half Duplex)
> + * @single_coll:Number of single collisions (Half Duplex)
> + * @multi_coll:Number of multiple collisions (Half Duplex)
> + * @excess_coll:Number of excess collisions(Half Duplex)
> + *
> + * @rx_misalignment_frames:Number of non multiple of 8 byte frames rcvd
> + * @stormprev_counter:Number of packets dropped because of Storm Prevention

nit: It looks like the documentation of @stormprev_counter should
     be replaced by documentation of:
     @u32 stormprev_counter_bc;
     @u32 stormprev_counter_mc;
     @u32 stormprev_counter_uc;

> + * @mac_rxerror:Number of MAC receive errors
> + * @sfd_error:Number of invalid SFD
> + * @def_tx:Number of transmissions deferred
> + * @mac_txerror:Number of MAC transmit errors
> + * @rx_oversized_frames:Number of oversized frames rcvd
> + * @rx_undersized_frames:Number of undersized frames rcvd
> + * @rx_crc_frames:Number of CRC error frames rcvd
> + * @dropped_packets:Number of packets dropped due to link down on opposite port
> + *
> + * @tx_hwq_overflow:Hardware Tx Queue (on PRU) over flow count
> + * @tx_hwq_underflow:Hardware Tx Queue (on PRU) under flow count
> + *
> + * @u32 cs_error: Number of carrier sense errors

nit: @cs_error

     i.e. remove "u32 "

Documentation nits flagged by ./scripts/kernel-doc -none

> + * @sqe_test_error: Number of MAC receive errors
> + *
> + * Above fields are aligned so that it's consistent
> + * with the memory layout in PRU DRAM, this is to facilitate easy
> + * memcpy. Don't change the order of the fields.
> + *
> + * @vlan_dropped: Number of VLAN tagged packets dropped
> + * @multicast_dropped: Number of multicast packets dropped
> + */
> +struct port_statistics {
> +	u32 tx_bcast;
> +	u32 tx_mcast;
> +	u32 tx_ucast;
> +
> +	u32 tx_octets;
> +
> +	u32 rx_bcast;
> +	u32 rx_mcast;
> +	u32 rx_ucast;
> +
> +	u32 rx_octets;
> +
> +	u32 tx64byte;
> +	u32 tx65_127byte;
> +	u32 tx128_255byte;
> +	u32 tx256_511byte;
> +	u32 tx512_1023byte;
> +	u32 tx1024byte;
> +
> +	u32 rx64byte;
> +	u32 rx65_127byte;
> +	u32 rx128_255byte;
> +	u32 rx256_511byte;
> +	u32 rx512_1023byte;
> +	u32 rx1024byte;
> +
> +	u32 late_coll;
> +	u32 single_coll;
> +	u32 multi_coll;
> +	u32 excess_coll;
> +
> +	u32 rx_misalignment_frames;
> +	u32 stormprev_counter_bc;
> +	u32 stormprev_counter_mc;
> +	u32 stormprev_counter_uc;
> +	u32 mac_rxerror;
> +	u32 sfd_error;
> +	u32 def_tx;
> +	u32 mac_txerror;
> +	u32 rx_oversized_frames;
> +	u32 rx_undersized_frames;
> +	u32 rx_crc_frames;
> +	u32 dropped_packets;
> +
> +	u32 tx_hwq_overflow;
> +	u32 tx_hwq_underflow;
> +
> +	u32 cs_error;
> +	u32 sqe_test_error;
> +
> +	u32 vlan_dropped;
> +	u32 multicast_dropped;
> +} __packed;

...

The above notwithstanding, it seems based on comment's elsewhere in this
thread that there will be another revision of this patchset. Let patchwork
know about that.

pw-bot: changes-requested

  parent reply	other threads:[~2025-04-23 18:11 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-14 11:34 [PATCH net-next v5 00/11] PRU-ICSSM Ethernet Driver Parvathi Pudi
2025-04-14 11:34 ` [PATCH net-next v5 01/11] dt-bindings: net: ti: Adds DUAL-EMAC mode support on PRU-ICSS2 for AM57xx, AM43xx and AM33xx SOCs Parvathi Pudi
2025-04-14 11:34 ` [PATCH net-next v5 02/11] net: ti: prueth: Adds ICSSM Ethernet driver Parvathi Pudi
2025-04-16  9:16   ` Simon Horman
2025-04-16  9:16     ` Simon Horman
2025-04-18 12:23     ` Parvathi Pudi
2025-04-18 12:23       ` Parvathi Pudi
2025-04-14 11:34 ` [PATCH net-next v5 03/11] net: ti: prueth: Adds PRUETH HW and SW configuration Parvathi Pudi
2025-04-14 13:02 ` [PATCH net-next v5 04/11] net: ti: prueth: Adds link detection, RX and TX support Parvathi Pudi
2025-04-14 13:02 ` [PATCH net-next v5 05/11] net: ti: prueth: Adds ethtool support for ICSSM PRUETH Driver Parvathi Pudi
2025-04-14 13:34   ` Andrew Lunn
2025-04-14 13:34     ` Andrew Lunn
2025-04-16 11:59     ` Parvathi Pudi
2025-04-16 11:59       ` Parvathi Pudi
2025-04-23 16:28   ` Simon Horman [this message]
2025-04-23 16:28     ` Simon Horman
2025-04-23 16:34     ` Simon Horman
2025-04-23 16:34       ` Simon Horman
2025-04-14 13:02 ` [PATCH net-next v5 06/11] net: ti: prueth: Adds HW timestamping support for PTP using PRU-ICSS IEP module Parvathi Pudi
2025-04-14 13:02 ` [PATCH net-next v5 07/11] net: ti: prueth: Adds support for network filters for traffic control supported by PRU-ICSS Parvathi Pudi
2025-04-15 19:57   ` Simon Horman
2025-04-15 19:57     ` Simon Horman
2025-04-18 12:25     ` Parvathi Pudi
2025-04-18 12:25       ` Parvathi Pudi
2025-04-14 14:07 ` [PATCH net-next v5 08/11] net: ti: prueth: Adds support for RX interrupt coalescing/pacing Parvathi Pudi
2025-04-14 14:07 ` [PATCH net-next v5 09/11] net: ti: prueth: Adds power management support for PRU-ICSS Parvathi Pudi
2025-04-14 14:07 ` [PATCH net-next v5 10/11] net: ti: prueth: Adds support for PRUETH on AM33x and AM43x SOCs Parvathi Pudi
2025-04-14 14:07 ` [PATCH net-next v5 11/11] net: ti: prueth: Adds PTP OC Support for AM335x and AM437x Parvathi Pudi
2025-04-15 20:15   ` Simon Horman
2025-04-15 20:15     ` Simon Horman
2025-04-16 12:03     ` Parvathi Pudi
2025-04-16 12:03       ` Parvathi Pudi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250423162816.GD2843373@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=afd@ti.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=basharath@couthit.com \
    --cc=conor+dt@kernel.org \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=diogo.ivo@siemens.com \
    --cc=edumazet@google.com \
    --cc=glaroque@baylibre.com \
    --cc=jacob.e.keller@intel.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=krishna@couthit.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    --cc=m-malladi@ti.com \
    --cc=mohan@couthit.com \
    --cc=netdev@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pabeni@redhat.com \
    --cc=parvathi@couthit.com \
    --cc=pmohan@couthit.com \
    --cc=prajith@ti.com \
    --cc=praneeth@ti.com \
    --cc=pratheesh@ti.com \
    --cc=rdunlap@infradead.org \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    --cc=rogerq@kernel.org \
    --cc=rogerq@ti.com \
    --cc=s.hauer@pengutronix.de \
    --cc=schnelle@linux.ibm.com \
    --cc=srk@ti.com \
    --cc=ssantosh@kernel.org \
    --cc=tony@atomide.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.