* [PATCH] mbuf: add new ptype for slow protocols
@ 2025-07-04 8:45 Mario Kuka
2025-07-04 9:38 ` Morten Brørup
2025-07-07 7:51 ` [PATCH v2] " Mario Kuka
0 siblings, 2 replies; 5+ messages in thread
From: Mario Kuka @ 2025-07-04 8:45 UTC (permalink / raw)
To: Paul Szczepanek, Patrick Robb; +Cc: dev, Mario Kuka
Introduce a new ptype for identifying slow protocol packets.
Signed-off-by: Mario Kuka <kuka@cesnet.cz>
---
dts/framework/remote_session/testpmd_shell.py | 2 ++
lib/mbuf/rte_mbuf_ptype.c | 1 +
lib/mbuf/rte_mbuf_ptype.h | 7 +++++++
3 files changed, 10 insertions(+)
diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py
index ac99bd09ef..8c3dda3ab4 100644
--- a/dts/framework/remote_session/testpmd_shell.py
+++ b/dts/framework/remote_session/testpmd_shell.py
@@ -1046,6 +1046,8 @@ class RtePTypes(Flag):
L2_ETHER_FCOE = auto()
#: MPLS packet type.
L2_ETHER_MPLS = auto()
+ #: Ethernet packet type for Slow Protocols.
+ L2_ETHER_SLOW = auto()
#: No L2 packet information.
L2_UNKNOWN = auto()
diff --git a/lib/mbuf/rte_mbuf_ptype.c b/lib/mbuf/rte_mbuf_ptype.c
index 2c80294498..6f5926344f 100644
--- a/lib/mbuf/rte_mbuf_ptype.c
+++ b/lib/mbuf/rte_mbuf_ptype.c
@@ -23,6 +23,7 @@ const char *rte_get_ptype_l2_name(uint32_t ptype)
case RTE_PTYPE_L2_ETHER_PPPOE: return "L2_ETHER_PPPOE";
case RTE_PTYPE_L2_ETHER_FCOE: return "L2_ETHER_FCOE";
case RTE_PTYPE_L2_ETHER_MPLS: return "L2_ETHER_MPLS";
+ case RTE_PTYPE_L2_ETHER_SLOW: return "L2_ETHER_SLOW";
default: return "L2_UNKNOWN";
}
}
diff --git a/lib/mbuf/rte_mbuf_ptype.h b/lib/mbuf/rte_mbuf_ptype.h
index c46a94f89f..66c4eeb954 100644
--- a/lib/mbuf/rte_mbuf_ptype.h
+++ b/lib/mbuf/rte_mbuf_ptype.h
@@ -144,6 +144,13 @@ extern "C" {
* <'ether type'=[0x8847|0x8848]>
*/
#define RTE_PTYPE_L2_ETHER_MPLS 0x0000000a
+/**
+ * Ethernet packet type for Slow Protocols.
+ *
+ * Packet format:
+ * <'ether type'=[0x8809]>
+ */
+#define RTE_PTYPE_L2_ETHER_SLOW 0x0000000b
/**
* Mask of layer 2 packet types.
* It is used for outer packet for tunneling cases.
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] mbuf: add new ptype for slow protocols
2025-07-04 8:45 [PATCH] mbuf: add new ptype for slow protocols Mario Kuka
@ 2025-07-04 9:38 ` Morten Brørup
2025-07-07 7:51 ` [PATCH v2] " Mario Kuka
1 sibling, 0 replies; 5+ messages in thread
From: Morten Brørup @ 2025-07-04 9:38 UTC (permalink / raw)
To: Mario Kuka, Paul Szczepanek, Patrick Robb; +Cc: dev
> diff --git a/lib/mbuf/rte_mbuf_ptype.h b/lib/mbuf/rte_mbuf_ptype.h
> index c46a94f89f..66c4eeb954 100644
> --- a/lib/mbuf/rte_mbuf_ptype.h
> +++ b/lib/mbuf/rte_mbuf_ptype.h
> @@ -144,6 +144,13 @@ extern "C" {
> * <'ether type'=[0x8847|0x8848]>
> */
> #define RTE_PTYPE_L2_ETHER_MPLS 0x0000000a
> +/**
> + * Ethernet packet type for Slow Protocols.
> + *
> + * Packet format:
> + * <'ether type'=[0x8809]>
> + */
> +#define RTE_PTYPE_L2_ETHER_SLOW 0x0000000b
Matching 'ether type' doesn't suffice.
Slow protocols also require 'destination mac'=01-80-C2-00-00-02.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] mbuf: add new ptype for slow protocols
2025-07-04 8:45 [PATCH] mbuf: add new ptype for slow protocols Mario Kuka
2025-07-04 9:38 ` Morten Brørup
@ 2025-07-07 7:51 ` Mario Kuka
2025-07-07 12:47 ` Morten Brørup
1 sibling, 1 reply; 5+ messages in thread
From: Mario Kuka @ 2025-07-07 7:51 UTC (permalink / raw)
To: dev; +Cc: Mario Kuka
Introduce a new ptype for identifying slow protocol packets.
Signed-off-by: Mario Kuka <kuka@cesnet.cz>
---
* Added 'destination mac'=01-80-C2-00-00-02 required by slow protocols.
* Change ether type value from optional to mandatory.
dts/framework/remote_session/testpmd_shell.py | 2 ++
lib/mbuf/rte_mbuf_ptype.c | 1 +
lib/mbuf/rte_mbuf_ptype.h | 7 +++++++
3 files changed, 10 insertions(+)
diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py
index ac99bd09ef..8c3dda3ab4 100644
--- a/dts/framework/remote_session/testpmd_shell.py
+++ b/dts/framework/remote_session/testpmd_shell.py
@@ -1046,6 +1046,8 @@ class RtePTypes(Flag):
L2_ETHER_FCOE = auto()
#: MPLS packet type.
L2_ETHER_MPLS = auto()
+ #: Ethernet packet type for Slow Protocols.
+ L2_ETHER_SLOW = auto()
#: No L2 packet information.
L2_UNKNOWN = auto()
diff --git a/lib/mbuf/rte_mbuf_ptype.c b/lib/mbuf/rte_mbuf_ptype.c
index 2c80294498..6f5926344f 100644
--- a/lib/mbuf/rte_mbuf_ptype.c
+++ b/lib/mbuf/rte_mbuf_ptype.c
@@ -23,6 +23,7 @@ const char *rte_get_ptype_l2_name(uint32_t ptype)
case RTE_PTYPE_L2_ETHER_PPPOE: return "L2_ETHER_PPPOE";
case RTE_PTYPE_L2_ETHER_FCOE: return "L2_ETHER_FCOE";
case RTE_PTYPE_L2_ETHER_MPLS: return "L2_ETHER_MPLS";
+ case RTE_PTYPE_L2_ETHER_SLOW: return "L2_ETHER_SLOW";
default: return "L2_UNKNOWN";
}
}
diff --git a/lib/mbuf/rte_mbuf_ptype.h b/lib/mbuf/rte_mbuf_ptype.h
index c46a94f89f..b38b4d91be 100644
--- a/lib/mbuf/rte_mbuf_ptype.h
+++ b/lib/mbuf/rte_mbuf_ptype.h
@@ -144,6 +144,13 @@ extern "C" {
* <'ether type'=[0x8847|0x8848]>
*/
#define RTE_PTYPE_L2_ETHER_MPLS 0x0000000a
+/**
+ * Ethernet packet type for Slow Protocols.
+ *
+ * Packet format:
+ * <'destination mac'=01-80-C2-00-00-02, 'ether type'=0x8809>
+ */
+#define RTE_PTYPE_L2_ETHER_SLOW 0x0000000b
/**
* Mask of layer 2 packet types.
* It is used for outer packet for tunneling cases.
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v2] mbuf: add new ptype for slow protocols
2025-07-07 7:51 ` [PATCH v2] " Mario Kuka
@ 2025-07-07 12:47 ` Morten Brørup
2025-07-07 14:48 ` Stephen Hemminger
0 siblings, 1 reply; 5+ messages in thread
From: Morten Brørup @ 2025-07-07 12:47 UTC (permalink / raw)
To: Mario Kuka, dev
> From: Mario Kuka [mailto:kuka@cesnet.cz]
> Sent: Monday, 7 July 2025 09.51
>
> Introduce a new ptype for identifying slow protocol packets.
>
> Signed-off-by: Mario Kuka <kuka@cesnet.cz>
> * <'ether type'=[0x8847|0x8848]>
> */
> #define RTE_PTYPE_L2_ETHER_MPLS 0x0000000a
> +/**
> + * Ethernet packet type for Slow Protocols.
> + *
> + * Packet format:
> + * <'destination mac'=01-80-C2-00-00-02, 'ether type'=0x8809>
> + */
> +#define RTE_PTYPE_L2_ETHER_SLOW 0x0000000b
I'm not sure that we want to register individual packet types for Layer 2 control protocol type packets, where the packet rate is very low.
Consider the endless list of vendor proprietary Layer 2 control protocols, such as Cicso Link Layer Protocols, Realtek Layer 2 Protocols, MikroTik RoMON, etc. The list would explode if we started adding these.
IMO, only data carrying packet types (IPv4, IPv6, PPPoE, etc.) should be registered as individual packet types. The rest should be sorted manually by the application.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] mbuf: add new ptype for slow protocols
2025-07-07 12:47 ` Morten Brørup
@ 2025-07-07 14:48 ` Stephen Hemminger
0 siblings, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2025-07-07 14:48 UTC (permalink / raw)
To: Morten Brørup; +Cc: Mario Kuka, dev
On Mon, 7 Jul 2025 14:47:17 +0200
Morten Brørup <mb@smartsharesystems.com> wrote:
> > From: Mario Kuka [mailto:kuka@cesnet.cz]
> > Sent: Monday, 7 July 2025 09.51
> >
> > Introduce a new ptype for identifying slow protocol packets.
> >
> > Signed-off-by: Mario Kuka <kuka@cesnet.cz>
>
> > * <'ether type'=[0x8847|0x8848]>
> > */
> > #define RTE_PTYPE_L2_ETHER_MPLS 0x0000000a
> > +/**
> > + * Ethernet packet type for Slow Protocols.
> > + *
> > + * Packet format:
> > + * <'destination mac'=01-80-C2-00-00-02, 'ether type'=0x8809>
> > + */
> > +#define RTE_PTYPE_L2_ETHER_SLOW 0x0000000b
>
> I'm not sure that we want to register individual packet types for Layer 2 control protocol type packets, where the packet rate is very low.
>
> Consider the endless list of vendor proprietary Layer 2 control protocols, such as Cicso Link Layer Protocols, Realtek Layer 2 Protocols, MikroTik RoMON, etc. The list would explode if we started adding these.
>
> IMO, only data carrying packet types (IPv4, IPv6, PPPoE, etc.) should be registered as individual packet types. The rest should be sorted manually by the application.
>
The original purpose of ptype was to handle cases where hardware has offload
capability to identify these packets (like IPv4, IPv6, etc). It doesn't make sense
to me to have all the possible protocols there.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-07-07 14:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-04 8:45 [PATCH] mbuf: add new ptype for slow protocols Mario Kuka
2025-07-04 9:38 ` Morten Brørup
2025-07-07 7:51 ` [PATCH v2] " Mario Kuka
2025-07-07 12:47 ` Morten Brørup
2025-07-07 14:48 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).