From e3fec2f74f7f90d2149a24243a4d040caabe6f30 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 17 Dec 2013 21:26:19 -0500 Subject: lib: Add missing arch generic-y entries for asm-generic/hash.h Reported-by: Stephen Rothwell Signed-off-by: David S. Miller --- arch/sparc/include/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/sparc/include') diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild index bf390667657a..4b60a0c325ec 100644 --- a/arch/sparc/include/asm/Kbuild +++ b/arch/sparc/include/asm/Kbuild @@ -17,3 +17,4 @@ generic-y += trace_clock.h generic-y += types.h generic-y += word-at-a-time.h generic-y += preempt.h +generic-y += hash.h -- cgit v1.2.1 From ea02f9411d9faa3553ed09ce0ec9f00ceae9885e Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Fri, 17 Jan 2014 17:09:45 +0100 Subject: net: introduce SO_BPF_EXTENSIONS For user space packet capturing libraries such as libpcap, there's currently only one way to check which BPF extensions are supported by the kernel, that is, commit aa1113d9f85d ("net: filter: return -EINVAL if BPF_S_ANC* operation is not supported"). For querying all extensions at once this might be rather inconvenient. Therefore, this patch introduces a new option which can be used as an argument for getsockopt(), and allows one to obtain information about which BPF extensions are supported by the current kernel. As David Miller suggests, we do not need to define any bits right now and status quo can just return 0 in order to state that this versions supports SKF_AD_PROTOCOL up to SKF_AD_PAY_OFFSET. Later additions to BPF extensions need to add their bits to the bpf_tell_extensions() function, as documented in the comment. Signed-off-by: Michal Sekletar Cc: David Miller Reviewed-by: Daniel Borkmann Signed-off-by: David S. Miller --- arch/sparc/include/uapi/asm/socket.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/sparc/include') diff --git a/arch/sparc/include/uapi/asm/socket.h b/arch/sparc/include/uapi/asm/socket.h index 0f21e9a5ca18..54d9608681b6 100644 --- a/arch/sparc/include/uapi/asm/socket.h +++ b/arch/sparc/include/uapi/asm/socket.h @@ -74,6 +74,8 @@ #define SO_MAX_PACING_RATE 0x0031 +#define SO_BPF_EXTENSIONS 0x0032 + /* Security levels - as per NRL IPv6 - don't actually do anything */ #define SO_SECURITY_AUTHENTICATION 0x5001 #define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 -- cgit v1.2.1