Re: [PATCH net-next 0/2] Minor cleanup in devlink

2019-08-31 Thread David Miller
From: Jakub Kicinski Date: Fri, 30 Aug 2019 23:14:36 -0700 > On Fri, 30 Aug 2019 05:39:43 -0500, Parav Pandit wrote: >> Two minor cleanup in devlink. >> >> Patch-1 Explicitly defines devlink port index as unsigned int >> Patch-2 Uses switch-case to handle different port flavours attributes > >

Re: [PATCH net] tc-testing: don't hardcode 'ip' in nsPlugin.py

2019-08-31 Thread David Miller
From: Davide Caratti Date: Fri, 30 Aug 2019 18:51:47 +0200 > the following tdc test fails on Fedora: > > # ./tdc.py -e 2638 > -- ns/SubPlugin.__init__ > Test 2638: Add matchall and try to get it > -> prepare stage *** Could not execute: "$TC qdisc add dev $DEV1 clsact" > -> prepare

Re: [PATCH net-next v3 0/3] net: tls: add socket diag

2019-08-31 Thread David Miller
From: Davide Caratti Date: Fri, 30 Aug 2019 12:25:46 +0200 > The current kernel does not provide any diagnostic tool, except > getsockopt(TCP_ULP), to know more about TCP sockets that have an upper > layer protocol (ULP) on top of them. This series extends the set of > information exported by INE

Re: [PATCH net-next 0/3] dpaa2-eth: Add new statistics counters

2019-08-31 Thread David Miller
From: Jakub Kicinski Date: Fri, 30 Aug 2019 23:12:19 -0700 > On Fri, 30 Aug 2019 13:20:40 +0300, Ioana Radulescu wrote: >> Recent firmware versions offer access to more DPNI statistics >> counters. Add the relevant ones to ethtool interface stats. >> >> Also we can now make use of a new counter

Re: [PATCH v2 net] net: Properly update v4 routes with v6 nexthop

2019-08-31 Thread David Ahern
On 8/31/19 6:22 AM, Donald Sharp wrote: > When creating a v4 route that uses a v6 nexthop from a nexthop group. > Allow the kernel to properly send the nexthop as v6 via the RTA_VIA > attribute. > Dave: I am on PTO with little time through Monday. I will review/test on Tuesday.

Re: [PATCH v2 net 0/3] Fix issues in tc-taprio and tc-cbs

2019-08-31 Thread David Miller
From: Vladimir Oltean Date: Fri, 30 Aug 2019 04:07:20 +0300 > This series fixes one panic and one WARN_ON found in the tc-taprio > qdisc, while trying to apply it: > > - On an interface which is not multi-queue > - On an interface which has no carrier > > The tc-cbs was also visually found to s

Re: [PATCH net 0/5] net: aquantia: fixes on vlan filters and other conditions

2019-08-31 Thread David Miller
From: Jakub Kicinski Date: Fri, 30 Aug 2019 23:28:56 -0700 > On Fri, 30 Aug 2019 12:08:28 +, Igor Russkikh wrote: >> Here is a set of various bug fixes related to vlan filter offload and >> two other rare cases. > > LGTM, Fixes tag should had been first there on patch 4. Series applied with

Re: [PATCH net-next 0/4] qed*: Enhancements.

2019-08-31 Thread David Miller
From: Sudarsana Reddy Kalluru Date: Fri, 30 Aug 2019 00:42:02 -0700 > The patch series adds couple of enhancements to qed/qede drivers. > - Support for dumping the config id attributes via ethtool -w/W. > - Support for dumping the GRC data of required memory regions using > ethtool -w/W i

Re: [PATCH v3 net-next 0/2] Dynamic toggling of vlan_filtering for SJA1105 DSA

2019-08-31 Thread David Miller
From: Vladimir Oltean Date: Fri, 30 Aug 2019 03:53:23 +0300 > This patchset addresses a limitation in dsa_8021q where this sequence of > commands was causing the switch to stop forwarding traffic: > > ip link add name br0 type bridge vlan_filtering 0 > ip link set dev swp2 master br0 > ech

[PATCH net-next 09/10] net: dsa: mv88e6xxx: introduce .serdes_irq_status

2019-08-31 Thread Vivien Didelot
Introduce a new .serdes_irq_status operation to prepare the abstraction of IRQ thread from the SERDES IRQ setup code. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 11 ++ drivers/net/dsa/mv88e6xxx/chip.h | 2 + drivers/net/dsa/mv88e6xxx/serdes.c | 59 +

Re: [PATCH] net: dsa: microchip: fill regmap_config name

2019-08-31 Thread David Miller
From: George McCollister Date: Thu, 29 Aug 2019 09:14:41 -0500 > Use the register value width as the regmap_config name to prevent the > following error when the second and third regmap_configs are > initialized. > "debugfs: Directory '${bus-id}' with parent 'regmap' already present!" > > Signe

[PATCH net-next 08/10] net: dsa: mv88e6xxx: introduce .serdes_irq_enable

