All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH net-next 0/2] Add support for Frame preemption (IEEE
@ 2022-11-03 11:33 Pranavi Somisetty
  2022-11-03 11:33 ` [RFC PATCH net-next 1/2] include: uapi: Add new ioctl definitions to support Frame Preemption Pranavi Somisetty
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Pranavi Somisetty @ 2022-11-03 11:33 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni
  Cc: git, pranavi.somisetty, harini.katakam, radhey.shyam.pandey,
	michal.simek, linux-kernel, netdev

Frame Preemption is one of the core standards of TSN. It enables
low latency trasmission of time-critical frames by allowing them to
interrupt the transmission of other non time-critical traffic. Frame
preemption is only active when the link partner is also capable of it.
This negotiation is done using LLDP as specified by the standard. Open
source lldp utilities and other applications, can make use of
the ioctls and the header being here, to query preemption capabilities
and configure various parameters.

Pranavi Somisetty (2):
  include: uapi: Add new ioctl definitions to support Frame Preemption
  include: uapi: Add Frame preemption parameters

 include/uapi/linux/preemption_8023br.h | 30 ++++++++++++++++++++++++++
 include/uapi/linux/sockios.h           |  6 ++++++
 net/core/dev_ioctl.c                   |  6 +++++-
 3 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 include/uapi/linux/preemption_8023br.h

-- 
2.36.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [RFC PATCH net-next 1/2] include: uapi: Add new ioctl definitions to support Frame Preemption
  2022-11-03 11:33 [RFC PATCH net-next 0/2] Add support for Frame preemption (IEEE Pranavi Somisetty
@ 2022-11-03 11:33 ` Pranavi Somisetty
  2022-11-03 22:11   ` Andrew Lunn
  2022-11-03 11:33 ` [RFC PATCH net-next 2/2] include: uapi: Add Frame preemption parameters Pranavi Somisetty
  2022-11-03 22:51 ` [RFC PATCH net-next 0/2] Add support for Frame preemption (IEEE Vladimir Oltean
  2 siblings, 1 reply; 7+ messages in thread
From: Pranavi Somisetty @ 2022-11-03 11:33 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni
  Cc: git, pranavi.somisetty, harini.katakam, radhey.shyam.pandey,
	michal.simek, linux-kernel, netdev

Add new ioctl definitions, SIOC_PREEMPTION_EN, SIOC_PREEMPTION_CTRL,
SIOC_PREEMPTION_STS, SIOC_PREEMPTION_COUNTER, to support IEEE 802.3br.

Signed-off-by: Pranavi Somisetty <pranavi.somisetty@amd.com>
---
 include/uapi/linux/sockios.h | 6 ++++++
 net/core/dev_ioctl.c         | 6 +++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/sockios.h b/include/uapi/linux/sockios.h
index 7d1bccbbef78..382f959fb371 100644
--- a/include/uapi/linux/sockios.h
+++ b/include/uapi/linux/sockios.h
@@ -153,6 +153,12 @@
 #define SIOCSHWTSTAMP	0x89b0		/* set and get config		*/
 #define SIOCGHWTSTAMP	0x89b1		/* get config			*/
 
+/* Frame Preemption, IEEE 802.3br */
+#define SIOC_PREEMPTION_EN	0x89b2	/* enable frame preemption		*/
+#define SIOC_PREEMPTION_CTRL	0x89b3	/* configure preemption parameters	*/
+#define SIOC_PREEMPTION_STS	0x89b4	/* get preemption status		*/
+#define SIOC_PREEMPTION_COUNTER	0x89b5	/* read preemption statistics		*/
+
 /* Device private ioctl calls */
 
 /*
diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
index 7674bb9f3076..46fb963cd13a 100644
--- a/net/core/dev_ioctl.c
+++ b/net/core/dev_ioctl.c
@@ -409,7 +409,11 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, void __user *data,
 		    cmd == SIOCGMIIREG ||
 		    cmd == SIOCSMIIREG ||
 		    cmd == SIOCSHWTSTAMP ||
-		    cmd == SIOCGHWTSTAMP) {
+		    cmd == SIOCGHWTSTAMP ||
+		    cmd == SIOC_PREEMPTION_EN ||
+		    cmd == SIOC_PREEMPTION_CTRL ||
+		    cmd == SIOC_PREEMPTION_STS ||
+		    cmd == SIOC_PREEMPTION_COUNTER) {
 			err = dev_eth_ioctl(dev, ifr, cmd);
 		} else if (cmd == SIOCBONDENSLAVE ||
 		    cmd == SIOCBONDRELEASE ||
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [RFC PATCH net-next 2/2] include: uapi: Add Frame preemption parameters
  2022-11-03 11:33 [RFC PATCH net-next 0/2] Add support for Frame preemption (IEEE Pranavi Somisetty
  2022-11-03 11:33 ` [RFC PATCH net-next 1/2] include: uapi: Add new ioctl definitions to support Frame Preemption Pranavi Somisetty
@ 2022-11-03 11:33 ` Pranavi Somisetty
  2022-11-03 22:51 ` [RFC PATCH net-next 0/2] Add support for Frame preemption (IEEE Vladimir Oltean
  2 siblings, 0 replies; 7+ messages in thread
From: Pranavi Somisetty @ 2022-11-03 11:33 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni
  Cc: git, pranavi.somisetty, harini.katakam, radhey.shyam.pandey,
	michal.simek, linux-kernel, netdev

Adds a header file for Frame preemption parameters.

Signed-off-by: Pranavi Somisetty <pranavi.somisetty@amd.com>
---
 include/uapi/linux/preemption_8023br.h | 30 ++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 include/uapi/linux/preemption_8023br.h

diff --git a/include/uapi/linux/preemption_8023br.h b/include/uapi/linux/preemption_8023br.h
new file mode 100644
index 000000000000..762fe4dd1906
--- /dev/null
+++ b/include/uapi/linux/preemption_8023br.h
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
+#ifndef PREEMPTION_H
+#define PREEMPTION_H
+/*
+ * IEEE 802.3br - Frame Preemption header
+ */
+
+/**
+ *  struct preempt_ctrl_sts:	Preemption configuration and status.
+ *  @version:			version for backward compatibility
+ *  @preemp_sup:		Preemption capable
+ *  @preemp_enabled:		Preemption enabled
+ *  @tx_preemp_sts:		TX Preemption Status
+ *  @mac_tx_verify_sts:		MAC Merge TX Verify Status
+ *  @verify_timer_value:	Verify Timer Value
+ *  @additional_frag_size:	Additional Fragment Size
+ *  @disable_preemp_verify:	Disable Preemption Verification
+ */
+struct preempt_ctrl_sts {
+	unsigned int version;
+	unsigned int preemp_sup;
+	unsigned int preemp_en;
+	unsigned int tx_preemp_sts;
+	unsigned int mac_tx_verify_sts;
+	unsigned int verify_timer_value;
+	unsigned int additional_frag_size;
+	unsigned int disable_preemp_verify;
+};
+#endif
+
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH net-next 1/2] include: uapi: Add new ioctl definitions to support Frame Preemption
  2022-11-03 11:33 ` [RFC PATCH net-next 1/2] include: uapi: Add new ioctl definitions to support Frame Preemption Pranavi Somisetty
@ 2022-11-03 22:11   ` Andrew Lunn
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2022-11-03 22:11 UTC (permalink / raw)
  To: Pranavi Somisetty
  Cc: davem, edumazet, kuba, pabeni, git, harini.katakam,
	radhey.shyam.pandey, michal.simek, linux-kernel, netdev

On Thu, Nov 03, 2022 at 05:33:47AM -0600, Pranavi Somisetty wrote:
> Add new ioctl definitions, SIOC_PREEMPTION_EN, SIOC_PREEMPTION_CTRL,
> SIOC_PREEMPTION_STS, SIOC_PREEMPTION_COUNTER, to support IEEE 802.3br.

Please justify using an IOCTL when everything else in the network
stack is configured using netlink.

      Andrew

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH net-next 0/2] Add support for Frame preemption (IEEE
  2022-11-03 11:33 [RFC PATCH net-next 0/2] Add support for Frame preemption (IEEE Pranavi Somisetty
  2022-11-03 11:33 ` [RFC PATCH net-next 1/2] include: uapi: Add new ioctl definitions to support Frame Preemption Pranavi Somisetty
  2022-11-03 11:33 ` [RFC PATCH net-next 2/2] include: uapi: Add Frame preemption parameters Pranavi Somisetty
@ 2022-11-03 22:51 ` Vladimir Oltean
  2022-11-04 14:08   ` Somisetty, Pranavi
  2 siblings, 1 reply; 7+ messages in thread
From: Vladimir Oltean @ 2022-11-03 22:51 UTC (permalink / raw)
  To: Pranavi Somisetty
  Cc: davem, edumazet, kuba, pabeni, git, harini.katakam,
	radhey.shyam.pandey, michal.simek, linux-kernel, netdev

Hi Pranavi,

On Thu, Nov 03, 2022 at 05:33:46AM -0600, Pranavi Somisetty wrote:
> Frame Preemption is one of the core standards of TSN. It enables
> low latency trasmission of time-critical frames by allowing them to
> interrupt the transmission of other non time-critical traffic. Frame
> preemption is only active when the link partner is also capable of it.
> This negotiation is done using LLDP as specified by the standard. Open
> source lldp utilities and other applications, can make use of
> the ioctls and the header being here, to query preemption capabilities
> and configure various parameters.
> 
> Pranavi Somisetty (2):
>   include: uapi: Add new ioctl definitions to support Frame Preemption
>   include: uapi: Add Frame preemption parameters
> 
>  include/uapi/linux/preemption_8023br.h | 30 ++++++++++++++++++++++++++
>  include/uapi/linux/sockios.h           |  6 ++++++
>  net/core/dev_ioctl.c                   |  6 +++++-
>  3 files changed, 41 insertions(+), 1 deletion(-)
>  create mode 100644 include/uapi/linux/preemption_8023br.h
> 
> -- 
> 2.36.1
> 

Have you seen:
https://patchwork.kernel.org/project/netdevbpf/cover/20220816222920.1952936-1-vladimir.oltean@nxp.com/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [RFC PATCH net-next 0/2] Add support for Frame preemption (IEEE
  2022-11-03 22:51 ` [RFC PATCH net-next 0/2] Add support for Frame preemption (IEEE Vladimir Oltean
@ 2022-11-04 14:08   ` Somisetty, Pranavi
  2022-11-04 15:52     ` Vladimir Oltean
  0 siblings, 1 reply; 7+ messages in thread
From: Somisetty, Pranavi @ 2022-11-04 14:08 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: davem, edumazet, kuba, pabeni, git (AMD-Xilinx),
	Katakam, Harini, Pandey, Radhey Shyam, Simek, Michal,
	linux-kernel, netdev



> -----Original Message-----
> From: Vladimir Oltean <olteanv@gmail.com>
> Sent: Friday, November 4, 2022 4:21 AM
> To: Somisetty, Pranavi <pranavi.somisetty@amd.com>
> Cc: davem@davemloft.net; edumazet@google.com; kuba@kernel.org;
> pabeni@redhat.com; git (AMD-Xilinx) <git@amd.com>; Katakam, Harini
> <harini.katakam@amd.com>; Pandey, Radhey Shyam
> <radhey.shyam.pandey@amd.com>; Simek, Michal
> <michal.simek@amd.com>; linux-kernel@vger.kernel.org;
> netdev@vger.kernel.org
> Subject: Re: [RFC PATCH net-next 0/2] Add support for Frame preemption
> (IEEE
> 
> Hi Pranavi,
> 
> On Thu, Nov 03, 2022 at 05:33:46AM -0600, Pranavi Somisetty wrote:
> > Frame Preemption is one of the core standards of TSN. It enables low
> > latency trasmission of time-critical frames by allowing them to
> > interrupt the transmission of other non time-critical traffic. Frame
> > preemption is only active when the link partner is also capable of it.
> > This negotiation is done using LLDP as specified by the standard. Open
> > source lldp utilities and other applications, can make use of the
> > ioctls and the header being here, to query preemption capabilities and
> > configure various parameters.
> >
> > Pranavi Somisetty (2):
> >   include: uapi: Add new ioctl definitions to support Frame Preemption
> >   include: uapi: Add Frame preemption parameters
> >
> >  include/uapi/linux/preemption_8023br.h | 30
> ++++++++++++++++++++++++++
> >  include/uapi/linux/sockios.h           |  6 ++++++
> >  net/core/dev_ioctl.c                   |  6 +++++-
> >  3 files changed, 41 insertions(+), 1 deletion(-)  create mode 100644
> > include/uapi/linux/preemption_8023br.h
> >
> > --
> > 2.36.1
> >
> 
> Have you seen:
> https://patchwork.kernel.org/project/netdevbpf/cover/20220816222920.195
> 2936-1-vladimir.oltean@nxp.com/

Thanks Vladimir, I hadn't, we will try to use your RFC.

Regards
Pranavi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH net-next 0/2] Add support for Frame preemption (IEEE
  2022-11-04 14:08   ` Somisetty, Pranavi
@ 2022-11-04 15:52     ` Vladimir Oltean
  0 siblings, 0 replies; 7+ messages in thread
From: Vladimir Oltean @ 2022-11-04 15:52 UTC (permalink / raw)
  To: Somisetty, Pranavi
  Cc: davem, edumazet, kuba, pabeni, git (AMD-Xilinx),
	Katakam, Harini, Pandey, Radhey Shyam, Simek, Michal,
	linux-kernel, netdev

On Fri, Nov 04, 2022 at 02:08:25PM +0000, Somisetty, Pranavi wrote:
> > Have you seen:
> > https://patchwork.kernel.org/project/netdevbpf/cover/20220816222920.195
> > 2936-1-vladimir.oltean@nxp.com/
> 
> Thanks Vladimir, I hadn't, we will try to use your RFC.

The point is not to *use* it (you can't even without some major effort -
I didn't even publish the user space patches, even though I have ethtool
ready and openlldp almost completely ready as well; plus I also did some
more rework to the posted RFC, which I didn't repost yet).

The point is that the RFC has stalled due to seemingly no clear answers
to some fundamental questions about the placement of these new features.
It would be good if some extra feedback from people familiar with frame
preemption/MAC merge could be provided there.

Thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-04 15:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 11:33 [RFC PATCH net-next 0/2] Add support for Frame preemption (IEEE Pranavi Somisetty
2022-11-03 11:33 ` [RFC PATCH net-next 1/2] include: uapi: Add new ioctl definitions to support Frame Preemption Pranavi Somisetty
2022-11-03 22:11   ` Andrew Lunn
2022-11-03 11:33 ` [RFC PATCH net-next 2/2] include: uapi: Add Frame preemption parameters Pranavi Somisetty
2022-11-03 22:51 ` [RFC PATCH net-next 0/2] Add support for Frame preemption (IEEE Vladimir Oltean
2022-11-04 14:08   ` Somisetty, Pranavi
2022-11-04 15:52     ` Vladimir Oltean

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.