Re: [PATCH] net: qrtr: ns: Protect radix_tree_deref_slot() using rcu read locks

2020-10-02 Thread Manivannan Sadhasivam
Hi Doug, On Thu, Oct 01, 2020 at 03:53:12PM -0700, Doug Anderson wrote: > Hi, > > On Mon, Sep 28, 2020 at 4:15 PM David Miller wrote: > > > > From: Manivannan Sadhasivam > > Date: Sat, 26 Sep 2020 22:26:25 +0530 > > > > > The rcu read locks are needed to avoid potential race condition while > >

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

2020-10-02 Thread Geert Uytterhoeven
Hi Stephen, On Fri, Oct 2, 2020 at 5:02 AM Stephen Rothwell wrote: > Today's linux-next merge of the net-next tree got a conflict in: > > Documentation/devicetree/bindings/net/renesas,ravb.txt > > between commit: > > 307eea32b202 ("dt-bindings: net: renesas,ravb: Add support for r8a774e1 > S

Re: [PATCH] net/smscx5xx: change to of_get_mac_address() eth_platform_get_mac_address()

2020-10-02 Thread Lukasz Stelmach
It was <2020-10-01 czw 19:45>, when Florian Fainelli wrote: > On 10/1/2020 7:05 PM, David Miller wrote: >> From: Łukasz Stelmach >> Date: Wed, 30 Sep 2020 16:25:25 +0200 >> >>> Use more generic eth_platform_get_mac_address() which can get a MAC >>> address from other than DT platform specific sour

[PATCH] netlink: fix policy dump leak

2020-10-02 Thread Johannes Berg
From: Johannes Berg If userspace doesn't complete the policy dump, we leak the allocated state. Fix this. Fixes: d07dcf9aadd6 ("netlink: add infrastructure to expose policies to userspace") Signed-off-by: Johannes Berg --- Found this while looking at Jakub's series and the complete op dump tha

[PATCH v2] net: usb: pegasus: Proper error handing when setting pegasus' MAC address

2020-10-02 Thread Petko Manolov
v2: If reading the MAC address from eeprom fail don't throw an error, use randomly generated MAC instead. Either way the adapter will soldier on and the return type of set_ethernet_addr() can be reverted to void. v1: Fix a bug in set_ethernet_addr() which does not take into account possible err

[PATCH libbpf] libbpf: check if pin_path was set even map fd exist

2020-10-02 Thread Hangbin Liu
Say a user reuse map fd after creating a map manually and set the pin_path, then load the object via libbpf. In libbpf bpf_object__create_maps(), bpf_object__reuse_map() will return 0 if there is no pinned map in map->pin_path. Then after checking if map fd exist, we should also check if pin_path

Re: [PATCH] net: usb: pegasus: Proper error handing when setting pegasus' MAC address

