[PATCH 4/5] xfrm: make xfrm_replay_state_esn_len() return unsigned int

2017-09-21 Thread Alexey Dobriyan
Replay detection bitmaps can't have negative length. Comparisons with nla_len() are left signed just in case negative value can sneak in there. Propagate unsignedness for code size savings: add/remove: 0/0 grow/shrink: 0/5 up/down: 0/-38 (-38) function

Re: [PATCH net] packet: hold bind lock when rebinding to fanout hook

2017-09-21 Thread Willem de Bruijn
On Wed, Sep 20, 2017 at 5:03 PM, David Miller wrote: > From: Willem de Bruijn > Date: Fri, 15 Sep 2017 10:07:46 -0400 > >> On Thu, Sep 14, 2017 at 5:14 PM, Willem de Bruijn wrote: >>> Packet socket bind operations must

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Paweł Staszewski
W dniu 2017-09-21 o 23:34, Eric Dumazet pisze: On Thu, 2017-09-21 at 23:26 +0200, Paweł Staszewski wrote: W dniu 2017-08-15 o 11:11, Paweł Staszewski pisze: diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c index

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Paweł Staszewski
W dniu 2017-09-21 o 23:41, Florian Fainelli pisze: On 09/21/2017 02:26 PM, Paweł Staszewski wrote: W dniu 2017-08-15 o 11:11, Paweł Staszewski pisze: diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c index

Re: [PATCH net-next 12/14] gtp: Configuration for zero UDP checksum

2017-09-21 Thread Tom Herbert
On Wed, Sep 20, 2017 at 6:55 PM, Harald Welte wrote: > Hi Tom, > > On Wed, Sep 20, 2017 at 11:09:29AM -0700, Tom Herbert wrote: >> On Mon, Sep 18, 2017 at 9:24 PM, David Miller wrote: >> > From: Tom Herbert >> >> Add configuration

Re: net: macb: fail when there's no PHY

2017-09-21 Thread Grant Edwards
On Thu, Sep 21, 2017 at 01:05:57PM -0700, Florian Fainelli wrote: >> It looks like the macb driver still can't handle boards that don't >> have a PHY. Is that correct? > > Not since: > > dacdbb4dfc1a1a1378df8ebc914d4fe82259ed46 ("net: macb: add fixed-link > node support") Yep, it's obvious

Re: [PATCH 2/2] ip_tunnel: add mpls over gre encapsulation

2017-09-21 Thread Amine Kherbouche
Hi Francois, Thanks for the feedback, I'll make it for the next version. On 21/09/2017 23:25, Francois Romieu wrote: Amine Kherbouche : [...] diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c index 36ea2ad..060ed07 100644 --- a/net/mpls/af_mpls.c +++

[PATCH] e1000: avoid null pointer dereference on invalid stat type

2017-09-21 Thread Colin King
From: Colin Ian King Currently if the stat type is invalid then data[i] is being set either by dereferencing a null pointer p, or it is reading from an incorrect previous location if we had a valid stat type previously. Fix this by nullify pointer p if a stat type is

Re: [PATCH net-next] net: avoid a full fib lookup when rp_filter is disabled.

2017-09-21 Thread David Miller
From: Paolo Abeni Date: Wed, 20 Sep 2017 18:26:53 +0200 > Since commit 1dced6a85482 ("ipv4: Restore accept_local behaviour > in fib_validate_source()") a full fib lookup is needed even if > the rp_filter is disabled, if accept_local is false - which is > the default. > > What

Re: [Patch net] net_sched: remove cls_flower idr on failure

2017-09-21 Thread David Miller
From: Cong Wang Date: Wed, 20 Sep 2017 09:18:45 -0700 > Fixes: c15ab236d69d ("net/sched: Change cls_flower to use IDR") > Cc: Chris Mi > Cc: Jiri Pirko > Signed-off-by: Cong Wang Applied, thanks.

Re: [PATCH 1/1] net: ti: netcp: use setup_timer

2017-09-21 Thread David Miller
From: Allen Pais Date: Thu, 21 Sep 2017 18:32:58 +0530 > Use setup_timer function instead of initializing timer with the > function and data fields. > > Signed-off-by: Allen Pais Applied.

Re: [PATCH 1/1] net: wan : hdlc: use setup_timer() helper

2017-09-21 Thread David Miller
From: Allen Pais Date: Thu, 21 Sep 2017 18:17:55 +0530 > Use setup_timer function instead of initializing timer with the > function and data fields. > > Signed-off-by: Allen Pais Applied.

[PATCH] cnic: Fix an error handling path in 'cnic_alloc_bnx2x_resc()'

2017-09-21 Thread Christophe JAILLET
All the error handling paths 'goto error', except this one. We should also go to error in this case, or some resources will be leaking. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/broadcom/cnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH net] net: qualcomm: rmnet: Fix rcu splat in rmnet_is_real_dev_registered

