Re: [BUG] skge: a possible sleep-in-atomic bug in skge_remove

2017-12-12 Thread Jia-Ju Bai
On 2017/12/13 13:18, Stephen Hemminger wrote: On Tue, 12 Dec 2017 20:57:01 -0500 (EST) David Miller wrote: From: Stephen Hemminger Date: Tue, 12 Dec 2017 10:22:40 -0800 On Tue, 12 Dec 2017 08:34:45 -0500 (EST) David Miller

[PATCH net-next] bpf/tracing: fix kernel/events/core.c compilation error

2017-12-12 Thread Yonghong Song
Commit f371b304f12e ("bpf/tracing: allow user space to query prog array on the same tp") introduced a perf ioctl command to query prog array attached to the same perf tracepoint. The commit introduced a compilation error when either CONFIG_BPF_SYSCALL or CONFIG_EVENT_TRACING is not defined:

Re: general protection fault in page_mapping

2017-12-12 Thread Vlastimil Babka
On 12/12/2017 06:03 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 82bcf1def3b5f1251177ad47c44f7e17af039b4b > git://git.cmpxchg.org/linux-mmots.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is attached. > C reproducer is

Re: [RFC PATCH 5/9] ethtool: implement GET_DRVINFO message

2017-12-12 Thread Jiri Pirko
Wed, Dec 13, 2017 at 12:54:39AM CET, mkube...@suse.cz wrote: >On Mon, Dec 11, 2017 at 05:16:01PM +0100, Jiri Pirko wrote: >> Mon, Dec 11, 2017 at 02:54:01PM CET, mkube...@suse.cz wrote: >> >+ >> >+ETHA_DRVINFO_DRIVER(string)driver name >> >+ETHA_DRVINFO_VERSION

selftests: net: config: need extra kernel config fragments ?

2017-12-12 Thread Naresh Kamboju
Hi, I am planning to update selftests/net/config. Before submitting a patch upstream i would like to get your opinion, Test cases added to selftests/net - do "reuseport_bpf_numa.c" need CONFIG_NUMA=y ? - do "reuseport_bpf_cpu.c" need CONFIG_USE_PERCPU_NUMA_NODE_ID=y ? Thank you in advance.

Re: [PATCH v5 1/3] clocksource/drivers/atcpit100: Add andestech atcpit100 timer

2017-12-12 Thread Greentime Hu
Hi, Daniel: 2017-12-12 18:05 GMT+08:00 Daniel Lezcano : > On 12/12/2017 06:46, Rick Chen wrote: >> ATCPIT100 is often used on the Andes architecture, >> This timer provide 4 PIT channels. Each PIT channel is a >> multi-function timer, can be configured as 32,16,8 bit

Re: [PATCH ipsec net] xfrm: put policies when reusing pcpu xdst entry

2017-12-12 Thread Steffen Klassert
On Mon, Dec 11, 2017 at 06:23:09PM +0100, Florian Westphal wrote: > We need to put the policies when re-using the pcpu xdst entry, else > this leaks the reference. > > Fixes: ec30d78c14a813db39a647b6a348b428 ("xfrm: add xdst pcpu cache") > Signed-off-by: Florian Westphal

Re: [Intel-wired-lan] [PATCH v2 next-queue 08/10] ixgbe: process the Tx ipsec offload

2017-12-12 Thread Shannon Nelson
On 12/12/2017 5:59 PM, Alexander Duyck wrote: On Tue, Dec 12, 2017 at 3:37 PM, Shannon Nelson wrote: If the skb has a security association referenced in the skb, then set up the Tx descriptor with the ipsec offload bits. While we're here, we fix an oddly named field

Re: [PATCH v3 09/33] nds32: Cache and TLB routines

2017-12-12 Thread Greentime Hu
2017-12-13 10:16 GMT+08:00 Guo Ren : > On Fri, Dec 08, 2017 at 05:11:52PM +0800, Greentime Hu wrote: >> From: Greentime Hu > [...] >> diff --git a/arch/nds32/mm/cacheflush.c b/arch/nds32/mm/cacheflush.c > [...] >> +#ifndef CONFIG_CPU_CACHE_ALIASING >>

Re: [BUG] skge: a possible sleep-in-atomic bug in skge_remove

2017-12-12 Thread Stephen Hemminger
On Tue, 12 Dec 2017 20:57:01 -0500 (EST) David Miller wrote: > From: Stephen Hemminger > Date: Tue, 12 Dec 2017 10:22:40 -0800 > > > On Tue, 12 Dec 2017 08:34:45 -0500 (EST) > > David Miller wrote: > > > >> From: Jia-Ju

Re: KASAN: stack-out-of-bounds Read in xfrm_state_find (3)

2017-12-12 Thread Steffen Klassert
On Tue, Dec 12, 2017 at 01:00:31PM -0800, Eric Biggers wrote: > Hi Steffen, > > On Fri, Dec 01, 2017 at 08:27:43AM +0100, Steffen Klassert wrote: > > On Wed, Nov 22, 2017 at 08:05:00AM -0800, syzbot wrote: > > > syzkaller has found reproducer for the following crash on > > >

