Re: [PATCH ethtool] ethtool: add support show/set-hwtstamp

2020-09-02 Thread Michal Kubecek
On Tue, Sep 01, 2020 at 08:36:08PM -0400, Kevin Yang wrote: > On Tue, Sep 1, 2020 at 6:02 PM Andrew Lunn wrote: > > On Tue, Sep 01, 2020 at 05:20:09PM -0400, Kevin(Yudong) Yang wrote: > > > Before this patch, ethtool has -T/--show-time-stamping that only > > > shows the device's time stamping capa

Re: KASAN: use-after-free Write in xp_put_pool

2020-09-02 Thread Daniel Borkmann
On 9/2/20 8:57 AM, syzbot wrote: Hello, syzbot found the following issue on: Magnus/Bjorn, ptal, thanks! HEAD commit:dc1a9bf2 octeontx2-pf: Add UDP segmentation offload support git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=16ff67de90 kernel config

RE: KASAN: use-after-free Write in xp_put_pool

2020-09-02 Thread Karlsson, Magnus
> -Original Message- > From: Daniel Borkmann > Sent: Wednesday, September 2, 2020 9:06 AM > To: syzbot ; > a...@linux-foundation.org; andr...@fb.com; a...@kernel.org; Topel, Bjorn > ; b...@vger.kernel.org; da...@davemloft.net; > h...@kernel.org; john.fastab...@gmail.com; jonathan.le...@g

Re: KASAN: use-after-free Write in xp_put_pool

2020-09-02 Thread Magnus Karlsson
On Wed, Sep 2, 2020 at 9:06 AM Daniel Borkmann wrote: > > On 9/2/20 8:57 AM, syzbot wrote: > > Hello, > > > > syzbot found the following issue on: > > Magnus/Bjorn, ptal, thanks! On it as we speak. > > HEAD commit:dc1a9bf2 octeontx2-pf: Add UDP segmentation offload support > > git tree:

Re: [net] tipc: fix using smp_processor_id() in preemptible

