Re: [PATCH net-next] net: make ndo_get_stats64 a void function

2017-01-06 Thread kbuild test robot
Hi Stephen, [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Stephen-Hemminger/net-make-ndo_get_stats64-a-void-function/20170106-160123 config: xtensa-allmodconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 4.9.0 reproduce: wget

Re: [PATCH net-next 2/2] net/sched: act_csum: compute crc32c on SCTP packets

2017-01-06 Thread Nicolas Dichtel
Le 05/01/2017 à 17:59, Davide Caratti a écrit : > modify act_csum to compute crc32c on IPv4/IPv6 packets having SCTP in > their payload, and extend UAPI definitions accordingly. > > Signed-off-by: Davide Caratti > --- > include/uapi/linux/tc_act/tc_csum.h | 3 ++- >

[PATCH v2 6/7] Makefile.headersinst: remove destination-y option

2017-01-06 Thread Nicolas Dichtel
This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y for exported headers") but never used in-tree. Signed-off-by: Nicolas Dichtel --- Documentation/kbuild/makefiles.txt | 23 --- scripts/Makefile.headersinst | 2 +-

[PATCH v2 7/7] uapi: export all headers under uapi directories

2017-01-06 Thread Nicolas Dichtel
Regularly, when a new header is created in include/uapi/, the developer forgets to add it in the corresponding Kbuild file. This error is usually detected after the release is out. In fact, all headers under uapi directories should be exported, thus it's useless to have an exhaustive list. After

[PATCH net-next] net:add one common config ARCH_WANT_RELAX_ORDER to support relax ordering.

2017-01-06 Thread Mao Wenan
Relax ordering(RO) is one feature of 82599 NIC, to enable this feature can enhance the performance for some cpu architecure, such as SPARC and so on. Currently it only supports one special cpu architecture(SPARC) in 82599 driver to enable RO feature, this is not very common for other cpu

Re: [net-next PATCH 5/6] i40e: Add TX and RX support in switchdev mode.

2017-01-06 Thread Or Gerlitz
On Fri, Jan 6, 2017 at 12:32 AM, Samudrala, Sridhar wrote: > On 1/5/2017 3:50 AM, Or Gerlitz wrote: > It looks like you are returning the VF port number as phys_port_name() for a > VF rep in en_rep.c. Is this correct? yeah, correct, what we all call the VF rep

[PATCH v2 3/7] nios2: put setup.h in uapi

2017-01-06 Thread Nicolas Dichtel
This header file is exported, thus move it to uapi. Signed-off-by: Nicolas Dichtel --- arch/nios2/include/asm/setup.h | 2 +- arch/nios2/include/uapi/asm/setup.h | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644

[PATCH v2 4/7] x86: put msr-index.h in uapi

2017-01-06 Thread Nicolas Dichtel
This header file is exported, thus move it to uapi. Signed-off-by: Nicolas Dichtel --- arch/x86/include/asm/msr-index.h | 694 + arch/x86/include/uapi/asm/msr-index.h | 698 ++ 2 files changed, 699

[PATCH v2 1/7] arm: put types.h in uapi

2017-01-06 Thread Nicolas Dichtel
This header file is exported, thus move it to uapi. Signed-off-by: Nicolas Dichtel --- arch/arm/include/asm/types.h | 36 +-- arch/arm/include/uapi/asm/types.h | 40 +++ 2 files changed, 41

Re: [PATCH iproute2 2/3] ip vrf: Improve cgroup2 error messages

2017-01-06 Thread Sergei Shtylyov
Hello! On 1/6/2017 3:22 AM, David Ahern wrote: Currently, if a non-root user attempts to run ip vrf exec a non-helpful error is returned: $ ip vrf exec mgmt bash Failed to mount cgroup2. Are CGROUPS enabled in your kernel? Only show the CGROUPS kernel hint for the ENODEV error and for the

[PATCH v2 5/7] Makefile.headersinst: cleanup input files

2017-01-06 Thread Nicolas Dichtel
After the last four patches, all exported headers are under uapi/, thus input-files2 are not needed anymore. The side effect is that input-files1-name is exactly header-y. Note also that unput-files3-name is genhdr-y. Signed-off-by: Nicolas Dichtel ---

[PATCH v2 0/7] uapi: export all headers under uapi directories

2017-01-06 Thread Nicolas Dichtel
Here is the v2 of this series. The first 5 patches are just cleanup: some exported headers were still under a non-uapi directory. The patch 6 was spotted by code review: there is no in-tree user of this functionality. The last patch remove the use of header-y. Now all files under an uapi

[PATCH v2 2/7] h8300: put bitsperlong.h in uapi

2017-01-06 Thread Nicolas Dichtel
This header file is exported, thus move it to uapi. Signed-off-by: Nicolas Dichtel --- arch/h8300/include/asm/bitsperlong.h | 10 +- arch/h8300/include/uapi/asm/bitsperlong.h | 14 ++ 2 files changed, 15 insertions(+), 9 deletions(-) create

[net-next 02/10] e1000e: driver trying to free already-free irq

2017-01-06 Thread Jeff Kirsher
From: khalidm During systemd reboot sequence network driver interface is shutdown by e1000_close. The PCI driver interface is shut by e1000_shutdown. The e1000_shutdown checks for netif_running status, if still up it brings down driver. But it disables msi outside of this if

[net-next 03/10] igb: correct register comments

2017-01-06 Thread Jeff Kirsher
From: Cao jin Signed-off-by: Cao jin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igb/e1000_regs.h | 2 +- 1 file changed, 1 insertion(+), 1

[net-next 10/10] igb: Fix hw_dbg logging in igb_update_flash_i210

2017-01-06 Thread Jeff Kirsher
From: Hannu Lounento Fix an if statement with hw_dbg lines where the logic was inverted with regards to the corresponding return value used in the if statement. Signed-off-by: Hannu Lounento Signed-off-by: Peter Senna Tschudin

[PATCH v5 0/3] adding new glue driver dwmac-dwc-qos-eth

2017-01-06 Thread Joao Pinto
This patch set contains the porting of the synopsys/dwc_eth_qos.c driver to the stmmac structure. This operation resulted in the creation of a new platform glue driver called dwmac-dwc-qos-eth which was based in the dwc_eth_qos as is. dwmac-dwc-qos-eth inherited dwc_eth_qos DT bindings, to assure

[PATCH v5 3/3] stmmac: adding new glue driver dwmac-dwc-qos-eth

2017-01-06 Thread Joao Pinto
This patch adds a new glue driver called dwmac-dwc-qos-eth which was based in the dwc_eth_qos as is. To assure retro-compatibility a slight tweak was also added to stmmac_platform. Signed-off-by: Joao Pinto --- changes v4 -> v5: - memset was not done properly changes v3 ->

[net-next 00/10][pull request] 1GbE Intel Wired LAN Driver Updates 2017-01-06

2017-01-06 Thread Jeff Kirsher
This series contains updates/fixes to igb and e1000e. Joe fixes indentation and improper line wrapping in igb. David Singleton fixes an issue in e1000e where in systemd, where things are done in parallel and can create a condition where e1000_shutdown is called after e1000_close, hitting BUG_ON

[PATCH v5 2/3] stmmac: move stmmac_clk, pclk, clk_ptp_ref and stmmac_rst to platform structure

2017-01-06 Thread Joao Pinto
This patch moves stmmac_clk, pclk, clk_ptp_ref and stmmac_rst to the plat_stmmacenet_data structure. It also moves these platform variables initialization to stmmac_platform. This was done for two reasons: a) If PCI is used, platform related code is being executed in stmmac_main resulting in

