[PATCH net-next 2/3] r8152: support RTL8153B

2017-06-15 Thread Hayes Wang
This patch supports two new chips for RTL8153B. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 673 ++-- 1 file changed, 658 insertions(+), 15 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c

[PATCH net-next 3/3] r8152: add byte_enable for ocp_read_word function

2017-06-15 Thread Hayes Wang
Add byte_enable for ocp_read_word() to replace reading 4 bytes data with reading the desired 2 bytes data. This is used to avoid the issue which is described in commit b4d99def0938 ("r8152: remove sram_read"). The original method always reads 4 bytes data, and it may have problem when reading the

[PATCH net-next 0/3] r8152: support new chips

2017-06-15 Thread Hayes Wang
These patches are used to support new chips. Hayes Wang (3): r8152: support new chip 8050 r8152: support RTL8153B r8152: add byte_enable for ocp_read_word function drivers/net/usb/r8152.c | 687 ++-- 1 file changed, 671 insertions(+), 16

[PATCH net-next 1/3] r8152: support new chip 8050

2017-06-15 Thread Hayes Wang
The settings of the new chip are the same with RTL8152, except that its product ID is 0x8050. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

[PATCH net-next] nfp: add VLAN filtering support

2017-06-15 Thread Jakub Kicinski
From: Pablo Cascón Add general use per-vNIC mailbox area and use it for VLAN filtering support. Initially proto is hardcoded to 802.1q. Signed-off-by: Pablo Cascón Signed-off-by: Jakub Kicinski ---

Re: [PATCH v4 10/11] dt-bindings: orion-mdio: document the new xmdio compatible

2017-06-15 Thread Antoine Tenart
Hi Andrew, On Wed, Jun 14, 2017 at 06:35:37PM +0200, Andrew Lunn wrote: > On Wed, Jun 14, 2017 at 05:49:10PM +0200, Antoine Tenart wrote: > > > > The Ethernet controllers of the Marvel Kirkwood, Dove, Orion5x, > > -MV78xx0, Armada 370 and Armada XP have an identical unit that provides > > -an

Re: [RFC] networking: convert many more places to skb_put_zero()

2017-06-15 Thread Johannes Berg
On Thu, 2017-06-15 at 07:20 +, YUAN Linyu wrote: > > > In my opinion if spatch can do it even it found one place, keep it. > Only leave difficult places like ndisc.c to me. It's not so simple - I'd have to tailor the spatch to it pretty much I guess, spending far more time on the spatch than

[PATCH net] ipv6: fix calling in6_ifa_hold incorrectly for dad work

2017-06-15 Thread Xin Long
Now when starting the dad work in addrconf_mod_dad_work, if the dad work is idle and queued, it needs to hold ifa. The problem is there's one gap in [1], during which if the pending dad work is removed elsewhere. It will miss to hold ifa, but the dad word is still idea and queue. if

[RFC v2] networking: convert many more places to skb_put_zero()

2017-06-15 Thread Johannes Berg
From: Johannes Berg There were many places that my previous spatch didn't find, as pointed out by yuan linyu in various patches. The following spatch found many more and also removes the now unnecessary casts: @@ identifier p, p2; expression len;

Re: [PATCH net-next 00/11] skb_put_zero() used to optimize code

2017-06-15 Thread Johannes Berg
On Wed, 2017-06-14 at 23:45 +, YUAN Linyu wrote: > > > > But still a few more, I think that you didn't find, e.g. > > in mac80211. > > Yes, I thought you already done in mac80211 So did I, but I also only applied my spatch :) johannes

[PATCH 1/9] crypto: chcr - Pass lcb bit setting to firmware

2017-06-15 Thread Harsh Jain
GCM and CBC mode of operation requires Last Cipher Block. This patch set lcb bit in WR header when required. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 18 +++--- drivers/crypto/chelsio/chcr_algo.h | 4 ++-- 2 files changed, 13

[PATCH 6/9] chcr - Add debug counters

2017-06-15 Thread Harsh Jain
Count types of operation done by HW. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 16 +- drivers/crypto/chelsio/chcr_core.c | 2 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 +

Re: [PATCH net-next] of_mdio: move of_mdio_parse_addr to header file

2017-06-15 Thread Liviu Dudau
On Tue, Jun 13, 2017 at 10:56:08AM -0400, Jon Mason wrote: > The of_mdio_parse_addr() helper function is useful to other code, but > the module dependency chain causes issues. To work around this, we can > move of_mdio_parse_addr() to be an inline function in the header file. > This gets rid of

Re: [RFC] networking: convert many more places to skb_put_zero()

2017-06-15 Thread Johannes Berg
On Thu, 2017-06-15 at 00:23 +, YUAN Linyu wrote: > Hi,  > Indeed, it find more. > Compare with my patch, still lost pattern like below, > 1. sctp and openvswitch > --- a/net/sctp/output.c > +++ b/net/sctp/output.c > @@ -463,7 +463,7 @@ static int sctp_packet_pack(struct sctp_packet > *packet,

[PATCH 4/9] crypto: chcr - Avoid changing request structure

2017-06-15 Thread Harsh Jain
Do not update assoclen received in aead_request. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 37 ++--- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/drivers/crypto/chelsio/chcr_algo.c

[PATCH 8/9] crypto: chcr - Ensure Destination sg entry size less than 2k

2017-06-15 Thread Harsh Jain
Allocate new sg list in case received destination sg list has entry greater that 2k. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 153 +++ drivers/crypto/chelsio/chcr_crypto.h | 6 ++ 2 files changed, 142

[PATCH 3/9] crypto: chcr - Return correct error code

2017-06-15 Thread Harsh Jain
Return correct error instead of EINVAL. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 76 +- 1 file changed, 42 insertions(+), 34 deletions(-) diff --git a/drivers/crypto/chelsio/chcr_algo.c

[PATCH 5/9] crypto:chcr - Add ctr mode and process large sg entries for cipher

2017-06-15 Thread Harsh Jain
It send multiple WRs to H/W to handle large sg lists. Adds ctr(aes) and rfc(ctr(aes)) modes. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 786 --- drivers/crypto/chelsio/chcr_algo.h | 26 +-

[PATCH 7/9] MAINTAINERS:Add maintainer for chelsio crypto driver

2017-06-15 Thread Harsh Jain
Add myself as maintainer for chcr. Signed-off-by: Harsh Jain --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1f20176..504dc65 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3706,6 +3706,13 @@ S: Supported F:

[PATCH 9/9] crypto: chcr - Select device in Round Robin fashion

2017-06-15 Thread Harsh Jain
When multiple devices are present in system select device in round-robin fashion for crypto operations Signed-off-by: Atul Gupta Reviewed-by: Ganesh Goudar --- drivers/crypto/chelsio/chcr_algo.c | 8 ++--

[PATCH 2/9] crypto: chcr - Fix fallback key setting

2017-06-15 Thread Harsh Jain
Set key of fallback tfm for rfc4309. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/chelsio/chcr_algo.c b/drivers/crypto/chelsio/chcr_algo.c index

[PATCH 0/9] Bug fixes and ctr mode of operation

2017-06-15 Thread Harsh Jain
This series is based on cryptodev2.6 tree and includes bug fix ,ctr(aes), rfc3686(ctr(aes)) algo. Harsh Jain (7): crypto: chcr - Pass lcb bit setting to firmware crypto: chcr - Set fallback key crypto: chcr - Return correct error code crypto: chcr - Avoid changing request structure

[PATCH] mwifiex: debugfs: remove redunant check of mwifiex_dfs_dir

2017-06-15 Thread Shawn Lin
debugfs_remove already check mwifiex_dfs_dir, so remove it. Signed-off-by: Shawn Lin --- drivers/net/wireless/marvell/mwifiex/debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/debugfs.c

Re: [PATCH v2 11/11] kasan: rework Kconfig settings

2017-06-15 Thread Dmitry Vyukov
On Wed, Jun 14, 2017 at 11:15 PM, Arnd Bergmann wrote: > We get a lot of very large stack frames using gcc-7.0.1 with the default > -fsanitize-address-use-after-scope --param asan-stack=1 options, which > can easily cause an overflow of the kernel stack, e.g. > >

RE: [RFC] networking: convert many more places to skb_put_zero()

2017-06-15 Thread YUAN Linyu
> -Original Message- > From: Johannes Berg [mailto:johan...@sipsolutions.net] > Sent: Thursday, June 15, 2017 3:12 PM > To: YUAN Linyu; netdev@vger.kernel.org > Subject: Re: [RFC] networking: convert many more places to skb_put_zero() > > On Thu, 2017-06-15 at 07:05 +, YUAN Linyu

Re: [PATCH iproute2] link_gre6: really support encaplimit option

2017-06-15 Thread Nicolas Dichtel
Le 14/06/2017 à 22:31, Stephen Hemminger a écrit : > On Wed, 14 Jun 2017 18:45:42 +0200 > Nicolas Dichtel wrote: > >> This option is documented in gre6 help, but was not supported. >> >> Fixes: af89576d7a8c ("iproute2: GRE over IPv6 tunnel support.") >> Signed-off-by:

Re: [PATCH iproute2 2/2] tc: m_tunnel_key: add csum/nocsum option

2017-06-15 Thread Jiri Benc
On Wed, 14 Jun 2017 13:38:07 -0700, Stephen Hemminger wrote: > Does this change the default? Before your patches what was the checksum > setting for the new tunnel. Yes, it does. See the kernel patches. I realize it's a user visible change; however, given that the real reason act_tunnel_key was

[PATCH net] sctp: return next obj by passing pos + 1 into sctp_transport_get_idx

2017-06-15 Thread Xin Long
In sctp_for_each_transport, pos is used to save how many objs it has dumped. Now it gets the last obj by sctp_transport_get_idx, then gets the next obj by sctp_transport_get_next. The issue is that in the meanwhile if some objs in transport hashtable are removed and the objs nums are less than

RE: [RFC] networking: convert many more places to skb_put_zero()

2017-06-15 Thread YUAN Linyu
Ok, understand > -Original Message- > From: Johannes Berg [mailto:johan...@sipsolutions.net] > Sent: Thursday, June 15, 2017 3:45 PM > To: YUAN Linyu; netdev@vger.kernel.org > Subject: Re: [RFC] networking: convert many more places to skb_put_zero() > > On Thu, 2017-06-15 at 07:20

Re: [PATCH] xfrm: Oops on error in pfkey_msg2xfrm_state()

2017-06-15 Thread Steffen Klassert
On Wed, Jun 14, 2017 at 01:34:05PM +0300, Dan Carpenter wrote: > There are some missing error codes here so we accidentally return NULL > instead of an error pointer. It results in a NULL pointer dereference. > > Fixes: df71837d5024 ("[LSM-IPSec]: Security association restriction.") >

[patch iproute2/net-next] tc: don't print error message on miss when parsing control action with default

2017-06-15 Thread Jiri Pirko
From: Jiri Pirko In case default control action parsing takes place, it is ok to miss. So don't print error message. Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions") Reported-by: Jiri Benc Signed-off-by: Jiri Pirko

RE: [PATCH net-next] nfp: add VLAN filtering support

2017-06-15 Thread Mintz, Yuval
> From: Pablo Cascón > > Add general use per-vNIC mailbox area and use it for VLAN filtering support. > Initially proto is hardcoded to 802.1q. > ... > +static int > +nfp_net_vlan_rx_add_vid(struct net_device *netdev, __be16 proto, u16 > +vid) { > + struct

Re: [PATCH net-next 0/3] ipmr/ip6mr: add Netlink notifications on cache reports

2017-06-15 Thread Nikolay Aleksandrov
On 15/06/17 14:44, Nikolay Aleksandrov wrote: > On 15/06/17 14:33, Nikolay Aleksandrov wrote: >> On 15/06/17 00:51, Julien Gomes wrote: >>> Hi Nikolay, >>> >>> On 06/14/2017 05:04 AM, Nikolay Aleksandrov wrote: >>> This has been on our todo list and I'm definitely interested in the

Re: [PATCH v4 10/11] dt-bindings: orion-mdio: document the new xmdio compatible

2017-06-15 Thread Andrew Lunn
> Agreed, your description is better :) > I'll respin this patch only, if there is no other comment. I assume these patches are going via net-next? Dave will not like a respin of a single patch. You need to post them all again. Andrew

Re: [PATCH net-next 0/3] ipmr/ip6mr: add Netlink notifications on cache reports

2017-06-15 Thread Nikolay Aleksandrov
On 15/06/17 14:33, Nikolay Aleksandrov wrote: > On 15/06/17 00:51, Julien Gomes wrote: >> Hi Nikolay, >> >> On 06/14/2017 05:04 AM, Nikolay Aleksandrov wrote: >> >>> This has been on our todo list and I'm definitely interested in the >>> implementation. >>> A few things that need careful

Re: [PATCH] xfrm: NULL dereference on allocation failure

2017-06-15 Thread Steffen Klassert
On Wed, Jun 14, 2017 at 01:35:37PM +0300, Dan Carpenter wrote: > The default error code in pfkey_msg2xfrm_state() is -ENOBUFS. We > added a new call to security_xfrm_state_alloc() which sets "err" to zero > so there several places where we can return ERR_PTR(0) if kmalloc() > fails. The caller

Re: [RFC v2] networking: convert many more places to skb_put_zero()

2017-06-15 Thread Johannes Berg
On Thu, 2017-06-15 at 09:54 +, YUAN Linyu wrote: > > -Original Message- > > From: netdev-ow...@vger.kernel.org [mailto:netdev-owner@vger.kernel > > .org] > > On Behalf Of Johannes Berg > > Sent: Thursday, June 15, 2017 5:28 PM > > To: netdev@vger.kernel.org > > Cc: Johannes Berg > >

Re: [PATCH iproute2 master] bpf: provide fallback defs for __NR_bpf when not avail

2017-06-15 Thread Daniel Borkmann
On 06/15/2017 01:34 AM, Stephen Hemminger wrote: On Thu, 15 Jun 2017 01:01:14 +0200 Daniel Borkmann wrote: On 06/15/2017 12:56 AM, Stephen Hemminger wrote: On Thu, 15 Jun 2017 00:47:15 +0200 Daniel Borkmann wrote: panji reported that he wasn't

Re: [PATCH v4 10/11] dt-bindings: orion-mdio: document the new xmdio compatible

2017-06-15 Thread Antoine Tenart
Hi Andrew, On Thu, Jun 15, 2017 at 03:12:32PM +0200, Andrew Lunn wrote: > > Agreed, your description is better :) > > I'll respin this patch only, if there is no other comment. > > I assume these patches are going via net-next? Dave will not like a > respin of a single patch. You need to post

