summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tools: bpf: make install should build firstJiri Benc2018-03-091-2/+4
| | | | | | | | Make the 'install' target depend on the 'all' target to build the binaries first. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
* tools: bpf: consistent make bpf_installJiri Benc2018-03-091-4/+6
| | | | | | | | | | | | Currently, make bpf_install in tools/ does not respect DESTDIR. Moreover, it installs to /usr/bin/ unconditionally. Let it respect DESTDIR and allow prefix to be specified. Also, to be more consistent with bpftool and with the usual customs, default the prefix to /usr/local instead of /usr. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
* tools: bpf: respect output directory during buildJiri Benc2018-03-091-16/+22
| | | | | | | | Currently, the programs under tools/bpf (with the notable exception of bpftool) do not respect the output directory (make O=dir). Fix that. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
* tools: bpftool: silence 'missing initializer' warningsJiri Benc2018-03-091-1/+1
| | | | | | | | | | | | | | | | | | | When building bpf tool, gcc emits piles of warnings: prog.c: In function ‘prog_fd_by_tag’: prog.c:101:9: warning: missing initializer for field ‘type’ of ‘struct bpf_prog_info’ [-Wmissing-field-initializers] struct bpf_prog_info info = {}; ^ In file included from /home/storage/jbenc/git/net-next/tools/lib/bpf/bpf.h:26:0, from prog.c:47: /home/storage/jbenc/git/net-next/tools/include/uapi/linux/bpf.h:925:8: note: ‘type’ declared here __u32 type; ^ As these warnings are not useful, switch them off. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
* Merge branch 'bpf-perf-sample-addr'Daniel Borkmann2018-03-084-4/+36
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teng Qin says: ==================== These patches add support that allows bpf programs attached to perf events to read the address values recorded with the perf events. These values are requested by specifying sample_type with PERF_SAMPLE_ADDR when calling perf_event_open(). The main motivation for these changes is to support building memory or lock access profiling and tracing tools. For example on Intel CPUs, the recorded address values for supported memory or lock access perf events would be the access or lock target addresses from PEBS buffer. Such information would be very valuable for building tools that help understand memory access or lock acquire pattern. ==================== Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
| * samples/bpf: add example to test reading addressTeng Qin2018-03-082-0/+19
| | | | | | | | | | | | | | | | | | | | This commit adds additional test in the trace_event example, by attaching the bpf program to MEM_UOPS_RETIRED.LOCK_LOADS event with PERF_SAMPLE_ADDR requested, and print the lock address value read from the bpf program to trace_pipe. Signed-off-by: Teng Qin <qinteng@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
| * bpf: add support to read sample address in bpf programTeng Qin2018-03-082-4/+17
|/ | | | | | | | | | | This commit adds new field "addr" to bpf_perf_event_data which could be read and used by bpf programs attached to perf events. The value of the field is copied from bpf_perf_event_data_kern.addr and contains the address value recorded by specifying sample_type with PERF_SAMPLE_ADDR when calling perf_event_open. Signed-off-by: Teng Qin <qinteng@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
* ip6mr: remove synchronize_rcu() in favor of SOCK_RCU_FREEEric Dumazet2018-03-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Kirill found that recently added synchronize_rcu() call in ip6mr_sk_done() was slowing down netns dismantle and posted a patch to use it only if the socket was found. I instead suggested to get rid of this call, and use instead SOCK_RCU_FREE We might later change IPv4 side to use the same technique and unify both stacks. IPv4 does not use synchronize_rcu() but has a call_rcu() that could be replaced by SOCK_RCU_FREE. Tested: time for i in {1..1000}; do unshare -n /bin/false;done Before : real 7m18.911s After : real 10.187s Fixes: 8571ab479a6e ("ip6mr: Make mroute_sk rcu-based") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Kirill Tkhai <ktkhai@virtuozzo.com> Cc: Yuval Mintz <yuvalm@mellanox.com> Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'RDS-zerocopy-code-enhancements'David S. Miller2018-03-074-85/+138
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sowmini Varadhan says: ==================== RDS: zerocopy code enhancements A couple of enhancements to the rds zerocop code - patch 1 refactors rds_message_copy_from_user to pull the zcopy logic into its own function - patch 2 drops the usage sk_buff to track MSG_ZEROCOPY cookies and uses a simple linked list (enhancement suggested by willemb during code review) ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * rds: use list structure to track information for zerocopy completion ↵Sowmini Varadhan2018-03-074-44/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | notification Commit 401910db4cd4 ("rds: deliver zerocopy completion notification with data") removes support fo r zerocopy completion notification on the sk_error_queue, thus we no longer need to track the cookie information in sk_buff structures. This commit removes the struct sk_buff_head rs_zcookie_queue by a simpler list that results in a smaller memory footprint as well as more efficient memory_allocation time. Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * rds: refactor zcopy code into rds_message_zcopy_from_userSowmini Varadhan2018-03-071-48/+60
|/ | | | | | | | | | Move the large block of code predicated on zcopy from rds_message_copy_from_user into a new function, rds_message_zcopy_from_user() Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: remove VLA usageGustavo A. R. Silva2018-03-071-4/+4
| | | | | | | | | | | Remove VLA usage and change the 'len' argument to a u8 and use a 256 byte buffer on the stack. Notice that these lengths are limited by the encoding field in the VPD structure, which is a u8 [1]. [1] https://marc.info/?l=linux-netdev&m=152044354814024&w=2 Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sock: Fix SO_ZEROCOPY switch caseJesus Sanchez-Palencia2018-03-071-1/+2
| | | | | | | | | | | Fix the SO_ZEROCOPY switch case on sock_setsockopt() avoiding the ret values to be overwritten by the one set on the default case. Fixes: 28190752c7092 ("sock: permit SO_ZEROCOPY on PF_RDS socket") Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com> Acked-by: Willem de Bruijn <willemb@google.com> Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'mvpp2-ucast-filter'David S. Miller2018-03-071-147/+173
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maxime Chevallier says: ==================== net: mvpp2: Add Unicast filtering capabilities This series adds unicast filtering support to the Marvell PPv2 controller. This is implemented using the header parser cababilities of the PPv2, which allows for generic packet filtering based on matching patterns in the packet headers. PPv2 controller only has 256 of these entries, and we need to share them with other features, such as VLAN filtering. For each interface, we have 5 entries dedicated to unicast filtering (the controller's own address, and 4 other), and 21 to multicast filtering. When this number is reached, the controller switches to unicast or multicast promiscuous mode. The first patch reworks the function that adds and removes addresses to the filter. This is preparatory work to ease UC filter implementation. The second patch adds the UC filtering feature. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: mvpp2: Add support for unicast filteringMaxime Chevallier2018-03-071-135/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Marvell PPv2 controller can be used to implement packet filtering based on the destination MAC address. This is already used to implement multicast filtering. This patch adds support for Unicast filtering. Filtering is based on so-called "TCAM entries" to implement filtering. Due to their limited number and the fact that these are also used for other purposes, we reserve 80 entries for both unicast and multicast filters. On top of the broadcast address, and each interface's own MAC address, we reserve 25 entries per port, 4 for unicast filters, 21 for multicast. Whenever unicast or multicast range for one port is full, the filtering is disabled and port goes into promiscuous mode for the given type of addresses. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: mvpp2: Simplify MAC filtering function parametersMaxime Chevallier2018-03-071-15/+15
|/ | | | | | | | | | | | | | The mvpp2_prs_mac_da_accept function takes into parameter both the struct representing the controller and the port id. This is meaningful when we want to create TCAM entries for non-initialized ports, but in this case we expect the port to be initialized before starting adding or removing MAC addresses to the per-port filter. This commit changes the function so that it takes struct mvpp2_port as a parameter instead. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* selftests: forwarding: fix flags passed to first drop rule in ↵Jiri Pirko2018-03-071-1/+1
| | | | | | | | | | gact_drop_and_ok_test Fix copy&paste error and pass proper flags. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* selftests: forwarding: fix "ok" action testJiri Pirko2018-03-071-1/+4
| | | | | | | | | Fix the "ok" action test so it checks that packet that is okayed does not continue to be processed by other rules. Fix error message as well. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: cdc_eem: clean up bind error pathJohan Hovold2018-03-071-4/+1
| | | | | | | | | | | | | | | | Drop bogus call to usb_driver_release_interface() from an error path in the usbnet bind() callback, which is called during interface probe. At this point the interface is not bound and usb_driver_release_interface() returns early. Also remove the bogus call to clear the interface data, which is owned by the usbnet driver and would not even have been set by the time bind() is called. Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Oliver Neukum <oneukum@suse.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: kalmia: clean up bind error pathJohan Hovold2018-03-071-5/+1
| | | | | | | | | | | | | | | Drop bogus call to usb_driver_release_interface() from an error path in the usbnet bind() callback, which is called during interface probe. At this point the interface is not bound and usb_driver_release_interface() returns early. Also remove the bogus call to clear the interface data, which is owned by the usbnet driver and would not even have been set by the time bind() is called. Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge tag 'mlx5-updates-2018-02-28-1' of ↵David S. Miller2018-03-0716-184/+494
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== mlx5-updates-2018-02-28-1 (IPSec-1) This series consists of some fixes and refactors for the mlx5 drivers, especially around the FPGA and flow steering. Most of them are trivial fixes and are the foundation of allowing IPSec acceleration from user-space. We use flow steering abstraction in order to accelerate IPSec packets. When a user creates a steering rule, [s]he states that we'll carry an encrypt/decrypt flow action (using a specific configuration) for every packet which conforms to a certain match. Since currently offloading these packets is done via FPGA, we'll add another set of flow steering ops. These ops will execute the required FPGA commands and then call the standard steering ops. In order to achieve this, we need that the commands will get all the required information. Therefore, we pass the fte object and embed the flow_action struct inside the fte. In addition, we add the shim layer that will later be used for alternating between the standard and the FPGA steering commands. Some fixes, like " net/mlx5e: Wait for FPGA command responses with a timeout" are very relevant for user-space applications, as these applications could be killed, but we still want to wait for the FPGA and update the kernel's database. Regards, Aviad and Matan ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx5: Flow steering cmd interface should get the fte when deletingAviad Yehezkel2018-03-063-5/+5
| | | | | | | | | | | | | | | | | | | | | | Previously, deleting a flow steering entry only got the index. Since the FPGA implementation of FTE's deletion might need to dig inside the FTE itself, we would like to get the FTE's context. Changing the interface to pass the FTE context. Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * {net,IB}/mlx5: Add flow steering helpersBoris Pismenny2018-03-063-6/+143
| | | | | | | | | | | | | | | | | | | | Add helper functions that check if a protocol is part of a flow steering match criteria. Signed-off-by: Boris Pismenny <borisp@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5: Embed mlx5_flow_act into fs_fteMatan Barak2018-03-064-25/+21
| | | | | | | | | | | | | | | | | | fte objects contain the match value and action. Currently, extending the actions require in adding them both to the API and fs_fte. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5: Add empty egress namespace to flow steering coreAviad Yehezkel2018-03-066-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we don't support egress flow steering namespace in mlx5 flow steering core implementation. However, when we want to encrypt a packet, we model it as a flow steering rule in the egress path. To overcome this, we add an empty egress namespace to flow steering. This namespace is initialized only when ipsec support exists. In the future, this will grow to a full blown full steering implementation, resembling the ingress path. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5: Add shim layer between fs and cmdMatan Barak2018-03-064-100/+248
| | | | | | | | | | | | | | | | | | | | | | The shim layer allows each namespace to define possibly different functionality for add/delete/update commands. The shim layer introduced here, will be used to support flow steering with the FPGA. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com> Signed-off-by: Boris Pismenny <borisp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * {net,IB}/mlx5: Add has_tag to mlx5_flow_actMatan Barak2018-03-064-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The has_tag member will indicate whether a tag action was specified in flow specification. A flow tag 0 = MLX5_FS_DEFAULT_FLOW_TAG is assumed a valid flow tag that is currently used by mlx5 RDMA driver, whereas in HW flow_tag = 0 means that the user doesn't care about flow_tag. HW always provide a flow_tag = 0 if all flow tags requested on a specific flow are 0. So we need a way (in the driver) to differentiate between a user really requesting flow_tag = 0 and a user who does not care, in order to be able to report conflicting flow tags on a specific flow. Signed-off-by: Matan Barak <matanb@mellanox.com> Reviewed-by: Aviad Yehezkel <aviadye@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * IB/mlx5: Pass mlx5_flow_act struct instead of multiple argumentsBoris Pismenny2018-03-061-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Group and pass all function arguments of parse_flow_attr call in one common struct mlx5_flow_act. This patch passes all the action arguments of parse_flow_attr in one common struct mlx5_flow_act. It allows us to scale the number of actions without adding new arguments to the function. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Boris Pismenny <borisp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Acked-by: Jason Gunthorpe <jgg@mellanox.com>
| * net/mlx5: FPGA and IPSec initialization to be before flow steeringMatan Barak2018-03-061-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some flow steering namespace initialization (i.e. egress namespace) might depend on FPGA capabilities. Changing the initialization order such that the FPGA will be initialized before flow steering. Flow steering fs cmds initialization might depend on IPSec capabilities. Changing the initialization order such that the IPSec will be initialized before flow steering as well. Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Removed not need synchronize_rcuAviad Yehezkel2018-03-061-2/+2
| | | | | | | | | | | | | | | | This is already done by xfrm layer between state_dev_del callback to state_dev_free callback. Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Fixed sleeping inside atomic contextAviad Yehezkel2018-03-061-9/+4
| | | | | | | | | | | | | | | | | | We can't allocate with GFP_KERNEL inside spinlock. Actually ida_simple doesn't require spinlock so remove it. Fixes: 547eede070eb ("net/mlx5e: IPSec, Innova IPSec offload infrastructure") Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Wait for FPGA command responses with a timeoutAviad Yehezkel2018-03-061-3/+6
| | | | | | | | | | | | | | | | | | Generally, FPGA IPSec commands must always complete. We want to wait for one minute for them to complete gracefully also when killing a process. Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5: Fixed compilation issue when CONFIG_MLX5_ACCEL is disabledAviad Yehezkel2018-03-061-2/+2
| | | | | | | | | | | | | | IPSec init and cleanup functions also depends on linux/mlx5/driver.h. Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * IB/mlx5: Removed not used parametersAviad Yehezkel2018-03-062-5/+0
| | | | | | | | | | | | Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Acked-by: Jason Gunthorpe <jgg@mellanox.com>
* | selftests: net: Introduce first PMTU testStefano Brivio2018-03-072-1/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | One single test implemented so far: test_pmtu_vti6_exception checks that the PMTU of a route exception, caused by a tunnel exceeding the link layer MTU, is affected by administrative changes of the tunnel MTU. Creation of the route exception is checked too. Requested-by: David Ahern <dsahern@gmail.com> Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Acked-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net/mlx4_en: try to use high order pages for RX ringsEric Dumazet2018-03-071-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | RX rings can fit most of the time in a contiguous piece of memory, so lets use kvzalloc_node/kvfree instead of vzalloc_node/vfree Note that kvzalloc_node() automatically falls back to another node, there is no need to do the fallback ourselves. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | enic: fix boolreturn.cocci warningsFengguang Wu2018-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | drivers/net/ethernet/cisco/enic/vnic_dev.c:1294:9-10: WARNING: return of 0/1 in function 'vnic_dev_capable_udp_rss' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Fixes: 48398b6e7065 ("enic: set UDP rss flag") CC: Govindarajulu Varadarajan <gvaradar@cisco.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: dsa: mv88e6xxx: fix boolreturn.cocci warningsFengguang Wu2018-03-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/net/dsa/mv88e6xxx/serdes.c:66:9-10: WARNING: return of 0/1 in function 'mv88e6352_port_has_serdes' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Fixes: eb755c3f6b7d ("net: dsa: mv88e6xxx: Add helper to determining if port has SERDES") CC: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: phy: mdio-mux: slience probe defer errorJerome Brunet2018-03-071-2/+3
| | | | | | | | | | | | | | | | | | If we fail to register the mdio bus due to probe defer, we should not print an error message. Just be silent in this case. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: unpollute priv_flags spacePaolo Abeni2018-03-073-28/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the ipvlan device driver defines and uses 2 bits inside the priv_flags net_device field. Such bits and the related helper are used only inside the ipvlan device driver, and the core networking does not need to be aware of them. This change moves netif_is_ipvlan* helper in the ipvlan driver and re-implement them looking for ipvlan specific symbols instead of using priv_flags. Overall this frees two bits inside priv_flags - and move the following ones to avoid gaps - without any intended functional change. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'net-phy-remove-phy_error-from-phy_disable_interrupts'David S. Miller2018-03-071-18/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Heiner Kallweit says: ==================== net: phy: remove phy_error from phy_disable_interrupts All callers of phy_disable_interrupts() call phy_error() in the error case. Therefore we don't need to do this within the function too. This change also allows us to use phy_disable_interrupts() in code holding phydev->lock (because phy_error() takes this lock). Make use of this in phy_stop(). v2: - splitted into two separate patches ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: phy: use phy_disable_interrupts in phy_stopHeiner Kallweit2018-03-071-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now that phy_disable_interrupts() can't take lock phydev->lock any longer, we can use it to simplify phy_stop(). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: phy: remove phy_error from phy_disable_interruptsHeiner Kallweit2018-03-071-11/+2
|/ / | | | | | | | | | | | | | | | | | | | | All callers of phy_disable_interrupts() call phy_error() in the error case. Therefore we don't need to do this within the function too. This change also allows us to use phy_disable_interrupts() in code holding phydev->lock (because phy_error() can take this lock). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* | selftests/net: fix in_netns.sh scriptPrashant Bhole2018-03-071-1/+1
| | | | | | | | | | | | | | | | | | execute the subprocess in netns using 'ip netns exec' Fixes: cc30c93fa020 ("selftests/net: ignore background traffic in psock_fanout") Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: mvpp2: mvpp2_check_hw_buf_num() can be statickbuild test robot2018-03-071-1/+1
| | | | | | | | | | | | Fixes: effbf5f58d64 ("net: mvpp2: update the BM buffer free/destroy logic") Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ipv6: ndisc: use true and false for boolean valuesGustavo A. R. Silva2018-03-071-1/+1
| | | | | | | | | | | | | | | | | | Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | dt-bindings: net: dsa: marvell: describe compatibility stringBrandon Streiff2018-03-071-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two compatibility strings for mv88e6xxx, but it isn't clear from the documentation why only those two exist when the mv88e6xxx driver supports more than the 6085 and 6190. Briefly describe how the compatible property is used, and provide guidance on which to use. The model list comes from looking at port_base_addr values (0x0 vs 0x10) in drivers/net/dsa/mv88e6xxx/chip.c. Signed-off-by: Brandon Streiff <brandon.streiff@ni.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tipc: bcast: use true and false for boolean valuesGustavo A. R. Silva2018-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch '1GbE' of ↵David S. Miller2018-03-072-6/+30
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2018-03-05 This series contains updates to igb only. Corinna Vinschen adds the support for trusted VFs into the igb driver. Mika fixes an issue where PCIe device is physically unplugged can cause a kernel crash. This issue is that netif_device_detach() is called in these cases, which prevents netif_unregister() from bringing the device down properly. Christophe JAILLET fixes an issue with igb where HWTSTAMP_TX_ON was being handled like a bit mask and not a value. v2: dropped the e1000e fix from the series since I will be pushing it through David Miller's net tree. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | igb: Fix a test with HWTSTAMP_TX_ONChristophe JAILLET2018-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'HWTSTAMP_TX_ON' should be handled as a value, not as a bit mask. The modified code should behave the same, because HWTSTAMP_TX_ON is 1 and no other possible values of 'tx_type' would match the test. However, this is more future-proof, should other values be allowed one day. See 'struct hwtstamp_config' in 'include/uapi/linux/net_tstamp.h' This fixes a warning reported by smatch: igb_xmit_frame_ring() warn: bit shifter 'HWTSTAMP_TX_ON' used for logical '&' Fixes: 26bd4e2db06be ("igb: protect TX timestamping from API misuse") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>