[PATCH v5 1/3] stmmac: adding DT parameter for LPI tx clock gating

2017-01-06 Thread Joao Pinto
This patch adds a new parameter to the stmmac DT: snps,en-tx-lpi-clockgating. It was ported from synopsys/dwc_eth_qos.c and it is useful if lpi tx clock gating is needed by stmmac users also. Signed-off-by: Joao Pinto --- changes v1 -> v5: - Nothing changed, just to keep up

[net-next 05/10] igb: use igb_adapter->io_addr instead of e1000_hw->hw_addr

2017-01-06 Thread Jeff Kirsher
From: Cao jin When running as guest, under certain condition, it will oops as following. writel() in igb_configure_tx_ring() results in oops, because hw->hw_addr is NULL. While other register access won't oops kernel because they use wr32/rd32 which have a defense

[net-next 01/10] igb: Realign bad indentation

2017-01-06 Thread Jeff Kirsher
From: Joe Perches Statements should start on tabstops. Use a single statement and test instead of multiple tests. Signed-off-by: Joe Perches Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher ---

[net-next 09/10] igb: add i211 to i210 PHY workaround

2017-01-06 Thread Jeff Kirsher
From: Todd Fujinaka i210 and i211 share the same PHY but have different PCI IDs. Don't forget i211 for any i210 workarounds. Signed-off-by: Todd Fujinaka Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher

[PATCH] vti6: fix device register to report IFLA_INFO_KIND

2017-01-06 Thread David Forster
vti6 interface is registered before the rtnl_link_ops block is attached. As a result the resulting RTM_NEWLINK is missing IFLA_INFO_KIND. Re-order attachment of rtnl_link_ops block to fix. Signed-off-by: Dave Forster --- net/ipv6/ip6_vti.c | 2 +- 1 file changed, 1

[PATCH v2] phy state machine: failsafe leave invalid RUNNING state

2017-01-06 Thread Zefir Kurtisi
While in RUNNING state, phy_state_machine() checks for link changes by comparing phydev->link before and after calling phy_read_status(). This works as long as it is guaranteed that phydev->link is never changed outside the phy_state_machine(). If in some setups this happens, it causes the state

[net] bf7d953378: BUG:sleeping_function_called_from_invalid_context_at_kernel/locking/mutex.c