[PATCH] ethtool: fix MFLCN register dump for 82599 and newer

2017-12-12 Thread tjbroadroad
From: Broadroad Use MFLCN for 82599 and X540 HW instead of FCTRL. Signed-off-by: Zhang Kang Signed-off-by: Gao Wayne Signed-off-by: Wei Net --- ixgbe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH net] dwc-xlgmac: Add co-maintainer

2017-12-12 Thread Jie Deng
Jose Abreu will join to maintain dwc-xlgmac. He will help with new feature development for this driver. Thanks Jose and welcome on board! Signed-off-by: Jie Deng --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[PATCH v2 net-next 0/3] add VLAN support to DSA MT7530

2017-12-12 Thread sean.wang
From: Sean Wang Changes since v1: - fix up the typo - prefer ordering declarations longest to shortest - update that vlan_prepare callback should not change any state - use lower case letter for function naming The patchset extends DSA MT7530 to VLAN support through

[PATCH v2 net-next 2/3] net: dsa: mediatek: combine MediaTek tag with VLAN tag

2017-12-12 Thread sean.wang
From: Sean Wang In order to let MT7530 switch can recognize well those egress packets having both special tag and VLAN tag, the information about the special tag should be carried on the existing VLAN tag. On the other hand, it's unnecessary for extra handling for ingress

[PATCH v2 net-next 3/3] net: dsa: mediatek: update MAINTAINERS entry with MediaTek switch driver

2017-12-12 Thread sean.wang
From: Sean Wang I work for MediaTek and maintain SoC targeting to home gateway and also will keep extending and testing the function from MediaTek switch. Signed-off-by: Sean Wang Reviewed-by: Andrew Lunn --- MAINTAINERS | 7

[PATCH v2 net-next 1/3] net: dsa: mediatek: add VLAN support for MT7530

2017-12-12 Thread sean.wang
From: Sean Wang MT7530 can treat each port as either VLAN-unaware port or VLAN-aware port through the implementation of port matrix mode or port security mode on the ingress port, respectively. On one hand, Each port has been acting as the VLAN-unaware one whenever the

[BUG] renesas/ravb: two possible sleep-in-atomic bugs in ravb_set_link_ksettings and ravb_nway_reset

2017-12-12 Thread Jia-Ju Bai
Accoring to drivers/net/ethernet/renesas/ravb_main.c, the driver may sleep under a spinlock. The function call paths are: ravb_set_link_ksettings (acquire the spinlock) phy_ethtool_ksettings_set phy_start_aneg phy_start_aneg_priv mutex_lock --> may sleep ravb_nway_reset

[BUG] renesas/sh_eth: two possible sleep-in-atomic bugs in sh_eth_set_link_ksettings and sh_eth_nway_reset

2017-12-12 Thread Jia-Ju Bai
Accoring to drivers/net/ethernet/renesas/sh_eth.c, the driver may sleep under a spinlock. The function call paths are: sh_eth_set_link_ksettings (acquire the spinlock) phy_ethtool_ksettings_set phy_start_aneg phy_start_aneg_priv mutex_lock --> may sleep sh_eth_nway_reset

[BUG] b44: two possible sleep-in-atomic bugs in b44_set_link_ksettings and b44_ioctl

2017-12-12 Thread Jia-Ju Bai
The driver may sleep under a spinlock. The function call paths are: b44_set_link_ksettings (acquire the spinlock) phy_ethtool_ksettings_set phy_start_aneg phy_start_aneg_priv mutex_lock --> may sleep b44_ioctl (acquire the spinlock) phy_mii_ioctl mdiobus_read

Re: [BUG] skge: a possible sleep-in-atomic bug in skge_remove

2017-12-12 Thread David Miller
From: Stephen Hemminger Date: Tue, 12 Dec 2017 10:22:40 -0800 > On Tue, 12 Dec 2017 08:34:45 -0500 (EST) > David Miller wrote: > >> From: Jia-Ju Bai >> Date: Tue, 12 Dec 2017 16:38:12 +0800 >> >> > According to

Re: [RFC][PATCH] new byteorder primitives - ..._{replace,get}_bits()

2017-12-12 Thread Jakub Kicinski
On Wed, 13 Dec 2017 01:51:25 +, Al Viro wrote: > On Tue, Dec 12, 2017 at 05:35:28PM -0800, Jakub Kicinski wrote: > > > It used to be __always_inline, but apparently LLVM/clang doesn't > > propagate constants :( > > > > 4e59532541c8 ("nfp: don't depend on compiler constant propagation") >

Re: [PATCH net] tcp: refresh tcp_mstamp from timers callbacks

2017-12-12 Thread Soheil Hassas Yeganeh
On Tue, Dec 12, 2017 at 9:26 PM, Neal Cardwell wrote: > On Tue, Dec 12, 2017 at 9:22 PM, Eric Dumazet wrote: >> From: Eric Dumazet >> >> Only the retransmit timer currently refreshes tcp_mstamp >> >> We should do the same for

[PATCH AUTOSEL for 4.9 057/100] net: ipconfig: fix ic_close_devs() use-after-free