[PATCH net-next 00/10] mlx4 XDP performance improvements

2017-06-15 Thread Tariq Toukan
Hi Dave, This patchset contains data-path improvements, mainly for XDP_DROP and XDP_TX cases. Main patches: * Patch 2 by Saeed allows enabling optimized A0 RX steering (in HW) when setting a single RX ring. With this configuration, HW packet-rate dramatically improves, reaching 28.1 Mpps

Re: [PATCH net-next 0/3] ipmr/ip6mr: add Netlink notifications on cache reports

2017-06-15 Thread Nikolay Aleksandrov
On 15/06/17 00:51, Julien Gomes wrote: > Hi Nikolay, > > On 06/14/2017 05:04 AM, Nikolay Aleksandrov wrote: > >> This has been on our todo list and I'm definitely interested in the >> implementation. >> A few things that need careful consideration from my POV. First are the >> security >>

Re:

2017-06-15 Thread Sai al
I would need your partnership in a transaction and details will disclose to you once i receive your reply. Thanks Saif.

RE: [RFC v2] networking: convert many more places to skb_put_zero()

2017-06-15 Thread YUAN Linyu
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Johannes Berg > Sent: Thursday, June 15, 2017 5:28 PM > To: netdev@vger.kernel.org > Cc: Johannes Berg > Subject: [RFC v2] networking: convert many more places to skb_put_zero()