2017-01-06 Thread kernel test robot
FYI, we noticed the following commit: commit: bf7d95337899f2e3ab5c14d6117fa7cd95a3d0d4 ("net: Fix inconsistent rtnl_lock usage on dev_get_stats().") url: https://github.com/0day-ci/linux/commits/Michael-Chan/net-Fix-inconsistent-rtnl_lock-usage-on-dev_get_stats/20170106-144936 i

Re: [PATCH ipsec-next] xfrm: state: do not acquire lock in get_mtu helpers

2017-01-06 Thread Steffen Klassert
On Thu, Jan 05, 2017 at 01:23:58PM +0100, Florian Westphal wrote: > Once flow cache gets removed the mtu initialisation happens for every skb > that gets an xfrm attached, so this lock starts to show up in perf. > > It is not obvious why this lock is required -- the caller holds > reference on

[net-next 08/10] igb: close/suspend race in netif_device_detach

2017-01-06 Thread Jeff Kirsher
From: Todd Fujinaka Similar to ixgbe, when an interface is part of a namespace it is possible that igb_close() may be called while __igb_shutdown() is running which ends up in a double free WARN and/or a BUG in free_msi_irqs(). Extend the rtnl_lock() to protect the call

[net-next 04/10] igb: Workaround for igb i210 firmware issue

2017-01-06 Thread Jeff Kirsher
From: Chris J Arges Sometimes firmware may not properly initialize I347AT4_PAGE_SELECT causing the probe of an igb i210 NIC to fail. This patch adds an addition zeroing of this register during igb_get_phy_id to workaround this issue. Thanks for Jochen Henneberg for

[net-next 06/10] igb: reset the PHY before reading the PHY ID

2017-01-06 Thread Jeff Kirsher
From: Aaron Sierra Several people have reported firmware leaving the I210/I211 PHY's page select register set to something other than the default of zero. This causes the first accesses, PHY_IDx register reads, to access something else, resulting in device probe failure:

[net-next 07/10] igb: re-assign hw address pointer on reset after PCI error

2017-01-06 Thread Jeff Kirsher
From: Guilherme G Piccoli Whenever the igb driver detects the result of a read operation returns a value composed only by F's (like 0x), it will detach the net_device, clear the hw_addr pointer and warn to the user that adapter's link is lost - those steps

Re: [PATCH v1 1/2] bpf: add a longest prefix match trie map implementation

2017-01-06 Thread Daniel Borkmann
On 01/05/2017 09:14 PM, Daniel Mack wrote: [...] In my use case, the actual value of a node is in fact ignored, all that matters is whether a node exists in a trie or not. The test code uses u64 for its tests. I can change it around so that the value size can be defined by userspace, but

Re: [PATCH net-next v4 0/4] Fix OdroidC2 Gigabit Tx link issue

2017-01-06 Thread Russell King - ARM Linux
On Fri, Jan 06, 2017 at 11:11:36AM +0100, Jerome Brunet wrote: > The purpose of this patch is to provide a way to mark as broken a > particular eee mode. At first, it had nothing to do with "set_eee" but, > as Florian rightly pointed out, users shouldn't be able to re-enable a > broken mode. I

Re: [PATCH net-next] bridge: multicast to unicast

2017-01-06 Thread Johannes Berg
On Mon, 2017-01-02 at 20:32 +0100, Linus Lüssing wrote: > Implements an optional, per bridge port flag and feature to deliver > multicast packets to any host on the according port via unicast > individually. This is done by copying the packet per host and > changing the multicast destination MAC

Re: [PATCHv2 net-next 02/11] net: mvpp2: handle too large value in mvpp2_rx_time_coal_set()

2017-01-06 Thread Russell King - ARM Linux
On Wed, Dec 28, 2016 at 05:45:58PM +0100, Thomas Petazzoni wrote: > When configuring the MVPP2_ISR_RX_THRESHOLD_REG with the RX coalescing > time threshold, we do not check for the maximum allowed value supported > by the driver, which means we might overflow and use a bogus value. This > commit

Re: [PATCHv2 net-next 09/11] net: mvpp2: simplify MVPP2_PRS_RI_* definitions

2017-01-06 Thread Russell King - ARM Linux
On Wed, Dec 28, 2016 at 05:46:05PM +0100, Thomas Petazzoni wrote: > Some of the MVPP2_PRS_RI_* definitions use the ~(value) syntax, which > doesn't compile nicely on 64-bit. Moreover, those definitions are in > fact unneeded, since they are always used in combination with a bit > mask that ensures

Re: [PATCH v3 3/3] stmmac: adding new glue driver dwmac-dwc-qos-eth

2017-01-06 Thread Alexandre Torgue
Hi Joao, On 01/05/2017 06:49 PM, Joao Pinto wrote: Hi Alex, Às 5:19 PM de 1/5/2017, Alexandre Torgue escreveu: Hi Joao, On 01/04/2017 05:22 PM, Joao Pinto wrote: This patch adds a new glue driver called dwmac-dwc-qos-eth which was based in the dwc_eth_qos as is. To assure