2017-09-21 Thread Subash Abhinov Kasiviswanathan
Xiaolong reported a suspicious rcu_dereference_check in the device unregister notifier callback. Since we do not dereference the rx_handler_data, it's ok to just check for the value of the pointer. Note that this section is already protected by rtnl_lock. [ 101.364846] WARNING: suspicious RCU

[PATCH] net: use 32-bit arithmetic while allocating net device

2017-09-21 Thread Alexey Dobriyan
Private part of allocation is never big enough to warrant size_t. Space savings: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10 (-10) function old new delta alloc_netdev_mqs11201110 -10

[PATCH 2/5] xfrm: make xfrm_alg_len() return unsigned int

2017-09-21 Thread Alexey Dobriyan
Key lengths can't be negative. Comparison with nla_len() is left signed just in case negative value can sneak in there. Signed-off-by: Alexey Dobriyan --- include/net/xfrm.h |2 +- net/xfrm/xfrm_user.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---

[PATCH 3/5] xfrm: make xfrm_alg_auth_len() return unsigned int

2017-09-21 Thread Alexey Dobriyan
Key lengths can't be negative. Comparison with nla_len() is left signed just in case negative value can sneak in there. Signed-off-by: Alexey Dobriyan --- include/net/xfrm.h |2 +- net/xfrm/xfrm_user.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Paweł Staszewski
W dniu 2017-08-15 o 11:11, Paweł Staszewski pisze: diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c index 5e831de3103e2f7092c7fa15534def403bc62fb4..9472de846d5c0960996261cb2843032847fa4bf7 100644 --- a/net/8021q/vlan_netlink.c +++ b/net/8021q/vlan_netlink.c @@ -143,6 +143,7

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Eric Dumazet
On Thu, 2017-09-21 at 23:26 +0200, Paweł Staszewski wrote: > > W dniu 2017-08-15 o 11:11, Paweł Staszewski pisze: > > diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c > > index > > 5e831de3103e2f7092c7fa15534def403bc62fb4..9472de846d5c0960996261cb2843032847fa4bf7 > > > > 100644

Re: [PATCH net-next] net: dsa: add port fdb dump

2017-09-21 Thread David Miller
From: Vivien Didelot Date: Wed, 20 Sep 2017 19:32:14 -0400 > Dumping a DSA port's FDB entries is not specific to a DSA slave, so add > a dsa_port_fdb_dump function, similarly to dsa_port_fdb_add and > dsa_port_fdb_del. > > Signed-off-by: Vivien Didelot

Re: [PATCH net-next] net: dsa: better scoping of slave functions

2017-09-21 Thread David Miller
From: Vivien Didelot Date: Wed, 20 Sep 2017 19:31:57 -0400 > A few DSA slave functions take a dsa_slave_priv pointer as first > argument, whereas the scope of the slave.c functions is the slave > net_device structure. Fix this and rename dsa_netpoll_send_skb

Re: [PATCH 1/1] net: usb: catc: use setup_timer() helper

2017-09-21 Thread David Miller
From: Allen Pais Date: Thu, 21 Sep 2017 18:24:15 +0530 > Use setup_timer function instead of initializing timer with the > function and data fields. > > Signed-off-by: Allen Pais Applied.

Re: [PATCH 1/1] net:nfc: use setup_timer

2017-09-21 Thread David Miller
From: Allen Pais Date: Thu, 21 Sep 2017 16:29:33 +0530 > Use setup_timer function instead of initializing timer with the > function and data fields. > > Signed-off-by: Allen Pais Applied.

[net-next:master 42/46] net/ipv4/fib_frontend.c:411:16: error: 'struct netns_ipv4' has no member named 'fib_has_custom_local_routes'

2017-09-21 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: b6cd4b5895848968e8fee93fc5e3dc8babc40b9e commit: 6e617de84e87d626d1e976fc30e1322239fd4d2d [42/46] net: avoid a full fib lookup when rp_filter is disabled. config: x86_64-kexec (attached as .config)

[PATCH 1/5] xfrm: make aead_len() return unsigned int

2017-09-21 Thread Alexey Dobriyan
Key lengths can't be negative. Comparison with nla_len() is left signed just in case negative value can sneak in there. Signed-off-by: Alexey Dobriyan --- include/net/xfrm.h |2 +- net/xfrm/xfrm_user.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---

Re: net: macb: fail when there's no PHY

2017-09-21 Thread Brandon Streiff
> On Thu, Sep 21, 2017 at 01:05:57PM -0700, Florian Fainelli wrote: > >>> It looks like the macb driver still can't handle boards that don't >>> have a PHY. Is that correct? >> >> Not since: >> >> dacdbb4dfc1a1a1378df8ebc914d4fe82259ed46 ("net: macb: add fixed-link >> node support") > > Yep,

[RFC PATCH 1/2] capability: introduce sysctl for controlled user-ns capability whitelist