2020-10-02 Thread Petko Manolov
On 20-10-01 18:42:18, David Miller wrote: > From: Petko Manolov > Date: Tue, 29 Sep 2020 14:40:39 +0300 > > > -static void set_ethernet_addr(pegasus_t *pegasus) > > +static int set_ethernet_addr(pegasus_t *pegasus) > > { > > You change this to return an 'int' but no callers were updated to chec

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

2020-10-02 Thread Kurt Kanzenbach
Hi Vladimir, On Tue Sep 08 2020, Vladimir Oltean wrote: > On Tue, Sep 08, 2020 at 12:14:12PM +0200, Kurt Kanzenbach wrote: >> On Mon Sep 07 2020, Vladimir Oltean wrote: >> > New drivers always seem to omit setting this flag, for some reason. >> >> Yes, because it's not well documented, or is it? B

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

2020-10-02 Thread Vladimir Oltean
On Fri, Oct 02, 2020 at 10:06:28AM +0200, Kurt Kanzenbach wrote: > Hi Vladimir, > > On Tue Sep 08 2020, Vladimir Oltean wrote: > > On Tue, Sep 08, 2020 at 12:14:12PM +0200, Kurt Kanzenbach wrote: > >> On Mon Sep 07 2020, Vladimir Oltean wrote: > >> > New drivers always seem to omit setting this fl

Re: [PATCH 0/6] Fix new html build warnings from next-20201001

2020-10-02 Thread Marc Zyngier
On Fri, 2 Oct 2020 07:49:44 +0200, Mauro Carvalho Chehab wrote: > There are some new warnings when building the documentation from > yesterday's linux next. This small series fix them. > > - patch 1 documents two new kernel-doc parameters on a net core file. > I used the commit log in order to h

[PATCH v10 0/7] Introduce sendpage_ok() to detect misused sendpage in network related drivers

2020-10-02 Thread Coly Li
As Sagi Grimberg suggested, the original fix is refind to a more common inline routine: static inline bool sendpage_ok(struct page *page) { return (!PageSlab(page) && page_count(page) >= 1); } If sendpage_ok() returns true, the checking page can be handled by the concrete zero-

[PATCH v10 2/7] net: add WARN_ONCE in kernel_sendpage() for improper zero-copy send

2020-10-02 Thread Coly Li
If a page sent into kernel_sendpage() is a slab page or it doesn't have ref_count, this page is improper to send by the zero copy sendpage() method. Otherwise such page might be unexpected released in network code path and causes impredictable panic due to kernel memory management data structure co

[PATCH v10 1/7] net: introduce helper sendpage_ok() in include/linux/net.h

2020-10-02 Thread Coly Li
The original problem was from nvme-over-tcp code, who mistakenly uses kernel_sendpage() to send pages allocated by __get_free_pages() without __GFP_COMP flag. Such pages don't have refcount (page_count is 0) on tail pages, sending them by kernel_sendpage() may trigger a kernel panic from a corrupte

[PATCH v10 3/7] nvme-tcp: check page by sendpage_ok() before calling kernel_sendpage()

2020-10-02 Thread Coly Li
Currently nvme_tcp_try_send_data() doesn't use kernel_sendpage() to send slab pages. But for pages allocated by __get_free_pages() without __GFP_COMP, which also have refcount as 0, they are still sent by kernel_sendpage() to remote end, this is problematic. The new introduced helper sendpage_ok()

[PATCH v10 6/7] scsi: libiscsi: use sendpage_ok() in iscsi_tcp_segment_map()

2020-10-02 Thread Coly Li
In iscsci driver, iscsi_tcp_segment_map() uses the following code to check whether the page should or not be handled by sendpage: if (!recv && page_count(sg_page(sg)) >= 1 && !PageSlab(sg_page(sg))) The "page_count(sg_page(sg)) >= 1 && !PageSlab(sg_page(sg)" part is to make sure the page can b

[PATCH v10 5/7] drbd: code cleanup by using sendpage_ok() to check page for kernel_sendpage()

2020-10-02 Thread Coly Li
In _drbd_send_page() a page is checked by following code before sending it by kernel_sendpage(), (page_count(page) < 1) || PageSlab(page) If the check is true, this page won't be send by kernel_sendpage() and handled by sock_no_sendpage(). This kind of check is exactly what macro sendpage_

[PATCH v10 4/7] tcp: use sendpage_ok() to detect misused .sendpage

2020-10-02 Thread Coly Li
commit a10674bf2406 ("tcp: detecting the misuse of .sendpage for Slab objects") adds the checks for Slab pages, but the pages don't have page_count are still missing from the check. Network layer's sendpage method is not designed to send page_count 0 pages neither, therefore both PageSlab() and pa

[PATCH v10 7/7] libceph: use sendpage_ok() in ceph_tcp_sendpage()

2020-10-02 Thread Coly Li
In libceph, ceph_tcp_sendpage() does the following checks before handle the page by network layer's zero copy sendpage method, if (page_count(page) >= 1 && !PageSlab(page)) This check is exactly what sendpage_ok() does. This patch replace the open coded checks by sendpage_ok() as a code cl

Re: [PATCH v9 0/7] Introduce sendpage_ok() to detect misused sendpage in network related drivers

2020-10-02 Thread Coly Li
On 2020/10/2 03:48, David Miller wrote: > From: David Miller > Date: Thu, 01 Oct 2020 12:43:45 -0700 (PDT) > >> Series applied and queued up for -stable, thank you. > > Actually, this doesn't even build: > > In file included from ./arch/x86/include/asm/bug.h:93, > from ./includ

Re: [Bug 209423] WARN_ON_ONCE() at rtl8169_tso_csum_v2()

2020-10-02 Thread Eric Dumazet
On 10/2/20 10:26 AM, Eric Dumazet wrote: > On Thu, Oct 1, 2020 at 10:34 PM Heiner Kallweit wrote: >> >> I have a problem with the following code in ndo_start_xmit() of >> the r8169 driver. A user reported the WARN being triggered due >> to gso_size > 0 and gso_type = 0. The chip supports TSO(6)

Re: [PATCH net-next 1/4] net: dsa: Call dsa_untag_bridge_pvid() from dsa_switch_rcv()

2020-10-02 Thread Vladimir Oltean
On Thu, Oct 01, 2020 at 07:42:12PM -0700, Florian Fainelli wrote: > When a DSA switch driver needs to call dsa_untag_bridge_pvid(), it can > set dsa_switch::untag_brige_pvid to indicate this is necessary. > > This is a pre-requisite to making sure that we are always calling > dsa_untag_bridge_pvid

Re: [PATCH net-next 2/4] net: dsa: b53: Set untag_bridge_pvid

2020-10-02 Thread Vladimir Oltean
On Thu, Oct 01, 2020 at 07:42:13PM -0700, Florian Fainelli wrote: > Indicate to the DSA receive path that we need to untage the bridge PVID, > this allows us to remove the dsa_untag_bridge_pvid() calls from > net/dsa/tag_brcm.c. > > Signed-off-by: Florian Fainelli > --- Reviewed-by: Vladimir Olt

Re: [PATCH net-next 3/4] net: dsa: Obtain VLAN protocol from skb->protocol

2020-10-02 Thread Vladimir Oltean
On Thu, Oct 01, 2020 at 07:42:14PM -0700, Florian Fainelli wrote: > Now that dsa_untag_bridge_pvid() is called after eth_type_trans() we are > guaranteed that skb->protocol will be set to a correct value, thus > allowing us to avoid calling vlan_eth_hdr(). > > Signed-off-by: Florian Fainelli > --

Re: [PATCH net-next 4/4] net: dsa: Utilize __vlan_find_dev_deep_rcu()

2020-10-02 Thread Vladimir Oltean
On Thu, Oct 01, 2020 at 07:42:15PM -0700, Florian Fainelli wrote: > Now that we are guaranteed that dsa_untag_bridge_pvid() is called after > eth_type_trans() we can utilize __vlan_find_dev_deep_rcu() which will > take care of finding an 802.1Q upper on top of a bridge master. > > A common use cas

Why ping latency is smaller with shorter send interval?

2020-10-02 Thread 叶小龙
Hi, net experts, Hope this is the right place to ask the question :) Recently I've tried to measure the network latency between two machines by using ping, one interesting observation I found is that ping latency will be smaller if I use a shorter interval with -i option. For example, when I use