Re: [PATCH v3 3/3] stmmac: adding new glue driver dwmac-dwc-qos-eth

2017-01-06 Thread Joao Pinto
Às 1:27 PM de 1/6/2017, Alexandre Torgue escreveu: > Hi Joao, > > On 01/05/2017 06:49 PM, Joao Pinto wrote: >> Hi Alex, >> >> Às 5:19 PM de 1/5/2017, Alexandre Torgue escreveu: >>> Hi Joao, >>> >>> On 01/04/2017 05:22 PM, Joao Pinto wrote: This patch adds a new glue driver called

Re: [net-next PATCH v2 5/6] i40e: Add TX and RX support in switchdev mode.

2017-01-06 Thread Jiri Pirko
Fri, Jan 06, 2017 at 01:27:13AM CET, sridhar.samudr...@intel.com wrote: > > >On 1/5/2017 4:56 AM, Jiri Pirko wrote: >> Tue, Jan 03, 2017 at 07:07:53PM CET, sridhar.samudr...@intel.com wrote: >> > In switchdev mode, broadcast filter is not enabled on VFs. The broadcasts >> > and >> > unknown

[PATCH net-next 3/4] secure_seq: use SipHash in place of MD5

2017-01-06 Thread Jason A. Donenfeld
This gives a clear speed and security improvement. Siphash is both faster and is more solid crypto than the aging MD5. Rather than manually filling MD5 buffers, for IPv6, we simply create a layout by a simple anonymous struct, for which gcc generates rather efficient code. For IPv4, we pass the

[PATCH net-next 4/4] syncookies: use SipHash in place of SHA1

2017-01-06 Thread Jason A. Donenfeld
SHA1 is slower and less secure than SipHash, and so replacing syncookie generation with SipHash makes natural sense. Some BSDs have been doing this for several years in fact. The speedup should be similar -- and even more impressive -- to the speedup from the sequence number fix in this series.

[PATCH net-next 0/2] afs: Implement bulk read

2017-01-06 Thread David Howells
rxrpc-rewrite-20170106 David --- David Howells (2): afs: Make afs_fs_fetch_data() take a list of pages afs: Make afs_readpages() fetch data in bulk fs/afs/file.c | 168 +++-- fs/afs/fsclient.c | 117

[PATCH net-next 1/2] afs: Make afs_fs_fetch_data() take a list of pages

2017-01-06 Thread David Howells
Make afs_fs_fetch_data() take a list of pages for bulk data transfer. This will allow afs_readpages() to be made more efficient. Signed-off-by: David Howells --- fs/afs/file.c | 37 ++--- fs/afs/fsclient.c | 117

Re: [PATCH net] dccp: fix option range in dccp_parse_options()

2017-01-06 Thread Eric Dumazet
On Fri, 2017-01-06 at 08:43 -0800, Eric Dumazet wrote: > From: Eric Dumazet > > dccp_parse_options() improperly parses 12 or 16 bytes in excess, > because it forgets to subtract DCCP header len. > > This causes various issues, since these 12/16 bytes are part of the >

[net-next PATCH] net: reduce cycles spend on ICMP replies that gets rate limited

2017-01-06 Thread Jesper Dangaard Brouer
This patch split the global and per (inet)peer ICMP-reply limiter code, and moves the global limit check to earlier in the packet processing path. Thus, avoid spending cycles on ICMP replies that gets limited/suppressed anyhow. The global ICMP rate limiter icmp_global_allow() is a good solution,

Re: [PATCHv3 net-next] sctp: prepare asoc stream for stream reconf

2017-01-06 Thread Marcelo Ricardo Leitner
On Fri, Jan 06, 2017 at 10:18:33PM +0800, Xin Long wrote: > sctp stream reconf, described in RFC 6525, needs a structure to > save per stream information in assoc, like stream state. > > In the future, sctp stream scheduler also needs it to save some > stream scheduler params and queues. > >

[PATCH net-next 3/4] l2tp: remove useless NULL check in __l2tp_ip*_bind_lookup()

2017-01-06 Thread Guillaume Nault
If "l2tp" was NULL, that'd mean "sk" is NULL too. This can't happen since "sk" is returned by sk_for_each_bound(). Signed-off-by: Guillaume Nault --- net/l2tp/l2tp_ip.c | 3 --- net/l2tp/l2tp_ip6.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/net/l2tp/l2tp_ip.c

[PATCH net-next 4/4] l2tp: rework socket comparison in __l2tp_ip*_bind_lookup()

2017-01-06 Thread Guillaume Nault
Split conditions, so that each test becomes clearer. Also, for l2tp_ip, check if "laddr" is 0. This prevents a socket from binding to the unspecified address when other sockets are already bound using the same device (if any), connection ID and namespace. Same thing for l2tp_ip6: add

