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

2017-12-12 Thread Al Viro
On Tue, Dec 12, 2017 at 06:20:02AM +, Al Viro wrote: > Umm... What's wrong with > > #define FIELD_FOO 0,4 > #define FIELD_BAR 6,12 > #define FIELD_BAZ 18,14 > > A macro can bloody well expand to any sequence of tokens - le32_get_bits(v, > FIELD_BAZ) > will become le32_get_bits(v, 18, 14)

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

2017-12-12 Thread Jakub Kicinski
On Tue, 12 Dec 2017 19:45:32 +, Al Viro wrote: > On Tue, Dec 12, 2017 at 06:20:02AM +, Al Viro wrote: > > > Umm... What's wrong with > > > > #define FIELD_FOO 0,4 > > #define FIELD_BAR 6,12 > > #define FIELD_BAZ 18,14 > > > > A macro can bloody well expand to any sequence of tokens -

[PATCH iproute2] 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 iproute2] tc: bash-completion: add missing 'classid' keyword

2017-12-12 Thread Stephen Hemminger
On Tue, 12 Dec 2017 16:45:15 +0100 Davide Caratti wrote: > users of 'matchall' filter can specify a value for the class id: update > bash-completion accordingly. > > Fixes: b32c0b64fa2b ("tc: bash-completion: Add support for matchall") > Signed-off-by: Davide Caratti

Re: [PATCH iproute2 net-next v2 0/4] Abstract columns, properly space and wrap fields

2017-12-12 Thread Stephen Hemminger
On Tue, 12 Dec 2017 01:46:29 +0100 Stefano Brivio wrote: > Currently, 'ss' simply subdivides the whole available screen width > between available columns, starting from a set of hardcoded amount > of spacing and growing column widths. > > This makes the output unreadable in

[PATCH net-next] cxgb4: Add support for ethtool i2c dump

2017-12-12 Thread Ganesh Goudar
From: Arjun Vynipadath Adds support for ethtool get_module_info() and get_module_eeprom() callbacks that will dump necessary information for a SFP. Signed-off-by: Arjun Vynipadath Signed-off-by: Casey Leedom Signed-off-by: Ganesh

Re: [PATCH net-next v5 2/2] net: thunderx: add timestamping support

