[PATCH net-next 08/11] ibmvnic: Check for driver reset first in ibmvnic_xmit

2017-04-28 Thread Nathan Fontenot
Move the check for the driver resetting to the first thing in ibmvnic_xmit(). Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c

[PATCH net-next 11/11] ibmvnic: Move queue restart

2017-04-28 Thread Nathan Fontenot
--- drivers/net/ethernet/ibm/ibmvnic.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 4a2b99f..12536ba 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++

[PATCH net-next 07/11] ibmvnic: Wait for any pending scrqs entries at driver close

2017-04-28 Thread Nathan Fontenot
When closing the ibmvnic driver we need to wait for any pending sub crq entries to ensure they are handled. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 47 +--- 1 file changed, 27 insertions(+), 20

[PATCH net-next 09/11] ibmvnic: Continue skb processing after skb completion error

2017-04-28 Thread Nathan Fontenot
There is not a need to stop processing skbs if we encounter a skb that has a receive completion error. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH net-next 10/11] From: Thomas Falcon <tlfal...@linux.vnet.ibm.com>

2017-04-28 Thread Nathan Fontenot
From: Thomas Falcon ibmvnic: Record SKB RX queue during poll Map each RX SKB to the RX queue associated with the driver's RX SCRQ. This should improve the RX CPU load balancing issues seen by the performance team. Signed-off-by: Thomas Falcon

[PATCH net-next 04/11] ibmvnic: Delete napi's when releasing driver resources

2017-04-28 Thread Nathan Fontenot
The napi structs allocated at drivier initializatio need to be free'ed when releasing the drivers resources. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |9 + 1 file changed, 9 insertions(+) diff --git

[PATCH net-next 06/11] ibmvnic: Clean up tx pools when closing

2017-04-28 Thread Nathan Fontenot
When closing the bimvnic driver, most notably during the reset path, the tx pools need to be cleaned to ensure there are no hanging skbs that need to be free'ed. The need to do this was found during debugging a loss of network traffic after handling a driver reset. The underlying cause was some

[PATCH net-next 05/11] ibmvnic: Whitespace correction in release_rx_pools

2017-04-28 Thread Nathan Fontenot
Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 9f2686d..d20d884 100644 ---

[PATCH net-next 03/11] ibmvnic: Updated reset handling

2017-04-28 Thread Nathan Fontenot
The ibmvnic driver has multiple handlers for resetting the driver depending on the reason the reset is needed (failover, lpm, fatal erors,...). All of the reset handlers do essentially the same thing, this patch moves this work to a common reset handler. By doing this we also allow the driver to

[PATCH net-next 01/11] ibmvnic: Move resource initialization to its own routine

2017-04-28 Thread Nathan Fontenot
Move all of the calls to initialize resources for the driver to a separate routine. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 71 1 file changed, 39 insertions(+), 32 deletions(-) diff --git

[PATCH net-next 00/11] ibmvnic: Updated reset handler and code fixes

2017-04-28 Thread Nathan Fontenot
This set of patches multiple code fixes and a new rest handler for the ibmvnic driver. In order to implement the new reset handler for the ibmvnic driver resource initialization needed to be moved to its own routine, a state variable is introduced to replace the various is_* flags in the driver,

[PATCH net-next 02/11] ibmvnic: Replace is_closed with state field

2017-04-28 Thread Nathan Fontenot
Replace the is_closed flag in the ibmvnic adapter strcut with a more comprehensive state field that tracks the current state of the driver. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 20 +---

[PATCH net v3] net: vlan: Fix one possbile memleak when fail to register_netdevice

2017-04-28 Thread gfree . wind
From: Gao Feng The vlan driver allocates some resources in its ndo_init func, and free some of them in its destructor func. Then there is one memleak that some errors happen after register_netdevice invokes the ndo_init callback. Because only the ndo_uninit callback is

[PATCH net v3] net: ip_tunnel: Fix one possbile memleak when fail to register_netdevice

2017-04-28 Thread gfree . wind
From: Gao Feng The ip_tunnel allocates some resources in its ndo_init func, and free some of them in its destructor func. Then there is one memleak that some errors happen after register_netdevice invokes the ndo_init callback. Because only the ndo_uninit callback is

[PATCH net v3] net: sit: Fix one possbile memleak when fail to register_netdevice

2017-04-28 Thread gfree . wind
From: Gao Feng The ipip6 allocates some resources in its ndo_init func, and free some of them in its destructor func. Then there is one memleak that some errors happen after register_netdevice invokes the ndo_init callback. Because only the ndo_uninit callback is invoked

[PATCH net v3] net: ip6_vti: Fix one possbile memleak when fail to register_netdevice

2017-04-28 Thread gfree . wind
From: Gao Feng The ip6_vti allocates some resources in its ndo_init func, and free some of them in its destructor func. Then there is one memleak that some errors happen after register_netdevice invokes the ndo_init callback. Because only the ndo_uninit callback is

