|
|
86f512 |
From 5ca08b7fac24f21cfd1ae02dbc10e3886f68d858 Mon Sep 17 00:00:00 2001
|
|
|
86f512 |
From: Eugene Syromyatnikov <evgsyr@gmail.com>
|
|
|
86f512 |
Date: Thu, 10 Oct 2019 11:23:00 +0200
|
|
|
86f512 |
Subject: [PATCH 55/76] xlat: provide fallback definitions for XDP_FLAGS_*
|
|
|
86f512 |
constants
|
|
|
86f512 |
|
|
|
86f512 |
* xlat/xdp_flags.in: Add fallback definitions.
|
|
|
86f512 |
|
|
|
86f512 |
References: https://bugzilla.redhat.com/show_bug.cgi?id=1758201
|
|
|
86f512 |
---
|
|
|
86f512 |
xlat/xdp_flags.in | 10 +++++-----
|
|
|
86f512 |
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
86f512 |
|
|
|
86f512 |
Index: strace-5.1/xlat/xdp_flags.in
|
|
|
86f512 |
===================================================================
|
|
|
86f512 |
--- strace-5.1.orig/xlat/xdp_flags.in 2017-09-03 17:39:24.000000000 +0200
|
|
|
86f512 |
+++ strace-5.1/xlat/xdp_flags.in 2020-01-29 12:16:20.823861980 +0100
|
|
|
86f512 |
@@ -1,5 +1,5 @@
|
|
|
86f512 |
-XDP_FLAGS_MODES
|
|
|
86f512 |
-XDP_FLAGS_UPDATE_IF_NOEXIST
|
|
|
86f512 |
-XDP_FLAGS_SKB_MODE
|
|
|
86f512 |
-XDP_FLAGS_DRV_MODE
|
|
|
86f512 |
-XDP_FLAGS_HW_MODE
|
|
|
86f512 |
+XDP_FLAGS_MODES 0xe
|
|
|
86f512 |
+XDP_FLAGS_UPDATE_IF_NOEXIST 0x1
|
|
|
86f512 |
+XDP_FLAGS_SKB_MODE 0x2
|
|
|
86f512 |
+XDP_FLAGS_DRV_MODE 0x4
|
|
|
86f512 |
+XDP_FLAGS_HW_MODE 0x8
|
|
|
86f512 |
Index: strace-5.1/xlat/xdp_flags.h
|
|
|
86f512 |
===================================================================
|
|
|
86f512 |
--- strace-5.1.orig/xlat/xdp_flags.h 2019-05-22 15:08:31.000000000 +0200
|
|
|
86f512 |
+++ strace-5.1/xlat/xdp_flags.h 2020-01-29 12:16:47.515705540 +0100
|
|
|
86f512 |
@@ -3,6 +3,41 @@
|
|
|
86f512 |
#include "gcc_compat.h"
|
|
|
86f512 |
#include "static_assert.h"
|
|
|
86f512 |
|
|
|
86f512 |
+#if defined(XDP_FLAGS_MODES) || (defined(HAVE_DECL_XDP_FLAGS_MODES) && HAVE_DECL_XDP_FLAGS_MODES)
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((XDP_FLAGS_MODES) == (0xe), "XDP_FLAGS_MODES != 0xe");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define XDP_FLAGS_MODES 0xe
|
|
|
86f512 |
+#endif
|
|
|
86f512 |
+#if defined(XDP_FLAGS_UPDATE_IF_NOEXIST) || (defined(HAVE_DECL_XDP_FLAGS_UPDATE_IF_NOEXIST) && HAVE_DECL_XDP_FLAGS_UPDATE_IF_NOEXIST)
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((XDP_FLAGS_UPDATE_IF_NOEXIST) == (0x1), "XDP_FLAGS_UPDATE_IF_NOEXIST != 0x1");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define XDP_FLAGS_UPDATE_IF_NOEXIST 0x1
|
|
|
86f512 |
+#endif
|
|
|
86f512 |
+#if defined(XDP_FLAGS_SKB_MODE) || (defined(HAVE_DECL_XDP_FLAGS_SKB_MODE) && HAVE_DECL_XDP_FLAGS_SKB_MODE)
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((XDP_FLAGS_SKB_MODE) == (0x2), "XDP_FLAGS_SKB_MODE != 0x2");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define XDP_FLAGS_SKB_MODE 0x2
|
|
|
86f512 |
+#endif
|
|
|
86f512 |
+#if defined(XDP_FLAGS_DRV_MODE) || (defined(HAVE_DECL_XDP_FLAGS_DRV_MODE) && HAVE_DECL_XDP_FLAGS_DRV_MODE)
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((XDP_FLAGS_DRV_MODE) == (0x4), "XDP_FLAGS_DRV_MODE != 0x4");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define XDP_FLAGS_DRV_MODE 0x4
|
|
|
86f512 |
+#endif
|
|
|
86f512 |
+#if defined(XDP_FLAGS_HW_MODE) || (defined(HAVE_DECL_XDP_FLAGS_HW_MODE) && HAVE_DECL_XDP_FLAGS_HW_MODE)
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((XDP_FLAGS_HW_MODE) == (0x8), "XDP_FLAGS_HW_MODE != 0x8");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define XDP_FLAGS_HW_MODE 0x8
|
|
|
86f512 |
+#endif
|
|
|
86f512 |
|
|
|
86f512 |
#ifndef XLAT_MACROS_ONLY
|
|
|
86f512 |
|
|
|
86f512 |
@@ -14,21 +49,11 @@
|
|
|
86f512 |
|
|
|
86f512 |
static
|
|
|
86f512 |
const struct xlat xdp_flags[] = {
|
|
|
86f512 |
-#if defined(XDP_FLAGS_MODES) || (defined(HAVE_DECL_XDP_FLAGS_MODES) && HAVE_DECL_XDP_FLAGS_MODES)
|
|
|
86f512 |
- XLAT(XDP_FLAGS_MODES),
|
|
|
86f512 |
-#endif
|
|
|
86f512 |
-#if defined(XDP_FLAGS_UPDATE_IF_NOEXIST) || (defined(HAVE_DECL_XDP_FLAGS_UPDATE_IF_NOEXIST) && HAVE_DECL_XDP_FLAGS_UPDATE_IF_NOEXIST)
|
|
|
86f512 |
- XLAT(XDP_FLAGS_UPDATE_IF_NOEXIST),
|
|
|
86f512 |
-#endif
|
|
|
86f512 |
-#if defined(XDP_FLAGS_SKB_MODE) || (defined(HAVE_DECL_XDP_FLAGS_SKB_MODE) && HAVE_DECL_XDP_FLAGS_SKB_MODE)
|
|
|
86f512 |
- XLAT(XDP_FLAGS_SKB_MODE),
|
|
|
86f512 |
-#endif
|
|
|
86f512 |
-#if defined(XDP_FLAGS_DRV_MODE) || (defined(HAVE_DECL_XDP_FLAGS_DRV_MODE) && HAVE_DECL_XDP_FLAGS_DRV_MODE)
|
|
|
86f512 |
- XLAT(XDP_FLAGS_DRV_MODE),
|
|
|
86f512 |
-#endif
|
|
|
86f512 |
-#if defined(XDP_FLAGS_HW_MODE) || (defined(HAVE_DECL_XDP_FLAGS_HW_MODE) && HAVE_DECL_XDP_FLAGS_HW_MODE)
|
|
|
86f512 |
- XLAT(XDP_FLAGS_HW_MODE),
|
|
|
86f512 |
-#endif
|
|
|
86f512 |
+ XLAT(XDP_FLAGS_MODES),
|
|
|
86f512 |
+ XLAT(XDP_FLAGS_UPDATE_IF_NOEXIST),
|
|
|
86f512 |
+ XLAT(XDP_FLAGS_SKB_MODE),
|
|
|
86f512 |
+ XLAT(XDP_FLAGS_DRV_MODE),
|
|
|
86f512 |
+ XLAT(XDP_FLAGS_HW_MODE),
|
|
|
86f512 |
XLAT_END
|
|
|
86f512 |
};
|
|
|
86f512 |
|