[PATCH net-next 06/10] net/mlx4_en: Improve XDP xmit function

2017-06-15 Thread Tariq Toukan
Several performance improvements in XDP TX datapath, including: - Ring a single doorbell for XDP TX ring per NAPI budget, instead of doing it per a lower threshold (was 8). This includes removing the flow of immediate doorbell ringing in case of a full TX ring. - Compiler branch predictor

[PATCH net-next 05/10] net/mlx4_en: Improve stack xmit function

2017-06-15 Thread Tariq Toukan
Several small code and performance improvements in stack TX datapath, including: - Compiler branch predictor hints. - Minimize variables scope. - Move tx_info non-inline flow handling to a separate function. - Calculate data_offset in compile time rather than in runtime (for !lso_header_size

[PATCH net-next 09/10] net/mlx4_en: Replace TXBB_SIZE multiplications with shift operations

2017-06-15 Thread Tariq Toukan
Define LOG_TXBB_SIZE, log of TXBB_SIZE, and use it with a shift operation instead of a multiplication with TXBB_SIZE. Operations are equivalent as TXBB_SIZE is a power of two. Performance tests: Tested on ConnectX3Pro, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz Gain is too small to be measurable,

[PATCH net-next 04/10] net/mlx4_en: Improve transmit CQ polling

2017-06-15 Thread Tariq Toukan
Several small performance improvements in TX CQ polling, including: - Compiler branch predictor hints. - Minimize variables scope. - More proper check of cq type. - Use boolean instead of int for a binary indication. Performance tests: Tested on ConnectX3Pro, Intel(R) Xeon(R) CPU E5-2680 v3 @

[PATCH net-next 02/10] net/mlx4_en: Optimized single ring steering

2017-06-15 Thread Tariq Toukan
From: Saeed Mahameed Avoid touching RX QP RSS context when loading with only one RX ring, to allow optimized A0 RX steering. Enable by: - loading mlx4_core with module param: log_num_mgm_entry_size = -6. - then: ethtool -L rx 1 Performance tests: Tested on ConnectX3Pro,

[PATCH net-next 07/10] net/mlx4_en: Poll XDP TX completion queue in RX NAPI

2017-06-15 Thread Tariq Toukan
Instead of having their own NAPIs, XDP TX completion queues get polled within the corresponding RX NAPI. This prevents any possible race on TX ring prod/cons indices, between the context that issues the transmits (RX NAPI) and the context that handles the completions (was previously done in a

[PATCH net-next 08/10] net/mlx4_en: Increase default TX ring size

2017-06-15 Thread Tariq Toukan
Increase the default TX ring size (from 512 to 1024) to match the RX ring size. This gives the XDP TX ring a better chance to keep up with the rate of its RX ring in case of a high load of XDP_TX actions. Tested: Ethtool counter rx_xdp_tx_full used to increase, after applying this patch it

[PATCH net-next 03/10] net/mlx4_en: Improve receive data-path

2017-06-15 Thread Tariq Toukan
Several small performance improvements in RX datapath, including: - Compiler branch predictor hints. - Replace a multiplication with a shift operation. - Minimize variables scope. - Write-prefetch for packet header. - Avoid trinary-operator ("?") when value can be preset in a matching branch. -

[PATCH net-next 10/10] net/mlx4_en: Refactor mlx4_en_free_tx_desc

2017-06-15 Thread Tariq Toukan
Some code re-ordering, functionally equivalent. - The !tx_info->inl check is evaluated anyway in both flows (common case/end case). Run it first, this might finish the flows earlier. - dma_unmap calls are identical in both flows, get it out of the if block into the common area. Performance

[PATCH net-next 01/10] net/mlx4_en: Remove unused argument in TX datapath function

2017-06-15 Thread Tariq Toukan
Remove owner argument, as it is obsolete and unused. This also saves the overhead of calculating its value in data-path. Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed Cc: kernel-t...@fb.com Cc: Eric Dumazet ---

Re: [PATCH v3 net-next 0/4] kernel TLS

2017-06-15 Thread David Miller
From: Dave Watson Date: Wed, 14 Jun 2017 11:36:54 -0700 > This series adds support for kernel TLS encryption over TCP sockets. > A standard TCP socket is converted to a TLS socket using a setsockopt. > Only symmetric crypto is done in the kernel, as well as TLS record >

[PATCH net-next 6/8] net: dsa: mv88e6xxx: prefix Global Monitor Control macros

2017-06-15 Thread Vivien Didelot
Prefix and document the Global Monitor Control Register macros (which became the Global Monitor & MGMT Control Register with 88E6390) and give a clear 16-bit registers representation. Use __bf_shf to get the shift value at compile time instead of adding new defined macros for it. Signed-off-by:

Re: [PATCH net] sctp: fix spinfo_srtt to be in msecs and not jiffies

2017-06-15 Thread David Miller
From: Marcelo Ricardo Leitner Date: Wed, 14 Jun 2017 16:08:59 -0300 > RFC 6458 (SCTP Sockets API) Section 8.2.2. Peer Address Information > (SCTP_GET_PEER_ADDR_INFO) defines that spinfo_srtt is in miliseconds, > yet we were using it in jiffies. > > Fix it by

[PATCH net-next 0/8] net: dsa: prefix Global macros

2017-06-15 Thread Vivien Didelot
This patch series is the 2/3 step of the register definitions cleanup. It brings no functional changes. It prefixes and documents all Global (1) registers with MV88E6XXX_G1_ (or a specific model like MV88E6352_G1_STS_PPU_STATE), and prefers a 16-bit hexadecimal representation of the Marvell

[PATCH net-next 3/8] net: dsa: mv88e6xxx: prefix Global ATU macros

2017-06-15 Thread Vivien Didelot
Prefix and document the Global ATU Registers macros and give clear 16-bit registers representation. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c| 22 +- drivers/net/dsa/mv88e6xxx/global1.h | 75

[PATCH net-next 7/8] net: dsa: mv88e6xxx: prefix Global Stats macros

2017-06-15 Thread Vivien Didelot
Prefix and document the Global Stats Operation and Counter registers and give them a clear 16-bit registers representation. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c| 14 -- drivers/net/dsa/mv88e6xxx/global1.c | 24

[PATCH net-next 4/8] net: dsa: mv88e6xxx: prefix Global VTU macros

2017-06-15 Thread Vivien Didelot
Prefix and document the Global VTU registers macros and give a clear 16-bit registers representation. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c| 23 ++- drivers/net/dsa/mv88e6xxx/chip.h| 4 +-

[PATCH net-next 2/8] net: dsa: mv88e6xxx: prefix Global Switch MAC macros

2017-06-15 Thread Vivien Didelot
Prefix and document the Global Switch MAC Address Register macros and give clear 16-bit register representation. At the same time, move mv88e6xxx_g1_set_switch_mac in global1.c, where it belongs. Signed-off-by: Vivien Didelot ---

Re: [PATCH] skbuff: make skb_put_zero() return void

2017-06-15 Thread David Miller
From: Johannes Berg Date: Wed, 14 Jun 2017 22:17:20 +0200 > From: Johannes Berg > > It's nicer to return void, since then there's no need to > cast to any structures. Currently none of the users have > a cast, but a number of future

[PATCH net-next 1/8] net: dsa: mv88e6xxx: prefix Global Status macros

2017-06-15 Thread Vivien Didelot
Prefix and document the Global Status Register macros and give clear 16-bit register representation. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c| 4 ++-- drivers/net/dsa/mv88e6xxx/global1.c | 20 ++--

[PATCH net-next 8/8] net: dsa: mv88e6xxx: prefix Global Prio and Tag macros

2017-06-15 Thread Vivien Didelot
Prefix and document the remaining Global IP and IEEE Priority and Core Tag Type registers and give them a clear 16-bit register representation. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c| 18 +-

[PATCH net-next 5/8] net: dsa: mv88e6xxx: prefix Global Control macros

2017-06-15 Thread Vivien Didelot
Prefix and document the Global Control and Control 2 registers macros and give a clear 16-bit registers representation. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c| 18 +++ drivers/net/dsa/mv88e6xxx/global1.c | 32

[RFC PATCH v2 net-next 00/10] bpf: rewrite value tracking in verifier

2017-06-15 Thread Edward Cree
This series simplifies alignment tracking, generalises bounds tracking and fixes some bounds-tracking bugs in the BPF verifier. Pointer arithmetic on packet pointers, stack pointers, map value pointers and context pointers has been unified, and bounds on these pointers are only checked when

[RFC PATCH v2 net-next 10/10] selftests/bpf: don't try to access past MAX_PACKET_OFF in test_verifier

2017-06-15 Thread Edward Cree
"direct packet access: test2" was potentially reading four bytes from pkt + 0x, which could take it past the verifier's limit, causing the program to be rejected. Increase the shifts by one so that R2 is now mask 0x7fff instead of mask 0x. Signed-off-by: Edward Cree

Re: ARM GLX Khadas VIM Pro - Ethernet detected as only 10Mbps and stalled after some traffic

2017-06-15 Thread crow
Hi, On Sun, Jun 11, 2017 at 7:03 PM, crow wrote: > Hi Andrew, > > On Sun, Jun 11, 2017 at 5:21 PM, Andrew Lunn wrote: >>> Thank your for the suggestion, and thanks Martin to explaining me over >>> IRC what actually I should do. >>> >>> I recompiled mainline

[RFC PATCH v2 net-next 03/10] nfp: change bpf verifier hooks to match new verifier data structures

2017-06-15 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 24 +-- kernel/bpf/tnum.c | 1 + 2 files changed, 15 insertions(+), 10 deletions(-) diff --git

[RFC PATCH v2 net-next 02/10] bpf/verifier: rework value tracking

2017-06-15 Thread Edward Cree
Tracks value alignment by means of tracking known & unknown bits. Tightens some min/max value checks and fixes a couple of bugs therein. If pointer leaks are allowed, and adjust_ptr_min_max_vals returns -EACCES, treat the pointer as an unknown scalar and try again, because we might be able to

[RFC PATCH v2 net-next 04/10] bpf/verifier: track signed and unsigned min/max values

2017-06-15 Thread Edward Cree
Allows us to, sometimes, combine information from a signed check of one bound and an unsigned check of the other. We now track the full range of possible values, rather than restricting ourselves to [0, 1<<30) and considering anything beyond that as unknown. While this is probably not

[RFC PATCH v2 net-next 05/10] bpf/verifier: more concise register state logs for constant var_off

2017-06-15 Thread Edward Cree
Signed-off-by: Edward Cree --- kernel/bpf/verifier.c | 46 +++--- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 15433f6..cef882c 100644 --- a/kernel/bpf/verifier.c

[RFC PATCH v2 net-next 09/10] selftests/bpf: add test for bogus operations on pointers

2017-06-15 Thread Edward Cree
Tests non-add/sub operations (AND, LSH) on pointers decaying them to unknown scalars. Also tests that a pkt_ptr add which could potentially overflow is rejected (find_good_pkt_pointers ignores it and doesn't give us any reg->range). Signed-off-by: Edward Cree ---

[RFC PATCH v2 net-next 06/10] selftests/bpf: change test_verifier expectations

2017-06-15 Thread Edward Cree
Some of the verifier's error messages have changed, and some constructs that previously couldn't be verified are now accepted. Signed-off-by: Edward Cree --- tools/testing/selftests/bpf/test_verifier.c | 226 ++-- 1 file changed, 116 insertions(+),

[RFC PATCH v2 net-next 08/10] selftests/bpf: add a test to test_align

2017-06-15 Thread Edward Cree
New test adds 14 to the unknown value before adding to the packet pointer, meaning there's no 'fixed offset' field and instead we add into the var_off, yielding a '4n+2' value. Signed-off-by: Edward Cree --- tools/testing/selftests/bpf/test_align.c | 67

[RFC PATCH v2 net-next 07/10] selftests/bpf: rewrite test_align

2017-06-15 Thread Edward Cree
Expectations have changed, as has the format of the logged state. To make the tests easier to read, add a line-matching framework so that each match need only quote the register it cares about. (Multiple matches may refer to the same line, but matches must be listed in order of increasing

[RFC PATCH v2 net-next 01/10] selftests/bpf: add test for mixed signed and unsigned bounds checks

2017-06-15 Thread Edward Cree
Currently fails due to bug in verifier bounds handling. Signed-off-by: Edward Cree --- tools/testing/selftests/bpf/test_verifier.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tools/testing/selftests/bpf/test_verifier.c

[PATCH net-next v5 04/11] net: mvmdio: remove duplicate locking

2017-06-15 Thread Antoine Tenart
From: Russell King The MDIO layer already provides per-bus locking, so there's no need for MDIO bus drivers to do their own internal locking. Remove this. Signed-off-by: Russell King Reviewed-by: Florian Fainelli

[PATCH net-next v5 03/11] net: mvmdio: use GENMASK for masks

2017-06-15 Thread Antoine Tenart
Cosmetic patch to use the GENMASK helper for masks. Signed-off-by: Antoine Tenart Reviewed-by: Florian Fainelli --- drivers/net/ethernet/marvell/mvmdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

RE: [RFC] networking: convert many more places to skb_put_zero()

2017-06-15 Thread YUAN Linyu
> -Original Message- > From: Johannes Berg [mailto:johan...@sipsolutions.net] > Sent: Thursday, June 15, 2017 2:58 PM > To: YUAN Linyu; netdev@vger.kernel.org > Subject: Re: [RFC] networking: convert many more places to skb_put_zero() > > On Thu, 2017-06-15 at 00:23 +, YUAN Linyu

Re: [RFC] networking: convert many more places to skb_put_zero()

2017-06-15 Thread Johannes Berg
On Thu, 2017-06-15 at 07:05 +, YUAN Linyu wrote: > > @@ > > type t; > > expression skb, len; > > identifier p; > > @@ > > t *p > > - = skb_put(skb, len); > > + = skb_put_zero(skb, len); > > -memset(p, 0, len); > > > > and it can't figure out that it should remove the variable, without > >

Re: [PATCH iproute2] link_gre6: really support encaplimit option

2017-06-15 Thread Stephen Hemminger
On Thu, 15 Jun 2017 09:28:46 +0200 Nicolas Dichtel wrote: > Le 14/06/2017 à 22:31, Stephen Hemminger a écrit : > > On Wed, 14 Jun 2017 18:45:42 +0200 > > Nicolas Dichtel wrote: > > > >> This option is documented in gre6 help, but was not

Re: [RFC] networking: introduce and use skb_put_data()

2017-06-15 Thread Stephen Hemminger
On Thu, 15 Jun 2017 09:10:18 +0200 Johannes Berg wrote: > From: Johannes Berg > > A common pattern with skb_put() is to just want to memcpy() > some data into the new space, introduce skb_put_data() for > this. > > An spatch similar to the

[PATCH net-next V2 2/2] pktgen: Specify the index of first thread

2017-06-15 Thread Tariq Toukan
Use "-f ", to specify the index of the first sender thread. In default first thread is #0. Signed-off-by: Tariq Toukan Cc: Jesper Dangaard Brouer --- samples/pktgen/README.rst| 1 + samples/pktgen/parameters.sh

[PATCH net-next V2 1/2] pktgen: Specify num packets per thread

2017-06-15 Thread Tariq Toukan
Use -n , to specify the number of packets every thread sends. Zero means indefinitely. Signed-off-by: Tariq Toukan Cc: Jesper Dangaard Brouer --- samples/pktgen/README.rst | 1 + samples/pktgen/parameters.sh

Re: linux-next: build failure after merge of the wireless-drivers-next tree

2017-06-15 Thread David Miller
From: Stephen Rothwell Date: Tue, 13 Jun 2017 12:00:24 +1000 > Hi Dave, > > On Thu, 8 Jun 2017 12:27:59 +1000 Stephen Rothwell > wrote: >> >> After merging the wireless-drivers-next tree, today's linux-next build >> (x86_64 allmodconfig) failed

Re: [PATCH v1 0/2] Add support for Broadcom DTE based PTP clock

2017-06-15 Thread David Miller
From: Arun Parameswaran Date: Mon, 12 Jun 2017 13:25:59 -0700 > This patchset adds support for the DTE based PTP clock for Broadcom SoCs. > > The DTE nco based PTP clock can be used in both wired and wireless networks > for precision time-stmaping purposes.

[PATCH net-next V2 0/2] pktgen new parameters

2017-06-15 Thread Tariq Toukan
Hi Dave, This patchset adds two parameters to the pktgen scripts. * The first patch adds a parameter to control the number of packets sent by every pktgen thread. * The second patch adds a parameter to control the index of first thread, instead of always starting from cpu 0. Series generated

Re: [PATCH net-next 0/8] net: dsa: prefix Global macros

2017-06-15 Thread David Miller
From: Andrew Lunn Date: Thu, 15 Jun 2017 19:03:11 +0200 > On Thu, Jun 15, 2017 at 12:13:58PM -0400, Vivien Didelot wrote: >> This patch series is the 2/3 step of the register definitions cleanup. >> It brings no functional changes. >> >> It prefixes and documents all Global (1)

Re: [PATCH net-next 0/2] net: sched: act_tunnel_key: UDP checksums

2017-06-15 Thread David Miller
From: Jiri Benc Date: Wed, 14 Jun 2017 21:19:29 +0200 > Currently, the tunnel_key tc action does not set TUNNEL_CSUM, thus > transmitting packets with zero UDP checksum. This is inconsistent with how > we treat non-lwt UDP tunnels where the default is to fill in the UDP >

[PATCH net-next 3/3] rds: tcp: Set linger when rejecting an incoming conn in rds_tcp_accept_one

2017-06-15 Thread Sowmini Varadhan
Each time we get an incoming SYN to the RDS_TCP_PORT, the TCP layer accepts the connection and then the rds_tcp_accept_one() callback is invoked to process the incoming connection. rds_tcp_accept_one() may reject the incoming syn for a number of reasons, e.g., commit 1a0e100fb2c9 ("RDS: TCP:

Re: [PATCH iproute/master 2/3] iptunnel: add support for mpls/ip to sit tunnels

2017-06-15 Thread Krister Johansen
On Wed, Jun 14, 2017 at 11:16:20AM -0600, David Ahern wrote: > On 6/14/17 11:11 AM, Krister Johansen wrote: > > I did try to fix this up as part of bringing this patch up to date, > > since it was one of the concerns that David raised too. I believe the > > problem that I ran into was that

[PATCH net-next 1/3] rds: tcp: remove cp_outgoing

2017-06-15 Thread Sowmini Varadhan
After commit 1a0e100fb2c9 ("RDS: TCP: Force every connection to be initiated by numerically smaller IP address") we no longer need the logic associated with cp_outgoing, so clean up usage of this field. Signed-off-by: Sowmini Varadhan Tested-by: Imanti Mendez

Re: [RFC v2] networking: convert many more places to skb_put_zero()

2017-06-15 Thread Johannes Berg
On Thu, 2017-06-15 at 14:36 -0400, David Miller wrote: > Johannes these changes look good, please feel free to submit them > formally. Yeah, will do, just need to find the time to at least build-test them (and we had a holiday here today) :) johannes

[PATCH] Convert multiple netdev_info messages to netdev_dbg

2017-06-15 Thread Michael J Dilmore
Multiple netdev_info messages clutter kernel output. Also add netdev_dbg for packets per slave. Suggested-by: Joe Perches Signed-off-by: Michael J Dilmore cc: Veaceslav Falico , Andy Gospodarek ,

Re: [PATCH net-next] sunvnet: restrict advertized checksum offloads to just IP

2017-06-15 Thread Shannon Nelson
On 6/15/2017 11:23 AM, David Miller wrote: Applied, but this bug must be fixed properly and ipv6 checksumming properly supported. Thanks. Understood - we just wanted first to stop the bleeding while we think about how to do this right. Thanks, sln

Re: [PATCH 1/1] Doc: net: dsa: b53: update location of referenced dsa.txt

2017-06-15 Thread David Miller
From: Heinrich Schuchardt Date: Thu, 15 Jun 2017 20:59:57 +0200 > The referenced file dsa.txt is located at > Documentation/devicetree/bindings/net/dsa/dsa.txt > > Reviewed-by: Florian Fainelli > Signed-off-by: Heinrich Schuchardt

[PATCH net-next 0/7] qed*: RDMA and infrastructure for iWARP

2017-06-15 Thread Yuval Mintz
This series focuses on RDMA in general with emphasis on required changes toward adding iWARP support. The vast majority of the changes introduced are in qed/qede, with a couple of small changes to qedr [mentioned below]. The infrastructure changes: - Patch #1 adds the ability to pass PBL memory

[PATCH net-next 1/2] net: dsa: loop: Inline unregister_fixed_phys()

2017-06-15 Thread Florian Fainelli
This is a simple function that only gets used in the driver's remove function, inline it there. Signed-off-by: Florian Fainelli --- drivers/net/dsa/dsa_loop.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/net/dsa/dsa_loop.c

[PATCH net-next 0/2] net: dsa: loop: Driver updates

2017-06-15 Thread Florian Fainelli
This patch series updates drivers/net/dsa/dsa_loop.c to provide more useful coverage of the DSA APIs and how we mangle the CPU ports ethtool statistics to include its switch-facing port counters. Thanks Florian Fainelli (2): net: dsa: loop: Inline unregister_fixed_phys() net: dsa: loop:

  1   2   3   >