[PATCH net v3] net: ip6_tunnel: Fix one possbile memleak when fail to register_netdevice

2017-04-28 Thread gfree . wind
From: Gao Feng The ip6_tunnel allocates some resources in its ndo_init func, and free some of them in its destructor func. Then there is one memleak that some errors happen after register_netdevice invokes the ndo_init callback. Because only the ndo_uninit callback is

[PATCH net v3] net: ip6_gre: Fix one possbile memleak when fail to register_netdevice

2017-04-28 Thread gfree . wind
From: Gao Feng The ip6_gre allocates some resources in its ndo_init func, and free some of them in its destructor func. Then there is one memleak that some errors happen after register_netdevice invokes the ndo_init callback. Because only the ndo_uninit callback is

[PATCH net v3] driver: veth: Fix one possbile memleak when fail to register_netdevice

2017-04-28 Thread gfree . wind
From: Gao Feng The veth driver allocates some resources in its ndo_init func, and free them in its destructor func. Then there is one memleak that some errors happen after register_netdevice invokes the ndo_init callback. Because the destructor would not be invoked to

[PATCH net v3] driver: team: Fix one possbile memleak when fail to register_netdevice

2017-04-28 Thread gfree . wind
From: Gao Feng The team driver allocates some resources in its ndo_init func, and free some of them in its destructor func. Then there is one memleak that some errors happen after register_netdevice invokes the ndo_init callback. Because only the ndo_uninit callback is

[PATCH net v3] driver: loopback: Fix one possbile memleak when fail to register_netdevice

2017-04-28 Thread gfree . wind
From: Gao Feng The loopback driver allocates some resources in its ndo_init func, and free them in its destructor func. Then there is one memleak that some errors happen after register_netdevice invokes the ndo_init callback. Because the destructor would not be invoked to

[PATCH net v3] driver: ifb: Fix one possbile memleak when fail to register_netdevice

2017-04-28 Thread gfree . wind
From: Gao Feng The ifb driver allocates some resources in its ndo_init func, and free them in its destructor func. Then there is one memleak that some errors happen after register_netdevice invokes the ndo_init callback. Because the destructor would not be invoked to free

[PATCH net v3] driver: dummy: Fix one possbile memleak when fail to register_netdevice

2017-04-28 Thread gfree . wind
From: Gao Feng The dummy driver allocates dev->dstats and priv->vfinfo in its ndo_init func dummy_dev_init, free the dev->dstats in the ndo_uninit and free the priv->vfinfo in its destructor func. Then there is one memleak that some errors happen after register_netdevice

Re: [net-next PATCH V1] samples/bpf: bpf_load.c detect and abort if ELF maps section size is wrong

2017-04-28 Thread Alexei Starovoitov
On Fri, Apr 28, 2017 at 04:25:04PM +0200, Jesper Dangaard Brouer wrote: > The struct bpf_map_def was extended in commit fb30d4b71214 ("bpf: Add tests > for map-in-map") with member unsigned int inner_map_idx. This changed the > size > of the maps section in the generated ELF _kern.o files. > >

Re: [PATCH v2] iov_iter: don't revert iov buffer if csum error

2017-04-28 Thread Al Viro
On Sat, Apr 29, 2017 at 10:38:48AM +0800, Ding Tianhong wrote: > The patch 327868212381 (make skb_copy_datagram_msg() et.al. preserve > ->msg_iter on error) will revert the iov buffer if copy to iter > failed, but it didn't copy any datagram if the skb_checksum_complete > error, so no need to

[PATCH v2] iov_iter: don't revert iov buffer if csum error

2017-04-28 Thread Ding Tianhong
The patch 327868212381 (make skb_copy_datagram_msg() et.al. preserve ->msg_iter on error) will revert the iov buffer if copy to iter failed, but it didn't copy any datagram if the skb_checksum_complete error, so no need to revert any data at this place. v2: Sabrina notice that return -EFAULT when

Re: [PATCH] iov_iter: don't revert if csum error

2017-04-28 Thread Ding Tianhong
On 2017/4/28 21:16, Sabrina Dubroca wrote: > 2017-04-28, 20:48:45 +0800, Ding Tianhong wrote: >> The patch 3278682 (make skb_copy_datagram_msg() et.al. preserve >> ->msg_iter on error) will revert the iov buffer if copy to iter >> failed, but it looks no need to revert for csum error, so fix it.

Re: [PATCH v4 net-next]smsc911x: Adding support for Micochip LAN9250 Ethernet controller

2017-04-28 Thread Andrew Lunn
On Fri, Apr 28, 2017 at 10:28:32PM +, david@microchip.com wrote: > From: David Cai > > Adding support for Microchip LAN9250 Ethernet controller. > > Signed-off-by: David Cai > --- > Changes > V2 > - email format changed > - remove

