netsniff-ng-libs = -lpthread ifeq ($(CONFIG_LIBPCAP), 1) netsniff-ng-libs += -lpcap endif ifeq ($(CONFIG_GEOIP), 1) netsniff-ng-libs += -lGeoIP \ -lz endif ifeq ($(CONFIG_LIBNL), 1) netsniff-ng-libs += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs libnl-3.0) \ $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs libnl-genl-3.0) \ $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs libnl-route-3.0) endif netsniff-ng-objs = dissector.o \ dissector_sll.o \ dissector_eth.o \ dissector_80211.o \ dissector_netlink.o \ lookup.o \ proto_arp.o \ proto_ethernet.o \ proto_icmpv4.o \ proto_icmpv6.o \ proto_igmp.o \ proto_ip_authentication_hdr.o \ proto_ip_esp.o \ proto_ipv4.o \ proto_ipv6.o \ proto_ipv6_dest_opts.o \ proto_ipv6_fragm.o \ proto_ipv6_hop_by_hop.o \ proto_ipv6_in_ipv4.o \ proto_ipv6_mobility_hdr.o \ proto_ipv6_no_nxt_hdr.o \ proto_ipv6_routing.o \ proto_lldp.o \ proto_none.o \ proto_tcp.o \ proto_udp.o \ proto_vlan.o \ proto_vlan_q_in_q.o \ proto_mpls_unicast.o \ proto_80211_mac_hdr.o \ privs.o \ proc.o \ dev.o \ str.o \ sig.o \ sock.o \ irq.o \ iosched.o \ ioops.o \ link.o \ xmalloc.o \ hash.o \ bpf.o \ pcap_rw.o \ pcap_sg.o \ pcap_mm.o \ ring_rx.o \ ring_tx.o \ ring.o \ tprintf.o \ timer.o \ die.o \ sysctl.o \ netsniff-ng.o ifeq ($(CONFIG_LIBPCAP), 1) netsniff-ng-objs += bpf_comp.o endif ifeq ($(CONFIG_GEOIP), 1) netsniff-ng-objs += geoip.o endif ifeq ($(CONFIG_HWTSTAMP), 1) netsniff-ng-objs += tstamping.o endif ifeq ($(CONFIG_LIBNL), 1) netsniff-ng-objs += mac80211.o \ proto_nlmsg.o endif netsniff-ng-eflags = -DNEED_TCPDUMP_LIKE_FILTER ifeq ($(CONFIG_LIBNL), 1) netsniff-ng-eflags += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --cflags libnl-3.0) \ $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --cflags libnl-genl-3.0) \ $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --cflags libnl-route-3.0) endif netsniff-ng-confs = ether.conf \ tcp.conf \ udp.conf \ oui.conf \ geoip.conf td class='form'>
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-09-23 22:23:59 +0200
committerDavid S. Miller <davem@davemloft.net>2016-09-26 02:26:29 -0400
commitb47c62c5de2bc43a26bcaca8d7a93bf9dee66ffe (patch)
tree2f55cb728bfb2cae2fd2143cddb3ccbbc5be7141
parente2072600a24161b7ddcfb26814f69f5fbc8ef85a (diff)
nfp: bpf: improve handling for disabled BPF syscall
I stumbled over a new warning during randconfig testing, with CONFIG_BPF_SYSCALL disabled: drivers/net/ethernet/netronome/nfp/nfp_net_offload.c: In function 'nfp_net_bpf_offload': drivers/net/ethernet/netronome/nfp/nfp_net_offload.c:263:3: error: '*((void *)&res+4)' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/net/ethernet/netronome/nfp/nfp_net_offload.c:263:3: error: 'res.n_instr' may be used uninitialized in this function [-Werror=maybe-uninitialized] As far as I can tell, this is a false positive caused by the compiler getting confused about a function that is partially inlined, but it's easy to avoid while improving the code: The nfp_bpf_jit() stub helper for that configuration is unusual as it is defined in a header file but not marked 'static inline'. By moving the compile-time check into the caller using the IS_ENABLED() macro, we can remove that stub and simplify the nfp_net_bpf_offload_prepare() function enough to unconfuse the compiler. Fixes: 7533fdc0f77f ("nfp: bpf: add hardware bpf offload") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat