[PATCH] cipso,calipso: resolve a number of problems with the DOI refcounts

2021-03-04 Thread Paul Moore
The current CIPSO and CALIPSO refcounting scheme for the DOI definitions is a bit flawed in that we: 1. Don't correctly match gets/puts in netlbl_cipsov4_list(). 2. Decrement the refcount on each attempt to remove the DOI from the DOI list, only removing it from the list once the refcount drops

Re: [PATCH] cipso,calipso: resolve a number of problems with the DOI refcounts

2021-03-04 Thread Paul Moore
On Thu, Mar 4, 2021 at 4:29 PM Paul Moore wrote: > > The current CIPSO and CALIPSO refcounting scheme for the DOI > definitions is a bit flawed in that we: > > 1. Don't correctly match gets/puts in netlbl_cipsov4_list(). > 2. Decrement the refcount on each attempt to remove the DOI from the >D

[PATCH net 0/9] mptcp: Fixes for v5.12

2021-03-04 Thread Mat Martineau
These patches from the MPTCP tree fix a few multipath TCP issues: Patches 1 and 5 clear some stale pointers when subflows close. Patches 2, 4, and 9 plug some memory leaks. Patch 3 fixes a memory accounting error identified by syzkaller. Patches 6 and 7 fix a race condition that slowed data tr

[PATCH net 1/9] mptcp: reset last_snd on subflow close

2021-03-04 Thread Mat Martineau
From: Florian Westphal Send logic caches last active subflow in the msk, so it needs to be cleared when the cached subflow is closed. Fixes: d5f49190def61c ("mptcp: allow picking different xmit subflows") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/155 Reported-by: Christoph P

[PATCH net 6/9] mptcp: factor out __mptcp_retrans helper()

2021-03-04 Thread Mat Martineau
From: Paolo Abeni Will simplify the following patch, no functional change intended. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau --- net/mptcp/protocol.c | 93 1 file changed, 50 insertions(+), 43 deletions(-) diff --git a/net/mptcp/pro

[PATCH net 3/9] mptcp: fix memory accounting on allocation error

2021-03-04 Thread Mat Martineau
From: Paolo Abeni In case of memory pressure the MPTCP xmit path keeps at most a single skb in the tx cache, eventually freeing additional ones. The associated counter for forward memory is not update accordingly, and that causes the following splat: WARNING: CPU: 0 PID: 12 at net/core/stream.c

[PATCH net 5/9] mptcp: reset 'first' and ack_hint on subflow close

2021-03-04 Thread Mat Martineau
From: Florian Westphal Just like with last_snd, we have to NULL 'first' on subflow close. ack_hint isn't strictly required (its never dereferenced), but better to clear this explicitly as well instead of making it an exception. msk->first is dereferenced unconditionally at accept time, but at t

[PATCH net 2/9] mptcp: put subflow sock on connect error

2021-03-04 Thread Mat Martineau
From: Florian Westphal mptcp_add_pending_subflow() performs a sock_hold() on the subflow, then adds the subflow to the join list. Without a sock_put the subflow sk won't be freed in case connect() fails. unreferenced object 0x88810c03b100 (size 3000): [..] sk_prot_alloc.isra.0+0x2f/0x11

[PATCH net 4/9] mptcp: dispose initial struct socket when its subflow is closed

2021-03-04 Thread Mat Martineau
From: Florian Westphal Christoph Paasch reported following crash: dst_release underflow WARNING: CPU: 0 PID: 1319 at net/core/dst.c:175 dst_release+0xc1/0xd0 net/core/dst.c:175 CPU: 0 PID: 1319 Comm: syz-executor217 Not tainted 5.11.0-rc6af8e85128b4d0d24083c5cac646e891227052e0c #70 Call Trace:

[PATCH net 9/9] mptcp: free resources when the port number is mismatched

2021-03-04 Thread Mat Martineau
From: Geliang Tang When the port number is mismatched with the announced ones, use 'goto dispose_child' to free the resources instead of using 'goto out'. This patch also moves the port number checking code in subflow_syn_recv_sock before mptcp_finish_join, otherwise subflow_drop_ctx will fail i

[PATCH net 8/9] mptcp: fix missing wakeup

2021-03-04 Thread Mat Martineau
From: Paolo Abeni __mptcp_clean_una() can free write memory and should wake-up user-space processes when needed. When such function is invoked by the MPTCP receive path, the wakeup is not needed, as the TCP stack will later trigger subflow_write_space which will do the wakeup as needed. Other _

[PATCH net 7/9] mptcp: fix race in release_cb

2021-03-04 Thread Mat Martineau
From: Paolo Abeni If we receive a MPTCP_PUSH_PENDING even from a subflow when mptcp_release_cb() is serving the previous one, the latter will be delayed up to the next release_sock(msk). Address the issue implementing a test/serve loop for such event. Additionally rename the push helper to __mp

Re: [PATCH] net: sctp: trivial: fix typo in comment

2021-03-04 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Wed, 3 Mar 2021 21:55:49 -0800 you wrote: > Fix typo of 'overflow' for comment in sctp_tsnmap_check(). > > Reported-by: Gustavo A. R. Silva > Signed-off-by: Drew Fustini > --- > net/sctp/tsnmap.c | 2 +- > 1 file changed