[PATCH net] bnx2x: Align RX buffers

2017-04-28 Thread Scott Wood
The bnx2x driver is not providing proper alignment on the receive buffers it passes to build_skb(), causing skb_shared_info to be misaligned. skb_shared_info contains an atomic, and while PPC normally supports unaligned accesses, it does not support unaligned atomics. Aligning the size of rx

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

2017-04-28 Thread Bjorn Andersson
On Thu 27 Apr 01:22 PDT 2017, Johannes Berg wrote: > > > @@ -371,7 +371,7 @@ static void reap_tx_dxes(struct wcn36xx *wcn, > > struct wcn36xx_dxe_ch *ch) > >   info = IEEE80211_SKB_CB(ctl->skb); > >   if (!(info->flags & > > IEEE80211_TX_CTL_REQ_TX_STATUS)) {

please discard [PATCH v4 net-next]smsc911x: Adding support for Micochip LAN9250 Ethernet controller

2017-04-28 Thread David.Cai
HiAndrew: Please discard the [PATCH v4 net-next]smsc911x: Adding support for Micochip LAN9250 Ethernet controller which I just submit, Because I found the new variable 'sub_generation' don't need any more. I will submit v5 to do this Thanks David Cai

Re: [PATCH v6 1/5] skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow

2017-04-28 Thread Jason A. Donenfeld
Hi Sabrina, On Fri, Apr 28, 2017 at 6:18 PM, Sabrina Dubroca wrote: > One small thing here: since you're touching this comment, could you > move it next to skb_to_sgvec, since that's the function it's supposed > to document? Done. I'll wait until next week to resubmit, to

Re: [PATCH iproute2 net-next v2] bpf: add support for generic xdp

2017-04-28 Thread Stephen Hemminger
On Fri, 28 Apr 2017 15:44:29 +0200 Daniel Borkmann wrote: > diff --git a/ip/iplink.c b/ip/iplink.c > index 866ad72..96b0da3 100644 > --- a/ip/iplink.c > +++ b/ip/iplink.c > @@ -606,9 +606,12 @@ int iplink_parse(int argc, char **argv, struct > iplink_req *req, >

Re: [PATCH net-next] rtnetlink: Remove NETDEV_CHANGEINFODATA

2017-04-28 Thread Jiri Pirko
Fri, Apr 28, 2017 at 08:06:25PM CEST, d...@cumulusnetworks.com wrote: >NETDEV_CHANGEINFODATA was added by d4261e5650004 ("bonding: create >netlink event when bonding option is changed"). RTM_NEWLINK >messages are already created on changelink events, so this event >is just a duplicate. Remove it.

Re: [patch net-next 00/10] net: sched: introduce multichain support for filters

2017-04-28 Thread Jiri Pirko
Fri, Apr 28, 2017 at 07:40:24PM CEST, xiyou.wangc...@gmail.com wrote: >On Thu, Apr 27, 2017 at 11:53 PM, Jiri Pirko wrote: >> Thu, Apr 27, 2017 at 07:46:03PM CEST, xiyou.wangc...@gmail.com wrote: >>>On Thu, Apr 27, 2017 at 4:12 AM, Jiri Pirko wrote:

Re: [patch net-next 02/10] net: sched: introduce tcf block infractructure

2017-04-28 Thread Jiri Pirko
Fri, Apr 28, 2017 at 07:48:34PM CEST, xiyou.wangc...@gmail.com wrote: >On Thu, Apr 27, 2017 at 4:12 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Currently, the filter chains are direcly put into the private structures >> of qdiscs. In order to be able to

[PATCH v4 net-next]smsc911x: Adding support for Micochip LAN9250 Ethernet controller

2017-04-28 Thread David.Cai
From: David Cai Adding support for Microchip LAN9250 Ethernet controller. Signed-off-by: David Cai --- Changes V2 - email format changed - remove unnecessary text in commit log Changes V3 - defined all supported Ethernet controller chip ID.

[PATCH v3 1/2] net: dsa: b53: Add compatible strings for the Cygnus-family BCM11360.

2017-04-28 Thread Eric Anholt
Cygnus is a small family of SoCs, of which we currently have devicetree for BCM11360 and BCM58300. The 11360's B53 is mostly the same as 58xx, just requiring a tiny bit of setup that was previously missing. v2: Reorder the entry in the docs (suggestion by Scott Branden), add missing '"'

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

2017-04-28 Thread Eric Anholt
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. v2: Call the node "switch", just call the ports "port" (suggestions by Florian), drop max-speed on the phys (suggestion by

Re: [PATCH net-next] samples/bpf: Add support for SKB_MODE to xdp1 and xdp_tx_iptunnel

2017-04-28 Thread Jesper Dangaard Brouer
On Thu, 27 Apr 2017 09:11:13 -0700 David Ahern wrote: > Add option to xdp1 and xdp_tx_iptunnel to insert xdp program in > SKB_MODE: > - update set_link_xdp_fd to take a flags argument that is added to the >RTM_SETLINK message > > - Add -S option to xdp1 and

Re: [PATCH net-next v3] net: bridge: Fix improper taking over HW learned FDB

2017-04-28 Thread Nikolay Aleksandrov
On 28/04/17 22:39, Arkadi Sharshevsky wrote: > Commit 7e26bf45e4cb ("net: bridge: allow SW learn to take over HW fdb > entries") added the ability to "take over an entry which was previously > learned via HW when it shows up from a SW port". > > However, if an entry was learned via HW and then a

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

2017-04-28 Thread Hannes Frederic Sowa
On 28.04.2017 19:04, Cong Wang wrote: > 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. > > As Eric points out, BH does not need to

Re: prog ID and next steps. Was: [RFC net-next 0/2] Introduce bpf_prog ID and iteration

2017-04-28 Thread Hannes Frederic Sowa
Hello, On 28.04.2017 21:31, Alexei Starovoitov wrote: >> jit on: >> >> perf record -e bpf_redirect -agR >> >> The unwinder walks the stack, extracts address of upper function and >> sends it to user space (perf) or handles it inside the kernel/kallsyms >> (ftrace). >> >> User takes tag of bpf

Re: net/ipv6: warning in inet6_ifa_finish_destroy

2017-04-28 Thread Cong Wang
On Fri, Apr 28, 2017 at 6:08 AM, Andrey Konovalov wrote: > Hi, > > I've got the following error report while fuzzing the kernel with syzkaller. > > On commit 5a7ad1146caa895ad718a534399e38bd2ba721b7 (4.11-rc8). > > C reproducer and .config are attached. > It takes 1-2

[PATCH v3 binutils] Add BPF support to binutils...

2017-04-28 Thread David Miller
New in this version: 1) All the relocation work I posted earlier today. 2) Teach readelf about a few bpf relocs as needed 3) Add a 'nop' instruction which facilitates the gas testsuite. I used "mov r0,r0" The whole gas testsuite passes now. :-) But that just means we have to add more tests

