Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-07 Thread Björn Töpel
On 2020-09-07 20:40, Jakub Kicinski wrote: On Mon, 7 Sep 2020 15:37:40 +0200 Björn Töpel wrote: > I've been pondering the exact problem you're solving with Maciej > recently. The efficiency of AF_XDP on one core with the NAPI processing. > > Your solution (even though it admittedly helps

Re: [PATCHv3] selftests: rtnetlink: load fou module for kci_test_encap_fou() test

2020-09-07 Thread Po-Hsu Lin
On Tue, Sep 8, 2020 at 4:12 AM Jakub Kicinski wrote: > > On Mon, 7 Sep 2020 11:50:10 +0800 Po-Hsu Lin wrote: > > The kci_test_encap_fou() test from kci_test_encap() in rtnetlink.sh > > needs the fou module to work. Otherwise it will fail with: > > > > $ ip netns exec "$testns" ip fou add port 7

Re: Failing to attach bond(created with two interfaces from different NICs) to a bridge

2020-09-07 Thread Vasundhara Volam
On Mon, Sep 7, 2020 at 1:06 PM Ido Schimmel wrote: > > On Sun, Sep 06, 2020 at 12:23:23PM -0700, Florian Fainelli wrote: > > > > > > On 9/6/2020 10:13 AM, Jakub Kicinski wrote: > > > On Sun, 6 Sep 2020 14:12:49 +0300 Ido Schimmel wrote: > > > > On Thu, Sep 03, 2020 at 12:14:28PM -0700, Jakub Kicin

Re: [PATCH nf-next v3 3/3] netfilter: Introduce egress hook

2020-09-07 Thread Laura García Liébana
Hi Daniel, On Tue, Sep 8, 2020 at 12:11 AM Daniel Borkmann wrote: > > On 9/5/20 1:18 PM, Laura García Liébana wrote: > > On Fri, Sep 4, 2020 at 11:14 PM Daniel Borkmann > > wrote: > [...] > > Something like this seems more trivial to me: > > > > table netdev mytable { > > chain mychain { >

Re: [PATCH] ath11k: fix a double free and a memory leak

2020-09-07 Thread Kalle Valo
t...@redhat.com wrote: > clang static analyzer reports this problem > > mac.c:6204:2: warning: Attempt to free released memory > kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels); > ^ > > The channels pointer is allocated in ath11k_

Re: [PATCH bpf-next 4/4] ixgbe, xsk: use XSK_NAPI_WEIGHT as NAPI poll budget

2020-09-07 Thread Björn Töpel
On 2020-09-07 21:32, Jakub Kicinski wrote: On Mon, 7 Sep 2020 17:02:17 +0200 Björn Töpel wrote: From: Björn Töpel Start using XSK_NAPI_WEIGHT as NAPI poll budget for the AF_XDP Rx zero-copy path. Signed-off-by: Björn Töpel --- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 2 +- 1 file c

Re: [PATCH] ath11k: fix a double free and a memory leak

2020-09-07 Thread Nathan Chancellor
On Sun, Sep 06, 2020 at 02:26:25PM -0700, t...@redhat.com wrote: > From: Tom Rix > > clang static analyzer reports this problem > > mac.c:6204:2: warning: Attempt to free released memory > kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels); > ^~

Re: [PATCH] mwifiex: remove function pointer check

2020-09-07 Thread Nathan Chancellor
On Sun, Sep 06, 2020 at 01:05:48PM -0700, t...@redhat.com wrote: > From: Tom Rix > > clang static analyzer reports this problem > > init.c:739:8: warning: Called function pointer > is null (null dereference) > ret = adapter->if_ops.check_fw_status( ... > ^

Re: [PATCH v2 1/4] net: dsa: microchip: Make switch detection more informative

2020-09-07 Thread Florian Fainelli
On 9/7/2020 3:12 AM, Paul Barker wrote: To make switch detection more informative print the result of the ksz9477/ksz9893 compatibility check. With debug output enabled also print the contents of the Chip ID registers as a 40-bit hex string. As this detection is the first communication with t

Re: [PATCH v2 2/4] net: dsa: microchip: Improve phy mode message

2020-09-07 Thread Florian Fainelli
On 9/7/2020 3:12 AM, Paul Barker wrote: Always print the selected phy mode for the CPU port when using the ksz9477 driver. If the phy mode was changed, also print the previous mode to aid in debugging. To make the message more clear, prefix it with the port number which it applies to and impr

Re: [PATCH net v2] hv_netvsc: Fix hibernation for mlx5 VF driver

2020-09-07 Thread Jakub Kicinski
On Mon, 7 Sep 2020 00:13:39 -0700 Dexuan Cui wrote: > mlx5_suspend()/resume() keep the network interface, so during hibernation > netvsc_unregister_vf() and netvsc_register_vf() are not called, and hence > netvsc_resume() should call netvsc_vf_changed() to switch the data path > back to the VF aft

Re: [PATCH v2 4/4] net: dsa: microchip: Implement recommended reset timing

2020-09-07 Thread Florian Fainelli
On 9/7/2020 3:12 AM, Paul Barker wrote: The datasheet for the ksz9893 and ksz9477 switches recommend waiting at least 100us after the de-assertion of reset before trying to program the device through any interface. Also switch the existing msleep() call to usleep_range() as recommended in Doc

Re: [PATCH v2 3/4] net: dsa: microchip: Disable RGMII in-band status on KSZ9893

2020-09-07 Thread Florian Fainelli
On 9/7/2020 3:12 AM, Paul Barker wrote: We can't assume that the link partner supports the in-band status reporting which is enabled by default on the KSZ9893 when using RGMII for the upstream port. Signed-off-by: Paul Barker Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Flor

Re: [PATCH net-next 1/4] net: dsa: tag_8021q: include missing refcount.h

2020-09-07 Thread Florian Fainelli
On 9/7/2020 11:29 AM, Vladimir Oltean wrote: From: Vladimir Oltean The previous assumption was that the caller would already have this header file included. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next 4/4] net: dsa: set configure_vlan_while_not_filtering to true by default

2020-09-07 Thread Florian Fainelli
On 9/7/2020 11:29 AM, Vladimir Oltean wrote: From: Vladimir Oltean As explained in commit 54a0ed0df496 ("net: dsa: provide an option for drivers to always receive bridge VLANs"), DSA has historically been skipping VLAN switchdev operations when the bridge wasn't in vlan_filtering mode, but t

Re: [PATCH v2 net-next] net: dsa: change PHY error message again

2020-09-07 Thread Jakub Kicinski
On Tue, 8 Sep 2020 02:06:56 +0300 Vladimir Oltean wrote: > slave_dev->name is only populated at this stage if it was specified > through a label in the device tree. However that is not mandatory. > When it isn't, the error message looks like this: > > [5.037057] fsl_enetc :00:00.2 eth2: e

Re: [PATCH net-next] net: dsa: don't print non-fatal MTU error if not supported

2020-09-07 Thread Jakub Kicinski
On Tue, 8 Sep 2020 02:25:56 +0300 Vladimir Oltean wrote: > Commit 72579e14a1d3 ("net: dsa: don't fail to probe if we couldn't set > the MTU") changed, for some reason, the "err && err != -EOPNOTSUPP" > check into a simple "err". This causes the MTU warning to be printed > even for drivers that don

[net-next] net: smsc911x: Remove unused variables

2020-09-07 Thread Wei Xu
Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/smsc/smsc911x.c: In function ‘smsc911x_rx_fastforward’: drivers/net/ethernet/smsc/smsc911x.c:1199:16: warning: variable ‘temp’ set but not used [-Wunused-but-set-variable] drivers/net/ethernet/smsc/smsc911x.c: In function

Re: linux-next: build warning after merge of the net-next tree

2020-09-07 Thread Jakub Kicinski
On Tue, 8 Sep 2020 13:00:00 +1000 Stephen Rothwell wrote: > Hi all, > > After merging the net-next tree, today's linux-next build (powerpc > ppc64_defconfig) produced this warning: > > net/bridge/br_multicast.c: In function 'br_multicast_find_port': > net/bridge/br_multicast.c:1818:21: warning: u

Re: [PATCH net-next v2 0/7] net: dsa: mv88e6xxx: Add devlink regions support

2020-09-07 Thread Florian Fainelli
On 9/7/2020 5:51 PM, Andrew Lunn wrote: Make use of devlink regions to allow read access to some of the internal of the switches. The switch itself will never trigger a region snapshot, it is assumed it is performed from user space as needed. v2: Remove left of debug print Comment ATU format

Re: [PATCH net-next v2] net: tighten the definition of interface statistics

2020-09-07 Thread Jakub Kicinski
On Thu, 3 Sep 2020 16:14:31 -0700 Jakub Kicinski wrote: > This patch is born out of an investigation into which IEEE statistics > correspond to which struct rtnl_link_stats64 members. Turns out that > there seems to be reasonable consensus on the matter, among many drivers. > To save others the ti

Re: [PATCH] net/sock: don't drop udp packets if udp_mem[2] not reached

2020-09-07 Thread dust.li
On Mon, Sep 07, 2020 at 07:18:48PM +0200, Paolo Abeni wrote: >Hi, > >On Mon, 2020-09-07 at 22:44 +0800, Dust Li wrote: >> We encoutered udp packets drop under a pretty low pressure >> with net.ipv4.udp_mem[0] set to a small value (4096). >> >> After some tracing and debugging, we found that for ud

Re: [PATCH v2 net] net: dsa: link interfaces with the DSA master to get rid of lockdep warnings

2020-09-07 Thread Florian Fainelli
On 9/7/2020 4:48 PM, Vladimir Oltean wrote: Since commit 845e0ebb4408 ("net: change addr_list_lock back to static key"), cascaded DSA setups (DSA switch port as DSA master for another DSA switch port) are emitting this lockdep warning: WARNING: pos

[PATCH] staging: qlge: fix quoted string split across lines

2020-09-07 Thread Ross Schmidt
Fixed a coding style issue by merging split quoted strings in qlge_main.c to fix checkpatch warnings. Signed-off-by: Ross Schmidt --- drivers/staging/qlge/qlge_main.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/stagi

linux-next: build failure after merge of the bpf-next tree

2020-09-07 Thread Stephen Rothwell
Hi all, After merging the bpf-next tree, today's linux-next build (powerpcle perf) failed like this: util/bpf-loader.c: In function 'config_bpf_program': util/bpf-loader.c:331:2: error: 'bpf_program__title' is deprecated: BPF program title is confusing term; please use bpf_program__section_name(

Re: [PATCH net-next] net: dsa: don't print non-fatal MTU error if not supported

2020-09-07 Thread Florian Fainelli
On 9/7/2020 4:25 PM, Vladimir Oltean wrote: Commit 72579e14a1d3 ("net: dsa: don't fail to probe if we couldn't set the MTU") changed, for some reason, the "err && err != -EOPNOTSUPP" check into a simple "err". This causes the MTU warning to be printed even for drivers that don't have the MTU o

Re: [PATCH v2 net-next] net: dsa: change PHY error message again

2020-09-07 Thread Florian Fainelli
On 9/7/2020 4:06 PM, Vladimir Oltean wrote: slave_dev->name is only populated at this stage if it was specified through a label in the device tree. However that is not mandatory. When it isn't, the error message looks like this: [5.037057] fsl_enetc :00:00.2 eth2: error -19 setting up

[PATCH net-next 3/7] net: hns3: fix a typo in struct hclge_mac

2020-09-07 Thread Huazhong Tan
From: Guangbin Huang The member link of struct hclge_mac stores the link status of MAC and PHY if PHY exists, but its annotation uses word "exit", so fix it. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 2 +- 1 file ch

[PATCH net-next 2/7] net: hns3: skip periodic service task if reset failed

2020-09-07 Thread Huazhong Tan
From: Guangbin Huang When reset fails, if there are some pending jobs for the periodic service task, it does not do anything except print error each time the task is scheduled. So skip the periodic service task if reset failed. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- dri

[PATCH net-next 0/7] net: hns3: misc updates

2020-09-07 Thread Huazhong Tan
There are some misc updates for the HNS3 ethernet driver. #1 narrows two local variable range in hclgevf_reset_prepare_wait(). #2 adds reset failure check in periodic service task. #3~#7 adds some cleanups. Guangbin Huang (2): net: hns3: skip periodic service task if reset failed net: hns3: f

[PATCH net-next 7/7] net: hns3: remove some unused function hns3_update_promisc_mode()

2020-09-07 Thread Huazhong Tan
From: Guojia Liao hns3_update_promisc_mode is defined, but not be used, so remove it. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 14 -- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 1 - 2 files changed, 15 del

[PATCH net-next 4/7] net: hns3: remove unused field 'io_base' in struct hns3_enet_ring

2020-09-07 Thread Huazhong Tan
'io_base' has been defined and initialized, but never used, so remove it. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 -- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hn

[PATCH net-next 1/7] net: hns3: narrow two local variable range in hclgevf_reset_prepare_wait()

2020-09-07 Thread Huazhong Tan
Since variable send_msg and ret only used in if branch, so move their definition into the if branch. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/his

[PATCH net-next 6/7] net: hns3: remove some unused macros related to queue

2020-09-07 Thread Huazhong Tan
There are several macros related queue defined, but never used, so remove them. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h b/drivers/net/ethernet/hisilico

[PATCH net-next 5/7] net: hns3: remove unused field 'tc_num_last_time' in struct hclge_dev

2020-09-07 Thread Huazhong Tan
'tc_num_last_time' is defined, but never used, so remove it. Reported-by: Jian Shen Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h b/drivers/net/e

linux-next: build warning after merge of the net-next tree

2020-09-07 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning: net/bridge/br_multicast.c: In function 'br_multicast_find_port': net/bridge/br_multicast.c:1818:21: warning: unused variable 'br' [-Wunused-variable] 1818 | struct net_bridge *br

[MPTCP][PATCH v2 net 2/2] mptcp: fix subflow's remote_id issues

2020-09-07 Thread Geliang Tang
This patch set the init remote_id to zero, otherwise it will be a random number. Then it added the missing subflow's remote_id setting code both in __mptcp_subflow_connect and in subflow_ulp_clone. Fixes: 01cacb00b35cb ("mptcp: add netlink-based PM") Fixes: ec3edaa7ca6ce ("mptcp: Add handling of

[MPTCP][PATCH v2 net 1/2] mptcp: fix subflow's local_id issues

2020-09-07 Thread Geliang Tang
In mptcp_pm_nl_get_local_id, skc_local is the same as msk_local, so it always return 0. Thus every subflow's local_id is 0. It's incorrect. This patch fixed this issue. Also, we need to ignore the zero address here, like 0.0.0.0 in IPv4. When we use the zero address as a local address, it means t

[MPTCP][PATCH v2 net 0/2] mptcp: fix subflow's local_id/remote_id issues

2020-09-07 Thread Geliang Tang
v2: - add Fixes tags; - simply with 'return addresses_equal'; - use 'reversed Xmas tree' way. Geliang Tang (2): mptcp: fix subflow's local_id issues mptcp: fix subflow's remote_id issues net/mptcp/pm_netlink.c | 17 +++-- net/mptcp/subflow.c| 7 +-- 2 files changed, 2

Re: [PATCH net-next 0/2] net: two updates related to UDP GSO

2020-09-07 Thread tanhuazhong
On 2020/9/7 23:35, Willem de Bruijn wrote: On Mon, Sep 7, 2020 at 3:38 PM tanhuazhong wrote: On 2020/9/7 17:22, Willem de Bruijn wrote: On Sun, Sep 6, 2020 at 8:42 PM Jakub Kicinski wrote: On Sat, 5 Sep 2020 14:11:11 +0800 Huazhong Tan wrote: There are two updates relates to UDP GSO.

[PATCH v2] net: tracepoint: fix print wrong sysctl_mem value

2020-09-07 Thread Dust Li
sysctl_mem is an point, and tracepoint entry do not support been visited like an array. Use an __array(3) to store sysctl_mem instead. tracpoint output with and without this fix: - without fix: 28821.074 sock:sock_exceed_buf_limit:proto:UDP sysctl_mem=-1741233440,19,322156906942464 allocated

Re: [PATCH] net: tracepoint: fix print wrong sysctl_mem value

2020-09-07 Thread dust.li
On Mon, Sep 07, 2020 at 10:50:30AM -0700, Jakub Kicinski wrote: >On Mon, 7 Sep 2020 22:47:57 +0800 Dust Li wrote: >> sysctl_mem is an point, and tracepoint entry do not support >> been visited like an array. Use 3 long type to get sysctl_mem >> instead. >> >> tracpoint output with and without thi

Re: [PATCH v2 net-next 1/9] xdp: introduce mb in xdp_buff/xdp_frame

2020-09-07 Thread David Ahern
On 9/7/20 12:02 PM, Jesper Dangaard Brouer wrote: > >> ok, is there any alignment requirement? can frame_sz be number of 32-bit >> words? I believe bit shifts are cheap. > > No that is not possible, because some drivers and generic-XDP have a > fully dynamic frame_sz. > frame_sz represents allo

Re: [PATCH net-next] net: dsa: don't print non-fatal MTU error if not supported

2020-09-07 Thread Vladimir Oltean
On Tue, Sep 08, 2020 at 02:57:09AM +0200, Andrew Lunn wrote: > Hi Vladimir > > In some ways, this has been good. A lot more DSA drivers now have MTU > support and jumbo packet support. Yes, I suspect this is because many people wanted to experiment with jumbo frames anyway, and the warning in dmes

Re: [PATCH net-next] net: dsa: don't print non-fatal MTU error if not supported

2020-09-07 Thread Andrew Lunn
On Tue, Sep 08, 2020 at 02:25:56AM +0300, Vladimir Oltean wrote: > Commit 72579e14a1d3 ("net: dsa: don't fail to probe if we couldn't set > the MTU") changed, for some reason, the "err && err != -EOPNOTSUPP" > check into a simple "err". This causes the MTU warning to be printed > even for drivers t

Re: [PATCH v2 net-next] net: dsa: change PHY error message again

2020-09-07 Thread Andrew Lunn
On Tue, Sep 08, 2020 at 02:06:56AM +0300, Vladimir Oltean wrote: > slave_dev->name is only populated at this stage if it was specified > through a label in the device tree. However that is not mandatory. > When it isn't, the error message looks like this: > > [5.037057] fsl_enetc :00:00.2

[PATCH net-next v2 5/7] net: dsa: mv88e6xxx: Add devlink regions

2020-09-07 Thread Andrew Lunn
Allow ports, the global registers, and the ATU to be snapshot via devlink regions. v2: Remove left over debug prints Comment ATU format is generic for mv88e6xxx, not wider Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c| 14 +- drivers/net/dsa/mv88e6xxx/chip.h| 12 + d

[PATCH net-next v2 7/7] net: dsa: mv88e6xxx: Implement devlink info get callback

2020-09-07 Thread Andrew Lunn
Return the driver name and the asic.id with the switch name. Reviewed-by: Jakub Kicinski Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c| 1 + drivers/net/dsa/mv88e6xxx/devlink.c | 15 +++ drivers/net/dsa/mv88e6xxx/devlink.h | 3 +++ 3 files changed, 19 inserti

[PATCH net-next v2 6/7] net: dsa: wire up devlink info get

2020-09-07 Thread Andrew Lunn
Allow the DSA drivers to implement the devlink call to get info info, e.g. driver name, firmware version, ASIC ID, etc. v2: Combine declaration and the assignment on a single line. Signed-off-by: Andrew Lunn --- include/net/dsa.h | 5 - net/dsa/dsa2.c| 19 --- 2 files c

[PATCH net-next v2 3/7] net: dsa: mv88e6xxx: Move devlink code into its own file

2020-09-07 Thread Andrew Lunn
There will soon be more devlink code. Move the existing code into a file of its own, before we start adding this new code. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv88e6xxx/chip.c| 255 +-- drivers/net/dsa/mv88e6xxx/

[PATCH net-next v2 2/7] net: dsa: Add devlink regions support to DSA

2020-09-07 Thread Andrew Lunn
Allow DSA drivers to make use of devlink regions, via simple wrappers. Signed-off-by: Andrew Lunn --- include/net/dsa.h | 6 ++ net/dsa/dsa.c | 16 2 files changed, 22 insertions(+) diff --git a/include/net/dsa.h b/include/net/dsa.h index 63ff6f717307..8963440ec7f8 100

[PATCH net-next v2 4/7] net: dsa: mv88e6xxx: Create helper for FIDs in use

2020-09-07 Thread Andrew Lunn
Refactor the code in mv88e6xxx_atu_new() which builds a bitmaps of FIDs in use into a helper function. This will be reused by the devlink code when dumping the ATU. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 20 drivers/net/dsa/mv88e6xxx/chip.h | 2 ++

[PATCH net-next v2 0/7] net: dsa: mv88e6xxx: Add devlink regions support

2020-09-07 Thread Andrew Lunn
Make use of devlink regions to allow read access to some of the internal of the switches. The switch itself will never trigger a region snapshot, it is assumed it is performed from user space as needed. v2: Remove left of debug print Comment ATU format is generic to mv88e6xxx Combine declaration a

[PATCH net-next v2 1/7] net: dsa: Add helper to convert from devlink to ds

2020-09-07 Thread Andrew Lunn
Given a devlink instance, return the dsa switch it is associated to. Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn --- include/net/dsa.h | 2 ++ net/dsa/dsa.c | 20 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/net/dsa.h b/include/

Re: [PATCH AUTOSEL 4.14 17/33] net: usb: qmi_wwan: add Telit 0x1050 composition

2020-09-07 Thread Lars Melin
On 9/8/2020 01:15, Sasha Levin wrote: On Mon, Sep 07, 2020 at 11:36:37AM +0200, Kristian Evensen wrote: // snip When testing the FN980 with kernel 4.14, I noticed that the qmi device was not there. Checking the git log, I see that this patch was never applied. The patch applies fine, so I gues

[PATCH] brcmsmac: fix memory leak in wlc_phy_attach_lcnphy

2020-09-07 Thread Keita Suzuki
When wlc_phy_txpwr_srom_read_lcnphy fails in wlc_phy_attach_lcnphy, the allocated pi->u.pi_lcnphy is leaked, since struct brcms_phy will be freed in the caller function. Fix this by calling wlc_phy_detach_lcnphy in the error handler of wlc_phy_txpwr_srom_read_lcnphy before returning. Signed-off-b

Re: [PATCH net] net/packet: Fix a comment about hard_header_len and headroom allocation

2020-09-07 Thread Xie He
Thank you for your comment! On Mon, Sep 7, 2020 at 2:41 AM Willem de Bruijn wrote: > > On Sun, Sep 6, 2020 at 5:18 AM Xie He wrote: > > > > This comment is outdated and no longer reflects the actual implementation > > of af_packet.c. > > If it was previously true, can you point to a commit that

[PATCH net-next v1 0/3] Add support for LEDs on Marvell PHYs

2020-09-07 Thread Marek Behún
Hi, after 4 RFC versions I am now sending these patches for real. The code applies on net-next. Changes since RFC v4: - added device-tree binding documentation - the OF code now checks for linux,default-hw-mode property so that default HW mode can be set in device tree (like linux,default-tri

[PATCH net-next v1 2/3] net: phy: add API for LEDs controlled by ethernet PHY chips

2020-09-07 Thread Marek Behún
Many an ethernet PHY supports various HW control modes for LEDs connected directly to the PHY chip. This patch adds code for registering such LEDs when described in device tree and also adds a new private LED trigger called phydev-hw-mode. When this trigger is enabled for a LED, the various HW con

[PATCH net-next v1 3/3] net: phy: marvell: add support for LEDs controlled by Marvell PHYs

2020-09-07 Thread Marek Behún
This patch adds support for controlling the LEDs connected to several families of Marvell PHYs via the PHY HW LED trigger API. These families are: 88E1112, 88E1121R, 88E1240, 88E1340S, 88E1510 and 88E1545. More can be added. This patch does not yet add support for compound LED modes. This could be

[PATCH net-next v1 1/3] dt-bindings: net: ethernet-phy: add description for PHY LEDs

2020-09-07 Thread Marek Behún
Document binding for LEDs connected to and controlled by ethernet PHY chips. Signed-off-by: Marek Behún Cc: Rob Herring --- .../devicetree/bindings/net/ethernet-phy.yaml | 31 +++ 1 file changed, 31 insertions(+) diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.y

[PATCH v2 net] net: dsa: link interfaces with the DSA master to get rid of lockdep warnings

2020-09-07 Thread Vladimir Oltean
Since commit 845e0ebb4408 ("net: change addr_list_lock back to static key"), cascaded DSA setups (DSA switch port as DSA master for another DSA switch port) are emitting this lockdep warning: WARNING: possible recursive locking detected 5.8.0-rc1-00133-

[PATCH net-next] net: dsa: don't print non-fatal MTU error if not supported

2020-09-07 Thread Vladimir Oltean
Commit 72579e14a1d3 ("net: dsa: don't fail to probe if we couldn't set the MTU") changed, for some reason, the "err && err != -EOPNOTSUPP" check into a simple "err". This causes the MTU warning to be printed even for drivers that don't have the MTU operations implemented. Fix that. Signed-off-by:

[PATCH v2 net-next] net: dsa: change PHY error message again

2020-09-07 Thread Vladimir Oltean
slave_dev->name is only populated at this stage if it was specified through a label in the device tree. However that is not mandatory. When it isn't, the error message looks like this: [5.037057] fsl_enetc :00:00.2 eth2: error -19 setting up slave PHY for eth%d [5.044672] fsl_enetc 00

Re: [PATCH AUTOSEL 5.8 14/53] ibmvnic fix NULL tx_pools and rx_tools issue at do_reset

2020-09-07 Thread Sasha Levin
On Mon, Sep 07, 2020 at 02:10:26PM -0700, Jakub Kicinski wrote: On Mon, 7 Sep 2020 12:31:40 -0400 Sasha Levin wrote: [ Upstream commit 9f13457377907fa253aef560e1a37e1ca4197f9b ] @@ -2024,10 +2033,14 @@ static int do_reset(struct ibmvnic_adapter *adapter, } else {

Re: [PATCH nf-next v3 3/3] netfilter: Introduce egress hook

2020-09-07 Thread Daniel Borkmann
On 9/5/20 1:18 PM, Laura García Liébana wrote: On Fri, Sep 4, 2020 at 11:14 PM Daniel Borkmann wrote: [...] Something like this seems more trivial to me: table netdev mytable { chain mychain { type filter hook egress device "eth0" priority 100; policy drop; meta protoco

[PATCH bpf] bpf: Fix clobbering of r2 in bpf_gen_ld_abs

2020-09-07 Thread Daniel Borkmann
Bryce reported that he saw the following with: 0: r6 = r1 1: r1 = 12 2: r0 = *(u16 *)skb[r1] The xlated sequence was incorrectly clobbering r2 with pointer value of r6 ... 0: (bf) r6 = r1 1: (b7) r1 = 12 2: (bf) r1 = r6 3: (bf) r2 = r1 4: (85) call bpf_skb_load_helper_16_no_ca

[PATCH net-next v2 3/3] ipmr: Use full VIF ID in netlink cache reports

2020-09-07 Thread Paul Davey
Insert the full 16 bit VIF ID into ipmr Netlink cache reports. The VIF_ID attribute has 32 bits of space so can store the full VIF ID extracted from the high and low byte fields in the igmpmsg. Signed-off-by: Paul Davey --- net/ipv4/ipmr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH net-next v2 1/3] ipmr: Add route table ID to netlink cache reports

2020-09-07 Thread Paul Davey
Insert the multicast route table ID as a Netlink attribute to Netlink cache report notifications. When multiple route tables are in use it is necessary to have a way to determine which route table a given cache report belongs to when receiving the cache report. Signed-off-by: Paul Davey --- inc

Re: [PATCH net-next] rxrpc: Remove unused macro rxrpc_min_rtt_wlen

2020-09-07 Thread Jakub Kicinski
On Fri, 4 Sep 2020 21:08:37 +0800 Wang Hai wrote: > rxrpc_min_rtt_wlen is never used after it was introduced. > So better to remove it. > > Reported-by: Hulk Robot > Signed-off-by: Wang Hai Applied.

[PATCH net-next v2 2/3] ipmr: Add high byte of VIF ID to igmpmsg

2020-09-07 Thread Paul Davey
Use the unused3 byte in struct igmpmsg to hold the high 8 bits of the VIF ID. If using more than 255 IPv4 multicast interfaces it is necessary to have access to a VIF ID for cache reports that is wider than 8 bits, the VIF ID present in the igmpmsg reports sent to mroute_sk was only 8 bits wide in

[PATCH net-next v2 0/3] Allow more than 255 IPv4 multicast interfaces

2020-09-07 Thread Paul Davey
Currently it is not possible to use more than 255 multicast interfaces for IPv4 due to the format of the igmpmsg header which only has 8 bits available for the VIF ID. There is space available in the igmpmsg header to store the full VIF ID in the form of an unused byte following the VIF ID field.

RE: [PATCH v7 3/3] hv_netvsc: Use vmbus_requestor to generate transaction IDs for VMBus hardening

2020-09-07 Thread Michael Kelley
From: Andrea Parri (Microsoft) Sent: Monday, September 7, 2020 9:19 AM > > From: Andres Beltran > > Currently, pointers to guest memory are passed to Hyper-V as > transaction IDs in netvsc. In the face of errors or malicious > behavior in Hyper-V, netvsc should not expose or trust the transact

Re: [PATCH net-next 2/6] sfc: remove phy_op indirection

2020-09-07 Thread Jakub Kicinski
On Mon, 7 Sep 2020 20:31:03 +0100 Edward Cree wrote: > On 07/09/2020 20:22, Jakub Kicinski wrote: > > On Mon, 7 Sep 2020 17:14:34 +0100 Edward Cree wrote: > >> drivers/net/ethernet/sfc/mcdi_port.c| 593 +--- > >> drivers/net/ethernet/sfc/mcdi_port_common.c | 560 +

WARNING: refcount bug in qrtr_recvmsg

2020-09-07 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:c70672d8 Merge tag 's390-5.9-5' of git://git.kernel.org/pu.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=163f0c3190 kernel config: https://syzkaller.appspot.com/x/.config?x=bd46548257448703 das

Re: [PATCH net v2] Revert "netns: don't disable BHs when locking "nsid_lock""

2020-09-07 Thread Jakub Kicinski
On Mon, 7 Sep 2020 15:54:41 + Taehee Yoo wrote: > This reverts commit 8d7e5dee972f1cde2ba96c621f1541fa36e7d4f4. > > To protect netns id, the nsid_lock is used when netns id is being > allocated and removed by peernet2id_alloc() and unhash_nsid(). > The nsid_lock can be used in BH context but

Re: [PATCH net] hinic: fix rewaking txq after netif_tx_disable

2020-09-07 Thread Jakub Kicinski
On Mon, 7 Sep 2020 22:15:16 +0800 Luo bin wrote: > When calling hinic_close in hinic_set_channels, all queues are > stopped after netif_tx_disable, but some queue may be rewaken in > free_tx_poll by mistake while drv is handling tx irq. If one queue > is rewaken core may call hinic_xmit_frame to se

Re: [PATCH ethtool,v2] ethtool: add support show/set-time-stamping

2020-09-07 Thread Michal Kubecek
On Mon, Sep 07, 2020 at 06:56:20PM +0200, Eric Dumazet wrote: > On Mon, Sep 7, 2020 at 2:53 PM Michal Kubecek wrote: > > > > As I said in response to v1 patch, I don't like the idea of adding a new > > ioctl interface to ethool when we are working on replacing and > > deprecating the existing ones

INFO: trying to register non-static key in update_defense_level

2020-09-07 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:9322c47b Merge tag 'xfs-5.9-fixes-2' of git://git.kernel.o.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1670fe5990 kernel config: https://syzkaller.appspot.com/x/.config?x=bd46548257448703 das

memory leak in __team_options_register

2020-09-07 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:f4d51dff Linux 5.9-rc4 git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=126a23e190 kernel config: https://syzkaller.appspot.com/x/.config?x=7954285d6e960c0f dashboard link: https://syzkaller.appspot

WARNING: refcount bug in qrtr_node_lookup

2020-09-07 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:9322c47b Merge tag 'xfs-5.9-fixes-2' of git://git.kernel.o.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=16cf729e90 kernel config: https://syzkaller.appspot.com/x/.config?x=e1c560d0f4e121c9 das

Re: [PATCH 1/1 net-next] selftests/net: replace obsolete NFT_CHAIN configuration

2020-09-07 Thread Jakub Kicinski
On Mon, 7 Sep 2020 18:14:28 +0200 Fabian Frederick wrote: > Replace old parameters with global NFT_NAT from commit db8ab38880e0 > ("netfilter: nf_tables: merge ipv4 and ipv6 nat chain types") > > Signed-off-by: Fabian Frederick > --- > tools/testing/selftests/net/config | 3 +-- > 1 file change

Re: Question about dev_validate_header used in af_packet.c

2020-09-07 Thread Xie He
On Mon, Sep 7, 2020 at 2:06 AM Willem de Bruijn wrote: > > The CAP_SYS_RAWIO exception indeed was requested to be able to > purposely test devices against bad inputs. The gmane link > unfortunately no longer works, but this was the discussion thread: > https://www.mail-archive.com/netdev@vger.kern

Re: [PATCH AUTOSEL 5.8 14/53] ibmvnic fix NULL tx_pools and rx_tools issue at do_reset

2020-09-07 Thread Jakub Kicinski
On Mon, 7 Sep 2020 12:31:40 -0400 Sasha Levin wrote: > [ Upstream commit 9f13457377907fa253aef560e1a37e1ca4197f9b ] > @@ -2024,10 +2033,14 @@ static int do_reset(struct ibmvnic_adapter *adapter, > } else { > rc = reset_tx_pools(adapter); >

Re: [PATCH net] ibmvnic: add missing parenthesis in do_reset()

2020-09-07 Thread Jakub Kicinski
On Fri, 4 Sep 2020 21:07:49 -0700 Jakub Kicinski wrote: > Indentation and logic clearly show that this code is missing > parenthesis. > > Fixes: 9f1345737790 ("ibmvnic fix NULL tx_pools and rx_tools issue at > do_reset") > Signed-off-by: Jakub Kicinski Applied now.

Re: [PATCH net-next] net: ethernet: dnet: Remove set but unused variable 'len'

2020-09-07 Thread Jakub Kicinski
On Mon, 7 Sep 2020 22:12:07 +0800 Wang Hai wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/ethernet/dnet.c: In function dnet_start_xmit > drivers/net/ethernet/dnet.c:511:15: warning: variable ‘len’ set but not used > [-Wunused-but-set-variable] > > commit 4796417417a6 ("d

Re: [PATCH net-next] netlink: add spaces around '&' in netlink_recvmsg()

2020-09-07 Thread Jakub Kicinski
On Mon, 7 Sep 2020 21:21:44 +0800 Yang Yingliang wrote: > Spaces preferred around '&'. This in itself is not a sufficient justification to touch code that pre-dates the git era. IMHO '&' without spaces around it is particularly hard to read, and the code is actively used, which makes the change

Re: [PATCH] brcmsmac: fix potential memory leak in wlc_phy_attach_lcnphy

2020-09-07 Thread Arend Van Spriel
On 9/7/2020 6:22 PM, Keita Suzuki wrote: When wlc_phy_txpwr_srom_read_lcnphy fails in wlc_phy_attach_lcnphy, the allocated pi->u.pi_lcnphy is leaked, since struct brcms_phy will be freed in the caller function. Fix this by calling wlc_phy_detach_lcnphy in the error handler of wlc_phy_txpwr_sr

Re: [PATCH net-next] net: xilinx: remove redundant null check before clk_disable_unprepare()

2020-09-07 Thread Jakub Kicinski
On Mon, 7 Sep 2020 13:14:05 + Radhey Shyam Pandey wrote: > > From: Zhang Changzhong > > Sent: Monday, September 7, 2020 6:32 PM > > To: Radhey Shyam Pandey ; da...@davemloft.net; > > k...@kernel.org; Michal Simek > > Cc: netdev@vger.kernel.org; linux-ker...@vger.kernel.org > > Subject: [PATCH

Re: [PATCH net-next] net: ethernet: fec: remove redundant null check before clk_disable_unprepare()

2020-09-07 Thread Jakub Kicinski
On Mon, 7 Sep 2020 13:14:50 + Andy Duan wrote: > From: Zhang Changzhong Sent: Monday, September > 7, 2020 8:50 PM > > Because clk_prepare_enable() and clk_disable_unprepare() already checked > > NULL clock parameter, so the additional checks are unnecessary, just remove > > them. > > > > Rep

Re: [PATCH net-next] net: stmmac: remove redundant null check before clk_disable_unprepare()

2020-09-07 Thread Jakub Kicinski
On Mon, 7 Sep 2020 20:57:24 +0800 Zhang Changzhong wrote: > Because clk_prepare_enable() and clk_disable_unprepare() already checked > NULL clock parameter, so the additional checks are unnecessary, just > remove them. > > Reported-by: Hulk Robot > Signed-off-by: Zhang Changzhong Applied.

Re: [PATCH net-next] net: ethernet: dwmac: remove redundant null check before clk_disable_unprepare()

2020-09-07 Thread Jakub Kicinski
On Mon, 7 Sep 2020 20:46:54 +0800 Zhang Changzhong wrote: > Because clk_prepare_enable() and clk_disable_unprepare() already checked > NULL clock parameter, so the additional checks are unnecessary, just > remove them. > > Reported-by: Hulk Robot > Signed-off-by: Zhang Changzhong Applied.

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

2020-09-07 Thread Jakub Kicinski
On Mon, 7 Sep 2020 12:56:04 +0300 Nikolay Aleksandrov wrote: > Hi all, > This patch-set implements the control plane for initial IGMPv3/MLDv2 > support which takes care of include/exclude sets and state transitions > based on the different report types. > Patch 01 arranges the structure better by

[PATCH] airo: switch from 'pci_' to 'dma_' API

2020-09-07 Thread Christophe JAILLET
The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'mpi_map_card()' GFP_KERNEL can be used because this

Re: [PATCHv3] selftests: rtnetlink: load fou module for kci_test_encap_fou() test

2020-09-07 Thread Jakub Kicinski
On Mon, 7 Sep 2020 11:50:10 +0800 Po-Hsu Lin wrote: > The kci_test_encap_fou() test from kci_test_encap() in rtnetlink.sh > needs the fou module to work. Otherwise it will fail with: > > $ ip netns exec "$testns" ip fou add port ipproto 47 > RTNETLINK answers: No such file or directory >

Re: [PATCH net] netdevice.h: fix proto_down_reason kernel-doc warning

2020-09-07 Thread Randy Dunlap
On 9/7/20 12:49 PM, Jakub Kicinski wrote: > On Sun, 6 Sep 2020 20:31:16 -0700 Randy Dunlap wrote: >> From: Randy Dunlap >> >> Fix kernel-doc warning in : >> >> ../include/linux/netdevice.h:2158: warning: Function parameter or member >> 'proto_down_reason' not described in 'net_device' >> >> Fixes

Re: [PATCH net] netdevice.h: fix xdp_state kernel-doc warning

2020-09-07 Thread Jakub Kicinski
On Sun, 6 Sep 2020 20:32:30 -0700 Randy Dunlap wrote: > From: Randy Dunlap > > Fix kernel-doc warning in : > > ../include/linux/netdevice.h:2158: warning: Function parameter or member > 'xdp_state' not described in 'net_device' > > Fixes: 7f0a838254bd ("bpf, xdp: Maintain info on attached XDP

Re: [PATCH net] netdevice.h: fix proto_down_reason kernel-doc warning

2020-09-07 Thread Jakub Kicinski
On Sun, 6 Sep 2020 20:31:16 -0700 Randy Dunlap wrote: > From: Randy Dunlap > > Fix kernel-doc warning in : > > ../include/linux/netdevice.h:2158: warning: Function parameter or member > 'proto_down_reason' not described in 'net_device' > > Fixes: 829eb208e80d ("rtnetlink: add support for proto

Re: [PATCH v2] net: dsa: rtl8366rb: Switch to phylink

2020-09-07 Thread Jakub Kicinski
On Sun, 6 Sep 2020 23:24:15 +0200 Linus Walleij wrote: > This switches the RTL8366RB over to using phylink callbacks > instead of .adjust_link(). This is a pretty template > switchover. All we adjust is the CPU port so that is why > the code only inspects this port. > > We enhance by adding prope

[PATCH v2] rtlwifi: switch from 'pci_' to 'dma_' API

2020-09-07 Thread Christophe JAILLET
The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. The only file where some GFP_ flags are updated is 'pci.c'. When memory is allo

  1   2   3   4   5   >