Re: [PATCH net v2 0/2][pull request] Intel Wired LAN Driver Updates 2021-03-04

2021-03-04 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (refs/heads/master): On Thu, 4 Mar 2021 11:20:15 -0800 you wrote: > This series contains updates to ixgbe and ixgbevf drivers. > > Antony Antony adds a check to fail for non transport mode SA with > offload as this is not supported for ixgbe and

Re: [PATCH net v2 0/2][pull request] Intel Wired LAN Driver Updates 2021-03-04

2021-03-04 Thread David Miller
From: Tony Nguyen Date: Thu, 4 Mar 2021 11:20:15 -0800 > This series contains updates to ixgbe and ixgbevf drivers. > > Antony Antony adds a check to fail for non transport mode SA with > offload as this is not supported for ixgbe and ixgbevf. > > Dinghao Liu fixes a memory leak on failure to

Re: [PATCH net] ethtool: Add indicator field for link_mode validity to link_ksettings

2021-03-04 Thread Edwin Peer
On Thu, Mar 4, 2021 at 1:13 AM Danielle Ratson wrote: > --- a/include/linux/ethtool.h > +++ b/include/linux/ethtool.h > @@ -130,6 +130,7 @@ struct ethtool_link_ksettings { > } link_modes; > u32 lanes; > enum ethtool_link_mode_bit_indices link_mode; > + bool link_

Re: [PATCH net] ethtool: Add indicator field for link_mode validity to link_ksettings

2021-03-04 Thread Edwin Peer
On Thu, Mar 4, 2021 at 2:08 PM Edwin Peer wrote: > On Thu, Mar 4, 2021 at 1:13 AM Danielle Ratson wrote: > > > --- a/include/linux/ethtool.h > > +++ b/include/linux/ethtool.h > > @@ -130,6 +130,7 @@ struct ethtool_link_ksettings { > > } link_modes; > > u32 lanes; > >

Re: [PATCH net 0/2] nexthop: Do not flush blackhole nexthops when loopback goes down

2021-03-04 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (refs/heads/master): On Thu, 4 Mar 2021 10:57:52 +0200 you wrote: > From: Ido Schimmel > > Patch #1 prevents blackhole nexthops from being flushed when the > loopback device goes down given that as far as user space is concerned, > these nexthop

Re: [PATCH net] net: mscc: ocelot: properly reject destination IP keys in VCAP IS1