2019-08-31 Thread Vivien Didelot
Introduce a new .serdes_irq_enable operation to prepare the abstraction of IRQ enabling from the SERDES IRQ setup code. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 11 + drivers/net/dsa/mv88e6xxx/chip.h | 2 + drivers/net/dsa/mv88e6xxx/port.c | 4 +- drivers/

[PATCH net-next 07/10] net: dsa: mv88e6xxx: pass lane to .serdes_power

2019-08-31 Thread Vivien Didelot
Now the first step of all .serdes_power implementations is getting the lane mapping. Since we have an operation for that, call it in the wrapper and pass the lane down to the .serdes_power operation. This also allows to avoid querying the SERDES lane twice in mv88e6xxx_port_set_cmode. At the same

[PATCH net-next 02/10] net: dsa: mv88e6xxx: fix SERDES IRQ mapping

2019-08-31 Thread Vivien Didelot
The current mv88e6xxx SERDES code checks for negative error code from irq_find_mapping, while this function returns an unsigned integer. This patch removes this dead code and simply returns 0 is no IRQ is found. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.h | 2 +- driver

[PATCH net-next 04/10] net: dsa: mv88e6xxx: simplify .serdes_get_lane

2019-08-31 Thread Vivien Didelot
Because the mapping between a SERDES interface and its lane is static, we don't need to stick with negative error codes actually and we can simply return 0 if there is no lane, just like the IRQ mapping. This way we can keep a simple and intuitive API using unsigned lane numbers while simplifying

[PATCH net-next 03/10] net: dsa: mv88e6xxx: introduce .serdes_irq_mapping

2019-08-31 Thread Vivien Didelot
Introduce a new .serdes_irq_mapping operation to prepare the abstraction of IRQ mapping from the SERDES IRQ setup code. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 11 +++ drivers/net/dsa/mv88e6xxx/chip.h | 2 ++ drivers/net/dsa/mv88e6xxx/serdes.c | 26 +

[PATCH net-next 10/10] net: dsa: mv88e6xxx: centralize SERDES IRQ handling

2019-08-31 Thread Vivien Didelot
The .serdes_irq_setup are all following the same steps: get the SERDES lane, get the IRQ mapping, request the IRQ, then enable it. So do the .serdes_irq_free implementations: get the SERDES lane, disable the IRQ, then free it. This patch removes these operations in favor of generic functions. Sig

[PATCH net-next 01/10] net: dsa: mv88e6xxx: check errors in mv88e6352_serdes_irq_link

2019-08-31 Thread Vivien Didelot
The mv88e6352_serdes_irq_link helper is not checking for any error that may occur during hardware accesses. Worst, the "up" boolean is set from the potentially unused "status" variable, if read operations failed. As done in mv88e6390_serdes_irq_link_sgmii, return right away and do not call dsa_por

[PATCH net-next 05/10] net: dsa: mv88e6xxx: implement mv88e6352_serdes_get_lane

2019-08-31 Thread Vivien Didelot
Even though 88E6352 has no dedicated lane for SERDES interfaces, it uses a similar code as the other .serdes_get_lane implementations to check the port's CMODE and ensure that SERDES operations are doable. For consistency, implement mv88e6352_serdes_get_lane for the 88E6352 and similar switches wh

[PATCH net-next 06/10] net: dsa: mv88e6xxx: merge mv88e6352_serdes_power_set

2019-08-31 Thread Vivien Didelot
The mv88e6352_serdes_power_set helper is only used at one place, in mv88e6352_serdes_power. Keep it simple and merge the two functions together. Use mv88e6xxx_serdes_get_lane instead of mv88e6352_port_has_serdes to avoid moving code. No functional changes. Signed-off-by: Vivien Didelot --- driv

[PATCH net-next 00/10] net: dsa: mv88e6xxx: centralize SERDES IRQ handling

2019-08-31 Thread Vivien Didelot
Following Marek's work on the abstraction of the SERDES lanes mapping, this series trades the .serdes_irq_setup and .serdes_irq_free callbacks for new .serdes_irq_mapping, .serdes_irq_enable and .serdes_irq_status operations. This has the benefit to limit the various SERDES implementations to simp

Re: [RFC PATCH v2 net-next 00/15] tc-taprio offload for SJA1105 DSA

2019-08-31 Thread Andrew Lunn
> I'm not 100% sure how taprio handles locking TBH, it just seems naive > that HW callback will not need to sleep, so the kernel should make sure > that callback can sleep. Otherwise we'll end up with 3/4 of drivers > implementing some async work routine... Hi Jakub I suspect this is because unti

Re: [PATCH] net: dsa: Fix off-by-one number of calls to devlink_port_unregister

2019-08-31 Thread Vivien Didelot
On Sat, 31 Aug 2019 15:46:19 +0300, Vladimir Oltean wrote: > When a function such as dsa_slave_create fails, currently the following > stack trace can be seen: > > [2.038342] sja1105 spi0.1: Probed switch chip: SJA1105T > [2.054556] sja1105 spi0.1: Reset switch and programmed static confi

Re: [PATCH] net: dsa: Fix off-by-one number of calls to devlink_port_unregister

