Skip to contentSkip to conversation

tc: Classifier support for SPI field

PATCH In review Ratheesh Kannoth 2 participants 9 messages Jul 25, 2023 – Aug 2, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tc: Classifier support for SPI field

tc flower support for SPI field in ESP and AH packets.

---
 include/uapi/linux/pkt_cls.h |  5 +++-
 tc/f_flower.c                | 55 ++++++++++++++++++++++++++++++++++--
 2 files changed, 57 insertions(+), 3 deletions(-)
include/uapi/linux/pkt_cls.h +3 -0
index 7865f5a9..fce639a6 100644
@@ -594,6 +594,9 @@ enum {
 
 	TCA_FLOWER_KEY_L2TPV3_SID,	/* be32 */
 
+	TCA_FLOWER_KEY_SPI,		/* be32 */
+	TCA_FLOWER_KEY_SPI_MASK,	/* be32 */
+
 	TCA_FLOWER_L2_MISS,		/* u8 */
 
 	TCA_FLOWER_KEY_CFM,		/* nested */
tc/f_flower.c +53 -2

98 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw
Quoted 19 lines

From: Ratheesh Kannoth <[email protected]>
Sent: Tuesday, July 25, 2023 9:20 AM
To: [email protected]; [email protected]
Cc: [email protected]; Ratheesh Kannoth <[email protected]>
Subject: [PATCH iproute2-next] tc: Classifier support for SPI field

tc flower support for SPI field in ESP and AH packets.

---
 include/uapi/linux/pkt_cls.h |  5 +++-
 tc/f_flower.c                | 55 ++++++++++++++++++++++++++++++++++--
 2 files changed, 57 insertions(+), 3 deletions(-)
include/uapi/linux/pkt_cls.h index renamed from include/uapi/linux/pkt_cls.h +0 -0

7865f5a9..fce639a6 100644

include/uapi/linux/pkt_cls.h enum { · line 602

Quoted 9 lines
include/uapi/linux/pkt_cls.h +3 -0
@@ -594,6 +594,9 @@ enum {
 
 	TCA_FLOWER_KEY_L2TPV3_SID,	/* be32 */
 
+	TCA_FLOWER_KEY_SPI,		/* be32 */
+	TCA_FLOWER_KEY_SPI_MASK,	/* be32 */
+
 	TCA_FLOWER_L2_MISS,		/* u8 */
 
 	TCA_FLOWER_KEY_CFM,		/* nested */

As per https://lore.kernel.org/netdev/20230731120254.GB87829@unreal/T/#u , I will move these fields to end in the enum.
Could you please discard https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/ this from netdev patchwork ?

#2 lore raw
Quoted 27 lines · Ratheesh Kannoth
Quoted 27 lines

From: Ratheesh Kannoth <[email protected]>
Sent: Tuesday, July 25, 2023 9:20 AM
To: [email protected]; [email protected]
Cc: [email protected]; Ratheesh Kannoth <[email protected]>
Subject: [PATCH iproute2-next] tc: Classifier support for SPI field

tc flower support for SPI field in ESP and AH packets.

---
 include/uapi/linux/pkt_cls.h |  5 +++-
 tc/f_flower.c                | 55 ++++++++++++++++++++++++++++++++++--
 2 files changed, 57 insertions(+), 3 deletions(-)
include/uapi/linux/pkt_cls.h index renamed from include/uapi/linux/pkt_cls.h +0 -0

7865f5a9..fce639a6 100644

include/uapi/linux/pkt_cls.h +3 -0
@@ -594,6 +594,9 @@ enum {
 
 	TCA_FLOWER_KEY_L2TPV3_SID,	/* be32 */
 
+	TCA_FLOWER_KEY_SPI,		/* be32 */
+	TCA_FLOWER_KEY_SPI_MASK,	/* be32 */
+
 	TCA_FLOWER_L2_MISS,		/* u8 */
 
Quoted 4 lines

include/uapi/linux/pkt_cls.h enum { · line 602

Quoted 1 line
include/uapi/linux/pkt_cls.h +0 -0
 	TCA_FLOWER_KEY_CFM,		/* nested */

As per https://lore.kernel.org/netdev/20230731120254.GB87829@unreal/T/#u , I will move these fields to end in the enum.
Could you please discard https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/ this from netdev patchwork ?

you do not need to include uapi changes in an iproute2 patch; headers are sync'ed from the kernel.

#3 lore raw
Quoted 19 lines

From: David Ahern <[email protected]>
Sent: Tuesday, August 1, 2023 8:06 AM
To: Ratheesh Kannoth <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Leon Romanovsky <[email protected]>; [email protected]; [email protected]
Subject: [EXT] Re: [PATCH iproute2-next] tc: Classifier support for SPI field

Quoted 11 lines

--- a/include/uapi/linux/pkt_cls.h

Quoted 10 lines

+++ b/include/uapi/linux/pkt_cls.h

include/uapi/linux/pkt_cls.h +3 -0
@@ -594,6 +594,9 @@ enum {
 
 	TCA_FLOWER_KEY_L2TPV3_SID,	/* be32 */
 
+	TCA_FLOWER_KEY_SPI,		/* be32 */
+	TCA_FLOWER_KEY_SPI_MASK,	/* be32 */
+
 	TCA_FLOWER_L2_MISS,		/* u8 */
 
Quoted 5 lines
Quoted 2 lines

include/uapi/linux/pkt_cls.h enum { · line 602

Quoted 1 line
include/uapi/linux/pkt_cls.h +0 -0
 	TCA_FLOWER_KEY_CFM,		/* nested */

you do not need to include uapi changes in an iproute2 patch; headers are sync'ed from the kernel.

Thanks, but if user is compiling ip-route2 package in a different linux machine ? This is what I did. Not compiled against the kernel that I use. Backward compatibility will also break in this case, right ? correct me.

#4 lore raw
Quoted 3 lines · Ratheesh Kannoth

Thanks, but if user is compiling ip-route2 package in a different linux machine ? This is what I did. Not compiled against the kernel that I use. Backward compatibility will also break in this case, right ? correct me.

See git log on your git clone.

#6 lore raw
Quoted 8 lines

From: Ratheesh Kannoth
Sent: Tuesday, August 1, 2023 8:20 AM
To: David Ahern <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Leon Romanovsky <[email protected]>; [email protected]; [email protected]
Subject: RE: Re: [PATCH iproute2-next] tc: Classifier support for SPI field Got it. Thanks a lot !!

Linux kernel patches merged to net-next.
Should I repush iproute2-next patch ? https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/
I could not find the above patch in the live patches being tracked https://patchwork.kernel.org/project/netdevbpf/list/

-Ratheesh

#7 lore raw
Quoted 9 lines · Ratheesh Kannoth
Quoted 8 lines

From: Ratheesh Kannoth
Sent: Tuesday, August 1, 2023 8:20 AM
To: David Ahern <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Leon Romanovsky <[email protected]>; [email protected]; [email protected]
Subject: RE: Re: [PATCH iproute2-next] tc: Classifier support for SPI field Got it. Thanks a lot !!

Quoted 5 lines

Linux kernel patches merged to net-next.
Should I repush iproute2-next patch ? https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/
I could not find the above patch in the live patches being tracked https://patchwork.kernel.org/project/netdevbpf/list/

-Ratheesh

I just merged header update. pull latest -next repo and update your patch

#8 lore raw
Quoted 4 lines

From: David Ahern <[email protected]>
Sent: Wednesday, August 2, 2023 9:01 PM
Subject: [EXT] Re: [PATCH iproute2-next] tc: Classifier support for SPI field I just merged header update. pull latest -next repo and update your patch

Done. Reposted the patch.