Commit 38419a85 authored by Wang Hai's avatar Wang Hai Committed by Zhengchao Shao
Browse files

kabi: net: reserve space for net bpf subsystem related structure

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8OWRC



----------------------------------------------------

Reserve some fields beforehand for net bpf framework related
structures prone to change.

Signed-off-by: default avatarWang Hai <wanghai38@huawei.com>
Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
parent 5d354190
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
#include <net/sock.h>
#include <net/tcp.h>
#include <net/strparser.h>
#include <linux/kabi.h>

#define MAX_MSG_FRAGS			MAX_SKB_FRAGS
#define NR_MSG_FRAG_IDS			(MAX_MSG_FRAGS + 1)
@@ -58,6 +59,11 @@ struct sk_psock_progs {
	struct bpf_prog			*stream_parser;
	struct bpf_prog			*stream_verdict;
	struct bpf_prog			*skb_verdict;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
};

enum sk_psock_state_bits {
@@ -108,6 +114,11 @@ struct sk_psock {
	struct delayed_work		work;
	struct sock			*sk_pair;
	struct rcu_work			rwork;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
};

int sk_msg_alloc(struct sock *sk, struct sk_msg *msg, int len,
+6 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
#include <linux/memcontrol.h>
#include <linux/bpf-cgroup.h>
#include <linux/siphash.h>
#include <linux/kabi.h>

extern struct inet_hashinfo tcp_hashinfo;

@@ -1112,6 +1113,11 @@ struct tcp_congestion_ops {
	void (*init)(struct sock *sk);
	/* cleanup private data  (optional) */
	void (*release)(struct sock *sk);

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
} ____cacheline_aligned_in_smp;

int tcp_register_congestion_control(struct tcp_congestion_ops *type);
+6 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
#include <linux/filter.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h> /* skb_shared_info */
#include <linux/kabi.h>

/**
 * DOC: XDP RX-queue information
@@ -64,6 +65,11 @@ struct xdp_rxq_info {
	struct xdp_mem_info mem;
	unsigned int napi_id;
	u32 frag_size;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
} ____cacheline_aligned; /* perf critical, avoid false-sharing */

struct xdp_txq_info {