[PATCH net-next 1/1] net: stmmac: Add PCI bus info to ethtool driver query output

2021-02-17 Thread Wong Vee Khee
This patch populates the PCI bus info in the ethtool driver query data. Users will be able to view PCI bus info using 'ethtool -i '. Signed-off-by: Wong Vee Khee --- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c| 1 + drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 4 includ

Re: [PATCH] [v13] wireless: Initial driver submission for pureLiFi STA devices

2021-02-17 Thread Kalle Valo
Srinivasan Raju writes: > This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC > and LiFi-XL USB devices. > > This driver implementation has been based on the zd1211rw driver. > > Driver is based on 802.11 softMAC Architecture and uses > native 802.11 for configuration and management. > >

Re: [PATCH net-next] net: phy: icplus: Call phy_restore_page() when phy_select_page() fails

2021-02-17 Thread Russell King - ARM Linux admin
On Wed, Feb 17, 2021 at 09:17:59AM +0300, Dan Carpenter wrote: > Smatch warns that there is a locking issue in this function: > > drivers/net/phy/icplus.c:273 ip101a_g_config_intr_pin() > warn: inconsistent returns '&phydev->mdio.bus->mdio_lock'. > Locked on : 242 > Unlocked on: 273 > > It t

Re: [PATCH] [v13] wireless: Initial driver submission for pureLiFi STA devices

2021-02-17 Thread Kalle Valo
Johannes Berg writes: >> +++ b/drivers/net/wireless/purelifi/Makefile >> @@ -0,0 +1,2 @@ >> +# SPDX-License-Identifier: GPL-2.0-only >> +obj-$(CONFIG_WLAN_VENDOR_PURELIFI) := plfxlc/ > > Although this one doesn't do anything, so all you did was save a level > of Kconfig inclusion I guess

Re: [PATCH] [v13] wireless: Initial driver submission for pureLiFi STA devices

2021-02-17 Thread Kalle Valo
Srinivasan Raju writes: > This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC > and LiFi-XL USB devices. > > This driver implementation has been based on the zd1211rw driver. > > Driver is based on 802.11 softMAC Architecture and uses > native 802.11 for configuration and management. > >

Re: [PATCH net-next] net: phy: icplus: Call phy_restore_page() when phy_select_page() fails

2021-02-17 Thread Michael Walle
Am 2021-02-17 11:04, schrieb Russell King - ARM Linux admin: On Wed, Feb 17, 2021 at 09:17:59AM +0300, Dan Carpenter wrote: Smatch warns that there is a locking issue in this function: drivers/net/phy/icplus.c:273 ip101a_g_config_intr_pin() warn: inconsistent returns '&phydev->mdio.bus->mdio_lo

Re: [PATCH] [v13] wireless: Initial driver submission for pureLiFi STA devices

2021-02-17 Thread Kalle Valo
Kalle Valo writes: > Srinivasan Raju writes: > >> This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC >> and LiFi-XL USB devices. >> >> This driver implementation has been based on the zd1211rw driver. >> >> Driver is based on 802.11 softMAC Architecture and uses >> native 802.11 for co

Re: [PATCH] [v13] wireless: Initial driver submission for pureLiFi STA devices

2021-02-17 Thread Srinivasan Raju
> Ah, kbuild bot had already reported few issues: > https://patchwork.kernel.org/project/linux-wireless/patch/20210212115030.124490-1-srini.r...@purelifi.com/ > Please fix those and I recommend waiting few days in case the bot finds > more issues. After that you can submitt v14 fixing the comme

Re: [PATCH] [v13] wireless: Initial driver submission for pureLiFi STA devices

2021-02-17 Thread Kalle Valo
Srinivasan Raju writes: > This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC > and LiFi-XL USB devices. > > This driver implementation has been based on the zd1211rw driver. > > Driver is based on 802.11 softMAC Architecture and uses > native 802.11 for configuration and management. > >

Re: [PATCH net-next] net: phy: icplus: Call phy_restore_page() when phy_select_page() fails

2021-02-17 Thread Russell King - ARM Linux admin
On Wed, Feb 17, 2021 at 11:12:11AM +0100, Michael Walle wrote: > Am 2021-02-17 11:04, schrieb Russell King - ARM Linux admin: > > On Wed, Feb 17, 2021 at 09:17:59AM +0300, Dan Carpenter wrote: > > > Smatch warns that there is a locking issue in this function: > > > > > > drivers/net/phy/icplus.c:2

Re: [PATCH net-next v4 8/8] net: dsa: felix: Add support for MRP