Re: [PATCH v2 1/2] net: dsa: b53: Add compatible strings for the Cygnus-family BCM11360.

2017-04-28 Thread Rob Herring
On Tue, Apr 25, 2017 at 04:53:56PM -0700, Eric Anholt wrote: > Cygnus is a small family of SoCs, of which we currently have > devicetree for BCM11360 and BCM58300. The 11360's B53 is mostly the > same as 58xx, just requiring a tiny bit of setup that was previously > missing. > > Signed-off-by:

[GIT] Networking

2017-04-28 Thread David Miller
Just a couple more stragglers, I really hope this is it: 1) Don't let frags slip down into the GRO segmentation handlers, from Steffen Klassert. 2) Truesize under-estimation triggers warnings in TCP over loopback with socket filters, 2 part fix from Eric Dumazet. 3) Fix undesirable reset

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

2017-04-28 Thread David Miller
From: Andreas Kemnade Date: Wed, 26 Apr 2017 19:26:40 +0200 > 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

Re: [PATCH net] net: hns: fix ethtool_get_strings overflow in hns driver

2017-04-28 Thread David Miller
From: Timmy Li Date: Thu, 27 Apr 2017 22:18:16 +0800 > @@ -672,7 +672,7 @@ static void hns_gmac_get_strings(u32 stringset, u8 *data) > > static int hns_gmac_get_sset_count(int stringset) > { > - if (stringset == ETH_SS_STATS) > + if ((stringset ==

Re: [PATCH] netvsc: make sure napi enabled before vmbus_open

2017-04-28 Thread David Miller
From: Stephen Hemminger Date: Wed, 26 Apr 2017 16:58:30 -0700 > 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

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

2017-04-28 Thread Willem de Bruijn
On Fri, Apr 28, 2017 at 12:23 PM, Miroslav Lichvar wrote: > On Fri, Apr 28, 2017 at 11:50:28AM -0400, Willem de Bruijn wrote: >> On Fri, Apr 28, 2017 at 4:54 AM, Miroslav Lichvar >> wrote: >> >> if (skb_shinfo(skb)->tx_flags & SKBTX_SW_TSTAMP && >> >>

Re: [PATCH net] net: adjust skb->truesize in ___pskb_trim()

2017-04-28 Thread David Miller
From: Eric Dumazet Date: Wed, 26 Apr 2017 09:07:46 -0700 > 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. > > As we did recently in

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

2017-04-28 Thread David Miller
From: Andrey Konovalov Date: Thu, 27 Apr 2017 13:49:57 +0200 > On Thu, Apr 27, 2017 at 2:15 AM, Eric Dumazet wrote: >> From: Eric Dumazet >> >> Andrey found a way to trigger the WARN_ON_ONCE(delta < len) in >>

Re: [PATCH net] bonding: avoid defaulting hard_header_len to ETH_HLEN on slave removal

2017-04-28 Thread David Miller
From: Paolo Abeni Date: Thu, 27 Apr 2017 19:29:34 +0200 > On slave list updates, the bonding driver computes its hard_header_len > as the maximum of all enslaved devices's hard_header_len. > If the slave list is empty, e.g. on last enslaved device removal, > ETH_HLEN is used.

Re: [PATCH net] ipv4: Don't pass IP fragments to upper layer GRO handlers.

2017-04-28 Thread David Miller
From: Steffen Klassert Date: Fri, 28 Apr 2017 10:54:32 +0200 > Upper layer GRO handlers can not handle IP fragments, so > exit GRO processing in this case. > > This fixes ESP GRO because the packet must be reassembled > before we can decapsulate, otherwise we get

Re: [PATCH] [4.11 regression] cpsw/netcp: refine cpts dependency

2017-04-28 Thread David Miller
From: Arnd Bergmann Date: Fri, 28 Apr 2017 17:03:58 +0200 > Tony Lindgren reports a kernel oops that resulted from my compile-time > fix on the default config. This shows two problems: > > a) configurations that did not already enable PTP_1588_CLOCK will >now miss the cpts

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

2017-04-28 Thread David Miller
From: Daniel Borkmann Date: Thu, 27 Apr 2017 01:39:30 +0200 > 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

Re: pull request (net-next): ipsec-next 2017-04-28

2017-04-28 Thread David Miller
From: Steffen Klassert Date: Fri, 28 Apr 2017 10:42:37 +0200 > Just one patch to fix a misplaced spin_unlock_bh in an error path. > > Please pull or let me know if there are problems. Pulled, thank you.

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

2017-04-28 Thread Hannes Frederic Sowa
On 28.04.2017 07:30, Alexei Starovoitov wrote: > On 4/27/17 10:06 PM, John Fastabend wrote: >> That is more or less what I was thinking as well. The other question >> I have though is should we have a bpf_redirect() call for the simple >> case where I use the ifindex directly. This will be helpful

Re: pull request (net): ipsec 2017-04-28

2017-04-28 Thread David Miller
From: Steffen Klassert Date: Fri, 28 Apr 2017 11:14:31 +0200 > 1) Do garbage collecting after a policy flush to remove old >bundles immediately. From Xin Long. > > 2) Fix GRO if netfilter is not defined. >From Sabrina Dubroca. > > Please pull or let me

[PATCH net-next v3] net: bridge: Fix improper taking over HW learned FDB

2017-04-28 Thread Arkadi Sharshevsky
Commit 7e26bf45e4cb ("net: bridge: allow SW learn to take over HW fdb entries") added the ability to "take over an entry which was previously learned via HW when it shows up from a SW port". However, if an entry was learned via HW and then a control packet (e.g., ARP request) was trapped to the

Re: prog ID and next steps. Was: [RFC net-next 0/2] Introduce bpf_prog ID and iteration

2017-04-28 Thread Alexei Starovoitov
On 4/28/17 4:50 AM, Hannes Frederic Sowa wrote: Hello Alexei, On 28.04.2017 03:11, Alexei Starovoitov wrote: On 4/27/17 6:36 AM, Hannes Frederic Sowa wrote: On 27.04.2017 08:24, Martin KaFai Lau wrote: This patchset introduces the bpf_prog ID and a new bpf cmd to iterate all bpf_prog in the

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

2017-04-28 Thread Logan Gunthorpe
On 28/04/17 11:51 AM, Herbert Xu wrote: > On Fri, Apr 28, 2017 at 10:53:45AM -0600, Logan Gunthorpe wrote: >> >> >> On 28/04/17 12:30 AM, Herbert Xu wrote: >>> You are right. Indeed the existing code looks buggy as they >>> don't take sg->offset into account when doing the kmap. Could >>> you

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

2017-04-28 Thread Johan Hovold
On Fri, Apr 28, 2017 at 07:36:29PM +0200, Andreas Kemnade wrote: > On Thu, 27 Apr 2017 10:44:01 +0200 > Johan Hovold wrote: > > > On Wed, Apr 26, 2017 at 07:26:40PM +0200, Andreas Kemnade wrote: > > > If the netdev is accessed before the urbs are initialized, > > > there will

Re: [PATCH net-next] geneve: fix incorrect setting of UDP checksum flag

2017-04-28 Thread Pravin Shelar
On Thu, Apr 27, 2017 at 2:11 PM, Girish Moodalbail wrote: > Creating a geneve link with 'udpcsum' set results in a creation of link > for which UDP checksum will NOT be computed on outbound packets, as can > be seen below. > > 11: gen0: mtu 1500

Re: [PATCH net-next] geneve: fix incorrect setting of UDP checksum flag

2017-04-28 Thread Lance Richardson
> From: "Girish Moodalbail" > To: da...@davemloft.net > Cc: netdev@vger.kernel.org, pshe...@ovn.org > Sent: Thursday, 27 April, 2017 5:11:53 PM > Subject: [PATCH net-next] geneve: fix incorrect setting of UDP checksum flag > > Creating a geneve link with 'udpcsum'

Re: prog ID and next steps. Was: [RFC net-next 0/2] Introduce bpf_prog ID and iteration

2017-04-28 Thread Hannes Frederic Sowa
On 28.04.2017 20:51, Hannes Frederic Sowa wrote: > Doesn't this break if I have 2 mlx4 cards in the system with different > XDP programs attached? I would have to add an additional parameter to > one of the mlx4 functions to extract the net_device pointer to make the > correlation then. Probably

Re: prog ID and next steps. Was: [RFC net-next 0/2] Introduce bpf_prog ID and iteration

2017-04-28 Thread Hannes Frederic Sowa
Hello, On 28.04.2017 20:24, Daniel Borkmann wrote: > On 04/28/2017 01:50 PM, Hannes Frederic Sowa wrote: >> On 28.04.2017 03:11, Alexei Starovoitov wrote: > [...] >>> i disagree re: kallsyms. The goal of prog_tag is to let program writers >>> understand which program is running in a stable way.

Re: pull-request: mac80211-next 2017-04-28

2017-04-28 Thread David Miller
From: Johannes Berg Date: Fri, 28 Apr 2017 19:56:57 +0200 > Since I had many API changes pending I decided to go ahead and > take the opportunity to get them before the merge window, which > is a natural tree synchronization point :) Awesome :) > I meant to sent this

