KASAN: slab-out-of-bounds Read in ath9k_hif_usb_rx_cb (2)

2020-07-30 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:ab4dc051 usb: mtu3: simplify mtu3_req_complete() git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing console output: https://syzkaller.appspot.com/x/log.txt?x=11c0666c90 kernel config: https:/

[PATCH net] net: ll_temac: Use devm_platform_ioremap_resource_byname()

2020-07-30 Thread Wang Hai
platform_get_resource() may fail and return NULL, so we had better check its return value to avoid a NULL pointer dereference a bit later in the code. Fix it to use devm_platform_ioremap_resource_byname() instead of calling platform_get_resource_byname() and devm_ioremap(). Fixes: 8425c41d1ef7 ("n

[PATCH net] net/sched: The error lable position is corrected in ct_init_module

2020-07-30 Thread Liu Jian
From: liujian Exchange the positions of the err_tbl_init and err_register labels in ct_init_module function. Fixes: c34b961a2492 ("net/sched: act_ct: Create nf flow table per zone") Signed-off-by: liujian --- net/sched/act_ct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --

Re: [PATCH v2 stable-5.4.y] Revert "dpaa_eth: fix usage as DSA master, try 3"

2020-07-30 Thread Greg KH
On Wed, Jun 24, 2020 at 03:45:17PM +0300, Vladimir Oltean wrote: > From: Vladimir Oltean > > This reverts commit 40a904b1c2e57b22dd002dfce73688871cb0bac8. > > The patch is not wrong, but the Fixes: tag is. It should have been: > > Fixes: 060ad66f9795 ("dpaa_eth: change DMA device") > > w

[PATCH net] net: gemini: Fix missing clk_disable_unprepare() in error path of gemini_ethernet_port_probe()

2020-07-30 Thread Wang Hai
Fix the missing clk_disable_unprepare() before return from gemini_ethernet_port_probe() in the error handling case. Fixes: 4d5ae32f5e1e ("net: ethernet: Add a driver for Gemini gigabit ethernet") Reported-by: Hulk Robot Signed-off-by: Wang Hai --- drivers/net/ethernet/cortina/gemini.c | 5 -

[PATCH v2] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-07-30 Thread Xie He
In net/packet/af_packet.c, the function packet_snd first reserves a headroom of length (dev->hard_header_len + dev->needed_headroom). Then if the socket is a SOCK_DGRAM socket, it calls dev_hard_header, which calls dev->header_ops->create, to create the link layer header. If the socket is a SOCK_RA

[PATCH net] wl1251: fix always return 0 error

2020-07-30 Thread Wang Hai
wl1251_event_ps_report() should not always return 0 because wl1251_ps_set_mode() may fail. Change it to return 'ret'. Fixes: f7ad1eed4d4b ("wl1251: retry power save entry") Reported-by: Hulk Robot Signed-off-by: Wang Hai --- drivers/net/wireless/ti/wl1251/event.c | 2 +- 1 file changed, 1 inser

[PATCH v3 5/9] ethernet: ti: am65-cpts: Use generic helper function

2020-07-30 Thread Kurt Kanzenbach
In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Signed-off-by: Kurt Kanzenbach --- drivers/net/ethernet/ti/am65-cpts.c | 37 +++-- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/drivers/net/ether

[PATCH v3 9/9] ptp: Remove unused macro

2020-07-30 Thread Kurt Kanzenbach
The offset for the control field is not needed anymore. Remove it. Signed-off-by: Kurt Kanzenbach --- include/linux/ptp_classify.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/ptp_classify.h b/include/linux/ptp_classify.h index f4dd42fddc0c..88408fbb0ab6 100644 --- a/include/

[PATCH v3 4/9] mlxsw: spectrum_ptp: Use generic helper function

2020-07-30 Thread Kurt Kanzenbach
In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Signed-off-by: Kurt Kanzenbach --- .../ethernet/mellanox/mlxsw/spectrum_ptp.c| 32 --- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/drivers/net/ether

[PATCH v3 0/9] ptp: Add generic helper functions

2020-07-30 Thread Kurt Kanzenbach
Hi! in order to reduce code duplication (and cut'n'paste errors) in the ptp code of DSA, Ethernet and Phy drivers, create helper functions and move them to ptp_classify. This way all drivers can share the same implementation. This is version three and contains bugfixes. Implemented as discussed [

[PATCH v3 6/9] ethernet: ti: cpts: Use generic helper function

2020-07-30 Thread Kurt Kanzenbach
In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Signed-off-by: Kurt Kanzenbach --- drivers/net/ethernet/ti/cpts.c | 37 +- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/drivers/net/ether

[PATCH v3 8/9] ptp: ptp_ines: Use generic helper function

2020-07-30 Thread Kurt Kanzenbach
In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Signed-off-by: Kurt Kanzenbach --- drivers/ptp/ptp_ines.c | 88 -- 1 file changed, 25 insertions(+), 63 deletions(-) diff --git a/drivers/ptp/ptp_

[PATCH v3 2/9] ptp: Add generic ptp message type function

2020-07-30 Thread Kurt Kanzenbach
The message type is located at different offsets within the ptp header depending on the ptp version (v1 or v2). Therefore, drivers which also deal with ptp v1 have some code for it. Extract this into a helper function for drivers to be used. Signed-off-by: Kurt Kanzenbach --- include/linux/ptp_

[PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-07-30 Thread Kurt Kanzenbach
Reason: A lot of the ptp drivers - which implement hardware time stamping - need specific fields such as the sequence id from the ptp v2 header. Currently all drivers implement that themselves. Introduce a generic function to retrieve a pointer to the start of the ptp v2 header. Suggested-by: Rus

[PATCH v3 3/9] net: dsa: mv88e6xxx: Use generic helper function

2020-07-30 Thread Kurt Kanzenbach
In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Signed-off-by: Kurt Kanzenbach --- drivers/net/dsa/mv88e6xxx/hwtstamp.c | 59 ++-- 1 file changed, 13 insertions(+), 46 deletions(-) diff --git a/drivers/net/dsa/

[PATCH v3 7/9] net: phy: dp83640: Use generic helper function

2020-07-30 Thread Kurt Kanzenbach
In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Signed-off-by: Kurt Kanzenbach --- drivers/net/phy/dp83640.c | 69 +-- 1 file changed, 16 insertions(+), 53 deletions(-) diff --git a/drivers/net/phy/

Re: [PATCH v2] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-07-30 Thread Xie He
Hi Martin, I'm currently working on a plan to make all X.25 drivers (lapbether.c, x25_asy.c, hdlc_x25.c) to set dev->hard_header_len / dev->needed_headroom correctly. So that upper layers no longer need to guess how much headroom a X.25 device needs with a constant value (as they currently do). A

Re: [PATCH] ravb: Fixed the problem that rmmod can not be done

2020-07-30 Thread kernel test robot
e' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Yuusuke-Ashizuka/ravb-Fixed-the-problem-that-rmmod-can-not-be-done/20200730-120910 base: https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git master config: xtensa-al

Re: [PATCH v2 stable-5.4.y] Revert "dpaa_eth: fix usage as DSA master, try 3"

2020-07-30 Thread Vladimir Oltean
On Thu, Jul 30, 2020 at 09:30:13AM +0200, Greg KH wrote: > > Now queued up, thanks. > > greg k-h Thanks Greg, I was wondering whether I should be reminding you or not. -Vladimir

Re: [EXT] Re: [PATCH v3 net-next 07/11] qed: use devlink logic to report errors

2020-07-30 Thread Igor Russkikh
On 29/07/2020 4:08 pm, Jiri Pirko wrote: > > -- > Wed, Jul 29, 2020 at 01:38:42PM CEST, irussk...@marvell.com wrote: >> Use devlink_health_report to push error indications. >> We implement this in qede via callback function to

[PATCH net-next v1 1/2] hinic: add generating mailbox random index support

2020-07-30 Thread Luo bin
add support to generate mailbox random id of VF to ensure that mailbox messages PF received are from the correct VF. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 13 ++ .../net/ethernet/huawei/hinic/hinic_hw_mbox.c | 136 ++ .../net/ethernet/huawei/

[PATCH net-next v1 2/2] hinic: add check for mailbox msg from VF

2020-07-30 Thread Luo bin
PF should check whether the cmd from VF is supported and its content is right before passing it to hw. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 8 + .../net/ethernet/huawei/hinic/hinic_hw_mbox.c | 173 +- .../net/ethernet/huawei/hinic/hinic_hw_

[PATCH net-next v1 0/2] hinic: mailbox channel enhancement

2020-07-30 Thread Luo bin
add support to generate mailbox random id for VF to ensure that the mailbox message from VF is valid and PF should check whether the cmd from VF is supported before passing it to hw. Luo bin (2): hinic: add generating mailbox random index support hinic: add check for mailbox msg from VF .../

Re: [PATCH net] net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct

2020-07-30 Thread wenxu
On 7/30/2020 2:03 PM, Cong Wang wrote: > On Wed, Jul 29, 2020 at 3:41 AM wrote: >> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h >> index c510b03..45401d5 100644 >> --- a/include/net/sch_generic.h >> +++ b/include/net/sch_generic.h >> @@ -384,6 +384,7 @@ struct qdisc_skb_cb

Re: [PATCH v3 5/9] ethernet: ti: am65-cpts: Use generic helper function

2020-07-30 Thread Grygorii Strashko
On 30/07/2020 11:00, Kurt Kanzenbach wrote: In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Signed-off-by: Kurt Kanzenbach --- drivers/net/ethernet/ti/am65-cpts.c | 37 +++-- 1 file changed, 9 insertions(

Re: [PATCH][next] mlxsw: spectrum_cnt: Use flex_array_size() helper in memcpy()

2020-07-30 Thread Ido Schimmel
On Wed, Jul 29, 2020 at 05:58:03PM -0500, Gustavo A. R. Silva wrote: > Make use of the flex_array_size() helper to calculate the size of a > flexible array member within an enclosing structure. > > This helper offers defense-in-depth against potential integer > overflows, while at the same time ma

AW: AW: PROBLEM: (DSA/Microchip): 802.1Q-Header lost on KSZ9477-DSA ingress without bridge

2020-07-30 Thread Gaube, Marvin (THSE-TL1)
Hello, the following was tested: ip link add name br0 type bridge echo 1 >/sys/class/net/br0/bridge/vlan_filtering ip link set dev lan1 master br0 ip link set dev lan1 up ip link set dev br0 up bridge vlan show > port vlan-id > lan1 1 PVID Egress Untagged > br0

Re: [PATCH v3 5/9] ethernet: ti: am65-cpts: Use generic helper function

2020-07-30 Thread Kurt Kanzenbach
On Thu Jul 30 2020, Grygorii Strashko wrote: > On 30/07/2020 11:00, Kurt Kanzenbach wrote: >> +msgtype = ptp_get_msgtype(hdr, ptp_class); >> +seqid = be16_to_cpu(hdr->sequence_id); > > Is there any reason to not use "ntohs()"? This is just my personal preference, because I think it's mor

Re: [PATCH v8 bpf-next 09/13] bpf: Add d_path helper

2020-07-30 Thread Jiri Olsa
On Wed, Jul 29, 2020 at 09:17:40PM +0100, Al Viro wrote: > On Wed, Jul 22, 2020 at 11:12:19PM +0200, Jiri Olsa wrote: > > > +BTF_SET_START(btf_whitelist_d_path) > > +BTF_ID(func, vfs_truncate) > > +BTF_ID(func, vfs_fallocate) > > +BTF_ID(func, dentry_open) > > +BTF_ID(func, vfs_getattr) > > +BTF_I

[PATCH v2] ravb: Fixed the problem that rmmod can not be done

2020-07-30 Thread Yuusuke Ashizuka
ravb is a module driver, but I cannot rmmod it after insmod it. ravb does mdio_init() at the time of probe, and module->refcnt is incremented by alloc_mdio_bitbang() called after that. Therefore, even if ifup is not performed, the driver is in use and rmmod cannot be performed. $ lsmod Module

Re: [PATCH net] qtnfmac: Missing platform_device_unregister() on error in qtnf_core_mac_alloc()

2020-07-30 Thread Sergey Matyukevich
> Add the missing platform_device_unregister() before return from > qtnf_core_mac_alloc() in the error handling case. > > Fixes: 616f5701f4ab ("qtnfmac: assign each wiphy to its own virtual platform > device") > Reported-by: Hulk Robot > Signed-off-by: Wang Hai > --- > drivers/net/wireless/qua

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-07-30 Thread Petr Machata
Kurt Kanzenbach writes: > @@ -107,6 +107,37 @@ unsigned int ptp_classify_raw(const struct sk_buff *skb) > } > EXPORT_SYMBOL_GPL(ptp_classify_raw); > > +struct ptp_header *ptp_parse_header(struct sk_buff *skb, unsigned int type) > +{ > + u8 *data = skb_mac_header(skb); > + u8 *ptr =

Re: [PATCH v3 4/9] mlxsw: spectrum_ptp: Use generic helper function

2020-07-30 Thread Petr Machata
Kurt Kanzenbach writes: > In order to reduce code duplication between ptp drivers, generic helper > functions were introduced. Use them. > > Signed-off-by: Kurt Kanzenbach Reviewed-and-tested-by: Petr Machata

[PATCH v4 0/2] Add 802.1AD protocol support for dsa switch and ocelot driver

2020-07-30 Thread hongbo . wang
From: "hongbo.wang" 1. the patch 0001* is for setting single port into 802.1AD(QinQ) mode, before this patch, the function dsa_slave_vlan_rx_add_vid didn't pass the parameter "proto" to next port level, so switch's port can't get parameter "proto" after applying this patch, the following comma

[PATCH v4 1/2] net: dsa: Add protocol support for 802.1AD when adding or deleting vlan for dsa switch port

2020-07-30 Thread hongbo . wang
From: "hongbo.wang" the following command will be supported: Set bridge's vlan protocol: ip link set br0 type bridge vlan_protocol 802.1ad Add VLAN: ip link add link swp1 name swp1.100 type vlan protocol 802.1ad id 100 Delete VLAN: ip link del link swp1 name swp1.100 Signed-off-by:

[PATCH v4 2/2] net: dsa: ocelot: Add support for QinQ Operation

2020-07-30 Thread hongbo . wang
From: "hongbo.wang" This featue can be test using network test tools TX-tool -> swp0 -> swp1 -> RX-tool TX-tool simulates Customer that will send and receive packets with single VLAN tag(CTAG), RX-tool simulates Service-Provider that will send and receive packets with double VLAN ta

Re: [PATCH v8 bpf-next 09/13] bpf: Add d_path helper

2020-07-30 Thread Jiri Olsa
On Wed, Jul 29, 2020 at 09:11:17PM +0100, Al Viro wrote: > On Wed, Jul 22, 2020 at 11:12:19PM +0200, Jiri Olsa wrote: > > > +BPF_CALL_3(bpf_d_path, struct path *, path, char *, buf, u32, sz) > > +{ > > + char *p = d_path(path, buf, sz - 1); > > + int len; > > + > > + if (IS_ERR(p)) { > > +

Re: [PATCH v3 5/9] ethernet: ti: am65-cpts: Use generic helper function

2020-07-30 Thread Arnd Bergmann
On Thu, Jul 30, 2020 at 11:41 AM Kurt Kanzenbach wrote: > On Thu Jul 30 2020, Grygorii Strashko wrote: > > On 30/07/2020 11:00, Kurt Kanzenbach wrote: > >> +msgtype = ptp_get_msgtype(hdr, ptp_class); > >> +seqid = be16_to_cpu(hdr->sequence_id); > > > > Is there any reason to not use "nto

[PATCH v2] net/mlx5e: fix bpf_prog reference count leaks in mlx5e_alloc_rq

2020-07-30 Thread Xin Xiong
The function invokes bpf_prog_inc(), which increases the reference count of a bpf_prog object "rq->xdp_prog" if the object isn't NULL. The refcount leak issues take place in two error handling paths. When either mlx5_wq_ll_create() or mlx5_wq_cyc_create() fails, the function simply returns the err

Re: [PATCH net-next v2] net: dsa: qca8k: Add 802.1q VLAN support

2020-07-30 Thread Jonathan McDowell
On Tue, Jul 28, 2020 at 07:34:57PM +0300, Vladimir Oltean wrote: > Hi Jonathan, > > On Sun, Jul 26, 2020 at 03:56:11PM +0100, Jonathan McDowell wrote: > > This adds full 802.1q VLAN support to the qca8k, allowing the use of > > vlan_filtering and more complicated bridging setups than allowed by >

[PATCH] net: Pass NULL to skb_network_protocol() when we don't care about vlan depth

2020-07-30 Thread linmiaohe
From: Miaohe Lin When we don't care about vlan depth, we could pass NULL instead of the address of a unused local variable to skb_network_protocol() as a param. Signed-off-by: Miaohe Lin --- net/core/dev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/core/dev.c b/n

Re: [PATCH RFC net-next] net: phy: add Marvell PHY PTP support [multicast/DSA issues]

2020-07-30 Thread Russell King - ARM Linux admin
On Wed, Jul 29, 2020 at 06:19:32AM -0700, Richard Cochran wrote: > On Wed, Jul 29, 2020 at 11:58:07AM +0100, Russell King - ARM Linux admin > wrote: > > How do we deal with this situation - from what I can see from the > > ethtool API, we have to make a choice about which to use. How do we > > ma

RE: [PATCH v2] ravb: Fixed the problem that rmmod can not be done

2020-07-30 Thread Yoshihiro Shimoda
Hi Ashizuka-san, > From: Yuusuke Ashizuka, Sent: Thursday, July 30, 2020 7:02 PM > Subject: [PATCH v2] ravb: Fixed the problem that rmmod can not be done Thank you for the patch! I found a similar patch for another driver [1]. So, we should apply this patch to the ravb driver. [1] fd5f375c1628 (

Re: [PATCH RFC net-next] net: phy: add Marvell PHY PTP support [multicast/DSA issues]

2020-07-30 Thread Russell King - ARM Linux admin
On Thu, Jul 30, 2020 at 12:06:13PM +0100, Russell King - ARM Linux admin wrote: > On Wed, Jul 29, 2020 at 06:19:32AM -0700, Richard Cochran wrote: > > On Wed, Jul 29, 2020 at 11:58:07AM +0100, Russell King - ARM Linux admin > > wrote: > > > How do we deal with this situation - from what I can see

Re: [PATCH net-next RFC 02/13] devlink: Add reload levels data to dev get

2020-07-30 Thread Moshe Shemesh
On 7/30/2020 12:11 AM, Jakub Kicinski wrote: On Wed, 29 Jul 2020 17:37:41 +0300 Moshe Shemesh wrote: The fact that the driver supports fw_live_patch, does not necessarily mean that the currently running FW can be live upgraded to the currently flashed one, right? That's correct, though the fe

Re: [PATCH net-next RFC 09/13] devlink: Add enable_remote_dev_reset generic parameter

2020-07-30 Thread Moshe Shemesh
On 7/29/2020 11:57 PM, Jakub Kicinski wrote: On Wed, 29 Jul 2020 17:42:12 +0300 Moshe Shemesh wrote: On 7/28/2020 3:59 AM, Jakub Kicinski wrote: On Mon, 27 Jul 2020 14:02:29 +0300 Moshe Shemesh wrote: The enable_remote_dev_reset devlink param flags that the host admin allows device resets th

Re: [PATCH net-next RFC 01/13] devlink: Add reload level option to devlink reload command

2020-07-30 Thread Moshe Shemesh
On 7/30/2020 12:07 AM, Jakub Kicinski wrote: On Wed, 29 Jul 2020 17:54:08 +0300 Moshe Shemesh wrote: On 7/28/2020 11:06 PM, Jakub Kicinski wrote: On Tue, 28 Jul 2020 12:18:30 -0700 Jacob Keller wrote: On 7/28/2020 11:44 AM, Jakub Kicinski wrote: From user perspective what's important is w

Re: [PATCH net-next v3 2/2] net: openvswitch: make masks cache size configurable

2020-07-30 Thread Eelco Chaudron
Thanks Tonghao for the review, see comments inline below! If I get no more reviews by the end of the week I’ll send out a v4. //Eelco On 30 Jul 2020, at 7:07, Tonghao Zhang wrote: On Wed, Jul 29, 2020 at 9:27 PM Eelco Chaudron wrote: This patch makes the masks cache size configurable, or

Re: [RFC 1/7] mac80211: Add check for napi handle before WARN_ON

2020-07-30 Thread Johannes Berg
On Sun, 2020-07-26 at 21:49 +0530, Rakesh Pillai wrote: > We do have the usage of napi_gro_receive and netif_receive_skb in mac80211. > /* deliver to local stack */ > if (rx->napi) > napi_gro_receive(rx->napi, skb); > else >

Re: [PATCH RFC net-next] net: phy: add Marvell PHY PTP support [multicast/DSA issues]

2020-07-30 Thread Russell King - ARM Linux admin
On Thu, Jul 30, 2020 at 12:54:19PM +0100, Russell King - ARM Linux admin wrote: > On Thu, Jul 30, 2020 at 12:06:13PM +0100, Russell King - ARM Linux admin > wrote: > > On Wed, Jul 29, 2020 at 06:19:32AM -0700, Richard Cochran wrote: > > > On Wed, Jul 29, 2020 at 11:58:07AM +0100, Russell King - AR

[PATCH bpf-next] selftests/bpf: Omit nodad flag when adding addresses to loopback

2020-07-30 Thread Jakub Sitnicki
Setting IFA_F_NODAD flag for IPv6 addresses to add to loopback is unnecessary. Duplicate Address Detection does not happen on loopback device. Also, passing 'nodad' flag to 'ip address' breaks libbpf CI, which runs in an environment with BusyBox implementation of 'ip' command, that doesn't underst

Re: [PATCH bpf-next v5 15/15] selftests/bpf: Tests for BPF_SK_LOOKUP attach point

2020-07-30 Thread Jakub Sitnicki
On Wed, Jul 29, 2020 at 10:57 AM CEST, Jakub Sitnicki wrote: > On Tue, Jul 28, 2020 at 10:13 PM CEST, Andrii Nakryiko wrote: > > [...] > >> We are getting this failure in Travis CI when syncing libbpf [0]: >> >> ``` >> ip: either "local" is duplicate, or "nodad" is garbage >> >> switch_netns:PASS:u

Re: [PATCH net-next v3 2/2] net: openvswitch: make masks cache size configurable

2020-07-30 Thread Tonghao Zhang
On Thu, Jul 30, 2020 at 8:33 PM Eelco Chaudron wrote: > > Thanks Tonghao for the review, see comments inline below! > > If I get no more reviews by the end of the week I’ll send out a v4. > > //Eelco > > > On 30 Jul 2020, at 7:07, Tonghao Zhang wrote: > > > On Wed, Jul 29, 2020 at 9:27 PM Eelco Ch

Re: [net-next v5 PATCH 0/7] Add PRP driver

2020-07-30 Thread Murali Karicheri
Hi Dave, On 7/27/20 3:21 PM, David Miller wrote: From: Murali Karicheri Date: Wed, 22 Jul 2020 10:40:15 -0400 This series is dependent on the following patches sent out to netdev list. All (1-3) are already merged to net/master as of sending this, but not on the net-next master branch. So nee

Re: [net-next iproute2 PATCH v3 1/2] iplink: hsr: add support for creating PRP device similar to HSR

2020-07-30 Thread Murali Karicheri
Hi Dave, On 7/17/20 11:22 AM, Murali Karicheri wrote: This patch enhances the iplink command to add a proto parameters to create PRP device/interface similar to HSR. Both protocols are quite similar and requires a pair of Ethernet interfaces. So re-use the existing HSR iplink command to create P

Re: [PATCH][next] mlxsw: spectrum_cnt: Use flex_array_size() helper in memcpy()

2020-07-30 Thread Gustavo A. R. Silva
On 7/30/20 04:21, Ido Schimmel wrote: > On Wed, Jul 29, 2020 at 05:58:03PM -0500, Gustavo A. R. Silva wrote: >> Make use of the flex_array_size() helper to calculate the size of a >> flexible array member within an enclosing structure. >> >> This helper offers defense-in-depth against potential

Re: [PATCH net-next v3 2/2] net: openvswitch: make masks cache size configurable

2020-07-30 Thread Eelco Chaudron
On 30 Jul 2020, at 15:25, Tonghao Zhang wrote: On Thu, Jul 30, 2020 at 8:33 PM Eelco Chaudron wrote: Thanks Tonghao for the review, see comments inline below! If I get no more reviews by the end of the week I’ll send out a v4. //Eelco On 30 Jul 2020, at 7:07, Tonghao Zhang wrote: On

Re: [RFC 1/2] devlink: add simple fw crash helpers

2020-07-30 Thread Johannes Berg
Hi, Sorry ... long delay. > > The reason I'm asking is that it's starting to sound like we really > > ought to be implementing devlink, but we've got a bunch of > > infrastructure that uses the devcoredump, and it'll take time > > (significantly so) to change all that... > > In devlink world pur

Re: [PATCH net-next v3 2/2] net: openvswitch: make masks cache size configurable

2020-07-30 Thread Tonghao Zhang
On Thu, Jul 30, 2020 at 9:52 PM Eelco Chaudron wrote: > > > > On 30 Jul 2020, at 15:25, Tonghao Zhang wrote: > > > On Thu, Jul 30, 2020 at 8:33 PM Eelco Chaudron > > wrote: > >> > >> Thanks Tonghao for the review, see comments inline below! > >> > >> If I get no more reviews by the end of the wee

Re: [PATCH net-next v3 2/2] net: openvswitch: make masks cache size configurable

2020-07-30 Thread Eelco Chaudron
On 30 Jul 2020, at 16:23, Tonghao Zhang wrote: On Thu, Jul 30, 2020 at 9:52 PM Eelco Chaudron wrote: On 30 Jul 2020, at 15:25, Tonghao Zhang wrote: On Thu, Jul 30, 2020 at 8:33 PM Eelco Chaudron wrote: Thanks Tonghao for the review, see comments inline below! If I get no more revie

Re: [PATCH] net: add support for threaded NAPI polling

2020-07-30 Thread Sebastian Gottschall
Am 29.07.2020 um 19:44 schrieb Eric Dumazet: On 7/29/20 9:50 AM, Felix Fietkau wrote: For some drivers (especially 802.11 drivers), doing a lot of work in the NAPI poll function does not perform well. Since NAPI poll is bound to the CPU it was scheduled from, we can easily end up with a few v

[PATCH net-next 00/12] sfc: driver for EF100 family NICs, part 2

2020-07-30 Thread Edward Cree
This series implements the data path and various other functionality for Xilinx/Solarflare EF100 NICs. Edward Cree (12): sfc_ef100: check firmware version at start-of-day sfc_ef100: fail the probe if NIC uses unsol_ev credits sfc_ef100: read Design Parameters at probe time sfc_ef100: TX p

[PATCH iproute2-next v2 2/2] devlink: Expose port split ability

2020-07-30 Thread Danielle Ratson
Add a new attribute that indicates the port split ability to devlink port. Expose the attribute to user space as RO value, for example: $devlink port show swp1 pci/:03:00.0/61: type eth netdev swp1 flavour physical port 1 splittable false lanes 1 Signed-off-by: Danielle Ratson --- devlink/

[PATCH net-next 01/12] sfc_ef100: check firmware version at start-of-day

2020-07-30 Thread Edward Cree
Early in EF100 development there was a different format of event descriptor; if the NIC is somehow running the very old firmware which will use that format, fail the probe. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 40 1 file changed, 40

[PATCH iproute2-next v2 0/2] Expose port attributes

2020-07-30 Thread Danielle Ratson
Add two new devlink port attributes: - Lanes: indicates the number of port lanes. - Splittable: indicates the port split ability. Patch 1: Update kernel headers Patch 2: Expose number of lanes v2: *Update 'devlink_policy' with the new attributes Danielle Ratson (2): devlink: Expose number of p

[PATCH iproute2-next v2 1/2] devlink: Expose number of port lanes

2020-07-30 Thread Danielle Ratson
Add a new attribute that indicates the port's number of lanes to devlink port. Expose the attribute to user space as RO value, for example: $devlink port show swp1 pci/:03:00.0/61: type eth netdev swp1 flavour physical port 1 lanes 1 Signed-off-by: Danielle Ratson --- devlink/devlink.c | 5

[PATCH net-next 02/12] sfc_ef100: fail the probe if NIC uses unsol_ev credits

2020-07-30 Thread Edward Cree
In the future, EF100 is planned to have a credit-based scheme for handling unsolicited events, which drivers will need to use in order to function correctly. However, current EF100 hardware does not yet generate unsolicited events and the credit scheme has not yet been implemented in firmware.

[PATCH net-next 03/12] sfc_ef100: read Design Parameters at probe time

2020-07-30 Thread Edward Cree
Several parts of the EF100 architecture are parameterised (to allow varying capabilities on FPGAs according to resource constraints), and these parameters are exposed to the driver through a TLV-encoded region of the BAR. For the most part we either don't care about these values at all or just

[PATCH net-next 05/12] sfc_ef100: RX filter table management and related gubbins

2020-07-30 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_netdev.c | 10 drivers/net/ethernet/sfc/ef100_nic.c| 65 + 2 files changed, 75 insertions(+) diff --git a/drivers/net/ethernet/sfc/ef100_netdev.c b/drivers/net/ethernet/sfc/ef100_netdev.c index 4c3caa

[PATCH net-next 04/12] sfc_ef100: TX path for EF100 NICs

2020-07-30 Thread Edward Cree
Includes checksum offload and TSO, so declare those in our netdev features. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 8 + drivers/net/ethernet/sfc/ef100_tx.c | 368 +- drivers/net/ethernet/sfc/ef100_tx.h | 4 + drivers/net/ethernet/sf

[PATCH net-next 06/12] sfc_ef100: RX path for EF100

2020-07-30 Thread Edward Cree
Includes RSS spreading. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 25 - drivers/net/ethernet/sfc/ef100_rx.c | 150 +-- drivers/net/ethernet/sfc/ef100_rx.h | 1 + 3 files changed, 167 insertions(+), 9 deletions(-) diff --git a/drivers/

[PATCH net-next 07/12] sfc_ef100: plumb in fini_dmaq

2020-07-30 Thread Edward Cree
Bring down the TX and RX queues at ifdown, so that we can then fini the EVQs (otherwise the MC would return EBUSY because they're still in use). Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/sfc/ef100

[PATCH net-next 08/12] sfc_ef100: statistics gathering

2020-07-30 Thread Edward Cree
MAC stats work much the same as on EF10, with a periodic DMA to a region specified via an MCDI. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_netdev.c | 6 + drivers/net/ethernet/sfc/ef100_nic.c| 168 drivers/net/ethernet/sfc/ef100_nic.h| 41 +

[PATCH net-next 10/12] sfc_ef100: add ethtool ops and miscellaneous ndos

2020-07-30 Thread Edward Cree
Mostly just calls to existing common functions. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_ethtool.c | 44 drivers/net/ethernet/sfc/ef100_netdev.c | 4 +++ drivers/net/ethernet/sfc/ef100_nic.c | 7 +++- 3 files changed, 54 insertions(+), 1 delet

[PATCH net-next 09/12] sfc_ef100: functions for selftests

2020-07-30 Thread Edward Cree
Self-tests for event and interrupt reception and NVRAM. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 47 1 file changed, 47 insertions(+) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index 424a0a2

[PATCH net-next 12/12] sfc_ef100: add nic-type for VFs, and bind to them

2020-07-30 Thread Edward Cree
We don't yet have a .sriov_configure() to create them, though. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100.c | 2 + drivers/net/ethernet/sfc/ef100_nic.c | 77 drivers/net/ethernet/sfc/ef100_nic.h | 2 + 3 files changed, 81 insertions(+) diff

[PATCH net-next 11/12] sfc_ef100: read pf_index at probe time

2020-07-30 Thread Edward Cree
We'll need it later, for VF representors. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 4 drivers/net/ethernet/sfc/ef100_nic.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index f2

[PATCH net-next 3/4] s390/qeth: don't process empty bridge port events

2020-07-30 Thread Julian Wiedmann
Discard events that don't contain any entries. This shouldn't happen, but subsequent code relies on being able to use entry 0. So better be safe than accessing garbage. Fixes: b4d72c08b358 ("qeth: bridgeport support - basic control") Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter -

[PATCH net-next 2/4] s390/qeth: integrate RX refill worker with NAPI

2020-07-30 Thread Julian Wiedmann
Running a RX refill outside of NAPI context is inherently racy, even though the worker is only started for an entirely idle RX ring. >From the moment that the worker has replenished parts of the RX ring, the HW can use those RX buffers, raise an IRQ and cause our NAPI code to run concurrently to th

[PATCH net-next 0/4] s390/qeth: updates 2020-07-30

2020-07-30 Thread Julian Wiedmann
Hi Dave & Jakub, please apply the following patch series for qeth to netdev's net-next tree. This primarily brings some modernization to the RX path, laying the groundwork for smarter RX refill policies. Some of the patches are tagged as fixes, but really target only rare / theoretical issues. So

[PATCH net-next 4/4] s390/qeth: use all configured RX buffers

2020-07-30 Thread Julian Wiedmann
The (misplaced) comment doesn't make any sense, enforcing an uninitialized RX buffer won't help with IRQ reduction. So make the best use of all available RX buffers. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 16 1 file changed, 4 insertions(+), 12 d

[PATCH net-next 1/4] s390/qeth: tolerate pre-filled RX buffer

2020-07-30 Thread Julian Wiedmann
When preparing a buffer for RX refill, tolerate that it already has a pool_entry attached. Otherwise we could easily leak such a pool_entry when re-driving the RX refill after an error (from eg. do_qdio()). This needs some minor adjustment in the code that drains RX buffer(s) prior to RX refill an

pull-request: mac80211 2020-07-30

2020-07-30 Thread Johannes Berg
Hi Dave, It's been a while, sorry. I have a few more fix that'd be nice to get in, though I don't think they affect a majority of users. Please pull and let me know if there's any problem. Thanks, johannes The following changes since commit 27a2145d6f826d1fad9de06ac541b1016ced3427: ibmvnic

[PATCH v1] hsr: Use %pM format specifier for MAC addresses

2020-07-30 Thread Andy Shevchenko
Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko --- net/hsr/hsr_debugfs.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/net/hsr/hsr_debugfs.c b/net/hsr/hsr_debugfs.c index 772af706c528..a8e435021935 100644 --- a/net/hsr/hsr_debugfs.c +

[PATCH net-next] cxgb4: Add support to flash firmware config image

2020-07-30 Thread Ganji Aravind
Update set_flash to flash firmware configuration image to flash region. Signed-off-by: Ganji Aravind --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h| 3 +- .../ethernet/chelsio/cxgb4/cxgb4_ethtool.c| 93 +++ drivers/net/ethernet/chelsio/cxgb4/t4_hw.c| 13 ++- 3 files

RE: [PATCH] net: add support for threaded NAPI polling

2020-07-30 Thread David Laight
From: Sebastian Gottschall > Sent: 30 July 2020 15:30 ... > > Quite frankly, I do believe this STATE_THREADED status should be a generic > > NAPI attribute > > that can be changed dynamically, at admin request, instead of having to > > change/recompile > > a driver. > thats not that easy. wifi d

Re: [PATCH RFC net-next] net: phy: add Marvell PHY PTP support [multicast/DSA issues]

2020-07-30 Thread Richard Cochran
On Thu, Jul 30, 2020 at 12:54:19PM +0100, Russell King - ARM Linux admin wrote: > So, something in the IPv4 layer on ARM64 is silently discarding > multicast UDP PTP packets, and I've no idea what... and I'm coming to > the conclusion that this is all way too much effort and way too > unreliable to

Re: [PATCH RFC net-next] net: phy: add Marvell PHY PTP support

2020-07-30 Thread Richard Cochran
On Wed, Jul 29, 2020 at 11:07:48PM +0100, Russell King - ARM Linux admin wrote: > What I see elsewhere in ethtool is that the MAC has the ability to > override the phylib provided functionality - for example, > __ethtool_get_sset_count(), __ethtool_get_strings(), and > ethtool_get_phy_stats(). Wou

[PATCH][next] net/sched: cls_u32: Use struct_size() helper

2020-07-30 Thread Gustavo A. R. Silva
Make use of the struct_size() helper, in multiple places, instead of an open-coded version in order to avoid any potential type mistakes and protect against potential integer overflows. Also, remove unnecessary object identifier size. Signed-off-by: Gustavo A. R. Silva --- net/sched/cls_u32.c |

[PATCH v1] qed: Use %pM format specifier for MAC addresses

2020-07-30 Thread Andy Shevchenko
Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 5 ++--- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 6 ++ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.c

[PATCH v1] qede: Use %pM format specifier for MAC addresses

2020-07-30 Thread Andy Shevchenko
Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/qlogic/qede/qede_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c index 1

Re: [PATCH v2] ravb: Fixed the problem that rmmod can not be done

2020-07-30 Thread Sergei Shtylyov
Hello! On 7/30/20 1:01 PM, Yuusuke Ashizuka wrote: > ravb is a module driver, but I cannot rmmod it after insmod it. Modular. And "insmod'ing it". > ravb does mdio_init() at the time of probe, and module->refcnt is incremented > by alloc_mdio_bitbang() called after that. That seems a com

[PATCH v1] ice: devlink: use %*phD to print small buffer

2020-07-30 Thread Andy Shevchenko
Use %*phD format to print small buffer as hex string. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/intel/ice/ice_devlink.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.c b/drivers/net/ethernet/intel/ice/ice_devlink.

[PATCH net] net/bpfilter: initialize pos in __bpfilter_process_sockopt

2020-07-30 Thread Christoph Hellwig
__bpfilter_process_sockopt never initialized the pos variable passed to the pipe write. This has been mostly harmless in the past as pipes ignore the offset, but the switch to kernel_write no verified the position, which can lead to a failure depending on the exact stack initialization patter. In

Re: [PATCH] net: add support for threaded NAPI polling

2020-07-30 Thread Eric Dumazet
On 7/30/20 7:30 AM, Sebastian Gottschall wrote: > > Am 29.07.2020 um 19:44 schrieb Eric Dumazet: >> >> On 7/29/20 9:50 AM, Felix Fietkau wrote: >>> For some drivers (especially 802.11 drivers), doing a lot of work in the >>> NAPI >>> poll function does not perform well. Since NAPI poll is boun

Re: [PATCH net] net/bpfilter: initialize pos in __bpfilter_process_sockopt

2020-07-30 Thread Christian Brauner
On Thu, Jul 30, 2020 at 06:09:00PM +0200, Christoph Hellwig wrote: > __bpfilter_process_sockopt never initialized the pos variable passed to > the pipe write. This has been mostly harmless in the past as pipes > ignore the offset, but the switch to kernel_write no verified the s/no/now/ > positi

Re: [PATCH v2] ravb: Fixed the problem that rmmod can not be done

2020-07-30 Thread Sergei Shtylyov
Hello! On 7/30/20 2:37 PM, Yoshihiro Shimoda wrote: >> From: Yuusuke Ashizuka, Sent: Thursday, July 30, 2020 7:02 PM >> Subject: [PATCH v2] ravb: Fixed the problem that rmmod can not be done > > Thank you for the patch! I found a similar patch for another driver [1]. It's not the same case -

Re: [PATCH net-next v1 1/2] hinic: add generating mailbox random index support

2020-07-30 Thread Jakub Kicinski
On Thu, 30 Jul 2020 16:37:15 +0800 Luo bin wrote: > +bool check_vf_mbox_random_id(struct hinic_mbox_func_to_func *func_to_func, > + u8 *header) This set seems to add new W=1 C=1 warnings: drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:572:6: warning: no previous proto

Re: [PATCH v1] qed: Use %pM format specifier for MAC addresses

2020-07-30 Thread Alexander Lobakin
From: Andy Shevchenko Date: Thu, 30 Jul 2020 18:59:20 +0300 > Convert to %pM instead of using custom code. > > Signed-off-by: Andy Shevchenko > --- > drivers/net/ethernet/qlogic/qed/qed_mcp.c | 5 ++--- > drivers/net/ethernet/qlogic/qed/qed_sriov.c | 6 ++ > 2 files changed, 4 insertions

  1   2   3   4   >