Blame SOURCES/9003-Add-xsk_umem_adjust_offset.patch

d8f823
Index: src/drivers/net/ethernet/mellanox/mlx5/core/backport_compat.h
d8f823
===================================================================
d8f823
--- src.orig/drivers/net/ethernet/mellanox/mlx5/core/backport_compat.h	2020-07-14 20:07:10.942801484 +0200
d8f823
+++ src/drivers/net/ethernet/mellanox/mlx5/core/backport_compat.h	2020-07-14 20:07:49.481861209 +0200
d8f823
@@ -1,4 +1,17 @@
d8f823
 #ifndef MLX5_BACKPORT_COMPAT_H
d8f823
 #define MLX5_BACKPORT_COMPAT_H
d8f823
 
d8f823
+#include <net/xdp_sock.h>
d8f823
+
d8f823
+
d8f823
+/*
d8f823
+ * A stub for xsk_umem_adjust_offset; since only unaligned mode is supported
d8f823
+ * in RHEL 8.2; the code is somewhat simplified.
d8f823
+ */
d8f823
+static inline u64 xsk_umem_adjust_offset(struct xdp_umem *umem, u64 address,
d8f823
+                                         u64 offset)
d8f823
+{
d8f823
+        return address + offset;
d8f823
+}
d8f823
+
d8f823
 #endif
d8f823
Index: src/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
d8f823
===================================================================
d8f823
--- src.orig/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c	2020-07-14 20:07:07.866796717 +0200
d8f823
+++ src/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c	2020-07-14 20:07:10.954801503 +0200
d8f823
@@ -34,6 +34,7 @@
d8f823
 #include <net/xdp_sock.h>
d8f823
 #include "en/xdp.h"
d8f823
 #include "en/params.h"
d8f823
+#include "backport_compat.h"
d8f823
 
d8f823
 int mlx5e_xdp_max_mtu(struct mlx5e_params *params, struct mlx5e_xsk_param *xsk)
d8f823
 {
d8f823
Index: src/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
d8f823
===================================================================
d8f823
--- src.orig/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c	2020-07-14 20:07:07.809796629 +0200
d8f823
+++ src/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c	2020-07-14 20:07:55.423870417 +0200
d8f823
@@ -4,6 +4,7 @@
d8f823
 #include "rx.h"
d8f823
 #include "en/xdp.h"
d8f823
 #include <net/xdp_sock.h>
d8f823
+#include "../../backport_compat.h"
d8f823
 
d8f823
 /* RX data path */
d8f823