[RFC V1 net-next 0/1] Introduce xdp to ena

2019-06-23 Thread sameehj
From: Sameeh Jubran This patch set has one patch which implements xdp drop support in the ena driver. Sameeh Jubran (1): net: ena: implement XDP drop support drivers/net/ethernet/amazon/ena/ena_netdev.c | 83 +++- drivers/net/ethernet/amazon/ena/ena_netdev.h | 29 +++ 2 f

[RFC V1 net-next 1/1] net: ena: implement XDP drop support

2019-06-23 Thread sameehj
From: Sameeh Jubran This commit implements the basic functionality of drop/pass logic in the ena driver. Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 83 +++- drivers/net/ethernet/amazon/ena/ena_netdev.h | 29 +++ 2 files changed, 111 inse

Re: [RFC net-next] net: dsa: add support for MC_DISABLED attribute

2019-06-23 Thread Ido Schimmel
On Fri, Jun 21, 2019 at 05:29:52PM -0400, Vivien Didelot wrote: > On Thu, 20 Jun 2019 19:24:47 -0700, Florian Fainelli > wrote: > > > This patch adds support for enabling or disabling the flooding of > > > unknown multicast traffic on the CPU ports, depending on the value > > > of the switchdev S

[PATCH V1 net-next] net: ena: Fix bug where ring allocation backoff stopped too late

2019-06-23 Thread sameehj
From: Sameeh Jubran The current code of create_queues_with_size_backoff() allows the ring size to become as small as ENA_MIN_RING_SIZE/2. This is a bug since we don't want the queue ring to be smaller than ENA_MIN_RING_SIZE In this commit we change the loop's termination condition to look at the

Re: [RFC net-next] net: dsa: add support for MC_DISABLED attribute

2019-06-23 Thread Russell King - ARM Linux admin
On Sun, Jun 23, 2019 at 07:09:52AM +, Ido Schimmel wrote: > When multicast snooping is enabled unregistered multicast traffic should > only be flooded to mrouter ports. Given that IPv6 relies upon multicast working, and multicast snooping is a kernel configuration option, and MLD messages will

Re: [RFC net-next] net: dsa: add support for MC_DISABLED attribute

2019-06-23 Thread Ido Schimmel
On Sun, Jun 23, 2019 at 08:26:05AM +0100, Russell King - ARM Linux admin wrote: > On Sun, Jun 23, 2019 at 07:09:52AM +, Ido Schimmel wrote: > > When multicast snooping is enabled unregistered multicast traffic should > > only be flooded to mrouter ports. > > Given that IPv6 relies upon multica

[PATCH] sis900: increment revision number

2019-06-23 Thread Sergej Benilov
Increment revision number to 1.08.11 (TX completion fix). Signed-off-by: Sergej Benilov --- drivers/net/ethernet/sis/sis900.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/sis/sis900.c b/drivers/net/ethernet/sis/sis900.c index abb9b42e..09b4e1c5

Re: [PATCH] sis900: increment revision number

2019-06-23 Thread Daniele Venzano
Sorry to be late in replying, I am ok also with the previous changes. Signed-off-by: Daniele Venzano On 23/06/2019 09:47, Sergej Benilov wrote: Increment revision number to 1.08.11 (TX completion fix). Signed-off-by: Sergej Benilov --- drivers/net/ethernet/sis/sis900.c | 7 --- 1 file

Re: [PATCH] sis900: increment revision number

2019-06-23 Thread Joe Perches
On Sun, 2019-06-23 at 09:47 +0200, Sergej Benilov wrote: > Increment revision number to 1.08.11 (TX completion fix). Better not to bother as the last increment was in 2006. The driver version gets the kernel version in any case. > diff --git a/drivers/net/ethernet/sis/sis900.c > b/drivers/net/et

Re: [PATCH] sis900: increment revision number

