Re: [PATCH net-next v2 10/10] genetlink: allow dumping command-specific policy

2020-10-01 Thread Johannes Berg
On Thu, 2020-10-01 at 15:59 -0700, Jakub Kicinski wrote: > Right now CTRL_CMD_GETPOLICY can only dump the family-wide > policy. Support dumping policy of a specific op. > > v2: > - make cmd U32, just in case. > v1: > - don't echo op in the output in a naive way, this should >make it cleaner

Re: [PATCH net-next v2 09/10] genetlink: switch control commands to per-op policies

2020-10-01 Thread Johannes Berg
On Thu, 2020-10-01 at 15:59 -0700, Jakub Kicinski wrote: > In preparation for adding a new attribute to CTRL_CMD_GETPOLICY > split the policies for getpolicy and getfamily apart. > > This will cause a slight user-visible change in that dumping > the policies will switch from per family to per op,

Re: [PATCH net-next v2 08/10] genetlink: use parsed attrs in dumppolicy

2020-10-01 Thread Johannes Berg
On Thu, 2020-10-01 at 15:59 -0700, Jakub Kicinski wrote: > Attributes are already parsed based on the policy specified > in the family and ready-to-use in info->attrs. No need to > call genlmsg_parse() again. :) Reviewed-by: Johannes Berg johannes

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

2020-10-01 Thread Johannes Berg
On Thu, 2020-10-01 at 17:36 -0700, Jakub Kicinski wrote: > On Thu, 1 Oct 2020 15:59:23 -0700 Jakub Kicinski wrote: > > Hi! > > > > The objective of this series is to dump ethtool policies > > to be able to tell which flags are supported by the kernel. > > Current release adds ETHTOOL_FLAG_STATS f

Re: WARNING in cfg80211_connect

2020-10-01 Thread Johannes Berg
On Thu, 2020-10-01 at 21:31 -0700, syzbot wrote: > syzbot has bisected this issue to: > > commit 16d4d43595b4780daac8fcea6d042689124cb094 > Author: Christoph Hellwig > Date: Wed Jul 20 01:38:55 2016 + > > xfs: split direct I/O and DAX path > LOL! Unlike in many other cases, here I d

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

2020-10-01 Thread Kurt Kanzenbach
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 --- Documentation/devicetree/bindings/net/dsa/b53.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/dsa/b

[PATCH 1/6] net: core: document two new elements of struct net_device

2020-10-01 Thread Mauro Carvalho Chehab
As warned by "make htmldocs", there are two new struct elements that aren't documented: ../include/linux/netdevice.h:2159: warning: Function parameter or member 'unlink_list' not described in 'net_device' ../include/linux/netdevice.h:2159: warning: Function parameter or member 'n

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

2020-10-01 Thread Mauro Carvalho Chehab
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 help documenting them; - patch 2 fixes some tags at UMLv2 howto; - patches

[PATCH 2/7] xfrm/compat: Add 64=>32-bit messages translator

2020-10-01 Thread Steffen Klassert
From: Dmitry Safonov Provide the kernel-to-user translator under XFRM_USER_COMPAT, that creates for 64-bit xfrm-user message a 32-bit translation and puts it in skb's frag_list. net/compat.c layer provides MSG_CMSG_COMPAT to decide if the message should be taken from skb or frag_list. (used by we

[PATCH 7/7] selftest/net/xfrm: Add test for ipsec tunnel

2020-10-01 Thread Steffen Klassert
From: Dmitry Safonov It's an exhaustive testing for ipsec: covering all encryption/ authentication/compression algorithms. The tests are run in two network namespaces, connected by veth interfaces. To make exhaustive testing less time-consuming, the tests are run in parallel tasks, specified by p

[PATCH 6/7] xfrm/compat: Translate 32-bit user_policy from sockptr

2020-10-01 Thread Steffen Klassert
From: Dmitry Safonov Provide compat_xfrm_userpolicy_info translation for xfrm setsocketopt(). Reallocate buffer and put the missing padding for 64-bit message. Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert --- include/net/xfrm.h | 3 +++ net/xfrm/xfrm_compat.c | 26 ++

pull request (net-next): ipsec-next 2020-10-02

2020-10-01 Thread Steffen Klassert
1) Add a full xfrm compatible layer for 32-bit applications on 64-bit kernels. From Dmitry Safonov. Please pull or let me know if there are problems. Thanks! The following changes since commit 02a20d4fef3da0278bd2d95c86f48318a9902b76: enic: switch from 'pci_' to 'dma_' API (2020-09-06 12:5

[PATCH 3/7] xfrm/compat: Attach xfrm dumps to 64=>32 bit translator

2020-10-01 Thread Steffen Klassert
From: Dmitry Safonov Currently nlmsg_unicast() is used by functions that dump structures that can be different in size for compat tasks, see dump_one_state() and dump_one_policy(). The following nlmsg_unicast() users exist today in xfrm: Function |Message c

[PATCH 4/7] netlink/compat: Append NLMSG_DONE/extack to frag_list

2020-10-01 Thread Steffen Klassert
From: Dmitry Safonov Modules those use netlink may supply a 2nd skb, (via frag_list) that contains an alternative data set meant for applications using 32bit compatibility mode. In such a case, netlink_recvmsg will use this 2nd skb instead of the original one. Without this patch, such compat ap

[PATCH 1/7] xfrm: Provide API to register translator module

2020-10-01 Thread Steffen Klassert
From: Dmitry Safonov Add a skeleton for xfrm_compat module and provide API to register it in xfrm_state.ko. struct xfrm_translator will have function pointers to translate messages received from 32-bit userspace or to be sent to it from 64-bit kernel. module_get()/module_put() are used instead of

[PATCH 5/7] xfrm/compat: Add 32=>64-bit messages translator

2020-10-01 Thread Steffen Klassert
From: Dmitry Safonov Provide the user-to-kernel translator under XFRM_USER_COMPAT, that creates for 32-bit xfrm-user message a 64-bit translation. The translation is afterwards reused by xfrm_user code just as if userspace had sent 64-bit message. Signed-off-by: Dmitry Safonov Signed-off-by: St

Re: WARNING in cfg80211_connect

2020-10-01 Thread syzbot
syzbot has bisected this issue to: commit 16d4d43595b4780daac8fcea6d042689124cb094 Author: Christoph Hellwig Date: Wed Jul 20 01:38:55 2016 + xfs: split direct I/O and DAX path bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14f662b790 start commit: 87d5034d Merge t

Re: dsa: mv88e6xxx: serdes link without phy

2020-10-01 Thread Chris Packham
On 2/10/20 1:36 am, Andrew Lunn wrote: >>> Can you run 1000Base-X over these links? >> With some reading "1000base-x" does seem the right thing to say here. >> It's even what is reflected in the CMODE field for those ports. > One more thing you might need is > > managed = "in-band-status"; > >>> I

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

2020-10-01 Thread Stephen Rothwell
Hi all, On Wed, 30 Sep 2020 14:07:15 +1000 Stephen Rothwell wrote: > > Today's linux-next merge of the bpf-next tree got a conflict in: > > tools/lib/bpf/btf.c > > between commit: > > 1245008122d7 ("libbpf: Fix native endian assumption when parsing BTF") > > from the bpf tree and commit:

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

2020-10-01 Thread Stephen Rothwell
Hi all, 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 SoC") from the net tree and commit: d7adf6331189 ("dt-bindings: net: re

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

2020-10-01 Thread Florian Fainelli
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 sources too. Check if the obtained address is valid. Signed-off-by: Łukasz

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

2020-10-01 Thread Florian Fainelli
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 case, prior to 12a1526d067 ("net: dsa: untag the bridge pvid from rx skbs") was

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

2020-10-01 Thread Florian Fainelli
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 --- net/dsa/dsa_priv.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[PATCH net-next 0/4] net: dsa: Improve dsa_untag_bridge_pvid()

2020-10-01 Thread Florian Fainelli
Hi David, Jakub, This patch series is based on the recent discussions with Vladimir: https://lore.kernel.org/netdev/20201001030623.343535-1-f.faine...@gmail.com/ the simplest way forward was to call dsa_untag_bridge_pvid() after eth_type_trans() has been set which guarantees that skb->protocol i

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

2020-10-01 Thread Florian Fainelli
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() after eth_type_trans() has been called. Signed-off-by: Florian Fainelli

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

2020-10-01 Thread Florian Fainelli
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 --- drivers/net/dsa/b53/b53_common.c | 1 + net/dsa/tag_brcm.c | 15 ++- 2 files

Re: [Linux-kernel-mentees][PATCH v2] net: usb: rtl8150: prevent set_ethernet_addr from setting uninit address

2020-10-01 Thread David Miller
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 the return values appropriately, and handling the ca

Re: [PATCH net-next v2] lib8390: Use netif_msg_init to initialize msg_enable bits

2020-10-01 Thread David Miller
From: Armin Wolf Date: Wed, 30 Sep 2020 23:00:16 +0200 > Use netif_msg_init() to process param settings > and use only the proper initialized value of > ei_local->msg_enable for later processing; > > Signed-off-by: Armin Wolf > --- > v2 changes: > - confused ei_local-> msg_enable with default_m

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

2020-10-01 Thread David Miller
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 sources too. Check if the > obtained address is valid. > > Signed-off-by: Łukasz Stelmach Failure to probe a MAC addr

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

2020-10-01 Thread Stephen Rothwell
Hi Dave, On Thu, 01 Oct 2020 18:40:13 -0700 (PDT) David Miller wrote: > > From: Stephen Rothwell > Date: Tue, 29 Sep 2020 13:04:46 +1000 > > > Caused by commit > > > > eff7423365a6 ("net: core: introduce struct netdev_nested_priv for nested > > interface infrastructure") > > > > interacti

Re: [PATCH net v1] net: phy: realtek: Modify 2.5G PHY name to RTL8226

2020-10-01 Thread David Miller
From: Willy Liu Date: Wed, 30 Sep 2020 14:48:58 +0800 > Realtek single-chip Ethernet PHY solutions can be separated as below: > 10M/100Mbps: RTL8201X > 1Gbps: RTL8211X > 2.5Gbps: RTL8226/RTL8221X > RTL8226 is the first version for realtek that compatible 2.5Gbps single PHY. > Since RTL8226 is sin

Re: [PATCH] caif_virtio: Remove redundant initialization of variable err

2020-10-01 Thread David Miller
From: Jing Xiangfeng Date: Wed, 30 Sep 2020 09:29:54 +0800 > After commit a8c7687bf216 ("caif_virtio: Check that vringh_config is not > null"), the variable err is being initialized with '-EINVAL' that is > meaningless. So remove it. > > Signed-off-by: Jing Xiangfeng Applied to net-next.

Re: [PATCH 1/2] pktgen: Fix inconsistent of format with argument type in pktgen.c

2020-10-01 Thread David Miller
From: Ye Bin Date: Wed, 30 Sep 2020 09:08:37 +0800 > Fix follow warnings: > [net/core/pktgen.c:925]: (warning) %u in format string (no. 1) > requires 'unsigned int' but the argument type is 'signed int'. > [net/core/pktgen.c:942]: (warning) %u in format string (no. 1) > requires 'unsi

Re: [PATCH 2/2] net-sysfs: Fix inconsistent of format with argument type in net-sysfs.c

2020-10-01 Thread David Miller
From: Ye Bin Date: Wed, 30 Sep 2020 09:08:38 +0800 > Fix follow warnings: > [net/core/net-sysfs.c:1161]: (warning) %u in format string (no. 1) > requires 'unsigned int' but the argument type is 'int'. > [net/core/net-sysfs.c:1162]: (warning) %u in format string (no. 1) > requires 'uns

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

2020-10-01 Thread Andrew Lunn
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 warnings are quickly > > detected and fixed, ideally by the

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

2020-10-01 Thread David Miller
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 check it. Furthermore, failure to probe a MAC address can be

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

2020-10-01 Thread David Miller
From: Stephen Rothwell Date: Tue, 29 Sep 2020 13:04:46 +1000 > Caused by commit > > eff7423365a6 ("net: core: introduce struct netdev_nested_priv for nested > interface infrastructure") > > interacting with commit > > e1189d9a5fbe ("net: marvell: prestera: Add Switchdev driver implementat

Re: [PATCH net-next] drivers/net/wan/hdlc_fr: Correctly handle special skb->protocol values

2020-10-01 Thread David Miller
From: Xie He Date: Mon, 28 Sep 2020 05:56:43 -0700 > The fr_hard_header function is used to prepend the header to skbs before > transmission. It is used in 3 situations: > 1) When a control packet is generated internally in this driver; > 2) When a user sends an skb on an Ethernet-emulating PVC d

[PATCH bpf-next 2/2] bpf: selftest: Ensure the child sk inherited all bpf_sock_ops_cb_flags

2020-10-01 Thread Martin KaFai Lau
This patch adds a test to ensure the child sk inherited everything from the bpf_sock_ops_cb_flags of the listen sk: 1. Sets one more cb_flags (BPF_SOCK_OPS_STATE_CB_FLAG) to the listen sk in test_tcp_hdr_options.c 2. Saves the skops->bpf_sock_ops_cb_flags when handling the newly established p

[PATCH bpf-next 1/2] bpf: tcp: Do not limit cb_flags when creating child sk from listen sk

2020-10-01 Thread Martin KaFai Lau
The commit 0813a841566f ("bpf: tcp: Allow bpf prog to write and parse TCP header option") unnecessarily introduced bpf_skops_init_child() which limited the child sk from inheriting all bpf_sock_ops_cb_flags of the listen sk. That breaks existing user expectation. This patch removes the bpf_skops

[PATCH bpf-next 0/2] Do not limit cb_flags when creating child sk from listen sk

2020-10-01 Thread Martin KaFai Lau
This set fixes an issue that the bpf_skops_init_child() unnecessarily limited the child sk from inheriting all bpf_sock_ops_cb_flags of the listen sk. It also adds a test to check that. Martin KaFai Lau (2): bpf: tcp: Do not limit cb_flags when creating child sk from listen sk bpf: selftest:

[bpf-next PATCH v2 2/2] bpf, sockmap: update selftests to use skb_adjust_room

2020-10-01 Thread John Fastabend
Instead of working around TLS headers in sockmap selftests use the new skb_adjust_room helper. This allows us to avoid special casing the receive side to skip headers. Signed-off-by: John Fastabend --- .../selftests/bpf/progs/test_sockmap_kern.h| 34 +++- tools/testing/

[PATCH bpf-next 3/3] selftests/bpf: validate libbpf's auto-sizing of LD/ST/STX instructions

2020-10-01 Thread Andrii Nakryiko
Add selftests validating libbpf's auto-resizing of load/store instructions when used with CO-RE relocations. An explicit and manual approach with using bpf_core_read() is also demonstrated and tested. Separate BPF program is supposed to fail due to using signed integers of sizes that differ from ke

[bpf-next PATCH v2 1/2] bpf, sockmap: add skb_adjust_room to pop bytes off ingress payload

2020-10-01 Thread John Fastabend
This implements a new helper skb_adjust_room() so users can push/pop extra bytes from a BPF_SK_SKB_STREAM_VERDICT program. Some protocols may include headers and other information that we may not want to include when doing a redirect from a BPF_SK_SKB_STREAM_VERDICT program. One use case is to red

[bpf-next PATCH v2 0/2] Add skb_adjust_room() for SK_SKB

2020-10-01 Thread John Fastabend
This implements the helper skb_adjust_room() for BPF_SKS_SK_STREAM_VERDICT programs so we can push/pop headers from the data on recieve. One use case is to pop TLS headers off kTLS packets. The first patch implements the helper and the second updates test_sockmap to use it removing some case handl

[PATCH bpf-next 1/3] libbpf: support safe subset of load/store instruction resizing with CO-RE

2020-10-01 Thread Andrii Nakryiko
Add support for patching instructions of the following form: - rX = *(T *)(rY + ); - *(T *)(rX + ) = rY; - *(T *)(rX + ) = , where T is one of {u8, u16, u32, u64}. For such instructions, if the actual kernel field recorded in CO-RE relocation has a different size than the one recorded locall

[PATCH bpf-next 0/3] libbpf: auto-resize relocatable LOAD/STORE instructions

2020-10-01 Thread Andrii Nakryiko
Patch set implements logic in libbpf to auto-adjust memory size (1-, 2-, 4-, 8-bytes) of load/store (LD/ST/STX) instructions which have BPF CO-RE field offset relocation associated with it. In practice this means transparent handling of 32-bit kernels, both pointer and unsigned integers. Signed int

[PATCH bpf-next 2/3] libbpf: allow specifying both ELF and raw BTF for CO-RE BTF override

2020-10-01 Thread Andrii Nakryiko
Use generalized BTF parsing logic, making it possible to parse BTF both from ELF file, as well as a raw BTF dump. This makes it easier to write custom tests with manually generated BTFs. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

Re: [PATCH v3 devicetree 0/2] Add Seville Ethernet switch to T1040RDB

2020-10-01 Thread Vladimir Oltean
On Thu, Oct 01, 2020 at 01:10:05PM -0700, David Miller wrote: > From: Vladimir Oltean > Date: Thu, 1 Oct 2020 16:20:11 +0300 > > > 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 a

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

2020-10-01 Thread Jakub Kicinski
On Thu, 1 Oct 2020 15:59:23 -0700 Jakub Kicinski wrote: > Hi! > > The objective of this series is to dump ethtool policies > to be able to tell which flags are supported by the kernel. > Current release adds ETHTOOL_FLAG_STATS for dumping extra > stats, but because of strict checking we need to m

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