Re: [PATCH net-next 1/4] ixgbe: sparc: rename the ARCH_WANT_RELAX_ORDER to IXGBE_ALLOW_RELAXED_ORDER

2017-04-28 Thread Casey Leedom
| From: Lucas Stach | Sent: Friday, April 28, 2017 1:51 AM | | Am Donnerstag, den 27.04.2017, 12:19 -0500 schrieb Bjorn Helgaas: | > | > | > I thought Relaxed Ordering was an optimization. Are there cases where | > it is actually required for correct behavior? | |

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

2017-04-28 Thread Herbert Xu
On Fri, Apr 28, 2017 at 10:53:45AM -0600, Logan Gunthorpe wrote: > > > On 28/04/17 12:30 AM, Herbert Xu wrote: > > You are right. Indeed the existing code looks buggy as they > > don't take sg->offset into account when doing the kmap. Could > > you send me some patches that fix these problems

Re: prog ID and next steps. Was: [RFC net-next 0/2] Introduce bpf_prog ID and iteration

2017-04-28 Thread Daniel Borkmann
On 04/28/2017 01:50 PM, Hannes Frederic Sowa wrote: On 28.04.2017 03:11, Alexei Starovoitov wrote: [...] i disagree re: kallsyms. The goal of prog_tag is to let program writers understand which program is running in a stable way. But exactly it doesn't let program writers do that, it just