Re: [PATCH v2 00/29] [Set 1,2,3] Rid W=1 warnings in Wireless

2020-10-02 Thread Lee Jones
On Thu, 10 Sep 2020, Lee Jones wrote: > This is a rebased/re-worked set of patches which have been > previously posted to the mailing list(s). > > This set is part of a larger effort attempting to clean-up W=1 > kernel builds, which are currently overwhelmingly riddled with > niggly little warnin

Re: [PATCH net 08/12] ipv6: advertise IFLA_LINK_NETNSID when dumping ipv6 addresses

2020-10-02 Thread Sabrina Dubroca
2020-10-01, 17:58:40 +0200, Nicolas Dichtel wrote: > Le 01/10/2020 à 09:59, Sabrina Dubroca a écrit : > > Currently, we're not advertising link-netnsid when dumping IPv6 > > addresses, so the "ip -6 addr" command will not correctly interpret > > the value of the IFLA_LINK attribute. > > > > For ex

Re: [PATCH net-next v2 1/2] Makefile.extrawarn: Add symbol for W=1 warnings for today

2020-10-02 Thread kernel test robot
Hi Andrew, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Andrew-Lunn/driver-net-ethernet-W-1-by-default/20201001-091431 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git e1

Re: [PATCH net 00/12] net: iflink and link-netnsid fixes

2020-10-02 Thread Sabrina Dubroca
2020-10-01, 14:25:38 -0700, Stephen Hemminger wrote: > On Thu, 1 Oct 2020 09:59:24 +0200 > Sabrina Dubroca wrote: > > > In a lot of places, we use this kind of comparison to detect if a > > device has a lower link: > > > > dev->ifindex != dev_get_iflink(dev) > > > Since this is a common ope

[PATCH 1/5] netlink: simplify netlink_policy_dump_start() prototype

2020-10-02 Thread Johannes Berg
From: Johannes Berg Since moving the call to this to a dump start() handler we no longer need this to deal with being called after having been called already. Since that is the preferred way of doing things anyway, remove the code necessary for that and simply return the pointer (or an ERR_PTR())

[PATCH 4/5] genetlink: factor skb preparation out of ctrl_dumppolicy()

2020-10-02 Thread Johannes Berg
From: Johannes Berg We'll need this later for the per-op policy index dump. Signed-off-by: Johannes Berg --- net/netlink/genetlink.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index 4249d

[PATCH 2/5] netlink: compare policy more accurately

2020-10-02 Thread Johannes Berg
From: Johannes Berg The maxtype is really an integral part of the policy, and while we haven't gotten into a situation yet where this happens, it seems that some developer might eventually have two places pointing to identical policies, with different maxattr to exclude some attrs in one of the p

[PATCH 3/5] netlink: rework policy dump to support multiple policies

2020-10-02 Thread Johannes Berg
From: Johannes Berg Rework the policy dump code a bit to support adding multiple policies to a single dump, in order to e.g. support per-op policies in generic netlink. Signed-off-by: Johannes Berg --- include/net/netlink.h | 62 +++-- net/netlink/genetlin

[PATCH 0/5] genetlink: complete policy dumping

2020-10-02 Thread Johannes Berg
Hi, So ... Jakub added per-op policy retrieval, so you could retrieve the policy for a single op. This then adds - as discussed - support for dumping *everything*, which has basically first an [op] -> [policy-idx] mapping, followed by all the policies. When a single op is requested, you get a con

[PATCH 5/5] genetlink: properly support per-op policy dumping

2020-10-02 Thread Johannes Berg
From: Johannes Berg Add support for per-op policy dumping. The data is pretty much as before, except that now the assumption that the policy with index 0 is "the" policy no longer holds - you now need to look at the new CTRL_ATTR_OP_POLICY attribute which is a nested attr containing the cmd -> po

Re: Why ping latency is smaller with shorter send interval?

2020-10-02 Thread Eric Dumazet
On 10/2/20 10:51 AM, 叶小龙 wrote: > Hi, net experts, > > Hope this is the right place to ask the question :) > > Recently I've tried to measure the network latency between two > machines by using ping, one interesting observation I found is that > ping latency will be smaller if I use a shorter

[iproute2] ipntable: add missing ndts_table_fulls ntable stat

2020-10-02 Thread Eyal Birger
Used for tracking neighbour table overflows. Signed-off-by: Eyal Birger --- ip/ipntable.c | 5 + 1 file changed, 5 insertions(+) diff --git a/ip/ipntable.c b/ip/ipntable.c index ddee4905..b5b06a3b 100644 --- a/ip/ipntable.c +++ b/ip/ipntable.c @@ -517,6 +517,11 @@ static void print_ndtstats

Re: [PATCH net-next 0/8] net: ethernet: ti: am65-cpsw: add multi port support in mac-only mode

2020-10-02 Thread Grygorii Strashko
On 02/10/2020 02:08, Jakub Kicinski wrote: On Thu, 1 Oct 2020 13:52:50 +0300 Grygorii Strashko wrote: This series adds multi-port support in mac-only mode (multi MAC mode) to TI AM65x CPSW driver in preparation for enabling support for multi-port devices, like Main CPSW0 on K3 J721E SoC or fu

Re: [PATCH net-next v3 4/4] gve: Add support for raw addressing in the tx path

2020-10-02 Thread kernel test robot
Hi David, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/David-Awogbemila/GVE-Raw-Addressing/20200924-091514 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 68d4fd30c83b1b