2017-12-12 Thread alexander . levin
From: Mark Rutland [ Upstream commit ffefb6f4d6ad699a2b5484241bc46745a53235d0 ] Our chosen ic_dev may be anywhere in our list of ic_devs, and we may free it before attempting to close others. When we compare d->dev and ic_dev->dev, we're potentially dereferencing memory

Re: [Intel-wired-lan] [PATCH v2 next-queue 08/10] ixgbe: process the Tx ipsec offload

2017-12-12 Thread Alexander Duyck
On Tue, Dec 12, 2017 at 3:37 PM, Shannon Nelson wrote: > If the skb has a security association referenced in the skb, then > set up the Tx descriptor with the ipsec offload bits. While we're > here, we fix an oddly named field in the context descriptor struct. > >

Re: [PATCH net] tcp: refresh tcp_mstamp from timers callbacks

2017-12-12 Thread Neal Cardwell
On Tue, Dec 12, 2017 at 9:22 PM, Eric Dumazet wrote: > From: Eric Dumazet > > Only the retransmit timer currently refreshes tcp_mstamp > > We should do the same for delayed acks and keepalives. > > Even if RFC 7323 does not request it, this is

[PATCH v4 iproute2 net-next] gre6: add collect metadata support

2017-12-12 Thread William Tu
The patch adds 'external' option to support collect metadata gre6 tunnel. The 'external' keyword is already used to set the device into collect metadata mode such as vxlan, geneve, ipip, etc. This patch extends support for ipv6 gre and gretap. Example of L3 and L2 gre device: bash:~# ip link add

[PATCH net] tcp: refresh tcp_mstamp from timers callbacks

2017-12-12 Thread Eric Dumazet
From: Eric Dumazet Only the retransmit timer currently refreshes tcp_mstamp We should do the same for delayed acks and keepalives. Even if RFC 7323 does not request it, this is consistent to what linux did in the past, when TS values were based on jiffies. Fixes:

RE: [PATCH net-next v5 0/4] net: fec: fix refclk enable for SMSC LAN8710/20

2017-12-12 Thread Andy Duan
From: Richard Leitner Sent: Monday, December 11, 2017 8:17 PM >This patch series fixes the use of the SMSC LAN8710/20 with a Freescale ETH >when the refclk is generated by the FSL. > >This patchset depends on the "phylib: Add device reset GPIO support" patch >submitted by Geert

Re: [PATCH v3 09/33] nds32: Cache and TLB routines

2017-12-12 Thread Guo Ren
On Fri, Dec 08, 2017 at 05:11:52PM +0800, Greentime Hu wrote: > From: Greentime Hu [...] > diff --git a/arch/nds32/mm/cacheflush.c b/arch/nds32/mm/cacheflush.c [...] > +#ifndef CONFIG_CPU_CACHE_ALIASING > +void update_mmu_cache(struct vm_area_struct *vma, unsigned long

Re: [RFC][PATCH] new byteorder primitives - ..._{replace,get}_bits()

2017-12-12 Thread Al Viro
On Tue, Dec 12, 2017 at 05:35:28PM -0800, Jakub Kicinski wrote: > It used to be __always_inline, but apparently LLVM/clang doesn't > propagate constants :( > > 4e59532541c8 ("nfp: don't depend on compiler constant propagation") Doesn't propagate constants or doesn't have exact same set of

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