[PATCH net-next 0/4] l2tp: cleanup socket lookup code in l2tp_ip and l2tp_ip6

2017-01-06 Thread Guillaume Nault
First three patches remove redundant tests and add missing "const" qualifiers. Fourth patch splits the conditionals found in __l2tp_ip*_bind_lookup(), to make these functions easier to review. In the process, I found that some corner cases were still not handled properly. So I've added the

[PATCH net-next 2/4] l2tp: make __l2tp_ip*_bind_lookup() parameters 'const'

2017-01-06 Thread Guillaume Nault
Add const qualifier wherever possible for __l2tp_ip_bind_lookup() and __l2tp_ip6_bind_lookup(). Signed-off-by: Guillaume Nault --- net/l2tp/l2tp_ip.c | 4 ++-- net/l2tp/l2tp_ip6.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH net-next 1/4] l2tp: remove redundant addr_len check in l2tp_ip_bind()

2017-01-06 Thread Guillaume Nault
addr_len's value has already been verified at this point. Signed-off-by: Guillaume Nault --- net/l2tp/l2tp_ip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c index 3d73278b86ca..992761e721af 100644 ---

[net-next][PATCH] RDS: validate the requested traces user input against max supported

2017-01-06 Thread Santosh Shilimkar
Larger than supported value can lead to array read/write overflow. Reported-by: Colin Ian King Signed-off-by: Santosh Shilimkar --- net/rds/af_rds.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/rds/af_rds.c

Re: [PATCH net] net: Fix inconsistent rtnl_lock usage on dev_get_stats().

2017-01-06 Thread David Miller
From: Eric Dumazet Date: Fri, 06 Jan 2017 09:32:56 -0800 > This makes no sense to me. > > RTNL is absolutely not needed to get device stats. > > We try to not add RTNL, especially when not required. > > Sure, RTNETLINK dumps currently hold RTNL, but we had various

Re: [PATCH/RFC v2 net-next] ravb: unmap descriptors when freeing rings

2017-01-06 Thread Sergei Shtylyov
Hello! On 01/05/2017 01:43 PM, Simon Horman wrote: From: Kazuya Mizuguchi "swiotlb buffer is full" errors occur after repeated initialisation of a device - f.e. suspend/resume or ip link set up/down. This is because memory mapped using dma_map_single() in

Re: [PATCH] net: phy: dp83867: fix irq generation

2017-01-06 Thread Grygorii Strashko
On 01/05/2017 04:10 PM, Florian Fainelli wrote: On 01/05/2017 12:48 PM, Grygorii Strashko wrote: For proper IRQ generation by DP83867 phy the INT/PWDN pin has to be programmed as an interrupt output instead of a Powerdown input in Configuration Register 3 (CFG3), Address 0x001E, bit 7 INT_OE

Re: [PATCH net] net: Fix inconsistent rtnl_lock usage on dev_get_stats().

2017-01-06 Thread Eric Dumazet
On Thu, 2017-01-05 at 23:21 -0500, Michael Chan wrote: > Some callers take rtnl_lock() before calling dev_get_stats() and some > don't. Most network drivers expect the ndo_get_stats64() to be called > under rtnl_lock() to avoid race conditions with device close or ethtool > reconfigurations. Fix

[PATCH net-next 2/4] siphash: implement HalfSipHash1-3 for hash tables

2017-01-06 Thread Jason A. Donenfeld
HalfSipHash, or hsiphash, is a shortened version of SipHash, which generates 32-bit outputs using a weaker 64-bit key. It has *much* lower security margins, and shouldn't be used for anything too sensitive, but it could be used as a hashtable key function replacement, if the output is never

[PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread Jason A. Donenfeld
SipHash is a 64-bit keyed hash function that is actually a cryptographically secure PRF, like HMAC. Except SipHash is super fast, and is meant to be used as a hashtable keyed lookup function, or as a general PRF for short input use cases, such as sequence numbers or RNG chaining. For the first

[PATCH] netlabel: add CALIPSO to the list of built-in protocols

2017-01-06 Thread Paul Moore
From: Paul Moore When we added CALIPSO support in Linux v4.8 we forgot to add it to the list of supported protocols with display at boot. Signed-off-by: Paul Moore --- net/netlabel/netlabel_kapi.c |5 + 1 file changed, 1 insertion(+), 4

Re: [net-next PATCH] net: reduce cycles spend on ICMP replies that gets rate limited

2017-01-06 Thread Eric Dumazet
On Fri, 2017-01-06 at 18:39 +0100, Jesper Dangaard Brouer wrote: > @@ -648,13 +668,17 @@ void icmp_send(struct sk_buff *skb_in, int type, int > code, __be32 info) > } > } > > - icmp_param = kmalloc(sizeof(*icmp_param), GFP_ATOMIC); > - if (!icmp_param) > -

Re: [PATCH V4 net-next 1/3] vhost: better detection of available buffers