2021-03-04 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 4 Mar 2021 12:29:43 +0200 you wrote: > From: Vladimir Oltean > > An attempt is made to warn the user about the fact that VCAP IS1 cannot > offload keys matching on destination IP (at least given the current half > key

Re: stmmac driver timeout issue

2021-03-04 Thread Andrew Lunn
On Thu, Mar 04, 2021 at 01:14:31PM +, Joakim Zhang wrote: > > Hello Andrew, Hello Jakub, > > You may can give some suggestions based on your great networking knowledge, > thanks in advance! > > I found that add vlan id hw filter (stmmac_vlan_rx_add_vid) have possibility > timeout when acce

Re: [PATCH net 1/2] net: dsa: sja1105: fix SGMII PCS being forced to SPEED_UNKNOWN instead of SPEED_10

2021-03-04 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (refs/heads/master): On Thu, 4 Mar 2021 12:56:53 +0200 you wrote: > From: Vladimir Oltean > > When using MLO_AN_PHY or MLO_AN_FIXED, the MII_BMCR of the SGMII PCS is > read before resetting the switch so it can be reprogrammed afterwards. > This

Re: [PATCH 1/1] net: usb: qmi_wwan: allow qmimux add/del with master up

2021-03-04 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 4 Mar 2021 14:15:13 +0100 you wrote: > There's no reason for preventing the creation and removal > of qmimux network interfaces when the underlying interface > is up. > > This makes qmi_wwan mux implementation more sim

Re: [PATCH AUTOSEL 5.11 16/67] net: sfp: add mode quirk for GPON module Ubiquiti U-Fiber Instant

2021-03-04 Thread Sasha Levin
On Thu, Feb 25, 2021 at 08:03:06PM +0100, Pali Rohár wrote: On Wednesday 24 February 2021 07:49:34 Sasha Levin wrote: From: Pali Rohár [ Upstream commit f0b4f847673299577c29b71d3f3acd3c313d81b7 ] Hello! This commit requires also commit~1 from that patch series: https://git.kernel.org/pub/scm

Re: [PATCH] cipso,calipso: resolve a number of problems with the DOI refcounts

2021-03-04 Thread David Miller
From: Paul Moore Date: Thu, 04 Mar 2021 16:29:51 -0500 > +static void calipso_doi_putdef(struct calipso_doi *doi_def); > + This is a global symbol, so why the static decl here? Thanks.

[PATCH net-next 0/6] net: qualcomm: rmnet: stop using C bit-fields

2021-03-04 Thread Alex Elder
This series converts data structures defined in so they use integral field values with bitfield masks rather than rely on C bit-fields. I first proposed doing something like this long ago when my confusion about this code (and the memory layout it was supposed to represent) led me to believe it w

[PATCH net-next 1/6] net: qualcomm: rmnet: mark trailer field endianness

2021-03-04 Thread Alex Elder
The fields in the checksum trailer structure used for QMAP protocol RX packets are all big-endian format, so define them that way. It turns out these fields are never actually used by the RMNet code. The start offset is always assumed to be zero, and the length is taken from the other packet heade

[PATCH net-next 4/6] net: qualcomm: rmnet: use field masks instead of C bit-fields

2021-03-04 Thread Alex Elder
The actual layout of bits defined in C bit-fields (e.g. int foo : 3) is implementation-defined. Structures defined in address this by specifying all bit-fields twice, to cover two possible layouts. I think this pattern is repetitive and noisy, and I find the whole notion of compiler "bitfield en

[PATCH net-next 3/6] net: qualcomm: rmnet: kill RMNET_MAP_GET_*() accessor macros

2021-03-04 Thread Alex Elder
The following macros, defined in "rmnet_map.h", assume a socket buffer is provided as an argument without any real indication this is the case. RMNET_MAP_GET_MUX_ID() RMNET_MAP_GET_CD_BIT() RMNET_MAP_GET_PAD() RMNET_MAP_GET_CMD_START() RMNET_MAP_GET_LENGTH() What they hide is pr

[PATCH net-next 5/6] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum trailer

2021-03-04 Thread Alex Elder
Replace the use of C bit-fields in the rmnet_map_dl_csum_trailer structure with a single one-byte field, using constant field masks to encode or get at embedded values. Signed-off-by: Alex Elder --- .../ethernet/qualcomm/rmnet/rmnet_map_data.c| 2 +- include/linux/if_rmnet.h

[PATCH net-next 6/6] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum header

2021-03-04 Thread Alex Elder
Replace the use of C bit-fields in the rmnet_map_ul_csum_header structure with a single two-byte (big endian) structure member, and use field masks to encode or get values within it. Previously rmnet_map_ipv4_ul_csum_header() would update values in the host byte-order fields, and then forcibly fix

[PATCH net-next 2/6] net: qualcomm: rmnet: simplify some byte order logic

2021-03-04 Thread Alex Elder
In rmnet_map_ipv4_ul_csum_header() and rmnet_map_ipv6_ul_csum_header() the offset within a packet at which checksumming should commence is calculated. This calculation involves byte swapping and a forced type conversion that makes it hard to understand. Simplify this by computing the offset in ho

Re: [PATCH net 0/9] mptcp: Fixes for v5.12

2021-03-04 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (refs/heads/master): On Thu, 4 Mar 2021 13:32:07 -0800 you wrote: > These patches from the MPTCP tree fix a few multipath TCP issues: > > > Patches 1 and 5 clear some stale pointers when subflows close. > > Patches 2, 4, and 9 plug some memory

Re: [PATCH] net: sched: avoid duplicates in classes dump

2021-03-04 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 4 Mar 2021 14:43:17 + you wrote: > This is a follow up of commit ea3274695353 ("net: sched: avoid > duplicates in qdisc dump") which has fixed the issue only for the qdisc > dump. > > The duplicate printing also occ

Re: [PATCH net] netdevsim: init u64 stats for 32bit hardware

2021-03-04 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 4 Mar 2021 10:30:09 -0800 you wrote: > From: Hillf Danton > > Init the u64 stats in order to avoid the lockdep prints on the 32bit > hardware like > > INFO: trying to register non-static key. > the code is fine but

Re: [PATCH net] ibmvnic: always store valid MAC address

2021-03-04 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 4 Mar 2021 17:18:28 +0100 you wrote: > The last change to ibmvnic_set_mac(), 8fc3672a8ad3, meant to prevent > users from setting an invalid MAC address on an ibmvnic interface > that has not been brought up yet. The chan

Re: [PATCH net-next 0/6] net: qualcomm: rmnet: stop using C bit-fields

2021-03-04 Thread Alex Elder
On 3/4/21 4:34 PM, Alex Elder wrote: This series converts data structures defined in so they use integral field values with bitfield masks rather than rely on C bit-fields. Whoops! I forgot to check if net-next was open. I'm very sorry about that... http://vger.kernel.org/~davem/net-next.

Re: [PATCH 042/141] net: 3c509: Fix fall-through warnings for Clang

2021-03-04 Thread Gustavo A. R. Silva
Hi all, It's been more than 3 months; who can take this, please? :) Thanks -- Gustavo On Fri, Nov 20, 2020 at 12:30:56PM -0600, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of just letting t

Re: [PATCH 043/141] net: cassini: Fix fall-through warnings for Clang

2021-03-04 Thread Gustavo A. R. Silva
Hi all, It's been more than 3 months; who can take this, please? :) Thanks -- Gustavo On Fri, Nov 20, 2020 at 12:31:02PM -0600, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of just letting t

Re: [PATCH 045/141] net: mscc: ocelot: Fix fall-through warnings for Clang

2021-03-04 Thread Gustavo A. R. Silva
Hi all, It's been more than 3 months; who can take this, please? :) Thanks -- Gustavo On Fri, Nov 20, 2020 at 12:31:13PM -0600, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of just letting t

Re: [PATCH 076/141] decnet: Fix fall-through warnings for Clang

2021-03-04 Thread Gustavo A. R. Silva
Hi all, It's been more than 3 months; who can take this, please? :) Thanks -- Gustavo On Fri, Nov 20, 2020 at 12:35:01PM -0600, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of letting the co

Re: [PATCH 105/141] net: ax25: Fix fall-through warnings for Clang

2021-03-04 Thread Gustavo A. R. Silva
Hi all, It's been more than 3 months; who can take this, please? :) Thanks -- Gustavo On Fri, Nov 20, 2020 at 12:37:53PM -0600, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of letting the co

Re: [PATCH 106/141] net: bridge: Fix fall-through warnings for Clang

2021-03-04 Thread Gustavo A. R. Silva
Hi all, It's been more than 3 months; who can take this, please? :) Thanks -- Gustavo On Tue, Feb 02, 2021 at 04:16:07PM +0200, Nikolay Aleksandrov wrote: > On 20/11/2020 20:37, Gustavo A. R. Silva wrote: > > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > > by explici

Re: [PATCH 107/141] net: core: Fix fall-through warnings for Clang

2021-03-04 Thread Gustavo A. R. Silva
Hi all, It's been more than 3 months; who can take this, please? :) Thanks -- Gustavo On Fri, Nov 20, 2020 at 12:38:03PM -0600, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of letting the co

Re: [PATCH 111/141] net: plip: Fix fall-through warnings for Clang

2021-03-04 Thread Gustavo A. R. Silva
Hi all, It's been more than 3 months; who can take this, please? :) Thanks -- Gustavo On Fri, Nov 20, 2020 at 12:38:25PM -0600, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > warnings by explicitly adding multiple break statements instead o

Re: [PATCH 112/141] net: rose: Fix fall-through warnings for Clang

2021-03-04 Thread Gustavo A. R. Silva
Hi all, It's been more than 3 months; who can take this, please? :) Thanks -- Gustavo On Fri, Nov 20, 2020 at 12:38:32PM -0600, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > warnings by explicitly adding multiple break statements instead o

Re: [PATCH 045/141] net: mscc: ocelot: Fix fall-through warnings for Clang

2021-03-04 Thread Vladimir Oltean
Hi Gustavo, On Thu, Mar 04, 2021 at 04:53:18PM -0600, Gustavo A. R. Silva wrote: > Hi all, > > It's been more than 3 months; who can take this, please? :) > > Thanks > -- > Gustavo > > On Fri, Nov 20, 2020 at 12:31:13PM -0600, Gustavo A. R. Silva wrote: > > In preparation to enable -Wimplicit-fall

Re: [Freedreno] [PATCH 16/17] iommu: remove DOMAIN_ATTR_IO_PGTABLE_CFG

2021-03-04 Thread Rob Clark
On Thu, Mar 4, 2021 at 7:48 AM Robin Murphy wrote: > > On 2021-03-01 08:42, Christoph Hellwig wrote: > > Signed-off-by: Christoph Hellwig > > Moreso than the previous patch, where the feature is at least relatively > generic (note that there's a bunch of in-flight development around > DOMAIN_ATTR

Re: [PATCH] cipso,calipso: resolve a number of problems with the DOI refcounts

2021-03-04 Thread Paul Moore
On Thu, Mar 4, 2021 at 5:33 PM David Miller wrote: > From: Paul Moore > Date: Thu, 04 Mar 2021 16:29:51 -0500 > > > +static void calipso_doi_putdef(struct calipso_doi *doi_def); > > + > > This is a global symbol, so why the static decl here? To resolve this: CC net/ipv6/calipso.o net/ipv

Re: [PATCH net] net: tcp: don't allocate fast clones for fastopen SYN

2021-03-04 Thread Jakub Kicinski
On Thu, 4 Mar 2021 22:26:58 +0100 Eric Dumazet wrote: > It would be nice if tun driver would have the ability to delay TX > completions by N usecs, > so that packetdrill tests could be used. > > It is probably not too hard to add such a feature. Add an ioctl to turn off the skb_orphan, queue the

Re: [PATCH] cipso,calipso: resolve a number of problems with the DOI refcounts

2021-03-04 Thread David Miller
From: Paul Moore Date: Thu, 4 Mar 2021 18:13:21 -0500 > On Thu, Mar 4, 2021 at 5:33 PM David Miller wrote: >> From: Paul Moore >> Date: Thu, 04 Mar 2021 16:29:51 -0500 >> >> > +static void calipso_doi_putdef(struct calipso_doi *doi_def); >> > + >> >> This is a global symbol, so why the static d

Re: [PATCH] cipso,calipso: resolve a number of problems with the DOI refcounts

2021-03-04 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 04 Mar 2021 16:29:51 -0500 you wrote: > The current CIPSO and CALIPSO refcounting scheme for the DOI > definitions is a bit flawed in that we: > > 1. Don't correctly match gets/puts in netlbl_cipsov4_list(). > 2. Decrem

Re: [Patch bpf-next v2 2/9] sock: introduce sk_prot->update_proto()

2021-03-04 Thread Cong Wang
On Tue, Mar 2, 2021 at 10:23 AM Cong Wang wrote: > > On Tue, Mar 2, 2021 at 8:22 AM Lorenz Bauer wrote: > > > > On Tue, 2 Mar 2021 at 02:37, Cong Wang wrote: > > > > ... > > > static inline void sk_psock_restore_proto(struct sock *sk, > > > struct sk_ps

Re: WARNING in ieee802154_get_llsec_params

2021-03-04 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:f5427c24 Add linux-next specific files for 20210304 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=12bb4ff2d0 kernel config: https://syzkaller.appspot.com/x/.config?x

Re: stmmac driver timeout issue

2021-03-04 Thread Florian Fainelli
On 3/4/21 5:14 AM, Joakim Zhang wrote: > > Hello Andrew, Hello Jakub, > > You may can give some suggestions based on your great networking knowledge, > thanks in advance! > > I found that add vlan id hw filter (stmmac_vlan_rx_add_vid) have possibility > timeout when accessing VLAN Filter regis

RE: [RFC PATCH V2 net-next 0/5] ethtool: Extend module EEPROM dump API

2021-03-04 Thread Don Bollinger
On Thu, Mar 04, 2021 at 10:57AM-0800, Moshe Shemesh wrote: > Ethtool supports module EEPROM dumps via the `ethtool -m ` > command. > But in current state its functionality is limited - offset and length parameters, > which are used to specify a linear desired region of EEPROM data to dump, is > not

RE: [RFC PATCH V2 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-04 Thread Don Bollinger
On Thu, Mar 04, 2021 at 10:57AM-0800, Moshe Shemesh wrote: > From: Vladyslav Tarasiuk > > Define get_module_eeprom_data_by_page() ethtool callback and > implement netlink infrastructure. > > get_module_eeprom_data_by_page() allows network drivers to dump a > part of module's EEPROM specified by

RE: [RFC PATCH V2 net-next 5/5] ethtool: Add fallback to get_module_eeprom from netlink command

2021-03-04 Thread Don Bollinger
On Thu, Mar 04, 2021 at 10:57AM-0800, Moshe Shemesh wrote: > From: Vladyslav Tarasiuk > > In case netlink get_module_eeprom_data_by_page() callback is not > implemented by the driver, try to call old get_module_info() and > get_module_eeprom() pair. Recalculate parameters to > get_module_eeprom()

Re: [PATCH net-next v2 3/3] net: phy: broadcom: Allow BCM54210E to configure APD

2021-03-04 Thread Vladimir Oltean
On Tue, Mar 02, 2021 at 07:37:34PM -0800, Florian Fainelli wrote: > Took a while but for the 54210E reference board here are the numbers, > your mileage will vary depending on the supplies, regulator efficiency > and PCB design around the PHY obviously: > > BMCR.PDOWN: 86.12 mW >

Re: [RFC PATCH V2 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-04 Thread Andrew Lunn
> > + * @length: Number of bytes to read. > > + * @page: Page number to read from. > > + * @bank: Page bank number to read from, if applicable by EEPROM spec. > > + * @i2c_address: I2C address of a page. Value less than 0x7f expected. > > Most > > + * EEPROMs use 0x50 or 0x51. > > The standards ar

Re: [RFC PATCH V2 net-next 5/5] ethtool: Add fallback to get_module_eeprom from netlink command

2021-03-04 Thread Andrew Lunn
> > +static int fallback_set_params(struct eeprom_data_req_info *request, > > + struct ethtool_modinfo *modinfo, > > + struct ethtool_eeprom *eeprom) { > > This is translating the new data structure into the old. Hence, I assume we > have i2c_addr

[Patch bpf-next v3 0/9] sockmap: introduce BPF_SK_SKB_VERDICT and support UDP

2021-03-04 Thread Cong Wang
From: Cong Wang We have thousands of services connected to a daemon on every host via AF_UNIX dgram sockets, after they are moved into VM, we have to add a proxy to forward these communications from VM to host, because rewriting thousands of them is not practical. This proxy uses an AF_UNIX socke

[Patch bpf-next v3 1/9] sock_map: introduce BPF_SK_SKB_VERDICT

2021-03-04 Thread Cong Wang
From: Cong Wang Reusing BPF_SK_SKB_STREAM_VERDICT is possible but its name is confusing and more importantly we still want to distinguish them from user-space. So we can just reuse the stream verdict code but introduce a new type of eBPF program, skb_verdict. Users are not allowed to set stream_v

[Patch bpf-next v3 2/9] sock: introduce sk->sk_prot->psock_update_sk_prot()

2021-03-04 Thread Cong Wang
From: Cong Wang Currently sockmap calls into each protocol to update the struct proto and replace it. This certainly won't work when the protocol is implemented as a module, for example, AF_UNIX. Introduce a new ops sk->sk_prot->psock_update_sk_prot(), so each protocol can implement its own way

[Patch bpf-next v3 3/9] udp: implement ->sendmsg_locked()

2021-03-04 Thread Cong Wang
From: Cong Wang UDP already has udp_sendmsg() which takes lock_sock() inside. We have to build ->sendmsg_locked() on top of it, by adding a new parameter for whether the sock has been locked. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang

[Patch bpf-next v3 5/9] udp: add ->read_sock() and ->sendmsg_locked() to ipv6

2021-03-04 Thread Cong Wang
From: Cong Wang Similarly, udpv6_sendmsg() takes lock_sock() inside too, we have to build ->sendmsg_locked() on top of it. For ->read_sock(), we can just use udp_read_sock(). Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- include/ne

[Patch bpf-next v3 4/9] udp: implement ->read_sock() for sockmap

2021-03-04 Thread Cong Wang
From: Cong Wang This is similar to tcp_read_sock(), except we do not need to worry about connections, we just need to retrieve skb from UDP receive queue. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- include/net/udp.h | 2 ++ net

[Patch bpf-next v3 6/9] skmsg: extract __tcp_bpf_recvmsg() and tcp_bpf_wait_data()

2021-03-04 Thread Cong Wang
From: Cong Wang Although these two functions are only used by TCP, they are not specific to TCP at all, both operate on skmsg and ingress_msg, so fit in net/core/skmsg.c very well. And we will need them for non-TCP, so rename and move them to skmsg.c and export them to modules. Cc: John Fastabe

[Patch bpf-next v3 7/9] udp: implement udp_bpf_recvmsg() for sockmap

2021-03-04 Thread Cong Wang
From: Cong Wang We have to implement udp_bpf_recvmsg() to replace the ->recvmsg() to retrieve skmsg from ingress_msg. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- net/ipv4/udp_bpf.c | 64

[Patch bpf-next v3 8/9] sock_map: update sock type checks for UDP

2021-03-04 Thread Cong Wang
From: Cong Wang Now UDP supports sockmap and redirection, we can safely update the sock type checks for it accordingly. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- net/core/sock_map.c | 5 - 1 file changed, 4 insertions(+), 1

[Patch bpf-next v3 9/9] selftests/bpf: add a test case for udp sockmap

2021-03-04 Thread Cong Wang
From: Cong Wang Add a test case to ensure redirection between two UDP sockets work. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- .../selftests/bpf/prog_tests/sockmap_listen.c | 140 ++ .../selftests/bpf/progs/test_s

Re: [RFC PATCH V2 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-04 Thread Andrew Lunn
> +/* MODULE EEPROM DATA */ > + > +enum { > + ETHTOOL_A_EEPROM_DATA_UNSPEC, > + ETHTOOL_A_EEPROM_DATA_HEADER, > + > + ETHTOOL_A_EEPROM_DATA_OFFSET, > + ETHTOOL_A_EEPROM_DATA_LENGTH, > + ETHTOOL_A_EEPROM_DATA_PAGE, > + ETHTOOL_A_EEPROM_DATA_BANK, > + ETHTOOL_A_EEPROM_DATA

[PATCH] net: tehuti: fix error return code in bdx_probe()

2021-03-04 Thread Jia-Ju Bai
When bdx_read_mac() fails, no error return code of bdx_probe() is assigned. To fix this bug, err is assigned with -EFAULT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/tehuti/tehuti.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers

RE: [RFC PATCH V2 net-next 5/5] ethtool: Add fallback to get_module_eeprom from netlink command

2021-03-04 Thread Don Bollinger
> > > +static int fallback_set_params(struct eeprom_data_req_info *request, > > > +struct ethtool_modinfo *modinfo, > > > +struct ethtool_eeprom *eeprom) { > > > > This is translating the new data structure into the old. Hence, I > > assume we have i

RE: [RFC PATCH V2 net-next 5/5] ethtool: Add fallback to get_module_eeprom from netlink command

2021-03-04 Thread Don Bollinger
> > --- a/net/ethtool/eeprom.c > > +++ b/net/ethtool/eeprom.c > > @@ -26,6 +26,88 @@ struct eeprom_data_reply_data { #define > > EEPROM_DATA_REPDATA(__reply_base) \ > > container_of(__reply_base, struct eeprom_data_reply_data, base) > > > > +static int fallback_set_params(struct eeprom_data_re

Re: [virtio-dev] Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-03-04 Thread Jason Wang
On 2021/3/4 9:50 下午, Cornelia Huck wrote: On Thu, 4 Mar 2021 16:24:16 +0800 Jason Wang wrote: On 2021/3/3 4:29 下午, Cornelia Huck wrote: On Wed, 3 Mar 2021 12:01:01 +0800 Jason Wang wrote: On 2021/3/2 8:08 下午, Cornelia Huck wrote: On Mon, 1 Mar 2021 11:51:08 +0800 Jason Wang wrote:

Re: [PATCH resend] netlink.7: note not reliable if NETLINK_NO_ENOBUFS

2021-03-04 Thread Pablo Neira Ayuso
Hi Alexander, On Thu, Mar 04, 2021 at 03:57:28PM -0500, Alexander Aring wrote: > This patch adds a note to the netlink manpage that if NETLINK_NO_ENOBUFS > is set there is no additional handling to make netlink reliable. It just > disables the error notification. A bit more background on this tog

Re: [RFC v4 10/11] vduse: Introduce a workqueue for irq injection

2021-03-04 Thread Jason Wang
On 2021/3/4 4:58 下午, Yongji Xie wrote: On Thu, Mar 4, 2021 at 2:59 PM Jason Wang wrote: On 2021/2/23 7:50 下午, Xie Yongji wrote: This patch introduces a workqueue to support injecting virtqueue's interrupt asynchronously. This is mainly for performance considerations which makes sure the pus

[PATCH] net: intel: iavf: fix error return code of iavf_init_get_resources()

2021-03-04 Thread Jia-Ju Bai
When iavf_process_config() fails, no error return code of iavf_init_get_resources() is assigned. To fix this bug, err is assigned with the return value of iavf_process_config(), and then err is checked. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/intel/iavf/iavf_

Re: [RFC v4 11/11] vduse: Support binding irq to the specified cpu

2021-03-04 Thread Jason Wang
On 2021/3/4 4:19 下午, Yongji Xie wrote: On Thu, Mar 4, 2021 at 3:30 PM Jason Wang wrote: On 2021/2/23 7:50 下午, Xie Yongji wrote: Add a parameter for the ioctl VDUSE_INJECT_VQ_IRQ to support injecting virtqueue's interrupt to the specified cpu. How userspace know which CPU is this irq for?

Re: [RFC v4 07/11] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-03-04 Thread Jason Wang
On 2021/3/4 4:05 下午, Yongji Xie wrote: On Thu, Mar 4, 2021 at 2:27 PM Jason Wang wrote: On 2021/2/23 7:50 下午, Xie Yongji wrote: This VDUSE driver enables implementing vDPA devices in userspace. Both control path and data path of vDPA devices will be able to be handled in userspace. In the

Re: [PATCH bpf-next v4 0/5] PROG_TEST_RUN support for sk_lookup programs

2021-03-04 Thread Alexei Starovoitov
On Wed, Mar 3, 2021 at 2:18 AM Lorenz Bauer wrote: > > We don't have PROG_TEST_RUN support for sk_lookup programs at the > moment. So far this hasn't been a problem, since we can run our > tests in a separate network namespace. For benchmarking it's nice > to have PROG_TEST_RUN, so I've gone and i

Re: [PATCH 4/4] nfc: Avoid endless loops caused by repeated llcp_sock_connect()(Internet mail)

2021-03-04 Thread Xiaoming Ni
On 2021/3/3 17:28, kiyin(尹亮) wrote: Hi xiaoming, the path can only fix the endless loop problem. it can't fix the meaningless llcp_sock->service_name problem. if we set llcp_sock->service_name to meaningless string, the connect will be failed. and sk->sk_state will not be LLCP_CONNECTED.

Re: Re: [RFC v4 10/11] vduse: Introduce a workqueue for irq injection

2021-03-04 Thread Yongji Xie
On Fri, Mar 5, 2021 at 11:05 AM Jason Wang wrote: > > > On 2021/3/4 4:58 下午, Yongji Xie wrote: > > On Thu, Mar 4, 2021 at 2:59 PM Jason Wang wrote: > >> > >> On 2021/2/23 7:50 下午, Xie Yongji wrote: > >>> This patch introduces a workqueue to support injecting > >>> virtqueue's interrupt asynchrono

[PATCH] marvell: libertas_tf: fix error return code of if_usb_prog_firmware()

2021-03-04 Thread Jia-Ju Bai
When check_fwfile_format() fails, no error return code of if_usb_prog_firmware() is assigned. To fix this bug, ret is assigned with -EINVAL as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/marvell/libertas_tf/if_usb.c | 4 +++- 1 file changed, 3 i

pull-request: bpf 2021-03-04

2021-03-04 Thread Alexei Starovoitov
Hi David, hi Jakub, The following pull-request contains BPF updates for your *net* tree. We've added 7 non-merge commits during the last 4 day(s) which contain a total of 9 files changed, 128 insertions(+), 40 deletions(-). The main changes are: 1) Fix 32-bit cmpxchg, from Brendan. 2) Fix atom

Re: [RFC v4 06/11] vduse: Implement an MMU-based IOMMU driver

2021-03-04 Thread Jason Wang
On 2021/3/4 1:12 下午, Yongji Xie wrote: On Thu, Mar 4, 2021 at 12:21 PM Jason Wang wrote: On 2021/2/23 7:50 下午, Xie Yongji wrote: This implements a MMU-based IOMMU driver to support mapping kernel dma buffer into userspace. The basic idea behind it is treating MMU (VA->PA) as IOMMU (IOVA->PA

Re: Re: [RFC v4 11/11] vduse: Support binding irq to the specified cpu

2021-03-04 Thread Yongji Xie
On Fri, Mar 5, 2021 at 11:11 AM Jason Wang wrote: > > > On 2021/3/4 4:19 下午, Yongji Xie wrote: > > On Thu, Mar 4, 2021 at 3:30 PM Jason Wang wrote: > >> > >> On 2021/2/23 7:50 下午, Xie Yongji wrote: > >>> Add a parameter for the ioctl VDUSE_INJECT_VQ_IRQ to support > >>> injecting virtqueue's inte

Re: [RFC v4 10/11] vduse: Introduce a workqueue for irq injection

2021-03-04 Thread Jason Wang
On 2021/3/5 11:30 上午, Yongji Xie wrote: On Fri, Mar 5, 2021 at 11:05 AM Jason Wang wrote: On 2021/3/4 4:58 下午, Yongji Xie wrote: On Thu, Mar 4, 2021 at 2:59 PM Jason Wang wrote: On 2021/2/23 7:50 下午, Xie Yongji wrote: This patch introduces a workqueue to support injecting virtqueue's int

Re: [RFC v4 11/11] vduse: Support binding irq to the specified cpu

2021-03-04 Thread Jason Wang
On 2021/3/5 11:37 上午, Yongji Xie wrote: On Fri, Mar 5, 2021 at 11:11 AM Jason Wang wrote: On 2021/3/4 4:19 下午, Yongji Xie wrote: On Thu, Mar 4, 2021 at 3:30 PM Jason Wang wrote: On 2021/2/23 7:50 下午, Xie Yongji wrote: Add a parameter for the ioctl VDUSE_INJECT_VQ_IRQ to support injecting

Re: [PATCH net-next 0/6] net: qualcomm: rmnet: stop using C bit-fields

2021-03-04 Thread subashab
On 2021-03-04 15:34, Alex Elder wrote: This series converts data structures defined in so they use integral field values with bitfield masks rather than rely on C bit-fields. I first proposed doing something like this long ago when my confusion about this code (and the memory layout it was supp

Re: Re: [RFC v4 07/11] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-03-04 Thread Yongji Xie
On Fri, Mar 5, 2021 at 11:20 AM Jason Wang wrote: > > > On 2021/3/4 4:05 下午, Yongji Xie wrote: > > On Thu, Mar 4, 2021 at 2:27 PM Jason Wang wrote: > >> > >> On 2021/2/23 7:50 下午, Xie Yongji wrote: > >>> This VDUSE driver enables implementing vDPA devices in userspace. > >>> Both control path and

Re: [PATCH net-next 1/6] net: qualcomm: rmnet: mark trailer field endianness

2021-03-04 Thread Bjorn Andersson
On Thu 04 Mar 16:34 CST 2021, Alex Elder wrote: > The fields in the checksum trailer structure used for QMAP protocol > RX packets are all big-endian format, so define them that way. > > It turns out these fields are never actually used by the RMNet code. > The start offset is always assumed to b

Re: [PATCH net-next 2/6] net: qualcomm: rmnet: simplify some byte order logic

2021-03-04 Thread Bjorn Andersson
On Thu 04 Mar 16:34 CST 2021, Alex Elder wrote: > In rmnet_map_ipv4_ul_csum_header() and rmnet_map_ipv6_ul_csum_header() > the offset within a packet at which checksumming should commence is > calculated. This calculation involves byte swapping and a forced type > conversion that makes it hard to

Re: [BUG] hitting bug when running spinlock test

2021-03-04 Thread Yonghong Song
On 3/4/21 11:03 AM, Jiri Olsa wrote: hi, I'm getting attached BUG/crash when running in parralel selftests, like: while :; do ./test_progs -t spinlock; done while :; do ./test_progs ; done it's the latest bpf-next/master, I can send the .config if needed, but I don't think there's anyt

Re: [PATCH net-next 3/6] net: qualcomm: rmnet: kill RMNET_MAP_GET_*() accessor macros

2021-03-04 Thread Bjorn Andersson
On Thu 04 Mar 16:34 CST 2021, Alex Elder wrote: > The following macros, defined in "rmnet_map.h", assume a socket > buffer is provided as an argument without any real indication this > is the case. > RMNET_MAP_GET_MUX_ID() > RMNET_MAP_GET_CD_BIT() > RMNET_MAP_GET_PAD() > RMNET_MAP_

Re: [PATCH] ibmvnic: remove excessive irqsave

2021-03-04 Thread Sukadev Bhattiprolu
angkery [angk...@163.com] wrote: > From: Junlin Yang > > ibmvnic_remove locks multiple spinlocks while disabling interrupts: > spin_lock_irqsave(&adapter->state_lock, flags); > spin_lock_irqsave(&adapter->rwi_lock, flags); > > there is no need for the second irqsave,since interrupts are disabled

Re: [PATCH net-next 4/6] net: qualcomm: rmnet: use field masks instead of C bit-fields

2021-03-04 Thread Bjorn Andersson
On Thu 04 Mar 16:34 CST 2021, Alex Elder wrote: > The actual layout of bits defined in C bit-fields (e.g. int foo : 3) > is implementation-defined. Structures defined in > address this by specifying all bit-fields twice, to cover two > possible layouts. > > I think this pattern is repetitive an

Re: [PATCH net-next 0/6] net: qualcomm: rmnet: stop using C bit-fields

2021-03-04 Thread Alex Elder
On 3/4/21 9:44 PM, subas...@codeaurora.org wrote: Can you share what all tests have been done with these patches I'm testing with all of them applied and "it works." On the first three I think they're simple enough that you can see by inspection they should be OK. For the rest I tested more

Re: [PATCH net-next 5/6] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum trailer

2021-03-04 Thread Bjorn Andersson
On Thu 04 Mar 16:34 CST 2021, Alex Elder wrote: > Replace the use of C bit-fields in the rmnet_map_dl_csum_trailer > structure with a single one-byte field, using constant field masks > to encode or get at embedded values. > Reviewed-by: Bjorn Andersson Regards, Bjorn > Signed-off-by: Alex El

Re: [PATCH net-next 6/6] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum header

2021-03-04 Thread Bjorn Andersson
On Thu 04 Mar 16:34 CST 2021, Alex Elder wrote: > Replace the use of C bit-fields in the rmnet_map_ul_csum_header > structure with a single two-byte (big endian) structure member, > and use field masks to encode or get values within it. > > Previously rmnet_map_ipv4_ul_csum_header() would update

<    1   2   3   >