2019-08-31 Thread Vivien Didelot
Hi Vladimir, On Sat, 31 Aug 2019 19:54:40 +0300, Vladimir Oltean wrote: > Fine, I had not noticed the "registered" field from devlink_port. > But I fail to see how dsa_port_teardown can be entered in the generic > case from whatever failure state dsa_port_setup left it in. What if > it's a DSA_PO

Re: [RFC PATCH v2 net-next 00/15] tc-taprio offload for SJA1105 DSA

2019-08-31 Thread Vladimir Oltean
On Sat, 31 Aug 2019 at 01:29, Jakub Kicinski wrote: > > On Fri, 30 Aug 2019 13:11:11 +0300, Vladimir Oltean wrote: > > On Fri, 30 Aug 2019 at 04:21, Jakub Kicinski wrote: > > > On Fri, 30 Aug 2019 03:46:20 +0300, Vladimir Oltean wrote: > > > > - Configuring the switch over SPI cannot apparently be

Re: [PATCH] net: dsa: Fix off-by-one number of calls to devlink_port_unregister

2019-08-31 Thread Vladimir Oltean
Hi Vivien, On Sat, 31 Aug 2019 at 19:20, Vivien Didelot wrote: > > Hi Vladimir, > > On Sat, 31 Aug 2019 15:46:19 +0300, Vladimir Oltean wrote: > > When a function such as dsa_slave_create fails, currently the following > > stack trace can be seen: > > > > [2.038342] sja1105 spi0.1: Probed sw

Re: [PATCH] net: dsa: Fix off-by-one number of calls to devlink_port_unregister

2019-08-31 Thread Vivien Didelot
Hi Vladimir, On Sat, 31 Aug 2019 15:46:19 +0300, Vladimir Oltean wrote: > When a function such as dsa_slave_create fails, currently the following > stack trace can be seen: > > [2.038342] sja1105 spi0.1: Probed switch chip: SJA1105T > [2.054556] sja1105 spi0.1: Reset switch and programme

Re: iproute2: tc: potential buffer overflow

2019-08-31 Thread Stephen Hemminger
On Sat, 31 Aug 2019 15:13:27 +0200 (CEST) wrote: > Hi, > > there are two potentially dangerous calls of strcpy function in the program > "tc". In the attachment is a patch that fixes this issue. > > Tomas This looks correct. Please fix with strlcpy() instead; that is clearer. Plus you can us

Re: [PATCH 0/4 net-next] flow_offload: update mangle action representation

2019-08-31 Thread Pablo Neira Ayuso
On Fri, Aug 30, 2019 at 03:33:51PM -0700, Jakub Kicinski wrote: > On Fri, 30 Aug 2019 11:07:10 +0200, Pablo Neira Ayuso wrote: > > > > * The front-end coalesces consecutive pedit actions into one single > > > > word, so drivers can mangle IPv6 and ethernet address fields in one > > > > single g

iproute2: tc: potential buffer overflow

2019-08-31 Thread tomaspaukrt
Hi, there are two potentially dangerous calls of strcpy function in the program "tc". In the attachment is a patch that fixes this issue. Tomasdiff --git a/tc/m_ipt.c b/tc/m_ipt.c index cc95eab7..cb64380b 100644 --- a/tc/m_ipt.c +++ b/tc/m_ipt.c @@ -269,7 +269,8 @@ static int build_st(struct xta

[PATCH] net: dsa: Fix off-by-one number of calls to devlink_port_unregister

2019-08-31 Thread Vladimir Oltean
When a function such as dsa_slave_create fails, currently the following stack trace can be seen: [2.038342] sja1105 spi0.1: Probed switch chip: SJA1105T [2.054556] sja1105 spi0.1: Reset switch and programmed static config [2.063837] sja1105 spi0.1: Enabled switch tagging [2.068706]

[PATCH net-next] net: hns3: remove set but not used variable 'qos'

2019-08-31 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_restore_vlan_table': drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:8016:18: warning: variable 'qos' set but not used [-Wunused-but-set-variable] Reported-by: Hulk

[PATCH v2 net] net: Properly update v4 routes with v6 nexthop

2019-08-31 Thread Donald Sharp
When creating a v4 route that uses a v6 nexthop from a nexthop group. Allow the kernel to properly send the nexthop as v6 via the RTA_VIA attribute. Broken behavior: $ ip nexthop add via fe80::9 dev eth0 $ ip nexthop show id 1 via fe80::9 dev eth0 scope link $ ip route add 4.5.6.7/32 nhid 1 $ ip

Re: [PATCH net-next 03/14] bnxt_en: Refactor bnxt_sriov_enable().

2019-08-31 Thread Leon Romanovsky
On Fri, Aug 30, 2019 at 09:00:27AM -0700, Michael Chan wrote: > On Fri, Aug 30, 2019 at 2:18 AM Leon Romanovsky wrote: > > > > On Mon, Aug 26, 2019 at 09:00:45AM +0300, Leon Romanovsky wrote: > > > On Sun, Aug 25, 2019 at 11:54:54PM -0400, Michael Chan wrote: > > > > Refactor the hardware/firmware