[PATCH v2 net-next] net: dsa: mt7530: support setting MTU

2020-11-01 Thread DENG Qingfang
MT7530/7531 has a global RX packet length register, which can be used to set MTU. Supported packet length values are 1522 (1518 if untagged), 1536, 1552, and multiple of 1024 (from 2048 to 15360). Signed-off-by: DENG Qingfang --- v1 -> v2: Avoid duplication of mt7530_rmw() Fix co

[PATCH v2] net: bonding: alb disable balance for IPv6 multicast related mac

2020-11-01 Thread LIU Yulong
According to the RFC 2464 [1] the prefix "33:33:xx:xx:xx:xx" is defined to construct the multicast destination MAC address for IPv6 multicast traffic. The NDP (Neighbor Discovery Protocol for IPv6)[2] will comply with such rule. The work steps [6] are: *) Let's assume a destination address of 200

Re: [PATCH] staging: wimax: depends on NET

2020-11-01 Thread Arnd Bergmann
On Mon, Nov 2, 2020 at 8:25 AM Randy Dunlap wrote: > > Fix build errors when CONFIG_NET is not enabled. E.g. (trimmed): > > ld: drivers/staging/wimax/op-msg.o: in function `wimax_msg_alloc': > op-msg.c:(.text+0xa9): undefined reference to `__alloc_skb' > ld: op-msg.c:(.text+0xcc): undefined refere

RE: [PATCH v8,net-next,00/12] Add Support for Marvell OcteonTX2

2020-11-01 Thread Srujana Challa
> Subject: Re: [PATCH v8,net-next,00/12] Add Support for Marvell OcteonTX2 > > On Sat, 31 Oct 2020 15:28:59 -0400 Willem de Bruijn wrote: > > The point about parsing tar files remains open. In general error-prone > > parsing is better left to userspace. > > The tar files have to go. Srujana said

update my thread mail address

2020-11-01 Thread LIU Yulong
Due to the netdev mail server reject my personal address to send mail. I just moved to gmail. LIU Yulong

Re: [PATCH] net: can: prevent potential access of uninitialized value in canfd_rcv()

2020-11-01 Thread Anant Thazhemadam
On 02-11-2020 12:40, Marc Kleine-Budde wrote: > On 11/2/20 4:13 AM, Anant Thazhemadam wrote: >> In canfd_rcv(), cfd->len is uninitialized when skb->len = 0, and this >> uninitialized cfd->len is accessed nonetheless by pr_warn_once(). >> >> Fix this uninitialized variable access by checking cfd->

RE: [PATCH net-next 2/3] drivers: net: xilinx_emaclite: Fix -Wpointer-to-int-cast warnings with W=1

2020-11-01 Thread Radhey Shyam Pandey
> -Original Message- > From: Michal Simek > Sent: Monday, November 2, 2020 12:51 PM > To: Andrew Lunn ; Jakub Kicinski > Cc: netdev ; Michal Simek ; > Radhey Shyam Pandey > Subject: Re: [PATCH net-next 2/3] drivers: net: xilinx_emaclite: Fix > -Wpointer- > to-int-cast warnings with W=1

[PATCH] staging: wimax: depends on NET

2020-11-01 Thread Randy Dunlap
Fix build errors when CONFIG_NET is not enabled. E.g. (trimmed): ld: drivers/staging/wimax/op-msg.o: in function `wimax_msg_alloc': op-msg.c:(.text+0xa9): undefined reference to `__alloc_skb' ld: op-msg.c:(.text+0xcc): undefined reference to `genlmsg_put' ld: op-msg.c:(.text+0xfc): undefined refer

Re: KASAN: slab-out-of-bounds Write in xfrm_attr_cpy32

2020-11-01 Thread syzbot
syzbot has bisected this issue to: commit 5106f4a8acff480e244300bc5097c0ad7048c3a2 Author: Dmitry Safonov Date: Mon Sep 21 14:36:55 2020 + xfrm/compat: Add 32=>64-bit messages translator bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16cefa8a50 start commit: 3cea11

Re: [PATCH net-next 3/3] drivers: net: xilinx_emaclite: Add COMPILE_TEST support

2020-11-01 Thread Michal Simek
On 31. 10. 20 18:47, Andrew Lunn wrote: > To improve build testing of this driver, add COMPILE_TEST support. > > Signed-off-by: Andrew Lunn > --- > drivers/net/ethernet/xilinx/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/xilinx/Kconfig

Re: [PATCH net-next 2/3] drivers: net: xilinx_emaclite: Fix -Wpointer-to-int-cast warnings with W=1

2020-11-01 Thread Michal Simek
On 31. 10. 20 18:47, Andrew Lunn wrote: > drivers/net/ethernet//xilinx/xilinx_emaclite.c:341:35: warning: cast from > pointer to integer of different size [-Wpointer-to-int-cast] > 341 | addr = (void __iomem __force *)((u32 __force)addr ^ > > Use long instead of u32 to avoid problems on 64

RE: [PATCH net-next v2] net/usb/r8153_ecm: support ECM mode for RTL8153

2020-11-01 Thread Hayes Wang
Jakub Kicinski [...] > Can you describe the use case in more detail? > > AFAICT r8152 defines a match for the exact same device. > Does it not mean that which driver is used will be somewhat random > if both are built? I export rtl_get_version() from r8152. It would return none zero value if r81