2017-09-21 Thread Mahesh Bandewar
From: Mahesh Bandewar Add a sysctl variable kernel.controlled_userns_caps_whitelist. This takes input as capability mask expressed as two comma separated hex u32 words. The mask, however, is stored in kernel as kernel_cap_t type. Any capabilities that are not part of this

[RFC PATCH 2/2] userns: control capabilities of some user namespaces

2017-09-21 Thread Mahesh Bandewar
From: Mahesh Bandewar With this new notion of "controlled" user-namespaces, the controlled user-namespaces are marked at the time of their creation while the capabilities of processes that belong to them are controlled using the global mask. Init-user-ns is always

Re: [PATCH net-next] net: dsa: use dedicated CPU port

2017-09-21 Thread David Miller
From: Vivien Didelot Date: Wed, 20 Sep 2017 12:28:05 -0400 > Each port in DSA has its own dedicated CPU port currently available in > its parent switch's ds->ports[port].cpu_dp. Use it instead of getting > the unique tree CPU port, which will be deprecated

Re: [PATCH] [RESEND][for 4.14] net: qcom/emac: add software control for pause frame mode

2017-09-21 Thread David Miller
From: Timur Tabi Date: Wed, 20 Sep 2017 15:32:53 -0500 > The EMAC has the option of sending only a single pause frame when > flow control is enabled and the RX queue is full. Although sending > only one pause frame has little value, this would allow admins to > enable

Re: [PATCH] hv_netvsc: fix send buffer failure on MTU change

2017-09-21 Thread David Miller
From: Stephen Hemminger Date: Wed, 20 Sep 2017 11:17:35 -0700 > From: Alex Ng > > If MTU is changed the host would reject the send buffer change. > This problem is result of recent change to allow changing send > buffer size. > > Every time we

Re: [PATCH net-next ] net: Remove useless function skb_header_release

2017-09-21 Thread David Miller
From: gfree.w...@vip.163.com Date: Thu, 21 Sep 2017 12:39:31 +0800 > From: Gao Feng > > There is no one which would invokes the function skb_header_release. > So just remove it now. > > Signed-off-by: Gao Feng As Joe Perches mentioned, there

[PATCH net-next v2] bpf: Optimize lpm trie delete

2017-09-21 Thread Craig Gallek
From: Craig Gallek Before the delete operator was added, this datastructure maintained an invariant that intermediate nodes were only present when necessary to build the tree. This patch updates the delete operation to reinstate that invariant by removing unnecessary

[RFC PATCH 0/2] capability controlled user-namespaces

2017-09-21 Thread Mahesh Bandewar
From: Mahesh Bandewar TL;DR version - Creating a sandbox environment with namespaces is challenging considering what these sandboxed processes can engage into. e.g. CVE-2017-6074, CVE-2017-7184, CVE-2017-7308 etc. just to name few. Current form of user-namespaces,

Re: [PATCH net-next 1/1] net/smc: parameter cleanup in smc_cdc_get_free_slot()

2017-09-21 Thread David Miller
From: Ursula Braun Date: Thu, 21 Sep 2017 09:17:34 +0200 > Use the smc_connection as first parameter with smc_cdc_get_free_slot(). > This is just a small code cleanup, no functional change. > > Signed-off-by: Ursula Braun Applied.

Re: [PATCH net 0/9] net/smc: bug fixes 2017-09-20

2017-09-21 Thread David Miller
From: Ursula Braun Date: Thu, 21 Sep 2017 09:16:25 +0200 > here is a collection of small smc-patches built for net fixing > smc problems in different areas. Series applied, thanks.

[PATCH] wireless: iwlegacy: make const array static to shink object code size Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

2017-09-21 Thread Colin King
From: Colin Ian King Don't populate const array ac_to_fifo on the stack in an inlined function, instead make it static. Makes the object code smaller by over 800 bytes: textdata bss dec hex filename 159029 331541216 193399 2f377 4965-mac.o

[Patch net-next] net_sched: use idr to allocate basic filter handles

2017-09-21 Thread Cong Wang
Cc: Chris Mi Cc: Jamal Hadi Salim Signed-off-by: Cong Wang --- net/sched/cls_basic.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/net/sched/cls_basic.c

pull-request: ieee802154 2017-09-20

2017-09-21 Thread Stefan Schmidt
Hello Dave. [Resend with netdev in cc] Here comes a pull request for ieee802154 changes I have queued up for this merge window. Normally these have been coming through the bluetooth tree but as this three have been falling through the cracks so far and I have to review and ack all of them

Re: [PATCH 2/2] ip_tunnel: add mpls over gre encapsulation

2017-09-21 Thread Francois Romieu
Amine Kherbouche : [...] > diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c > index 36ea2ad..060ed07 100644 > --- a/net/mpls/af_mpls.c > +++ b/net/mpls/af_mpls.c [...] > @@ -39,6 +40,40 @@ static int one = 1; > static int label_limit = (1 << 20) - 1; > static int

Re: [PATCH net] bpf: one perf event close won't free bpf program attached by another perf event

2017-09-21 Thread Alexei Starovoitov
On 9/21/17 4:17 AM, Peter Zijlstra wrote: On Wed, Sep 20, 2017 at 10:20:13PM -0700, Yonghong Song wrote: (2). trace_event_call->perf_events are per cpu data structure, that means, some filtering logic is needed to avoid the same perf_event prog is executing twice. What I mean here is that the

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Eric Dumazet
On Thu, 2017-09-21 at 14:41 -0700, Florian Fainelli wrote: > Would not this apply to pretty much any stacked device setup though? It > seems like any network device that just queues up its packet on another > physical device for actual transmission may need that (e.g: DSA, bond, > team, more.?)

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Florian Fainelli
On 09/21/2017 02:54 PM, Eric Dumazet wrote: > On Thu, 2017-09-21 at 14:41 -0700, Florian Fainelli wrote: > >> Would not this apply to pretty much any stacked device setup though? It >> seems like any network device that just queues up its packet on another >> physical device for actual

Re: [PATCH net 0/2] Bring back transceiver type for PHYLIB

2017-09-21 Thread David Miller
From: Florian Fainelli Date: Wed, 20 Sep 2017 15:52:12 -0700 > With the introduction of the xLINKSETTINGS ethtool APIs, the transceiver type > was deprecated, but in that process we lost some useful information that > PHYLIB > was consistently reporting about internal vs.

[Patch net-next] net_sched: use idr to allocate bpf filter handles

2017-09-21 Thread Cong Wang
Cc: Daniel Borkmann Cc: Chris Mi Cc: Jamal Hadi Salim Signed-off-by: Cong Wang --- net/sched/cls_bpf.c | 57 ++--- 1 file changed, 28 insertions(+), 29

[Patch net-next] net_sched: use idr to allocate u32 filter handles

2017-09-21 Thread Cong Wang
Cc: Chris Mi Cc: Jamal Hadi Salim Signed-off-by: Cong Wang --- net/sched/cls_u32.c | 108 1 file changed, 67 insertions(+), 41 deletions(-) diff --git a/net/sched/cls_u32.c

Re: [net-next v3] bridge: trigger RTM_NEWLINK when interface is modified by bridge ioctl

2017-09-21 Thread David Miller
From: Vincent Bernat Date: Thu, 21 Sep 2017 12:05:25 +0200 > Currently, there is a difference in netlink events received when an > interface is modified through bridge ioctl() or through netlink. This > patch generates additional events when an interface is added to or >

Re: [PATCH net-next] bpf/verifier: improve disassembly of BPF_END instructions

2017-09-21 Thread Y Song
On Thu, Sep 21, 2017 at 12:58 PM, Edward Cree wrote: > On 21/09/17 20:44, Alexei Starovoitov wrote: >> On Thu, Sep 21, 2017 at 09:29:33PM +0200, Daniel Borkmann wrote: >>> More intuitive, but agree on the from_be/le. Maybe we should >>> just drop the "to_" prefix altogether,

Re: [PATCH net-next 3/3] virtio-net: support XDP_REDIRECT

2017-09-21 Thread Jason Wang
On 2017年09月21日 06:02, John Fastabend wrote: On 09/19/2017 02:42 AM, Jason Wang wrote: This patch tries to add XDP_REDIRECT for virtio-net. The changes are not complex as we could use exist XDP_TX helpers for most of the work. The rest is passing the XDP_TX to NAPI handler for implementing

Re: [v2,3/3] can: m_can: Add PM Runtime

2017-09-21 Thread Yang, Wenyou
Hi Franklin, On 2017/9/21 8:36, Franklin S Cooper Jr wrote: On 08/24/2017 03:30 AM, Sekhar Nori wrote: + OMAP mailing list On Tuesday 25 July 2017 04:21 AM, Franklin Cooper wrote: Add support for PM Runtime which is the new way to handle managing clocks. However, to avoid breaking SoCs not

Re: net: macb: fail when there's no PHY

2017-09-21 Thread Florian Fainelli
On 09/21/2017 12:59 PM, Grant Edwards wrote: > Several years back (circa 2.6.33) I had to hack up macb.c to work on > an at91 board that didn't have a PHY connected to the macb controller. > Now I might need to get a recent kernel version running on that board. > > It looks like the macb driver

[PATCH 5/5] xfrm: eradicate size_t

2017-09-21 Thread Alexey Dobriyan
All netlink message sizes are a) unsigned, b) can't be >= 4GB in size because netlink doesn't support >= 64KB messages in the first place. All those size_t across the code are a scam especially across networking which likes to work with small numbers like 1500 or 65536. Propagate unsignedness

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Florian Fainelli
On 09/21/2017 02:26 PM, Paweł Staszewski wrote: > > > W dniu 2017-08-15 o 11:11, Paweł Staszewski pisze: >> diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c >> index >> 5e831de3103e2f7092c7fa15534def403bc62fb4..9472de846d5c0960996261cb2843032847fa4bf7 >> 100644 >> ---

