[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210324194332.153658-1-idosch@idosch.org>
Date: Wed, 24 Mar 2021 21:43:32 +0200
From: Ido Schimmel <idosch@...sch.org>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, yotam.gi@...il.com,
jiri@...dia.com, petrm@...dia.com, chrism@...lanox.com,
sfr@...b.auug.org.au, Ido Schimmel <idosch@...dia.com>,
stable@...r.kernel.org
Subject: [PATCH net] psample: Fix user API breakage
From: Ido Schimmel <idosch@...dia.com>
Cited commit added a new attribute before the existing group reference
count attribute, thereby changing its value and breaking existing
applications on new kernels.
Before:
# psample -l
libpsample ERROR psample_group_foreach: failed to recv message: Operation not supported
After:
# psample -l
Group Num Refcount Group Seq
1 1 0
Fix by restoring the value of the old attribute and remove the
misleading comments from the enumerator to avoid future bugs.
Cc: stable@...r.kernel.org
Fixes: d8bed686ab96 ("net: psample: Add tunnel support")
Signed-off-by: Ido Schimmel <idosch@...dia.com>
Reported-by: Adiel Bidani <adielb@...dia.com>
Reviewed-by: Jiri Pirko <jiri@...dia.com>
Reviewed-by: Petr Machata <petrm@...dia.com>
---
Dave, Jakub, Stephen, there might be a trivial conflict when you merge
net into net-next. If so, see resolution here:
https://github.com/jpirko/linux_mlxsw/commit/d47ac079ef169d3ab07c85e9178a925f7dffbebe.patch
---
include/uapi/linux/psample.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/include/uapi/linux/psample.h b/include/uapi/linux/psample.h
index aea26ab1431c..bff5032c98df 100644
--- a/include/uapi/linux/psample.h
+++ b/include/uapi/linux/psample.h
@@ -3,7 +3,6 @@
#define __UAPI_PSAMPLE_H
enum {
- /* sampled packet metadata */
PSAMPLE_ATTR_IIFINDEX,
PSAMPLE_ATTR_OIFINDEX,
PSAMPLE_ATTR_ORIGSIZE,
@@ -11,10 +10,8 @@ enum {
PSAMPLE_ATTR_GROUP_SEQ,
PSAMPLE_ATTR_SAMPLE_RATE,
PSAMPLE_ATTR_DATA,
- PSAMPLE_ATTR_TUNNEL,
-
- /* commands attributes */
PSAMPLE_ATTR_GROUP_REFCOUNT,
+ PSAMPLE_ATTR_TUNNEL,
__PSAMPLE_ATTR_MAX
};
--
2.30.2
Powered by blists - more mailing lists