Re: [PATCH net-next 1/3] drivers: net: xilinx_emaclite: Add missing parameter kerneldoc

2020-11-01 Thread Michal Simek
On 31. 10. 20 18:47, Andrew Lunn wrote: > The txqueue parameter to the watchdog callback is unused in this > driver. But it still needs to be documented. > > Signed-off-by: Andrew Lunn > --- > drivers/net/ethernet/xilinx/xilinx_emaclite.c | 1 + > 1 file changed, 1 insertion(+) > > diff --gi

Re: [PATCH] net: can: prevent potential access of uninitialized value in canfd_rcv()

2020-11-01 Thread Marc Kleine-Budde
On 11/2/20 4:13 AM, Anant Thazhemadam wrote: > In canfd_rcv(), cfd->len is uninitialized when skb->len = 0, and this > uninitialized cfd->len is accessed nonetheless by pr_warn_once(). > > Fix this uninitialized variable access by checking cfd->len's validity > condition (cfd->len > CANFD_MAX_DLEN

[PATCH v7 4/4] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell

2020-11-01 Thread Pavana Sharma
The Marvell 88E6393X device is a single-chip integration of a 11-port Ethernet switch with eight integrated Gigabit Ethernet (GbE) transceivers and three 10-Gigabit interfaces. This patch adds functionalities specific to mv88e6393x family (88E6393X, 88E6193X and 88E6191X) Co-developed-by: Ashkan

[PATCH v7 3/4] net: dsa: mv88e6xxx: Change serdes lane parameter from u8 type to int

2020-11-01 Thread Pavana Sharma
Returning 0 is no more an error case with MV88E6393 family which has serdes lane numbers 0, 9 or 10. So with this change .serdes_get_lane will return lane number or error (-ENODEV). Signed-off-by: Pavana Sharma --- drivers/net/dsa/mv88e6xxx/chip.c | 28 +-- drivers/net/dsa/mv88e6xxx/ch

[PATCH v7 2/4] net: phy: Add 5GBASER interface mode

2020-11-01 Thread Pavana Sharma
Add 5GBASE-R phy interface mode Signed-off-by: Pavana Sharma --- include/linux/phy.h | 4 1 file changed, 4 insertions(+) diff --git a/include/linux/phy.h b/include/linux/phy.h index 3a09d2bf69ea..977b94a44e15 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -105,6 +105,8 @@ t

[PATCH v7 1/4] dt-bindings: net: Add 5GBASER phy interface mode

2020-11-01 Thread Pavana Sharma
Add 5gbase-r PHY interface mode. Signed-off-by: Pavana Sharma --- Documentation/devicetree/bindings/net/ethernet-controller.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-

[PATCH v7 0/4] Add support for mv88e6393x family of Marvell

2020-11-01 Thread Pavana Sharma
Thanks for the review. Here's updated patchset. Pavana Sharma (4): dt-bindings: net: Add 5GBASER phy interface mode net: phy: Add 5GBASER interface mode net: dsa: mv88e6xxx: Change serdes lane parameter from u8 type to int net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell

Re: [PATCH iproute2-next v2 03/11] lib: utils: Add print_on_off_bool()

2020-11-01 Thread Leon Romanovsky
On Sun, Nov 01, 2020 at 04:55:42PM -0700, David Ahern wrote: > On 10/31/20 3:23 PM, Petr Machata wrote: > > > > David Ahern writes: > > > >> On 10/30/20 6:29 AM, Petr Machata wrote: > >>> diff --git a/lib/utils.c b/lib/utils.c > >>> index 930877ae0f0d..8deec86ecbcd 100644 > >>> --- a/lib/utils.c >

[PATCH net-next 10/13] octeontx2-pf: Add support for SR-IOV management functions

2020-11-01 Thread Naveen Mamindlapalli
This patch adds support for ndo_set_vf_mac, ndo_set_vf_vlan and ndo_get_vf_config handlers. The traffic redirection based on the VF mac address or vlan id is done by installing MCAM rules. Reserved RX_VTAG_TYPE7 in each NIXLF for VF VLAN which strips the VLAN tag from ingress VLAN traffic. The NIX

[PATCH net-next 05/13] octeontx2-pf: Add support for ethtool ntuple filters

2020-11-01 Thread Naveen Mamindlapalli
From: Subbaraya Sundeep This patch adds support for adding and deleting ethtool ntuple filters. The filters for ether, ipv4, ipv6, tcp, udp and sctp are supported. The mask is also supported. The supported actions are drop and direct to a queue. Additionally we support FLOW_EXT field vlan_tci and

[PATCH net-next 11/13] octeontx2-af: Handle PF-VF mac address changes

2020-11-01 Thread Naveen Mamindlapalli
From: Hariprasad Kelam This patch handles the VF mac address changes as given below. 1. mac addr configrued by VF will be retained until VF module unload. 2. mac addr configred by PF for VF will be retained until power cycle. 3. mac addr confgired by PF for its VF can't be overwritten

[PATCH net-next 12/13] octeontx2-af: Add new mbox messages to retrieve MCAM entries

2020-11-01 Thread Naveen Mamindlapalli
This patch introduces new mailbox mesages to retrieve a given MCAM entry or base flow steering rule of a VF installed by its parent PF. This helps while updating the existing MCAM rules with out re-framing the whole mailbox request again. The INSTALL FLOW mailbox consumer can read-modify-write the

[PATCH net-next 07/13] octeontx2-af: Add debugfs entry to dump the MCAM rules

2020-11-01 Thread Naveen Mamindlapalli
From: Subbaraya Sundeep Add debugfs support to dump the MCAM rules installed using NPC_INSTALL_FLOW mbox message. Debugfs file can display mcam entry, counter if any, flow type and counter hits. Ethtool will dump the ntuple flows related to the PF only. The debugfs file gives systemwide view of

[PATCH net-next 08/13] octeontx2-af: Modify nix_vtag_cfg mailbox to support TX VTAG entries

2020-11-01 Thread Naveen Mamindlapalli
From: Vamsi Attunuru This patch modifies the existing nix_vtag_config mailbox message to allocate and free TX VTAG entries as requested by a NIX PF. The TX VTAG entries are global resource that shared by all PFs and each entry specifies the size of VTAG to insert and the VTAG header data to inser

[PATCH net-next 13/13] octeontx2-af: Delete NIX_RXVLAN_ALLOC mailbox message

2020-11-01 Thread Naveen Mamindlapalli
From: Subbaraya Sundeep Since mailbox message for installing flows is in place, remove the RXVLAN_ALLOC mbox message which is redundant. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Naveen Mamindlapalli --- drivers/net/ethernet/marvell/octeontx2/af/mbox.h |

[PATCH net-next 06/13] octeontx2-pf: Add support for unicast MAC address filtering

2020-11-01 Thread Naveen Mamindlapalli
From: Hariprasad Kelam Add unicast MAC address filtering support using install flow message. Total of 8 MCAM entries are allocated for adding unicast mac filtering rules. If the MCAM allocation fails, the unicast filtering support will not be advertised. Signed-off-by: Hariprasad Kelam Signed-o

[PATCH net-next 09/13] octeontx2-pf: Implement ingress/egress VLAN offload

2020-11-01 Thread Naveen Mamindlapalli
From: Hariprasad Kelam This patch implements egress VLAN offload by appending NIX_SEND_EXT_S header to NIX_SEND_HDR_S. The VLAN TCI information is specified in the NIX_SEND_EXT_S. The VLAN offload in the ingress path is implemented by configuring the NIX_RX_VTAG_ACTION_S to strip and capture the

[PATCH net-next 04/13] octeontx2-af: Add mbox messages to install and delete MCAM rules

2020-11-01 Thread Naveen Mamindlapalli
From: Subbaraya Sundeep Added new mailbox messages to install and delete MCAM rules. These mailbox messages will be used for adding/deleting ethtool n-tuple filters by NIX PF. The installed MCAM rules are stored in a list that will be traversed later to delete the MCAM entries when the interface

[PATCH net-next 03/13] octeontx2-af: Generate key field bit mask from KEX profile

2020-11-01 Thread Naveen Mamindlapalli
From: Subbaraya Sundeep Key Extraction(KEX) profile decides how the packet metadata such as layer information and selected packet data bytes at each layer are placed in MCAM search key. This patch reads the configured KEX profile parameters to find out the bit position and bit mask for each field

[PATCH net-next 00/13] Add ethtool ntuple filters support

2020-11-01 Thread Naveen Mamindlapalli
This patch series adds support for ethtool ntuple filters, unicast address filtering, VLAN offload and SR-IOV ndo handlers. All of the above features are based on the Admin Function(AF) driver support to install and delete the low level MCAM entries. Each MCAM entry is programmed with the packet fi

[PATCH net-next 01/13] octeontx2-af: Modify default KEX profile to extract TX packet fields

2020-11-01 Thread Naveen Mamindlapalli
From: Stanislaw Kardach The current default Key Extraction(KEX) profile can only use RX packet fields while generating the MCAM search key. The profile can't be used for matching TX packet fields. This patch modifies the default KEX profile to add support for extracting TX packet fields into MCAM

[PATCH net-next 02/13] octeontx2-af: Verify MCAM entry channel and PF_FUNC

2020-11-01 Thread Naveen Mamindlapalli
From: Subbaraya Sundeep This patch adds support to verify the channel number sent by mailbox requester before writing MCAM entry for Ingress packets. Similarly for Egress packets, verifying the PF_FUNC sent by the mailbox user. Signed-off-by: Subbaraya Sundeep Signed-off-by: Kiran Kumar K Sign

Re: [resend] Solution for the problem conntrack in tc subsystem

2020-11-01 Thread wenxu
On 10/30/2020 6:59 AM, Marcelo Ricardo Leitner wrote: > Cc'ing Cong, Paul, Oz and Davide. > > On Thu, Oct 29, 2020 at 10:22:04AM +0800, wenxu wrote: >> Only do gso for the reassembly big packet is also can't fix all the >> case such for icmp packet. > Good point. And as we can't know that a fragm

Re: [PATCH mlx5-next v1 03/11] net/mlx5_core: Clean driver version and name

2020-11-01 Thread Leon Romanovsky
On Mon, Nov 02, 2020 at 05:07:59AM +, Parav Pandit wrote: > > > > From: Leon Romanovsky > > Sent: Monday, November 2, 2020 1:46 AM > > > > From: Leon Romanovsky > > > > Remove exposed driver version as it was done in other drivers, so module > > version will work correctly by displaying the k

RE: [PATCH mlx5-next v1 03/11] net/mlx5_core: Clean driver version and name