2017-01-06 Thread Michael S. Tsirkin
On Fri, Jan 06, 2017 at 10:13:15AM +0800, Jason Wang wrote: > This patch tries to do several tweaks on vhost_vq_avail_empty() for a > better performance: > > - check cached avail index first which could avoid userspace memory access. > - using unlikely() for the failure of userspace access > -

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread David Miller
Proper patch series submissions require a header "[PATCH 0/N] ..." posting explaining at a high level, what the series is doing, how it is doing it, and why it is doing it that way.

[PATCH v2 5/7] net: ethernet: ti: cpsw: add support for descs pool size configuration

2017-01-06 Thread Grygorii Strashko
The CPSW CPDMA can process buffer descriptors placed as in internal CPPI RAM as in DDR. This patch adds support in CPSW and CPDMA for descs_pool_size mudule parameter, which defines total number of CPDMA CPPI descriptors to be used for both ingress/egress packets processing: - memory size,

[PATCH v2 6/7] net: ethernet: ti: cpsw: add support for ringparam configuration

2017-01-06 Thread Grygorii Strashko
The CPDMA uses one pool of descriptors for both RX and TX which by default split between all channels proportionally depending on total number of CPDMA channels and number of TX and RX channels. As result, more descriptors will be consumed by TX path if there are more TX channels and there is no

[PATCH v2 3/7] net: ethernet: ti: cpdma: minimize number of parameters in cpdma_desc_pool_create/destroy()

2017-01-06 Thread Grygorii Strashko
Update cpdma_desc_pool_create/destroy() to accept only one parameter struct cpdma_ctlr*, as this structure contains all required information for pool creation/destruction. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/davinci_cpdma.c | 62

[PATCH v2 1/7] net: ethernet: ti: cpdma: am437x: allow descs to be plased in ddr