[PATCH net-next] rtnetlink: Remove NETDEV_CHANGEINFODATA

2017-04-28 Thread David Ahern
NETDEV_CHANGEINFODATA was added by d4261e5650004 ("bonding: create netlink event when bonding option is changed"). RTM_NEWLINK messages are already created on changelink events, so this event is just a duplicate. Remove it. Cc: Jiri Pirko Signed-off-by: David Ahern

pull-request: mac80211-next 2017-04-28

2017-04-28 Thread Johannes Berg
Hi Dave, Since I had many API changes pending I decided to go ahead and take the opportunity to get them before the merge window, which is a natural tree synchronization point :) I meant to sent this earlier today but forgot due to some debug (unrelated to this code, in our internal tree), sorry

Re: [patch net-next 02/10] net: sched: introduce tcf block infractructure

2017-04-28 Thread Cong Wang
On Thu, Apr 27, 2017 at 4:12 AM, Jiri Pirko wrote: > From: Jiri Pirko > > Currently, the filter chains are direcly put into the private structures > of qdiscs. In order to be able to have multiple chains per qdisc and to > allow filter chains sharing among

Re: [PATCH net] liquidio: silence a locking static checker warning

2017-04-28 Thread Felix Manlunas
From: Dan Carpenter Date: Fri, 28 Apr 2017 15:57:15 +0300 > Presumably we never hit this return, but static checkers complain that > we need to unlock so we may as well fix that. > > Signed-off-by: Dan Carpenter > > diff --git