2021-02-17 Thread Vladimir Oltean
On Tue, Feb 16, 2021 at 10:42:05PM +0100, Horatiu Vultur wrote: > @@ -112,6 +113,7 @@ static struct sk_buff *ocelot_rcv(struct sk_buff *skb, > ocelot_xfh_get_qos_class(extraction, &qos_class); > ocelot_xfh_get_tag_type(extraction, &tag_type); > ocelot_xfh_get_vlan_tci(extraction,

Re: [PATCH net-next v4 1/8] switchdev: mrp: Remove CONFIG_BRIDGE_MRP

2021-02-17 Thread Vladimir Oltean
On Tue, Feb 16, 2021 at 10:41:58PM +0100, Horatiu Vultur wrote: > Remove #IS_ENABLED(CONFIG_BRIDGE_MRP) from switchdev.h. This will > simplify the code implements MRP callbacks and will be similar with the > vlan filtering. > > Signed-off-by: Horatiu Vultur > --- Reviewed-by: Vladimir Oltean

Re: [PATCH net-next v4 2/8] switchdev: mrp: Extend ring_role_mrp and in_role_mrp

2021-02-17 Thread Vladimir Oltean
On Tue, Feb 16, 2021 at 10:41:59PM +0100, Horatiu Vultur wrote: > Add the member sw_backup to the structures switchdev_obj_ring_role_mrp > and switchdev_obj_in_role_mrp. In this way the SW can call the driver in > 2 ways, once when sw_backup is set to false, meaning that the driver > should impleme

Re: [PATCH net-next v4 2/3] net: phy: Add is_on_sfp_module flag and phy_on_sfp helper

2021-02-17 Thread Russell King - ARM Linux admin
On Wed, Feb 17, 2021 at 04:58:26AM +0100, Andrew Lunn wrote: > On Tue, Feb 16, 2021 at 04:54:53PM -0600, Robert Hancock wrote: > > Add a flag and helper function to indicate that a PHY device is part of > > an SFP module, which is set on attach. This can be used by PHY drivers > > to handle SFP-spe

Re: [RFC net-next 1/2] net: dsa: add Realtek RTL8366S switch tag

2021-02-17 Thread Linus Walleij
On Wed, Feb 17, 2021 at 7:21 AM DENG Qingfang wrote: > Add support for Realtek RTL8366S switch tag > > Signed-off-by: DENG Qingfang I suppose this switch can just use the existing RTL4 A tag code after the recent patch so this one is not needed? Yours, Linus Walleij

Re: [PATCH net-next v4 4/8] bridge: mrp: Extend br_mrp_switchdev to detect better the errors

2021-02-17 Thread Vladimir Oltean
On Tue, Feb 16, 2021 at 10:42:01PM +0100, Horatiu Vultur wrote: > This patch extends the br_mrp_switchdev functions to be able to have a > better understanding what cause the issue and if the SW needs to be used > as a backup. > > There are the following cases: > - when the code is compiled withou

Re: [PATCH net-next v4 5/8] bridge: mrp: Update br_mrp to use new return values of br_mrp_switchdev

2021-02-17 Thread Vladimir Oltean
On Tue, Feb 16, 2021 at 10:42:02PM +0100, Horatiu Vultur wrote: > diff --git a/net/bridge/br_mrp.c b/net/bridge/br_mrp.c > index 01c67ed727a9..12487f6fe9b4 100644 > --- a/net/bridge/br_mrp.c > +++ b/net/bridge/br_mrp.c > @@ -639,7 +639,7 @@ int br_mrp_set_ring_role(struct net_bridge *br, >

Re: [RFC net-next 1/2] net: dsa: add Realtek RTL8366S switch tag

2021-02-17 Thread Linus Walleij
On Wed, Feb 17, 2021 at 8:08 AM Heiner Kallweit wrote: > > +#define RTL8366S_HDR_LEN 4 > > +#define RTL8366S_ETHERTYPE 0x8899 > > I found this protocol referenced as Realtek Remote Control Protocol (RRCP) > and it seems to be used by few Realtek chips. Not sure whether this > protocol is of

Re: [RFC net-next 2/2] net: dsa: add Realtek RTL8366S switch driver

2021-02-17 Thread Linus Walleij
Hi Qingfang, thanks for your patch! Overall it looks good and I will not nitpick details since this is RFC. On Wed, Feb 17, 2021 at 7:21 AM DENG Qingfang wrote: > > Support Realtek RTL8366S/SR switch > > Signed-off-by: DENG Qingfang I would mention that the DT bindings for the switch are alrea

Re: [PATCH net-next v4 6/8] net: mscc: ocelot: Add support for MRP

2021-02-17 Thread Vladimir Oltean
On Tue, Feb 16, 2021 at 10:42:03PM +0100, Horatiu Vultur wrote: > Add basic support for MRP. The HW will just trap all MRP frames on the > ring ports to CPU and allow the SW to process them. In this way it is > possible to for this node to behave both as MRM and MRC. > > Current limitations are: >

Re: [PATCH net-next v4 7/8] net: dsa: add MRP support

2021-02-17 Thread Vladimir Oltean
On Tue, Feb 16, 2021 at 10:42:04PM +0100, Horatiu Vultur wrote: > Add support for offloading MRP in HW. Currently implement the switchdev > calls 'SWITCHDEV_OBJ_ID_MRP', 'SWITCHDEV_OBJ_ID_RING_ROLE_MRP', > to allow to create MRP instances and to set the role of these instances. > > Add DSA_NOTIFIE

Re: [RFC net-next 1/2] net: dsa: add Realtek RTL8366S switch tag

2021-02-17 Thread Heiner Kallweit
On 17.02.2021 12:01, Linus Walleij wrote: > On Wed, Feb 17, 2021 at 8:08 AM Heiner Kallweit wrote: > >>> +#define RTL8366S_HDR_LEN 4 >>> +#define RTL8366S_ETHERTYPE 0x8899 >> >> I found this protocol referenced as Realtek Remote Control Protocol (RRCP) >> and it seems to be used by few Real

[PATCH 2/2 v1] vdpa/mlx5: Enable user to add/delete vdpa device

2021-02-17 Thread Eli Cohen
Allow to control vdpa device creation and destruction using the vdpa management tool. Examples: 1. List the management devices $ vdpa mgmtdev show pci/:3b:00.1: supported_classes net 2. Create vdpa instance $ vdpa dev add mgmtdev pci/:3b:00.1 name vdpa0 3. Show vdpa devices $ vdpa dev

Re: [PATCH] net: dsa: tag_rtl4_a: Support also egress tags

2021-02-17 Thread Vladimir Oltean
On Wed, Feb 17, 2021 at 12:55:42AM +0100, Linus Walleij wrote: > Support also transmitting frames using the custom "8899 A" > 4 byte tag. > > Qingfang came up with the solution: we need to pad the > ethernet frame to 60 bytes using eth_skb_pad(), then the > switch will happily accept frames with c

Re: [PATCH] net: dsa: tag_rtl4_a: Support also egress tags

2021-02-17 Thread Vladimir Oltean
On Wed, Feb 17, 2021 at 01:37:21PM +0800, DENG Qingfang wrote: > On Wed, Feb 17, 2021 at 11:29 AM Andrew Lunn wrote: > > > > > + /* Pad out to at least 60 bytes */ > > > + if (unlikely(eth_skb_pad(skb))) > > > + return NULL; > > > > The core will do the padding for you. Turn on

Re: [PATCH net-next v4 6/8] net: mscc: ocelot: Add support for MRP

2021-02-17 Thread Vladimir Oltean
On Tue, Feb 16, 2021 at 10:42:03PM +0100, Horatiu Vultur wrote: > +static inline void ocelot_xfh_get_cpuq(void *extraction, u64 *cpuq) > +{ > + packing(extraction, cpuq, 28, 20, OCELOT_TAG_LEN, UNPACK, 0); > +} > + The 8 bits I count for CPUQ are from 27 to 20. This is spilling over into LRN_F

[PATCH v7 bpf-next 0/6] xsk: build skb by page (aka generic zerocopy xmit)

2021-02-17 Thread Alexander Lobakin
This series introduces XSK generic zerocopy xmit by adding XSK umem pages as skb frags instead of copying data to linear space. The only requirement for this for drivers is to be able to xmit skbs with skb_headlen(skb) == 0, i.e. all data including hard headers starts from frag 0. To indicate wheth

[PATCH v7 bpf-next 1/6] netdev_priv_flags: add missing IFF_PHONY_HEADROOM self-definition

2021-02-17 Thread Alexander Lobakin
This is harmless for now, but comes fatal for the subsequent patch. Fixes: 871b642adebe3 ("netdev: introduce ndo_set_rx_headroom") Signed-off-by: Alexander Lobakin --- include/linux/netdevice.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/netdevice.h b/include/linux/netdevic

[PATCH v7 bpf-next 3/6] net: add priv_flags for allow tx skb without linear

2021-02-17 Thread Alexander Lobakin
From: Xuan Zhuo In some cases, we hope to construct skb directly based on the existing memory without copying data. In this case, the page will be placed directly in the skb, and the linear space of skb is empty. But unfortunately, many the network card does not support this operation. For exampl

[PATCH v7 bpf-next 2/6] netdevice: check for net_device::priv_flags bitfield overflow

2021-02-17 Thread Alexander Lobakin
We almost ran out of unsigned int bitwidth. Define priv flags and check for potential overflow in the fashion of netdev_features_t. Defined this way, priv_flags can be easily expanded later with just changing its typedef. Signed-off-by: Alexander Lobakin Reported-by: kernel test robot # Inverted

[PATCH v7 bpf-next 4/6] virtio-net: support IFF_TX_SKB_NO_LINEAR

2021-02-17 Thread Alexander Lobakin
From: Xuan Zhuo Virtio net supports the case where the skb linear space is empty, so add priv_flags. Signed-off-by: Xuan Zhuo Acked-by: Michael S. Tsirkin Signed-off-by: Alexander Lobakin --- drivers/net/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drive

[PATCH v7 bpf-next 5/6] xsk: respect device's headroom and tailroom on generic xmit path

2021-02-17 Thread Alexander Lobakin
xsk_generic_xmit() allocates a new skb and then queues it for xmitting. The size of new skb's headroom is desc->len, so it comes to the driver/device with no reserved headroom and/or tailroom. Lots of drivers need some headroom (and sometimes tailroom) to prepend (and/or append) some headers or dat

[PATCH v7 bpf-next 6/6] xsk: build skb by page (aka generic zerocopy xmit)

2021-02-17 Thread Alexander Lobakin
From: Xuan Zhuo This patch is used to construct skb based on page to save memory copy overhead. This function is implemented based on IFF_TX_SKB_NO_LINEAR. Only the network card priv_flags supports IFF_TX_SKB_NO_LINEAR will use page to directly construct skb. If this feature is not supported, it

[PATCH] lib: vsprintf: check for NULL device_node name in device_node_string()

2021-02-17 Thread Enrico Weigelt, metux IT consult
Under rare circumstances it may happen that a device node's name is NULL (most likely kernel bug in some other place). In such situations anything but helpful, if the debug printout crashes, and nobody knows what actually happened here. Therefore protect it by an explicit NULL check and print out

Re: [RFC net-next 2/2] net: dsa: add Realtek RTL8366S switch driver

2021-02-17 Thread Vladimir Oltean
On Wed, Feb 17, 2021 at 02:21:39PM +0800, DENG Qingfang wrote: > Support Realtek RTL8366S/SR switch > > Signed-off-by: DENG Qingfang > --- > drivers/net/dsa/Kconfig|1 + > drivers/net/dsa/Makefile |2 +- > drivers/net/dsa/realtek-smi-core.c |3 +- > drivers/net/

Re: [RFC net-next 1/2] net: dsa: add Realtek RTL8366S switch tag

2021-02-17 Thread DENG Qingfang
On Wed, Feb 17, 2021 at 6:55 PM Linus Walleij wrote: > > I suppose this switch can just use the existing RTL4 A tag > code after the recent patch so this one is not needed? No. Different protocol (0x9 instead of 0xA) and different xmit tag format (port bit mask instead of port number). Please tak

general protection fault in nl802154_del_llsec_devkey

2021-02-17 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:57baf8cc net: axienet: Handle deferred probe on clock prop.. git tree: net console output: https://syzkaller.appspot.com/x/log.txt?x=11f4b614d0 kernel config: https://syzkaller.appspot.com/x/.config?x=8cb23303ddb9411f dashboar

Re: [PATCH] net: dsa: tag_rtl4_a: Support also egress tags

2021-02-17 Thread DENG Qingfang
On Wed, Feb 17, 2021 at 7:55 AM Linus Walleij wrote: > > + > + /* Pad out to at least 60 bytes */ > + if (unlikely(eth_skb_pad(skb))) > + return NULL; I just found that this will cause double free (eth_skb_pad will free the skb if allocation fails, and dsa_slave_xmit wil

Re: [PATCH] net: dsa: tag_rtl4_a: Support also egress tags

2021-02-17 Thread Vladimir Oltean
On Wed, Feb 17, 2021 at 08:38:30PM +0800, DENG Qingfang wrote: > On Wed, Feb 17, 2021 at 7:55 AM Linus Walleij > wrote: > > + > > + /* Pad out to at least 60 bytes */ > > + if (unlikely(eth_skb_pad(skb))) > > + return NULL; > > I just found that this will cause double fr

Re: [PATCHv2] btf_encoder: Match ftrace addresses within elf functions

2021-02-17 Thread Arnaldo Carvalho de Melo
Em Sat, Feb 13, 2021 at 05:46:48PM +0100, Jiri Olsa escreveu: > Currently when processing DWARF function, we check its entrypoint > against ftrace addresses, assuming that the ftrace address matches > with function's entrypoint. > > This is not the case on some architectures as reported by Nathan

Re: [PATCHv2] btf_encoder: Match ftrace addresses within elf functions

2021-02-17 Thread Arnaldo Carvalho de Melo
Em Sat, Feb 13, 2021 at 08:11:40PM +0100, Sedat Dilek escreveu: > On Sat, Feb 13, 2021 at 5:46 PM Jiri Olsa wrote: > > > > Currently when processing DWARF function, we check its entrypoint > > against ftrace addresses, assuming that the ftrace address matches > > with function's entrypoint. > > >

Re: [RFC net-next 2/2] net: dsa: add Realtek RTL8366S switch driver

2021-02-17 Thread DENG Qingfang
On Wed, Feb 17, 2021 at 7:12 PM Linus Walleij wrote: > > Overall the question about whether the switch is 5+1 or 7+1 is my > big design remark. > > Maybe it is only 5+1 who knows... Yes, it's 5+1. https://cdn.jsdelivr.net/gh/libc0607/Realtek_switch_hacking@files/rtl8366s_8366sr_datasheet_vpre-1.4

Re: [PATCHv2] btf_encoder: Match ftrace addresses within elf functions

2021-02-17 Thread Arnaldo Carvalho de Melo
Em Sat, Feb 13, 2021 at 07:30:48PM -0700, Nathan Chancellor escreveu: > On Sat, Feb 13, 2021 at 05:46:48PM +0100, Jiri Olsa wrote: > > Currently when processing DWARF function, we check its entrypoint > > against ftrace addresses, assuming that the ftrace address matches > > with function's entrypo

Re: [PATCH v1 1/3] string: Consolidate yesno() helpers under string.h hood

2021-02-17 Thread Petr Mladek
On Mon 2021-02-15 16:39:26, Andy Shevchenko wrote: > +Cc: Sakari and printk people > > On Mon, Feb 15, 2021 at 4:28 PM Christian König > wrote: > > Am 15.02.21 um 15:21 schrieb Andy Shevchenko: > > > We have already few similar implementation and a lot of code that can > > > benefit > > > of the

AW: HSR/PRP sequence counter issue with Cisco Redbox

2021-02-17 Thread Wenzel, Marco
On Mon, Feb 15, 2021 at 5:49 PM George McCollister wrote: > > On Mon, Feb 15, 2021 at 6:30 AM Wenzel, Marco eberle.de> wrote: > > > > > On Wed, Jan 27, 2021 at 6:32 AM Wenzel, Marco > > eberle.de> wrote: > > > > > > > > Hi, > > > > > > > > we have figured out an issue with the current PRP driv

Re: [PATCH] of: of_mdio: Handle properties for non-phy mdio devices

2021-02-17 Thread Andrew Lunn
On Wed, Feb 17, 2021 at 02:48:30PM +1000, Nathan Rossi wrote: > On Wed, 17 Feb 2021 at 13:19, Andrew Lunn wrote: > > > > > > The patch does make sense though, Broadcom 53125 switches have a broken > > > > turn around and are mdio_device instances, the broken behavior may not > > > > show up with a

Re: [PATCHv2] btf_encoder: Match ftrace addresses within elf functions

2021-02-17 Thread Sedat Dilek
On Wed, Feb 17, 2021 at 1:44 PM Arnaldo Carvalho de Melo wrote: > > Em Sat, Feb 13, 2021 at 05:46:48PM +0100, Jiri Olsa escreveu: > > Currently when processing DWARF function, we check its entrypoint > > against ftrace addresses, assuming that the ftrace address matches > > with function's entrypo

Re: [PATCH] lib: vsprintf: check for NULL device_node name in device_node_string()

2021-02-17 Thread Andy Shevchenko
On Wed, Feb 17, 2021 at 01:15:43PM +0100, Enrico Weigelt, metux IT consult wrote: > Under rare circumstances it may happen that a device node's name is NULL > (most likely kernel bug in some other place). What circumstances? How can I reproduce this? More information, please! > In such situation

Re: [PATCH v4 net-next 06/21] nvme-tcp: Add DDP offload control path

2021-02-17 Thread Or Gerlitz
On Sun, Feb 14, 2021 at 8:20 PM David Ahern wrote: > On 2/11/21 2:10 PM, Boris Pismenny wrote: > > @@ -223,6 +229,164 @@ static inline size_t nvme_tcp_pdu_last_send(struct > > nvme_tcp_request *req, > > return nvme_tcp_pdu_data_left(req) <= len; > > } > > > > +#ifdef CONFIG_TCP_DDP > > + >

Re: [PATCHv2] btf_encoder: Match ftrace addresses within elf functions

2021-02-17 Thread Arnaldo Carvalho de Melo
On February 17, 2021 10:40:43 AM GMT-03:00, Sedat Dilek wrote: >On Wed, Feb 17, 2021 at 1:44 PM Arnaldo Carvalho de Melo > wrote: >> >> Em Sat, Feb 13, 2021 at 05:46:48PM +0100, Jiri Olsa escreveu: >> > Currently when processing DWARF function, we check its entrypoint >> > against ftrace addre

[PATCH bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-02-17 Thread Lorenzo Bianconi
We want to change the current ndo_xdp_xmit drop semantics because it will allow us to implement better queue overflow handling. This is working towards the larger goal of a XDP TX queue-hook. Move XDP_REDIRECT error path handling from each XDP ethernet driver to devmap code. According to the new AP

Re: [PATCH bpf-next 00/17] Improve BPF syscall command documentation

2021-02-17 Thread Toke Høiland-Jørgensen
Joe Stringer writes: > From: Joe Stringer > > The state of bpf(2) manual pages today is not exactly ideal. For the > most part, it was written several years ago and has not kept up with the > pace of development in the kernel tree. For instance, out of a total of > ~35 commands to the BPF syscal

Re: [PATCH v4 net-next 07/21] nvme-tcp: Add DDP data-path

2021-02-17 Thread Or Gerlitz
On Sun, Feb 14, 2021 at 8:30 PM David Ahern wrote: > > On 2/11/21 2:10 PM, Boris Pismenny wrote: > > > > +static int nvme_tcp_teardown_ddp(struct nvme_tcp_queue *queue, > > + u16 command_id, > > + struct request *rq) > > +{ > > + struct

Re: [PATCH] net: dsa: tag_rtl4_a: Support also egress tags

2021-02-17 Thread Heiner Kallweit
On 17.02.2021 13:42, Vladimir Oltean wrote: > On Wed, Feb 17, 2021 at 08:38:30PM +0800, DENG Qingfang wrote: >> On Wed, Feb 17, 2021 at 7:55 AM Linus Walleij >> wrote: >>> + >>> + /* Pad out to at least 60 bytes */ >>> + if (unlikely(eth_skb_pad(skb))) >>> + return NULL;

Re: [PATCH net-next] net: phy: icplus: Call phy_restore_page() when phy_select_page() fails

2021-02-17 Thread Dan Carpenter
On Wed, Feb 17, 2021 at 09:17:59AM +0300, Dan Carpenter wrote: > Smatch warns that there is a locking issue in this function: > > drivers/net/phy/icplus.c:273 ip101a_g_config_intr_pin() > warn: inconsistent returns '&phydev->mdio.bus->mdio_lock'. > Locked on : 242 > Unlocked on: 273 > > It t

Re: [PATCH 2/2] ath9k: fix ath_tx_process_buffer() potential null ptr dereference

2021-02-17 Thread Shuah Khan
On 2/17/21 12:30 AM, Kalle Valo wrote: Shuah Khan writes: On 2/16/21 12:53 AM, Felix Fietkau wrote: On 2021-02-16 08:03, Kalle Valo wrote: Shuah Khan wrote: ath_tx_process_buffer() references ieee80211_find_sta_by_ifaddr() return pointer (sta) outside null check. Fix it by moving the cod

Re: [PATCH net-next] net: phy: icplus: Call phy_restore_page() when phy_select_page() fails

2021-02-17 Thread Russell King - ARM Linux admin
On Wed, Feb 17, 2021 at 05:28:38PM +0300, Dan Carpenter wrote: > On Wed, Feb 17, 2021 at 09:17:59AM +0300, Dan Carpenter wrote: > > Smatch warns that there is a locking issue in this function: > > > > drivers/net/phy/icplus.c:273 ip101a_g_config_intr_pin() > > warn: inconsistent returns '&phydev->

[PATCH] Revert "dpaa_eth: add XDP_REDIRECT support"

2021-02-17 Thread Sascha Hauer
This reverts commit a1e031ffb422bb89df9ad9c018420d0deff7f2e3. This commit introduces a: np = container_of(&portal, struct dpaa_napi_portal, p); Using container_of() on the address of a pointer doesn't make sense as the pointer is not embedded into the desired struct. KASAN complains abo

Re: [PATCH net-next] net: phy: icplus: Call phy_restore_page() when phy_select_page() fails

2021-02-17 Thread Russell King - ARM Linux admin
On Wed, Feb 17, 2021 at 03:06:21PM +, Russell King - ARM Linux admin wrote: > On Wed, Feb 17, 2021 at 05:28:38PM +0300, Dan Carpenter wrote: > > On Wed, Feb 17, 2021 at 09:17:59AM +0300, Dan Carpenter wrote: > > > Smatch warns that there is a locking issue in this function: > > > > > > drivers

KASAN: use-after-free Read in tcp_current_mss

2021-02-17 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:773dc50d Merge branch 'Xilinx-axienet-updates' git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=13460822d0 kernel config: https://syzkaller.appspot.com/x/.config?x=dbc1ca9e55dc1f9f dashboard link: h

Re: [RFC net-next 2/2] net: dsa: add Realtek RTL8366S switch driver

2021-02-17 Thread Linus Walleij
On Wed, Feb 17, 2021 at 1:25 PM Vladimir Oltean wrote: > I'm not going to do a detailed review on a driver that is a 90% copy of > rtl8366rb. You should probably spend some time to avoid duplicating > what is common. The split of common and individual code comes from the OpenWrt driver, maybe it

Re: [PATCH net-next] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-17 Thread Arnd Bergmann
On Tue, Feb 16, 2021 at 11:14 PM Min Li wrote: > > I can't help but think you are evading my question I asked. If there is no > > specific action that this pcm4l tool needs to perform, then I'd think we > > should better not provide any interface for it at all. > > > > I also found a reference to

Re: [PATCH net-next v4 2/8] switchdev: mrp: Extend ring_role_mrp and in_role_mrp

2021-02-17 Thread Vladimir Oltean
On Wed, Feb 17, 2021 at 04:58:45PM +0100, Horatiu Vultur wrote: > > If a driver implements full MRP offload for a ring/interconnect > > manager/automanager, should it return -EOPNOTSUPP when sw_backup=false? > > In that case it should return 0. > So if the driver can: > - fully support MRP, when s

null terminating of IFLA_INFO_KIND/IFLA_IFNAME

2021-02-17 Thread Муравьев Александр
Hi A noob question that I haven't found an answer. Just wanted to clarify a piece of iproute2 code. ip/iplink.c: 1058 addattr_l(&req.n, sizeof(req), IFLA_INFO_KIND, type, 1059  strlen(type)); also ip/iplink.c: 1115 addattr_l(&req.n, sizeof(req), 1116   

[PATCH bpf-next 0/4] selftests/bpf: xsk improvements and new stats tests

2021-02-17 Thread Ciara Loftus
This series attempts to improve the xsk selftest framework by: 1. making the default output less verbose 2. adding an optional verbose flag to both the test_xsk.sh script and xdpxceiver app. 3. adding a 'debug' flag to the test_xsk.sh script which enables debug mode in the app. 4. changing how te

[PATCH bpf-next 1/4] selftest/bpf: make xsk tests less verbose

2021-02-17 Thread Ciara Loftus
From: Magnus Karlsson Make the xsk tests less verbose by only printing the essentials. Currently, it is hard to see if the tests passed or not due to all the printouts. Move the extra printouts to a verbose option, if further debugging is needed when a problem arises. To run the xsk tests with v

[PATCH bpf-next 3/4] selftests/bpf: restructure xsk selftests

2021-02-17 Thread Ciara Loftus
Prior to this commit individual xsk tests were launched from the shell script 'test_xsk.sh'. When adding a new test type, two new test configurations had to be added to this file - one for each of the supported XDP 'modes' (skb or drv). Should zero copy support be added to the xsk selftest framewor

[PATCH bpf-next 4/4] selftests/bpf: introduce xsk statistics tests

2021-02-17 Thread Ciara Loftus
This commit introduces a range of tests to the xsk testsuite for validating xsk statistics. A new test type called 'stats' is added. Within it there are four sub-tests which test the following statistics: 1. rx dropped 2. tx invalid 3. rx ring full 4. fill queue empty Each test configures a scena

[PATCH bpf-next 2/4] selftests/bpf: expose debug arg to shell script for xsk tests

2021-02-17 Thread Ciara Loftus
Launching xdpxceiver with -D enables debug mode. Make it possible to pass this flag to the app via the test_xsk.sh shell script like so: ./test_xsk.sh -d Signed-off-by: Ciara Loftus --- tools/testing/selftests/bpf/test_xsk.sh| 7 ++- tools/testing/selftests/bpf/xsk_prereqs.sh | 3 ++- 2

Re: [PATCH v4 net-next 07/21] nvme-tcp: Add DDP data-path

2021-02-17 Thread David Ahern
On 2/17/21 7:01 AM, Or Gerlitz wrote: >>> @@ -1136,6 +1265,10 @@ static int nvme_tcp_try_send_cmd_pdu(struct >>> nvme_tcp_request *req) >>> else >>> flags |= MSG_EOR; >>> >>> + if (test_bit(NVME_TCP_Q_OFF_DDP, &queue->flags) && >>> + blk_rq_nr_phys_segments(rq) && r

Re: [PATCH net-next] net: phy: icplus: Call phy_restore_page() when phy_select_page() fails

2021-02-17 Thread Andrew Lunn
> I'm wondering whether we need to add __acquires() and __releases() > annotations to some of these functions so that sparse can catch > these cases. Thoughts? Hi Russell The more tools we have for catching locking problems the better. Jakubs patchwork bot should then catch them when a patch is s

Re: null terminating of IFLA_INFO_KIND/IFLA_IFNAME

2021-02-17 Thread David Ahern
On 2/17/21 9:06 AM, Муравьев Александр wrote: > Hi > > A noob question that I haven't found an answer. > > Just wanted to clarify a piece of iproute2 code. > > ip/iplink.c: > >> 1058 addattr_l(&req.n, sizeof(req), IFLA_INFO_KIND, type, >> 1059  strlen(type)); > > also ip/ip

Re: [PATCH 2/2 v1] vdpa/mlx5: Enable user to add/delete vdpa device

2021-02-17 Thread Michael S. Tsirkin
On Wed, Feb 17, 2021 at 01:31:36PM +0200, Eli Cohen wrote: > Allow to control vdpa device creation and destruction using the vdpa > management tool. > > Examples: > 1. List the management devices > $ vdpa mgmtdev show > pci/:3b:00.1: > supported_classes net > > 2. Create vdpa instance > $ v

Re: [PATCH v1 1/3] string: Consolidate yesno() helpers under string.h hood

2021-02-17 Thread Jani Nikula
On Wed, 17 Feb 2021, Petr Mladek wrote: > On Mon 2021-02-15 16:39:26, Andy Shevchenko wrote: >> +Cc: Sakari and printk people >> >> On Mon, Feb 15, 2021 at 4:28 PM Christian König >> wrote: >> > Am 15.02.21 um 15:21 schrieb Andy Shevchenko: >> > > We have already few similar implementation and a

general protection fault in mptcp_sendmsg_frag

2021-02-17 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:773dc50d Merge branch 'Xilinx-axienet-updates' git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=1744ba4cd0 kernel config: https://syzkaller.appspot.com/x/.config?x=dbc1ca9e55dc1f9f dashboard link: h

possible deadlock in inet_stream_connect

2021-02-17 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:9ec5eea5 lib/parman: Delete newline git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=11380d24d0 kernel config: https://syzkaller.appspot.com/x/.config?x=dbc1ca9e55dc1f9f dashboard link: https://syzk

KASAN: use-after-free Read in mptcp_established_options

2021-02-17 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:966df6de lan743x: sync only the received area of an rx rin.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=11afe082d0 kernel config: https://syzkaller.appspot.com/x/.config?x=dbc1ca9e55dc1f9f das

WARNING in dst_release

2021-02-17 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:9ec5eea5 lib/parman: Delete newline git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=107fb9d2d0 kernel config: https://syzkaller.appspot.com/x/.config?x=dbc1ca9e55dc1f9f dashboard link: https://syzk

possible deadlock in mptcp_push_pending

2021-02-17 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:c48f8607 Merge branch 'PTP-for-DSA-tag_ocelot_8021q' git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=16525cb0d0 kernel config: https://syzkaller.appspot.com/x/.config?x=dbc1ca9e55dc1f9f dashboard l

Re: [PATCH bpf-next 00/17] Improve BPF syscall command documentation

2021-02-17 Thread Jonathan Corbet
[CC += linux-doc] Joe Stringer writes: > From: Joe Stringer > > The state of bpf(2) manual pages today is not exactly ideal. For the > most part, it was written several years ago and has not kept up with the > pace of development in the kernel tree. For instance, out of a total of > ~35 command

Re: HSR/PRP sequence counter issue with Cisco Redbox

2021-02-17 Thread George McCollister
On Wed, Feb 17, 2021 at 7:14 AM Wenzel, Marco wrote: > > On Mon, Feb 15, 2021 at 5:49 PM George McCollister > wrote: > > > > On Mon, Feb 15, 2021 at 6:30 AM Wenzel, Marco > eberle.de> wrote: [snip] > > I was not so familiar with kernel patching until now and hope that this patch > is correct n

Re: [PATCHv2] btf_encoder: Match ftrace addresses within elf functions

2021-02-17 Thread Sedat Dilek
On Wed, Feb 17, 2021 at 2:56 PM Arnaldo Carvalho de Melo wrote: > > > > On February 17, 2021 10:40:43 AM GMT-03:00, Sedat Dilek > wrote: > >On Wed, Feb 17, 2021 at 1:44 PM Arnaldo Carvalho de Melo > > wrote: > >> > >> Em Sat, Feb 13, 2021 at 05:46:48PM +0100, Jiri Olsa escreveu: > >> > Currently

Re: [PATCH mlx5-next v6 1/4] PCI: Add sysfs callback to allow MSI-X table size change of SR-IOV VFs

2021-02-17 Thread Bjorn Helgaas
[+cc Greg in case he wants to chime in on the sysfs discussion. TL;DR: we're trying to add/remove sysfs files when a PCI driver that supports certain callbacks binds or unbinds; series at https://lore.kernel.org/r/20210209133445.700225-1-l...@kernel.org] On Tue, Feb 16, 2021 at 09:58:25PM +0200, L

Re: [PATCH v2 net-next 1/3] ptp: ptp_clockmatrix: Add wait_for_sys_apll_dpll_lock.

2021-02-17 Thread Jakub Kicinski
On Tue, 16 Feb 2021 13:12:29 -0500 Vincent Cheng wrote: > >> +} > >> + > >> +static int wait_for_sys_apll_dpll_lock(struct idtcm *idtcm) > >> +{ > >> + const char *fmt = "%d ms SYS lock timeout: APLL Loss Lock %d DPLL > >> state %d"; > >> + u8 i = LOCK_TIMEOUT_MS / LOCK_POLL_INTERVAL_MS; > >

[PATCH V3 net-next 3/5] net: add sysctl for enabling RFC 8335 PROBE messages

2021-02-17 Thread Andreas Roeseler
Section 8 of RFC 8335 specifies potential security concerns of responding to PROBE requests, and states that nodes that support PROBE functionality MUST be able to enable/disable responses and it is disabled by default. Add sysctl to enable responses to PROBE messages. Signed-off-by: Andreas Ro

[PATCH V3 net-next 2/5] ICMPV6: add support for RFC 8335 PROBE

2021-02-17 Thread Andreas Roeseler
Add definitions for the ICMPV6 type of Extended Echo Request and Extended Echo Reply, as defined in sections 2 and 3 of RFC 8335. Signed-off-by: Andreas Roeseler --- include/uapi/linux/icmpv6.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/uapi/linux/icmpv6.h b/include/uapi/l

[PATCH V3 net-next 0/5] add support for RFC 8335 PROBE

2021-02-17 Thread Andreas Roeseler
The popular utility ping has several severe limitations such as the inability to query specific interfaces on a node and requiring bidirectional connectivity between the probing and probed interfaces. RFC 8335 attempts to solve these limitations by creating the new utility PROBE which is a speciali

[PATCH V3 net-next 4/5] net: add support for sending RFC 8335 PROBE messages

2021-02-17 Thread Andreas Roeseler
Modify the ping_supported function to support PROBE message types. This allows tools such as the ping command in the iputils package to be modified to send PROBE requests through the existing framework for sending ping requests. Signed-off-by: Andreas Roeseler --- net/ipv4/ping.c | 4 +++- 1 fil

[PATCH V3 net-next 5/5] icmp: add response to RFC 8335 PROBE messages

2021-02-17 Thread Andreas Roeseler
Modify the icmp_rcv function to check for PROBE messages and call icmp_echo if a PROBE request is detected. Modify the existing icmp_echo function to respond to both ping and PROBE requests. This was tested using a custom modification of the iputils package and wireshark. It supports IPV4 probing

[PATCH V3 net-next 1/5] icmp: add support for RFC 8335 PROBE

2021-02-17 Thread Andreas Roeseler
Add definitions for PROBE ICMP types and codes. Add AFI definitions for IP and IPV6 as specified by IANA Add a struct to represent the additional header when probing by IP address (ctype == 3) for use in parsing incoming PROBE messages. Add a struct to represent the entire Interface Identificati

possible stack corruption in icmp_send (__stack_chk_fail)

2021-02-17 Thread Jason A. Donenfeld
Hi Netdev & Willem, I've received a report of stack corruption -- via the stack protector check -- in icmp_send. I was sent a vmcore, and was able to extract the OOPS from there. However, I've been unable to produce the bug and I don't see where it'd be in the code. That might point to a more sini

MIPS: net: mscc: ocelot: undefined reference to `packing'

2021-02-17 Thread Naresh Kamboju
The mips defconfig build failed on today's Linux next 20210217 tag. make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/tmp ARCH=mips CROSS_COMPILE=mips-linux-gnu- 'CC=sccache mips-linux-gnu-gcc' 'HOSTCC=sccache gcc' uImage.gz mips-linux-gnu-ld:

Re: [MPTCP] KASAN: use-after-free Read in mptcp_established_options

2021-02-17 Thread Paolo Abeni
On Wed, 2021-02-17 at 09:30 -0800, syzbot wrote: > syzbot found the following issue on: > > HEAD commit:966df6de lan743x: sync only the received area of an rx rin.. > git tree: net-next > console output: https://syzkaller.appspot.com/x/log.txt?x=11afe082d0 > kernel config: https://s

RE: [Patch bpf-next v4 4/5] skmsg: move sk_redir from TCP_SKB_CB to skb

2021-02-17 Thread John Fastabend
Cong Wang wrote: > From: Cong Wang > > Currently TCP_SKB_CB() is hard-coded in skmsg code, it certainly > does not work for any other non-TCP protocols. We can move them to > skb ext, but it introduces a memory allocation on fast path. > > Fortunately, we only need to a word-size to store all th

Re: KASAN: use-after-free Read in tcp_current_mss

2021-02-17 Thread Paolo Abeni
On Wed, 2021-02-17 at 07:36 -0800, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:773dc50d Merge branch 'Xilinx-axienet-updates' > git tree: net-next > console output: https://syzkaller.appspot.com/x/log.txt?x=13460822d0 > kernel config: https://syz

Re: [Patch bpf-next v4 4/5] skmsg: move sk_redir from TCP_SKB_CB to skb

2021-02-17 Thread Cong Wang
On Wed, Feb 17, 2021 at 10:40 AM John Fastabend wrote: > > @@ -802,9 +809,10 @@ int sk_psock_tls_strp_read(struct sk_psock *psock, > > struct sk_buff *skb) > >* TLS context. > >*/ > > skb->sk = psock->sk; > > - tcp_skb_bpf_redirect_clear(s

[PATCH net-next 1/3] netfilter: nftables: add helper function to release one table

2021-02-17 Thread Pablo Neira Ayuso
Add a function to release one table. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_tables_api.c | 75 +++ 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index ab93a353651a..c2b8

[PATCH net-next 3/3] netfilter: nftables: introduce table ownership

2021-02-17 Thread Pablo Neira Ayuso
A userspace daemon like firewalld might need to monitor for netlink updates to detect its ruleset removal by the (global) flush ruleset command to ensure ruleset persistency. This adds extra complexity from userspace and, for some little time, the firewall policy is not in place. This patch adds t

[PATCH net-next 0/3] Netfilter updates for net-next

2021-02-17 Thread Pablo Neira Ayuso
Hi, The following patchset contains Netfilter updates for net-next: 1) Add two helper functions to release one table and hooks from the netns and netlink event path. 2) Add table ownership infrastructure, this new infrastructure allows users to bind a table (and its content) to a process t

[PATCH net-next 2/3] netfilter: nftables: add helper function to release hooks of one single table

2021-02-17 Thread Pablo Neira Ayuso
Add a function to release the hooks of one single table. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_tables_api.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index c2b89116dcef..dffb4

  1   2   3   >