2020-09-02 Thread Eric Dumazet
On 9/1/20 10:52 AM, Tuong Tong Lien wrote: > Ok, I've got your concern now. Actually when writing this code, I had the > same thought as you, but decided to relax it because of the following reasons: > 1. I don't want to use any locking methods here that can lead to competition > (thus affect

general protection fault in xsk_diag_dump (2)

2020-09-02 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:dc1a9bf2 octeontx2-pf: Add UDP segmentation offload support git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=146061d190 kernel config: https://syzkaller.appspot.com/x/.config?x=b6856d16f78d8fa9 dash

general protection fault in xsk_is_setup_for_bpf_map

2020-09-02 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:dc1a9bf2 octeontx2-pf: Add UDP segmentation offload support git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=1442d38e90 kernel config: https://syzkaller.appspot.com/x/.config?x=b6856d16f78d8fa9 dash

Re: [PATCH net-next] net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc

2020-09-02 Thread Eric Dumazet
On 9/1/20 11:34 PM, Yunsheng Lin wrote: > > I am not familiar with TCQ_F_CAN_BYPASS. > From my understanding, the problem is that there is no order between > qdisc enqueuing and qdisc reset. Thw qdisc_reset() should be done after rcu grace period, when there is guarantee no enqueue is in pro

[PATCH bpf-next] xsk: fix use-after-free in failed shared_umem bind

2020-09-02 Thread Magnus Karlsson
Fix use-after-free when a shared umem bind fails. The code incorrectly tried to free the allocated buffer pool both in the bind code and then later also when the socket was released. Fix this by setting the buffer pool pointer to NULL after the bind code has freed the pool, so that the socket relea

Re: [PATCH bpf v1] libbpf: fix build failure from uninitialized variable warning

2020-09-02 Thread Tony Ambardar
On Mon, 31 Aug 2020 at 07:59, Daniel Borkmann wrote: > > On 8/31/20 2:03 AM, Tony Ambardar wrote: > > While compiling libbpf, some GCC versions (at least 8.4.0) have difficulty > > determining control flow and a emit warning for potentially uninitialized > > usage of 'map', which results in a buil

[PATCH mlx5-next v1 2/3] RDMA/mlx5: Delete duplicated mlx5_ptys_width enum

2020-09-02 Thread Leon Romanovsky
From: Aharon Landau Combine two same enums to avoid duplication. Signed-off-by: Aharon Landau Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/main.c | 20 ++- .../mellanox/mlx5/core/ipoib/ethtool.c| 8

[PATCH rdma-next v1 0/3] Fix in-kernel active_speed type

2020-09-02 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v1: * Changed patch #1 to fix memory corruption to help with bisect. No change in series, because the added code is changed anyway in patch #3. v0: * https://lore.kernel.org/linux-rdma/20200824105826.1093613-1-l...@kernel.org -

[PATCH mlx5-next v1 1/3] net/mlx5: Refactor query port speed functions

2020-09-02 Thread Leon Romanovsky
From: Aharon Landau The functions mlx5_query_port_link_width_oper and mlx5_query_port_ib_proto_oper are always called together, so combine them to a new function called mlx5_query_port_oper to avoid duplication. And while the mlx5i_get_port_settings is the same as mlx5_query_port_oper therefore

Re: [PATCH net-next RFC v3 00/14] Add devlink reload action option

2020-09-02 Thread Jiri Pirko
Tue, Sep 01, 2020 at 09:16:17PM CEST, mo...@nvidia.com wrote: > >On 8/31/2020 1:49 PM, Jiri Pirko wrote: >> Sun, Aug 30, 2020 at 05:27:20PM CEST, mo...@mellanox.com wrote: >> > Introduce new option on devlink reload API to enable the user to select the >> > reload action required. Complete support

Re: [PATCH net-next 2/3] devlink: Consider other controller while building phys_port_name

2020-09-02 Thread Jiri Pirko
Wed, Sep 02, 2020 at 06:26:12AM CEST, pa...@nvidia.com wrote: > > >> From: Jakub Kicinski >> Sent: Wednesday, September 2, 2020 2:59 AM >> >> On Tue, 1 Sep 2020 11:17:42 +0200 Jiri Pirko wrote: >> > >> The external PFs need to have an extra attribute with "external >> > >> enumeration" what would

Re: [PATCH net-next] net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc

2020-09-02 Thread Yunsheng Lin
On 2020/9/2 15:32, Eric Dumazet wrote: > > > On 9/1/20 11:34 PM, Yunsheng Lin wrote: > >> >> I am not familiar with TCQ_F_CAN_BYPASS. >> From my understanding, the problem is that there is no order between >> qdisc enqueuing and qdisc reset. > > Thw qdisc_reset() should be done after rcu grace

Re: [RFC v2 09/11] HID: hyperv: Make ringbuffer at least take two pages

2020-09-02 Thread Jiri Kosina
On Wed, 2 Sep 2020, Boqun Feng wrote: > When PAGE_SIZE > HV_HYP_PAGE_SIZE, we need the ringbuffer size to be at > least 2 * PAGE_SIZE: one page for the header and at least one page of > the data part (because of the alignment requirement for double mapping). > > So make sure the ringbuffer sizes

[PATCH] libbpf: Remove arch-specific include path in Makefile

2020-09-02 Thread Naveen N. Rao
Ubuntu mainline builds for ppc64le are failing with the below error (*): CALL/home/kernel/COD/linux/scripts/atomic/check-atomics.sh DESCEND bpf/resolve_btfids Auto-detecting system features: ...libelf: [ [32mon[m ] ... zlib: [ [3

[PATCH bpf-next] xsk: fix possible segfault in xsk umem diagnostics

2020-09-02 Thread Magnus Karlsson
Fix possible segfault in the xsk diagnostics code when dumping information about the umem. This can happen when a umem has been created, but the socket has not been bound yet. In this case, the xsk buffer pool does not exist yet and we cannot dump the information that was moved from the umem to the

[PATCH bpf-next] xsk: fix possible segfault at xskmap entry insertion

2020-09-02 Thread Magnus Karlsson
Fix possible segfault when entry is inserted into xskmap. This can happen if the socket is in a state where the umem has been set up, the Rx ring created but it has yet to be bound to a device. In this case the pool has not yet been created and we cannot reference it for the existence of the fill r

Re: [PATCH net-next] net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc

2020-09-02 Thread Eric Dumazet
On 9/2/20 1:14 AM, Yunsheng Lin wrote: > On 2020/9/2 15:32, Eric Dumazet wrote: >> >> >> On 9/1/20 11:34 PM, Yunsheng Lin wrote: >> >>> >>> I am not familiar with TCQ_F_CAN_BYPASS. >>> From my understanding, the problem is that there is no order between >>> qdisc enqueuing and qdisc reset. >> >>

[PATCH] amd-xgbe: Add support for new port mode

2020-09-02 Thread Shyam Sundar S K
Add support for a new port mode that is a backplane connection without support for auto negotiation. Signed-off-by: Shyam Sundar S K --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/d

[PATCH net 0/3] hinic: BugFixes

2020-09-02 Thread Luo bin
The bugs fixed in this patchset have been present since the following commits: patch #1: Fixes: 00e57a6d4ad3 ("net-next/hinic: Add Tx operation") patch #2: Fixes: 5e126e7c4e52 ("hinic: add firmware update support") patch #3: Fixes: 2eed5a8b614b ("hinic: add set_channels ethtool_ops support") Luo b

[PATCH net 1/3] hinic: bump up the timeout of SET_FUNC_STATE cmd

2020-09-02 Thread Luo bin
We free memory regardless of the return value of SET_FUNC_STATE cmd in hinic_close function to avoid memory leak and this cmd may timeout when fw is busy with handling other cmds, so we bump up the timeout of this cmd to ensure it won't return failure. Fixes: 00e57a6d4ad3 ("net-next/hinic: Add Tx

[PATCH net 3/3] hinic: fix bug of send pkts while setting channels

2020-09-02 Thread Luo bin
When calling hinic_close in hinic_set_channels, netif_carrier_off and netif_tx_disable are excuted, and TX host resources are freed after that. Core may call hinic_xmit_frame to send pkt after netif_tx_disable within a short time, so we should judge whether carrier is on before sending pkt otherwis

[PATCH net 2/3] hinic: bump up the timeout of UPDATE_FW cmd

2020-09-02 Thread Luo bin
Firmware erases the entire flash region which may take several seconds before flashing, so we bump up the timeout to ensure this cmd won't return failure. Fixes: 5e126e7c4e52 ("hinic: add firmware update support") Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c | 4 +

Re: [PATCH bpf-next v3 4/8] libbpf: implement bpf_prog_find_metadata

2020-09-02 Thread Toke Høiland-Jørgensen
Alexei Starovoitov writes: > On Mon, Aug 31, 2020 at 08:40:01AM -0700, s...@google.com wrote: >> On 08/28, Toke H�iland-J�rgensen wrote: >> > Stanislav Fomichev writes: >> >> > > This is a low-level function (hence in bpf.c) to find out the metadata >> > > map id for the provided program fd. >>

Re: [PATCH net-next RFC v3 01/14] devlink: Add reload action option to devlink reload command

2020-09-02 Thread Jiri Pirko
Tue, Sep 01, 2020 at 09:43:00PM CEST, mo...@nvidia.com wrote: > >On 8/31/2020 3:15 PM, Jiri Pirko wrote: >> Sun, Aug 30, 2020 at 05:27:21PM CEST, mo...@mellanox.com wrote: >> > Add devlink reload action to allow the user to request a specific reload >> > action. The action parameter is optional, if

Re: [PATCH net 3/3] hinic: fix bug of send pkts while setting channels

2020-09-02 Thread Eric Dumazet
On 9/2/20 2:41 AM, Luo bin wrote: > When calling hinic_close in hinic_set_channels, netif_carrier_off > and netif_tx_disable are excuted, and TX host resources are freed > after that. Core may call hinic_xmit_frame to send pkt after > netif_tx_disable within a short time, so we should judge whet

[PATCH] tipc: fix shutdown() of connectionless socket

2020-09-02 Thread Tetsuo Handa
syzbot is reporting hung task at nbd_ioctl() [1], for there are two problems regarding TIPC's connectionless socket's shutdown() operation. I found C reproducer for this problem (shown below) from "no output from test machine (2)" report. -- int main(int argc, char *argv[]) { cons

[PATCH] net: bcmgenet: fix mask check in bcmgenet_validate_flow()

2020-09-02 Thread Denis Efremov
VALIDATE_MASK(eth_mask->h_source) is checked twice in a row in bcmgenet_validate_flow(). Add VALIDATE_MASK(eth_mask->h_dest) instead. Fixes: 3e370952287c ("net: bcmgenet: add support for ethtool rxnfc flows") Cc: sta...@vger.kernel.org Signed-off-by: Denis Efremov --- I'm not sure that h_dest che

[PATCH net-next v2 00/15] net: bridge: mcast: initial IGMPv3 support (part 1)

2020-09-02 Thread Nikolay Aleksandrov
Hi all, This patch-set implements the control plane for initial IGMPv3 support which takes care of include/exclude sets and state transitions based on the different report types. Patch 01 arranges the structure better by moving the frequently used fields together, patches 02 and 03 add support for

[PATCH net-next v2 01/15] net: bridge: mdb: arrange internal structs so fast-path fields are close

2020-09-02 Thread Nikolay Aleksandrov
Before this patch we'd need 2 cache lines for fast-path, now all used fields are in the first cache line. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_private.h | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/net/bridge/br_private.h b/net/bridge/br_priv

[PATCH net-next v2 03/15] net: bridge: mcast: add support for src list and filter mode dumping

2020-09-02 Thread Nikolay Aleksandrov
Support per port group src list (address and timer) and filter mode dumping. Protected by either multicast_lock or rcu and currently limited only to IPv4. v2: require RCU or multicast_lock to traverse src groups Signed-off-by: Nikolay Aleksandrov --- include/uapi/linux/if_bridge.h | 21

[PATCH net-next v2 02/15] net: bridge: mcast: add support for group source list

2020-09-02 Thread Nikolay Aleksandrov
Initial functions for group source lists which are needed for IGMPv3 include/exclude lists. Currently only IPv4 sources are supported. User-added mdb entries are created with exclude filter mode, we can extend that later to allow user-supplied mode. When group src entries are deleted, they're freed

[PATCH net-next v2 06/15] net: bridge: mcast: add support for group query retransmit

2020-09-02 Thread Nikolay Aleksandrov
We need to be able to retransmit group-specific and group-and-source specific queries. The new timer takes care of those. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_multicast.c | 65 ++- net/bridge/br_private.h | 8 + 2 files changed, 65 inser

[PATCH net-next v2 04/15] net: bridge: mcast: add support for group-and-source specific queries

2020-09-02 Thread Nikolay Aleksandrov
Allows br_ip4_multicast_alloc_query to build queries with the port group's source lists and sends a query for sources over and under lmqt when necessary as per RFC 3376 with the suppress flag set appropriately. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_multicast.c | 126 ++

[PATCH net-next v2 14/15] net: bridge: mcast: improve v3 query processing

2020-09-02 Thread Nikolay Aleksandrov
When an IGMPv3 query is received and we're operating in v3 mode then we need to avoid updating group timers if the suppress flag is set. Also we should update only timers for groups in exclude mode. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_multicast.c | 7 +-- 1 file changed, 5 i

[PATCH net-next v2 12/15] net: bridge: mcast: support for IGMPV3_CHANGE_TO_INCLUDE/EXCLUDE report

2020-09-02 Thread Nikolay Aleksandrov
In order to process IGMPV3_CHANGE_TO_INCLUDE/EXCLUDE report types we need new helpers which allow us to mark entries based on their timer state and to query only marked entries. v2: directly do flag bit operations Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_multicast.c | 267 ++

[PATCH net-next v2 13/15] net: bridge: mcast: support for IGMPV3_BLOCK_OLD_SOURCES report

2020-09-02 Thread Nikolay Aleksandrov
We already have all necessary helpers, so process IGMPV3_BLOCK_OLD_SOURCES as per the RFC. v2: directly do flag bit operations Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_multicast.c | 90 +++ 1 file changed, 90 insertions(+) diff --git a/net/bridge

[PATCH net-next v2 10/15] net: bridge: mcast: support for IGMPv3 IGMPV3_ALLOW_NEW_SOURCES report

2020-09-02 Thread Nikolay Aleksandrov
This patch adds handling for the IGMPV3_ALLOW_NEW_SOURCES IGMPv3 report type and limits it only when multicast_igmp_version == 3. Now that IGMPv3 handling functions will be managing timers we need to delay their activation, thus a new argument is added which controls if the timer should be updated.

[PATCH net-next v2 05/15] net: bridge: mcast: factor out port group del

2020-09-02 Thread Nikolay Aleksandrov
In order to avoid future errors and reduce code duplication we should factor out the port group del sequence. This allows us to have one function which takes care of all details when removing a port group. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_mdb.c | 15 +- net/brid

[PATCH net-next v2 11/15] net: bridge: mcast: support for IGMPV3_MODE_IS_INCLUDE/EXCLUDE report

2020-09-02 Thread Nikolay Aleksandrov
In order to process IGMPV3_MODE_IS_INCLUDE/EXCLUDE report types we need some new helpers which allow us to set/clear flags for all current entries and later delete marked entries after the report sources have been processed. v2: drop flag helpers and directly do flag bit operations Signed-off-by:

[PATCH net-next v2 08/15] net: bridge: mdb: use mdb and port entries in notifications

2020-09-02 Thread Nikolay Aleksandrov
We have to use mdb and port entries when sending mdb notifications in order to fill in all group attributes properly. Before this change we would've used a fake br_mdb_entry struct to fill in only partial information about the mdb. Now we can also reuse the mdb dump fill function and thus have only

[PATCH net-next v2 09/15] net: bridge: mcast: delete expired port groups without srcs

2020-09-02 Thread Nikolay Aleksandrov
If an expired port group is in EXCLUDE mode, then we have to turn it into INCLUDE mode, remove all srcs with zero timer and finally remove the group itself if there are no more srcs with an active timer. For IGMPv2 use there would be no sources, so this will reduce to just removing the group as bef

[PATCH net-next v2 07/15] net: bridge: mdb: push notifications in __br_mdb_add/del

2020-09-02 Thread Nikolay Aleksandrov
This change is in preparation for using the mdb port group entries when sending a notification, so their full state and additional attributes can be filled in. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_mdb.c | 20 1 file changed, 8 insertions(+), 12 deletions(-)

[PATCH net-next v2 15/15] net: bridge: mcast: destroy all entries via gc

2020-09-02 Thread Nikolay Aleksandrov
Since each entry type has timers that can be running simultaneously we need to make sure that entries are not freed before their timers have finished. In order to do that generalize the src gc work to mcast gc work and use a callback to free the entries (mdb, port group or src). Signed-off-by: Nik

[PATCH net-next] selftests: mptcp: fix typo in mptcp_connect usage

2020-09-02 Thread Davide Caratti
in mptcp_connect, 's' selects IPPROTO_MPTCP / IPPROTO_TCP as the value of 'protocol' in socket(), and 'm' switches between different send / receive modes. Fix die_usage(): swap 'm' and 's' and add missing 'sendfile' mode. Signed-off-by: Davide Caratti --- tools/testing/selftests/net/mptcp/mptcp_

Re: COMPILE_TEST

2020-09-02 Thread Alex Elder
On 9/1/20 7:52 PM, Randy Dunlap wrote: > On 9/1/20 5:17 PM, Jakub Kicinski wrote: >> On Tue, 1 Sep 2020 23:48:52 +0200 Andrew Lunn wrote: >>> On Tue, Sep 01, 2020 at 03:22:31PM -0500, Alex Elder wrote: Jakub, you suggested/requested that the Qualcomm IPA driver get built when the COMPILE_

[PATCH net] net: gemini: Fix another missing clk_disable_unprepare() in probe

2020-09-02 Thread Dan Carpenter
We recently added some calls to clk_disable_unprepare() but we missed the last error path if register_netdev() fails. I made a couple cleanups so we avoid mistakes like this in the future. First I reversed the "if (!ret)" condition and pulled the code in one indent level. Also, the "port->netdev

[PATCH net] drivers/net/wan/hdlc: Change the default of hard_header_len to 0

2020-09-02 Thread Xie He
Change the default value of hard_header_len in hdlc.c from 16 to 0. Currently there are 6 HDLC protocol drivers, among them: hdlc_raw_eth, hdlc_cisco, hdlc_ppp, hdlc_x25 set hard_header_len when attaching the protocol, overriding the default. So this patch does not affect them. hdlc_raw and hdlc

[RFC net-next] udp: add a GSO type for UDPv6

2020-09-02 Thread Huazhong Tan
In some cases, for UDP GSO, UDPv4 and UDPv6 need to be handled separately, for example, checksum offload, so add new GSO type SKB_GSO_UDPV6_L4 for UDPv6, and the old SKB_GSO_UDP_L4 stands for UDPv4. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/chelsio/cxgb4/sge.c| 17

Re: COMPILE_TEST

2020-09-02 Thread Andrew Lunn
> > It would be good to know which other CONFIG symbols and header files > > are known to work (or expected to work) like this. > > > > Having these stubs allows us to always either omit e.g. > > depends on GPIOLIB > > The above could only be done if the dependency is simply for > linkage and

Re: [PATCH] Bluetooth: fix "list_add double add" in hci_conn_complete_evt

2020-09-02 Thread Coiby Xu
On Mon, Aug 31, 2020 at 06:06:18PM +0200, Marcel Holtmann wrote: Hi Coiby, Hi Marcel, Thank you for reviewing this patch! When two HCI_EV_CONN_COMPLETE event packets with status=0 of the same HCI connection are received, device_add would be called twice which leads to kobject_add being cal

Re: [PATCH net-next 1/3] dt-bindings: net: Document Broadcom SF2 switch clocks

2020-09-02 Thread Andrew Lunn
On Tue, Sep 01, 2020 at 03:59:11PM -0700, Florian Fainelli wrote: > Describe the two possible clocks feeding into the Broadcom SF2 > integrated Ethernet switch. BCM7445 systems have two clocks, one for the > main switch core clock, and another for controlling the switch clock > divider whereas BCM7

Re: [PATCH net-next 3/3] net: dsa: bcm_sf2: recalculate switch clock rate based on ports

2020-09-02 Thread Andrew Lunn
On Tue, Sep 01, 2020 at 03:59:13PM -0700, Florian Fainelli wrote: > Whenever a port gets enabled/disabled, recalcultate the required switch > clock rate to make sure it always gets set to the expected rate > targeting our switch use case. This is only done for the BCM7445 switch > as there is no cl

Re: [PATCH net-next 2/3] net: dsa: bcm_sf2: request and handle clocks

2020-09-02 Thread Andrew Lunn
On Tue, Sep 01, 2020 at 03:59:12PM -0700, Florian Fainelli wrote: > Fetch the corresponding clock resource and enable/disable it during > suspend/resume if and only if we have no ports defined for Wake-on-LAN. > > Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Andrew

[PATCH] rt2x00: Use fallthrough pseudo-keyword macro

2020-09-02 Thread Leesoo Ahn
Replace all '/* fall through */' comments with the macro[1]. [1]: https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Leesoo Ahn --- .../net/wireless/ralink/rt2x00/rt2400pci.c| 3 ++- .../net/wireless/ralink/r

[PATCH net] ipv6: Fix sysctl max for fib_multipath_hash_policy

2020-09-02 Thread Ido Schimmel
From: Ido Schimmel Cited commit added the possible value of '2', but it cannot be set. Fix it by adjusting the maximum value to '2'. This is consistent with the corresponding IPv4 sysctl. Before: # sysctl -w net.ipv6.fib_multipath_hash_policy=2 sysctl: setting key "net.ipv6.fib_multipath_hash_p

[PATCH net-next] net: dp83869: Add ability to advertise Fiber connection

2020-09-02 Thread Dan Murphy
Add the ability to advertise the Fiber connection if the strap or the op-mode is configured for 100Base-FX. Auto negotiation is not supported on this PHY when in fiber mode. Signed-off-by: Dan Murphy --- drivers/net/phy/dp83869.c | 35 +++ 1 file changed, 35 inse

Re: [PATCH net-next] selftests: mptcp: fix typo in mptcp_connect usage

2020-09-02 Thread Matthieu Baerts
Hi Davide, On 02/09/2020 13:44, Davide Caratti wrote: in mptcp_connect, 's' selects IPPROTO_MPTCP / IPPROTO_TCP as the value of 'protocol' in socket(), and 'm' switches between different send / receive modes. Fix die_usage(): swap 'm' and 's' and add missing 'sendfile' mode. Good catch! I gue

[PATCH v2] tipc: fix shutdown() of connectionless socket

2020-09-02 Thread Tetsuo Handa
syzbot is reporting hung task at nbd_ioctl() [1], for there are two problems regarding TIPC's connectionless socket's shutdown() operation. -- #include #include #include #include #include int main(int argc, char *argv[]) { const int fd = open("/dev/nbd0", 3); alarm(5)

[PATCH] mwifiex: wmm: Fix -Wunused-const-variable warnings

2020-09-02 Thread YueHaibing
In file included from drivers/net/wireless/marvell/mwifiex//cmdevt.c:26:0: drivers/net/wireless/marvell/mwifiex//wmm.h:41:17: warning: ‘tos_to_tid_inv’ defined but not used [-Wunused-const-variable=] static const u8 tos_to_tid_inv[] = { ^~ drivers/net/wireless/marvell

[PATCH] mwifiex: pcie: Fix -Wunused-const-variable warnings

2020-09-02 Thread YueHaibing
These variables only used in pcie.c, move them to .c file can silence these warnings: In file included from drivers/net/wireless/marvell/mwifiex/main.h:57:0, from drivers/net/wireless/marvell/mwifiex/init.c:24: drivers/net/wireless/marvell/mwifiex/pcie.h:310:41: warning: mwifiex_p

Re: [RFC net-next] udp: add a GSO type for UDPv6

2020-09-02 Thread Willem de Bruijn
On Wed, Sep 2, 2020 at 2:18 PM Huazhong Tan wrote: > > In some cases, for UDP GSO, UDPv4 and UDPv6 need to be handled > separately, for example, checksum offload, so add new GSO type > SKB_GSO_UDPV6_L4 for UDPv6, and the old SKB_GSO_UDP_L4 stands > for UDPv4. This is in preparation for hardware y

Re: [PATCH] rt2x00: Use fallthrough pseudo-keyword macro

2020-09-02 Thread Gustavo A. R. Silva
On 9/2/20 08:05, Leesoo Ahn wrote: > Replace all '/* fall through */' comments with the macro[1]. > > [1]: > https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through > This looks familiar... https://lore.kernel.org/lkml/20200821062

[PATCH net-next 0/5] sfc: TXQ refactor

2020-09-02 Thread Edward Cree
Refactor and unify partner-TXQ handling in the EF100 and legacy drivers. The main thrust of this series is to remove from the legacy (Siena/EF10) driver the assumption that a netdev TX queue has precisely two hardware TXQs (checksummed and unchecksummed) associated with it, so that in future we

[PATCH net-next 1/5] sfc: add and use efx_tx_send_pending in tx.c

2020-09-02 Thread Edward Cree
Instead of using efx_tx_queue_partner(), which relies on the assumption that tx_queues_per_channel is 2, efx_tx_send_pending() iterates over txqs with efx_for_each_channel_tx_queue(). Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/tx.c | 59 ++- 1 file

[PATCH net-next 2/5] sfc: use tx_queue->old_read_count in EF100 TX path

2020-09-02 Thread Edward Cree
As in the Siena/EF10 case, it minimises cacheline ping-pong between the TX and completion paths. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_tx.c | 8 ++-- drivers/net/ethernet/sfc/net_driver.h | 14 ++ 2 files changed, 20 insertions(+), 2 deletions(-) diff

[PATCH net-next 3/5] sfc: use efx_channel_tx_[old_]fill_level() in Siena/EF10 TX datapath

2020-09-02 Thread Edward Cree
Instead of open-coding the calculation with efx_tx_queue_partner(), use the functions that iterate over numbers of queues other than 2 with efx_for_each_channel_tx_queue(). Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/net_driver.h | 4 drivers/net/ethernet/sfc/tx.c | 1

[PATCH net-next 4/5] sfc: rewrite efx_tx_may_pio

2020-09-02 Thread Edward Cree
Use efx_for_each_channel_tx_queue() rather than efx_tx_queue_partner(). Make some related simplifications of efx_nic_tx_is_empty() to remove entry points that aren't used. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/nic_common.h | 30 ++- drivers/net/ethernet

[PATCH net-next 5/5] sfc: remove efx_tx_queue_partner

2020-09-02 Thread Edward Cree
All users of this function are now gone. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/nic_common.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/net/ethernet/sfc/nic_common.h b/drivers/net/ethernet/sfc/nic_common.h index 3f88c6444fa1..82271f0b8627 100644 ---

Re: [PATCH] rt2x00: Use fallthrough pseudo-keyword macro

2020-09-02 Thread Leesoo Ahn
20. 9. 2. 오후 11:20에 Gustavo A. R. Silva 이(가) 쓴 글: On 9/2/20 08:05, Leesoo Ahn wrote: Replace all '/* fall through */' comments with the macro[1]. [1]: https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through This looks familiar..

[PATCH] mwifiex: sdio: Fix -Wunused-const-variable warnings

2020-09-02 Thread YueHaibing
These variables only used in sdio.c, move them to .c file can silence these warnings: In file included from drivers/net/wireless/marvell/mwifiex//main.h:59:0, from drivers/net/wireless/marvell/mwifiex//cfp.c:24: drivers/net/wireless/marvell/mwifiex//sdio.h:705:41: warning: ‘mwifi

Re: [PATCH bpf-next v4 0/2] bpf: avoid iterating duplicated files for task_file iterator

2020-09-02 Thread Daniel Borkmann
On 9/2/20 4:31 AM, Yonghong Song wrote: [...] v3 -> v4: - avoid using empty string in the CHECK macro. (Andrii) Applied, thanks!

[PATCH v3] staging: qlge: fix build breakage with dumping enabled

2020-09-02 Thread Coiby Xu
This fixes commit 0107635e15ac ("staging: qlge: replace pr_err with netdev_err") which introduced an build breakage of missing `struct ql_adapter *qdev` for some functions and a warning of type mismatch with dumping enabled, i.e., $ make CFLAGS_MODULE="QL_ALL_DUMP=1 QL_OB_DUMP=1 QL_CB_DUMP=1 \ Q

Re: [PATCH bpf-next] xsk: fix possible segfault at xskmap entry insertion

2020-09-02 Thread Daniel Borkmann
On 9/2/20 11:06 AM, Magnus Karlsson wrote: Fix possible segfault when entry is inserted into xskmap. This can happen if the socket is in a state where the umem has been set up, the Rx ring created but it has yet to be bound to a device. In this case the pool has not yet been created and we cannot

Re: [PATCH v2] staging: qlge: fix build breakage with dumping enabled

2020-09-02 Thread Coiby Xu
On Thu, Aug 27, 2020 at 09:50:10AM +0900, Benjamin Poirier wrote: On 2020-08-27 07:27 +0800, Coiby Xu wrote: This fixes commit 0107635e15ac ("staging: qlge: replace pr_err with netdev_err") which introduced an build breakage of missing `struct ql_adapter *qdev` for some functions and a warning o

Re: [PATCH bpf-next] xsk: fix possible segfault in xsk umem diagnostics

2020-09-02 Thread Daniel Borkmann
On 9/2/20 10:52 AM, Magnus Karlsson wrote: Fix possible segfault in the xsk diagnostics code when dumping information about the umem. This can happen when a umem has been created, but the socket has not been bound yet. In this case, the xsk buffer pool does not exist yet and we cannot dump the in

Re: [Intel-wired-lan] VRRP not working on i40e X722 S2600WFT

2020-09-02 Thread Lennart Sorensen
On Mon, Aug 31, 2020 at 09:35:19PM -0400, wrote: > On Mon, Aug 31, 2020 at 10:35:12AM -0700, Jesse Brandeburg wrote: > > Thanks for the report Lennart, I understand your frustration, as this > > should probably work without user configuration. > > > > However, please give this command a try: > >

[PATCH net] nfp: flower: fix ABI mismatch between driver and firmware

2020-09-02 Thread Simon Horman
From: Louis Peens Fix an issue where the driver wrongly detected ipv6 neighbour updates from the NFP as corrupt. Add a reserved field on the kernel side so it is similar to the ipv4 version of the struct and has space for the extra bytes from the card. Fixes: 9ea9bfa12240 ("nfp: flower: support

[PATCH net v6 5/6] net: marvell: prestera: Add Switchdev driver implementation

2020-09-02 Thread Vadym Kochan
The following features are supported: - VLAN-aware bridge offloading - VLAN-unaware bridge offloading - FDB offloading (learning, ageing) - Switchport configuration Currently there are some limitations like: - Only 1 VLAN-aware bridge instance supported - FDB ageing timeo

Re: [PATCH][next] xsk: Fix null check on error return path

2020-09-02 Thread Björn Töpel
On 2020-09-02 17:07, Gustavo A. R. Silva wrote: Currently, dma_map is being checked, when the right object identifier to be null-checked is dma_map->dma_pages, instead. Fix this by null-checking dma_map->dma_pages. Addresses-Coverity-ID: 1496811 ("Logically dead code") Fixes: 921b68692abb ("xsk

[PATCH net v6 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX3255 (AC3x)

2020-09-02 Thread Vadym Kochan
Marvell Prestera 98DX3255 integrates up to 24 ports of 1GbE with 8 ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely wireless SMB deployment. Prestera Switchdev is a firmware based driver that operates via PCI bus. The current implementation supports only boards designed for the

[PATCH net v6 3/6] net: marvell: prestera: Add basic devlink support

2020-09-02 Thread Vadym Kochan
Add very basic support for devlink interface: - driver name - fw version - devlink ports Signed-off-by: Vadym Kochan --- PATCH v5: 1) Simplified some error path handling by simple return error code in: - prestera_dl_info_get(...) 2) Remove not-needed err assignment i

[PATCH net v6 4/6] net: marvell: prestera: Add ethtool interface support

2020-09-02 Thread Vadym Kochan
The ethtool API provides support for the configuration of the following features: speed and duplex, auto-negotiation, MDI-x, forward error correction, port media type. The API also provides information about the port status, hardware and software statistic. The following limitation exists: - p

[PATCH net v6 6/6] dt-bindings: marvell,prestera: Add description for device-tree bindings

2020-09-02 Thread Vadym Kochan
Add brief description how to configure base mac address binding in device-tree. Describe requirement for the PCI port which is connected to the ASIC, to allow access to the firmware related registers. Signed-off-by: Vadym Kochan --- .../bindings/net/marvell,prestera.txt | 34 +++

Re: [PATCH] net: usb: dm9601: Add USB ID of Keenetic Plus DSL

2020-09-02 Thread Kamil Lorenc
W dniu 2020-09-02 00:36, David Miller napisał(a): Applied, thanks. You're welcome.

Re: [PATCH] net: usb: dm9601: Add USB ID of Keenetic Plus DSL

2020-09-02 Thread Kamil Lorenc
W dniu 2020-09-02 00:40, David Miller napisał(a): From: Kamil Lorenc Date: I received an error from Peter Korsgaard's mailserver informing that his email address does not exist. Should I do something with that fact? Probably need a MAINTAINERS update. Is there any other email address by

Re: [PATCH net-next 2/3] devlink: Consider other controller while building phys_port_name

2020-09-02 Thread Jakub Kicinski
On Wed, 2 Sep 2020 10:00:11 +0200 Jiri Pirko wrote: >>> I didn't quite get the fact that you want to not show controller ID on the >>> local >>> port, initially. >> Mainly to not_break current users. > > You don't have to take it to the name, unless "external" flag is set. > > But I don't re

Re: [PATCH net-next RFC v3 01/14] devlink: Add reload action option to devlink reload command

2020-09-02 Thread Jakub Kicinski
On Wed, 2 Sep 2020 11:46:27 +0200 Jiri Pirko wrote: > >? Do we need such change there too or keep it as is, each action by itself > >and return what was performed ? > > Well, I don't know. User asks for X, X should be performed, not Y or Z. > So perhaps the return value is not needed. > Just dri

[PATCH net-next RFC v1 0/4] Add devlink traps in devlink port context

2020-09-02 Thread Aya Levin
Implement support for devlink traps on per-port basis. Dropped packets in the RX flow are related to the Ethernet port and thus should be in port context. Traps per device should trap global configuration which can cause drops. On top of that, enabling a trap on a device level should trigger this t

[PATCH net-next RFC v1 2/4] devlink: Add devlink traps under devlink_ports context

2020-09-02 Thread Aya Levin
There are some cases where we would like to trap dropped packets only for a single port on a device without affecting the others. For that purpose trap_mngr was added to devlink_port and corresponding Trap API with devlink_port were added too. Signed-off-by: Aya Levin --- drivers/net/ethernet/me

[PATCH net-next RFC v1 3/4] devlink: Add hierarchy between traps in device level and port level

2020-09-02 Thread Aya Levin
Managing large scale port's traps may be complicated. This patch introduces a shortcut: when setting a trap on a device and this trap is not registered on this device, the action will take place on all related ports that did register this trap. Signed-off-by: Aya Levin --- net/core/devlink.c | 4

[PATCH net-next RFC v1 4/4] net/mlx5e: Add devlink trap to catch oversize packets

2020-09-02 Thread Aya Levin
Register MTU error trap to allow visibility of oversize packets. Display a naive use of devlink trap in devlink port context. Signed-off-by: Aya Levin --- drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 ++ drivers/net/ethernet/

[PATCH net-next RFC v1 1/4] devlink: Wrap trap related lists and ops in trap_mngr

2020-09-02 Thread Aya Levin
Bundle the trap related lists: trap_list, trap_group_list and trap_policer_list and trap ops like: trap_init, trap_fini, trap_action_set... together in trap_mngr. This will be handy in the coming patches in the set introducing traps in devlink port context. With trap_mngr, code reuse is much simple

Re: [PATCH net] ipv6: Fix sysctl max for fib_multipath_hash_policy

2020-09-02 Thread Stephen Suryaputra
On Wed, Sep 02, 2020 at 04:16:59PM +0300, Ido Schimmel wrote: > From: Ido Schimmel > > Cited commit added the possible value of '2', but it cannot be set. Fix > it by adjusting the maximum value to '2'. This is consistent with the > corresponding IPv4 sysctl. > > Before: > > # sysctl -w net.ipv

[PATCH net v6 2/6] net: marvell: prestera: Add PCI interface support

2020-09-02 Thread Vadym Kochan
Add PCI interface driver for Prestera Switch ASICs family devices, which provides: - Firmware loading mechanism - Requests & events handling to/from the firmware - Access to the firmware on the bus level The firmware has to be loaded each time the device is reset. The driver is loadin

[PATCH net v6 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-09-02 Thread Vadym Kochan
Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely wireless SMB deployment. The current implementation supports only boards designed for the Marvell Switchdev solution and requires special firmware. The core Preste

Re: [PATCH 07/28] 53c700: improve non-coherent DMA handling

2020-09-02 Thread Helge Deller
Hi Willy, On 01.09.20 18:53, Matthew Wilcox wrote: > On Tue, Sep 01, 2020 at 06:41:12PM +0200, Helge Deller wrote: >>> I still have a zoo of machines running for such testing, including a >>> 715/64 and two 730. >>> I'm going to test this git tree on the 715/64: > > The 715/64 is a 7100LC machine

  1   2   3   >