Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9010c0ec authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "net: Add snapshot of sockev module" into msm-4.14

parents 4e64f349 f7f2e20b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -13,3 +13,5 @@ endif
ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),)
no-export-headers += kvm_para.h
endif

header-y += sockev.h
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
#define NETLINK_RDMA		20
#define NETLINK_CRYPTO		21	/* Crypto layer */
#define NETLINK_SMC		22	/* SMC monitoring */

#define NETLINK_SOCKEV		23	/* Socket Administrative Events */
#define NETLINK_INET_DIAG	NETLINK_SOCK_DIAG

#define MAX_LINKS 32		
+31 −0
Original line number Diff line number Diff line
#ifndef _SOCKEV_H_
#define _SOCKEV_H_

#include <linux/types.h>
#include <linux/netlink.h>
#include <linux/socket.h>

enum sknetlink_groups {
	SKNLGRP_UNICAST,
	SKNLGRP_SOCKEV,
	__SKNLGRP_MAX
};

#define SOCKEV_STR_MAX 32

/********************************************************************
 *		Socket operation messages
 ****/

struct sknlsockevmsg {
	__u8 event[SOCKEV_STR_MAX];
	__u32 pid; /* (struct task_struct*)->pid */
	__u16 skfamily; /* (struct socket*)->sk->sk_family */
	__u8 skstate; /* (struct socket*)->sk->sk_state */
	__u8 skprotocol; /* (struct socket*)->sk->sk_protocol */
	__u16 sktype; /* (struct socket*)->sk->sk_type */
	__u64 skflags; /* (struct socket*)->sk->sk_flags */
};

#endif /* _SOCKEV_H_ */
+9 −0
Original line number Diff line number Diff line
@@ -326,6 +326,15 @@ config NET_FLOW_LIMIT
	  with many clients some protection against DoS by a single (spoofed)
	  flow that greatly exceeds average workload.

config SOCKEV_NLMCAST
	bool "Enable SOCKEV Netlink Multicast"
	default n
	---help---
	  Default client for SOCKEV notifier events. Sends multicast netlink
	  messages whenever the socket event notifier is invoked. Enable if
	  user space entities need to be notified of socket events without
	  having to poll /proc

menu "Network testing"

config NET_PKTGEN
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ obj-$(CONFIG_CGROUP_NET_PRIO) += netprio_cgroup.o
obj-$(CONFIG_CGROUP_NET_CLASSID) += netclassid_cgroup.o
obj-$(CONFIG_LWTUNNEL) += lwtunnel.o
obj-$(CONFIG_LWTUNNEL_BPF) += lwt_bpf.o
obj-$(CONFIG_SOCKEV_NLMCAST) += sockev_nlmcast.o
obj-$(CONFIG_DST_CACHE) += dst_cache.o
obj-$(CONFIG_HWBM) += hwbm.o
obj-$(CONFIG_NET_DEVLINK) += devlink.o
Loading