2020-11-01 Thread Parav Pandit
> From: Leon Romanovsky > Sent: Monday, November 2, 2020 1:46 AM > > From: Leon Romanovsky > > Remove exposed driver version as it was done in other drivers, so module > version will work correctly by displaying the kernel version for which it is > compiled. > > And move mlx5_core module na

[net-next PATCH 2/3] octeontx2-af: Add devlink health reporters for NPA

2020-11-01 Thread George Cherian
Add health reporters for RVU NPA block. Only reporter dump is supported Output: # devlink health pci/0002:01:00.0: reporter npa state healthy error 0 recover 0 # devlink health dump show pci/0002:01:00.0 reporter npa NPA_AF_GENERAL: Unmap PF Error: 0 Free Disabled for

[net-next PATCH 1/3] octeontx2-af: Add devlink suppoort to af driver

2020-11-01 Thread George Cherian
Add devlink support to AF driver. Basic devlink support is added. Currently info_get is the only supported devlink ops. devlink ouptput looks like this # devlink dev pci/0002:01:00.0 # devlink dev info pci/0002:01:00.0: driver octeontx2-af versions: fixed: mbox version: 9 Si

[net-next PATCH 3/3] octeontx2-af: Add devlink health reporters for NIX

2020-11-01 Thread George Cherian
Add health reporters for RVU NPA block. Only reporter dump is supported. Output: # ./devlink health pci/0002:01:00.0: reporter npa state healthy error 0 recover 0 reporter nix state healthy error 0 recover 0 # ./devlink health dump show pci/0002:01:00.0 reporter nix NIX_AF_GE

[net-next PATCH 0/3] Add devlink and devlink health reporters to

2020-11-01 Thread George Cherian
Add basic devlink and devlink health reporters. Devlink health reporters are added for NPA and NIX blocks. These reporters report the error count in respective blocks. Address Jakub's comment to add devlink support for error reporting. https://www.spinics.net/lists/netdev/msg670712.html George C

Re: KASAN: slab-out-of-bounds Write in xfrm_attr_cpy32

2020-11-01 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:3cea11cd Linux 5.10-rc2 git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=16baaf4650 kernel config: https://syzkaller.appspot.com/x/.config?x=61033507391c77ff dashboard link: https://syz

Re: [PATCH] xfrm/compat: Remove use of kmalloc_track_caller

2020-11-01 Thread Herbert Xu
On Sun, Nov 01, 2020 at 02:08:45PM -0800, Alistair Delva wrote: > The __kmalloc_track_caller symbol is not exported if SLUB/SLOB are > enabled instead of SLAB, which breaks the build on such configs when > CONFIG_XFRM_USER_COMPAT=m. > > ERROR: "__kmalloc_track_caller" [net/xfrm/xfrm_compat.ko] und

Fwd: Problem with r8169 module

2020-11-01 Thread Gilberto Nunes
Hi there I am in trouble when using newer kernels than 5.4.x regarding Realtek NIC r8169 Kernel 5.9.2-050902-lowlatency (from https://kernel.ubuntu.com/~kernel-ppa/mainline/ and also compiled from kernel.org) Generic FE-GE Realtek PHY r8169-101:00: Downshift occurred from negotiated speed 1Gbps

[PATCH] net: can: prevent potential access of uninitialized value in canfd_rcv()

2020-11-01 Thread Anant Thazhemadam
In canfd_rcv(), cfd->len is uninitialized when skb->len = 0, and this uninitialized cfd->len is accessed nonetheless by pr_warn_once(). Fix this uninitialized variable access by checking cfd->len's validity condition (cfd->len > CANFD_MAX_DLEN) separately after the skb->len's condition is checked,

Re: [PATCH net-next] net: add in_softirq() debug checking in napi_consume_skb()

2020-11-01 Thread Yunsheng Lin
On 2020/11/1 6:38, Jakub Kicinski wrote: > On Thu, 29 Oct 2020 19:34:48 +0800 Yunsheng Lin wrote: >> The current semantic for napi_consume_skb() is that caller need >> to provide non-zero budget when calling from NAPI context, and >> breaking this semantic will cause hard to debug problem, because

RE: [PATCH V4 1/6] firmware: imx: always export SCU symbols

2020-11-01 Thread Joakim Zhang
> -Original Message- > From: Shawn Guo > Sent: 2020年11月1日 15:43 > To: Joakim Zhang > Cc: m...@pengutronix.de; robh...@kernel.org; s.ha...@pengutronix.de; > ker...@pengutronix.de; dl-linux-imx ; Ying Liu > ; linux-...@vger.kernel.org; netdev@vger.kernel.org; > linux-ker...@vger.kernel.org

Re: [RFC PATCH 1/6] docs: networking: add the document for DFL Ether Group driver

2020-11-01 Thread Xu Yilun
Hi Andrew: On Mon, Oct 26, 2020 at 08:14:00PM +0100, Andrew Lunn wrote: > > > > > Do you really mean PHY? I actually expect it is PCS? > > > > > > > > For this implementation, yes. > > > > > > Yes, you have a PHY? Or Yes, it is PCS? > > > > Sorry, I mean I have a PHY. > > > > > > > > To me,

[PATCH v3] lan743x: fix for potential NULL pointer dereference with bare card

2020-11-01 Thread Sergej Bauer
This is the 3rd revision of the patch fix for potential null pointer dereference with lan743x card. The simpliest way to reproduce: boot with bare lan743x and issue "ethtool ethN" commant where ethN is the interface with lan743x card. Example: $ sudo ethtool eth7 dmesg: [ 103.510336] BUG: kernel

[PATCH net-next v2] net: phy: realtek: Add support for RTL8221B-CG series

2020-11-01 Thread Willy Liu
Realtek single-port 2.5Gbps Ethernet PHYs are list as below: RTL8226-CG: the 1st generation 2.5Gbps single port PHY RTL8226B-CG/RTL8221B-CG: the 2nd generation 2.5Gbps single port PHY RTL8221B-VB-CG: the 3rd generation 2.5Gbps single port PHY RTL8221B-VM-CG: the 2.5Gbps single port PHY with MACsec

Re: [PATCH net-next] openvswitch: Use IS_ERR instead of IS_ERR_OR_NULL

2020-11-01 Thread Tonghao Zhang
On Sat, Oct 31, 2020 at 2:02 PM YueHaibing wrote: > > Fix smatch warning: > > net/openvswitch/meter.c:427 ovs_meter_cmd_set() warn: passing zero to > 'PTR_ERR' > > dp_meter_create() never returns NULL, use IS_ERR > instead of IS_ERR_OR_NULL to fix this. > > Signed-off-by: YueHaibing Acked-by: To

Re: [PATCH v2] lan743x: Fix for potential null pointer dereference

2020-11-01 Thread Sergej Bauer
On Sunday, November 1, 2020 11:38:20 PM MSK Andrew Lunn wrote: > On Sun, Nov 01, 2020 at 10:54:38PM +0300, Sergej Bauer wrote: > > > > Signed-off-by: Sergej Bauer > > > > > > * I miss a change description here. > > > > The reason for the fix is when the device is down netdev->phydev will be > >

Re: [PATCH net-next] r8169: set IRQF_NO_THREAD if MSI(X) is enabled

2020-11-01 Thread Vladimir Oltean
On Sun, Nov 01, 2020 at 11:30:44PM +0100, Heiner Kallweit wrote: > We had to remove flag IRQF_NO_THREAD because it conflicts with shared > interrupts in case legacy interrupts are used. Following up on the > linked discussion set IRQF_NO_THREAD if MSI or MSI-X is used, because > both guarantee that

Re: [RFC PATCH net-next 7/9] net: dsa: microchip: ksz9477: add hardware time stamping support

2020-11-01 Thread Vladimir Oltean
On Mon, Nov 02, 2020 at 01:41:49AM +0200, Vladimir Oltean wrote: > In principle I don't see any reason why this switch would not be able > to operate as a one-step peer delay BC. What I meant to say was "one-step E2E BC", since I was talking about having to receive both Sync and Delay_Req at the s

Re: [PATCH iproute2-next v2 03/11] lib: utils: Add print_on_off_bool()

2020-11-01 Thread David Ahern
On 10/31/20 3:23 PM, Petr Machata wrote: > > David Ahern writes: > >> On 10/30/20 6:29 AM, Petr Machata wrote: >>> diff --git a/lib/utils.c b/lib/utils.c >>> index 930877ae0f0d..8deec86ecbcd 100644 >>> --- a/lib/utils.c >>> +++ b/lib/utils.c >>> @@ -1763,3 +1763,11 @@ int parse_on_off(const char

Re: [PATCH v2] lan743x: Fix for potential null pointer dereference

2020-11-01 Thread Sergej Bauer
> > Signed-off-by: Sergej Bauer > > * I miss a change description here. The reason for the fix is when the device is down netdev->phydev will be NULL and there is no checking for this situation. So 'ethtool ethN' leads to kernel panic. $ sudo ethtool eth7 [ 103.510336] BUG: kernel NULL point

Re: [PATCH AUTOSEL 5.9 054/147] sfc: add and use efx_tx_send_pending in tx.c

2020-11-01 Thread Sasha Levin
On Tue, Oct 27, 2020 at 01:24:24PM +, Edward Cree wrote: On 26/10/2020 23:47, Sasha Levin wrote: From: Edward Cree [ Upstream commit 1c0544d24927e4fad04f858216b8ea767a3bd123 ] Instead of using efx_tx_queue_partner(), which relies on the assumption that tx_queues_per_channel is 2, efx_tx_

Re: [RFC PATCH net-next 7/9] net: dsa: microchip: ksz9477: add hardware time stamping support

2020-11-01 Thread Vladimir Oltean
On Sun, Nov 01, 2020 at 11:14:24PM +0100, Christian Eggers wrote: > I am not sure whether I understand the question. When the port is in standalone mode, there is no other destination for packets except for the CPU. So if the switch filters out Sync or Delay_Req packets depending on the operating

Re: [PATCH] xfrm/compat: Remove use of kmalloc_track_caller

2020-11-01 Thread Dmitry Safonov
On 11/1/20 10:08 PM, Alistair Delva wrote: > The __kmalloc_track_caller symbol is not exported if SLUB/SLOB are > enabled instead of SLAB, which breaks the build on such configs when > CONFIG_XFRM_USER_COMPAT=m. > > ERROR: "__kmalloc_track_caller" [net/xfrm/xfrm_compat.ko] undefined! > > Other us

[PATCH v2 net-next 1/3] soc/fsl/qbman: Add an argument to signal if NAPI processing is required.

2020-11-01 Thread Sebastian Andrzej Siewior
dpaa_eth_napi_schedule() and caam_qi_napi_schedule() schedule NAPI if invoked from: - Hard interrupt context - Any context which is not serving soft interrupts Any context which is not serving soft interrupts includes hard interrupts so the in_irq() check is redundant. caam_qi_napi_schedule() h

[PATCH v2 net-next 2/3] net: dpaa: Replace in_irq() usage.

2020-11-01 Thread Sebastian Andrzej Siewior
The driver uses in_irq() + in_serving_softirq() magic to decide if NAPI scheduling is required or packet processing. The usage of in_*() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed

[PATCH v2 net-next 0/3] fsl/qbman: in_interrupt() cleanup.

2020-11-01 Thread Sebastian Andrzej Siewior
This is the in_interrupt() clean for FSL DPAA framework and the two users. The `napi' parameter has been renamed to `sched_napi', the other parts are same as in the previous post [0]. [0] https://lkml.kernel.org/r/20201027225454.3492351-1-bige...@linutronix.de Sebastian

[PATCH v2 net-next 3/3] crypto: caam: Replace in_irq() usage.

2020-11-01 Thread Sebastian Andrzej Siewior
The driver uses in_irq() + in_serving_softirq() magic to decide if NAPI scheduling is required or packet processing. The usage of in_*() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed

Re: [PATCH net-next 14/15] net: dpaa: Replace in_irq() usage.

2020-11-01 Thread Sebastian Andrzej Siewior
On 2020-10-31 10:12:15 [-0700], Jakub Kicinski wrote: > Nit: some networking drivers have a bool napi which means "are we > running in napi context", the semantics here feel a little backwards, > at least to me. But if I'm the only one thinking this, so be it. I renamed it to `sched_napi'. Sebast

[PATCH net-next] r8169: set IRQF_NO_THREAD if MSI(X) is enabled

2020-11-01 Thread Heiner Kallweit
We had to remove flag IRQF_NO_THREAD because it conflicts with shared interrupts in case legacy interrupts are used. Following up on the linked discussion set IRQF_NO_THREAD if MSI or MSI-X is used, because both guarantee that interrupt won't be shared. Signed-off-by: Heiner Kallweit Link: https:

[PATCH net-next] r8169: align number of tx descriptors with vendor driver

2020-11-01 Thread Heiner Kallweit
Lowest number of tx descriptors used in the vendor drivers is 256 in r8169. r8101/r8168/r8125 use 1024 what seems to be the hw limit. Stay on the safe side and go with 256, same as number of rx descriptors. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 2 +- 1 fi

Re: [RFC PATCH net-next 7/9] net: dsa: microchip: ksz9477: add hardware time stamping support

2020-11-01 Thread Christian Eggers
On Sunday, 1 November 2020, 12:10:08 CET, Vladimir Oltean wrote: > On Sun, Nov 01, 2020 at 10:35:01AM +0100, Christian Eggers wrote: > > Hi Vladimir, > > > > On Friday, 30 October 2020, 19:24:47 CET, Vladimir Oltean wrote: > > > On Thu, Oct 22, 2020 at 12:17:48PM +0200, Christian Eggers wrote: > >

Re: [PATCH v2] lan743x: Fix for potential null pointer dereference

2020-11-01 Thread Andrew Lunn
On Sun, Nov 01, 2020 at 10:54:38PM +0300, Sergej Bauer wrote: > > > Signed-off-by: Sergej Bauer > > > > * I miss a change description here. > The reason for the fix is when the device is down netdev->phydev will be NULL > and there is no checking for this situation. So 'ethtool ethN' leads to >

[PATCH mlx5-next v1 03/11] net/mlx5_core: Clean driver version and name

2020-11-01 Thread Leon Romanovsky
From: Leon Romanovsky Remove exposed driver version as it was done in other drivers, so module version will work correctly by displaying the kernel version for which it is compiled. And move mlx5_core module name to general include, so auxiliary drivers will be able to use it as a basis for a na

[PATCH mlx5-next v1 07/11] net/mlx5e: Connect ethernet part to auxiliary bus

2020-11-01 Thread Leon Romanovsky
From: Leon Romanovsky Reuse auxiliary bus to perform device management of the ethernet part of the mlx5 driver. Signed-off-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/dev.c | 74 ++ .../net/ethernet/mellanox/mlx5/core/en_main.c | 133 -- .../net/eth

[PATCH mlx5-next v1 02/11] net/mlx5: Properly convey driver version to firmware

2020-11-01 Thread Leon Romanovsky
From: Leon Romanovsky mlx5 firmware expects driver version in specific format X.X.X, so make it always correct and based on real kernel version aligned with the driver. Fixes: 012e50e109fd ("net/mlx5: Set driver version into firmware") Signed-off-by: Leon Romanovsky --- drivers/net/ethernet/me

[PATCH mlx5-next v1 06/11] vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus

2020-11-01 Thread Leon Romanovsky
From: Leon Romanovsky Change module registration logic to use auxiliary bus instead of custom made mlx5 register interface. Signed-off-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/dev.c | 28 ++- drivers/vdpa/mlx5/Makefile| 2 +- drivers/vdpa/mlx5/ne

[PATCH mlx5-next v1 10/11] net/mlx5: Simplify eswitch mode check

2020-11-01 Thread Leon Romanovsky
From: Leon Romanovsky Provide mlx5_core device instead of "priv" pointer while checking eswith mode. Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/counters.c | 7 --- drivers/infiniband/hw/mlx5/ib_rep.c | 5 - drivers/infiniband/hw/mlx5/ib_rep.

[PATCH mlx5-next v1 11/11] RDMA/mlx5: Remove IB representors dead code

2020-11-01 Thread Leon Romanovsky
From: Leon Romanovsky Delete dead code. Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/ib_rep.c | 31 +++-- drivers/infiniband/hw/mlx5/ib_rep.h | 31 - 2 files changed, 7 insertions(+), 55 deletions(-) diff --git a/drivers/inf

[PATCH mlx5-next v1 09/11] net/mlx5: Delete custom device management logic

2020-11-01 Thread Leon Romanovsky
From: Leon Romanovsky After conversion to use auxiliary bus, all custom device management is not needed anymore, delete it. Signed-off-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/dev.c | 288 ++ drivers/net/ethernet/mellanox/mlx5/core/lag.c | 18 -- .../eth

[PATCH mlx5-next v1 08/11] RDMA/mlx5: Convert mlx5_ib to use auxiliary bus

2020-11-01 Thread Leon Romanovsky
From: Leon Romanovsky The conversion to auxiliary bus solves long standing issue with existing mlx5_ib<->mlx5_core coupling. It required to have both modules in initramfs if one of them needed for the boot. Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/ib_rep.c | 77

[PATCH mlx5-next v1 05/11] net/mlx5: Register mlx5 devices to auxiliary virtual bus

2020-11-01 Thread Leon Romanovsky
From: Leon Romanovsky Create auxiliary devices under new virtual bus. This will replace the custom-made mlx5 ->add()/->remove() interfaces and next patches will fill the missing callback and remove the old interface logic. The attachment of auxiliary drivers to the devices is possible in 1-to-1

[PATCH mlx5-next v1 00/11] Convert mlx5 to use auxiliary bus

2020-11-01 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v1: * Renamed _mlx5_rescan_driver to be mlx5_rescan_driver_locked like in other parts of the mlx5 driver. * Renamed MLX5_INTERFACE_PROTOCOL_VDPA to tbe MLX5_INTERFACE_PROTOCOL_VNET as a preparation to coming series from Eli C. * Some small naming renames

[PATCH mlx5-next v1 01/11] net/mlx5: Don't skip vport check

2020-11-01 Thread Leon Romanovsky
From: Leon Romanovsky Users of mlx5_eswitch_get_vport() are required to check return value prior to passing mlx5_vport further. Fix all the places to do not skip that check. Fixes: c7eddc6092b4 ("net/mlx5: E-switch, Move devlink eswitch ports closer to eswitch") Fixes: 5d9986a3947a ("net/mlx5:

[PATCH mlx5-next v1 04/11] vdpa/mlx5: Make hardware definitions visible to all mlx5 devices

2020-11-01 Thread Leon Romanovsky
From: Leon Romanovsky Move mlx5_vdpa IFC header file to the general include folder, so mlx5_core will be able to reuse it to check if VDPA is supported prior to creating an auxiliary device. As part of this move, update the header file name to mlx5 general naming scheme. Reviewed-by: Parav Pand

[PATCH v3 net-next 09/12] net: dsa: tag_brcm: let DSA core deal with TX reallocation

2020-11-01 Thread Vladimir Oltean
Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Cc: Florian Fainelli Signed-off-by: Vladimir Oltean --- Changes in v3: None. Changes in v2: None. net/dsa/tag_brcm.c | 3 --- 1 file chang

[PATCH v3 net-next 06/12] net: dsa: tag_mtk: let DSA core deal with TX reallocation

2020-11-01 Thread Vladimir Oltean
Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Cc: DENG Qingfang Cc: Sean Wang Cc: John Crispin Signed-off-by: Vladimir Oltean --- Changes in v3: None. Changes in v2: None. net/dsa/ta

[PATCH v3 net-next 11/12] net: dsa: tag_gswip: let DSA core deal with TX reallocation

2020-11-01 Thread Vladimir Oltean
Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. This one is interesting, the DSA tag is 8 bytes on RX and 4 bytes on TX. Because DSA is unaware of asymmetrical tag lengths, the overhead/neede

[PATCH v3 net-next 10/12] net: dsa: tag_dsa: let DSA core deal with TX reallocation

2020-11-01 Thread Vladimir Oltean
Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Similar to the EtherType DSA tagger, the old Marvell tagger can transform an 802.1Q header if present into a DSA tag, so there is no headroom r

[PATCH v3 net-next 08/12] net: dsa: tag_edsa: let DSA core deal with TX reallocation

2020-11-01 Thread Vladimir Oltean
Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Note that the VLAN code path needs a smaller extra headroom than the regular EtherType DSA path. That isn't a problem, because this tagger decl

[PATCH v3 net-next 00/12] Generic TX reallocation for DSA

2020-11-01 Thread Vladimir Oltean
Christian has reported buggy usage of skb_put() in tag_ksz.c, which is only triggerable in real life using his not-yet-published patches for IEEE 1588 timestamping on Micrel KSZ switches. The concrete problem there is that the driver can end up calling skb_put() and exceed the end of the skb data

[PATCH v3 net-next 03/12] net: dsa: trailer: don't allocate additional memory for padding/tagging

2020-11-01 Thread Vladimir Oltean
From: Christian Eggers The caller (dsa_slave_xmit) guarantees that the frame length is at least ETH_ZLEN and that enough memory for tail tagging is available. Signed-off-by: Christian Eggers Signed-off-by: Vladimir Oltean --- Changes in v3: None. Changes in v2: None. net/dsa/tag_trailer.c |

[PATCH v3 net-next 02/12] net: dsa: tag_ksz: don't allocate additional memory for padding/tagging

2020-11-01 Thread Vladimir Oltean
From: Christian Eggers The caller (dsa_slave_xmit) guarantees that the frame length is at least ETH_ZLEN and that enough memory for tail tagging is available. Signed-off-by: Christian Eggers Signed-off-by: Vladimir Oltean --- Changes in v3: None. Changes in v2: None. net/dsa/tag_ksz.c | 73

[PATCH v3 net-next 05/12] net: dsa: tag_ocelot: let DSA core deal with TX reallocation

2020-11-01 Thread Vladimir Oltean
Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Signed-off-by: Vladimir Oltean --- Changes in v3: None. Changes in v2: None. net/dsa/tag_ocelot.c | 7 --- 1 file changed, 7 deletions(

[PATCH v3 net-next 12/12] net: dsa: tag_ar9331: let DSA core deal with TX reallocation

2020-11-01 Thread Vladimir Oltean
Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Cc: Per Forlin Cc: Oleksij Rempel Signed-off-by: Vladimir Oltean Tested-by: Oleksij Rempel --- Changes in v3: None. Changes in v2: None.

[PATCH v3 net-next 01/12] net: dsa: implement a central TX reallocation procedure

2020-11-01 Thread Vladimir Oltean
At the moment, taggers are left with the task of ensuring that the skb headers are writable (which they aren't, if the frames were cloned for TX timestamping, for flooding by the bridge, etc), and that there is enough space in the skb data area for the DSA tag to be pushed. Moreover, the life of t

[PATCH v3 net-next 04/12] net: dsa: tag_qca: let DSA core deal with TX reallocation

2020-11-01 Thread Vladimir Oltean
Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Cc: John Crispin Cc: Alexander Lobakin Signed-off-by: Vladimir Oltean --- Changes in v3: None. Changes in v2: None. net/dsa/tag_qca.c | 3

[PATCH v3 net-next 07/12] net: dsa: tag_lan9303: let DSA core deal with TX reallocation

2020-11-01 Thread Vladimir Oltean
Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Signed-off-by: Vladimir Oltean --- Changes in v3: None. Changes in v2: None. net/dsa/tag_lan9303.c | 9 - 1 file changed, 9 deletio

Re: [PATCH RFC leds + net-next 2/7] leds: trigger: netdev: simplify the driver by using bit field members

2020-11-01 Thread Jacek Anaszewski
On 10/31/20 12:45 AM, Marek Behún wrote: On Fri, 30 Oct 2020 23:37:52 +0100 Jacek Anaszewski wrote: Hi Marek, Bitops are guaranteed to be atomic and this was done for a reason. Hmm okay... Sooo, netdev_trig_work cannot be executed at the same time as the link/linkup/rx/tx changing stuff fro

Re: EXPORT_SYMBOL or EXPORT_SYMBOL_GPL?

2020-11-01 Thread Andrew Lunn
On Sun, Nov 01, 2020 at 01:43:34PM +0100, Heiner Kallweit wrote: > I was wondering whether we have any policy on using EXPORT_SYMBOL or > EXPORT_SYMBOL_GPL for newly exported functions. I've seen both options > being used. Hi Heiner In the case of dev_get_tstats64() it is a trivial function to op

Re: [PATCH RFC net-next 00/13] RX filtering for DSA switches

2020-11-01 Thread Vladimir Oltean
On Sun, Nov 01, 2020 at 05:39:06PM +0200, Ido Schimmel wrote: > You also wondered which indication you would get down to the driver that > eventually needs to program the hardware to get the packets: > > "Who will notify me of these multicast addresses if I'm bridged and I > need to terminate L2 o

Re: [PATCH net-next] net: 9p: Fix kerneldoc warnings of missing parameters etc

2020-11-01 Thread Dominique Martinet
Andrew Lunn wrote on Sun, Nov 01, 2020: > > > Signed-off-by: Andrew Lunn Acked-by: Dominique Martinet > > > > Thanks, LGTM I'll take this for next cycle unless someone is grabbing > > these > > I hope to turn on W=1 by default soon in most of /net. That patch is > likely to go to net-next. T

[PATCH] tipc: remove unneeded semicolon

2020-11-01 Thread trix
From: Tom Rix A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix --- net/tipc/link.c | 2 +- net/tipc/node.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/tipc/link.c b/net/tipc/link.c index 06b880da2a8e..97b1c6bd45dc 100644 --- a/net/tipc/l

[PATCH] ethtool: remove unneeded semicolon

2020-11-01 Thread trix
From: Tom Rix A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix --- net/ethtool/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index ec2cd7aab5ad..771688e1b0da 100644 --- a/net/ethtool/ioctl.c +++ b

Re: [PATCH net-next] net: 9p: Fix kerneldoc warnings of missing parameters etc

2020-11-01 Thread Andrew Lunn
On Sat, Oct 31, 2020 at 09:58:13PM +0100, Dominique Martinet wrote: > Andrew Lunn wrote on Sat, Oct 31, 2020: > > net/9p/client.c:420: warning: Function parameter or member 'c' not > > described in 'p9_client_cb' > > net/9p/client.c:420: warning: Function parameter or member 'req' not > > describ

  1   2   >