Re: [PATCH v2 01/21] scatterlist: Introduce sg_map helper functions

2017-04-26 Thread Christoph Hellwig
On Wed, Apr 26, 2017 at 12:11:33PM -0600, Logan Gunthorpe wrote: > Ok, well for starters I think you are mistaken about kmap being able to > fail. I'm having a hard time finding many users of that function that > bother to check for an error when calling it. A quick audit of the arch code shows yo

Re: [PATCH 5/7] IB/hfi1: use pcie_flr instead of duplicating it

2017-04-26 Thread Christoph Hellwig
On Tue, Apr 25, 2017 at 02:39:55PM -0500, Bjorn Helgaas wrote: > This still leaves these: > > [PATCH 4/7] ixgbe: use pcie_flr instead of duplicating it > [PATCH 6/7] crypto: qat: use pcie_flr instead of duplicating it > [PATCH 7/7] liquidio: use pcie_flr instead of duplicating it > > I have

RE: [iproute2] iplink: add support for IFLA_CARRIER attribute

2017-04-26 Thread 张胜举
> -Original Message- > From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Wednesday, April 26, 2017 11:08 PM > To: Zhang Shengju > Cc: netdev@vger.kernel.org > Subject: Re: [iproute2] iplink: add support for IFLA_CARRIER attribute > > On Wed, 26 Apr 2017 15:08:39 +0800 >

Re: [PATCH net-next v8 2/3] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-04-26 Thread Jiri Pirko
Wed, Apr 26, 2017 at 10:07:08PM CEST, j...@mojatatu.com wrote: >On 17-04-26 09:56 AM, Jiri Pirko wrote: >> Wed, Apr 26, 2017 at 03:14:38PM CEST, j...@mojatatu.com wrote: >> > On 17-04-26 08:08 AM, Jiri Pirko wrote: > >[..] > [...] > >> > Again: You are looking at this from a manageability point o

[RFC net-next 2/2] bpf: Test for bpf_prog ID and BPF_PROG_GET_NEXT_ID

2017-04-26 Thread Martin KaFai Lau
Add test to exercise the bpf_prog id generation and iteration. Signed-off-by: Martin KaFai Lau --- tools/include/uapi/linux/bpf.h | 6 ++ tools/lib/bpf/bpf.c| 11 tools/lib/bpf/bpf.h| 1 + tools/testing/selftests/bpf/Makefile

[RFC net-next 1/2] bpf: Introduce bpf_prog ID

2017-04-26 Thread Martin KaFai Lau
The ID is generated by the existing idr_alloc_cyclic(). This patch also adds BPF_PROG_GET_NEXT_ID to allow userspace to iterate all bpf_prog id(s). The API is trying to be consistent with the existing BPF_MAP_GET_NEXT_KEY. Signed-off-by: Martin KaFai Lau --- include/linux/filter.h | 1 + in

[RFC net-next 0/2] Introduce bpf_prog ID and iteration

2017-04-26 Thread Martin KaFai Lau
This patchset introduces the bpf_prog ID and a new bpf cmd to iterate all bpf_prog in the system. It is still incomplete. The idea can be extended to bpf_map. Martin KaFai Lau (2): bpf: Introduce bpf_prog ID bpf: Test for bpf_prog ID and BPF_PROG_GET_NEXT_ID include/linux/filter.h

rhashtable - Cap total number of entries to 2^31

2017-04-26 Thread Herbert Xu
On Tue, Apr 25, 2017 at 10:48:22AM -0400, David Miller wrote: > From: Florian Westphal > Date: Tue, 25 Apr 2017 16:17:49 +0200 > > > I'd have less of an issue with this if we'd be talking about > > something computationally expensive, but this is about storing > > an extra value inside a struct j

Re: ipsec doesn't route TCP with 4.11 kernel

2017-04-26 Thread Cong Wang
(Cc'ing netdev and IPSec maintainers) On Tue, Apr 25, 2017 at 6:08 PM, Don Bowman wrote: > I'm not sure how to describe this. > > 4.11rc2 worked, after that, no. > > My ipsec tunnel comes up ok. ICMP works. UDP works. But TCP, the > sender [which is the ipsec client] does not reach the destinatio

Re: [PATCH net-next 1/9] drivers: net: xgene: Protect indirect MAC access

2017-04-26 Thread Iyappan Subramanian
On Wed, Apr 26, 2017 at 5:06 PM, Florian Fainelli wrote: > On 04/26/2017 04:38 PM, Iyappan Subramanian wrote: >> From: Quan Nguyen >> >> This patch adds lock to protect indirect mac access sequence. >> >> Signed-off-by: Quan Nguyen >> Signed-off-by: Iyappan Subramanian >> --- >> drivers/net/et

[PATCH net-next] tcp: tcp_rack_reo_timeout() must update tp->tcp_mstamp

2017-04-26 Thread Eric Dumazet
From: Eric Dumazet I wrongly assumed tp->tcp_mstamp was up to date at the time tcp_rack_reo_timeout() was called. It is not true, since we only update tcp->tcp_mstamp when receiving a packet (as initially done in commit 69e996c58a35 ("tcp: add tp->tcp_mstamp field") tcp_rack_reo_timeout() being

Re: [PATCH v1 net-next 3/6] net: add new control message for incoming HW-timestamped packets

2017-04-26 Thread kbuild test robot
Hi Miroslav, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Miroslav-Lichvar/Extend-socket-timestamping-API/20170427-093243 config: xtensa-allmodconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 4.9.0 reproduce: wget https://raw.g

Re: [PATCH v2 07/21] crypto: shash, caam: Make use of the new sg_map helper function

2017-04-26 Thread Herbert Xu
On Tue, Apr 25, 2017 at 12:20:54PM -0600, Logan Gunthorpe wrote: > Very straightforward conversion to the new function in the caam driver > and shash library. > > Signed-off-by: Logan Gunthorpe > Cc: Herbert Xu > Cc: "David S. Miller" > --- > crypto/shash.c| 9 ++--- > driv

Re: [PATCH net-next] net: vrf: Do not allow looback to be moved to a VRF

2017-04-26 Thread Greg Rose
On Wed, 2017-04-26 at 07:58 -0700, David Ahern wrote: > Moving the loopback into a VRF breaks networking for the default VRF. > Since the VRF device is the loopback for VRF domains, there is no > reason to move the loopback. Given the repercussions, block attempts > to set lo into a VRF. > > Signe

[PATCH net v4 3/3] net: hns: fixed bug that skb used after kfree

2017-04-26 Thread Yankejian
From: lipeng There is KASAN warning which turn out it's a skb used after free: BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940... [17659.112635] alloc_debug_processing+0x18c/0x1a0 [17659.117208] __slab_alloc+0x52c/0x560 [17659.120909] kmem_cache_alloc

[PATCH net v4 0/3] net: hns: bug fix for HNS driver

2017-04-26 Thread Yankejian
From: lipeng The first two patches [1/3] [2/3] of this serie add support defered dsaf probe when mdio and mbigen module is not insmod. The third patch [3/3] fixes a bug that skb still be used after freed, which will cuase panic. For more details, please refer to individual patch. change log: V3

[PATCH net v4 2/3] net: hns: support deferred probe when no mdio

2017-04-26 Thread Yankejian
From: lipeng In the hip06 and hip07 SoCs, phy connect to mdio bus.The mdio module is probed with module_init, and, as such, is not guaranteed to probe before the HNS driver. So we need to support deferred probe. We check for probe deferral in the mac init, so we not init DSAF when there is no md

[PATCH net v4 1/3] net: hns: support deferred probe when can not obtain irq

2017-04-26 Thread Yankejian
From: lipeng In the hip06 and hip07 SoCs, the interrupt lines from the DSAF controllers are connected to mbigen hw module. The mbigen module is probed with module_init, and, as such, is not guaranteed to probe before the HNS driver. So we need to support deferred probe. Signed-off-by: lipeng Re

Re: more test_progs...

2017-04-26 Thread David Miller
From: Alexei Starovoitov Date: Wed, 26 Apr 2017 16:49:35 -0700 > It's only needed for test_pkt_access.c test, > since it's being fancy and doing iph->ihl * 4. It is going to be a common idiom in anything looking at transport headers, no? > Also such tcp->urg_ptr access into packed struct is mor

Re: [PATCH net v3 1/3] net: hns: support deferred probe when can not obtain irq

2017-04-26 Thread lipeng (Y)
On 2017/4/26 22:03, Matthias Brugger wrote: On 26/04/17 09:00, Yankejian wrote: From: lipeng In the hip06 and hip07 SoCs, the interrupt lines from the DSAF controllers are connected to mbigen hw module. The mbigen module is probed with module_init, and, as such, is not guaranteed to probe

Re: [PATCH net-next] bpf: restore skb->sk before pskb_trim() call

2017-04-26 Thread Willem de Bruijn
On Wed, Apr 26, 2017 at 4:53 PM, Alexei Starovoitov wrote: > On Wed, Apr 26, 2017 at 09:09:23AM -0700, Eric Dumazet wrote: >> From: Eric Dumazet >> >> While testing a fix [1] in ___pskb_trim(), addressing the WARN_ON_ONCE() >> in skb_try_coalesce() reported by Andrey, I found that we had an skb >

[PATCH net] tcp: do not underestimate skb->truesize in tcp_trim_head()

2017-04-26 Thread Eric Dumazet
From: Eric Dumazet Andrey found a way to trigger the WARN_ON_ONCE(delta < len) in skb_try_coalesce() using syzkaller and a filter attached to a TCP socket over loopback interface. I believe one issue with looped skbs is that tcp_trim_head() can end up producing skb with under estimated truesize.

Re: [PATCH net-next 1/9] drivers: net: xgene: Protect indirect MAC access

2017-04-26 Thread Florian Fainelli
On 04/26/2017 04:38 PM, Iyappan Subramanian wrote: > From: Quan Nguyen > > This patch adds lock to protect indirect mac access sequence. > > Signed-off-by: Quan Nguyen > Signed-off-by: Iyappan Subramanian > --- > drivers/net/ethernet/apm/xgene/xgene_enet_hw.c| 2 ++ > drivers/net/ethernet

Re: [PATCH v1 net-next 5/6] net: allow simultaneous SW and HW transmit timestamping

2017-04-26 Thread Willem de Bruijn
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h > index 81ef53f..42bff22 100644 > --- a/include/linux/skbuff.h > +++ b/include/linux/skbuff.h > @@ -3300,8 +3300,7 @@ void skb_tstamp_tx(struct sk_buff *orig_skb, > > static inline void sw_tx_timestamp(struct sk_buff *skb) > { > -

[PATCH] netvsc: make sure napi enabled before vmbus_open

2017-04-26 Thread Stephen Hemminger
This fixes a race where vmbus callback for new packet arriving could occur before NAPI is initialized. Happens more on WS2008 which takes longer to setup channel. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 8 +--- drivers/net/hyperv/rndis_filter.c | 4 +++- 2 fi

Re: more test_progs...

2017-04-26 Thread Alexei Starovoitov
On 4/26/17 7:55 AM, David Miller wrote: From: Daniel Borkmann Date: Wed, 26 Apr 2017 10:14:42 +0200 On 04/26/2017 05:42 AM, Alexei Starovoitov wrote: That sucks for sparc, of course. I don't have good suggestions for workaround other than marking tcphdr as packed :( From code efficiency poin

Re: [PATCH net-next v1] net: ipv6: make sure multicast packets are not forwarded beyond the different scopes

2017-04-26 Thread kbuild test robot
Hi Donatas, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Donatas-Abraitis/net-ipv6-make-sure-multicast-packets-are-not-forwarded-beyond-the-different-scopes/20170426-180846 config: x86_64-rhel (attached as .config) compiler: gcc-6 (Debian 6.2.0-3

[PATCH net-next] Fix inaccurate helper function description

2017-04-26 Thread Chenbo Feng
From: Chenbo Feng The description inside uapi/linux/bpf.h about bpf_get_socket_uid helper function is no longer valid. It returns overflowuid rather than 0 when failed. Signed-off-by: Chenbo Feng --- include/uapi/linux/bpf.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a

[PATCH net-next 5/5] bpf: provide a generic macro for percpu values for selftests

2017-04-26 Thread Daniel Borkmann
To overcome bugs as described and fixed in 89087c456fb5 ("bpf: Fix values type used in test_maps"), provide a generic BPF_DECLARE_PERCPU() and bpf_percpu() accessor macro for all percpu map values used in tests. Declaring variables works as follows (also works for structs): BPF_DECLARE_PERCPU(u

[PATCH net-next 1/5] bpf, x86_64/arm64: remove old ldimm64 artifacts from jits

2017-04-26 Thread Daniel Borkmann
For both cases, the verifier is already rejecting such invalid formed instructions. Thus, remove these artifacts from old times and align it with ppc64, sparc64 and s390x JITs that don't have them in the first place. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov --- arch/arm64/net

[PATCH net-next 3/5] bpf: bpf_lock on kallsysms doesn't need to be irqsave

2017-04-26 Thread Daniel Borkmann
From: Hannes Frederic Sowa Hannes rightfully spotted that the bpf_lock doesn't need to be irqsave variant. We never perform any such updates where this would be necessary (neither right now nor in future), therefore relax this further. Signed-off-by: Hannes Frederic Sowa Signed-off-by: Daniel B

[PATCH net-next 4/5] bpf: fix _htons occurences in test_progs

2017-04-26 Thread Daniel Borkmann
Dave reported that on sparc test_progs generates buggy swapped eth->h_proto protocol comparisons: 10: (15) if r3 == 0xdd86 goto pc+9 R0=imm2,min_value=2,max_value=2 R1=pkt(id=0,off=0,r=14) R2=pkt_end R3=inv R4=pkt(id=0,off=14,r=14) R5=inv56 R10=fp This is due to the unconditional ... #

[PATCH net-next 2/5] bpf: add various test cases to verifier selftests

2017-04-26 Thread Daniel Borkmann
Add several test cases around ldimm64, fp arithmetic and direct packet access. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov --- tools/testing/selftests/bpf/test_verifier.c | 137 1 file changed, 137 insertions(+) diff --git a/tools/testing/selftests/

[PATCH net-next 0/5] Misc BPF updates

2017-04-26 Thread Daniel Borkmann
This set cleans up ldimm64 leftovers from early eBPF days and adds couple of test cases related to this to the verifier test suite. It also cleans up the kallsyms spinlock (had same patch also in queue) by relaxing it through switching to _bh variant. It fixes up test_progs in relation to htons/nto

[PATCH net-next 7/9] drivers: net: xgene: Workaround for HW errata 10GE_4

2017-04-26 Thread Iyappan Subramanian
From: Quan Nguyen This patch adds workaround for HW errata 10GE_4: "XGENET_ICM_ECM_DROP_COUNT_REG_0 reg not clear on read". Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c| 2 ++ drivers/net/ethernet/apm/xgene/xgene_enet_sgm

[PATCH net-next 9/9] drivers: net: xgene: Workaround for HW errata 10GE_10/ENET_15

2017-04-26 Thread Iyappan Subramanian
From: Quan Nguyen This patch adds workaround for HW errata 10GE_10 and ENET_15: "HW statistic counters value are duplicated". - RFCS duplicates RALN counter - RFLR duplicates RUND counter - TFCS duplicates TFRG counter - RALN should be intepreted as 0 in 10G mode Signed-off-by: Quan Nguyen Sig

[PATCH net-next 6/9] drivers: net: xgene: Add rx_overrun/tx_underrun statistic

2017-04-26 Thread Iyappan Subramanian
From: Quan Nguyen This patch adds rx_overrun and tx_underrun ethtool statistic counters. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c | 16 +--- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 11 ++

[PATCH net-next 5/9] drivers: net: xgene: Extend ethtool statistics

2017-04-26 Thread Iyappan Subramanian
From: Quan Nguyen This patch adds extended ethtool statistics support. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- .../net/ethernet/apm/xgene/xgene_enet_ethtool.c| 90 +- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 20 + drivers/net/e

[PATCH net-next 8/9] drivers: net: xgene: Add frame recovered statistics counter for errata 10GE_8/ENET_11

2017-04-26 Thread Iyappan Subramanian
From: Quan Nguyen This patch adds statistic counter for frames recovered from HW errata 10GE_8 and ENET_11: "HW reports Length error for valid 64 byte frames with len <46 bytes". Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_ethtoo

[PATCH net-next 3/9] drivers: net: xgene: Refactor statistics error parsing code

2017-04-26 Thread Iyappan Subramanian
From: Quan Nguyen This patch fixes the tx error counters and adds more rx error counters. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 6 -- drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 2 -- drivers/net/ether

[PATCH net-next 1/9] drivers: net: xgene: Protect indirect MAC access

2017-04-26 Thread Iyappan Subramanian
From: Quan Nguyen This patch adds lock to protect indirect mac access sequence. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c| 2 ++ drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 1 + drivers/net/ethernet/apm/xgene/x

[PATCH net-next 2/9] drivers: net: xgene: Remove redundant local stats

2017-04-26 Thread Iyappan Subramanian
From: Quan Nguyen Commit 5944701df90d ("net: remove useless memset's in drivers get_stats64") makes the pdata->stats redundant. This patch removes pdata->stats and updates get_stats64() callback accordingly. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- drivers/net/etherne

[PATCH net-next 4/9] drivers: net: xgene: Remove unused macros

2017-04-26 Thread Iyappan Subramanian
From: Quan Nguyen This patch cleans up unused macros to improve readability. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h

[PATCH net-next 0/9] drivers: net: xgene: Add ethtool stats and bug fixes

2017-04-26 Thread Iyappan Subramanian
This patch set, - adds ethtool extended statistics support - addresses errata workarounds - fixes bugs related to statistics Signed-off-by: Iyappan Subramanian Signed-off-by: Quan Nguyen --- Quan Nguyen (9): drivers: net: xgene: Protect indirect MAC access drivers: net: xgene: Remove redun

Re: [PATCH v1 net-next 3/6] net: add new control message for incoming HW-timestamped packets

2017-04-26 Thread Willem de Bruijn
> diff --git a/net/core/dev.c b/net/core/dev.c > index 1b3317c..0a78f7f 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -160,6 +160,7 @@ static int netif_rx_internal(struct sk_buff *skb); > static int call_netdevice_notifiers_info(unsigned long val, >

Re: [PATCH v2 01/21] scatterlist: Introduce sg_map helper functions

2017-04-26 Thread Logan Gunthorpe
On 26/04/17 02:59 AM, wrote: > Good to know that somebody is working on this. Those problems troubled > us as well. Thanks Christian. It's a daunting problem and a there's a lot of work to do before we will ever be where we need to be so any help, even an ack, is greatly appreciated. Logan

Re: [PATCH net-next 02/10] tcp: do not pass timestamp to tcp_rack_detect_loss()

2017-04-26 Thread Eric Dumazet
On Tue, 2017-04-25 at 10:15 -0700, Eric Dumazet wrote: > We can use tp->tcp_mstamp as it contains a recent timestamp. > > @@ -165,12 +164,10 @@ void tcp_rack_advance(struct tcp_sock *tp, u8 sacked, > u32 end_seq, > void tcp_rack_reo_timeout(struct sock *sk) > { > struct tcp_sock *tp = tc

Re: [PATCH v2 0/8] NFC: fix device allocation and nfcmrvl crashes

2017-04-26 Thread Samuel Ortiz
Hi Johan, On Thu, Mar 30, 2017 at 12:15:34PM +0200, Johan Hovold wrote: > This started out with the observation that the nfcmrvl_uart driver > unconditionally dereferenced the tty class device despite the fact that > not every tty has an associated struct device (Unix98 ptys). Some > further chang

Re: [PATCH 5/7] IB/hfi1: use pcie_flr instead of duplicating it

2017-04-26 Thread Jeff Kirsher
On Tue, 2017-04-25 at 14:39 -0500, Bjorn Helgaas wrote: > On Mon, Apr 24, 2017 at 04:35:07PM +0200, Christoph Hellwig wrote: > > On Mon, Apr 24, 2017 at 02:16:31PM +, Byczkowski, Jakub wrote: > > > Tested-by: Jakub Byczkowski > > > > Are you (and Doug) ok with queueing this up in the PCI tree

Re: [PATCH 4/7] ixgbe: use pcie_flr instead of duplicating it

2017-04-26 Thread Jeff Kirsher
On Thu, 2017-04-13 at 16:53 +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- >  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 16 ++-- >  1 file changed, 2 insertions(+), 14 deletions(-) Acked-by: Jeff Kirsher Sorry for the late ACK. signature.asc Descripti

[PATCH 2/2] arm64: dts: apq8016-sbc: Correct WLAN LED default-trigger

2017-04-26 Thread Bjorn Andersson
The TX status trigger of the wlan interface is named phy0tx, so this updates the default-trigger for the WLAN LED to use that instead. Signed-off-by: Bjorn Andersson --- Note that without patch 1/2 this trigger does not fire - but there's also no harm in picking the two patches through separate

[PATCH 1/2] wcn36xx: Pass used skb to ieee80211_tx_status()

2017-04-26 Thread Bjorn Andersson
As the tx skbs are collected they should be passed to ieee80211_tx_status() rather than ieee80211_free_txskb(), as the prior will take care of monitoring and LED triggers while the latter will consider the skb dropped. Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/wcn36xx/dxe.c | 2

Re: [PATCH net-next 6/6] bpf: show bpf programs

2017-04-26 Thread Daniel Borkmann
On 04/26/2017 08:24 PM, Hannes Frederic Sowa wrote: Signed-off-by: Hannes Frederic Sowa --- include/uapi/linux/bpf.h | 32 +++- kernel/bpf/core.c| 30 +- 2 files changed, 48 insertions(+), 14 deletions(-) diff --git a/include/u

Re: [PATCH net-next 6/6] bpf: show bpf programs

2017-04-26 Thread Alexei Starovoitov
On Wed, Apr 26, 2017 at 08:24:19PM +0200, Hannes Frederic Sowa wrote: > > +static const char *bpf_type_string(enum bpf_prog_type type) > +{ > + static const char *bpf_type_names[] = { > +#define X(type) #type > + BPF_PROG_TYPES > +#undef X > + }; > + > + if (type >= ARRAY_

Re: [PATCH net-next 4/6] bpf: track if the bpf program was loaded with SYS_ADMIN capabilities

2017-04-26 Thread Alexei Starovoitov
On Wed, Apr 26, 2017 at 08:24:17PM +0200, Hannes Frederic Sowa wrote: > Signed-off-by: Hannes Frederic Sowa > --- > include/linux/filter.h | 6 -- > kernel/bpf/core.c | 4 +++- > kernel/bpf/syscall.c | 7 --- > kernel/bpf/verifier.c | 4 ++-- > net/core/filter.c | 6 +++--- >

Re: [PATCH net-next 4/6] bpf: track if the bpf program was loaded with SYS_ADMIN capabilities

2017-04-26 Thread Daniel Borkmann
On 04/26/2017 08:24 PM, Hannes Frederic Sowa wrote: Signed-off-by: Hannes Frederic Sowa Ahh, looks this got swapped with 3/6. --- include/linux/filter.h | 6 -- kernel/bpf/core.c | 4 +++- kernel/bpf/syscall.c | 7 --- kernel/bpf/verifier.c | 4 ++-- net/core/filter.c

Re: xdp_redirect ifindex vs port. Was: best API for returning/setting egress port?

2017-04-26 Thread Andy Gospodarek
On Wed, Apr 26, 2017 at 10:58:45AM -0700, Alexei Starovoitov wrote: > On 4/26/17 9:35 AM, John Fastabend wrote: > > > > > As Alexei also mentioned before, ifindex vs port makes no real > > > difference seen from the bpf program side. It is userspace's > > > responsibility to add ifindex/port's to

[Patch net-next] ipv4: get rid of ip_ra_lock

2017-04-26 Thread Cong Wang
After commit 1215e51edad1 ("ipv4: fix a deadlock in ip_ra_control") we always take RTNL lock for ip_ra_control() which is the only place we update the list ip_ra_chain, so the ip_ra_lock is no longer needed, we just need to disable BH there. Signed-off-by: Cong Wang --- net/ipv4/ip_sockglue.c |

Re: [PATCH net-next] bpf: restore skb->sk before pskb_trim() call

2017-04-26 Thread Alexei Starovoitov
On Wed, Apr 26, 2017 at 09:09:23AM -0700, Eric Dumazet wrote: > From: Eric Dumazet > > While testing a fix [1] in ___pskb_trim(), addressing the WARN_ON_ONCE() > in skb_try_coalesce() reported by Andrey, I found that we had an skb > with skb->sk set but no skb->destructor. > > This invalidated h

Re: [PATCH net-next 3/6] bpf: bpf_progs stores all loaded programs

2017-04-26 Thread Daniel Borkmann
[ -dan...@iogearbox.com (wrong address) ] On 04/26/2017 08:24 PM, Hannes Frederic Sowa wrote: We later want to give users a quick dump of what is possible with procfs, so store a list of all currently loaded bpf programs. Later this list will be printed in procfs. Signed-off-by: Hannes Frederic

Re: [PATCH v2 01/21] scatterlist: Introduce sg_map helper functions

2017-04-26 Thread Logan Gunthorpe
On 26/04/17 01:44 AM, Christoph Hellwig wrote: > I think we'll at least need a draft of those to make sense of these > patches. Otherwise they just look very clumsy. Ok, I'll work up a draft proposal and send it in a couple days. But without a lot of cleanup such as this series it's not going t

Re: [PATCH net-next v8 2/3] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-04-26 Thread Jamal Hadi Salim
On 17-04-26 09:56 AM, Jiri Pirko wrote: Wed, Apr 26, 2017 at 03:14:38PM CEST, j...@mojatatu.com wrote: On 17-04-26 08:08 AM, Jiri Pirko wrote: [..] Jiri, what are you arguing about if you have done the math? ;-> I can do 3*2*64. What I cannot do is to figure out the real performance impact

Low speed MPLS to virtio-net

2017-04-26 Thread Алексей Болдырев
Started MPLS on the branch - Everything was fine. When I tried to run MPLS on a real network of virtual machines, there were problems with the speed: root@containers:~# iperf3 -c 10.194.10.2 -B 10.194.10.1 -Z Connecting to host 10.194.10.2, port 5201 [ 4] local 10.194.10.1 port 49533 conne

[GIT] Networking

2017-04-26 Thread David Miller
1) MLX5 bug fixes from Saeed Mahameed et al. a) Release wrong resources when firmware timeout happens b) Wrong check for encapsulation size limits c) UAR memory leak d) ETHTOOL_GRXCLSRLALL fails to fill in info->data 2) Don't cache l3mdev on mis-matches local route, causes net devi

Re: [PATCH] ipv6: check raw payload size correctly in ioctl

2017-04-26 Thread David Miller
From: Jamie Bainbridge Date: Wed, 26 Apr 2017 10:43:27 +1000 > In situations where an skb is paged, the transport header pointer and > tail pointer can be the same because the skb contents are in frags. > > This results in ioctl(SIOCINQ/FIONREAD) incorrectly returning a > length of 0 when the le

Re: [PATCH net-next] tcp: memset ca_priv data to 0 properly

2017-04-26 Thread David Miller
From: Wei Wang Date: Tue, 25 Apr 2017 17:38:02 -0700 > From: Wei Wang > > Always zero out ca_priv data in tcp_assign_congestion_control() so that > ca_priv data is cleared out during socket creation. > Also always zero out ca_priv data in tcp_reinit_congestion_control() so > that when cc algori

Re: [Patch net] ipv6: check skb->protocol before lookup for nexthop

2017-04-26 Thread David Miller
From: Cong Wang Date: Tue, 25 Apr 2017 14:37:15 -0700 > Andrey reported a out-of-bound access in ip6_tnl_xmit(), this > is because we use an ipv4 dst in ip6_tnl_xmit() and cast an IPv4 > neigh key as an IPv6 address: > > neigh = dst_neigh_lookup(skb_dst(skb), >

Re: [PATCH net-next] virtio-net: on tx, only call napi_disable if tx napi is on

2017-04-26 Thread David Miller
From: Willem de Bruijn Date: Tue, 25 Apr 2017 15:59:17 -0400 > From: Willem de Bruijn > > As of tx napi, device down (`ip link set dev $dev down`) hangs unless > tx napi is enabled. Else napi_enable is not called, so napi_disable > will spin on test_and_set_bit NAPI_STATE_SCHED. > > Only call

Re: [PATCH net-next 0/2] Move sub crq init out of interrupt context

2017-04-26 Thread David Miller
From: Nathan Fontenot Date: Tue, 25 Apr 2017 15:00:58 -0400 > The sub crqs are currently intialized in interrupt context when > handling a crq response fromn the vios server. There is no reason > they must be initialized there. > > Moving the initialization of the sub crqs to the ibmvnic_init ro

Re: [PATCH v3] net: core: Prevent from dereferencing null pointer when releasing SKB

2017-04-26 Thread David Miller
From: Myungho Jung Date: Tue, 25 Apr 2017 11:58:15 -0700 > Added NULL check to make __dev_kfree_skb_irq consistent with kfree > family of functions. > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=195289 > > Signed-off-by: Myungho Jung Applied, thank you.

Re: [PATCH net-next] dt-bindings: mdio: Clarify binding document

2017-04-26 Thread David Miller
From: Florian Fainelli Date: Tue, 25 Apr 2017 11:33:03 -0700 > The described GPIO reset property is applicable to *all* child PHYs. If > we have one reset line per PHY present on the MDIO bus, these > automatically become properties of the child PHY nodes. > > Finally, indicate how the RESET pul

Re: [PATCH net-next 00/10] tcp: do not use tcp_time_stamp for rcv autotuning

2017-04-26 Thread David Miller
From: Eric Dumazet Date: Tue, 25 Apr 2017 10:15:31 -0700 > Some devices or linux distributions use HZ=100 or HZ=250 > > TCP receive buffer autotuning has poor behavior caused by this choice. > Since autotuning happens after 4 ms or 10 ms, short distance flows > get their receive buffer tuned to

Re: [oss-drivers] Re: [RFC 3/4] nfp: make use of extended ack message reporting

2017-04-26 Thread Simon Horman
On Wed, Apr 26, 2017 at 10:44:16AM -0400, David Miller wrote: > From: Simon Horman > Date: Wed, 26 Apr 2017 13:13:16 +0200 > > > On Tue, Apr 25, 2017 at 10:20:22AM -0400, David Miller wrote: > >> From: Jamal Hadi Salim > >> Date: Tue, 25 Apr 2017 08:42:32 -0400 > >> > >> > So are we going to st

Re: [PATCH v2] macsec: dynamically allocate space for sglist

2017-04-26 Thread David Miller
From: "Jason A. Donenfeld" Date: Tue, 25 Apr 2017 19:08:18 +0200 > We call skb_cow_data, which is good anyway to ensure we can actually > modify the skb as such (another error from prior). Now that we have the > number of fragments required, we can safely allocate exactly that amount > of memory.

Re: [PATCH net-next] rhashtable: remove insecure_max_entries param

2017-04-26 Thread David Miller
From: Florian Westphal Date: Tue, 25 Apr 2017 11:41:34 +0200 > no users in the tree, insecure_max_entries is always set to > ht->p.max_size * 2 in rhtashtable_init(). > > Replace only spot that uses it with a ht->p.max_size check. > > Signed-off-by: Florian Westphal Applied, thanks Florian.

Re: [RFC PATCH] netxen_nic: null-terminate serial number string in netxen_check_options()

2017-04-26 Thread David Miller
From: "Jerome Marchand" Date: Tue, 25 Apr 2017 09:42:29 +0200 > The serial_num string in netxen_check_options() is not always properly > null-terminated. I couldn't find the documention on the serial number > format and I suspect a proper integer to string conversion is in > order, but this patch

[PATCH v2 net-next] ip6_tunnel: Fix missing tunnel encapsulation limit option

2017-04-26 Thread Craig Gallek
From: Craig Gallek The IPv6 tunneling code tries to insert IPV6_TLV_TNL_ENCAP_LIMIT and IPV6_TLV_PADN options when an encapsulation limit is defined (the default is a limit of 4). An MTU adjustment is done to account for these options as well. However, the options are never present in the gener

Re: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-26 Thread David Miller
From: Alexander Kochetkov Date: Thu, 20 Apr 2017 14:00:04 +0300 > The Ethernet link on an interrupt driven PHY was not coming up if the Ethernet > cable was plugged before the Ethernet interface was brought up. > > The patch trigger PHY state machine to update link state if PHY was requested >

GSO + changing TX queues == crash?

2017-04-26 Thread Jakub Kicinski
Hi! I'm seeing crashes with GSO on when changing the number of TX rings. I initially thought it was a nfp driver problem but I managed to reproduce it with i40e now. What I run on the nfp was iperf sending two dozen streams. Then I run this little script while 40Gbps is being sent: bl() {

Re: [PATCH] stmmac: Add support for SIMATIC IOT2000 platform

2017-04-26 Thread Andy Shevchenko
On Tue, Apr 25, 2017 at 3:15 PM, Jan Kiszka wrote: > On 2017-04-25 13:42, Andy Shevchenko wrote: >> On Tue, Apr 25, 2017 at 1:09 PM, Jan Kiszka wrote: >>> On 2017-04-25 12:07, Jan Kiszka wrote: On 2017-04-25 11:46, Andy Shevchenko wrote: > On Tue, Apr 25, 2017 at 12:00 PM, Jan Kiszka >

[PATCH net-next 3/6] bpf: bpf_progs stores all loaded programs

2017-04-26 Thread Hannes Frederic Sowa
We later want to give users a quick dump of what is possible with procfs, so store a list of all currently loaded bpf programs. Later this list will be printed in procfs. Signed-off-by: Hannes Frederic Sowa --- include/linux/filter.h | 4 ++-- kernel/bpf/core.c | 51 +++

[PATCH net-next 5/6] bpf: add skeleton for procfs printing of bpf_progs

2017-04-26 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- kernel/bpf/core.c | 90 +++ 1 file changed, 90 insertions(+) diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c index 048e2d79718a16..3ba175a24e971a 100644 --- a/kernel/bpf/core.c +++ b/kernel/bpf/core.c

[PATCH net-next 1/6] bpf: bpf_lock needs only block bottom half

2017-04-26 Thread Hannes Frederic Sowa
We never modify bpf programs from hardirqs ever. Signed-off-by: Hannes Frederic Sowa --- kernel/bpf/core.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c index b4f1cb0c5ac710..6f81e0f5a0faa2 100644 --- a/kernel/bpf/core.c ++

[PATCH net-next 6/6] bpf: show bpf programs

2017-04-26 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- include/uapi/linux/bpf.h | 32 +++- kernel/bpf/core.c| 30 +- 2 files changed, 48 insertions(+), 14 deletions(-) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index e5535299

[PATCH net-next 0/6] bpf: list all loaded ebpf programs in /proc/bpf/programs

2017-04-26 Thread Hannes Frederic Sowa
Right now it seems difficult to list all active ebpf programs in a system. This new /proc/bpf/programs node should help and print basically essential information about loaded ebpf programs. This should help an admin to get a quick look of what is going on in his system. Feedback welcome! Hannes

[PATCH net-next 4/6] bpf: track if the bpf program was loaded with SYS_ADMIN capabilities

2017-04-26 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- include/linux/filter.h | 6 -- kernel/bpf/core.c | 4 +++- kernel/bpf/syscall.c | 7 --- kernel/bpf/verifier.c | 4 ++-- net/core/filter.c | 6 +++--- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/include/linux/filter

[PATCH net-next 2/6] bpf: rename bpf_kallsyms to bpf_progs, ksym_lnode to bpf_progs_head

2017-04-26 Thread Hannes Frederic Sowa
We will soon put all bpf programs on this list, thus use apropriate names. Signed-off-by: Hannes Frederic Sowa --- include/linux/bpf.h | 2 +- kernel/bpf/core.c | 18 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/bpf.h b/include/linux/bpf.h

Re: linux-next: Tree for Apr 26 (net/can/bcm.c)

2017-04-26 Thread Oliver Hartkopp
Hi Randy, thanks for the report! Some fallout of my namespace support integration %-) I posted a patch for it: http://marc.info/?l=linux-can&m=149323049630039&w=2 Many thanks & best regards, Oliver On 04/26/2017 04:53 PM, Randy Dunlap wrote: On 04/26/17 01:03, Stephen Rothwell wrote: Hi al

Re: Bug and configuration MPLS error?

2017-04-26 Thread David Ahern
On 4/26/17 6:40 AM, Алексей Болдырев wrote: > > > 26.04.2017, 05:23, "David Ahern" : >> On 4/25/17 11:28 AM, Алексей Болдырев wrote: >>> 226 sysctl -w net.mpls.conf.lo.input=1 >>> 227 sysctl -w net.mpls.platform_labels=1048575 >>> 228 ip link add veth0 type veth peer name veth1 >>> 229 ip lin

[PATCH net-next] can: fix CAN BCM build with CONFIG_PROC_FS disabled

2017-04-26 Thread Oliver Hartkopp
The introduced namespace support moved the BCM variables for procfs into a per-net data structure. This leads to a build failure with disabled procfs: on x86_64: when CONFIG_PROC_FS is not enabled: ../net/can/bcm.c:1541:14: error: 'struct netns_can' has no member named 'bcmproc_dir' ../net/can/

Re: [PATCH net-next] ip6_tunnel: Fix missing tunnel encapsulation limit option

2017-04-26 Thread Craig Gallek
On Wed, Apr 26, 2017 at 1:07 PM, Craig Gallek wrote: > From: Craig Gallek > > The IPv6 tunneling code tries to insert IPV6_TLV_TNL_ENCAP_LIMIT and > IPV6_TLV_PADN options when an encapsulation limit is defined (the > default is a limit of 4). An MTU adjustment is done to account for > these opti

Re: xdp_redirect ifindex vs port. Was: best API for returning/setting egress port?

2017-04-26 Thread Alexei Starovoitov
On 4/26/17 9:35 AM, John Fastabend wrote: As Alexei also mentioned before, ifindex vs port makes no real difference seen from the bpf program side. It is userspace's responsibility to add ifindex/port's to the bpf-maps, according to how the bpf program "policy" want to "connect" these ports.

Re: [Patch net 3/3] team: use a larger struct for mac address

2017-04-26 Thread Jarod Wilson
On 2017-04-26 1:28 PM, Cong Wang wrote: On Wed, Apr 26, 2017 at 9:46 AM, Jarod Wilson wrote: On 2017-04-26 12:11 PM, Cong Wang wrote: On Wed, Apr 26, 2017 at 8:55 AM, Jarod Wilson wrote: We already have struct sockaddr_storage that could be used throughout this set as well. We just conver

RE: qed*: debug infrastructures

2017-04-26 Thread Elior, Ariel
Jiri, Florian, Jakub, Thanks all for you suggestions. Some answers to questions posted: The signal tracing in our device can be used for tracing things like load/store/program_counter from our fastpath processors (which handle every packet) which can then be re-run in a simulative environment (re

Re: Corrupted SKB

2017-04-26 Thread Cong Wang
On Tue, Apr 25, 2017 at 9:42 PM, Michael Ma wrote: > 2017-04-18 21:46 GMT-07:00 Michael Ma : >> 2017-04-18 16:12 GMT-07:00 Cong Wang : >>> On Mon, Apr 17, 2017 at 5:39 PM, Michael Ma wrote: Hi - We've implemented a "glue" qdisc similar to mqprio which can associate one qdisc t

Re: [Patch net 3/3] team: use a larger struct for mac address

2017-04-26 Thread Cong Wang
On Wed, Apr 26, 2017 at 9:46 AM, Jarod Wilson wrote: > On 2017-04-26 12:11 PM, Cong Wang wrote: >> >> On Wed, Apr 26, 2017 at 8:55 AM, Jarod Wilson wrote: >>> >>> >>> We already have struct sockaddr_storage that could be used throughout >>> this >>> set as well. We just converted a few pieces of

Re: [PATCH v2 2/2] ARM: dts: Add the ethernet and ethernet PHY to the cygnus core DT.

2017-04-26 Thread Eric Anholt
Florian Fainelli writes: > On 04/25/2017 04:53 PM, Eric Anholt wrote: >> Cygnus has a single AMAC controller connected to the B53 switch with 2 >> PHYs. On the BCM911360_EP platform, those two PHYs are connected to >> the external ethernet jacks. >> >> Signed-off-by: Eric Anholt >> Reviewed-by

[PATCH] net: hso: register netdev later to avoid a race condition

2017-04-26 Thread Andreas Kemnade
If the netdev is accessed before the urbs are initialized, there will be NULL pointer dereferences. That is avoided by registering it when it is fully initialized. This case occurs e.g. if dhcpcd is running in the background and the device is probed, either after insmod hso or when the device appe

Re: [PATCH v2 2/2] ARM: dts: Add the ethernet and ethernet PHY to the cygnus core DT.

2017-04-26 Thread Eric Anholt
Florian Fainelli writes: > On 04/25/2017 04:53 PM, Eric Anholt wrote: >> Cygnus has a single AMAC controller connected to the B53 switch with 2 >> PHYs. On the BCM911360_EP platform, those two PHYs are connected to >> the external ethernet jacks. >> >> Signed-off-by: Eric Anholt >> Reviewed-by

Re: [PATCH v2 2/2] ARM: dts: Add the ethernet and ethernet PHY to the cygnus core DT.

2017-04-26 Thread Eric Anholt
Andrew Lunn writes: >> +eth0: ethernet@18042000 { >> +compatible = "brcm,amac"; >> +reg = <0x18042000 0x1000>, >> + <0x1811 0x1000>; >> +reg-names = "amac_base", "idm_base"; >> +

  1   2   3   >