Re: [PATCH v5 net 0/3] lan78xx: This series of patches are for lan78xx driver.

2017-09-21 Thread David Miller
From: Nisar Sayed Date: Thu, 21 Sep 2017 02:36:35 +0530 > This series of patches are for lan78xx driver. > > These patches fixes potential issues associated with lan78xx driver. Series applied, thank you.

Re: [PATCH 2/2] ip_tunnel: add mpls over gre encapsulation

2017-09-21 Thread Roopa Prabhu
On Thu, Sep 21, 2017 at 2:25 AM, Amine Kherbouche wrote: > This commit introduces the MPLSoGRE support (RFC 4023), using ip tunnel > API. > > Encap: > - Add a new iptunnel type mpls. > > Decap: > - pull gre hdr and call mpls_forward(). > > Signed-off-by: Amine

Re: [PATCH net-next] cxgb4: avoid stall while shutting down the adapter

2017-09-21 Thread David Miller
From: Ganesh Goudar Date: Thu, 21 Sep 2017 12:50:47 +0530 > do not wait for completion while deleting the filters > when the adapter is shutting down because we may not get > the response as interrupts will be disabled. > > Signed-off-by: Ganesh Goudar

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Eric Dumazet
On Thu, 2017-09-21 at 15:07 -0700, Florian Fainelli wrote: > On 09/21/2017 02:54 PM, Eric Dumazet wrote: > > On Thu, 2017-09-21 at 14:41 -0700, Florian Fainelli wrote: > > > >> Would not this apply to pretty much any stacked device setup though? It > >> seems like any network device that just

[PATCH net 2/4] net:ethernet:aquantia: Fix Tx queue hangups

2017-09-21 Thread Igor Russkikh
Driver did a poor job in managing its Tx queues: Sometimes it could stop tx queues due to link down condition in aq_nic_xmit - but never waked up them. That led to Tx path total suspend. This patch fixes this and improves generic queue management: - introduces queue restart counter - uses generic

[PATCH net 0/4] net:ethernet:aquantia: Atlantic driver bugfixes and improvements

2017-09-21 Thread Igor Russkikh
This series contains bugfixes for aQuantia Atlantic driver. Igor Russkikh (3): net:ethernet:aquantia: Setup max_mtu in ndev to enable jumbo frames net:ethernet:aquantia: Fix Tx queue hangups net:ethernet:aquantia: Fix transient invalid link down/up indications Pavel Belous (1):

[PATCH net 1/4] net:ethernet:aquantia: Setup max_mtu in ndev to enable jumbo frames