2017-12-12 Thread Alexei Starovoitov
: undefined reference to `bpf_event_query_prog_array' > > Caused by commit > > f371b304f12e ("bpf/tracing: allow user space to query prog array on the > same tp") > > CONFIG_BPF_SYSCALL is not set for this build. > > I have used the bpf-next tree from next-20171212 for t

Re: [PATCH v3 iproute2 net-next] gre6: add collect metadata support

2017-12-12 Thread William Tu
On Tue, Dec 12, 2017 at 5:40 PM, Stephen Hemminger wrote: > On Tue, 12 Dec 2017 17:07:23 -0800 > William Tu wrote: > >> +.RB external >> +- make this tunnel externally controlled (or not, which is the default). >> +This is also known as

Re: [PATCH v3 iproute2 net-next] gre6: add collect metadata support

2017-12-12 Thread Stephen Hemminger
On Tue, 12 Dec 2017 17:07:23 -0800 William Tu wrote: > +.RB external > +- make this tunnel externally controlled (or not, which is the default). > +This is also known as collect_metadata mode for tunnels. Much better. The man page still needs some work. The phrase "is also

Re: [RFC][PATCH] new byteorder primitives - ..._{replace,get}_bits()

2017-12-12 Thread Jakub Kicinski
On Wed, 13 Dec 2017 01:30:56 +, Al Viro wrote: > On Tue, Dec 12, 2017 at 05:04:37PM -0800, Jakub Kicinski wrote: > > On Wed, 13 Dec 2017 00:36:59 +, Al Viro wrote: > > > On Tue, Dec 12, 2017 at 03:59:33PM -0800, Jakub Kicinski wrote: > > > > > +static __always_inline __##type

linux-next: build failure after merge of the bpf-next tree

2017-12-12 Thread Stephen Rothwell
user space to query prog array on the same tp") CONFIG_BPF_SYSCALL is not set for this build. I have used the bpf-next tree from next-20171212 for today. -- Cheers, Stephen Rothwell

Re: [RFC][PATCH] new byteorder primitives - ..._{replace,get}_bits()

2017-12-12 Thread Al Viro
On Tue, Dec 12, 2017 at 05:04:37PM -0800, Jakub Kicinski wrote: > On Wed, 13 Dec 2017 00:36:59 +, Al Viro wrote: > > On Tue, Dec 12, 2017 at 03:59:33PM -0800, Jakub Kicinski wrote: > > > > +static __always_inline __##type type##_replace_bits(__##type old, > > > > \ > > > > +

[PATCH v3 iproute2 net-next] gre6: add collect metadata support

2017-12-12 Thread William Tu
The patch adds 'external' option to support collect metadata gre6 tunnel. The 'external' keyword is already used to set the device into collect metadata mode such as vxlan, geneve, ipip, etc. This patch extends support for ipv6 gre and gretap. Examples of L3 and L2 gre device: bash:~# ip link

Re: [RFC][PATCH] new byteorder primitives - ..._{replace,get}_bits()

2017-12-12 Thread Jakub Kicinski
On Wed, 13 Dec 2017 00:36:59 +, Al Viro wrote: > On Tue, Dec 12, 2017 at 03:59:33PM -0800, Jakub Kicinski wrote: > > > +static __always_inline __##type type##_replace_bits(__##type old, > > > \ > > > + base val, base mask)\ > > > +{

Re: [PATCH] drivers/staging/irda: fix max dup length for kstrndup

2017-12-12 Thread Ma Shimiao
On 12/13/2017 02:27 AM, Stephen Hemminger wrote: > On Tue, 12 Dec 2017 16:54:44 +0800 > Ma Shimiao wrote: > >> If source string longer than max, kstrndup will alloc max+1 space. >> So, we should make sure the result will not over limit. >> >> Signed-off-by: Ma

[PATCH v7 0/4] Prerequisites for Cavium OCTEON-III network driver.

2017-12-12 Thread David Daney
We want to add the Cavium OCTEON-III network driver. But since interacting with the input and output queues is done via special CPU local memory, we also need to add support to the MIPS/Octeon architecture code. Aren't SoCs nice in this way? These are the prerequisite patches that are needed

[PATCH net-next 5/6] hv_netvsc: remove open_cnt reference count

2017-12-12 Thread Stephen Hemminger
There is only ever a single instance of network device object referencing the internal rndis object. Therefore the open_cnt atomic is not necessary. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 2 -- drivers/net/hyperv/netvsc.c | 2 +-

[PATCH net-next 2/6] hv_netvsc: track memory allocation failures in ethtool stats

2017-12-12 Thread Stephen Hemminger
When skb can not be allocated, update ethtool statisitics rather than rx_dropped which is intended for netif_receive. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 1 + drivers/net/hyperv/netvsc_drv.c | 5 +++-- 2 files changed, 4 insertions(+),

[PATCH net-next 1/6] hv_netvsc: copy_to_send buf can be void

2017-12-12 Thread Stephen Hemminger
Since only caller does not care about return value. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c

[PATCH v7 4/4] MIPS: Octeon: Add a global resource manager.

2017-12-12 Thread David Daney
From: Carlos Munoz Add a global resource manager to manage tagged pointers within bootmem allocated memory. This is used by various functional blocks in the Octeon core like the FPA, Ethernet nexus, etc. Signed-off-by: Carlos Munoz Signed-off-by: Steven J.

[PATCH v7 2/4] MIPS: Octeon: Automatically provision CVMSEG space.

2017-12-12 Thread David Daney
Remove CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE and automatically calculate the amount of CVMSEG space needed. 1st 128-bytes: Use by IOBDMA 2nd 128-bytes: Reserved by kernel for scratch/TLS emulation. 3rd 128-bytes: OCTEON-III LMTLINE New config variable CONFIG_CAVIUM_OCTEON_EXTRA_CVMSEG provisions

[PATCH v7 1/4] MIPS: Octeon: Enable LMTDMA/LMTST operations.

2017-12-12 Thread David Daney
From: Carlos Munoz LMTDMA/LMTST operations move data between cores and I/O devices: * LMTST operations can send an address and a variable length (up to 128 bytes) of data to an I/O device. * LMTDMA operations can send an address and a variable length (up to 128) of data

[PATCH net-next 6/6] hv_netvsc: empty current transmit aggregation if flow blocked

2017-12-12 Thread Stephen Hemminger
If the transmit queue is known full, then don't keep aggregating data. And the cp_partial flag which indicates that the current aggregation buffer is full can be folded in to avoid more conditionals. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h

[PATCH v7 3/4] staging: octeon: Remove USE_ASYNC_IOBDMA macro.

2017-12-12 Thread David Daney
Previous patch sets USE_ASYNC_IOBDMA to 1 unconditionally. Remove USE_ASYNC_IOBDMA from all if statements. Remove dead code caused by the change. Acked-by: Greg Kroah-Hartman Signed-off-by: David Daney ---

[PATCH net-next 4/6] hv_netvsc: pass netvsc_device to receive callback

2017-12-12 Thread Stephen Hemminger
The netvsc_receive_callback function was using RCU to find the appropriate underlying netvsc_device. Since calling function already had that pointer, this was unnecessary. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 1 +

[PATCH net-next 0/6] hv_netvsc: minor changes

2017-12-12 Thread Stephen Hemminger
This includes minor cleanup of code in send and receive path and also a new statistic to check for allocation failures. This also eliminates some of the extra RCU when not needed. There is a theoritical bug where buffered data could be blocked for longer than necessary if the ring buffer got

[PATCH net-next 3/6] hv_netvsc: simplify function args in receive status path

2017-12-12 Thread Stephen Hemminger
The caller (netvsc_receive) already has the net device pointer, and should just pass that to functions rather than the hyperv device. This eliminates several impossible error paths in the process. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h |

Re: [RFC][PATCH] new byteorder primitives - ..._{replace,get}_bits()

2017-12-12 Thread Al Viro
On Tue, Dec 12, 2017 at 03:59:33PM -0800, Jakub Kicinski wrote: > > +static __always_inline __##type type##_replace_bits(__##type old, \ > > + base val, base mask)\ > > +{ \ > > +

[PATCH 1/2] dt-bindings: net: add TI CC2560 Bluetooth chip

2017-12-12 Thread David Lechner
This adds a compatible string for the Texas Instruments CC2560 Bluetooth chip to the existing TI WiLink shared transport bindings. These chips are similar enough that the same bindings work for both. The file is renamed to ti-bluetooth.txt to make it more generic. Signed-off-by: David Lechner

[PATCH 0/2] Bluetooth: Add device tree compatible for TI CC2560

2017-12-12 Thread David Lechner
This series updates the bindings TI WiLink 7/8 Bluetooth to add TI CC256x chips as well. A compatible string is also added to the hci_ll driver for TI CC2560. David Lechner (2): dt-bindings: net: add TI CC2560 Bluetooth chip Bluetooth: hci_ll: add "ti,cc2560" compatible string

[PATCH 2/2] Bluetooth: hci_ll: add "ti,cc2560" compatible string

2017-12-12 Thread David Lechner
This adds the "ti,cc2560" compatible string for a TI CC2560 chip. Signed-off-by: David Lechner --- drivers/bluetooth/hci_ll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c index 9de106f..1b4417a 100644 ---

[PATCH net] tcp: fix potential underestimation on rcv_rtt

2017-12-12 Thread Wei Wang
From: Wei Wang When ms timestamp is used, current logic uses 1us in tcp_rcv_rtt_update() when the real rcv_rtt is within 1 - 999us. This could cause rcv_rtt underestimation. Fix it by always using a min value of 1ms if ms timestamp is used. Fixes: 645f4c6f2ebd ("tcp: switch

[PATCH net-next v2 1/5] net: phy: phylink: Allow specifying PHY device flags

2017-12-12 Thread Florian Fainelli
In order to let subsystems like DSA fully utilize PHYLINK, we need to be able to communicate phy_device::flags from of_phy_{connect,attach} even when using PHYLINK APIs. Signed-off-by: Florian Fainelli --- drivers/net/phy/phylink.c | 7 +-- include/linux/phylink.h |

[PATCH net-next v2 4/5] net: phy: phylink: Allow setting a custom link state callback

2017-12-12 Thread Florian Fainelli
phylink_get_fixed_state() currently consults an optional "link_gpio" GPIO descriptor, expand this mechanism to allow specifying a custom callback. This is necessary to support out of band link notifcation (e.g: from an interrupt within a MMIO register). Signed-off-by: Florian Fainelli

Re: [RFC][PATCH] new byteorder primitives - ..._{replace,get}_bits()

2017-12-12 Thread Jakub Kicinski
On Tue, 12 Dec 2017 23:48:56 +, Al Viro wrote: > On Tue, Dec 12, 2017 at 12:04:09PM -0800, Jakub Kicinski wrote: > > > > static __always_inline u64 mask_to_multiplier(u64 mask) > > > { > > > return mask & (mask ^ (mask - 1)); > > > } > > D'oh. Even simpler than that, of course - > >

[PATCH net-next v2 5/5] net: phy: phylink: Report MoCA as PORT_BNC

2017-12-12 Thread Florian Fainelli
Similarly to what PHYLIB already does, make sure that PHY_INTERFACE_MODE_MOCA is reported as PORT_BNC. Signed-off-by: Florian Fainelli --- drivers/net/phy/phylink.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/phylink.c

[PATCH net-next v2 0/5] PHYLINK preparatory patches for DSA

2017-12-12 Thread Florian Fainelli
Hi all, In preparation for having DSA migrate to PHYLINK, I had to come up with a number of preparatory patches: - we need to be able to pass phy_flags from an external component calling phylink_of_phy_connect() - DSA tries to connect through OF first, then fallsback using its own internal

[PATCH net-next v2 3/5] net: phy: phylink: Remove error message

2017-12-12 Thread Florian Fainelli
Some subsystems like DSA may be trying to connect to a PHY through OF first, and then attempt a connect using a local MDIO bus, remove the error message: "unable to find PHY node" so we can let MAC drivers whether to print it or not. Signed-off-by: Florian Fainelli ---

[PATCH net-next v2 2/5] net: phy: phylink: Use PHY device interface if N/A

2017-12-12 Thread Florian Fainelli
We may not always be able to resolve a correct phy_interface_t value before actually connecting to the PHY device, when that happens, just have phylink_connect_phy() utilize what the PHY device/driver provided. Signed-off-by: Florian Fainelli --- drivers/net/phy/phylink.c

Re: [RFC PATCH 2/9] ethtool: introduce ethtool netlink interface

2017-12-12 Thread Michal Kubecek
On Mon, Dec 11, 2017 at 01:45:47PM -0500, David Miller wrote: > From: Jiri Pirko > Date: Mon, 11 Dec 2017 19:02:19 +0100 > > > The discussion we had before was about flag bitfield that was there > > *always*. In this case, that is not true. It is either ifindex or > > ifname.

Re: [RFC PATCH 5/9] ethtool: implement GET_DRVINFO message

2017-12-12 Thread Michal Kubecek
On Mon, Dec 11, 2017 at 05:16:01PM +0100, Jiri Pirko wrote: > Mon, Dec 11, 2017 at 02:54:01PM CET, mkube...@suse.cz wrote: > >+ > >+ETHA_DRVINFO_DRIVER (string)driver name > >+ETHA_DRVINFO_VERSION(string)driver version > > You use 3 prefixes: > ETHTOOL_ for

Re: [RFC][PATCH] new byteorder primitives - ..._{replace,get}_bits()

2017-12-12 Thread Al Viro
On Tue, Dec 12, 2017 at 12:04:09PM -0800, Jakub Kicinski wrote: > > static __always_inline u64 mask_to_multiplier(u64 mask) > > { > > return mask & (mask ^ (mask - 1)); > > } D'oh. Even simpler than that, of course - static __always_inline u64 mask_to_multiplier(u64 mask) { return

Re: [RFC PATCH 0/9] ethtool netlink interface (WiP)

2017-12-12 Thread Jakub Kicinski
On Tue, 12 Dec 2017 07:32:44 -0800, Roopa Prabhu wrote: > Thanks for working on this!. Agree with most comments already > discussed on this thread. > I would prefer if we fold ethtool netlink into devlink since there is > already an overlap. > many reasons: > - have just one driver api for device

[PATCH v2 next-queue 04/10] ixgbe: add ipsec data structures

2017-12-12 Thread Shannon Nelson
Set up the data structures to be used by the ipsec offload. Signed-off-by: Shannon Nelson --- v2: ipaddr[] becomes __be32 increase the hash table size drivers/net/ethernet/intel/ixgbe/ixgbe.h | 5 drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.h | 40

[PATCH v2 next-queue 05/10] ixgbe: add ipsec offload add and remove SA

2017-12-12 Thread Shannon Nelson
Add the functions for setting up and removing offloaded SAs (Security Associations) with the x540 hardware. We set up the callback structure but we don't yet set the hardware feature bit to be sure the XFRM service won't actually try to use us for an offload yet. The software tables are made up

[PATCH v2 next-queue 08/10] ixgbe: process the Tx ipsec offload

2017-12-12 Thread Shannon Nelson
If the skb has a security association referenced in the skb, then set up the Tx descriptor with the ipsec offload bits. While we're here, we fix an oddly named field in the context descriptor struct. Signed-off-by: Shannon Nelson --- v2: use ihl != 5 move the

[PATCH v2 next-queue 03/10] ixgbe: add ipsec engine start and stop routines

2017-12-12 Thread Shannon Nelson
Add in the code for running and stopping the hardware ipsec encryption/decryption engine. It is good to keep the engine off when not in use in order to save on the power draw. Signed-off-by: Shannon Nelson --- v2: add limiter to do-while loop waiting for paths to

[PATCH v2 next-queue 09/10] ixgbe: ipsec offload stats

2017-12-12 Thread Shannon Nelson
Add a simple statistic to count the ipsec offloads. Signed-off-by: Shannon Nelson --- v2: change per ring counter to adapter rx and tx counters move tx_ipsec count to the tx clean code drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 ++

[PATCH v2 next-queue 10/10] ixgbe: register ipsec offload with the xfrm subsystem

2017-12-12 Thread Shannon Nelson
With all the support code in place we can now link in the ipsec offload operations and set the ESP feature flag for the XFRM subsystem to see. Signed-off-by: Shannon Nelson --- v2: added the xdo_dev_state_free callback to make XFRM happy changed use of

[PATCH v2 next-queue 06/10] ixgbe: restore offloaded SAs after a reset

2017-12-12 Thread Shannon Nelson
On a chip reset most of the table contents are lost, so must be restored. This scans the driver's ipsec tables and restores both the filled and empty table slots to their pre-reset values. Signed-off-by: Shannon Nelson --- v2: during restore, clean the tables before

[PATCH v2 next-queue 01/10] ixgbe: clean up ipsec defines

2017-12-12 Thread Shannon Nelson
Clean up the ipsec/macsec descriptor bit definitions to match the rest of the defines and file organization. Also recognise the bit-definition overlap in the error mask macro. Signed-off-by: Shannon Nelson --- v2: no changes

[PATCH v2 next-queue 02/10] ixgbe: add ipsec register access routines

2017-12-12 Thread Shannon Nelson
Add a few routines to make access to the ipsec registers just a little easier, and throw in the beginnings of an initialization. Signed-off-by: Shannon Nelson --- v2: Rx table selector becomes an enum with a shift Combine the clear table loops into one Name the

[PATCH v2 next-queue 07/10] ixgbe: process the Rx ipsec offload

2017-12-12 Thread Shannon Nelson
If the chip sees and decrypts an ipsec offload, set up the skb sp pointer with the ralated SA info. Since the chip is rude enough to keep to itself the table index it used for the decryption, we have to do our own table lookup, using the hash for speed. Signed-off-by: Shannon Nelson

[PATCH v2 next-queue 00/10] ixgbe: Add ipsec offload

2017-12-12 Thread Shannon Nelson
This is an implementation of the ipsec hardware offload feature for the ixgbe driver and Intel's 10Gbe series NICs: x540, x550, 82599. These patches apply to net-next v4.14 as well as Jeff Kirsher's next-queue v4.15-rc1-206-ge47375b. The ixgbe NICs support ipsec offload for 1024 Rx and 1024 Tx

Re: [PATCH net] bpf: add schedule points to map alloc/free

2017-12-12 Thread Alexei Starovoitov
On Tue, Dec 12, 2017 at 02:22:39PM -0800, Eric Dumazet wrote: > From: Eric Dumazet > > While using large percpu maps, htab_map_alloc() can hold > cpu for hundreds of ms. > > This patch adds cond_resched() calls to percpu alloc/free > call sites, all running in process

Re: [PATCH v9 0/5] Add the ability to do BPF directed error injection

2017-12-12 Thread Darrick J. Wong
On Mon, Dec 11, 2017 at 11:36:45AM -0500, Josef Bacik wrote: > This is the same as v8, just rebased onto the bpf tree. > > v8->v9: > - rebased onto the bpf tree. > > v7->v8: > - removed the _ASM_KPROBE_ERROR_INJECT since it was not needed. > > v6->v7: > - moved the opt-in macro to bpf.h out of

thunderx sgmii interface hang

2017-12-12 Thread Tim Harvey
Greetings, We are experiencing an issue on a CN80XX with an SGMII interface coupled to a TI DP83867IS phy. We have the same PHY connected to the RGMII interface on the same board design and everything is working as expected on that nic both before and after triggering the hang. The nic appears

Re: [PATCH v3 0/3] Bluetooth: hci_ll: Get BD address from NVMEM

2017-12-12 Thread Marcel Holtmann
Hi David, > This series adds supporting getting the BD address from a NVMEM provider > for "LL" HCI controllers (Texas Instruments). > > v3 changes: > * Additional comments on why swapping bytes is needed. > * Fixed comment style and trailing whitespace. > * Rework error handling for nvmem cell

[PATCH] net: thunderx: add support for rgmii internal delay

2017-12-12 Thread Tim Harvey
The XCV_DLL_CTL is being configured with the assumption that phy-mode is rgmii-txid (PHY_INTERFACE_MODE_RGMII_TXID) which is not always the case. This patch parses the phy-mode property and uses it to configure CXV_DLL_CTL properly. Signed-off-by: Tim Harvey ---

Re: [PATCH] Fix handling of verdicts after NF_QUEUE

2017-12-12 Thread Pablo Neira Ayuso
On Tue, Dec 12, 2017 at 12:36:35AM +, Banerjee, Debabrata wrote: > > From: Pablo Neira Ayuso [mailto:pa...@netfilter.org] > > On Mon, Dec 11, 2017 at 06:30:24PM -0500, Debabrata Banerjee wrote: > > > + } else { > > > + /* Implicit handling for NF_STOLEN, as well as any other > > > +

Re: [PATCH V3 net-next 3/8] net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support

2017-12-12 Thread Philippe Ombredanne
Dear Salil, On Tue, Dec 12, 2017 at 6:52 PM, Salil Mehta wrote: > This patch adds the support of hardware compatibiltiy layer to the > HNS3 VF Driver. This layer implements various {set|get} operations > over MAC address for a virtual port, RSS related configuration, >

[PATCH iproute2] iplink: validate maximum gso_max_size

2017-12-12 Thread Solio Sarabia
Validate the upper limit for gso_max_size, valid range is [0-65,536] inclusive. Fix minor whitespace in iplink man page. Signed-off-by: Solio Sarabia --- ip/iplink.c | 3 ++- man/man8/ip-link.8.in | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff

Re: [PATCH 2/4] sctp: Add ip option support

2017-12-12 Thread Paul Moore
On Tue, Dec 12, 2017 at 4:56 PM, Marcelo Ricardo Leitner wrote: > On Tue, Dec 12, 2017 at 04:33:03PM -0500, Paul Moore wrote: >> On Tue, Dec 12, 2017 at 11:08 AM, Marcelo Ricardo Leitner >> wrote: >> > Hi Richard, >> > >> > On Mon, Nov 27,

[PATCH net] bpf: add schedule points to map alloc/free

2017-12-12 Thread Eric Dumazet
From: Eric Dumazet While using large percpu maps, htab_map_alloc() can hold cpu for hundreds of ms. This patch adds cond_resched() calls to percpu alloc/free call sites, all running in process context. Signed-off-by: Eric Dumazet ---  

Re: [net-next PATCH 14/14] net: sched: pfifo_fast use skb_array

2017-12-12 Thread Cong Wang
On Thu, Dec 7, 2017 at 9:58 AM, John Fastabend wrote: > This converts the pfifo_fast qdisc to use the skb_array data structure > and set the lockless qdisc bit. pfifo_fast is the first qdisc to support > the lockless bit that can be a child of a qdisc requiring locking.

[PATCH v3 0/3] Bluetooth: hci_ll: Get BD address from NVMEM

2017-12-12 Thread David Lechner
This series adds supporting getting the BD address from a NVMEM provider for "LL" HCI controllers (Texas Instruments). v3 changes: * Additional comments on why swapping bytes is needed. * Fixed comment style and trailing whitespace. * Rework error handling for nvmem cell code. v2 changes: *

Re: [PATCH] veth: Optionally pad packets to minimum Ethernet length

2017-12-12 Thread Stephen Hemminger
On Tue, 12 Dec 2017 11:00:38 -0800 Ed Swierk wrote: > On Tue, Dec 12, 2017 at 10:34 AM, Stephen Hemminger > wrote: > > Why not add to netdevsim rather than cluttering up a normal driver > > with test support. We just pulled a bunch of

[PATCH v3 2/3] dt-bindings: Add optional nvmem BD address bindings to ti,wlink-st

2017-12-12 Thread David Lechner
This adds optional nvmem consumer properties to the ti,wlink-st device tree bindings to allow specifying the BD address. Reviewed-by: Rob Herring Signed-off-by: David Lechner --- Documentation/devicetree/bindings/net/ti,wilink-st.txt | 5 + 1 file

[PATCH v3 1/3] Bluetooth: hci_ll: add support for setting public address

2017-12-12 Thread David Lechner
This adds support for setting the public address on Texas Instruments Bluetooth chips using a vendor-specific command. This has been tested on a CC2560A chip. The TI wiki also indicates that this command should work on TI WL17xx/WL18xx Bluetooth chips. During review, there was some question as

[PATCH] Bluetooth: hci_ll: Add optional nvmem BD address source

2017-12-12 Thread David Lechner
This adds an optional nvmem consumer to get a BD address from an external source. The BD address is then set in the Bluetooth chip after the firmware has been loaded. This has been tested working with a TI CC2560A chip (in a LEGO MINDSTORMS EV3). Signed-off-by: David Lechner

Re: [PATCH 2/4] sctp: Add ip option support

2017-12-12 Thread Marcelo Ricardo Leitner
On Tue, Dec 12, 2017 at 04:33:03PM -0500, Paul Moore wrote: > On Tue, Dec 12, 2017 at 11:08 AM, Marcelo Ricardo Leitner > wrote: > > Hi Richard, > > > > On Mon, Nov 27, 2017 at 07:31:21PM +, Richard Haines wrote: > > ... > >> --- a/net/sctp/socket.c > >> +++

[PATCH v2] [iproute] Show 'external' link mode in output

2017-12-12 Thread Phil Dibowitz
Recently `external` support was added to the tunnel drivers, but there is no way to introspect this from userspace. This adds support for that. Now `ip -details link` shows it: ``` 7: tunl60@NONE: mtu 1452 qdisc noop state DOWN mode DEFAULT group default qlen 1 link/tunnel6 :: brd ::