2019-06-23 Thread Daniele Venzano
Hello, I think it is good to know just by looking at the sources that the driver is still kept up-to-date, so I am in favor of this patch. Daniele On 23/06/2019 11:10, Joe Perches wrote: On Sun, 2019-06-23 at 09:47 +0200, Sergej Benilov wrote: Increment revision number to 1.08.11 (TX comple

[no subject]

2019-06-23 Thread Marko in1t3r Pavlovic
unsubscribe netdev

Re: [PATCH v2 net] af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET

2019-06-23 Thread Neil Horman
On Sat, Jun 22, 2019 at 10:12:46PM -0400, Willem de Bruijn wrote: > On Sat, Jun 22, 2019 at 1:42 PM Neil Horman wrote: > > > > When an application is run that: > > a) Sets its scheduler to be SCHED_FIFO > > and > > b) Opens a memory mapped AF_PACKET socket, and sends frames with the > > MSG_DONTWA

Re: [PATCH v2 net] af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET

2019-06-23 Thread Neil Horman
On Sat, Jun 22, 2019 at 10:21:31PM -0400, Willem de Bruijn wrote: > > > -static void __packet_set_status(struct packet_sock *po, void *frame, int > > > status) > > > +static void __packet_set_status(struct packet_sock *po, void *frame, int > > > status, > > > + bool

Re: [PATCH bpf-next v5 00/16] AF_XDP infrastructure improvements and mlx5e support

2019-06-23 Thread Tariq Toukan
On 6/21/2019 10:52 PM, Saeed Mahameed wrote: > On Thu, Jun 20, 2019 at 2:13 AM Björn Töpel wrote: >> >> On Tue, 18 Jun 2019 at 14:00, Maxim Mikityanskiy >> wrote: >>> >>> This series contains improvements to the AF_XDP kernel infrastructure >>> and AF_XDP support in mlx5e. The infrastructure i

[PATCH] net: dsa: microchip: Use gpiod_set_value_cansleep()

2019-06-23 Thread Marek Vasut
Replace gpiod_set_value() with gpiod_set_value_cansleep(), as the switch reset GPIO can be connected to e.g. I2C GPIO expander and it is perfectly fine for the kernel to sleep for a bit in ksz_switch_register(). Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Linus Walleij

[PATCH] net: ethernet: ti: cpsw: Assign OF node to slave devices

2019-06-23 Thread Marek Vasut
Assign OF node to CPSW slave devices, otherwise it is not possible to bind e.g. DSA switch to them. Without this patch, the DSA code tries to find the ethernet device by OF match, but fails to do so because the slave device has NULL OF node. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Iva

[PATCH net-next 3/3] mlxsw: core: Add support for negative temperature readout

2019-06-23 Thread Ido Schimmel
From: Vadim Pasternak Extend macros MLXSW_REG_MTMP_TEMP_TO_MC() to allow support of negative temperature readout, since chip and others thermal components are capable of operating within the negative temperature. With no such support negative temperature will be consider as very high temperature

[PATCH net-next 2/3] mlxsw: core: Add the hottest thermal zone detection

2019-06-23 Thread Ido Schimmel
From: Vadim Pasternak When multiple sensors are mapped to the same cooling device, the cooling device should be set according the worst sensor from the sensors associated with this cooling device. Provide the hottest thermal zone detection and enforce cooling device to follow the temperature tre

[PATCH net-next 1/3] mlxsw: core: Extend thermal core with per inter-connect device thermal zones

2019-06-23 Thread Ido Schimmel
From: Vadim Pasternak Add a dedicated thermal zone for each inter-connect device. The current temperature is obtained from inter-connect temperature sensor and the default trip points are set to the same values as default ASIC trip points. These settings could be changed from the user space. A co

[PATCH net-next 0/3] mlxsw: Thermal and hwmon extensions

2019-06-23 Thread Ido Schimmel
From: Ido Schimmel This patchset from Vadim includes various enhancements to thermal and hwmon code in mlxsw. Patch #1 adds a thermal zone for each inter-connect device (gearbox). These devices are present in SN3800 systems and code to expose their temperature via hwmon was added in commit 2e265

Re: [RFC V1 net-next 1/1] net: ena: implement XDP drop support

2019-06-23 Thread Jesper Dangaard Brouer
I'm very happy to see progress with XDP for the ENA driver. On Sun, 23 Jun 2019 10:06:49 +0300 wrote: > @@ -888,6 +959,15 @@ static struct sk_buff *ena_rx_skb(struct ena_ring > *rx_ring, > va = page_address(rx_info->page) + rx_info->page_offset; > prefetch(va + NET_IP_ALIGN); >

Re: [RFC V1 net-next 1/1] net: ena: implement XDP drop support

2019-06-23 Thread Jesper Dangaard Brouer
On Sun, 23 Jun 2019 10:06:49 +0300 wrote: > This commit implements the basic functionality of drop/pass logic in the > ena driver. Usually we require a driver to implement all the XDP return codes, before we accept it. But as Daniel and I discussed with Zorik during NetConf[1], we are going to

Re: [RFC V1 net-next 1/1] net: ena: implement XDP drop support

2019-06-23 Thread David Ahern
On 6/23/19 1:06 AM, same...@amazon.com wrote: > +static int ena_xdp_set(struct net_device *netdev, struct bpf_prog *prog) > +{ > + struct ena_adapter *adapter = netdev_priv(netdev); > + struct bpf_prog *old_bpf_prog; > + int i; > + > + if (ena_xdp_allowed(adapter)) { > +

Re: [PATCH v2 net] af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET

2019-06-23 Thread Willem de Bruijn
On Sun, Jun 23, 2019 at 7:40 AM Neil Horman wrote: > > On Sat, Jun 22, 2019 at 10:21:31PM -0400, Willem de Bruijn wrote: > > > > -static void __packet_set_status(struct packet_sock *po, void *frame, > > > > int status) > > > > +static void __packet_set_status(struct packet_sock *po, void *frame,

Re: [RFC V1 net-next 1/1] net: ena: implement XDP drop support

2019-06-23 Thread Maciej Fijalkowski
On Sun, 23 Jun 2019 10:06:49 +0300 wrote: > From: Sameeh Jubran > > This commit implements the basic functionality of drop/pass logic in the > ena driver. > > Signed-off-by: Sameeh Jubran > --- > drivers/net/ethernet/amazon/ena/ena_netdev.c | 83 +++- > drivers/net/ethernet/a

Re: [PATCH] net: dsa: microchip: Use gpiod_set_value_cansleep()

2019-06-23 Thread Andrew Lunn
On Sun, Jun 23, 2019 at 02:10:36PM +0200, Marek Vasut wrote: > Replace gpiod_set_value() with gpiod_set_value_cansleep(), as the switch > reset GPIO can be connected to e.g. I2C GPIO expander and it is perfectly > fine for the kernel to sleep for a bit in ksz_switch_register(). > > Signed-off-by:

Re: [PATCH] net: dsa: microchip: Use gpiod_set_value_cansleep()

2019-06-23 Thread Marek Vasut
On 6/23/19 5:09 PM, Andrew Lunn wrote: > On Sun, Jun 23, 2019 at 02:10:36PM +0200, Marek Vasut wrote: >> Replace gpiod_set_value() with gpiod_set_value_cansleep(), as the switch >> reset GPIO can be connected to e.g. I2C GPIO expander and it is perfectly >> fine for the kernel to sleep for a bit in

[PATCH V2] net: dsa: microchip: Use gpiod_set_value_cansleep()

2019-06-23 Thread Marek Vasut
Replace gpiod_set_value() with gpiod_set_value_cansleep(), as the switch reset GPIO can be connected to e.g. I2C GPIO expander and it is perfectly fine for the kernel to sleep for a bit in ksz_switch_register(). Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Linus Walleij

Re: [PATCH] sis900: increment revision number

2019-06-23 Thread David Miller
From: Sergej Benilov Date: Sun, 23 Jun 2019 09:47:07 +0200 > Increment revision number to 1.08.11 (TX completion fix). > > Signed-off-by: Sergej Benilov These are useless, really... People are going to backport the TX completion fix all by itself and not this change if I were to merge it. I

Re: [PATCH] sis900: increment revision number

2019-06-23 Thread David Miller
From: Daniele Venzano Date: Sun, 23 Jun 2019 11:13:28 +0200 > Hello, > > I think it is good to know just by looking at the sources that the > driver is still kept up-to-date, so I am in favor of this patch. I absolutely, strongly, disagree. These are pointless.

Re: [PATCH V1 net-next] net: ena: Fix bug where ring allocation backoff stopped too late

2019-06-23 Thread David Miller
From: Date: Sun, 23 Jun 2019 10:11:10 +0300 > From: Sameeh Jubran > > The current code of create_queues_with_size_backoff() allows the ring size > to become as small as ENA_MIN_RING_SIZE/2. This is a bug since we don't > want the queue ring to be smaller than ENA_MIN_RING_SIZE > > In this comm

Re: [PATCH net-next 3/3] mlxsw: core: Add support for negative temperature readout

2019-06-23 Thread Andrew Lunn
> --- a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c > +++ b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c > @@ -52,8 +52,7 @@ static ssize_t mlxsw_hwmon_temp_show(struct device *dev, > container_of(attr, struct mlxsw_hwmon_attr, dev_attr); > struct mlxsw_hwmon *m

RE: [PATCH net-next 3/3] mlxsw: core: Add support for negative temperature readout

2019-06-23 Thread Vadim Pasternak
> -Original Message- > From: Andrew Lunn > Sent: Sunday, June 23, 2019 6:44 PM > To: Ido Schimmel > Cc: netdev@vger.kernel.org; da...@davemloft.net; Jiri Pirko > ; mlxsw ; Vadim Pasternak > ; Ido Schimmel > Subject: Re: [PATCH net-next 3/3] mlxsw: core: Add support for negative > temp

RE: [PATCH net-next 3/3] mlxsw: core: Add support for negative temperature readout

2019-06-23 Thread Vadim Pasternak
> -Original Message- > From: Vadim Pasternak > Sent: Sunday, June 23, 2019 7:01 PM > To: Andrew Lunn ; Ido Schimmel > Cc: netdev@vger.kernel.org; da...@davemloft.net; Jiri Pirko > ; mlxsw ; Ido Schimmel > > Subject: RE: [PATCH net-next 3/3] mlxsw: core: Add support for negative > tempe

Re: [PATCH net-next 3/3] mlxsw: core: Add support for negative temperature readout

2019-06-23 Thread Andrew Lunn
> > Why the > 0? > > We don't consider negative temperature for thermal control. Is this because the thermal control is also broken and does not support negative values? This is just a workaround papering over the cracks? I've worked on some systems where the thermal subsystem has controller a h

Re: [PATCH] sis900: increment revision number

2019-06-23 Thread Joe Perches
On Sun, 2019-06-23 at 08:37 -0700, David Miller wrote: > From: Daniele Venzano > Date: Sun, 23 Jun 2019 11:13:28 +0200 > > > Hello, > > > > I think it is good to know just by looking at the sources that the > > driver is still kept up-to-date, so I am in favor of this patch. > > I absolutely, s

RE: [PATCH net-next 3/3] mlxsw: core: Add support for negative temperature readout

2019-06-23 Thread Vadim Pasternak
> -Original Message- > From: Andrew Lunn > Sent: Sunday, June 23, 2019 7:26 PM > To: Vadim Pasternak > Cc: Ido Schimmel ; netdev@vger.kernel.org; > da...@davemloft.net; Jiri Pirko ; mlxsw > ; Ido Schimmel > Subject: Re: [PATCH net-next 3/3] mlxsw: core: Add support for negative > temp

Re: [PATCH net-next 10/16] qlge: Factor out duplicated expression

2019-06-23 Thread David Miller
From: Benjamin Poirier Date: Mon, 17 Jun 2019 16:48:52 +0900 > Signed-off-by: Benjamin Poirier > --- > drivers/net/ethernet/qlogic/qlge/qlge.h | 6 ++ > drivers/net/ethernet/qlogic/qlge/qlge_main.c | 18 ++ > 2 files changed, 12 insertions(+), 12 deletions(-) > > diff

Re: [PATCH net-next 10/16] qlge: Factor out duplicated expression

2019-06-23 Thread David Miller
From: David Miller Date: Sun, 23 Jun 2019 10:59:35 -0700 (PDT) > "(u16) 65536" is zero and the range of these values is 0 -- 65536. > > This whole expression is way overdone. Also, when you post the next revision of this patch series, please provide a proper "[PATCH net-next 00/16]" header post

Re: [PATCH net] vxlan: do not destroy fdb if register_netdevice() is failed

2019-06-23 Thread David Miller
From: Taehee Yoo Date: Thu, 20 Jun 2019 20:51:08 +0900 > __vxlan_dev_create() destroys FDB using specific pointer which indicates > a fdb when error occurs. > But that pointer should not be used when register_netdevice() fails because > register_netdevice() internally destroys fdb when error occu

Re: network unstable on odroid-c1/meson8b.

2019-06-23 Thread Aymeric
Le 20/06/2019 à 22:54, Aymeric a écrit : > Le 20/06/2019 à 17:53, Heiner Kallweit a écrit : >> On 20.06.2019 09:55, Aymeric wrote: >>> Hi, >>> On 2019-06-20 00:14, Heiner Kallweit wrote: On 19.06.2019 22:18, Aymeric wrote: > Hello all, > Kernel 3.10 didn't have a dedicated RTL82

Re: [PATCH v3 net-next 0/5] ipv6: avoid taking refcnt on dst during route lookup

2019-06-23 Thread David Miller
From: Wei Wang Date: Thu, 20 Jun 2019 17:36:36 -0700 > v2->v3: > - Handled fib6_rule_lookup() when CONFIG_IPV6_MULTIPLE_TABLES is not > configured in patch 03 (suggested by David Ahern) > - Removed the renaming of l3mdev_link_scope_lookup() in patch 05 > (suggested by David Ahern) > - Moved d

Re: [PATCH net-next 1/4] cxgb4: Re-work the logic for mps refcounting

2019-06-23 Thread David Miller
From: Raju Rangoju Date: Fri, 21 Jun 2019 20:06:33 +0530 > +struct mps_entries_ref { > + struct list_head list; > + u8 addr[ETH_ALEN]; > + u8 mask[ETH_ALEN]; > + u16 idx; > + atomic_t refcnt; > +}; Since you're making this change, please use refcnt_t.

Re: [PATCH v2 net] af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET

2019-06-23 Thread Neil Horman
On Sun, Jun 23, 2019 at 10:39:12AM -0400, Willem de Bruijn wrote: > On Sun, Jun 23, 2019 at 7:40 AM Neil Horman wrote: > > > > On Sat, Jun 22, 2019 at 10:21:31PM -0400, Willem de Bruijn wrote: > > > > > -static void __packet_set_status(struct packet_sock *po, void *frame, > > > > > int status) >

Re: [PATCH v3 net-next 0/5] ipv6: avoid taking refcnt on dst during route lookup

2019-06-23 Thread David Ahern
On 6/23/19 12:27 PM, David Miller wrote: > From: Wei Wang > Date: Thu, 20 Jun 2019 17:36:36 -0700 > >> v2->v3: >> - Handled fib6_rule_lookup() when CONFIG_IPV6_MULTIPLE_TABLES is not >> configured in patch 03 (suggested by David Ahern) >> - Removed the renaming of l3mdev_link_scope_lookup() in

Re: [PATCH v3 net-next 0/5] ipv6: avoid taking refcnt on dst during route lookup

2019-06-23 Thread David Miller
From: David Ahern Date: Sun, 23 Jun 2019 13:29:27 -0600 > On 6/23/19 12:27 PM, David Miller wrote: >> From: Wei Wang >> Date: Thu, 20 Jun 2019 17:36:36 -0700 >> >>> v2->v3: >>> - Handled fib6_rule_lookup() when CONFIG_IPV6_MULTIPLE_TABLES is not >>> configured in patch 03 (suggested by David

Re: [EXT] [PATCH] bnx2x: Prevent ptp_task to be rescheduled indefinitely

2019-06-23 Thread Guilherme Piccoli
On Sun, Jun 23, 2019 at 2:13 AM Sudarsana Reddy Kalluru wrote: > > Thanks for uncovering this issue, and the fix. > With the proposed fix, if HW latches the timestamp after 3 iterations then it > would lead to erroneous PTP functionality. When driver receives the next PTP > packet, driver sees t

Re: [PATCH v2 0/3] fix bugs when enable route_localnet

2019-06-23 Thread Zhiqiang Liu
> From: Zhiqiang Liu > Date: Sat, 22 Jun 2019 16:41:49 +0800 > >> Friendly ping ... > > I'm not applying this patch series without someone reviewing it. > Of course, all patches should be reviewd before deciding whether to apply. In v2, we add a couple of test for enabling route_localnet in sel

Re: 6c409a3aee: kernel_selftests.bpf.test_verifier.fail

2019-06-23 Thread Rong Chen
On 6/21/19 11:52 PM, Alexei Starovoitov wrote: On Fri, Jun 21, 2019 at 1:36 AM kernel test robot wrote: # #340/p direct packet access: test22 (x += pkt_ptr, 3) OK # #341/p direct packet access: test23 (x += pkt_ptr, 4) FAIL # Unexpected success to load! # verification time 17 usec # stack depth

[PATCH v3 net] af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET

2019-06-23 Thread Neil Horman
When an application is run that: a) Sets its scheduler to be SCHED_FIFO and b) Opens a memory mapped AF_PACKET socket, and sends frames with the MSG_DONTWAIT flag cleared, its possible for the application to hang forever in the kernel. This occurs because when waiting, the code in tpacket_snd call

RE: [iproute2-next v5] tipc: support interface name when activating UDP bearer

2019-06-23 Thread Hoang Le
Thanks David. I will update code change as your comments. For the item: > + /* remove from cache */ > + ll_drop_by_index(ifr.ifr_ifindex); why the call to ll_drop_by_index? doing so means that ifindex is looked up again. [Hoang] > + ifr.ifr_ifindex = ll_name_to_index(ifr.ifr_name); T

Re: [PATCH net] vxlan: do not destroy fdb if register_netdevice() is failed

2019-06-23 Thread Taehee Yoo
On Mon, 24 Jun 2019 at 03:07, David Miller wrote: > Hi David, Thank you for the review! > From: Taehee Yoo > Date: Thu, 20 Jun 2019 20:51:08 +0900 > > > __vxlan_dev_create() destroys FDB using specific pointer which indicates > > a fdb when error occurs. > > But that pointer should not be used

Re: [PATCH next 0/3] blackhole device to invalidate dst

2019-06-23 Thread महेश बंडेवार
On Sat, Jun 22, 2019 at 8:35 AM David Ahern wrote: > > On 6/21/19 6:45 PM, Mahesh Bandewar wrote: > > When we invalidate dst or mark it "dead", we assign 'lo' to > > dst->dev. First of all this assignment is racy and more over, > > it has MTU implications. > > > > The standard dev MTU is 1500 whil

Re: [PATCH V3 01/10] net: dsa: microchip: Remove ksz_{read,write}24()

2019-06-23 Thread Andrew Lunn
On Mon, Jun 24, 2019 at 12:34:59AM +0200, Marek Vasut wrote: > These functions and callbacks are never used, remove them. > > Signed-off-by: Marek Vasut Reviewed-by: Andrew Lunn Andrew

Re: [PATCH V3 02/10] net: dsa: microchip: Remove ksz_{get,set}()

2019-06-23 Thread Andrew Lunn
On Mon, Jun 24, 2019 at 12:35:00AM +0200, Marek Vasut wrote: > These functions and callbacks are never used, remove them. > > Signed-off-by: Marek Vasut Reviewed-by: Andrew Lunn Andrew

Re: [PATCH V3 03/10] net: dsa: microchip: Inline ksz_spi.h

2019-06-23 Thread Andrew Lunn
On Mon, Jun 24, 2019 at 12:35:01AM +0200, Marek Vasut wrote: > The functions in the header file are static, and the header file is > included from single C file, just inline the code into the C file. > The bonus is that it's easier to spot further content to clean up. > > Signed-off-by: Marek Vasu

Re: [PATCH V3 04/10] net: dsa: microchip: Move ksz_cfg and ksz_port_cfg to ksz9477.c

2019-06-23 Thread Andrew Lunn
On Mon, Jun 24, 2019 at 12:35:02AM +0200, Marek Vasut wrote: > These functions are only used by the KSZ9477 code, move them from > the header into that code. Note that these functions will be soon > replaced by regmap equivalents. > > Signed-off-by: Marek Vasut Reviewed-by: Andrew Lunn And

Re: [PATCH V3 05/10] net: dsa: microchip: Use PORT_CTRL_ADDR() instead of indirect function call

2019-06-23 Thread Andrew Lunn
On Mon, Jun 24, 2019 at 12:35:03AM +0200, Marek Vasut wrote: > The indirect function call to dev->dev_ops->get_port_addr() is expensive > especially if called for every single register access, and only returns > the value of PORT_CTRL_ADDR() macro. Use PORT_CTRL_ADDR() macro directly > instead. Hi

Re: [PATCH V3 06/10] net: dsa: microchip: Factor out register access opcode generation

2019-06-23 Thread Andrew Lunn
On Mon, Jun 24, 2019 at 12:35:04AM +0200, Marek Vasut wrote: > Factor out the code which sends out the register read/write opcodes > to the switch, since the code differs in single bit between read and > write. > > Signed-off-by: Marek Vasut Reviewed-by: Andrew Lunn Andrew

[PATCH V3 06/10] net: dsa: microchip: Factor out register access opcode generation

2019-06-23 Thread Marek Vasut
Factor out the code which sends out the register read/write opcodes to the switch, since the code differs in single bit between read and write. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh --- V2: New patch V3: - Rebase on next/master - T

[PATCH V3 09/10] net: dsa: microchip: Factor out regmap config generation into common header

2019-06-23 Thread Marek Vasut
The regmap config tables are rather similar for various generations of the KSZ8xxx/KSZ9xxx switches. Introduce a macro which allows generating those tables without duplication. Note that $regalign parameter is not used right now, but will be used in KSZ87xx series switches. Signed-off-by: Marek Va

[PATCH V3 01/10] net: dsa: microchip: Remove ksz_{read,write}24()

2019-06-23 Thread Marek Vasut
These functions and callbacks are never used, remove them. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh --- V2: No change V3: - Rebase on next/master - Test on KSZ9477EVB --- drivers/net/dsa/microchip/ksz9477_spi.c | 25 -

[PATCH V3 08/10] net: dsa: microchip: Dispose of ksz_io_ops

2019-06-23 Thread Marek Vasut
Since the driver now uses regmap , get rid of ad-hoc ksz_io_ops abstraction, which no longer has any meaning. Moreover, since regmap has it's own locking, get rid of the register access mutex. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh ---

[PATCH V3 10/10] net: dsa: microchip: Replace ad-hoc bit manipulation with regmap

2019-06-23 Thread Marek Vasut
Regmap provides bit manipulation functions to set/clear bits, use those insted of reimplementing them. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh --- V2: New patch V3: - Rebase on next/master - Test on KSZ9477EVB --- drivers/net/dsa/mi

[PATCH V3 07/10] net: dsa: microchip: Initial SPI regmap support

2019-06-23 Thread Marek Vasut
Add basic SPI regmap support into the driver. Previous patches unconver that ksz_spi_write() is always ever called with len = 1, 2 or 4. We can thus drop the if (len > SPI_TX_BUF_LEN) check and we can also drop the allocation of the txbuf which is part of the driver data and wastes 256 bytes for n

[PATCH V3 04/10] net: dsa: microchip: Move ksz_cfg and ksz_port_cfg to ksz9477.c

2019-06-23 Thread Marek Vasut
These functions are only used by the KSZ9477 code, move them from the header into that code. Note that these functions will be soon replaced by regmap equivalents. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh --- V2: New patch V3: - Rebase on

[PATCH V3 00/10] net: dsa: microchip: Convert to regmap

2019-06-23 Thread Marek Vasut
This patchset converts KSZ9477 switch driver to regmap. This was tested with extra patches on KSZ8795. This was also tested on KSZ9477 on Microchip KSZ9477EVB board, which I now have. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Marek Vasut

[PATCH V3 03/10] net: dsa: microchip: Inline ksz_spi.h

2019-06-23 Thread Marek Vasut
The functions in the header file are static, and the header file is included from single C file, just inline the code into the C file. The bonus is that it's easier to spot further content to clean up. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung

[PATCH V3 02/10] net: dsa: microchip: Remove ksz_{get,set}()

2019-06-23 Thread Marek Vasut
These functions and callbacks are never used, remove them. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh --- V2: No change V3: - Rebase on next/master - Test on KSZ9477EVB --- drivers/net/dsa/microchip/ksz9477_spi.c | 2 -- drivers/net/d

[PATCH V3 05/10] net: dsa: microchip: Use PORT_CTRL_ADDR() instead of indirect function call

2019-06-23 Thread Marek Vasut
The indirect function call to dev->dev_ops->get_port_addr() is expensive especially if called for every single register access, and only returns the value of PORT_CTRL_ADDR() macro. Use PORT_CTRL_ADDR() macro directly instead. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc:

Re: [PATCH v2 0/3] fix bugs when enable route_localnet

2019-06-23 Thread David Ahern
On 6/22/19 6:46 AM, David Miller wrote: > From: Zhiqiang Liu > Date: Sat, 22 Jun 2019 16:41:49 +0800 > >> Friendly ping ... > > I'm not applying this patch series without someone reviewing it. > I have stared at it a few times since the patches were sent and can not find anything obviously wro

Re: [PATCH net-next 1/7] net: aquantia: replace internal driver version code with uts

2019-06-23 Thread Jakub Kicinski
On Sat, 22 Jun 2019 17:05:14 +0200, Andrew Lunn wrote: > On Sat, Jun 22, 2019 at 01:45:12PM +, Igor Russkikh wrote: > > As it was discussed some time previously, driver is better to > > report kernel version string, as it in a best way identifies > > the codebase. > > > > Signed-off-by: Igor R

[PATCH net] net/tls: fix page double free on TX cleanup

2019-06-23 Thread Jakub Kicinski
From: Dirk van der Merwe With commit 94850257cf0f ("tls: Fix tls_device handling of partial records") a new path was introduced to cleanup partial records during sk_proto_close. This path does not handle the SW KTLS tx_list cleanup. This is unnecessary though since the free_resources calls for b

[net-next v2] tipc: add loopback device tracking

2019-06-23 Thread john . rutherford
Since node internal messages are passed directly to socket it is not possible to observe this message exchange via tcpdump or wireshark. We now remedy this by making it possible to clone such messages and send the clones to the loopback interface. The clones are dropped at reception and have no f

[net-next] tipc: fix missing indentation in source code

2019-06-23 Thread john . rutherford
Fix misalignment of policy statement in netlink.c due to automatic spatch code transformation. Fixes: 3b0f31f2b8c9 ("genetlink: make policy common to family") Acked-by: Jon Maloy Signed-off-by: John Rutherford --- net/tipc/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --