[net 4/6] net/mlx5e: Fix arch depending casting issue in FEC

2020-05-28 Thread Saeed Mahameed
From: Aya Levin Change type of active_fec to u32 to match the type expected by mlx5e_get_fec_mode. Copy active_fec and configured_fec values to unsigned long before preforming bitwise manipulations. Take the same approach when configuring FEC over 50G link modes: copy the policy into an unsigned

[net 3/6] net/mlx5e: Remove warning "devices are not on same switch HW"

2020-05-28 Thread Saeed Mahameed
From: Maor Dickman On tunnel decap rule insertion, the indirect mechanism will attempt to offload the rule on all uplink representors which will trigger the "devices are not on same switch HW, can't offload forwarding" message for the uplink which isn't on the same switch HW as the VF representor

[net 1/6] net/mlx5: Fix crash upon suspend/resume

2020-05-28 Thread Saeed Mahameed
From: Mark Bloch Currently a Linux system with the mlx5 NIC always crashes upon hibernation - suspend/resume. Add basic callbacks so the NIC could be suspended and resumed. Fixes: 9603b61de1ee ("mlx5: Move pci device handling from mlx5_ib to mlx5_core") Tested-by: Dexuan Cui Signed-off-by: Mar

[net 2/6] net/mlx5e: Fix stats update for matchall classifier

2020-05-28 Thread Saeed Mahameed
From: Roi Dayan It's bytes, packets, lastused. Fixes: fcb64c0f5640 ("net/mlx5: E-Switch, add ingress rate support") Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr

[net 6/6] net/mlx5e: Fix MLX5_TC_CT dependencies

2020-05-28 Thread Saeed Mahameed
From: Vlad Buslov Change MLX5_TC_CT config dependencies to include MLX5_ESWITCH instead of MLX5_CORE_EN && NET_SWITCHDEV, which are already required by MLX5_ESWITCH. Without this change mlx5 fails to compile if user disables MLX5_ESWITCH without also manually disabling MLX5_TC_CT. Fixes: 4c3844d

[pull request][net 0/6] mlx5 fixes 2020-05-28

2020-05-28 Thread Saeed Mahameed
Hi Dave, This series introduces some fixes to mlx5 driver. Nothing major, the only patch worth mentioning is the suspend/resume crash fix by adding the missing pci device handlers, the fix is very straight forward and as Dexuan already expressed, the patch is important for Azure users to avoid cr

[net 5/6] net/mlx5e: Properly set default values when disabling adaptive moderation

2020-05-28 Thread Saeed Mahameed
From: Tal Gilboa Add a call to mlx5e_reset_rx/tx_moderation() when enabling/disabling adaptive moderation, in order to select the proper default values. In order to do so, we separate the logic of selecting the moderation values and setting moderion mode (CQE/EQE based). Fixes: 0088cbbc4b66 ("n

Re: general protection fault in inet_unhash

2020-05-28 Thread Andrii Nakryiko
On 5/28/20 11:23 PM, Dmitry Vyukov wrote: On Thu, May 28, 2020 at 11:01 PM 'Andrii Nakryiko' via syzkaller-bugs wrote: On 5/28/20 9:44 AM, syzbot wrote: Hello, syzbot found the following crash on: HEAD commit:dc0f3ed1 net: phy: at803x: add cable diagnostics support f.. git tree: n

Re: [PATCH v2 bpf-next 1/3] bpf: Consolidate inner-map-compatible properties into bpf_types.h

2020-05-28 Thread Martin KaFai Lau
On Tue, May 26, 2020 at 10:54:26AM -0700, Andrii Nakryiko wrote: > On Fri, May 22, 2020 at 6:01 PM Martin KaFai Lau wrote: > > > > On Sat, May 23, 2020 at 12:22:48AM +0200, Daniel Borkmann wrote: > > > On 5/22/20 4:23 AM, Martin KaFai Lau wrote: > > > [...] > > > > }; > > > > +/* Cannot be used

Re: general protection fault in inet_unhash

2020-05-28 Thread Andrii Nakryiko
On 5/28/20 2:27 PM, Eric Dumazet wrote: On 5/28/20 2:01 PM, Andrii Nakryiko wrote: On 5/28/20 9:44 AM, syzbot wrote: Hello, syzbot found the following crash on: HEAD commit:    dc0f3ed1 net: phy: at803x: add cable diagnostics support f.. git tree:   net-next console output: https://url

Re: [PATCH linux-rcu] docs/litmus-tests: add BPF ringbuf MPSC litmus tests

2020-05-28 Thread Andrii Nakryiko
On Thu, May 28, 2020 at 3:54 PM Joel Fernandes wrote: > > Hello Andrii, > This is quite exciting. Some comments below: > > On Wed, May 27, 2020 at 11:24:08PM -0700, Andrii Nakryiko wrote: > [...] > > diff --git a/Documentation/litmus-tests/bpf-rb/bpf-rb+1p1c+bounded.litmus > > b/Documentation/lit

RE: [PATCH net-next v3] ice: Replace one-element arrays with flexible-arrays

2020-05-28 Thread Kirsher, Jeffrey T
> -Original Message- > From: Gustavo A. R. Silva > Sent: Wednesday, May 27, 2020 07:11 > To: Kirsher, Jeffrey T ; David S. Miller > ; Jakub Kicinski > Cc: intel-wired-...@lists.osuosl.org; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org; Gustavo A. R. Silva ; > Kees Cook > Subjec

[PATCH v3 bpf-next 3/5] xdp: Add xdp_txq_info to xdp_buff

2020-05-28 Thread David Ahern
Add xdp_txq_info as the Tx counterpart to xdp_rxq_info. At the moment only the device is added. Other fields (queue_index) can be added as use cases arise. >From a UAPI perspective, add egress_ifindex to xdp context for bpf programs to see the Tx device. Update the verifier to only allow accesses

[PATCH v3 bpf-next 5/5] selftest: Add tests for XDP programs in devmap entries

2020-05-28 Thread David Ahern
Add tests to verify ability to add an XDP program to a entry in a DEVMAP. Add negative tests to show DEVMAP programs can not be attached to devices as a normal XDP program, and accesses to egress_ifindex require BPF_XDP_DEVMAP attach type. Signed-off-by: David Ahern --- .../bpf/prog_tests/xdp_d

[PATCH v3 bpf-next 4/5] libbpf: Add SEC name for xdp programs attached to device map

2020-05-28 Thread David Ahern
Support SEC("xdp_devmap*") as a short cut for loading the program with type BPF_PROG_TYPE_XDP and expected attach type BPF_XDP_DEVMAP. Signed-off-by: David Ahern --- tools/lib/bpf/libbpf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index

[PATCH v3 bpf-next 1/5] devmap: Formalize map value as a named struct

2020-05-28 Thread David Ahern
Add 'struct bpf_devmap_val' to the bpf uapi to formalize the expected values that can be passed in for a DEVMAP. Update devmap code to use the struct. Signed-off-by: David Ahern --- include/uapi/linux/bpf.h | 5 + kernel/bpf/devmap.c| 40 +++---

[PATCH v3 bpf-next 0/5] bpf: Add support for XDP programs in DEVMAP entries

2020-05-28 Thread David Ahern
Implementation of Daniel's proposal for allowing DEVMAP entries to be a device index, program fd pair. Programs are run after XDP_REDIRECT and have access to both Rx device and Tx device. v3 - renamed struct to bpf_devmap_val - used offsetofend to check for expected map size, modification of To

[PATCH v3 bpf-next 2/5] bpf: Add support to attach bpf program to a devmap entry

2020-05-28 Thread David Ahern
Add BPF_XDP_DEVMAP attach type for use with programs associated with a DEVMAP entry. Allow DEVMAPs to associate a program with a device entry by adding a bpf_prog_fd to 'struct bpf_devmap_val'. Values read show the program id, so the fd and id are a union. The program associated with the fd must

[PATCH net-next 0/2] vxlan fdb nexthop misc fixes

2020-05-28 Thread Roopa Prabhu
From: Roopa Prabhu Roopa Prabhu (2): vxlan: add check to prevent use of remote ip attributes with NDA_NH_ID vxlan: few locking fixes in nexthop event handler drivers/net/vxlan.c | 36 +--- 1 file changed, 29 insertions(+), 7 deletions(-) -- 2.1.4

[PATCH net-next 2/2] vxlan: few locking fixes in nexthop event handler

2020-05-28 Thread Roopa Prabhu
From: Roopa Prabhu - remove fdb from nh_list before the rcu grace period - protect fdb->vdev with rcu - hold spin lock before destroying fdb Fixes: c7cdbe2efc40 ("vxlan: support for nexthop notifiers") Signed-off-by: Roopa Prabhu Reviewed-by: Nikolay Aleksandrov --- drivers/net/vxlan.c | 32 +

[PATCH net-next 1/2] vxlan: add check to prevent use of remote ip attributes with NDA_NH_ID

2020-05-28 Thread Roopa Prabhu
From: Roopa Prabhu NDA_NH_ID represents a remote ip or a group of remote ips. It allows use of nexthop groups in lieu of a remote ip or a list of remote ips supported by the fdb api. Current code ignores the other remote ip attrs when NDA_NH_ID is specified. In the spirit of strict checking, Thi

Re: [02/12] net: hns3: Destroy a mutex after initialisation failure in hclge_init_ae_dev()

2020-05-28 Thread Markus Elfring
>>> Add a mutex destroy call in hclge_init_ae_dev() when fails. >> >> How do you think about a wording variant like the following? … > It looks better. I will try to improve the skill of patch description > and make as many as people can understand the patch. Thanks for your positive feedback. I

Re: [PATCH net-next v3] net: phy: micrel: add phy-mode support for the KSZ9031 PHY

2020-05-28 Thread Oleksij Rempel
On Thu, May 28, 2020 at 06:08:39PM +0200, Andrew Lunn wrote: > On Thu, May 28, 2020 at 03:10:06PM +0200, Geert Uytterhoeven wrote: > > Hi Andrew, > > > > On Wed, May 27, 2020 at 10:52 PM Andrew Lunn wrote: > > > > You may wonder what's the difference between 3 and 4? It's not just the > > > > PHY

[net-next 04/17] ixgbe: Remove conversion to bool in ixgbe_device_supports_autoneg_fc()

2020-05-28 Thread Jeff Kirsher
From: Jason Yan No need to convert '==' expression to bool. This fixes the following coccicheck warning: drivers/net/ethernet/intel/ixgbe/ixgbe_common.c:68:11-16: WARNING: conversion to bool not needed here Signed-off-by: Jason Yan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- dr

[net-next 06/17] ixgbe: Remove unused inline function ixgbe_irq_disable_queues

2020-05-28 Thread Jeff Kirsher
From: YueHaibing commit b5f69ccf6765 ("ixgbe: avoid bringing rings up/down as macvlans are added/removed") left behind this, remove it. Signed-off-by: YueHaibing Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 29 ---

[net-next 14/17] igc: Add Receive Error Counter

2020-05-28 Thread Jeff Kirsher
From: Sasha Neftin Receive error counter reflect total number of non-filtered packets received with errors. This includes: CRC error, symbol error, Rx data error and carrier extend error. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/

[net-next 13/17] igc: Remove symbol error counter

2020-05-28 Thread Jeff Kirsher
From: Sasha Neftin Accordance to the i225 datasheet symbol error counter does not applicable to the i225 device. This patch comes to clean up this counter. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_mac.c | 1 - driv

[net-next 01/17] i40e: Use scnprintf() for avoiding potential buffer overflow

2020-05-28 Thread Jeff Kirsher
From: Takashi Iwai Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Signed-off-by: Takashi Iwai Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drive

[net-next 05/17] ixgbe: Use true, false for bool variable in __ixgbe_enable_sriov()

2020-05-28 Thread Jeff Kirsher
From: Jason Yan Fix the following coccicheck warning: drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c:105:2-38: WARNING: Assignment of 0/1 to bool variable Signed-off-by: Jason Yan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +-

[net-next 15/17] igc: Remove Sequence Error Counter

2020-05-28 Thread Jeff Kirsher
From: Sasha Neftin Accordance to the i225 datasheet sequence error counter does not applicable to the i225 device. This patch comes to clean up this counter. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_mac.c | 1 - dr

[net-next 11/17] e1000e: Relax condition to trigger reset for ME workaround

2020-05-28 Thread Jeff Kirsher
From: Punit Agrawal It's an error if the value of the RX/TX tail descriptor does not match what was written. The error condition is true regardless the duration of the interference from ME. But the driver only performs the reset if E1000_ICH_FWSM_PCIM2PCI_COUNT (2000) iterations of 50us delay hav

[net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28

2020-05-28 Thread Jeff Kirsher
This series contains updates to e1000, e1000e, igc, igb, ixgbe and i40e. Takashi Iwai, from SUSE, replaces some uses of snprintf() with scnprintf() since the succeeding calls may go beyond the given buffer limit in i40e. Jesper Dangaard Brouer fixes up code comments in i40e_xsk.c Xie XiuQi, from

[net-next 12/17] i40e: Make i40e_shutdown_adminq() return void

2020-05-28 Thread Jeff Kirsher
From: Jason Yan Fix the following coccicheck warning: drivers/net/ethernet/intel/i40e/i40e_adminq.c:699:13-21: Unneeded variable: "ret_code". Return "0" on line 710 Signed-off-by: Jason Yan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_adminq.

[net-next 08/17] igc: Remove unused flags

2020-05-28 Thread Jeff Kirsher
From: Sasha Neftin Transmit underrun, late and excess collision flags not in use. This patch comes to clean up these flags. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_defines.h | 4 1 file changed, 4 deletions(-)

[net-next 16/17] igc: Fix wrong register name

2020-05-28 Thread Jeff Kirsher
From: Sasha Neftin Accordance to the i225 datasheet this register address used by Host Transmit Discarded Packet by MAC counter and not by not applicable Carrier Extension Error counter. This patch comes to fix this wrong definition. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-of

[net-next 03/17] ixgbe: fix signed-integer-overflow warning

2020-05-28 Thread Jeff Kirsher
From: Xie XiuQi ubsan report this warning, fix it by adding a unsigned suffix. UBSAN: signed-integer-overflow in drivers/net/ethernet/intel/ixgbe/ixgbe_common.c:2246:26 65535 * 65537 cannot be represented in type 'int' CPU: 21 PID: 7 Comm: kworker/u256:0 Not tainted 5.7.0-rc3-debug+ #39 Hardware

[net-next 09/17] igc: Reject NFC rules with multiple matches

2020-05-28 Thread Jeff Kirsher
From: Andre Guedes The way Rx queue assignment based on mac address, Ethertype and VLAN priority filtering operates in I225 doesn't allow us to properly support NFC rules with multiple matches. Consider the following example which assigns to queue 2 frames matching the address MACADDR *and* Ethe

[net-next 10/17] igc: Fix IGC_MAX_RXNFC_RULES

2020-05-28 Thread Jeff Kirsher
From: Andre Guedes IGC supports a total of 32 rules. 16 MAC address based, 8 VLAN priority based, and 8 Ethertype based. This patch fixes IGC_MAX_RXNFC_RULES accordingly. Signed-off-by: Andre Guedes Acked-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/et

[net-next 07/17] igb: make igb_set_fc_watermarks() return void

2020-05-28 Thread Jeff Kirsher
From: Jason Yan This function always return 0 now, we can make it return void to simplify the code. This fixes the following coccicheck warning: drivers/net/ethernet/intel/igb/e1000_mac.c:728:5-12: Unneeded variable: "ret_val". Return "0" on line 751 Signed-off-by: Jason Yan Tested-by: Aaron B

[net-next 17/17] e1000: Fix typo in the comment

2020-05-28 Thread Jeff Kirsher
From: Hari Continuous Double "the" in a comment. Changed it to single "the" Signed-off-by: Hari Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/e1000/e1000_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/e1

[net-next 02/17] i40e: trivial fixup of comments in i40e_xsk.c

2020-05-28 Thread Jeff Kirsher
From: Jesper Dangaard Brouer The comment above i40e_run_xdp_zc() was clearly copy-pasted from function i40e_xsk_umem_setup, which is just above. Signed-off-by: Jesper Dangaard Brouer Acked-by: Björn Töpel Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i4

[PATCH v2 bpf-next 2/4] bpf: Introduce sleepable BPF programs

2020-05-28 Thread Alexei Starovoitov
From: Alexei Starovoitov Introduce sleepable BPF programs that can request such property for themselves via BPF_F_SLEEPABLE flag at program load time. In such case they will be able to use helpers like bpf_copy_from_user() that might sleep. At present only fentry/fexit/fmod_ret and lsm programs c

[PATCH v2 bpf-next 3/4] libbpf: support sleepable progs

2020-05-28 Thread Alexei Starovoitov
From: Alexei Starovoitov Pass request to load program as sleepable via ".s" suffix in the section name. If it happens in the future that all map types and helpers are allowed with BPF_F_SLEEPABLE flag "fmod_ret/" and "lsm/" can be aliased to "fmod_ret.s/" and "lsm.s/" to make all lsm and fmod_ret

[PATCH v2 bpf-next 4/4] selftests/bpf: basic sleepable tests

2020-05-28 Thread Alexei Starovoitov
From: Alexei Starovoitov Modify few tests to sanity test sleepable bpf functionality. Signed-off-by: Alexei Starovoitov Acked-by: KP Singh --- tools/testing/selftests/bpf/bench.c | 2 ++ .../selftests/bpf/benchs/bench_trigger.c| 17 + tools/testing/selftes

[PATCH v2 bpf-next 1/4] bpf: Fix use-after-free in fmod_ret check

2020-05-28 Thread Alexei Starovoitov
From: Alexei Starovoitov Fix the following issue: [ 436.749342] BUG: KASAN: use-after-free in bpf_trampoline_put+0x39/0x2a0 [ 436.749995] Write of size 4 at addr 8881ef38b8a0 by task kworker/3:5/2243 [ 436.750712] [ 436.752677] Workqueue: events bpf_prog_free_deferred [ 436.753183] Call

[PATCH v2 bpf-next 0/4] bpf: Introduce minimal support for sleepable progs

2020-05-28 Thread Alexei Starovoitov
From: Alexei Starovoitov v1->v2: - split fmod_ret fix into separate patch - added blacklist v1: This patch set introduces the minimal viable support for sleepable bpf programs. In this patch only fentry/fexit/fmod_ret and lsm progs can be sleepable. Only array and pre-allocated hash and lru maps

Re: [PATCH bpf-next 1/3] bpf: Introduce sleepable BPF programs

2020-05-28 Thread Alexei Starovoitov
On Fri, May 29, 2020 at 12:12:27AM +0200, KP Singh wrote: > > + if (ret) > > + verbose(env, "%s() is not modifiable\n", > > + prog->aux->attach_func_name); > > + } else if (prog->aux->sleepable && prog->type ==

[PATCH] net/sched: act_ct: add nat mangle action only for NAT-conntrack

2020-05-28 Thread wenxu
From: wenxu Currently add nat mangle action with comparing invert and ori tuple. It is better to check IPS_NAT_MASK flags first to avoid non necessary memcmp for non-NAT conntrack. Signed-off-by: wenxu --- net/sched/act_ct.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletio

RE: [EXT] Re: [PATCH] mwifiex: Parse all API_VER_ID properties

2020-05-28 Thread Ganapathi Bhat
Hi Pali, > Hello! Could you please look at this trivial patch? The change look good. Acked-by: Ganapathi Bhat

Re: [PATCH net-next 0/2] net/mlx5e: add nat support in ct_metadata

2020-05-28 Thread wenxu
On 5/28/2020 7:35 PM, Edward Cree wrote: > On 28/05/2020 08:15, we...@ucloud.cn wrote: >> From: wenxu >> >> Currently all the conntrack entry offfload rules will be add >> in both ct and ct_nat flow table in the mlx5e driver. It is >> not makesense. >> >> This serise provide nat attribute in the

linux-next: manual merge of the net-next tree with the nfsd tree

2020-05-28 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/sunrpc/svcsock.c between commits: 11bbb0f76e99 ("SUNRPC: Trace a few more generic svc_xprt events") 998024dee197 ("SUNRPC: Add more svcsock tracepoints") from the nfsd tree and commits: 9b115749acb2 ("ipv6: a

Re: [PATCH net] net: dsa: sja1105: fix port mirroring for P/Q/R/S

2020-05-28 Thread kbuild test robot
Hi Vladimir, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] [also build test WARNING on sparc-next/master linus/master v5.7-rc7 next-20200528] [cannot apply to net/master] [if your patch is applied to the wrong git tree, please drop us a note to

[PATCH net-next] vmxnet3: use correct hdr reference when packet is encapsulated

2020-05-28 Thread Ronak Doshi
'Commit dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support")' added support for encapsulation offload. However, while preparing inner tso packet, it uses reference to outer ip headers. This patch fixes this issue by using correct reference for inner headers. Fixes: dacce2be3312 (

RE: [PATCH net-next] net/sched: fix a couple of splats in the error path of tfc_gate_init()

2020-05-28 Thread Po Liu
Hi Davide, > -Original Message- > From: Davide Caratti > Sent: 2020年5月29日 6:06 > To: Jamal Hadi Salim ; Po Liu ; > netdev@vger.kernel.org; David S. Miller > Cc: Ivan Vecera > Subject: [PATCH net-next] net/sched: fix a couple of splats in the > error path of tfc_gate_init() > > trying

Re: [RFC PATCH] samples:bpf: introduce task detector

2020-05-28 Thread 王贇
On 2020/5/29 上午2:34, Andrii Nakryiko wrote: [snip] >>> >>> With CO-RE, it also will allow to compile this tool once and run it on >>> many different kernels without recompilation. Please do take a look >>> and submit a PR there, it will be a good addition to the toolkit (and >>> will force you w

[PATCH net-next v2] hinic: add set_channels ethtool_ops support

2020-05-28 Thread Luo bin
add support to change TX/RX queue number with ethtool -L Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 46 +++ .../net/ethernet/huawei/hinic/hinic_main.c| 2 +- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 5 ++ 3 files changed, 44 insertions

Re: [PATCH 02/12] net: hns3: Destroy a mutex after initialisation failure in hclge_init_ad_dev()

2020-05-28 Thread tanhuazhong
On 2020/5/29 2:42, Markus Elfring wrote: Add a mutex destroy call in hclge_init_ae_dev() when fails. How do you think about a wording variant like the following? Change description: The function “mutex_init” was called before a call of the function “hclge_pci_init”. But the

Re: [PATCH] net: qrtr: Allocate workqueue before kernel_bind

2020-05-28 Thread Bjorn Andersson
On Thu 28 May 16:05 PDT 2020, Chris Lew wrote: > A null pointer dereference in qrtr_ns_data_ready() is seen if a client > opens a qrtr socket before qrtr_ns_init() can bind to the control port. > When the control port is bound, the ENETRESET error will be broadcasted > and clients will close their

[PATCH] net: atm: Replace kmalloc with kzalloc in the error message

2020-05-28 Thread Yi Wang
From: Liao Pingfang Use kzalloc instead of kmalloc in the error message according to the previous kzalloc() call. Signed-off-by: Liao Pingfang --- net/atm/lec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/atm/lec.c b/net/atm/lec.c index ca37f5a..33033d7 100644 --- a

RE: [RFC PATCH v12 05/11] time: Add mechanism to recognize clocksource in time_get_snapshot

2020-05-28 Thread Jianyong Wu
Hi Thomas, > -Original Message- > From: Thomas Gleixner > Sent: Friday, May 29, 2020 12:36 AM > To: Jianyong Wu ; netdev@vger.kernel.org; > yangbo...@nxp.com; john.stu...@linaro.org; pbonz...@redhat.com; > sean.j.christopher...@intel.com; m...@kernel.org; > richardcoch...@gmail.com; Mark

Re: [PATCH] [net-next] sfc: avoid an unused-variable warning

2020-05-28 Thread Edward Cree
On 28/05/2020 20:49, David Miller wrote: > From: Arnd Bergmann > Date: Wed, 27 May 2020 15:41:06 +0200 > >> 'nic_data' is no longer used outside of the #ifdef block >> in efx_ef10_set_mac_address: >> >> drivers/net/ethernet/sfc/ef10.c:3231:28: error: unused variable 'nic_data' >> [-Werror,-Wunuse

[PATCH net-next 7/8] bnxt_tc: update indirect block support

2020-05-28 Thread Pablo Neira Ayuso
Register ndo callback via flow_indr_dev_register() and flow_indr_dev_unregister(). Signed-off-by: Pablo Neira Ayuso --- drivers/net/ethernet/broadcom/bnxt/bnxt.h| 1 - drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 51 +--- 2 files changed, 12 insertions(+), 40 deletions(-)

[PATCH net-next 6/8] nfp: update indirect block support

2020-05-28 Thread Pablo Neira Ayuso
Register ndo callback via flow_indr_dev_register() and flow_indr_dev_unregister(). Signed-off-by: Pablo Neira Ayuso --- .../net/ethernet/netronome/nfp/flower/main.c | 11 +++--- .../net/ethernet/netronome/nfp/flower/main.h | 7 ++-- .../ethernet/netronome/nfp/flower/offload.c | 35 -

[PATCH net-next 5/8] mlx5: update indirect block support

2020-05-28 Thread Pablo Neira Ayuso
Register ndo callback via flow_indr_dev_register() and flow_indr_dev_unregister(). No need for mlx5e_rep_indr_clean_block_privs() since flow_block_cb_free() already releases the internal mapping via ->release callback, which in this case is mlx5e_rep_indr_tc_block_unbind(). Signed-off-by: Pablo N

[PATCH net-next 1/8] netfilter: nf_flowtable: expose nf_flow_table_gc_cleanup()

2020-05-28 Thread Pablo Neira Ayuso
This function schedules the flow teardown state and it forces a gc run. Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/nf_flow_table.h | 2 ++ net/netfilter/nf_flow_table_core.c| 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/net/netfilter/nf_flo

[PATCH net-next 4/8] net: use flow_indr_dev_setup_offload()

2020-05-28 Thread Pablo Neira Ayuso
Update existing frontends to use flow_indr_dev_setup_offload(). This new function must be called if ->ndo_setup_tc is unset to deal with tunnel devices. If there is no driver that is subscribed to new tunnel device flow_block bindings, then this function bails out with EOPNOTSUPP. If the driver

[PATCH net-next 3/8] net: cls_api: add tcf_block_offload_init()

2020-05-28 Thread Pablo Neira Ayuso
Add a helper function to initialize the flow_block_offload structure. Signed-off-by: Pablo Neira Ayuso --- net/sched/cls_api.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 752d608f4442..c5a2f16097b

[PATCH net-next 8/8] net: remove indirect block netdev event registration

2020-05-28 Thread Pablo Neira Ayuso
Drivers do not register to netdev events to set up indirect blocks anymore. Remove __flow_indr_block_cb_register() and __flow_indr_block_cb_unregister(). The frontends set up the callbacks through flow_indr_dev_setup_block() Signed-off-by: Pablo Neira Ayuso --- include/net/flow_offload.h

[PATCH net-next 0/8] the indirect flow_block infrastructure, revisited

2020-05-28 Thread Pablo Neira Ayuso
Hi, This series fixes b5140a36da78 ("netfilter: flowtable: add indr block setup support") that adds support for the indirect block for the flowtable. This patch crashes the kernel with the TC CT action. [ 630.908086] BUG: kernel NULL pointer dereference, address: 00f0 [ 630.908233]

[PATCH net-next 2/8] net: flow_offload: consolidate indirect flow_block infrastructure

2020-05-28 Thread Pablo Neira Ayuso
Tunnel devices provide no dev->netdev_ops->ndo_setup_tc(...) interface. The tunnel device and route control plane does not provide an obvious way to relate tunnel and physical devices. This patch allows drivers to register a tunnel device offload handler for the tc and netfilter frontends through

Re: Self-XORing BPF registers is undefined behavior

2020-05-28 Thread Edward Cree
On 28/05/2020 17:00, Alexei Starovoitov wrote: > xoring of two identical values is undefined in standard? I believe it is in this case, yes; even without the complication of array references that happen to alias, Alexander's foo1() is undefined behaviour under C89 (and also C99 which handles the

[net-next 04/15] ice: fix kernel BUG if register_netdev fails

2020-05-28 Thread Jeff Kirsher
From: Jacob Keller If register_netdev() fails, the driver will attempt to cleanup the q_vectors and inadvertently trigger a kernel BUG due to a NULL pointer dereference. This occurs because cleaning up q_vectors attempts to call netif_napi_del on napi_structs which were never initialized. Resol

[net-next 10/15] ice: Renaming and simplification in VF init path

2020-05-28 Thread Jeff Kirsher
From: Brett Creeley Some function names weren't very clear and some portions of VF creation could be moved into functions for clarity. Fix this by renaming some functions and move pieces of code into clearly name functions. Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: J

[net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2020-05-28

2020-05-28 Thread Jeff Kirsher
This series contains updates to the ice driver only. Anirudh (Ani) adds a poll for reset completion before proceeding with driver initialization when the DDP package fails to load and the firmware issues a core reset. Jake cleans up unnecessary code, since ice_set_dflt_vsi_ctx() performs a memset

[net-next 11/15] ice: Add function to set trust mode bit on reset

2020-05-28 Thread Jeff Kirsher
From: Brett Creeley As the title says, use a function to set trust mode bit on reset. Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- .../net/ethernet/intel/ice/ice_virtchnl_pf.c| 17 + 1 file changed, 13 insertions(+), 4 deletions(-)

[net-next 09/15] ice: Separate VF VSI initialization/creation from reset flow

2020-05-28 Thread Jeff Kirsher
From: Brett Creeley Currently the same flow is used for VF VSI initialization/creation and VF VSI reset. This makes the initialization/creation flow unnecessarily complicated. Fix this by separating the initialization/creation of the VF VSI from the reset flow. Signed-off-by: Brett Creeley Test

[net-next 08/15] ice: Add helper function for clearing VPGEN_VFRTRIG

2020-05-28 Thread Jeff Kirsher
From: Brett Creeley Create a helper function for clearing VPGEN_VFRTRIG as this needs to be done on reset to notify the VF that we are done resetting it. Also, it needs to be done on SR-IOV initialization/creation in case it was left in a bad state after SR-IOV tear down. Signed-off-by: Brett Cr

[net-next 07/15] ice: Simplify ice_sriov_configure

2020-05-28 Thread Jeff Kirsher
From: Brett Creeley Add a new function for checking if SR-IOV can be configured based on the PF and/or device's state/capabilities. Also, simplify the flow in ice_sriov_configure(). Signed-off-by: Brett Creeley Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher -

[net-next 03/15] ice: fix potential double free in probe unrolling

2020-05-28 Thread Jeff Kirsher
From: Jacob Keller If ice_init_interrupt_scheme fails, ice_probe will jump to clearing up the interrupts. This can lead to some static analysis tools such as the compiler sanitizers complaining about double free problems. Since ice_init_interrupt_scheme already unrolls internally on failure, the

[net-next 14/15] ice: Refactor VF reset

2020-05-28 Thread Jeff Kirsher
From: Brett Creeley Currently VF VSI are being reset twice during a PFR or greater. This is causing reset, specifically resetting all VFs, to take too long. This is causing various issues with VF drivers not being able to gracefully handle the VF reset timeout. Fix this by refactoring how VF rese

[net-next 05/15] ice: Declare functions static

2020-05-28 Thread Jeff Kirsher
From: Tony Nguyen ice_get_pfa_module_tlv() and ice_read_sr_word() are not being called outside of their file. Declare them as static. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_nvm.c | 5 +++-- drivers/net/ethernet/i

[net-next 12/15] ice: Add functions to rebuild host VLAN/MAC config for a VF

2020-05-28 Thread Jeff Kirsher
From: Brett Creeley When resetting a VF the VLAN and MAC filter configurations need to be replayed. Add helper functions for this purpose. Signed-off-by: Brett Creeley Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- .../net/ethernet/intel/ice/ice_virtchnl

[net-next 02/15] ice: cleanup VSI context initialization

2020-05-28 Thread Jeff Kirsher
From: Jacob Keller Remove an unnecessary copy of vsi->info into ctxt->info in ice_vsi_init. This line is essentially a no-op because ice_set_dflt_vsi_ctx performs a memset to clear the info from the context structure. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kir

[net-next 06/15] ice: Refactor ice_ena_vf_mappings to split MSIX and queue mappings

2020-05-28 Thread Jeff Kirsher
From: Brett Creeley Currently ice_ena_vf_mappings() does all of the VF's MSIX and queue mapping in one function. This makes it hard to digest. Fix this by creating a new function for enabling MSIX mappings and one for enabling queue mappings. Also, rename some variables in the functions for clar

[net-next 13/15] ice: remove VM/VF disable command on CORER/GLOBR reset

2020-05-28 Thread Jeff Kirsher
From: Paul Greenwalt Remove VM/VF disable AQC (opcode 0x0C31) when resetting all VFs. This is not required for CORER/GLOBR reset. Signed-off-by: Paul Greenwalt Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 11 --- 1 file c

[net-next 15/15] ice: Refactor VF VSI release and setup functions

2020-05-28 Thread Jeff Kirsher
From: Brett Creeley Currently when a VF VSI calls ice_vsi_release() and ice_vsi_setup() it subsequently clears/sets the VF cached variables for lan_vsi_idx and lan_vsi_num. This works fine, but can be improved by handling this in the VF specific VSI release and setup functions. Also, when a VF V

[net-next 01/15] ice: Poll for reset completion when DDP load fails

2020-05-28 Thread Jeff Kirsher
From: Anirudh Venkataramanan There are certain cases where the DDP load fails and the FW issues a core reset. For these cases, wait for reset to complete before proceeding with reset of the driver init. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher

Re: [PATCH V7 00/19] net: ks8851: Unify KS8851 SPI and MLL drivers

2020-05-28 Thread David Miller
From: Marek Vasut Date: Fri, 29 May 2020 00:21:27 +0200 > The KS8851SNL/SNLI and KS8851-16MLL/MLLI/MLLU are very much the same pieces > of silicon, except the former has an SPI interface, while the later has a > parallel bus interface. Thus far, Linux has two separate drivers for each > and they

[PATCH v1 3/7] Bluetooth: Add handler of MGMT_OP_ADD_ADV_PATTERNS_MONITOR

2020-05-28 Thread Miao-chen Chou
This adds the request handler of MGMT_OP_ADD_ADV_PATTERNS_MONITOR command. Note that the controller-based monitoring is not yet in place. This tracks the content of the monitor without sending HCI traffic, so the request returns immediately. The following manual test was performed. - Issue btmgmt

[PATCH v1 2/7] Bluetooth: Add handler of MGMT_OP_READ_ADV_MONITOR_FEATURES

2020-05-28 Thread Miao-chen Chou
This adds the request handler of MGMT_OP_READ_ADV_MONITOR_FEATURES command. Since the controller-based monitoring is not yet in place, this report only the supported features but not the enabled features. The following test was performed. - Issuing btmgmt advmon-features. Signed-off-by: Miao-chen

[PATCH v1 4/7] Bluetooth: Add handler of MGMT_OP_REMOVE_ADV_MONITOR

2020-05-28 Thread Miao-chen Chou
This adds the request handler of MGMT_OP_REMOVE_ADV_MONITOR command. Note that the controller-based monitoring is not yet in place. This removes the internal monitor(s) without sending HCI traffic, so the request returns immediately. The following test was performed. - Issue btmgmt advmon-remove w

[PATCH v1 5/7] Bluetooth: Notify adv monitor added event

2020-05-28 Thread Miao-chen Chou
This notifies management sockets on MGMT_EV_ADV_MONITOR_ADDED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-add command on one console and observe a MGMT_EV_ADV_MONITOR_ADDED event on the other Signed-off-by: Miao-chen Chou --- net/bluetooth/mgmt.c

[PATCH v1 1/7] Bluetooth: Add definitions for advertisement monitor features

2020-05-28 Thread Miao-chen Chou
This adds support for Advertisement Monitor API. Here are the commands and events added. - Read Advertisement Monitor Feature command - Add Advertisement Pattern Monitor command - Remove Advertisement Monitor command - Advertisement Monitor Added event - Advertisement Monitor Removed event Signed-

[PATCH v1 6/7] Bluetooth: Notify adv monitor removed event

2020-05-28 Thread Miao-chen Chou
This notifies management sockets on MGMT_EV_ADV_MONITOR_REMOVED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-remove command on one console and observe a MGMT_EV_ADV_MONITOR_REMOVED event on the other. Signed-off-by: Miao-chen Chou --- net/bluetoot

[PATCH v1 7/7] Bluetooth: Update background scan and report device based on advertisement monitors

2020-05-28 Thread Miao-chen Chou
This calls hci_update_background_scan() when there is any update on the advertisement monitors. If there is at least one advertisement monitor, the filtering policy of scan parameters should be 0x00. This also reports device found mgmt events if there is at least one monitor. The following cases w

Re: [PATCH net-next v3] net: phy: micrel: add phy-mode support for the KSZ9031 PHY

2020-05-28 Thread Florian Fainelli
On 5/28/2020 5:51 AM, Geert Uytterhoeven wrote: > Hi Philippe, > > On Thu, May 28, 2020 at 10:20 AM Philippe Schenker > wrote: >> On Wed, 2020-05-27 at 21:11 +0200, Geert Uytterhoeven wrote: >>> On Wed, Apr 29, 2020 at 11:26 AM Oleksij Rempel < >>> o.rem...@pengutronix.de> wrote: On Wed,

Re: [PATCH net] net: be more gentle about silly gso requests coming from user

2020-05-28 Thread David Miller
From: Eric Dumazet Date: Thu, 28 May 2020 14:57:47 -0700 > Recent change in virtio_net_hdr_to_skb() broke some packetdrill tests. > > When --mss=XXX option is set, packetdrill always provide gso_type & gso_size > for its inbound packets, regardless of packet size. > > if (packet->tcp && p

Re: [PATCH net-next 00/12] net: hns3: misc updates for -next

2020-05-28 Thread David Miller
From: Huazhong Tan Date: Thu, 28 May 2020 21:48:07 +0800 > This patchset includes some updates for the HNS3 ethernet driver. > > #1 removes an unnecessary 'goto'. > #2 adds a missing mutex destroy. > #3&4 refactor two function, make them more readable and maintainable. > #5&6 fix unsuitable type

RE: [PATCH V2 net-next 0/2] net: hns3: adds two VLAN feature

2020-05-28 Thread Salil Mehta
Hi Jakub/David, > From: Jakub Kicinski [mailto:k...@kernel.org] > Sent: Wednesday, May 27, 2020 8:31 PM > To: tanhuazhong > Cc: David Miller ; netdev@vger.kernel.org; > linux-ker...@vger.kernel.org; Salil Mehta ; > Zhuangyuzeng (Yisen) ; Linuxarm > Subject: Re: [PATCH V2 net-next 0/2] net: hns3:

Re: [PATCH v4 net-next 0/4] vmxnet3: upgrade to version 4

2020-05-28 Thread David Miller
From: Ronak Doshi Date: Thu, 28 May 2020 14:53:18 -0700 > vmxnet3 emulation has recently added several new features which includes > offload support for tunnel packets, support for new commands the driver > can issue to emulation, change in descriptor fields, etc. This patch > series extends the

  1   2   3   4   5   6   >