Add support for Frame preemption (IEEE
Subsystems (2)
cover Add support for Frame preemption (IEEE
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
Signature · 1 line
2.36.1
RFC PATCH 1/2 include: uapi: Add new ioctl definitions to support Frame Preemption
Add new ioctl definitions, SIOC_PREEMPTION_EN, SIOC_PREEMPTION_CTRL, SIOC_PREEMPTION_STS, SIOC_PREEMPTION_COUNTER, to support IEEE 802.3br.
--- include/uapi/linux/sockios.h | 6 ++++++ net/core/dev_ioctl.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-)
include/uapi/linux/sockios.h +6 -0
@@ -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 */ /*
net/core/dev_ioctl.c +5 -1
@@ -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 ||
Signature · 1 line
2.36.1
Re: [RFC PATCH net-next 1/2] include: uapi: Add new ioctl definitions to support Frame Preemption
Quoted 2 lines · Pranavi Somisetty
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
RFC PATCH 2/2 include: uapi: Add Frame preemption parameters
In reply to Pranavi SomisettyAdds a header file for Frame preemption parameters.
--- include/uapi/linux/preemption_8023br.h | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 include/uapi/linux/preemption_8023br.h
include/uapi/linux/preemption_8023br.h new file +30 -0
@@ -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 +
Signature · 1 line
2.36.1
Hi Pranavi,
Quoted 13 lines · Pranavi Somisetty
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
Quoted 9 lines
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.hSignature · 1 line
2.36.1
Have you seen:
https://patchwork.kernel.org/project/netdevbpf/cover/[email protected]/
Quoted 38 lines
-----Original Message-----
From: Vladimir Oltean <[email protected]>
Sent: Friday, November 4, 2022 4:21 AM
To: Somisetty, Pranavi <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; git (AMD-Xilinx) <[email protected]>; Katakam, Harini <[email protected]>; Pandey, Radhey Shyam <[email protected]>; Simek, Michal <[email protected]>; [email protected]; [email protected]
Subject: Re: [RFC PATCH net-next 0/2] Add support for Frame preemption (IEEEHi Pranavi,
Quoted 9 lines · Pranavi Somisetty
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.
Quoted 5 lines
Pranavi Somisetty (2):
include: uapi: Add new ioctl definitions to support Frame Preemption
include: uapi: Add Frame preemption parametersinclude/uapi/linux/preemption_8023br.h | 30++++++++++++++++++++++++++
Quoted 5 lines
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
Quoted 7 lines
Quoted 3 lines
--
2.36.1Have you seen:
https://patchwork.kernel.org/project/netdevbpf/cover/20220816222920.195
[email protected]/
Thanks Vladimir, I hadn't, we will try to use your RFC.
Regards
Pranavi
Quoted 5 lines · Pranavi
Quoted 3 lines
Have you seen:
https://patchwork.kernel.org/project/netdevbpf/cover/20220816222920.195
[email protected]/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.