Re: [PATCH v3 net-next] net: ethernet: ti: cpdma: correct error handling for chan create

2017-12-12 Thread Grygorii Strashko
On 12/12/2017 03:06 PM, Ivan Khoronzhuk wrote: It's not correct to return NULL when that is actually an error and function returns errors in any other wrong case. In the same time, the cpsw driver and davinci emac doesn't check error case while creating channel and it can miss actual error.

Re: [PATCH 2/4] sctp: Add ip option support

2017-12-12 Thread Paul Moore
On Tue, Dec 12, 2017 at 11:08 AM, Marcelo Ricardo Leitner wrote: > Hi Richard, > > On Mon, Nov 27, 2017 at 07:31:21PM +, Richard Haines wrote: > ... >> --- a/net/sctp/socket.c >> +++ b/net/sctp/socket.c >> @@ -3123,8 +3123,10 @@ static int

Re: [REGRESSION][4.13.y][4.14.y][v4.15.y] net: reduce skb_warn_bad_offload() noise

2017-12-12 Thread Greg KH
On Tue, Dec 12, 2017 at 09:10:11AM -0500, David Miller wrote: > From: Willem de Bruijn > Date: Mon, 11 Dec 2017 16:56:56 -0500 > > > On Mon, Dec 11, 2017 at 4:44 PM, Greg Kroah-Hartman > > wrote: > >> On Mon, Dec 11, 2017 at

  1   2   3   >