2017-09-21 Thread Igor Russkikh
Although hardware is capable for almost 16K MTU, without max_mtu field correctly set it only allows standard MTU to be used. This patch enables max MTU, calculating it from hardware maximum frame size of 16352 octets (including FCS). Fixes: 5513e16421cb ("net: ethernet: aquantia: Fixes for

[PATCH net 3/4] net:ethernet:aquantia: Fix transient invalid link down/up indications

2017-09-21 Thread Igor Russkikh
Due to a bug in aquantia atlantic card firmware, it sometimes reports invalid link speed bits. That caused driver to report link down events, although link itself is totally fine. This patch ignores such out of blue readings. Signed-off-by: Pavel Belous Signed-off-by:

[PATCH net 4/4] net:ethernet:atlantic: fix iommu errors

2017-09-21 Thread Igor Russkikh
From: Pavel Belous Call skb_frag_dma_map multiple times if tx length is greater than device max and avoid processing tx ring until entire packet has been sent. Signed-off-by: Igor Russkikh Signed-off-by: Pavel Belous

Re: Latest net-next from GIT panic

2017-09-21 Thread Paweł Staszewski
W dniu 2017-09-21 o 13:03, Eric Dumazet pisze: On Thu, 2017-09-21 at 11:06 +0200, Paweł Staszewski wrote: W dniu 2017-09-21 o 03:17, Eric Dumazet pisze: On Wed, 2017-09-20 at 18:09 -0700, Wei Wang wrote: Thanks very much Pawel for the feedback. I was looking into the code (specifically

[PATCH net-next 10/10] net: hns3: Add mqprio support when interacting with network stack

2017-09-21 Thread Yunsheng Lin
When using tc qdisc to configure DCB parameter, dcb_ops->setup_tc is used to tell hclge_dcb module to do the setup. When using lldptool to configure DCB parameter, hclge_dcb module call the client_ops->setup_tc to tell network stack which queue and priority is using for specific tc.

[PATCH net-next 08/10] net: hns3: Add dcb netlink interface for the support of DCB feature

2017-09-21 Thread Yunsheng Lin
This patch add dcb netlink interface by calling the interface from hclge_dcb module. This patch also update Makefile in order to build hns3_dcbnl module. Signed-off-by: Yunsheng Lin --- .../net/ethernet/hisilicon/hns3/hns3pf/Makefile| 2 +

[PATCH net-next 05/10] net: hns3: Add tc-based TM support for sriov enabled port

2017-09-21 Thread Yunsheng Lin
When sriov is enabled and TM is in tc-based mode, vf's TM parameters is not set in TM initialization process. This patch add the tc_based TM support for sriov enabled using the information in vport struct. Signed-off-by: Yunsheng Lin ---

[PATCH net-next 09/10] net: hns3: Setting for fc_mode and dcb enable flag in TM module

2017-09-21 Thread Yunsheng Lin
After the DCB feature is supported, fc_mode and dcb enable flag must be set according to the DCB parameter. Signed-off-by: Yunsheng Lin --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 34 +++--- 1 file changed, 30 insertions(+), 4 deletions(-)

[PATCH 1/1] net: ti: netcp: use setup_timer

2017-09-21 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/net/ethernet/ti/netcp_ethss.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

Re: [PATCH net-next 0/5] net: introduce noref sk

2017-09-21 Thread Eric Dumazet
On Thu, 2017-09-21 at 11:42 +0200, Paolo Abeni wrote: > Hi, > > Thanks for the feedback! > > On Wed, 2017-09-20 at 20:20 -0700, David Miller wrote: > > From: Paolo Abeni > > Date: Wed, 20 Sep 2017 18:54:00 +0200 > > > > > This series introduce the infrastructure to store

[PATCH 1/1] net:nfc: use setup_timer

2017-09-21 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- net/nfc/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/nfc/core.c b/net/nfc/core.c index 5cf33df..e5e23c2

[PATCH net-next 03/10] net: hns3: Add support for PFC setting in TM module

2017-09-21 Thread Yunsheng Lin
This patch add a pfc_pause_en cmd, and use it to configure PFC option according to fc_mode in hdev->tm_info. Signed-off-by: Yunsheng Lin --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 68 -- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h

[PATCH net-next 00/10] Add support for DCB feature in hns3 driver

2017-09-21 Thread Yunsheng Lin
The patchset contains some enhancement related to DCB before adding support for DCB feature. This patchset depends on the following patchset: https://patchwork.ozlabs.org/cover/815646/ https://patchwork.ozlabs.org/cover/816145/ High Level Architecture: [ tc qdisc ][ lldpad ]

Re: [PATCH net-next 2/3] net: ethernet: socionext: add AVE ethernet driver

2017-09-21 Thread Kunihiko Hayashi
On Mon, 11 Sep 2017 15:55:56 +0900 wrote: > > > +static int ave_set_rxdesc(struct net_device *ndev, int entry) > > > +{ > > > + struct ave_private *priv = netdev_priv(ndev); > > > + struct sk_buff *skb; > > > + unsigned long align; > > > + dma_addr_t paddr; > > >

[PATCH 1/1] net: wan : hdlc: use setup_timer() helper

2017-09-21 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/net/wan/hdlc_fr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wan/hdlc_fr.c

[PATCH] net: phy: Fix truncation of large IRQ numbers in phy_attached_print()

2017-09-21 Thread Geert Uytterhoeven
Given NR_IRQS is 2048 on sparc64, and even 32784 on alpha, 3 digits is not enough to represent interrupt numbers on all architectures. Hence PHY interrupt numbers may be truncated during printing. Increase the buffer size from 4 to 8 bytes to fix this. Fixes: 5e369aefdce4818c ("net: stmmac:

[PATCH net-next 02/10] net: hns3: Add support for dynamically buffer reallocation

2017-09-21 Thread Yunsheng Lin
Current buffer allocation can only happen at init, when doing buffer reallocation after init, care must be taken care of memory which priv_buf points to. This patch fixes it by using a dynamic allocated temporary memory. Because we only do buffer reallocation at init or when setting up the DCB

Re: [PATCH net] bpf: one perf event close won't free bpf program attached by another perf event

2017-09-21 Thread Steven Rostedt
On Thu, 21 Sep 2017 13:17:06 +0200 Peter Zijlstra wrote: > I suspect that would break a fair bunch of bpf proglets, since the data > access to the trace data would be completely different, but it would be > much nicer to not have this distinction based on event type. Maybe

Re: [v2,1/3] can: m_can: Make hclk optional

2017-09-21 Thread Sekhar Nori
On Thursday 21 September 2017 06:01 AM, Franklin S Cooper Jr wrote: > > > On 08/24/2017 03:00 AM, Sekhar Nori wrote: >> + some OMAP folks and Linux OMAP list >> >> On Tuesday 25 July 2017 04:21 AM, Franklin Cooper wrote: >>> Hclk is the MCAN's interface clock. However, for OMAP based devices

tg3 pxe weirdness

2017-09-21 Thread Berend De Schouwer
Hi, I've got a machine with a Broadcom bcm5762c, using the tg3 driver, that fails to receive network packets under some very specific conditions. It works perfectly using a 1Gbps switch. If, however, it first uses PXE and then loads the Linux tg3 driver, and the switch is 100Mbps, it no longer

Re: [PATCH net-next 2/2] net: dsa: lan9303: Add basic offloading of unicast traffic

2017-09-21 Thread Vivien Didelot
Hi Egil, Egil Hjelmeland writes: > When both user ports are joined to the same bridge, the normal > HW MAC learning is enabled. This means that unicast traffic is forwarded > in HW. > > If one of the user ports leave the bridge, > the ports goes back to the initial

Re: [PATCH net-next 2/4] cxgb4: add basic tc flower offload support

2017-09-21 Thread Yunsheng Lin
Hi, Kumar On 2017/9/21 15:33, Rahul Lakkireddy wrote: > From: Kumar Sanghvi > > Add support to add/remove flows for offload. Following match > and action are supported for offloading a flow: > > Match: ether-protocol, IPv4/IPv6 addresses, L4 ports (TCP/UDP) > Action:

Re: [patch net-next 05/12] net: ipmr: Add MFC offload indication

2017-09-21 Thread Nikolay Aleksandrov
On 21/09/17 09:43, Jiri Pirko wrote: > From: Yotam Gigi > > Allow drivers, registered to the fib notification chain indicate whether a > multicast MFC route is offloaded or not, similarly to unicast routes. The > indication of whether a route is offloaded is done using the

Re: [patch net-next 04/12] ipmr: Send FIB notifications on MFC and VIF entries

2017-09-21 Thread Nikolay Aleksandrov
On 21/09/17 09:43, Jiri Pirko wrote: > From: Yotam Gigi > > Use the newly introduced notification chain to send events upon VIF and MFC > addition and deletion. The MFC notifications are sent only on resolved MFC > entries, as unresolved cannot be offloaded. > >

Re: Latest net-next from GIT panic

2017-09-21 Thread Paweł Staszewski
W dniu 2017-09-21 o 13:31, Paweł Staszewski pisze: W dniu 2017-09-21 o 13:03, Eric Dumazet pisze: OK we have two problems here 1) We need to unify skb_dst_force()  ( for net tree ) 2) Vlan devices should try to correctly handle IFF_XMIT_DST_RELEASE from lower device. This will

Re: RTL8192EE PCIe Wireless Network Adapter crashed with linux-4.13

2017-09-21 Thread Larry Finger
On 09/21/2017 06:37 AM, Zwindl wrote: Hi, I've reported to archlinux's bugzilla, and finally found out the flag which caused that issue, it's the `CONFIG_INTEL_IOMMU_DEFAULT_ON=y` flag, I think may this is a kernel bug, more details at https://bugs.archlinux.org/task/55665 My standard kernel

Re: [PATCH net-next 2/2] net: dsa: lan9303: Add basic offloading of unicast traffic

2017-09-21 Thread Andrew Lunn
Hi Egil > +static void lan9303_bridge_ports(struct lan9303 *chip) > +{ > + /* ports bridged: remove mirroring */ > + lan9303_write_switch_reg(chip, LAN9303_SWE_PORT_MIRROR, 0); > +} Could you replace the 0 with something symbolic which makes this easier to understand. #define

Re: [PATCH net 1/3] net: mvpp2: fix the dma_mask and coherent_dma_mask settings for PPv2.2

2017-09-21 Thread Antoine Tenart
Hi David, On Mon, Sep 18, 2017 at 05:18:58PM -0700, David Miller wrote: > From: Antoine Tenart > Date: Mon, 18 Sep 2017 15:04:06 +0200 > > > The dev->dma_mask usually points to dev->coherent_dma_mask. This is an > > issue as setting both of them will override

Re: [PATCH net 2/4] net:ethernet:aquantia: Fix Tx queue hangups

2017-09-21 Thread Igor Russkikh
Thanks for the comments, Yunsheng, >> >> +static int aq_nic_update_link_status(struct aq_nic_s *self) >> +{ >> +int err = self->aq_hw_ops.hw_get_link_status(self->aq_hw); >> + >> +if (err < 0) >> +return -1; > why not just return err? Agreed, that could be improved. >> +

Re: [PATCH net-next 1/2] net: dsa: lan9303: Move tag setup to new lan9303_setup_tagging

2017-09-21 Thread Vivien Didelot
Hi Egil, Egil Hjelmeland writes: > Prepare for next patch: > Move tag setup from lan9303_separate_ports() to new function > lan9303_setup_tagging() > > Signed-off-by: Egil Hjelmeland Minor styling issues, otherwise LGTM: Reviewed-by:

Re: [PATCH net-next v2] bridge: also trigger RTM_NEWLINK when interface is released from bridge

2017-09-21 Thread Roopa Prabhu
On Thu, Sep 21, 2017 at 3:04 AM, Vincent Bernat wrote: > ❦ 20 septembre 2017 16:21 -0700, Stephen Hemminger > : > >> The one concern is that ports added or removed through ioctl should >> cause same events as doing the same thing via netlink. Some

[PATCH net-next] bpf/verifier: improve disassembly of BPF_END instructions

2017-09-21 Thread Edward Cree
print_bpf_insn() was treating all BPF_ALU[64] the same, but BPF_END has a different structure: it has a size in insn->imm (even if it's BPF_X) and uses the BPF_SRC (X or K) to indicate which endianness to use. So it needs different code to print it. Signed-off-by: Edward Cree

Re: [PATCH v3 02/31] usercopy: Enforce slab cache usercopy region boundaries

2017-09-21 Thread Christopher Lameter
On Wed, 20 Sep 2017, Kees Cook wrote: > diff --git a/mm/slab.c b/mm/slab.c > index 87b6e5e0cdaf..df268999cf02 100644 > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -4408,7 +4408,9 @@ module_init(slab_proc_init); > > #ifdef CONFIG_HARDENED_USERCOPY > /* > - * Rejects objects that are incorrectly

Re: [PATCH net-next 2/4] cxgb4: add basic tc flower offload support

2017-09-21 Thread Kumar Sanghvi
Hi Yunsheng, On Thursday, September 09/21/17, 2017 at 18:55:26 +0800, Yunsheng Lin wrote: > Hi, Kumar > > On 2017/9/21 15:33, Rahul Lakkireddy wrote: > > From: Kumar Sanghvi > > > > Add support to add/remove flows for offload. Following match > > and action are supported

Re: [PATCH net-next 00/14] gtp: Additional feature support

2017-09-21 Thread Harald Welte
Hi Tom, On Tue, Sep 19, 2017 at 04:47:11PM -0700, Tom Herbert wrote: > On Tue, Sep 19, 2017 at 4:19 PM, Harald Welte wrote: > > > I think there has to be a clear plan/architecture on how to implement > > those bits in terms of the kernel/userspace split, and at least a

Re: [PATCH net-next 09/14] gtp: Allow configuring GTP interface as standalone

2017-09-21 Thread Harald Welte
Hi Tom, On Wed, Sep 20, 2017 at 05:55:01PM -0700, Tom Herbert wrote: > You have the point of view of someone who has a lot of experience > dealing with this protocol. Try to imagine if you were some random > kernel network programmer with no experience in the area. If they > happen to find a

Re: [PATCH net 3/4] net:ethernet:aquantia: Fix transient invalid link down/up indications

2017-09-21 Thread Andrew Lunn
On Thu, Sep 21, 2017 at 01:53:41PM +0300, Igor Russkikh wrote: > Due to a bug in aquantia atlantic card firmware, it sometimes reports > invalid link speed bits. That caused driver to report link down events, > although link itself is totally fine. > > This patch ignores such out of blue

Re: [PATCH net-next] bpf/verifier: improve disassembly of BPF_END instructions

2017-09-21 Thread Alexei Starovoitov
On Thu, Sep 21, 2017 at 04:09:34PM +0100, Edward Cree wrote: > print_bpf_insn() was treating all BPF_ALU[64] the same, but BPF_END has a > different structure: it has a size in insn->imm (even if it's BPF_X) and > uses the BPF_SRC (X or K) to indicate which endianness to use. So it > needs

Re: [kernel-hardening] Re: [PATCH v3 03/31] usercopy: Mark kmalloc caches as usercopy caches

2017-09-21 Thread Christopher Lameter
On Thu, 21 Sep 2017, Kees Cook wrote: > > So what is the point of this patch? > > The DMA kmalloc caches are not whitelisted: The DMA kmalloc caches are pretty obsolete and mostly there for obscure drivers. ?? > >> kmalloc_dma_caches[i] = create_kmalloc_cache(n, > >> -

Re: [PATCH net-next] net: vrf: remove skb_dst_force() after skb_dst_set()

2017-09-21 Thread David Ahern
On 9/21/17 8:50 AM, Eric Dumazet wrote: > From: Eric Dumazet > > skb_dst_set(skb, dst) installs a normal (refcounted) dst, there is no > point using skb_dst_force(skb) > > Signed-off-by: Eric Dumazet > --- > drivers/net/vrf.c |1 - > 1 file

Re: Latest net-next from GIT panic

2017-09-21 Thread Eric Dumazet
On Thu, 2017-09-21 at 15:18 +0200, Paweł Staszewski wrote: > ok after adding patch all is working from now for about 1 hour of normal > traffic witc all bgp sessions connected and about 600k prefixes in kernel. Great, I am doing to submit an official patch, uniting skb_dst_force() and

  1   2   3   4   >