mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "claudiu beznea (tuxon)" <claudiu.beznea@tuxon.dev>
To: Vineeth Karumanchi <vineeth.karumanchi@amd.com>,
	nicolas.ferre@microchip.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com
Cc: git@amd.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 1/6] net: macb: Define ENST hardware registers for time-aware scheduling
Date: Sat, 26 Jul 2025 15:23:37 +0300	[thread overview]
Message-ID: <1fd25ba2-578c-46f2-acf2-903ae5d9e8bf@tuxon.dev> (raw)
In-Reply-To: <20250722154111.1871292-2-vineeth.karumanchi@amd.com>

Hi, Vineeth,

On 7/22/25 18:41, Vineeth Karumanchi wrote:
> Add ENST (Enhanced Network Scheduling and Timing) register definitions
> to support IEEE 802.1Qbv time-gated transmission.
> 
> Register architecture:
> - Per-queue timing registers: ENST_START_TIME, ENST_ON_TIME, ENST_OFF_TIME
> - Centralized control of the ENST_CONTROL register for enabling or
>    disabling queue gates.
> - Time intervals programmed in hardware byte units
> - Hardware-level queue scheduling infrastructure.
> 
> Signed-off-by: Vineeth Karumanchi <vineeth.karumanchi@amd.com>
> ---
>   drivers/net/ethernet/cadence/macb.h | 43 +++++++++++++++++++++++++++++
>   1 file changed, 43 insertions(+)
> 
> diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h
> index c9a5c8beb2fa..e456ac65d6c6 100644
> --- a/drivers/net/ethernet/cadence/macb.h
> +++ b/drivers/net/ethernet/cadence/macb.h
> @@ -184,6 +184,13 @@
>   #define GEM_DCFG8		0x029C /* Design Config 8 */
>   #define GEM_DCFG10		0x02A4 /* Design Config 10 */
>   #define GEM_DCFG12		0x02AC /* Design Config 12 */
> +#define GEM_ENST_START_TIME_Q0	0x0800 /* ENST Q0 start time */
> +#define GEM_ENST_START_TIME_Q1	0x0804 /* ENST Q1 start time */
> +#define GEM_ENST_ON_TIME_Q0	0x0820 /* ENST Q0 on time */
> +#define GEM_ENST_ON_TIME_Q1	0x0824 /* ENST Q1 on time */
> +#define GEM_ENST_OFF_TIME_Q0	0x0840 /* ENST Q0 off time */
> +#define GEM_ENST_OFF_TIME_Q1	0x0844 /* ENST Q1 off time */
> +#define GEM_ENST_CONTROL	0x0880 /* ENST control register */
>   #define GEM_USX_CONTROL		0x0A80 /* High speed PCS control register */
>   #define GEM_USX_STATUS		0x0A88 /* High speed PCS status register */
>   
> @@ -221,6 +228,15 @@
>   #define GEM_IDR(hw_q)		(0x0620 + ((hw_q) << 2))
>   #define GEM_IMR(hw_q)		(0x0640 + ((hw_q) << 2))
>   
> +#define GEM_ENST_START_TIME(hw_q)	(0x0800 + ((hw_q) << 2))
> +#define GEM_ENST_ON_TIME(hw_q)		(0x0820 + ((hw_q) << 2))
> +#define GEM_ENST_OFF_TIME(hw_q)		(0x0840 + ((hw_q) << 2))
> +
> +/*  Bitfields in ENST_CONTROL. */
> +#define GEM_ENST_DISABLE_QUEUE(hw_q)	BIT((hw_q) + 16) /* q0 disable is 16'b */
> +#define GEM_ENST_DISABLE_QUEUE_OFFSET	16
> +#define GEM_ENST_ENABLE_QUEUE(hw_q)		BIT(hw_q) /* q0 enable is 0'b */

There is an extra tab here ------------^

> +
>   /* Bitfields in NCR */
>   #define MACB_LB_OFFSET		0 /* reserved */
>   #define MACB_LB_SIZE		1
> @@ -554,6 +570,33 @@
>   #define GEM_HIGH_SPEED_OFFSET			26
>   #define GEM_HIGH_SPEED_SIZE			1
>   
> +/* Bitfields in ENST_START_TIME_Q0, Q1. */
> +#define GEM_START_TIME_SEC_OFFSET		30
> +#define GEM_START_TIME_SEC_SIZE			2
> +#define GEM_START_TIME_NSEC_OFFSET		0
> +#define GEM_START_TIME_NSEC_SIZE		30
> +
> +/* Bitfields in ENST_ON_TIME_Q0, Q1. */
> +#define GEM_ON_TIME_OFFSET			0
> +#define GEM_ON_TIME_SIZE			17
> +
> +/* Bitfields in ENST_OFF_TIME_Q0, Q1. */
> +#define GEM_OFF_TIME_OFFSET			0
> +#define GEM_OFF_TIME_SIZE			17
> +
> +/* Hardware ENST timing registers granularity */
> +#define ENST_TIME_GRANULARITY_NS 8
> +
> +/* Bitfields in ENST_CONTROL. */
> +#define GEM_DISABLE_Q1_OFFSET			17
> +#define GEM_DISABLE_Q1_SIZE			1
> +#define GEM_DISABLE_Q0_OFFSET			16
> +#define GEM_DISABLE_Q0_SIZE			1
> +#define GEM_ENABLE_Q1_OFFSET			1
> +#define GEM_ENABLE_Q1_SIZE			1
> +#define GEM_ENABLE_Q0_OFFSET			0
> +#define GEM_ENABLE_Q0_SIZE			1
> +

Please introduce these defines along with the code that uses it. This way it is 
simpler to follow what is actually used.

Thank you,
Claudiu

>   /* Bitfields in USX_CONTROL. */
>   #define GEM_USX_CTRL_SPEED_OFFSET		14
>   #define GEM_USX_CTRL_SPEED_SIZE			3


  reply	other threads:[~2025-07-26 12:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-22 15:41 [PATCH net-next 0/6] net: macb: Add TAPRIO traffic scheduling support Vineeth Karumanchi
2025-07-22 15:41 ` [PATCH net-next 1/6] net: macb: Define ENST hardware registers for time-aware scheduling Vineeth Karumanchi
2025-07-26 12:23   ` claudiu beznea (tuxon) [this message]
2025-07-22 15:41 ` [PATCH net-next 2/6] net: macb: Integrate ENST timing parameters and hardware unit conversion Vineeth Karumanchi
2025-07-26 12:24   ` claudiu beznea (tuxon)
2025-07-22 15:41 ` [PATCH net-next 3/6] net: macb: Add IEEE 802.1Qbv TAPRIO REPLACE command offload support Vineeth Karumanchi
2025-07-23 10:02   ` kernel test robot
2025-07-26 12:25   ` claudiu beznea (tuxon)
2025-07-26 15:32     ` Andrew Lunn
2025-07-29  8:59     ` Karumanchi, Vineeth
2025-07-31  9:07       ` Claudiu Beznea
2025-07-22 15:41 ` [PATCH net-next 4/6] net: macb: Implement TAPRIO DESTROY command offload for gate cleanup Vineeth Karumanchi
2025-07-26 12:26   ` claudiu beznea (tuxon)
2025-07-22 15:41 ` [PATCH net-next 5/6] net: macb: Implement TAPRIO TC offload command interface Vineeth Karumanchi
2025-07-26 12:29   ` claudiu beznea (tuxon)
2025-07-29  9:38     ` Karumanchi, Vineeth
2025-07-31  9:07       ` Claudiu Beznea
2025-07-28 16:31   ` kernel test robot
2025-07-22 15:41 ` [PATCH net-next 6/6] net: macb: Add MACB_CAPS_QBV capability flag for IEEE 802.1Qbv support Vineeth Karumanchi
2025-07-23 19:05   ` Simon Horman
2025-07-29  9:42     ` Karumanchi, Vineeth
2025-07-24  0:46   ` kernel test robot

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=1fd25ba2-578c-46f2-acf2-903ae5d9e8bf@tuxon.dev \
    --to=claudiu.beznea@tuxon.dev \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=git@amd.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=pabeni@redhat.com \
    --cc=vineeth.karumanchi@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®