Re: [patch net-next 00/10] net: sched: introduce multichain support for filters

2017-04-28 Thread Cong Wang
On Thu, Apr 27, 2017 at 11:53 PM, Jiri Pirko wrote: > Thu, Apr 27, 2017 at 07:46:03PM CEST, xiyou.wangc...@gmail.com wrote: >>On Thu, Apr 27, 2017 at 4:12 AM, Jiri Pirko wrote: >>> Simple example: >>> $ tc qdisc add dev eth0 ingress >>> $ tc filter add dev

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

2017-04-28 Thread Andreas Kemnade
On Thu, 27 Apr 2017 10:44:01 +0200 Johan Hovold wrote: > On Wed, Apr 26, 2017 at 07:26:40PM +0200, Andreas Kemnade wrote: > > 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

Re: [PATCH net-next v2] net: bridge: Fix improper taking over HW learned FDB

2017-04-28 Thread Ido Schimmel
On Fri, Apr 28, 2017 at 07:31:38PM +0300, Arkadi Sharshevsky wrote: > Commit 7e26bf45e4cb ("net: bridge: allow SW learn to take over HW fdb > entries") added the ability to "take over an entry which was previously > learned via HW when it shows up from a SW port". > > However, if an entry was

Re: [PATCH v2 binutils] Add BPF support to binutils...

2017-04-28 Thread David Miller
From: Aaron Conole Date: Fri, 28 Apr 2017 13:09:17 -0400 > David Miller writes: > >> diff --git a/bfd/elf64-bpf.c b/bfd/elf64-bpf.c >> index 9944bb4..1be285d 100644 >> --- a/bfd/elf64-bpf.c >> +++ b/bfd/elf64-bpf.c >> @@ -1,8 +1,89 @@ >> #include

Re: llvm-objdump...

2017-04-28 Thread Alexei Starovoitov
On 4/28/17 9:38 AM, David Miller wrote: From: Alexei Starovoitov Date: Fri, 28 Apr 2017 09:22:32 -0700 On 4/28/17 9:17 AM, David Miller wrote: Even if I give it -triple=bpfeb it emits immediates incorrectly. The bug is certainly in the insn field fetcher of the disassembler.

Re: [PATCH v2 binutils] Add BPF support to binutils...

2017-04-28 Thread Aaron Conole
David Miller writes: > From: Aaron Conole > Date: Fri, 28 Apr 2017 11:57:36 -0400 > >> I'll get an arm board up and running to do some testing there. As a >> teaser: > > Great. > > I started working on some more relocation stuff, so more of the >

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

2017-04-28 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. As Eric points out, BH does not need to disable either, RCU readers don't care.

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

2017-04-28 Thread Cong Wang
On Thu, Apr 27, 2017 at 4:54 PM, Eric Dumazet wrote: > On Thu, 2017-04-27 at 16:46 -0700, Cong Wang wrote: >> On Thu, Apr 27, 2017 at 5:46 AM, Eric Dumazet wrote: >> > On Wed, 2017-04-26 at 13:55 -0700, Cong Wang wrote: >> >> After commit

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

2017-04-28 Thread Logan Gunthorpe
On 28/04/17 12:30 AM, Herbert Xu wrote: > You are right. Indeed the existing code looks buggy as they > don't take sg->offset into account when doing the kmap. Could > you send me some patches that fix these problems first so that > they can be easily backported? Ok, I think the only buggy

Re: ipsec doesn't route TCP with 4.11 kernel

2017-04-28 Thread Eric Dumazet
On Fri, 2017-04-28 at 09:13 +0200, Steffen Klassert wrote: > encap type espinudp sport 4500 dport 4500 addr 0.0.0.0 > > Ok, this is espinudp. This information was important. > This is not a GRO issue as I thought, the TX side is already broken. > > Could you please try the patch below?

Re: llvm-objdump...

2017-04-28 Thread David Miller
From: Alexei Starovoitov Date: Fri, 28 Apr 2017 09:22:32 -0700 > On 4/28/17 9:17 AM, David Miller wrote: >> Even if I give it -triple=bpfeb it emits immediates incorrectly. >> >> The bug is certainly in the insn field fetcher of the disassembler. > > got it. so the binary looks

Re: [PATCH net-next V3 2/2] rtnl: Add support for netdev event attribute to link messages

2017-04-28 Thread Jiri Pirko
Thu, Apr 27, 2017 at 09:59:38PM CEST, d...@cumulusnetworks.com wrote: >On 4/27/17 1:43 PM, Vlad Yasevich wrote: >>> For example, NETDEV_CHANGEINFODATA is only for bonds though nothing >>> about the name suggests it is a bonding notification. This one was added >>> specifically to notify userspace

[PATCH net-next v2] net: bridge: Fix improper taking over HW learned FDB