2017-12-12 Thread Joe Perches
On Mon, 2017-12-11 at 15:36 -0800, Richard Cochran wrote: > On Mon, Dec 11, 2017 at 05:14:31PM +0300, Aleksey Makarov wrote: > > @@ -880,6 +889,46 @@ static void nic_pause_frame(struct nicpf *nic, int vf, > > struct pfc *cfg) > > } > > } > > > > +/* Enable or disable HW timestamping by BGX

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

2017-12-12 Thread Rob Herring
On Thu, Dec 07, 2017 at 08:57:39PM -0600, David Lechner wrote: > This adds optional nvmem consumer properties to the ti,wlink-st device tree > bindings to allow specifying the BD address. > > Signed-off-by: David Lechner > --- > > v2 changes: > * Renamed "mac-address" to

Re: [PATCH v3 29/33] dt-bindings: nds32 CPU Bindings

2017-12-12 Thread Rob Herring
On Fri, Dec 08, 2017 at 05:12:12PM +0800, Greentime Hu wrote: > From: Greentime Hu > > This patch adds nds32 CPU binding documents. > > Signed-off-by: Vincent Chen > Signed-off-by: Rick Chen > Signed-off-by: Zong Li

[PATCH v3 1/3] Revert "ethtool: Add DMA Coalescing support"

2017-12-12 Thread Scott Branden
This reverts commit 5dd7bfbc5079cb375876e4e76191263fc28ae1a6. As Stephen Hemminger mentioned there is an ABI compatibility issue with this patch: https://patchwork.ozlabs.org/patch/806049/#1757846 Signed-off-by: Scott Branden --- ethtool-copy.h | 2 -- ethtool.8.in

[PATCH v3 0/3] ethtool: add ETHTOOL_RESET support via --reset command

2017-12-12 Thread Scott Branden
Patch series to add ETHTOOL_RESET support to ethtool userspace tool. Include: - revert custom change to ethtool-copy.h that is not in linux kernel - sync ethtool-copy.h with ethtool.h in linux kernel net-next - add ETHTOOL_RESET support with up to date ethtool.h reset defines Changes from v2: -

Re: [PATCHv2 1/3] dt-bindings: net: Add DT bindings for Socionext Netsec

2017-12-12 Thread Andrew Lunn
On Tue, Dec 12, 2017 at 10:45:21PM +0530, jassisinghb...@gmail.com wrote: > From: Jassi Brar > > This patch adds documentation for Device-Tree bindings for the > Socionext NetSec Controller driver. > > Signed-off-by: Ard Biesheuvel >

[PATCH net-next] net: avoid skb_warn_bad_offload on IS_ERR

2017-12-12 Thread Willem de Bruijn
From: Willem de Bruijn skb_warn_bad_offload warns when packets enter the GSO stack that require skb_checksum_help or vice versa. Do not warn on arbitrary bad packets. Packet sockets can craft many. Syzkaller was able to demonstrate another one with eth_type games. In

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

2017-12-12 Thread Ivan Khoronzhuk
On Tue, Dec 12, 2017 at 11:08:51AM -0600, Grygorii Strashko wrote: > > > On 12/12/2017 10:35 AM, 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

Re: [PATCH net-next v2] ip6_vti: adjust vti mtu according to mtu of output device

2017-12-12 Thread Shannon Nelson
On 12/12/2017 5:53 AM, Alexey Kodanev wrote: LTP/udp6_ipsec_vti tests fail when sending large UDP datagrams that require fragmentation and the underlying device has MTU <= 1500. This happens because ip6_vti sets mtu to ETH_DATA_LEN and not updating it depending on a destination address or link

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

2017-12-12 Thread Marcelo Ricardo Leitner
On Tue, Dec 12, 2017 at 11:32:46AM -0600, Dan Williams wrote: > On Tue, 2017-12-12 at 08:13 -0800, Ed Swierk wrote: > > Most physical Ethernet devices pad short packets to the minimum > > length > > of 64 bytes (including FCS) on transmit. It can be useful to simulate > > this behavior when

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

2017-12-12 Thread Ivan Khoronzhuk
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. Also remove WARNs duplicated dev_err msgs.

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

2017-12-12 Thread Dan Williams
On Tue, 2017-12-12 at 08:13 -0800, Ed Swierk wrote: > Most physical Ethernet devices pad short packets to the minimum > length > of 64 bytes (including FCS) on transmit. It can be useful to simulate > this behavior when debugging a problem that results from it (such as > incorrect L4 checksum

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

2017-12-12 Thread Salil Mehta
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, fetches the link status info from PF, does various VLAN related configuration over the virtual port,

[PATCH net-next] net: dsa: lan9303: Introduce lan9303_read_wait

2017-12-12 Thread Egil Hjelmeland
Simplify lan9303_indirect_phy_wait_for_completion() and lan9303_switch_wait_for_completion() by using a new function lan9303_read_wait() Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 59 +++--- 1 file changed,

[PATCH V3 net-next 5/8] net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC

2017-12-12 Thread Salil Mehta
Most of the NAPI handling interface, skb buffer management, management of the RX/TX descriptors, ethool interface etc. has quite a bit of code which is common to VF and PF driver. This patch makes the exisitng PF's HNS3 ENET driver as the common ENET driver for both Virtual & Physical Function.

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

2017-12-12 Thread Grygorii Strashko
On 12/12/2017 11:50 AM, Ivan Khoronzhuk wrote: On Tue, Dec 12, 2017 at 11:08:51AM -0600, Grygorii Strashko wrote: On 12/12/2017 10:35 AM, 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

Re: [PATCH net-next] net: bridge: use rhashtable for fdbs

2017-12-12 Thread Nikolay Aleksandrov
On 12/12/17 20:07, Stephen Hemminger wrote: > On Tue, 12 Dec 2017 16:02:50 +0200 > Nikolay Aleksandrov wrote: > >> Before this patch the bridge used a fixed 256 element hash table which >> was fine for small use cases (in my tests it starts to degrade >> above 1000

Re: [RFC PATCH] reuseport: compute the ehash only if needed

2017-12-12 Thread Craig Gallek
On Tue, Dec 12, 2017 at 8:09 AM, Paolo Abeni wrote: > When a reuseport socket group is using a BPF filter to distribute > the packets among the sockets, we don't need to compute any hash > value, but the current reuseport_select_sock() requires the > caller to compute such hash

Re: [PATCH net-next] net: dsa: lan9303: Introduce lan9303_read_wait

2017-12-12 Thread Vivien Didelot
Hi Egil, Egil Hjelmeland writes: > Simplify lan9303_indirect_phy_wait_for_completion() > and lan9303_switch_wait_for_completion() by using a new function > lan9303_read_wait() > > Signed-off-by: Egil Hjelmeland > --- >

Re: [PATCH net-next] net: bridge: use rhashtable for fdbs

2017-12-12 Thread Nikolay Aleksandrov
On 12/12/17 20:02, Stephen Hemminger wrote: > On Tue, 12 Dec 2017 16:02:50 +0200 > Nikolay Aleksandrov wrote: > >> +memcpy(__entry->addr, f->key.addr.addr, ETH_ALEN); > > Maybe use ether_addr_copy() here? > This is an unrelated cleanup, the code in

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

2017-12-12 Thread Marcelo Ricardo Leitner
On Tue, Dec 12, 2017 at 02:08:00PM -0200, 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 sctp_setsockopt_maxseg(struct sock *sk, >

Re: [RFC PATCH] reuseport: compute the ehash only if needed

2017-12-12 Thread Paolo Abeni
Hi, On Tue, 2017-12-12 at 12:44 -0500, Craig Gallek wrote: > On Tue, Dec 12, 2017 at 8:09 AM, Paolo Abeni wrote: > > When a reuseport socket group is using a BPF filter to distribute > > the packets among the sockets, we don't need to compute any hash > > value, but the current

Re: [PATCH net-next v5 1/2] net: add support for Cavium PTP coprocessor

2017-12-12 Thread Richard Cochran
On Tue, Dec 12, 2017 at 12:41:35PM +0300, Aleksey Makarov wrote: > If ptp_clock_register() returns NULL, the device is still paired with the > driver, > but the driver is not registered in the PTP core. When ethernet driver needs > the reference to this cavium PTP driver, it calls

[PATCHv2 0/3] Socionext Synquacer NETSEC driver

2017-12-12 Thread jassisinghbrar
From: Jassi Brar Hi, Changes since v1 # Switched from using memremap to ioremap # Implemented ndo_do_ioctl callback # Defined optional 'dma-coherent' DT property Jassi Brar (3): dt-bindings: net: Add DT bindings for Socionext Netsec net:

Re: [PATCHv2 1/3] dt-bindings: net: Add DT bindings for Socionext Netsec

2017-12-12 Thread Mark Rutland
Hi, On Tue, Dec 12, 2017 at 10:45:21PM +0530, jassisinghb...@gmail.com wrote: > From: Jassi Brar > > This patch adds documentation for Device-Tree bindings for the > Socionext NetSec Controller driver. > > Signed-off-by: Ard Biesheuvel >

Re: [PATCH v3 31/33] dt-bindings: interrupt-controller: Andestech Internal Vector Interrupt Controller

2017-12-12 Thread Rob Herring
On Fri, Dec 08, 2017 at 05:12:14PM +0800, Greentime Hu wrote: > From: Greentime Hu > > This patch adds an irqchip driver document for the Andestech Internal Vector > Interrupt Controller. > > Signed-off-by: Rick Chen > Signed-off-by: Greentime Hu

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

2017-12-12 Thread Alexei Starovoitov
On 12/11/17 8:36 AM, 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 kprobes.h. v5->v6: - add

[PATCH V3 net-next 6/8] net: hns3: Add mailbox support to PF driver

2017-12-12 Thread Salil Mehta
Command queue provides the provision of Mailbox command which can be used for communication between PF and VF. PF handles messages from various VFs for fetching various information like, queue, vlan, link status related etc. It also handles the request from various VFs to perform certain

[PATCH V3 net-next 2/8] net: hns3: Add mailbox support to VF driver

2017-12-12 Thread Salil Mehta
This patch adds the support of the mailbox to the VF driver. The mailbox shall be used as an interface to communicate with the PF driver for various purposes like {set|get} MAC related operations, reset, link status etc. The mailbox supports both synchronous and asynchronous command send to PF

[PATCH V3 net-next 4/8] net: hns3: Add HNS3 VF driver to kernel build framework

2017-12-12 Thread Salil Mehta
This patch introduces the new Makefiles and updates existing Makefiles required to build the HNS3 Virtual Function driver. This also updates the Kconfig for introduction of new menuconfig entries related to VF driver. Signed-off-by: Salil Mehta Signed-off-by: lipeng

Re: [PATCH net-next] net: bridge: use rhashtable for fdbs

2017-12-12 Thread Stephen Hemminger
On Tue, 12 Dec 2017 16:02:50 +0200 Nikolay Aleksandrov wrote: > Before this patch the bridge used a fixed 256 element hash table which > was fine for small use cases (in my tests it starts to degrade > above 1000 entries), but it wasn't enough for medium or large >

Re: [PATCH bpf 0/3] Misc BPF fixes

2017-12-12 Thread Alexei Starovoitov
On Tue, Dec 12, 2017 at 02:25:29AM +0100, Daniel Borkmann wrote: > Couple of outstanding fixes for BPF tree: 1) fixes a perf RB > corruption, 2) and 3) fixes a few build issues from the recent > bpf_perf_event.h uapi corrections. Thanks! Applied, thanks Daniel!

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

2017-12-12 Thread Stephen Hemminger
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 drivers/net/ethernet/marvell/skge.c, the driver may sleep > > under a spinlock. > > The function call path is:

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

2017-12-12 Thread Stephen Hemminger
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 Shimiao Did you read the TODO

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

2017-12-12 Thread Stephen Hemminger
On Tue, 12 Dec 2017 16:18:17 -0200 Marcelo Ricardo Leitner wrote: > On Tue, Dec 12, 2017 at 11:32:46AM -0600, Dan Williams wrote: > > On Tue, 2017-12-12 at 08:13 -0800, Ed Swierk wrote: > > > Most physical Ethernet devices pad short packets to the minimum > > >

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

2017-12-12 Thread Ed Swierk
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 test stuff out of dummy > for the same reason. My test setup to trigger an openvswitch

Re: [PATCH net-next v4 1/2] bpf/tracing: allow user space to query prog array on the same tp

2017-12-12 Thread Alexei Starovoitov
On 12/12/17 1:03 AM, Peter Zijlstra wrote: On Mon, Dec 11, 2017 at 11:39:02AM -0800, Yonghong Song wrote: The usage: struct perf_event_query_bpf *query = malloc(...); query.ids_len = ids_len; err = ioctl(pmu_efd, PERF_EVENT_IOC_QUERY_BPF, ); You didn't spot the fixes to your changelog

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

2017-12-12 Thread Grygorii Strashko
On 12/12/2017 10:35 AM, 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

[PATCHv2 3/3] MAINTAINERS: Add entry for Socionext ethernet driver

2017-12-12 Thread jassisinghbrar
From: Jassi Brar Add entry for the Socionext Netsec controller driver and DT bindings. Acked-by: Ard Biesheuvel Signed-off-by: Jassi Brar --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff

Re: [PATCHv2 2/3] net: socionext: Add Synquacer NetSec driver

2017-12-12 Thread Ard Biesheuvel
Hi Jassi, On 12 December 2017 at 17:15, wrote: > From: Jassi Brar > > This driver adds support for Socionext "netsec" IP Gigabit > Ethernet + PHY IP used in the Synquacer SC2A11 SoC. > > Signed-off-by: Ard Biesheuvel

Re: Huge memory leak with 4.15.0-rc2+

2017-12-12 Thread Paweł Staszewski
W dniu 2017-12-11 o 23:27, Paweł Staszewski pisze: W dniu 2017-12-11 o 23:15, John Fastabend pisze: On 12/11/2017 01:48 PM, Paweł Staszewski wrote: W dniu 2017-12-11 o 22:23, Paweł Staszewski pisze: Hi I just upgraded some testing host to 4.15.0-rc2+ kernel And after some time of

Re: [PATCH v6 2/3] sock: Move the socket inuse to namespace.

2017-12-12 Thread Cong Wang
On Sun, Dec 10, 2017 at 7:12 AM, Tonghao Zhang wrote: > diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c > index b797832..6c191fb 100644 > --- a/net/core/net_namespace.c > +++ b/net/core/net_namespace.c > @@ -363,6 +363,13 @@ static struct net

[PATCHv2 2/3] net: socionext: Add Synquacer NetSec driver

2017-12-12 Thread jassisinghbrar
From: Jassi Brar This driver adds support for Socionext "netsec" IP Gigabit Ethernet + PHY IP used in the Synquacer SC2A11 SoC. Signed-off-by: Ard Biesheuvel Signed-off-by: Jassi Brar ---

[PATCHv2 1/3] dt-bindings: net: Add DT bindings for Socionext Netsec

2017-12-12 Thread jassisinghbrar
From: Jassi Brar This patch adds documentation for Device-Tree bindings for the Socionext NetSec Controller driver. Signed-off-by: Ard Biesheuvel Signed-off-by: Jassi Brar ---

Re: [PATCH] of_mdio / mdiobus: ensure mdio devices have fwnode correctly populated

2017-12-12 Thread Rob Herring
On Tue, Dec 12, 2017 at 4:49 AM, Russell King wrote: > Ensure that all mdio devices populate the struct device fwnode pointer > as well as the of_node pointer to allow drivers that wish to use > fwnode APIs to work. > > Signed-off-by: Russell King

[PATCH V3 net-next 1/8] net: hns3: Add HNS3 VF IMP(Integrated Management Proc) cmd interface

2017-12-12 Thread Salil Mehta
This patch adds support of command interface for communication with the IMP(Integrated Management Processor) for HNS3 Virtual Function Driver. Each VF has support of CQP(Command Queue Pair) ring interface. Each CQP consis of send queue CSQ and receive queue CRQ. There are various commands a VF

[PATCH V3 net-next 7/8] net: hns3: Change PF to add ring-vect binding & resetQ to mailbox

2017-12-12 Thread Salil Mehta
This patch is required to support ring-vector binding and reset of TQPs requested by the VF driver to the PF driver. Mailbox handler is added with corresponding VF commands/messages to handle the request. Signed-off-by: Salil Mehta Signed-off-by: lipeng

[PATCH V3 net-next 8/8] net: hns3: Add mailbox interrupt handling to PF driver

2017-12-12 Thread Salil Mehta
All PF mailbox events are conveyed through a common interrupt (vector 0). This interrupt vector is shared by reset and mailbox. This patch adds the handling of mailbox interrupt event and its deferred processing in context to a separate mailbox task. Signed-off-by: Salil Mehta

[PATCH V3 net-next 0/8] Hisilicon Network Subsystem 3 VF Ethernet Driver

2017-12-12 Thread Salil Mehta
This patch-set contains the support of the HNS3 (Hisilicon Network Subsystem 3) Virtual Function Ethernet driver for hip08 family of SoCs. The Physical Function driver is already part of the Linux mainline. This VF driver has its Hardware Compatibility Layer and has commom/unified ENET

Re: [PATCH net-next] net: bridge: use rhashtable for fdbs

2017-12-12 Thread Stephen Hemminger
On Tue, 12 Dec 2017 16:02:50 +0200 Nikolay Aleksandrov wrote: > + memcpy(__entry->addr, f->key.addr.addr, ETH_ALEN); Maybe use ether_addr_copy() here?

[PATCH net] skge: remove redundunt free_irq under spinlock

2017-12-12 Thread Stephen Hemminger
The code to handle multi-port SKGE boards was freeing IRQ twice. The first one was under lock and might sleep. Signed-off-by: Stephen Hemminger --- Given that multi-port SKGE devices are very old and unlikely to still be in use. This patch does not need to go to

[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

[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

[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

[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 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

[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

[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 v3] igb: Free IRQs when device is hotplugged

2017-12-12 Thread Lyude Paul
Recently I got a Caldigit TS3 Thunderbolt 3 dock, and noticed that upon hotplugging my kernel would immediately crash due to igb: [ 680.825801] kernel BUG at drivers/pci/msi.c:352! [ 680.828388] invalid opcode: [#1] SMP [ 680.829194] Modules linked in: igb(O) thunderbolt i2c_algo_bit

Re: [PATCHv2 2/3] net: socionext: Add Synquacer NetSec driver

2017-12-12 Thread Andrew Lunn
> > +static int netsec_register_mdio(struct netsec_priv *priv, u32 phy_addr) > > +{ > > + struct mii_bus *bus; > > + int ret; > > + > > + bus = devm_mdiobus_alloc(priv->dev); > > + if (!bus) > > + return -ENOMEM; > > + > > + snprintf(bus->id,

Re: [PATCHv2 2/3] net: socionext: Add Synquacer NetSec driver

2017-12-12 Thread Andrew Lunn
> > +static int netsec_mac_update_to_phy_state(struct netsec_priv *priv) > > +{ > > + struct phy_device *phydev = priv->ndev->phydev; > > + u32 value = 0; > > + > > + value = phydev->duplex ? NETSEC_GMAC_MCR_REG_FULL_DUPLEX_COMMON : > > +

Re: [PATCH net-next] net: dsa: lan9303: Introduce lan9303_read_wait

2017-12-12 Thread Egil Hjelmeland
Hi Vivien. Den 12. des. 2017 19:08, skrev Vivien Didelot: Hi Egil, Egil Hjelmeland writes: Simplify lan9303_indirect_phy_wait_for_completion() and lan9303_switch_wait_for_completion() by using a new function lan9303_read_wait() Signed-off-by: Egil Hjelmeland

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

2017-12-12 Thread Eric Biggers
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 > > 0c86a6bd85ff0629cd2c5141027fc1c8bb6cde9c > >

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

2017-12-12 Thread Ivan Khoronzhuk
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. Also remove WARNs replacing them on dev_err msgs.

[PATH net-next] tcp: pause Fast Open globally after third consecutive timeout

2017-12-12 Thread Yuchung Cheng
Prior to this patch, active Fast Open is paused on a specific destination IP address if the previous connections to the IP address have experienced recurring timeouts . But recent experiments by Microsoft (https://goo.gl/cykmn7) and Mozilla browsers indicate the isssue is often caused by broken

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

2017-12-12 Thread Cong Wang
On Tue, Dec 12, 2017 at 8:13 AM, Ed Swierk wrote: > Most physical Ethernet devices pad short packets to the minimum length > of 64 bytes (including FCS) on transmit. It can be useful to simulate > this behavior when debugging a problem that results from it (such as >

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

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: [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.

[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 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] 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

[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 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

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 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: [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 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: [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 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 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, >

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 > > > +

[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 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

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 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

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

[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

[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 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

  1   2   3   >