Re: [patch net-next RFC 3/3] switchdev: introduce deferred variants of obj_add/del helpers

2015-10-07 Thread Or Gerlitz
On Wed, Oct 7, 2015 at 9:30 PM, Jiri Pirko wrote: > From: Jiri Pirko > > Similar to the attr usecase, the caller knows if he is holding RTNL and is > in atomic section. So let the called to decide the correct call variant. > > This allows drivers to sleep inside their ops and wait for hw to get t

Re: [PATCH 1/1] net namespace: dynamically configure new net namespace inherit net config

2015-10-07 Thread yzhu1
Hi, Miller Would you like to check this patch? Thanks a lot. Zhu Yanjun On 06/26/2015 05:37 PM, Zhu Yanjun wrote: The new net namespace can inherit from the original net config, or the current net config. As such, a config is needed to decide where the new namespace inherit from. Signed-off-b

Re: [PATCH net-next v2 1/5] net: move net_get_random_once to lib

2015-10-07 Thread Daniel Borkmann
On 10/08/2015 07:12 AM, kbuild test robot wrote: Hi Hannes, [auto build test WARNING on net-next/master -- if it's inappropriate base, please ignore] config: mips-ip27_defconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain

Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs

2015-10-07 Thread Alexei Starovoitov
On 10/7/15 11:21 PM, Ingo Molnar wrote: so I see no reason why unprivileged eBPF couldn't have a sysctl too - with the default value set to permissive. agreed. sent out v2 follows 'modules_disabled' style. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a mes

Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs

2015-10-07 Thread Ingo Molnar
* Alexei Starovoitov wrote: > As far as sysctl we can look at two with similar purpose: > sysctl_perf_event_paranoid and modules_disabled. > First one is indeed multi level, but not because of the fear of bugs, > but because of real security implications. It serves both purposes flexibly, and n

Re: [PATCH net-next 5/6] net: dsa: push prepare phase in port_fdb_add

2015-10-07 Thread Scott Feldman
On Wed, Oct 7, 2015 at 4:48 PM, Vivien Didelot wrote: > Now that the prepare phase is pushed down to the DSA drivers, propagate > it to the port_fdb_add function. > > Signed-off-by: Vivien Didelot Reviewed-by: Scott Feldman -- To unsubscribe from this list: send the line "unsubscribe netdev" in

Re: [PATCH net-next 6/6] net: dsa: use switchdev obj in port_fdb_del

2015-10-07 Thread Scott Feldman
On Wed, Oct 7, 2015 at 4:48 PM, Vivien Didelot wrote: > For consistency with the FDB add operation, propagate the > switchdev_obj_port_fdb structure in the DSA drivers. > > Signed-off-by: Vivien Didelot Reviewed-by: Scott Feldman -- To unsubscribe from this list: send the line "unsubscribe netd

Re: [PATCH net-next 4/6] net: dsa: add port_fdb_prepare

2015-10-07 Thread Scott Feldman
On Wed, Oct 7, 2015 at 4:48 PM, Vivien Didelot wrote: > Push the prepare phase for FDB operations down to the DSA drivers, with > a new port_fdb_prepare function. Currently only mv88e6xxx is affected. > > Signed-off-by: Vivien Didelot Reviewed-by: Scott Feldman -- To unsubscribe from this list:

Re: [patch net-next RFC 2/3] switchdev: allow caller to explicitly use deferred attr_set version

2015-10-07 Thread Scott Feldman
On Wed, Oct 7, 2015 at 10:39 PM, Jiri Pirko wrote: > Thu, Oct 08, 2015 at 06:27:07AM CEST, sfel...@gmail.com wrote: >>On Wed, Oct 7, 2015 at 11:30 AM, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> Caller should know if he can call attr_set directly (when holding RTNL) >>> or if he has to use de

[PATCH net-next 1/2] net: Fix Hisilicon Network Subsystem compilation warning

2015-10-07 Thread huangdaode
This patch fix a compilation warning on arm 32-bit platform Signed-off-by: huangdaode Signed-off-by: yankejian --- drivers/net/ethernet/hisilicon/hns/hnae.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.c b/drivers/net/

[PATCH net-next 0/2] net: fix some bugs in HNS drivers

2015-10-07 Thread huangdaode
This patchset fixes the two bugs in HNS driver, one is for fixing the compilation warning bug on arm 32-bit platform, another is fixing the wrong mac port judgement bug which is found during internal tests. huangdaode (2): net: Fix Hisilicon Network Subsystem compilation warning net: fix a bug

[PATCH net-next 2/2] net: fix a bug on Hisilicon Network Subsystem

2015-10-07 Thread huangdaode
This patch fixes a bug in hns driver during internal testing of the driver. Signed-off-by: huangdaode Signed-off-by: yankejian --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ma

[PATCH net-next v2 4/4] rocker: handle setting bridge ageing_time

2015-10-07 Thread sfeldma
From: Scott Feldman The FDB cleanup timer will get rescheduled to re-evaluate FDB entries based on new ageing_time. Signed-off-by: Scott Feldman --- drivers/net/ethernet/rocker/rocker.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/net/ethernet/rocker/ro

[PATCH net-next v2 3/4] bridge: push bridge setting ageing_time down to switchdev

2015-10-07 Thread sfeldma
From: Scott Feldman Use SWITCHDEV_F_SKIP_EOPNOTSUPP to skip over ports in bridge that don't support setting ageing_time (or setting bridge attrs in general). If push fails, don't update ageing_time in bridge and return err to user. If push succeeds, update ageing_time in bridge and run gc_timer

[PATCH net-next v2 1/4] switchdev: add bridge attributes

2015-10-07 Thread sfeldma
From: Scott Feldman Setting the stage to push bridge-level attributes down to port driver so hardware can be programmed accordingly. Bridge-level attribute example is ageing_time. This is a per-bridge attribute, not a per-bridge-port attr. Signed-off-by: Scott Feldman --- include/net/switchd

[PATCH net-next v2 0/4] switchdev: push bridge attributes down

2015-10-07 Thread sfeldma
From: Scott Feldman Push bridge-level attributes down to switchdev drivers. This patchset adds the infrastructure and then pushes, as an example, ageing_time attribute down from bridge to switchdev (rocker) driver. Add some range-checking for ageing_time. # ip link set dev br0 type bridge agei

[PATCH net-next v2 2/4] switchdev: skip over ports returning -EOPNOTSUPP when recursing ports

2015-10-07 Thread sfeldma
From: Scott Feldman This allows us to recurse over all the ports, skipping over unsupporting ports. Without the change, the recursion would stop at first unsupported port. Signed-off-by: Scott Feldman --- include/net/switchdev.h |1 + net/switchdev/switchdev.c |9 - 2 files

[PATCH iproute2] bridge: add batch command support

2015-10-07 Thread Roopa Prabhu
From: Wilson Kok This patch adds support to batch bridge commands. Follows ip batch code. Signed-off-by: Wilson Kok Signed-off-by: Roopa Prabhu --- bridge/bridge.c | 59 +++ man/man8/bridge.8 | 11 +++ 2 files changed, 70 insertion

Re: [patch net-next RFC 2/3] switchdev: allow caller to explicitly use deferred attr_set version

2015-10-07 Thread Jiri Pirko
Thu, Oct 08, 2015 at 06:27:07AM CEST, sfel...@gmail.com wrote: >On Wed, Oct 7, 2015 at 11:30 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Caller should know if he can call attr_set directly (when holding RTNL) >> or if he has to use deferred version of this function. >> >> This also allows dri

[PATCH v2 net-next 0/3] bpf: unprivileged

2015-10-07 Thread Alexei Starovoitov
v1-v2: - this set logically depends on cb patch "bpf: fix cb access in socket filter programs": http://patchwork.ozlabs.org/patch/527391/ which is must have to allow unprivileged programs. Thanks Daniel for finding that issue. - refactored sysctl to be similar to 'modules_disabled' - droppe

[PATCH v2 net-next 3/3] bpf: add unprivileged bpf tests

2015-10-07 Thread Alexei Starovoitov
Add new tests samples/bpf/test_verifier: unpriv: return pointer checks that pointer cannot be returned from the eBPF program unpriv: add const to pointer unpriv: add pointer to pointer unpriv: neg pointer checks that pointer arithmetic is disallowed unpriv: cmp pointer with const unpriv: cmp

[PATCH v2 net-next 1/3] bpf: enable non-root eBPF programs

2015-10-07 Thread Alexei Starovoitov
In order to let unprivileged users load and execute eBPF programs teach verifier to prevent pointer leaks. Verifier will prevent - any arithmetic on pointers (except R10+Imm which is used to compute stack addresses) - comparison of pointers (except if (map_value_ptr == 0) ... ) - passing pointe

[PATCH v2 net-next 2/3] bpf: charge user for creation of BPF maps and programs

2015-10-07 Thread Alexei Starovoitov
since eBPF programs and maps use kernel memory consider it 'locked' memory from user accounting point of view and charge it against RLIMIT_MEMLOCK limit. This limit is typically set to 64Kbytes by distros, so almost all bpf+tracing programs would need to increase it, since they use maps, but kernel

Re: [PATCH net-next v2 1/5] net: move net_get_random_once to lib

2015-10-07 Thread kbuild test robot
Hi Hannes, [auto build test WARNING on net-next/master -- if it's inappropriate base, please ignore] config: mips-ip27_defconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod

[PATCHv2 net-next] cxgb4: Enhance driver to update FW, when FW is too old

2015-10-07 Thread Hariprasad Shenai
t4_check_fw_version() can return several error codes (-EINVAL, -EBUSY, -EAGAIN). The present code sets the adapter state to UNINIT only if its an EFAULT. In all the error cases set the adapter to uninitialized state. In t4_check_fw_version() if call to t4_get_fw_version() fails, repeat the operati

Re: [patch net-next RFC 2/3] switchdev: allow caller to explicitly use deferred attr_set version

2015-10-07 Thread Scott Feldman
On Wed, Oct 7, 2015 at 11:30 AM, Jiri Pirko wrote: > From: Jiri Pirko > > Caller should know if he can call attr_set directly (when holding RTNL) > or if he has to use deferred version of this function. > > This also allows drivers to sleep inside attr_set and report operation > status back to sw

Re: [net-next] cxgb4: Enhance driver to update FW, when FW is too old

2015-10-07 Thread Hariprasad S
On Wed, Oct 07, 2015 at 15:09:57 -0400, Neil Horman wrote: > On Wed, Oct 07, 2015 at 09:21:40AM +0530, Hariprasad Shenai wrote: > > t4_check_fw_version() can return several error codes (-EINVAL, -EBUSY, > > -EAGAIN). The present code sets the adapter state to UNINIT only if its > > an EFAULT. In al

Re: [PATCH] ip: find correct route for socket which is not bound (v2)

2015-10-07 Thread Wengang Wang
Hi, Any comment on this patch? thanks, wengang 在 2015年09月25日 09:52, Wengang Wang 写道: This is the v2, comparing the v1, the changes is: * for loopback outbound device, it continue skipping cached route; for others, it goes through the cached route. For multicast, we should find valid rou

[PATCH v3 0/3] net: unix: fix use-after-free

2015-10-07 Thread Jason Baron
Hi, These patches are against mainline, I can re-base to net-next, just let me know. They have been tested against: https://lkml.org/lkml/2015/9/13/195, which causes the use-after-free quite quickly and here: https://lkml.org/lkml/2015/10/2/693. Thanks, -Jason v3: -beef up memory barrier comme

[PATCH v3 1/3] net: unix: fix use-after-free in unix_dgram_poll()

2015-10-07 Thread Jason Baron
The unix_dgram_poll() routine calls sock_poll_wait() not only for the wait queue associated with the socket s that we are poll'ing against, but also calls sock_poll_wait() for a remote peer socket p, if it is connected. Thus, if we call poll()/select()/epoll() for the socket s, there are then a cou

[PATCH v3 3/3] net: unix: optimize wakeups in unix_dgram_recvmsg()

2015-10-07 Thread Jason Baron
Now that connect() permanently registers a callback routine, we can induce extra overhead in unix_dgram_recvmsg(), which unconditionally wakes up its peer_wait queue on every receive. This patch makes the wakeup there conditional on there being waiters. Signed-off-by: Jason Baron --- include/net

[PATCH v3 2/3] net: unix: Convert gc_flags to flags

2015-10-07 Thread Jason Baron
Convert gc_flags to flags in perparation for the subsequent patch, which will make use of a flag bit for a non-gc purpose. Signed-off-by: Jason Baron --- include/net/af_unix.h | 2 +- net/unix/garbage.c| 12 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include

Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs

2015-10-07 Thread Alexei Starovoitov
On 10/5/15 1:48 PM, Alexei Starovoitov wrote: Unprivileged socket filter bpf programs have access to the following helper functions: - map lookup/update/delete (but they cannot store kernel pointers into them) - get_random (it's already exposed to unprivileged user space) - get_smp_processor_id -

Re: [PATCH v2 4/4] sh_eth: Remove obsolete r8a777x-ether platform_device_id entry

2015-10-07 Thread Simon Horman
On Wed, Oct 07, 2015 at 10:14:17AM +0200, Geert Uytterhoeven wrote: > Since commit 3d7608e4c169af03 ("ARM: shmobile: bockw: remove legacy > board file and config"), R-Car Gen1 SoCs are only supported in generic > DT-only ARM multi-platform builds. The driver doesn't need to match > platform device

Re: [PATCH v2 3/4] sh_eth: Remove obsolete r8a7740-gether platform_device_id entry

2015-10-07 Thread Simon Horman
On Wed, Oct 07, 2015 at 10:14:16AM +0200, Geert Uytterhoeven wrote: > Since commit 1fa59bda21c7fa36 ("ARM: shmobile: Remove legacy board code > for Armadillo-800 EVA"), r8a7740 is only supported in generic DT-only > ARM multi-platform builds. The driver doesn't need to match platform > devices by

Re: [PATCH net-next 4/6] net: dsa: add port_fdb_prepare

2015-10-07 Thread Andrew Lunn
On Wed, Oct 07, 2015 at 07:48:29PM -0400, Vivien Didelot wrote: > Push the prepare phase for FDB operations down to the DSA drivers, with > a new port_fdb_prepare function. Currently only mv88e6xxx is affected. > > Signed-off-by: Vivien Didelot > --- > drivers/net/dsa/mv88e6171.c | 1 + > drive

Re: [PATCH 2/2] Convert smsc911x to use ACPI as well as DT

2015-10-07 Thread Rafael J. Wysocki
On 10/6/2015 1:08 PM, David Woodhouse wrote: On Mon, 2015-10-05 at 17:20 -0700, Charles Garcia-Tobin wrote: it in ACPI circles unless we had wider agreement among OSs to use it. AFAIK PRP1 has not actually been approved yet in the specification forum, and that it in itself is more of a conce

Re: [PATCH net-next v2 1/5] net: move net_get_random_once to lib

2015-10-07 Thread Alexei Starovoitov
On 10/7/15 4:20 PM, Daniel Borkmann wrote: From: Hannes Frederic Sowa There's no good reason why users outside of networking should not be using this facility, f.e. for initializing their seeds. Therefore, make it accessible from there as get_random_once(). Signed-off-by: Hannes Frederic Sowa

Re: [PATCH net-next v2 3/5] random32: add prandom_seed_full_state helper

2015-10-07 Thread Alexei Starovoitov
On 10/7/15 4:20 PM, Daniel Borkmann wrote: Factor out the full reseed handling code that populates the state through get_random_bytes() and runs prandom_warmup(). The resulting prandom_seed_full_state() will be used later on in more than the current __prandom_reseed() user. Fix also two minor whi

Re: [PATCH net-next v2 4/5] random32: add prandom_init_once helper for own rngs

2015-10-07 Thread Alexei Starovoitov
On 10/7/15 4:20 PM, Daniel Borkmann wrote: Add a prandom_init_once() facility that works on the rnd_state, so that users that are keeping their own state independent from prandom_u32() can initialize their taus113 per cpu states. The motivation here is similar to net_get_random_once(): initializ

Re: [PATCH net-next v2 2/5] once: make helper generic for calling functions once

2015-10-07 Thread Alexei Starovoitov
On 10/7/15 4:20 PM, Daniel Borkmann wrote: From: Hannes Frederic Sowa Make the get_random_once() helper generic enough, so that functions in general would only be called once, where one user of this is then net_get_random_once(). The only implementation specific call is to get_random_bytes(), a

[PATCH net-next 2/6] net: dsa: include dsa.h in dsa_priv.h

2015-10-07 Thread Vivien Didelot
dsa_priv.h uses dsa specific structures, as well as the files using it, so include dsa.h here. Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h | 1 + 1 file changed, 1 insertion(+) diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h index 311796c8..4522f47 100644 --- a/net/dsa/dsa_priv.h

[PATCH net-next 0/6] net: dsa: push switchdev prepare phase in FDB ops

2015-10-07 Thread Vivien Didelot
This patchset pushes the switchdev prepare phase for the FDB add and del operations down to the DSA drivers. Currently only mv88e6xxx is affected. Since the dump requires a bit of refactoring in the driver, it'll come in a future patchset. The first 3 patches removes the dsa.h include from linux/

[PATCH net-next 3/6] net: remove dsa.h include from linux/netdevice.h

2015-10-07 Thread Vivien Didelot
Forward declare struct dsa_switch_tree in netdevice.h instead of including the dsa.h header. Signed-off-by: Vivien Didelot --- include/linux/netdevice.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 73f0510..d0bc

[PATCH net-next 1/6] net: dsa: add uses_hw_tag

2015-10-07 Thread Vivien Didelot
Instead of checking that the dsa_switch_tree rcv pointer is not NULL, add a uses_hw_tag boolean to net_device to explicit whether it uses hardware inserted tag or not. Signed-off-by: Vivien Didelot --- include/linux/netdevice.h | 6 -- include/net/dsa.h | 5 - net/dsa/dsa.c

[PATCH net-next 5/6] net: dsa: push prepare phase in port_fdb_add

2015-10-07 Thread Vivien Didelot
Now that the prepare phase is pushed down to the DSA drivers, propagate it to the port_fdb_add function. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 7 --- drivers/net/dsa/mv88e6xxx.h | 3 ++- include/net/dsa.h | 3 ++- net/dsa/slave.c | 2 +- 4 file

[PATCH net-next 4/6] net: dsa: add port_fdb_prepare

2015-10-07 Thread Vivien Didelot
Push the prepare phase for FDB operations down to the DSA drivers, with a new port_fdb_prepare function. Currently only mv88e6xxx is affected. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6171.c | 1 + drivers/net/dsa/mv88e6352.c | 1 + drivers/net/dsa/mv88e6xxx.c | 10 ++ dr

[PATCH net-next 6/6] net: dsa: use switchdev obj in port_fdb_del

2015-10-07 Thread Vivien Didelot
For consistency with the FDB add operation, propagate the switchdev_obj_port_fdb structure in the DSA drivers. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 4 ++-- drivers/net/dsa/mv88e6xxx.h | 2 +- include/net/dsa.h | 2 +- net/dsa/slave.c | 2 +- 4 fil

Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs

2015-10-07 Thread Alexei Starovoitov
On 10/7/15 3:22 PM, Kees Cook wrote: Yes, I agree with you that there would be a CVE regardless. I still >like the option of configurable access, not a big fan of the sysctl >either. Thinking out loudly, what about a Kconfig option? We started >out like this on bpf(2) itself (initially under expe

[Patch net] sch_hhf: fix return value of hhf_drop()

2015-10-07 Thread Cong Wang
Similar to commit c0afd9ce4d6a ("fq_codel: fix return value of fq_codel_drop()") ->drop() is supposed to return the number of bytes it dropped, but hhf_drop () returns the id of the bucket where it drops a packet from. Cc: Jamal Hadi Salim Cc: Terry Lam Signed-off-by: Cong Wang Signed-off-by: C

[PATCH net-next v2 3/5] random32: add prandom_seed_full_state helper

2015-10-07 Thread Daniel Borkmann
Factor out the full reseed handling code that populates the state through get_random_bytes() and runs prandom_warmup(). The resulting prandom_seed_full_state() will be used later on in more than the current __prandom_reseed() user. Fix also two minor whitespace issues along the way. Signed-off-by:

[PATCH net-next v2 2/5] once: make helper generic for calling functions once

2015-10-07 Thread Daniel Borkmann
From: Hannes Frederic Sowa Make the get_random_once() helper generic enough, so that functions in general would only be called once, where one user of this is then net_get_random_once(). The only implementation specific call is to get_random_bytes(), all the rest of this *_once() facility would

[PATCH net-next v2 4/5] random32: add prandom_init_once helper for own rngs

2015-10-07 Thread Daniel Borkmann
Add a prandom_init_once() facility that works on the rnd_state, so that users that are keeping their own state independent from prandom_u32() can initialize their taus113 per cpu states. The motivation here is similar to net_get_random_once(): initialize the state as late as possible in the hope t

[PATCH net-next v2 1/5] net: move net_get_random_once to lib

2015-10-07 Thread Daniel Borkmann
From: Hannes Frederic Sowa There's no good reason why users outside of networking should not be using this facility, f.e. for initializing their seeds. Therefore, make it accessible from there as get_random_once(). Signed-off-by: Hannes Frederic Sowa Signed-off-by: Daniel Borkmann --- includ

[PATCH net-next v2 0/5] BPF/random32 updates

2015-10-07 Thread Daniel Borkmann
BPF update to split the prandom state apart, and to move the *once helpers to the core. For details, please see individual patches. Given the changes and since it's in the tree for quite some time, net-next is a better choice in our opinion. v1 -> v2: - Make DO_ONCE() type-safe, remove the kvec h

[PATCH net-next v2 5/5] bpf: split state from prandom_u32() and consolidate {c,e}BPF prngs

2015-10-07 Thread Daniel Borkmann
While recently arguing on a seccomp discussion that raw prandom_u32() access shouldn't be exposed to unpriviledged user space, I forgot the fact that SKF_AD_RANDOM extension actually already does it for some time in cBPF via commit 4cd3675ebf74 ("filter: added BPF random opcode"). Since prandom_u3

Re: [PATCH RFC] net: mvneta: add ethtool statistics

2015-10-07 Thread Andrew Lunn
On Tue, Oct 06, 2015 at 09:41:08PM +0100, Russell King wrote: > Add support for the ethtool statistic interface, returning the full set > of statistics which both Armada 370 and Armada XP can support. > > Signed-off-by: Russell King > --- > Andrew, > > Here's the patch updated to use the example

[net-next 18/18] i40e/i40evf: remove unused opcode

2015-10-07 Thread Jeff Kirsher
From: Mitch Williams This opcode is not required. VFs that program RSS through the firmware do it by interacting directly with the firmware, and do not need to use the virtual channel for this functionality. Change-ID: Iaf17d2600e28ff1b6be8653f2fe9df1facd23b0e Signed-off-by: Mitch Williams Test

[net-next 10/18] i40e: Never let speed get set to 0 in get_settings

2015-10-07 Thread Jeff Kirsher
From: Catherine Sullivan In ethtool, there is a possibility of speed getting set to 0 if advertise is set to 0 (which it is when autoneg is disabled). We never want this to happen as the firmware will actually attempt to set the speed to 0 sending link down, so add an extra check to make sure thi

[net-next 00/18][pull request] Intel Wired LAN Driver Updates 2015-10-07

2015-10-07 Thread Jeff Kirsher
This series contains updates to i40e and i40evf only. Paul updates i40e to simply increase the amount of time we wait for a reset to complete since we have seen in some rare occasions the reset can take longer to complete. Shannon updates the driver to turn on Wake-on-LAN by default if it is enab

[net-next 06/18] i40e: fix bad CEE status shift value

2015-10-07 Thread Jeff Kirsher
From: Shannon Nelson Fix a shift value that was wrong, ending up with a bad bitmask. Also add a blank line between two sets of #defines for better readability. Change-ID: I3e41fa2a2ab904d3a4e6cbf13972ab0036a10601 Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsh

[net-next 15/18] i40e/i40evf: Add a stat to keep track of linearization count

2015-10-07 Thread Jeff Kirsher
From: Anjali Singhai Jain Keep track of how many times we ask the stack to linearize the skb because the HW cannot handle skbs with more than 8 frags per segment/single packet. Change-ID: If455452060963a769bbe6112cba952e79e944b52 Signed-off-by: Anjali Singhai Jain Tested-by: Andrew Bowers Sign

[net-next 04/18] i40e/i40evf: add driver support for new device ids

2015-10-07 Thread Jeff Kirsher
From: Shannon Nelson Early addition of new a device id. Change-ID: I61a8c8556fdf4f5714be4e4089689e374f30293c Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_common.c | 1 + drivers/net/ethernet/intel/i40e/i40e_etht

[net-next 16/18] i40e: Additional checks for CEE APP priority validity

2015-10-07 Thread Jeff Kirsher
From: Neerav Parikh The firmware has added additional status information to allow software to determine if the APP priority for FCoE/iSCSI/FIP is valid or not in CEE DCBX mode. This patch adds to support those additional checks and will only add applications to the software table that have oper

[net-next 12/18] i40e: add little endian conversion for checksum

2015-10-07 Thread Jeff Kirsher
From: Jesse Brandeburg The checksum is not correct on big endian machines so add code to swap it correctly. Change-ID: Ic92b886d172a2cbe49f5d7eee1bc78e447023c7b Signed-off-by: Jesse Brandeburg Signed-off-by: Paul M Stillwell Jr Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- driver

[net-next 08/18] i40e/i40evf: assure clean asq status report

2015-10-07 Thread Jeff Kirsher
From: Shannon Nelson There was a possibility where the asq_last_status could get through without update and thus report a previous error. I don't think we've actually seen this happen, but this patch will help make sure it doesn't. Change-ID: I9e33927052a5ee6ea21f80b66d4c4b76c2760b17 Signed-off

[net-next 11/18] i40e/i40evf: give up the __func__

2015-10-07 Thread Jeff Kirsher
From: Shannon Nelson During early development, we added the function name to all of the error strings to make debugging simpler. Now that we've released the driver, our users should have more comprehensible error messages. So tear the roof off and give up the __func__. Ow. Change-ID: I7e1766252c

[net-next 09/18] i40e: Fix for truncated interrupt name

2015-10-07 Thread Jeff Kirsher
From: Carolyn Wyborny This patch extends the size of the text available for the interrupt names. Without this patch, all the descriptive data available for the Flow Director interrupts is truncated. Change-ID: I2ac458f23ac3b4ea8f1edf73edc283b1d3704c7f Signed-off-by: Carolyn Wyborny Tested-by: A

[net-next 07/18] i40e: make i40e_init_pf_fcoe to void

2015-10-07 Thread Jeff Kirsher
From: Shannon Nelson i40e_init_pf_fcoe() didn't return anything except 0, it prints enough error info already, and no driver logic depends on the return value, so this can be void. Change-ID: Ie6afad849857d87a7064c42c3cce14c74c2f29d8 Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signe

[net-next 01/18] i40e: Increase the amount of time we wait for reset to be done

2015-10-07 Thread Jeff Kirsher
From: Paul M Stillwell Jr In some rare cases the reset can take longer to complete so increase the amount of time we wait. Change-ID: Ib5628ec54b526a811ee33d1214fe763226406671 Signed-off-by: Paul M Stillwell Jr Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/int

[net-next 05/18] i40e/i40evf: fix a potential type compare issue

2015-10-07 Thread Jeff Kirsher
From: Shannon Nelson Rework an if expression to assure there is no type compare problem between a size and a possible negative number. Change-ID: I4921fcc96abfcf69490efce020a9e4007f251c99 Reported-by: Helin Zhang Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsh

[net-next 13/18] i40e: fix bug in return from get_link_status and avoid spurious link messages

2015-10-07 Thread Jeff Kirsher
From: Jesse Brandeburg Previously, the driver could call this function and have only true/false returned, but false could mean multiple things like failure to read or link was down. This change allows the caller to get all return values in the call chain bubbled back to the source, which keeps in

[net-next 17/18] i40evf: propagate interrupt allocation failure

2015-10-07 Thread Jeff Kirsher
From: Mitch Williams Lower level functions are properly reporting errors, and higher-level functions are correctly responding to errors, but the errors aren't actually getting through. Typically, the middle-manager function seems to want to shield its boss from any bad news. This change fixes a

[net-next 14/18] i40e/i40evf: fix unicast mac address add

2015-10-07 Thread Jeff Kirsher
From: Shannon Nelson When using something like "ip maddr add ..." to add another unicast mac address to the netdev, the mac address comes into the set_rx_mode handler in the multicast list whether it is a unicast or multicast address. This was confusing the code when it was trying to search for a

[net-next 02/18] i40e: enable WoL operation if config bit show WoL capable

2015-10-07 Thread Jeff Kirsher
From: Shannon Nelson The driver was disabling Wake-on-LAN by default and waiting for the user to expressly turn it on. This patch has the driver turning on WoL from the start if enabled in the hardware config, which matches the behavior of our other drivers. Change-ID: I43faedb907f8ba4d1a61b72a

[net-next 03/18] i40e: stop VF rings

2015-10-07 Thread Jeff Kirsher
From: Mitch Williams Explicitly stop the rings belonging to each VF when disabling SR-IOV. Even though the VFs were gone, and the associated VSIs were removed, the rings were not stopped, and in some circumstances the hardware would continue to access the memory formerly used by the rings, causin

Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs

2015-10-07 Thread Kees Cook
On Wed, Oct 7, 2015 at 3:07 PM, Daniel Borkmann wrote: > On 10/07/2015 11:20 PM, Alexei Starovoitov wrote: >> >> On 10/6/15 5:45 AM, Daniel Borkmann wrote: >>> >>> Should instead something similar be adapted on bpf(2) as well? Or, would >>> that even be more painful for application developers ship

Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs

2015-10-07 Thread Daniel Borkmann
On 10/07/2015 11:20 PM, Alexei Starovoitov wrote: On 10/6/15 5:45 AM, Daniel Borkmann wrote: Should instead something similar be adapted on bpf(2) as well? Or, would that even be more painful for application developers shipping their stuff through distros in the end (where they might then decide

[PATCH net-next 3/4] net: Add IPv6 support to VRF device

2015-10-07 Thread David Ahern
Add support for IPv6 to VRF device driver. Implemenation parallels what has been done for IPv4. Signed-off-by: David Ahern --- drivers/net/Kconfig | 4 +- drivers/net/vrf.c | 279 +++- 2 files changed, 281 insertions(+), 2 deletions(-) diff --

[PATCH net-next 0/4 v2] net: VRF support in IPv6 stack

2015-10-07 Thread David Ahern
Initial support for VRF in IPv6 stack. Makes IPv6 functionality on par with IPv4 -- ping, tcp client/server and udp client/server all work fine. tcpdump on vrf device and external tap (e.g., host side tap device) shows all packets with proper addresses. IPv6 does not need the source address operati

[PATCH net-next 1/4] net: Add IPv6 support to l3mdev

2015-10-07 Thread David Ahern
Add operations to retrieve cached IPv6 dst entry from l3mdev device and lookup IPv6 source address. Signed-off-by: David Ahern --- include/net/l3mdev.h | 46 ++ 1 file changed, 46 insertions(+) diff --git a/include/net/l3mdev.h b/include/net/l3mdev.h

[PATCH net-next 2/4] net: Export fib6_get_table and nd_tbl

2015-10-07 Thread David Ahern
Signed-off-by: David Ahern --- net/ipv6/ip6_fib.c | 1 + net/ipv6/ndisc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 7d2e0023c72d..09fddf70cca4 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -264,6 +264,7 @@ struct fib6_table

[PATCH net-next 13/16] ipvlan: Cache net in ipvlan_process_v4_outbound and ipvlan_process_v6_outbound

2015-10-07 Thread Eric W. Biederman
Compute net once in ipvlan_process_v4_outbound and ipvlan_process_v6_outbound and store it in a variable so that net does not need to be recomputed next time it is used. Signed-off-by: "Eric W. Biederman" --- drivers/net/ipvlan/ipvlan_core.c | 6 -- 1 file changed, 4 insertions(+), 2 deletio

[PATCH net-next 4/4] net: Add VRF support to IPv6 stack

2015-10-07 Thread David Ahern
As with IPv4 support for VRFs added to IPv6 stack by replacing hardcoded table ids with possibly device specific ones and manipulating the oif in the flowi6. The flow flags are used to skip oif compare in nexthop lookups if the device is enslaved to a VRF via the L3 master device. Signed-off-by: D

[PATCH net-next 11/16] ipv4: Cache net in ip_build_and_send_pkt and ip_queue_xmit

2015-10-07 Thread Eric W. Biederman
Compute net and store it in a variable in the functions ip_build_and_send_pkt and ip_queue_xmit so that it does not need to be recomputed next time it is needed. Signed-off-by: "Eric W. Biederman" --- net/ipv4/ip_output.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --g

[PATCH net-next 15/16] ipv4,ipv6: Pass net into ip_local_out and ip6_local_out

2015-10-07 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- drivers/net/ipvlan/ipvlan_core.c| 4 ++-- drivers/net/ppp/pptp.c | 2 +- drivers/net/vrf.c | 4 ++-- include/net/ip.h| 2 +- include/net/ip6_tunnel.h| 2 +- include/net/ipv6.h

[PATCH net-next 12/16] ppp: Cache net in pptp_xmit

2015-10-07 Thread Eric W. Biederman
Compute net and store it in a variable in pptp_xmit, so that the value can be reused the next time it is needed. Signed-off-by: "Eric W. Biederman" --- drivers/net/ppp/pptp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c

[PATCH net-next 14/16] ipv4,ipv6: Pass net into __ip_local_out and __ip6_local_out

2015-10-07 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- drivers/net/vrf.c | 2 +- include/net/dst_ops.h | 3 ++- include/net/ip.h | 2 +- include/net/ipv6.h | 2 +- net/ipv4/ip_output.c | 5 ++--- net/ipv6/output_core.c | 5 ++--- net/xfrm/xfrm_output.c | 2 +- 7 files changed, 10 insertions(+),

[PATCH net-next 16/16] dst: Pass net into dst->output

2015-10-07 Thread Eric W. Biederman
The network namespace is already passed into dst_output pass it into dst->output lwt->output and friends. Signed-off-by: "Eric W. Biederman" --- drivers/net/vrf.c| 3 +-- include/net/dst.h| 8 include/net/ip.h | 4 ++-- include/net/ipv6.h | 2 +- includ

[PATCH net-next 10/16] ipv4: Cache net in iptunnel_xmit

2015-10-07 Thread Eric W. Biederman
Store net in a variable in ip_tunnel_xmit so it does not need to be recomputed when it is used again. Signed-off-by: "Eric W. Biederman" --- net/ipv4/ip_tunnel_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c ind

[PATCH net-next 08/16] ipv6: Merge __ip6_local_out and __ip6_local_out_sk

2015-10-07 Thread Eric W. Biederman
Only __ip6_local_out_sk has callers so rename __ip6_local_out_sk __ip6_local_out and remove the previous __ip6_local_out. Signed-off-by: "Eric W. Biederman" --- include/net/ipv6.h | 3 +-- net/ipv6/output_core.c | 9 ++--- net/ipv6/route.c| 2 +- net/ipv6/xfrm6_policy.c | 2 +-

[PATCH net-next 09/16] ipv6: Merge ip6_local_out and ip6_local_out_sk

2015-10-07 Thread Eric W. Biederman
Stop hidding the sk parameter with an inline helper function and make all of the callers pass it, so that it is clear what the function is doing. Signed-off-by: "Eric W. Biederman" --- drivers/net/ipvlan/ipvlan_core.c| 2 +- include/net/ip6_tunnel.h| 2 +- include/net/ipv6.h

[PATCH net-next 06/16] ipv4: Merge __ip_local_out and __ip_local_out_sk

2015-10-07 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- include/net/ip.h| 3 +-- net/ipv4/ip_output.c| 9 ++--- net/ipv4/route.c| 2 +- net/ipv4/xfrm4_policy.c | 2 +- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/include/net/ip.h b/include/net/ip.h index ea1f721f7224..46

[PATCH net-next 07/16] ipv4: Merge ip_local_out and ip_local_out_sk

2015-10-07 Thread Eric W. Biederman
It is confusing and silly hiding a parameter so modify all of the callers to pass in the appropriate socket or skb->sk if no socket is known. Signed-off-by: "Eric W. Biederman" --- drivers/net/ipvlan/ipvlan_core.c| 2 +- drivers/net/ppp/pptp.c | 2 +- drivers/net/vrf.c

[PATCH net-next 02/16] ipv4: Fix ip_queue_xmit to pass sk into ip_local_out_sk

2015-10-07 Thread Eric W. Biederman
After a packet has been encapsulated by a tunnel we should use the tunnel sockets local multicast loopback flag to control if the encapsulated packet should be locally loopback back. Pass sk into ip_local_out_sk so that in the rare case we are dealing with a tunneled packet whose tunnel destinatio

[PATCH net-next 03/16] xfrm: Only compute net once in xfrm_policy_queue_process

2015-10-07 Thread Eric W. Biederman
Signed-off-by: "Eric W. Biederman" --- net/xfrm/xfrm_policy.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 418daa038edf..be1776bc5673 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -1887,6 +18

[PATCH net-next 04/16] net: Pass net into dst_output and remove dst_output_okfn

2015-10-07 Thread Eric W. Biederman
Replace dst_output_okfn with dst_output Signed-off-by: "Eric W. Biederman" --- include/net/dst.h | 6 +- net/decnet/dn_nsp_out.c | 4 ++-- net/ipv4/ip_forward.c | 2 +- net/ipv4/ip_output.c| 7 --- net/ipv4/ip_vti.c | 2 +- net/ip

[PATCH net-next 05/16] dst: Pass a sk into .local_out

2015-10-07 Thread Eric W. Biederman
For consistency with the other similar methods in the kernel pass a struct sock into the dst_ops .local_out method. Simplifying the socket passing case is needed a prequel to passing a struct net reference into .local_out. Signed-off-by: "Eric W. Biederman" --- drivers/net/vrf.c | 4 ++--

[PATCH net-next 01/16] ipv4: Fix ip_local_out_sk by passing the sk into __ip_local_out_sk

2015-10-07 Thread Eric W. Biederman
In the rare case where sk != skb->sk ip_local_out_sk arranges to call dst->output differently if the skb is queued or not. This is a bug. Fix this bug by passing the sk parameter of ip_local_out_sk through from ip_local_out_sk to __ip_local_out_sk (skipping __ip_local_out). Fixes: 7026b1ddb6b8 ("

[PATCH net-next 00/16] net: Pass net through the output path v2

2015-10-07 Thread Eric W. Biederman
This is the next installment of my work to pass struct net through the output path so the code does not need to guess how to figure out which network namespace it is in, and ultimately routes can have output devices in another network namespace. The first patch in this series is a fix for a bug t

  1   2   3   >