2017-04-28 Thread Arkadi Sharshevsky
Commit 7e26bf45e4cb ("net: bridge: allow SW learn to take over HW fdb entries") added the ability to "take over an entry which was previously learned via HW when it shows up from a SW port". However, if an entry was learned via HW and then a control packet (e.g., ARP request) was trapped to the

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

2017-04-28 Thread Miroslav Lichvar
On Fri, Apr 28, 2017 at 11:50:28AM -0400, Willem de Bruijn wrote: > On Fri, Apr 28, 2017 at 4:54 AM, Miroslav Lichvar wrote: > >> if (skb_shinfo(skb)->tx_flags & SKBTX_SW_TSTAMP && > >> -!(skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS)) > >> +

Re: llvm-objdump...

2017-04-28 Thread Alexei Starovoitov
On 4/28/17 9:17 AM, David Miller wrote: Even if I give it -triple=bpfeb it emits immediates incorrectly. The bug is certainly in the insn field fetcher of the disassembler. got it. so the binary looks correct, but disasm output is wrong? Thanks! Looks like there is a bug there indeed.

Re: [PATCH iproute2] routel: fix infinite loop in line parser

2017-04-28 Thread Michal Kubecek
On Thu, Apr 27, 2017 at 04:46:47PM -0700, Stephen Hemminger wrote: > > Appled, but this really needs to be done better. > Either as a simplified output of route command. See ip -br link > Or ip route should have a json output option and use python/perl/xss > to reformat. Agreed, parsing the

Re: [PATCH net v1 0/3] tipc: fix hanging socket connections

2017-04-28 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Wed, 26 Apr 2017 10:04:59 +0200 > This patch series contains fixes for the socket layer to > prevent hanging / stale connections. Series applied, thank you.

Re: [PATCH v6 1/5] skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow

2017-04-28 Thread Sabrina Dubroca
2017-04-25, 20:47:30 +0200, Jason A. Donenfeld wrote: > This is a defense-in-depth measure in response to bugs like > 4d6fa57b4dab ("macsec: avoid heap overflow in skb_to_sgvec"). While > we're at it, we also limit the amount of recursion this function is > allowed to do. Not actually providing a

Re: llvm-objdump...

2017-04-28 Thread David Miller
From: Alexei Starovoitov Date: Tue, 25 Apr 2017 20:48:52 -0700 > On 4/25/17 10:13 AM, David Miller wrote: >> >> I think there are some endianness issues ;-) >> >> davem@patience:~/src/GIT/net-next/tools/testing/selftests/bpf$ >> llvm-objdump -S x.o > > nice host name ;) > >> x.o:

[PATCH 1/7] crypto: aesni: make non-AVX AES-GCM work with any aadlen

2017-04-28 Thread Sabrina Dubroca
This is the first step to make the aesni AES-GCM implementation generic. The current code was written for rfc4106, so it handles only some specific sizes of associated data. Signed-off-by: Sabrina Dubroca --- arch/x86/crypto/aesni-intel_asm.S | 169

[PATCH 2/7] crypto: aesni: make non-AVX AES-GCM work with all valid auth_tag_len

2017-04-28 Thread Sabrina Dubroca
Signed-off-by: Sabrina Dubroca --- arch/x86/crypto/aesni-intel_asm.S | 62 ++- 1 file changed, 48 insertions(+), 14 deletions(-) diff --git a/arch/x86/crypto/aesni-intel_asm.S b/arch/x86/crypto/aesni-intel_asm.S index

[PATCH 0/7] crypto: aesni: provide generic gcm(aes)

2017-04-28 Thread Sabrina Dubroca
The current aesni AES-GCM implementation only offers support for rfc4106(gcm(aes)). This makes some things a little bit simpler (handling of associated data and authentication tag), but it means that non-IPsec users of gcm(aes) have to rely on gcm_base(ctr-aes-aesni,ghash-clmulni), which is much

[PATCH 4/7] crypto: aesni: make AVX AES-GCM work with all valid auth_tag_len

2017-04-28 Thread Sabrina Dubroca
Signed-off-by: Sabrina Dubroca --- arch/x86/crypto/aesni-intel_avx-x86_64.S | 31 --- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/arch/x86/crypto/aesni-intel_avx-x86_64.S b/arch/x86/crypto/aesni-intel_avx-x86_64.S index

[PATCH 6/7] crypto: aesni: make AVX2 AES-GCM work with all valid auth_tag_len

2017-04-28 Thread Sabrina Dubroca
Signed-off-by: Sabrina Dubroca --- arch/x86/crypto/aesni-intel_avx-x86_64.S | 31 --- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/arch/x86/crypto/aesni-intel_avx-x86_64.S b/arch/x86/crypto/aesni-intel_avx-x86_64.S index

  1   2   3   >