2017-01-06 Thread Grygorii Strashko
It's observed that cpsw/cpdma is not working properly when CPPI descriptors are placed in DDR instead of internal CPPI RAM on am437x SoC: - rx/tx silently stops processing packets; - or - after boot it's working for sometime, but stuck once Network load is increased (ping is working, but iperf is

[PATCH v2 7/7] Documentation: DT: net: cpsw: remove no_bd_ram property

2017-01-06 Thread Grygorii Strashko
Even if no_bd_ram property is described in TI CPSW bindings the support for it has never been introduced in CPSW driver, so there are no real users of it. Hence, remove no_bd_ram property from documentation and DT files. Cc: 'Rob Herring ' Signed-off-by: Grygorii Strashko

[PATCH net-next 0/4] Introduce The SipHash PRF

2017-01-06 Thread Jason A. Donenfeld
This patch series introduces SipHash into the kernel. SipHash is a cryptographically secure PRF, which serves a variety of functions, and is introduced in patch #1. The following patch #2 introduces HalfSipHash, an optimization suitable for hash tables only. Finally, the last two patches in this

Re: [PATCH net-next 2/4] siphash: implement HalfSipHash1-3 for hash tables

2017-01-06 Thread Jean-Philippe Aumasson
On Fri, Jan 6, 2017 at 9:10 PM, Jason A. Donenfeld wrote: > HalfSipHash, or hsiphash, is a shortened version of SipHash, which > generates 32-bit outputs using a weaker 64-bit key. It has *much* lower > security margins, and shouldn't be used for anything too sensitive, but > it

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread Jean-Philippe Aumasson
> > > On Fri, Jan 6, 2017 at 9:11 PM Jason A. Donenfeld wrote: > > SipHash is a 64-bit keyed hash function that is actually a > cryptographically secure PRF, like HMAC. Except SipHash is super fast, > and is meant to be used as a hashtable keyed lookup function, or as a > general

Re: [PATCH net] amd-xgbe: Fix IRQ processing when running in single IRQ mode

2017-01-06 Thread David Miller
From: Tom Lendacky Date: Wed, 4 Jan 2017 15:07:16 -0600 > When running in single IRQ mode, the additional IRQ routines were being > skipped because only the XGMAC interrupt status was being checked. > Update the code so that the additional IRQ routines are checked

Re: [PATCH] sh_eth: fix EESIPR values for SH77{34|63}

2017-01-06 Thread David Miller
From: Sergei Shtylyov Date: Wed, 04 Jan 2017 22:18:24 +0300 > As the SH77{34|63} manuals are freely available, I've checked the EESIPR > values written against the manuals, and they appeared to set the reserved > bits 11-15 (which should be 0 on write). Fix

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread David Miller
Please do not quote an entire large patch, just to make a small comment or annotation. This makes it so that every reader of your posting has to scroll down a lot just to see a small amount of new content. Simply edit down the quoted material to the actually required context, and then add the

[net-next v1 6/8] net: netcp: ale: update to support unknown vlan controls for NU switch

2017-01-06 Thread Murali Karicheri
In NU Ethernet switch used on some of the Keystone SoCs, there is separate UNKNOWNVLAN register for membership, unreg mcast flood, reg mcast flood and force untag egress bits in ALE. So control for these fields require different address offset, shift and size of field. As this ALE has the same

[net-next v1 3/8] net: netcp: store network statistics in 64 bits

2017-01-06 Thread Murali Karicheri
From: Michael Scherban Previously the network statistics were stored in 32 bit variable which can cause some stats to roll over after several minutes of high traffic. This implements 64 bit storage so larger numbers can be stored. Signed-off-by: Michael Scherban

Re: [RFC PATCH next] ipv6: do not send RTM_DELADDR for tentative addresses

2017-01-06 Thread David Miller
From: Mahesh Bandewar Date: Wed, 4 Jan 2017 15:01:01 -0800 > From: Mahesh Bandewar > > RTM_NEWADDR notification is sent when IFA_F_TENTATIVE is cleared from > the address. So if the address is added and deleted before DAD probes > completes, the

[net-next v1 1/8] net: netcp: extract eflag from desc for rx_hook handling

2017-01-06 Thread Murali Karicheri
Extract the eflag bits from the received desc and pass it down the rx_hook chain to be available for netcp modules. Also the psdata and epib data has to be inspected by the netcp modules. So the desc can be freed only after returning from the rx_hook. So move knav_pool_desc_put() after the rx_hook

[net-next v1 5/8] net: netcp: use hw capability to remove FCS word from rx packets

2017-01-06 Thread Murali Karicheri
Some of the newer Ethernet switch hw (such as that on k2e/l/g) can strip the Etherenet FCS from packet at the port 0 egress of the switch. So use this capability instead of doing it in software. Signed-off-by: Murali Karicheri Signed-off-by: Sekhar Nori ---

Re: [PATCH net-next v2] net: dsa: b53: Utilize common helpers for u64/MAC

2017-01-06 Thread David Miller
From: Florian Fainelli Date: Thu, 5 Jan 2017 11:08:58 -0800 > Utilize the two functions recently introduced: u64_to_ether() and > ether_to_u64() instead of our own versions. > > Reviewed-by: Andrew Lunn > Signed-off-by: Florian Fainelli

Re: [net-next PATCH v2 5/6] i40e: Add TX and RX support in switchdev mode.

2017-01-06 Thread Jakub Kicinski
On Fri, 6 Jan 2017 18:30:35 +0100, Jiri Pirko wrote: > >> > +skb_dst_drop(skb); > >> > +dst_hold(>vfpr_dst->dst); > >> > +skb_dst_set(skb, >vfpr_dst->dst); > >> > +skb->dev = vsi->netdev; > >> This dst dance seems a bit odd to me. Why don't you just call > >>

[net-next v1 0/8] netcp: enhancements and minor fixes

2017-01-06 Thread Murali Karicheri
This series is for net-next. This propagates enhancements and minor bug fixes from internal version of the driver to keep the upstream in sync. Please review and apply if this looks good. Tested on all of K2HK/E/L boards with nfs rootfs. Test logs below K2HK-EVM:

Re: [PATCH] net: phy: dp83867: fix irq generation

2017-01-06 Thread David Miller
From: Grygorii Strashko Date: Thu, 5 Jan 2017 14:48:07 -0600 > For proper IRQ generation by DP83867 phy the INT/PWDN pin has to be > programmed as an interrupt output instead of a Powerdown input in > Configuration Register 3 (CFG3), Address 0x001E, bit 7 INT_OE = 1.

Re: [PATCH v4] rfkill: Add rfkill-any LED trigger

2017-01-06 Thread Michał Kępień
> On Fri, 2017-01-06 at 07:07 +0100, Michał Kępień wrote: > > Add a new "global" (i.e. not per-rfkill device) LED trigger, rfkill- > > any, > > which may be useful on laptops with a single "radio LED" and multiple > > radio transmitters.  The trigger is meant to turn a LED on whenever > > there is

Re: [PATCH net] net: Fix inconsistent rtnl_lock usage on dev_get_stats().

2017-01-06 Thread Michael Chan
On Fri, Jan 6, 2017 at 10:01 AM, David Miller wrote: > From: Eric Dumazet > Date: Fri, 06 Jan 2017 09:32:56 -0800 > >> This makes no sense to me. >> >> RTNL is absolutely not needed to get device stats. >> >> We try to not add RTNL, especially when

[PATCH net] be2net: fix accesses to unicast list

2017-01-06 Thread Ivan Vecera
Commit 988d44b "be2net: Avoid redundant addition of mac address in HW" introduced be_dev_mac_add & be_uc_mac_add helpers that incorrectly access adapter->uc_list as an array of bytes instead of an array of be_eth_addr. Consequently NIC is not filled with valid data so unicast filtering is broken.

[PATCH v2 4/7] net: ethernet: ti: cpdma: use devm_ioremap

2017-01-06 Thread Grygorii Strashko
Use devm_ioremap() and simplify the code. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/davinci_cpdma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c

[PATCH v2 0/7] net: ethernet: ti: cpsw: support placing CPDMA descriptors into DDR

2017-01-06 Thread Grygorii Strashko
This series intended to add support for placing CPDMA descriptors into DDR by introducing new module parameter "descs_pool_size" to specify size of descriptor's pool. The "descs_pool_size" defines total number of CPDMA CPPI descriptors to be used for both ingress/egress packets processing. If not

[PATCH v2 2/7] net: ethernet: ti: cpdma: fix desc re-queuing

2017-01-06 Thread Grygorii Strashko
The currently processing cpdma descriptor with EOQ flag set may contain two values in Next Descriptor Pointer field: - valid pointer: means CPDMA missed addition of new desc in queue; - null: no more descriptors in queue. In the later case, it's not required to write to HDP register, but now CPDMA

[net-next v1 8/8] net: netcp: ale: add proper ale entry mask bits for netcp switch ALE

2017-01-06 Thread Murali Karicheri
For NetCP NU Switch ALE, some of the mask bits are different than defaults used in the driver. Add a new macro DEFINE_ALE_FIELD1 that use a configurable mask bits and use it in the driver. These bits are set to correct values by using the new variables added to cpsw_ale structure and re-used in

[net-next v1 7/8] net: netcp: ale: use ale_status to size the ale table

2017-01-06 Thread Murali Karicheri
ALE h/w on newer version of NetCP (K2E/L/G) does provide a ALE_STATUS register for the size of the ALE Table implemented in h/w. Currently for example we set ALE Table size to 1024 for NetCP ALE on K2E even though the ALE Status/Documentation shows it has 8192 entries. So take advantage of this

[net-next v1 2/8] net: netcp: remove the redundant memmov()

2017-01-06 Thread Murali Karicheri
The psdata is populated with command data by netcp modules to the tail of the buffer and set_words() copy the same to the front of the psdata. So remove the redundant memmov function call. Signed-off-by: Murali Karicheri --- drivers/net/ethernet/ti/netcp_core.c | 6 +++---

[net-next v1 4/8] net: netcp: ethss: get phy-handle only if link interface is MAC-to-PHY

2017-01-06 Thread Murali Karicheri
Currently to parse phy-handle, driver doesn't check if the interface is MAC to PHY. This patch add this check for all MAC to PHY interface types supported by the driver. Signed-off-by: Murali Karicheri Signed-off-by: Sekhar Nori ---

Re: [PATCH V4 net-next 3/3] tun: rx batching

2017-01-06 Thread Michael S. Tsirkin
On Fri, Jan 06, 2017 at 10:13:17AM +0800, Jason Wang wrote: > We can only process 1 packet at one time during sendmsg(). This often > lead bad cache utilization under heavy load. So this patch tries to do > some batching during rx before submitting them to host network > stack. This is done

Re: [PATCH net-next] liquidio VF: fix incorrect struct being used

2017-01-06 Thread David Miller
From: Felix Manlunas Date: Wed, 4 Jan 2017 11:31:55 -0800 > From: Prasad Kanneganti > > The VF driver is using the wrong struct when sending commands to the NIC > firmware, sometimes causing adverse effects in the firmware. The right >

Re: [PATCH net-next] net: dsa: remove version string

2017-01-06 Thread David Miller
From: Vivien Didelot Date: Thu, 5 Jan 2017 12:28:41 -0500 > The dsa_driver_version string is irrelevant and has not been bumped > since its introduction about 9 years ago. Kill it. > > Signed-off-by: Vivien Didelot

Re: [PATCH v1 1/2] bpf: add a longest prefix match trie map implementation

2017-01-06 Thread Alexei Starovoitov
On 1/6/17 2:43 AM, Daniel Borkmann wrote: On 01/05/2017 09:14 PM, Daniel Mack wrote: [...] In my use case, the actual value of a node is in fact ignored, all that matters is whether a node exists in a trie or not. The test code uses u64 for its tests. I can change it around so that the value

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread Jason A. Donenfeld
Will resubmit. Sorry. I had this in earlier series and dropped it in this one. Apologies. Give me 30 minutes and you'll have a beautiful and conformant patch series.

Re: [PATCH] sh_eth: R8A7740 supports packet shecksumming

2017-01-06 Thread David Miller
From: Sergei Shtylyov Date: Thu, 5 Jan 2017 12:33:21 +0300 >Oops, typo in the subject, "shecksumming". David, should I resend? I accidently pushed this out without fixing the typo, sorry about that but that's going to be how it is I'm afraid :-)

Re: [PATCH] sh_eth: R8A7740 supports packet shecksumming

2017-01-06 Thread David Miller
From: Sergei Shtylyov Date: Thu, 05 Jan 2017 00:29:32 +0300 > The R8A7740 GEther controller supports the packet checksum offloading > but the 'hw_crc' (bad name, I'll fix it) flag isn't set in the R8A7740 > data, thus CSMR isn't cleared... > > Fixes:

  1   2   3   >