2020-10-01 Thread Thomas Gleixner
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_tstamp.h > @@ -167,6 +167,11 @@ enum txtime_flags { > S

Re: pull-request: bpf-next 2020-10-01

2020-10-01 Thread David Miller
From: Daniel Borkmann Date: Thu, 1 Oct 2020 17:42:02 +0200 > The following pull-request contains BPF updates for your *net-next* > tree. Pulled, thanks Daniel.

Re: [PATCH 2/7] Function to retrieve main clock state

2020-10-01 Thread Thomas Gleixner
On Fri, Oct 02 2020 at 00:05, Thomas Gleixner wrote: > On Thu, Oct 01 2020 at 22:51, Erez Geva wrote: > > same comments as for patch 1 apply. > >> Add kernel function to retrieve main clock oscillator state. > > The function you are adding is named adjtimex(). adjtimex(2) is a well > known user spa

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

2020-10-01 Thread Mat Martineau
On Thu, 1 Oct 2020, Stephen Rothwell wrote: Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/mptcp/protocol.h between commit: 1a49b2c2a501 ("mptcp: Handle incoming 32-bit DATA_FIN values") from the net tree and commit: 5c8c1640956e ("mptcp: add mptcp_destro

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

2020-10-01 Thread Mat Martineau
On Thu, 1 Oct 2020, Stephen Rothwell wrote: Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/mptcp/protocol.c between commit: 917944da3bfc ("mptcp: Consistently use READ_ONCE/WRITE_ONCE with msk->ack_seq") from the net tree and commit: 8268ed4c9d19 ("mptcp:

Re: [PATCH bpf-next] selftests/bpf: initialize duration in xdp_noinline.c

2020-10-01 Thread Martin KaFai Lau
On Thu, Oct 01, 2020 at 03:54:40PM -0700, Stanislav Fomichev wrote: > Fixes clang error: > tools/testing/selftests/bpf/prog_tests/xdp_noinline.c:35:6: error: variable > 'duration' is uninitialized when used here [-Werror,-Wuninitialized] > if (CHECK(!skel, "skel_open_and_load", "failed\n")

Re: [PATCH net-next v2] net: dsa: Support bridge 802.1Q while untagging

2020-10-01 Thread Vladimir Oltean
On Thu, Oct 01, 2020 at 04:48:43PM -0700, Florian Fainelli wrote: > > - move dsa_untag_bridge_pvid() after eth_type_trans(), similar to what > >you did in your initial patch - maybe this is the cleanest > > This would be my preference and it would not be hurting the fast-path that > much. Ok,

Re: [PATCH net-next v2] net: dsa: Support bridge 802.1Q while untagging

2020-10-01 Thread Florian Fainelli
On 10/1/2020 4:24 PM, Vladimir Oltean wrote: On Wed, Sep 30, 2020 at 08:06:23PM -0700, Florian Fainelli wrote: The intent of 412a1526d067 ("net: dsa: untag the bridge pvid from rx skbs") is to transparently untag the bridge's default_pvid when the Ethernet switch can only support egress tagge

Re: [PATCH net-next 0/5] implement kthread based napi poll

2020-10-01 Thread Jakub Kicinski
On Thu, 1 Oct 2020 15:12:20 -0700 Wei Wang wrote: > Yes. I did a round of testing with workqueue as well. The "real > workload" I mentioned is a google internal application benchmark which > involves networking as well as disk ops. > There are 2 types of tests there. > 1 is sustained tests, where

Re: [PATCH net-next v2] net: dsa: Support bridge 802.1Q while untagging

2020-10-01 Thread Vladimir Oltean
On Fri, Oct 02, 2020 at 02:24:02AM +0300, Vladimir Oltean wrote: > The explanation is super confusing, although I think the placement of > the "skb->vlan_proto = vlan_dev_vlan_proto(upper_dev)" is correct. No, I think it _is_ wrong, after all, I think you're repairing skb->vlan_proto only for that

Re: [PATCH 3/7] Functions to fetch POSIX dynamic clock object

2020-10-01 Thread Thomas Gleixner
On Thu, Oct 01 2020 at 22:51, Erez Geva wrote: > Add kernel functions to fetch a pointer to a POSIX dynamic clock > using a user file description dynamic clock ID. And how is that supposed to work. What are the lifetime rules? > +struct posix_clock *posix_clock_get_clock(clockid_t id) > +{ > +

Re: [net V2 09/15] net/mlx5e: Add resiliency in Striding RQ mode for packets larger than MTU

2020-10-01 Thread Jakub Kicinski
On Thu, 1 Oct 2020 12:52:41 -0700 sa...@kernel.org wrote: > Usually, this filtering is performed by the HW, except for a few cases: > - Between 2 VFs over the same PF with different MTUs > - On bluefield, when the host physical function sets a larger MTU than > the ARM has configured on its repr

Re: [net V2 07/15] net/mlx5: Fix request_irqs error flow

2020-10-01 Thread Jakub Kicinski
On Thu, 1 Oct 2020 12:52:39 -0700 sa...@kernel.org wrote: > - for (; i >= 0; i--) { > + for (--i; i >= 0; i--) { while (i--)

Re: [net V2 05/15] net/mlx5: Add retry mechanism to the command entry index allocation

2020-10-01 Thread Jakub Kicinski
On Thu, 1 Oct 2020 12:52:37 -0700 sa...@kernel.org wrote: > +static int cmd_alloc_index_retry(struct mlx5_cmd *cmd) > +{ > + unsigned long alloc_end = jiffies + msecs_to_jiffies(1000); > + int idx; > + > +retry: > + idx = cmd_alloc_index(cmd); > + if (idx < 0 && time_before(jiffies

Re: [PATCH net-next v2] net: dsa: Support bridge 802.1Q while untagging

2020-10-01 Thread Vladimir Oltean
On Wed, Sep 30, 2020 at 08:06:23PM -0700, Florian Fainelli wrote: > The intent of 412a1526d067 ("net: dsa: untag the bridge pvid from rx > skbs") is to transparently untag the bridge's default_pvid when the > Ethernet switch can only support egress tagged of that default_pvid > towards the CPU port

Re: [net V2 01/15] net/mlx5: Don't allow health work when device is uninitialized

2020-10-01 Thread Jakub Kicinski
On Thu, 1 Oct 2020 12:52:33 -0700 sa...@kernel.org wrote: > From: Shay Drory > > On error flow due to failure on driver load, driver can be > un-initializing while a health work is running in the background, > health work shouldn't be allowed at this point, as it needs resources to > be initiali

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

2020-10-01 Thread Nick Desaulniers
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 warnings are quickly > detected and fixed, ideally by the developer adding the new code. > > To allow subdirectories to sign up to bei

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

2020-10-01 Thread Jakub Kicinski
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 future CPSW3g on K3 AM64x SoC. > > The multi

Re: [PATCH 5/7] Traffic control using high-resolution timer issue

2020-10-01 Thread Thomas Gleixner
On Thu, Oct 01 2020 at 22:51, Erez Geva wrote: Issue? You again fail to decribe the problem. > - Add new schedule function for Qdisc watchdog. > The function avoids reprogram if watchdog already expire > before new expire. Why can't the existing function not be changed to do that? >

[PATCH v2] vhost-vdpa: fix page pinning leakage in error path

2020-10-01 Thread Si-Wei Liu
Pinned pages are not properly accounted particularly when mapping error occurs on IOTLB update. Clean up dangling pinned pages for the error path. As the inflight pinned pages, specifically for memory region that strides across multiple chunks, would need more than one free page for book keeping an

[PATCH net-next v2 04/10] genetlink: add a structure for dump state

2020-10-01 Thread Jakub Kicinski
Whenever netlink dump uses more than 2 cb->args[] entries code gets hard to read. We're about to add more state to ctrl_dumppolicy() so create a structure. Since the structure is typed and clearly named we can remove the local fam_id variable and use ctx->fam_id directly. v1: - s/nl_policy_dump/

[PATCH net-next v2 07/10] taskstats: move specifying netlink policy back to ops

2020-10-01 Thread Jakub Kicinski
commit 3b0f31f2b8c9 ("genetlink: make policy common to family") had to work around removal of policy from ops by parsing in the pre_doit callback. Now that policy is back in full ops we can switch again. Set maxattr to actual size of the policies - both commands set GENL_DONT_VALIDATE_STRICT so out

[PATCH net-next v2 02/10] genetlink: add small version of ops

2020-10-01 Thread Jakub Kicinski
We want to add maxattr and policy back to genl_ops, to enable dumping per command policy to user space. This, however, would cause bloat for all the families with global policies. Introduce smaller version of ops (half the size of genl_ops). Translate these smaller ops into a full blown struct befo

[PATCH net-next v2 06/10] genetlink: bring back per op policy

2020-10-01 Thread Jakub Kicinski
Add policy to the struct genl_ops structure, this time with maxattr, so it can be used properly. Propagate .policy and .maxattr from the family in genl_get_cmd() if needed, this way the rest of the code does not have to worry if the policy is per op or global. Signed-off-by: Jakub Kicinski Revie

[PATCH net-next v2 03/10] genetlink: move to smaller ops wherever possible

2020-10-01 Thread Jakub Kicinski
Bulk of the genetlink users can use smaller ops, move them. Signed-off-by: Jakub Kicinski Reviewed-by: Johannes Berg --- drivers/block/nbd.c | 6 +++--- drivers/net/gtp.c| 6 +++--- drivers/net/ieee802154/mac802154_hwsim.c | 6 +++--- drivers/net/

[PATCH net-next v2 05/10] genetlink: use .start callback for dumppolicy

2020-10-01 Thread Jakub Kicinski
The structure of ctrl_dumppolicy() is clearly split into init and dumping. Move the init to a .start callback for clarity, it's a more idiomatic netlink dump code structure. Signed-off-by: Jakub Kicinski Reviewed-by: Johannes Berg --- net/netlink/genetlink.c | 48 ---

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

2020-10-01 Thread Jakub Kicinski
Hi! The objective of this series is to dump ethtool policies to be able to tell which flags are supported by the kernel. Current release adds ETHTOOL_FLAG_STATS for dumping extra stats, but because of strict checking we need to make sure that the flag is actually supported before setting it in a r

[PATCH net-next v2 08/10] genetlink: use parsed attrs in dumppolicy

2020-10-01 Thread Jakub Kicinski
Attributes are already parsed based on the policy specified in the family and ready-to-use in info->attrs. No need to call genlmsg_parse() again. Signed-off-by: Jakub Kicinski --- net/netlink/genetlink.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/net/netlink/gen

[PATCH net-next v2 10/10] genetlink: allow dumping command-specific policy

2020-10-01 Thread Jakub Kicinski
Right now CTRL_CMD_GETPOLICY can only dump the family-wide policy. Support dumping policy of a specific op. v2: - make cmd U32, just in case. v1: - don't echo op in the output in a naive way, this should make it cleaner to extend the output format for dumping policies for all the commands

[PATCH net-next v2 09/10] genetlink: switch control commands to per-op policies

2020-10-01 Thread Jakub Kicinski
In preparation for adding a new attribute to CTRL_CMD_GETPOLICY split the policies for getpolicy and getfamily apart. This will cause a slight user-visible change in that dumping the policies will switch from per family to per op, but supposedly sniffer-type applications (which are the main use ca

[PATCH net-next v2 01/10] genetlink: reorg struct genl_family

2020-10-01 Thread Jakub Kicinski
There are holes and oversized members in struct genl_family. Before: /* size: 104, cachelines: 2, members: 16 */ After: /* size: 88, cachelines: 2, members: 16 */ The command field in struct genlmsghdr is a u8, so no point in the operation count being 32 bit. Also operation 0 is usually undefin

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

2020-10-01 Thread Doug Anderson
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 > > dereferencing radix tree from multiple threads. The issue was identified > > by syzbot.

Re: [PATCH bpf-next v7 2/2] selftests/bpf: Selftest for real time helper

2020-10-01 Thread Alexei Starovoitov
On Thu, Oct 1, 2020 at 2:52 PM Pujari, Bimmy wrote: > > Thanks everyone for putting your valuable time to review these patches. Can > any one from you suggest the best way to test this function in selftest? Don't bother. This helper is no go. Please trim your replies next time and do not top po

Re: [PATCH 4/7] Fix qdisc_watchdog_schedule_range_ns range check

2020-10-01 Thread Thomas Gleixner
On Thu, Oct 01 2020 at 22:51, Erez Geva wrote: Fixes should be at the beginning of a patch series and not be hidden somewhere in the middle. >- As all parameters are unsigned. This is not a sentence and this list style does not make that changelog more readable. >- If 'expires' is bigge

Re: [PATCH v5 bpf-next 09/12] bpf: tcp: Allow bpf prog to write and parse TCP header option

2020-10-01 Thread Martin KaFai Lau
On Wed, Sep 30, 2020 at 08:23:47AM -0700, s...@google.com wrote: > On 08/20, Martin KaFai Lau wrote: > > [..] > > +static inline void bpf_skops_init_child(const struct sock *sk, > > + struct sock *child) > > +{ > > + tcp_sk(child)->bpf_sock_ops_cb_flags = > > +

Re: [PATCH 2/7] Function to retrieve main clock state

2020-10-01 Thread Thomas Gleixner
Erez, On Thu, Oct 01 2020 at 22:51, Erez Geva wrote: same comments as for patch 1 apply. > Add kernel function to retrieve main clock oscillator state. The function you are adding is named adjtimex(). adjtimex(2) is a well known user space interface and naming a read only kernel interface the s

Re: [PATCH 1/7] POSIX clock ID check function

2020-10-01 Thread Thomas Gleixner
Erez, On Thu, Oct 01 2020 at 22:51, Erez Geva wrote: thanks for your patches. First of all subject lines follow the scheme: subsystem: Short description The short description should be a sentence > Add function to check whether a clock ID refer to > a file descriptor of a POSIX dynamic clock

RE: [PATCH bpf-next v7 2/2] selftests/bpf: Selftest for real time helper

2020-10-01 Thread Pujari, Bimmy
Thanks everyone for putting your valuable time to review these patches. Can any one from you suggest the best way to test this function in selftest? Regards Bimmy -Original Message- From: Alexei Starovoitov Sent: Wednesday, September 30, 2020 10:35 PM To: Pujari, Bimmy Cc: b...@vger.k

Re: [PATCH net-next 15/16] net/mlx5: Add support for devlink reload limit no reset

2020-10-01 Thread Jakub Kicinski
On Thu, 1 Oct 2020 16:59:18 +0300 Moshe Shemesh wrote: > + err = mlx5_fw_reset_set_live_patch(dev); > + if (err) > + return err; > + > + return 0; nit return mlx...

Re: [PATCH net-next 05/16] devlink: Add remote reload stats

2020-10-01 Thread Jakub Kicinski
On Thu, 1 Oct 2020 16:59:08 +0300 Moshe Shemesh wrote: > Add remote reload stats to hold the history of actions performed due > devlink reload commands initiated by remote host. For example, in case > firmware activation with reset finished successfully but was initiated > by remote host. > > The

Re: WARNING in cfg80211_connect

2020-10-01 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:87d5034d Merge tag 'mlx5-updates-2020-09-30' of git://git... git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=121d231390 kernel config: https://syzkaller.appspot.com/x/.config?x=7b5cc8e

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

2020-10-01 Thread Stephen Hemminger
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 operation, it would be good to add a new helper function in netdevice.h In

Re: [PATCH net-next 04/16] devlink: Add reload stats

2020-10-01 Thread Jakub Kicinski
On Thu, 1 Oct 2020 16:59:07 +0300 Moshe Shemesh wrote: > Add reload stats to hold the history per reload action type and limit. > > For example, the number of times fw_activate has been performed on this > device since the driver module was added or if the firmware activation > was performed with

Re: [PATCH net-next 03/16] devlink: Add devlink reload limit option

2020-10-01 Thread Jakub Kicinski
On Thu, 1 Oct 2020 16:59:06 +0300 Moshe Shemesh wrote: > Add reload limit to demand restrictions on reload actions. > Reload limits supported: > no_reset: No reset allowed, no down time allowed, no link flap and no > configuration is lost. > > By default reload limit is unspecified and

Re: [PATCH net-next 03/16] devlink: Add devlink reload limit option

2020-10-01 Thread Jakub Kicinski
On Thu, 1 Oct 2020 16:59:06 +0300 Moshe Shemesh wrote: > @@ -3032,6 +3064,7 @@ devlink_nl_reload_actions_performed_snd(struct devlink > *devlink, > > static int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info) > { > + enum devlink_reload_limit limit; > struct devli

Re: [PATCH net-next 9/9] genetlink: allow dumping command-specific policy

2020-10-01 Thread Jakub Kicinski
On Thu, 01 Oct 2020 23:03:01 +0200 Johannes Berg wrote: > On Thu, 2020-10-01 at 11:30 -0700, Jakub Kicinski wrote: > > > > +++ b/net/netlink/genetlink.c > > @@ -1119,6 +1119,7 @@ static const struct nla_policy ctrl_policy_policy[] = > > { > > [CTRL_ATTR_FAMILY_ID] = { .type = NLA_U16 }, > >

Re: [PATCH net-next 8/9] genetlink: use per-op policy for CTRL_CMD_GETPOLICY

2020-10-01 Thread Johannes Berg
On Thu, 2020-10-01 at 14:09 -0700, Jakub Kicinski wrote: > On Thu, 01 Oct 2020 22:55:09 +0200 Johannes Berg wrote: > > On Thu, 2020-10-01 at 11:30 -0700, Jakub Kicinski wrote: > > > Wire up per-op policy for CTRL_CMD_GETPOLICY. > > > This saves us a call to genlmsg_parse() and will soon allow > > >

Re: [PATCH net-next 8/9] genetlink: use per-op policy for CTRL_CMD_GETPOLICY

2020-10-01 Thread Jakub Kicinski
On Thu, 01 Oct 2020 22:55:09 +0200 Johannes Berg wrote: > On Thu, 2020-10-01 at 11:30 -0700, Jakub Kicinski wrote: > > Wire up per-op policy for CTRL_CMD_GETPOLICY. > > This saves us a call to genlmsg_parse() and will soon allow > > dumping this policy. > > Hmm. Probably should've asked this bef

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

2020-10-01 Thread Erez Geva
- Add support for using a POSIX dynamic clock with Traffic control Earliest TxTime First (ETF) Qdisc. Signed-off-by: Erez Geva --- include/uapi/linux/net_tstamp.h | 5 ++ net/sched/sch_etf.c | 100 +--- 2 files changed, 97 insertions(+), 8 deletion

[PATCH 3/7] Functions to fetch POSIX dynamic clock object

2020-10-01 Thread Erez Geva
Add kernel functions to fetch a pointer to a POSIX dynamic clock using a user file description dynamic clock ID. Signed-off-by: Erez Geva --- include/linux/posix-clock.h | 39 +++ kernel/time/posix-clock.c | 76 + 2 files changed, 115 inserti

  1   2   3   4   >