Re: [PATCH bpf-next v2 2/4] selftests: bpf: Add helper to compare socket cookies

2020-10-02 Thread Lorenz Bauer
On Thu, 1 Oct 2020 at 18:11, Alexei Starovoitov wrote: > > > > I think this might be the same problem I fixed for libbpf with [0]. > > Turns out, GCC explicitly calls out (somewhere in their docs) that > > uninitialized variable warnings work only when compiled in optimized > > mode, because some

pull-request: mac80211-next 2020-10-02

2020-10-02 Thread Johannes Berg
Hi Dave, Here's a - probably final - set of patches for net-next. Really the big thing is more complete S1G support, along with a small list of other things, see the tag message. Please pull and let me know if there's any problem. Thanks, johannes The following changes since commit 0675c285ea

Re: Why ping latency is smaller with shorter send interval?

2020-10-02 Thread Willy Tarreau
On Fri, Oct 02, 2020 at 11:26:00AM +0200, Eric Dumazet wrote: > 2) Idle cpus can be put in a power conserving state. > It takes time to exit from these states, as you noticed. > These delays can typically be around 50 usec, or more. This is often the case in my experience. I'm even used to sta

[PATCH] genl: ctrl: print op -> policy idx mapping

2020-10-02 Thread Johannes Berg
Newer kernels can dump per-op policies, so print out the new mapping attribute to indicate which op has which policy. Signed-off-by: Johannes Berg --- genl/ctrl.c| 10 ++ include/uapi/linux/genetlink.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/genl/ctrl

[RFC] Status of orinoco_usb

2020-10-02 Thread Sebastian Andrzej Siewior
I was trying to get rid of the in in_softirq() in ezusb_req_ctx_wait() within the orinoco usb driver, drivers/net/wireless/intersil/orinoco/orinoco_usb.c. A small snippet: | static void ezusb_req_ctx_wait(struct ezusb_priv *upriv, |struct request_context *ctx) … |

[PATCH net] tcp: fix syn cookied MPTCP request socket leak

2020-10-02 Thread Paolo Abeni
If a syn-cookies request socket don't pass MPTCP-level validation done in syn_recv_sock(), we need to release it immediately, or it will be leaked. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/89 Fixes: 9466a1ccebbe ("mptcp: enable JOIN requests even if cookies are in use") Repor

Re: [net-next PATCH v1 3/7] net: phy: Introduce fwnode_get_phy_id()

2020-10-02 Thread Grant Likely
On 01/10/2020 05:00, Calvin Johnson wrote: On Wed, Sep 30, 2020 at 08:19:02PM +0200, Andrew Lunn wrote: On Wed, Sep 30, 2020 at 07:07:25PM +0100, Russell King - ARM Linux admin wrote: On Wed, Sep 30, 2020 at 06:34:40PM +0200, Andrew Lunn wrote: @@ -2866,7 +2888,15 @@ EXPORT_SYMBOL_GPL(devic

Re: [PATCH 7/7] TC-ETF support PTP clocks

2020-10-02 Thread Geva, Erez
On 02/10/2020 02:33, Thomas Gleixner wrote: > On Thu, Oct 01 2020 at 22:51, Erez Geva wrote: > >>- Add support for using a POSIX dynamic clock with >> Traffic control Earliest TxTime First (ETF) Qdisc. > > > >> --- a/include/uapi/linux/net_tstamp.h >> +++ b/include/uapi/linux/net_ts

Re: [net-next PATCH v1 3/7] net: phy: Introduce fwnode_get_phy_id()

2020-10-02 Thread Grant Likely
On 30/09/2020 17:04, Calvin Johnson wrote: Extract phy_id from compatible string. This will be used by fwnode_mdiobus_register_phy() to create phy device using the phy_id. Signed-off-by: Calvin Johnson --- drivers/net/phy/phy_device.c | 32 +++- include/linux/

Re: [PATCH net-next v2 1/2] Makefile.extrawarn: Add symbol for W=1 warnings for today

2020-10-02 Thread kernel test robot
Hi Andrew, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Andrew-Lunn/driver-net-ethernet-W-1-by-default/20201001-091431 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git e1

Re: [net-next PATCH v1 1/7] Documentation: ACPI: DSD: Document MDIO PHY

2020-10-02 Thread Grant Likely
On 30/09/2020 17:37, Rafael J. Wysocki wrote: On Wed, Sep 30, 2020 at 6:05 PM Calvin Johnson wrote: Introduce ACPI mechanism to get PHYs registered on a MDIO bus and provide them to be connected to MAC. Describe properties "phy-handle" and "phy-mode". Signed-off-by: Calvin Johnson ---

Re: [Bug 209423] WARN_ON_ONCE() at rtl8169_tso_csum_v2()

2020-10-02 Thread Heiner Kallweit
On 02.10.2020 10:46, Eric Dumazet wrote: > On Fri, Oct 2, 2020 at 10:32 AM Eric Dumazet wrote: >> >> >> >> On 10/2/20 10:26 AM, Eric Dumazet wrote: >>> On Thu, Oct 1, 2020 at 10:34 PM Heiner Kallweit >>> wrote: I have a problem with the following code in ndo_start_xmit() of the r8

Re: [net-next PATCH v1 6/7] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver

2020-10-02 Thread Grant Likely
On 30/09/2020 17:04, Calvin Johnson wrote: Modify dpaa2_mac_connect() to support ACPI along with DT. Modify dpaa2_mac_get_node() to get the dpmac fwnode from either DT or ACPI. Replace of_get_phy_mode with fwnode_get_phy_mode to get phy-mode for a dpmac_node. Use helper function phylink_fwno

Re: [PATCH v2] net: usb: rtl8150: prevent set_ethernet_addr from setting uninit address

2020-10-02 Thread Anant Thazhemadam
On 02/10/20 7:45 am, David Miller wrote: > From: Anant Thazhemadam > Date: Thu, 1 Oct 2020 13:02:20 +0530 > >> When get_registers() fails (which happens when usb_control_msg() fails) >> in set_ethernet_addr(), the uninitialized value of node_id gets copied >> as the address. >> >> Checking for

Re: [RFC] Status of orinoco_usb

2020-10-02 Thread Greg Kroah-Hartman
On Fri, Oct 02, 2020 at 12:35:17PM +0200, Sebastian Andrzej Siewior wrote: > I was trying to get rid of the in in_softirq() in ezusb_req_ctx_wait() > within the orinoco usb driver, > drivers/net/wireless/intersil/orinoco/orinoco_usb.c. A small snippet: > > | static void ezusb_req_ctx_wait(struct e

[PATCH v2] net: hso: do not call unregister if not registered

2020-10-02 Thread Greg KH
From: Tuba Yavuz On an error path inside the hso_create_net_device function of the hso driver, hso_free_net_device gets called. This causes a use-after-free and a double-free if register_netdev has not been called yet as hso_free_net_device calls unregister_netdev regardless. I think the driver s

Re: [RFC] Status of orinoco_usb

2020-10-02 Thread Sebastian Andrzej Siewior
On 2020-10-02 13:37:25 [+0200], Greg Kroah-Hartman wrote: > > Is it possible to end up here in softirq context or is this a relic? > > I think it's a relic of where USB host controllers completed their urbs > in hard-irq mode. The BH/tasklet change is a pretty recent change. But the BH thingy fo

Re: [PATCH v2] net: usb: rtl8150: prevent set_ethernet_addr from setting uninit address

2020-10-02 Thread Greg KH
On Fri, Oct 02, 2020 at 05:04:13PM +0530, Anant Thazhemadam wrote: > > On 02/10/20 7:45 am, David Miller wrote: > > From: Anant Thazhemadam > > Date: Thu, 1 Oct 2020 13:02:20 +0530 > > > >> When get_registers() fails (which happens when usb_control_msg() fails) > >> in set_ethernet_addr(), the u

Re: [PATCH libbpf] libbpf: check if pin_path was set even map fd exist

2020-10-02 Thread Maciej Fijalkowski
On Fri, Oct 02, 2020 at 03:57:50PM +0800, Hangbin Liu wrote: > Say a user reuse map fd after creating a map manually and set the > pin_path, then load the object via libbpf. > > In libbpf bpf_object__create_maps(), bpf_object__reuse_map() will > return 0 if there is no pinned map in map->pin_path.

Issue of metrics for multiple uncore PMUs (was Re: [RFC PATCH v2 23/23] perf metricgroup: remove duped metric group events)

2020-10-02 Thread John Garry
On 07/05/2020 15:08, Ian Rogers wrote: Hi Ian, I was wondering if you ever tested commit 2440689d62e9 ("perf metricgroup: Remove duped metric group events") for when we have a metric which aliases multiple instances of the same uncore PMU in the system? I have been rebasing some of my arm64

[PATCH net-next 3/9] net: mscc: ocelot: create TCAM skeleton from tc filter chains

2020-10-02 Thread Vladimir Oltean
For Ocelot switches, there are 2 ingress pipelines for flow offload rules: VCAP IS1 (Ingress Classification) and IS2 (Security Enforcement). IS1 and IS2 support different sets of actions. The pipeline order for a packet on ingress is: Basic classification -> VCAP IS1 -> VCAP IS2 Furthermore, IS1

[PATCH net-next 0/9] Offload tc-flower to mscc_ocelot switch using VCAP chains

2020-10-02 Thread Vladimir Oltean
The purpose of this patch is to add more comprehensive support for flow offloading in the mscc_ocelot library and switch drivers. The design (with chains) is the result of this discussion: https://lkml.org/lkml/2020/6/2/203 I have tested it on Seville VSC9953 and Felix VSC9959, but it should also

[PATCH net-next 2/9] net: mscc: ocelot: introduce conversion helpers between port and netdev

2020-10-02 Thread Vladimir Oltean
Since the mscc_ocelot_switch_lib is common between a pure switchdev and a DSA driver, the procedure of retrieving a net_device for a certain port index differs, as those are registered by their individual front-ends. Up to now that has been dealt with by always passing the port index to the switch

[PATCH net-next 4/9] net: mscc: ocelot: offload ingress skbedit and vlan actions to VCAP IS1

2020-10-02 Thread Vladimir Oltean
From: Xiaoliang Yang VCAP IS1 is a VCAP module which can filter on the most common L2/L3/L4 Ethernet keys, and modify the results of the basic QoS classification and VLAN classification based on those flow keys. There are 3 VCAP IS1 lookups, mapped over chains 1, 11000 and 12000. Currently t

[PATCH net-next 8/9] net: mscc: ocelot: offload redirect action to VCAP IS2

2020-10-02 Thread Vladimir Oltean
Via the OCELOT_MASK_MODE_REDIRECT flag put in the IS2 action vector, it is possible to replace previous forwarding decisions with the port mask installed in this rule. I have studied Table 54 "MASK_MODE and PORT_MASK Combinations" from the VSC7514 documentation and it appears to behave sanely when

[PATCH net-next 1/9] net: mscc: ocelot: offload multiple tc-flower actions in same rule

2020-10-02 Thread Vladimir Oltean
At this stage, the tc-flower offload of mscc_ocelot can only delegate rules to the VCAP IS2 security enforcement block. These rules have, in hardware, separate bits for policing and for overriding the destination port mask and/or copying to the CPU. So it makes sense that we attempt to expose some

[PATCH net-next 5/9] net: mscc: ocelot: offload egress VLAN rewriting to VCAP ES0

2020-10-02 Thread Vladimir Oltean
From: Xiaoliang Yang VCAP ES0 is an egress VCAP operating on all outgoing frames. This patch added ES0 driver to support vlan push action of tc filter. Usage: tc filter add dev swp1 egress protocol 802.1Q flower indev swp0 skip_sw \ vlan_id 1 vlan_prio 1 action vlan push id 2 priority 2

[PATCH net-next 6/9] net: mscc: ocelot: only install TCAM entries into a specific lookup and PAG

2020-10-02 Thread Vladimir Oltean
We were installing TCAM rules with the LOOKUP field as unmasked, meaning that all entries were matching on all lookups. Now that lookups are exposed as individual chains, let's make the LOOKUP explicit when offloading TCAM entries. Signed-off-by: Vladimir Oltean --- Changes since RFC: None. dri

[PATCH net-next 9/9] selftests: ocelot: add some example VCAP IS1, IS2 and ES0 tc offloads

2020-10-02 Thread Vladimir Oltean
Provide an example script which can be used as a skeleton for offloading TCAM rules in the Ocelot switches. Not all actions are demoed, mostly because of difficulty to automate this from a single board. For example, policing. We can set up an iperf3 UDP server and client and measure throughput at

[PATCH net-next 7/9] net: mscc: ocelot: relax ocelot_exclusive_mac_etype_filter_rules()

2020-10-02 Thread Vladimir Oltean
The issue which led to the introduction of this check was that MAC_ETYPE rules, such as filters on dst_mac and src_mac, would only match non-IP frames. There is a knob in VCAP_S2_CFG which forces all IP frames to be treated as non-IP, which is what we're currently doing if the user requested a dst_

Re: [PATCH v2] net: usb: rtl8150: prevent set_ethernet_addr from setting uninit address

2020-10-02 Thread Anant Thazhemadam
On 02-10-2020 17:24, Greg KH wrote: > On Fri, Oct 02, 2020 at 05:04:13PM +0530, Anant Thazhemadam wrote: >> On 02/10/20 7:45 am, David Miller wrote: >>> From: Anant Thazhemadam >>> Date: Thu, 1 Oct 2020 13:02:20 +0530 >>> When get_registers() fails (which happens when usb_control_msg() fai

Re: [RFC] Status of orinoco_usb

2020-10-02 Thread Greg Kroah-Hartman
On Fri, Oct 02, 2020 at 01:53:58PM +0200, Sebastian Andrzej Siewior wrote: > On 2020-10-02 13:37:25 [+0200], Greg Kroah-Hartman wrote: > > > Is it possible to end up here in softirq context or is this a relic? > > > > I think it's a relic of where USB host controllers completed their urbs > > in h

Re: [PATCH net-next] dt-bindings: net: dsa: b53: Add missing reg property to example

2020-10-02 Thread Andrew Lunn
On Fri, Oct 02, 2020 at 08:20:51AM +0200, Kurt Kanzenbach wrote: > The switch has a certain MDIO address and this needs to be specified using the > reg property. Add it to the example. > > Signed-off-by: Kurt Kanzenbach Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next v2 1/2] Makefile.extrawarn: Add symbol for W=1 warnings for today

2020-10-02 Thread Arnd Bergmann
On Fri, Oct 2, 2020 at 3:44 AM Andrew Lunn wrote: > On Thu, Oct 01, 2020 at 04:09:43PM -0700, Nick Desaulniers wrote: > > On Wed, Sep 30, 2020 at 6:12 PM Andrew Lunn wrote: > > > > > > There is a movement to try to make more and more of /drivers W=1 > > > clean. But it will only stay clean if new

Re: [PATCH net-next v2 1/2] Makefile.extrawarn: Add symbol for W=1 warnings for today

2020-10-02 Thread Andrew Lunn
On Fri, Oct 02, 2020 at 02:20:50PM +0200, Arnd Bergmann wrote: > On Fri, Oct 2, 2020 at 3:44 AM Andrew Lunn wrote: > > On Thu, Oct 01, 2020 at 04:09:43PM -0700, Nick Desaulniers wrote: > > > On Wed, Sep 30, 2020 at 6:12 PM Andrew Lunn wrote: > > > > > > > > There is a movement to try to make more

Re: [PATCH net-next v2 1/2] Makefile.extrawarn: Add symbol for W=1 warnings for today

2020-10-02 Thread Arnd Bergmann
On Fri, Oct 2, 2020 at 2:51 PM Andrew Lunn wrote: > On Fri, Oct 02, 2020 at 02:20:50PM +0200, Arnd Bergmann wrote: > > On Fri, Oct 2, 2020 at 3:44 AM Andrew Lunn wrote: > > > On Thu, Oct 01, 2020 at 04:09:43PM -0700, Nick Desaulniers wrote: > > > > > > > > I'm not a fan of this approach. Are DAT

[PATCH iproute2-net v2] ip xfrm: support setting XFRMA_SET_MARK_MASK attribute in states

2020-10-02 Thread Antony Antony
The XFRMA_SET_MARK_MASK attribute can be set in states (4.19+) It is optional and the kernel default is 0x It is the mask of XFRMA_SET_MARK(a.k.a. XFRMA_OUTPUT_MARK in 4.18) e.g. ./ip/ip xfrm state add output-mark 0x6 mask 0xab proto esp \ auth digest_null 0 enc cipher_null '' ip xfrm sta

[PATCH bpf-next] libbpf: fix compatibility problem in xsk_socket__create

2020-10-02 Thread Magnus Karlsson
From: Magnus Karlsson Fix a compatibility problem when the old XDP_SHARED_UMEM mode is used together with the xsk_socket__create() call. In the old XDP_SHARED_UMEM mode, only sharing of the same device and queue id was allowed, and in this mode, the fill ring and completion ring were shared betwe

[PATCH v2 net-next 1/3] ethtool: allow netdev driver to define phy tunables

2020-10-02 Thread Igor Russkikh
Define get/set phy tunable callbacks in ethtool ops. This will allow MAC drivers with integrated PHY still to implement these tunables. Signed-off-by: Igor Russkikh --- include/linux/ethtool.h | 4 net/ethtool/ioctl.c | 37 - 2 files changed, 28 inse

[PATCH v2 net-next 3/3] net: atlantic: implement media detect feature via phy tunables

2020-10-02 Thread Igor Russkikh
Mediadetect is another name for the EDPD (energy detect power down). This feature allows device to save extra power when no link is available. PHY goes into the extreme power saving mode and only periodically wakes up and checks for the link. AQC devices has fixed check period of 6 seconds The f

[PATCH v2 net-next 2/3] net: atlantic: implement phy downshift feature

2020-10-02 Thread Igor Russkikh
PHY downshift allows phy to try renegotiate if link is unstable and can carry higher speed. AQC devices has integrated PHY which is controlled by MAC firmware. Thus, driver defines new ethtool callbacks to implement phy tunables via netdev. Signed-off-by: Igor Russkikh --- .../ethernet/aquantia

[PATCH v2 net-next 0/3] net: atlantic: phy tunables from mac driver

2020-10-02 Thread Igor Russkikh
This series implements phy tunables settings via MAC driver callbacks. AQC 10G devices use integrated MAC+PHY solution, where PHY is fully controlled by MAC firmware. Therefore, it is not possible to implement separate phy driver for these. We use ethtool ops callbacks to implement downshift and

[PATCH v4 net-next 1/2] powerpc: dts: t1040: add bindings for Seville Ethernet switch

2020-10-02 Thread Vladimir Oltean
Add the description of the embedded L2 switch inside the SoC dtsi file for NXP T1040. Signed-off-by: Vladimir Oltean Reviewed-by: Maxim Kochetkov Reviewed-by: Andrew Lunn --- Changes in v4: Retargeting to net-next. Changes in v3: Added definition for frame extraction interrupt, even if the dri

[PATCH v4 net-next 0/2] Add Seville Ethernet switch to T1040RDB

2020-10-02 Thread Vladimir Oltean
Seville is a DSA switch that is embedded inside the T1040 SoC, and supported by the mscc_seville DSA driver inside drivers/net/dsa/ocelot. This series adds this switch to the SoC's dtsi files and to the T1040RDB board file. I would like to send this series through net-next. There is no conflict w

[PATCH v4 net-next 2/2] powerpc: dts: t1040rdb: add ports for Seville Ethernet switch

2020-10-02 Thread Vladimir Oltean
Define the network interface names for the switch ports and hook them up to the 2 QSGMII PHYs that are onboard. A conscious decision was taken to go along with the numbers that are written on the front panel of the board and not with the hardware numbers of the switch chip ports. Signed-off-by: V

[PATCH bpf-next 3/3] samples: bpf: driver interrupt statistics in xdpsock

2020-10-02 Thread Ciara Loftus
Add an option to count the number of interrupts generated per second and total number of interrupts during the lifetime of the application for a given interface. This information is extracted from /proc/interrupts. Since there is no naming convention across drivers, the user must provide the string

[PATCH bpf-next 1/3] samples: bpf: split xdpsock stats into new struct

2020-10-02 Thread Ciara Loftus
New statistics will be added in future commits. In preparation for this, let's split out the existing statistics into their own struct. Signed-off-by: Ciara Loftus --- samples/bpf/xdpsock_user.c | 123 + 1 file changed, 69 insertions(+), 54 deletions(-) diff

[PATCH bpf-next 2/3] samples: bpf: count syscalls in xdpsock

2020-10-02 Thread Ciara Loftus
Categorise and record syscalls issued in the xdpsock sample app. The categories recorded are: rx_empty_polls:polls when the rx ring is empty fill_fail_polls: polls when failed to get addr from fill ring copy_tx_sendtos: sendtos issued for tx when copy mode enabled tx_wakeup_sendtos

pull-request: wireless-drivers-next-2020-10-02

2020-10-02 Thread Kalle Valo
Hi, here's a pull request to net-next tree, more info below. Please let me know if there are any problems. Kalle The following changes since commit 0675c285ea65540cccae64c87dfc7a00c7ede03a: net: vlan: Fixed signedness in vlan_group_prealloc_vid() (2020-09-28 00:51:39 -0700) are available in

Re: [net-next PATCH v1 1/7] Documentation: ACPI: DSD: Document MDIO PHY

2020-10-02 Thread Rafael J. Wysocki
On Fri, Oct 2, 2020 at 1:09 PM Grant Likely wrote: > > > > On 30/09/2020 17:37, Rafael J. Wysocki wrote: > > On Wed, Sep 30, 2020 at 6:05 PM Calvin Johnson > > wrote: > >> > >> Introduce ACPI mechanism to get PHYs registered on a MDIO bus and > >> provide them to be connected to MAC. > >> > >> De

[PATCH] net: qrtr: ns: Fix the incorrect usage of rcu_read_lock()

2020-10-02 Thread Manivannan Sadhasivam
The rcu_read_lock() is not supposed to lock the kernel_sendmsg() API since it has the lock_sock() in qrtr_sendmsg() which will sleep. Hence, fix it by excluding the locking for kernel_sendmsg(). Fixes: a7809ff90ce6 ("net: qrtr: ns: Protect radix_tree_deref_slot() using rcu read locks") Reported-b

Re: [PATCH v2 net-next 2/3] net: atlantic: implement phy downshift feature

2020-10-02 Thread Andrew Lunn
On Fri, Oct 02, 2020 at 04:39:22PM +0300, Igor Russkikh wrote: > PHY downshift allows phy to try renegotiate if link is unstable > and can carry higher speed. > > AQC devices has integrated PHY which is controlled by MAC firmware. > Thus, driver defines new ethtool callbacks to implement phy tunab

Re: [PATCH v2 net-next 3/3] net: atlantic: implement media detect feature via phy tunables

2020-10-02 Thread Andrew Lunn
> + if (val > 0 && val != AQ_HW_MEDIA_DETECT_CNT) { > + netdev_err(self->ndev, "EDPD on this device could have only > fixed value of %d\n", > +AQ_HW_MEDIA_DETECT_CNT); > + return -EINVAL; > + } > + > + /* msecs plays no role - configurati

Re: [PATCH v2 net-next 1/3] ethtool: allow netdev driver to define phy tunables

2020-10-02 Thread Andrew Lunn
On Fri, Oct 02, 2020 at 04:39:21PM +0300, Igor Russkikh wrote: > Define get/set phy tunable callbacks in ethtool ops. > This will allow MAC drivers with integrated PHY still to implement > these tunables. > > Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v2] net: usb: rtl8150: prevent set_ethernet_addr from setting uninit address

2020-10-02 Thread Petko Manolov
On 20-10-02 17:35:25, Anant Thazhemadam wrote: > > Yes, this clears things up for me. I'll see to it that this gets done in a v3. If set_ethernet_addr() fail, don't return error, but use eth_hw_addr_random() instead to set random MAC address and continue with the probing. You can take a look he

Re: [PATCH] genl: ctrl: print op -> policy idx mapping

2020-10-02 Thread David Ahern
On 10/2/20 3:26 AM, Johannes Berg wrote: > diff --git a/genl/ctrl.c b/genl/ctrl.c > index 68099fe97f1a..c62212b40fa3 100644 > --- a/genl/ctrl.c > +++ b/genl/ctrl.c > @@ -162,6 +162,16 @@ static int print_ctrl(struct rtnl_ctrl_data *ctrl, > __u32 *ma = RTA_DATA(tb[CTRL_ATTR_MAXATTR]);

Re: [PATCH] genl: ctrl: print op -> policy idx mapping

2020-10-02 Thread Johannes Berg
On Fri, 2020-10-02 at 07:29 -0700, David Ahern wrote: > On 10/2/20 3:26 AM, Johannes Berg wrote: > > diff --git a/genl/ctrl.c b/genl/ctrl.c > > index 68099fe97f1a..c62212b40fa3 100644 > > --- a/genl/ctrl.c > > +++ b/genl/ctrl.c > > @@ -162,6 +162,16 @@ static int print_ctrl(struct rtnl_ctrl_data *c

Re: [PATCH net-next v2 00/10] genetlink: support per-command policy dump

2020-10-02 Thread Jakub Kicinski
On Fri, 02 Oct 2020 08:29:27 +0200 Johannes Berg wrote: > On Thu, 2020-10-01 at 17:36 -0700, Jakub Kicinski wrote: > > Do we need support for separate .doit and .dumpit policies? > > Or is that an overkill? > > I suppose you could make an argument that only some attrs might be > accepted in doit

Re: [EXT] Re: [PATCH v2 net-next 3/3] net: atlantic: implement media detect feature via phy tunables

2020-10-02 Thread Igor Russkikh
>> +if (val > 0 && val != AQ_HW_MEDIA_DETECT_CNT) { >> +netdev_err(self->ndev, "EDPD on this device could have > only fixed value of %d\n", >> + AQ_HW_MEDIA_DETECT_CNT); >> +return -EINVAL; >> +} >> + >> +/* msecs plays no role - configur

[PATCH v4 bpf-next 01/13] xdp: introduce mb in xdp_buff/xdp_frame

2020-10-02 Thread Lorenzo Bianconi
Introduce multi-buffer bit (mb) in xdp_frame/xdp_buffer data structure in order to specify if this is a linear buffer (mb = 0) or a multi-buffer frame (mb = 1). In the latter case the shared_info area at the end of the first buffer is been properly initialized to link together subsequent buffers.

[PATCH v4 bpf-next 05/13] net: mvneta: add multi buffer support to XDP_TX

2020-10-02 Thread Lorenzo Bianconi
Introduce the capability to map non-linear xdp buffer running mvneta_xdp_submit_frame() for XDP_TX and XDP_REDIRECT Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 79 +-- 1 file changed, 49 insertions(+), 30 deletions(-) diff --git a/drivers/

  1   2   3   4   >