Re: [PATCH net-next v8 08/15] p4tc: add P4 data types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thu, Nov 16, 2023 at 03:59:41PM CET, jhs@xxxxxxxxxxxx wrote:

[...]

>diff --git a/include/net/p4tc_types.h b/include/net/p4tc_types.h
>new file mode 100644
>index 000000000..8f6f002ae

[...]

>+#define P4T_MAX_BITSZ 128

[...]

>+#define P4T_MAX_STR_SZ 32

[...]


>diff --git a/include/uapi/linux/p4tc.h b/include/uapi/linux/p4tc.h
>new file mode 100644
>index 000000000..ba32dba66
>--- /dev/null
>+++ b/include/uapi/linux/p4tc.h
>@@ -0,0 +1,33 @@
>+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
>+#ifndef __LINUX_P4TC_H
>+#define __LINUX_P4TC_H
>+
>+#define P4TC_MAX_KEYSZ 512
>+
>+enum {
>+	P4T_UNSPEC,

I wonder, what it the reason for "P4T"/"P4TC" prefix inconsistency.
In the kernel header, that could be fixes, but in uapi header this is
forever. Is this just to be aligned with other TC uapi
inconsitencies? :D


>+	P4T_U8,
>+	P4T_U16,
>+	P4T_U32,
>+	P4T_U64,
>+	P4T_STRING,
>+	P4T_S8,
>+	P4T_S16,
>+	P4T_S32,
>+	P4T_S64,
>+	P4T_MACADDR,
>+	P4T_IPV4ADDR,
>+	P4T_BE16,
>+	P4T_BE32,
>+	P4T_BE64,
>+	P4T_U128,
>+	P4T_S128,
>+	P4T_BOOL,
>+	P4T_DEV,
>+	P4T_KEY,
>+	__P4T_MAX,
>+};
>+
>+#define P4T_MAX (__P4T_MAX - 1)
>+
>+#endif

[...]




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux