Re: [PATCH V2 02/16] net: iosm: irq handling

2021-04-20 Thread David Miller
From: M Chetan Kumar Date: Tue, 20 Apr 2021 21:42:56 +0530 > 1) Request interrupt vector, frees allocated resource. > 2) Registers IRQ handler. > > Signed-off-by: M Chetan Kumar > --- > v2: Streamline multiple returns using goto. > --- > drivers/net/wwan/iosm/iosm_ipc_irq.c | 91 ++

[PATCH net-next] korina: Fix conflict with global symbol desc_empty on x86.

2021-04-20 Thread David Miller
Signed-off-by: David S. Miller --- drivers/net/ethernet/korina.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index 4878e527e3c8..4613bc21130b 100644 --- a/drivers/net/ethernet/korina.c +++ b

Re: [PATCH net-next v2] net: phy: at803x: fix probe error if copper page is selected

2021-04-20 Thread David Bauer
an > error. > > Fixes: c329e5afb42f ("net: phy: at803x: select correct page on config init") > Signed-off-by: Michael Walle Reviewed-by: David Bauer Best David > --- > Changes since v1: > - take the bus lock > > drivers/net/phy/at803x.c | 23

RE: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-20 Thread David Laight
gt; - return page->dma_addr; > > + dma_addr_t ret = page->dma_addr[0]; > > + if (sizeof(dma_addr_t) > sizeof(unsigned long)) > > + ret |= (dma_addr_t)page->dma_addr[1] << 16 << 16; > > We don't seem to have a handy

Re: [PATCH 2/2] neighbour: allow NUD_NOARP entries to be forced GCed

2021-04-19 Thread David Ahern
On 4/19/21 10:52 AM, Kasper Dupont wrote: > On 19/04/21 10.10, David Ahern wrote: >> On 4/19/21 9:44 AM, Kasper Dupont wrote: >>> >>> Is there any update regarding this change? >>> >>> I noticed this regression when it was used in a DoS attack on on

Re: [PATCH] net: ethernet: ravb: Fix release of refclk

2021-04-19 Thread David Miller
From: Adam Ford Date: Sat, 17 Apr 2021 08:23:29 -0500 > The call to clk_disable_unprepare() can happen before priv is > initialized. This means moving clk_disable_unprepare out of > out_release into a new label. > > Fixes: 8ef7adc6beb2("net: ethernet: ravb: Enable optional refclk") > Signed-off-

Re: [PATCH][next] sctp: Fix out-of-bounds warning in sctp_process_asconf_param()

2021-04-19 Thread David Miller
From: "Gustavo A. R. Silva" Date: Fri, 16 Apr 2021 19:07:05 -0500 > Dave, > > On 4/16/21 19:00, patchwork-bot+netdev...@kernel.org wrote: >> Hello: >> >> This patch was applied to netdev/net-next.git (refs/heads/master): >> >> On Fri, 16 Apr 2021 14:12:36 -0500 you wrote: >>> Fix the following

Re: [PATCH 2/2] neighbour: allow NUD_NOARP entries to be forced GCed

2021-04-19 Thread David Ahern
On 4/19/21 9:44 AM, Kasper Dupont wrote: > On 17/03/21 15.53, Thadeu Lima de Souza Cascardo wrote: >> IFF_POINTOPOINT interfaces use NUD_NOARP entries for IPv6. It's possible to >> fill up the neighbour table with enough entries that it will overflow for >> valid connections after that. >> >> This

Re: [PATCH net-next v3] virtio-net: page_to_skb() use build_skb when there's sufficient tailroom

2021-04-19 Thread David Ahern
On 4/16/21 2:16 AM, Xuan Zhuo wrote: > In page_to_skb(), if we have enough tailroom to save skb_shared_info, we > can use build_skb to create skb directly. No need to alloc for > additional space. And it can save a 'frags slot', which is very friendly > to GRO. > > Here, if the payload of the rece

Re: Different behavior wrt VRF and no VRF - packet Tx

2021-04-18 Thread David Ahern
On 4/15/21 8:57 PM, Bala Sajja wrote: >please find the ip link show output(for ifindex) and ping and > its corresponding perf fib events output. OIF seems MGMT(ifindex 5) > always, not enslaved interfaces ? that is the reason it does not work.

Re: [PATCH iproute2] ip: drop 2-char command assumption

2021-04-18 Thread David Ahern
On 4/17/21 8:49 PM, Tony Ambardar wrote: > The 'ip' utility hardcodes the assumption of being a 2-char command, where > any follow-on characters are passed as an argument: > > $ ./ip-full help > Object "-full" is unknown, try "ip help". > > This confusing behaviour isn't seen with 'tc' for ex

Re: [PATCH net-next 2/2] selftests: fib_nexthops: Test large scale nexthop flushing

2021-04-18 Thread David Ahern
ib_nexthops.sh | 15 +++ > 1 file changed, 15 insertions(+) > Reviewed-by: David Ahern

Re: [PATCH net-next 1/2] nexthop: Restart nexthop dump based on last dumped nexthop identifier

2021-04-18 Thread David Ahern
-off-by: Ido Schimmel > Reviewed-by: Petr Machata > --- > net/ipv4/nexthop.c | 14 ++ > 1 file changed, 6 insertions(+), 8 deletions(-) > Reviewed-by: David Ahern Any reason not to put this in -net with a Fixes tag?

RE: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread David Laight
f (sizeof(dma_addr_t) > sizeof(unsigned long)) > + ret |= (dma_addr_t)page->dma_addr[1] << 16 << 16; Ugly as well. Why not just replace the (dma_addr_t) cast with a (u64) one? Looks better than the double shift. Same could be done for the '>> 32

RE: [PATCH 2/2] mm: Indicate pfmemalloc pages in compound_head

2021-04-17 Thread David Laight
long pp_magic; > + unsigned long xmi; > + unsigned long _pp_mapping_pad; > unsigned long dma_addr[2]; > }; You've deleted the comment. I also think there should be a comment that dma_addr[0] must be aliased to ->index

RE: Bogus struct page layout on 32-bit

2021-04-17 Thread David Laight
the IO request needs to be errored (or a bounce buffer used). Otherwise you can get particularly horrid corruptions. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

RE: [PATCH net-next v2 0/3] introduce skb_for_each_frag()

2021-04-17 Thread David Laight
t very easy to miss the correct definition when reading code. I much prefer local variables to either function scope or be defined for very local use at the top of a very small block. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

RE: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread David Laight
dr_t ret = page->dma_addr[0]; > + if (sizeof(dma_addr_t) > sizeof(unsigned long)) > + ret |= (dma_addr_t)page->dma_addr[1] << 32; > + return ret; > +} Won't some compiler/option combinations generate an error for the '<< 32' when dma_a

Re: PROBLEM: DoS Attack on Fragment Cache

2021-04-16 Thread David Ahern
[ cc author of 648700f76b03b7e8149d13cc2bdb3355035258a9 ] On 4/16/21 3:58 PM, Keyu Man wrote: > Hi, > >   > >     My name is Keyu Man. We are a group of researchers from University > of California, Riverside. Zhiyun Qian is my advisor. We found the code > in processing IPv4/IPv6 fragments will p

RE: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-16 Thread David Laight
From: Matthew Wilcox > Sent: 15 April 2021 23:22 > > On Thu, Apr 15, 2021 at 09:11:56PM +0000, David Laight wrote: > > Isn't it possible to move the field down one long? > > This might require an explicit zero - but this is not a common > > code path - the extra w

RE: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-15 Thread David Laight
hink I'd use explicit dma_addr_hi and dma_addr_lo and separate read/write functions just to make absolutely sure nothing picks up the swapped value. Isn't it possible to move the field down one long? This might require an explicit zero - but this is not a common code path - the extra write will be noise. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: Different behavior wrt VRF and no VRF - packet Tx

2021-04-15 Thread David Ahern
On 4/15/21 12:15 AM, Bala Sajja wrote: > When interfaces are not part of VRF and below ip address config is > done on these interfaces, ping with -I (interface) option, we see > packets transmitting out of the right interfaces. > > ip addr add 2.2.2.100 peer 1.1.1.100/32 dev enp0s3 > ip addr ad

Re: XFRM programming with VRF enslaved interfaces

2021-04-15 Thread David Ahern
[ cc Ben ] On 4/15/21 9:51 AM, Rob Dover wrote: > Hi there, > > I'm working on an application that's programming IPSec connections via XFRM > on VRFs. I'm seeing some strange behaviour in cases where there is an > enslaved interface on the VRF - was wondering if anyone has seen something > lik

Re: [PATCH v2 bpf-next] cpumap: bulk skb using netif_receive_skb_list

2021-04-15 Thread David Ahern
On 4/15/21 9:03 AM, Lorenzo Bianconi wrote: >> On 4/15/21 8:05 AM, Daniel Borkmann wrote: > > [...] &stats); >>> >>> Given we stop counting drops with the netif_receive_skb_list(), we >>> should then >>> also remove drops from trace_xdp_cpumap_kthread(), imho, as otherwise it >>> is rather >>

Re: [PATCH v2 bpf-next] cpumap: bulk skb using netif_receive_skb_list

2021-04-15 Thread David Ahern
On 4/15/21 8:05 AM, Daniel Borkmann wrote: > On 4/13/21 6:22 PM, Lorenzo Bianconi wrote: >> Rely on netif_receive_skb_list routine to send skbs converted from >> xdp_frames in cpu_map_kthread_run in order to improve i-cache usage. >> The proposed patch has been tested running xdp_redirect_cpu bpf s

Re: [PATCH v3 net-next] net: multipath routing: configurable seed

2021-04-14 Thread David Ahern
On 4/14/21 12:33 AM, Pavel Balaev wrote: >> >> This should work the same for IPv6. > I wanted to add IPv6 support after IPv4 will be approved, > anyway no problem, will add IPv6 in next version >> And please add test cases under tools/testing/selftests/net. > This feature cannot be tested whithin

[PATCH net-next v2] net: phy: at803x: select correct page on config init

2021-04-14 Thread David Bauer
selected by the bootloader. Notably, Ubiquiti UniFi bootloaders show this behavior. Select the copper page when probing to circumvent this. Signed-off-by: David Bauer --- Changes in v2: - rebase to latest net-next - squash both patches drivers/net/phy/at803x.c | 50

[PATCH net-next 2/2] net: phy: at803x: select correct page on config init

2021-04-14 Thread David Bauer
selected by the bootloader. Notably, Ubiquiti UniFi bootloaders show this behavior. Select the copper page when probing to circumvent this. Signed-off-by: David Bauer --- drivers/net/phy/at803x.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy

[PATCH net-next 1/2] net: phy: at803x: use paged reads

2021-04-14 Thread David Bauer
Refactor the page-switching in at803x_aneg_done to use paged reads as suggested by Andrew Lunn. This way, potential race conditions are avoided, as the MDIO lock was previously not taken. Suggested-by: Andrew Lunn Signed-off-by: David Bauer --- drivers/net/phy/at803x.c | 42

RE: [PATCH bpf-next 13/17] selftests/bpf: use -O0 instead of -Og in selftests builds

2021-04-14 Thread David Laight
ls. They can get confusing. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

RE: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-14 Thread David Laight
be 'long' aligned. So you don't get anything horrid like byte accesses. On 64bit dma_addr will remain 64bit aligned. On arm32 dma_addr will be 32bit aligned - but forcing two 32bit access won't make any difference. So definitely the only simple fix.

Re: [PATCH v2 net-next 0/9] net: Korina improvements

2021-04-14 Thread David Miller
From: Thomas Bogendoerfer Date: Wed, 14 Apr 2021 17:29:36 +0200 > While converting Mikrotik RB532 support to use device tree I stumbled > over the korina ethernet driver, which used way too many MIPS specific > hacks. This series cleans this all up and adds support for device tree. > > Changes i

Re: [PATCH net-next 0/5] dpaa2-switch: add tc hardware offload on ingress traffic

2021-04-14 Thread David Miller
From: Ioana Ciornei Date: Wed, 14 Apr 2021 18:17:28 +0300 > This patch set is in the 'Accepted' state in patchwork but is nowhere to > be found in the net-next tree. > > Should I do something else or it was just not pushed yet? It should be there now. Thanks.

Re: [PATCH net] vrf: fix a comment about loopback device

2021-04-14 Thread David Ahern
+), 6 deletions(-) > Acked-by: David Ahern Thanks, Nicolas.

RE: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-14 Thread David Laight
dary and the address is taken). It also doesn't affect 64bit - since the previous field forces 64bit alignment. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

RE: [PATCH rdma-next 00/10] Enable relaxed ordering for ULPs

2021-04-14 Thread David Laight
O flag. There could also be flags in the bridges and root complex to ignore the RO flag even if it is set. Then the Linux kernel can have option(s) to tell the driver not to enable RO - even though the driver believes it should all work. This could be a single global flag, or fin-grained in so

Re: [PATCH v3 net-next] net: multipath routing: configurable seed

2021-04-13 Thread David Ahern
On 4/13/21 4:55 AM, Balaev Pavel wrote: > Ability for a user to assign seed value to multipath route hashes. > Now kernel uses random seed value to prevent hash-flooding DoS attacks; > however, it disables some use cases, f.e: > > +---++--+++ > | |-eth0---| FW

Re: [PATCH v3 net-next] net: multipath routing: configurable seed

2021-04-13 Thread David Miller
From: Balaev Pavel Date: Tue, 13 Apr 2021 14:55:04 +0300 > @@ -222,6 +230,9 @@ struct netns_ipv4 { > #ifdef CONFIG_IP_ROUTE_MULTIPATH > u8 sysctl_fib_multipath_use_neigh; > u8 sysctl_fib_multipath_hash_policy; > + int sysctl_fib_multipath_hash_seed; > + struct multipath_seed_

RE: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-13 Thread David Laight
dma_addr_t dma_addr; > + unsigned long _pp_flags; > + unsigned long pp_magic; > + unsigned long xmi; > + unsigned long _pp_mapping_pad; > + dma_addr_t dma_addr;/* might be one or two words */ > }; Isn't that 6 words? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

RE: [PATCH net-next v2 0/3] introduce skb_for_each_frag()

2021-04-13 Thread David Laight
ing that generated: unsigned int nr_frags = skb_shinfo(skb)->nr_frags; for (i = 0; i < nr_frags; i++) { since that will run faster for most loops. But that is ~impossible to do since you can't declare variables inside the (...) that are scoped to the loop. David

Re: [PATCH net] virtio-net: suppress bad irq warning for tx napi

2021-04-12 Thread David Miller
From: "Michael S. Tsirkin" Date: Mon, 12 Apr 2021 18:33:45 -0400 > On Mon, Apr 12, 2021 at 06:08:21PM -0400, Michael S. Tsirkin wrote: >> OK I started looking at this again. My idea is simple. >> A. disable callbacks before we try to drain skbs >> B. actually do disable callbacks even with event

Re: [PATCH net-next 6/7] net: stmmac: Enable RX via AF_XDP zero-copy

2021-04-12 Thread David Miller
+ /* synchronize_rcu() needed for pending XDP buffers to drain */ + for (queue = 0; queue < rx_queues_cnt; queue++) { + rx_q = &priv->rx_queue[queue]; + if (rx_q->xsk_pool) { + synchronize_rcu(); Are you sure this is safe here, especial

RE: [PATCH rdma-next 00/10] Enable relaxed ordering for ULPs

2021-04-10 Thread David Laight
of letting the cpu do 'relaxed order' writes to PCIe targets! For a typical ethernet driver the receive interrupt just means 'go and look at the receive descriptor ring'. So there is an absolute requirement that the writes for data buffer complete before the write to the receive descriptor. There is no requirement for the interrupt (requested after the descriptor write) to have been seen by the cpu. Quite often the driver will find the 'receive complete' descriptor when processing frames from an earlier interrupt (and nothing to do in response to the interrupt itself). So the write to the receive descriptor would have to have RO clear to ensure that all the buffer writes complete first. (The furthest I've got into PCIe internals was fixing the bug in some vendor-supplied FPGA logic that failed to correctly handle multiple data TLP responses to a single read TLP. Fortunately it wasn't in the hard-IP bit.) David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

RE: [PATCH net] ixgbe: fix unbalanced device enable/disable in suspend/resume

2021-04-09 Thread Switzer, David
>-Original Message- >From: Yongxin Liu >Sent: Monday, March 22, 2021 12:15 AM >To: vaibhavgupt...@gmail.com; andrewx.bow...@intel.com; Nguyen, Anthony >L >Cc: netdev@vger.kernel.org; linux-ker...@vger.kernel.org; >da...@davemloft.net; Brandeburg, Jesse ; intel- >wired-...@lists.osuosl.o

RE: [net PATCH] ixgbe: Fix NULL pointer dereference in ethtool loopback test

2021-04-09 Thread Switzer, David
>-Original Message- >From: Alexander Duyck >Sent: Monday, March 8, 2021 12:42 PM >To: intel-wired-...@lists.osuosl.org >Cc: Brandeburg, Jesse ; Nguyen, Anthony L >; netdev@vger.kernel.org >Subject: [net PATCH] ixgbe: Fix NULL pointer dereference in ethtool loopback >test > >From: Alexand

RE: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2"

2021-04-09 Thread David Laight
: buffer_length = RX_HEAD_PADDING + ETH_HLEN + netdev->mtu + ETH_FCS_LEN; The compiler should add all the constants together, so the generated code ought to be the same. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: [PATCH v3 net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)

2021-04-08 Thread David Miller
From: Dexuan Cui Date: Fri, 9 Apr 2021 00:24:51 + >> From: David Miller >> Sent: Thursday, April 8, 2021 4:46 PM >> ... >> > +struct gdma_msg_hdr { >> > + u32 hdr_type; >> > + u32 msg_type; >> > + u16 msg_version; >>

Re: [PATCH v3 net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)

2021-04-08 Thread David Miller
From: Dexuan Cui Date: Thu, 8 Apr 2021 15:58:40 -0700 > +struct gdma_msg_hdr { > + u32 hdr_type; > + u32 msg_type; > + u16 msg_version; > + u16 hwc_msg_id; > + u32 msg_size; > +} __packed; > + > +struct gdma_dev_id { > + union { > + struct { > +

Re: [PATCH v3] ip-nexthop: support flush by id

2021-04-08 Thread David Ahern
On 4/5/21 7:33 PM, Chunmei Xu wrote: > since id is unique for nexthop, it is heavy to dump all nexthops. > use existing delete_nexthop to support flush by id > > Signed-off-by: Chunmei Xu > --- > ip/ipnexthop.c | 20 +++- > 1 file changed, 19 insertions(+), 1 deletion(-) > appl

Re: [PATCH v2] ipv6: report errors for iftoken via netlink extack

2021-04-08 Thread David Ahern
net.c | 3 ++- > net/ipv6/addrconf.c | 32 ++-- > 4 files changed, 31 insertions(+), 10 deletions(-) > Reviewed-by: David Ahern

Re: [RFC net-next 0/1] seg6: Counters for SRv6 Behaviors

2021-04-07 Thread David Ahern
Since this is a single patch set, just put this good cover letter content as the message in the patch.

Re: [RFC net-next 1/1] seg6: add counters support for SRv6 Behaviors

2021-04-07 Thread David Ahern
On 4/7/21 12:03 PM, Andrea Mayer wrote: > diff --git a/include/uapi/linux/seg6_local.h b/include/uapi/linux/seg6_local.h > index 3b39ef1dbb46..ae5e3fd12b73 100644 > --- a/include/uapi/linux/seg6_local.h > +++ b/include/uapi/linux/seg6_local.h > @@ -27,6 +27,7 @@ enum { > SEG6_LOCAL_OIF, >

Re: [PATCH] bnx2x: Fix potential infinite loop

2021-04-07 Thread David Miller
From: Colin King Date: Wed, 7 Apr 2021 15:28:02 +0100 > From: Colin Ian King > > The for_each_tx_queue loop iterates with a u8 loop counter i and > compares this with the loop upper limit of bp->num_queues that > is an int type. There is a potential infinite loop if bp->num_queues > is larger

Re: [PATCH net-next] net: tipc: Fix spelling errors in net/tipc module

2021-04-06 Thread David Miller
From: Zheng Yongjun Date: Tue, 6 Apr 2021 23:19:09 +0800 > These patches fix a series of spelling errors in net/tipc module. > > Reported-by: Hulk Robot > Signed-off-by: Zheng Yongjun This does not apply to net-next, please respin. Thanks.

Re: [PATCH net v4] atl1c: move tx cleanup processing out of interrupt

2021-04-06 Thread David Miller
From: Gatis Peisenieks Date: Tue, 06 Apr 2021 17:49:32 +0300 > Tx queue cleanup happens in interrupt handler on same core as rx queue > processing. Both can take considerable amount of processing in high > packet-per-second scenarios. > > Sending big amounts of packets can stall the rx processin

Re: [PATCH] net: hso: fix null-ptr-deref during tty device unregistration

2021-04-06 Thread David Miller
From: Anirudh Rayabharam Date: Tue, 6 Apr 2021 18:13:59 +0530 > Multiple ttys try to claim the same the minor number causing a double > unregistration of the same device. The first unregistration succeeds > but the next one results in a null-ptr-deref. > > The get_free_serial_index() function r

Re: [PATCH net-next v5] net: x25: Queue received packets in the drivers instead of per-CPU queues

2021-04-06 Thread David Miller
From: Xie He Date: Fri, 2 Apr 2021 02:30:00 -0700 > X.25 Layer 3 (the Packet Layer) expects layer 2 to provide a reliable > datalink service such that no packets are reordered or dropped. And > X.25 Layer 2 (the LAPB layer) is indeed designed to provide such service. > > However, this reliabili

Re: [PATCH] net: tun: set tun->dev->addr_len during TUNSETLINK processing

2021-04-05 Thread David Miller
From: Phillip Potter Date: Mon, 5 Apr 2021 12:35:55 +0100 > When changing type with TUNSETLINK ioctl command, set tun->dev->addr_len > to match the appropriate type, using new tun_get_addr_len utility function > which returns appropriate address length for given type. Fixes a > KMSAN-found unini

Re: [PATCH v2] ip-nexthop: support flush by id

2021-04-02 Thread David Ahern
On 3/31/21 10:03 PM, Chunmei Xu wrote: > since id is unique for nexthop, it is heavy to dump all nexthops. > use existing delete_nexthop to support flush by id > > Signed-off-by: Chunmei Xu > --- > ip/ipnexthop.c | 20 +++- > 1 file changed, 19 insertions(+), 1 deletion(-) > th

Re: [iproute2-next] tipc: use the libmnl functions in lib/mnl_utils.c

2021-04-02 Thread David Ahern
On 3/31/21 8:34 PM, Hoang Le wrote: > To avoid code duplication, tipc should be converted to use the helper > functions for working with libmnl in lib/mnl_utils.c > > Acked-by: Jon Maloy > Signed-off-by: Hoang Le > --- > tipc/bearer.c| 38 ++ > tipc/cmdl.c | 2 - > tipc/

Re: [PATCH net] net: udp: Add support for getsockopt(..., ..., UDP_GRO, ..., ...);

2021-04-01 Thread David Ahern
; case for UDP_GRO > > Fixes: e20cf8d3f1f7 ("udp: implement GRO for plain UDP sockets.") > Signed-off-by: Norman Maurer > --- > net/ipv4/udp.c | 4 > 1 file changed, 4 insertions(+) > Reviewed-by: David Ahern

Re: [PATCH] net/rxrpc: Fix a use after free in rxrpc_input_packet

2021-04-01 Thread David Howells
in skb_unshare() on error, my patch removes the > rxrpc_eaten_skb() to avoid the uaf. But you remove the accounting, which might lead to an assertion failure in af_rxrpc_exit(). That said, rxrpc_eaten_skb() should probably decrement rxrpc_n_rx_skbs, not increment it... David

Re: [RFC] add extack errors for iptoken

2021-04-01 Thread David Ahern
On 3/31/21 9:49 PM, Stephen Hemminger wrote: > @@ -5681,14 +5682,29 @@ static int inet6_set_iftoken(struct inet6_dev *idev, > struct in6_addr *token) > > ASSERT_RTNL(); > > - if (!token) > + if (!token) { You forgot to add a message here. > return -EINVAL; > -

Re: [PATCH] udp: Add support for getsockopt(..., ..., UDP_GRO, ..., ...)

2021-03-31 Thread David Ahern
On 3/31/21 7:10 AM, Norman Maurer wrote: > Friendly ping… > > As this missing change was most likely an oversight in the original commit I > do think it should go into 5.12 and subsequently stable as well. That’s also > the reason why I didn’t send a v2 and changed the commit message / subject

Re: [PATCH net-next] ip6_tunnel: sit: proper dev_{hold|put} in ndo_[un]init methods

2021-03-31 Thread David Miller
From: Eric Dumazet Date: Wed, 31 Mar 2021 08:00:24 +0200 > Can you merge this patch so that I can send my global fix for fallback > tunnels, with a correct Fixes: tag for this patch ? Done.

Re: [PATCH] ip-nexthop: support flush by id

2021-03-31 Thread David Ahern
On 3/31/21 5:53 AM, Ido Schimmel wrote: >> @@ -124,6 +125,9 @@ static int flush_nexthop(struct nlmsghdr *nlh, void *arg) >> if (tb[NHA_ID]) >> id = rta_getattr_u32(tb[NHA_ID]); >> >> +if (filter.id && filter.id != id) >> +return 0; >> + >> if (id && !delete_

Re: [PATCH] net/rds: Fix a use after free in rds_message_map_pages

2021-03-30 Thread David Miller
From: Lv Yunlong Date: Tue, 30 Mar 2021 03:16:02 -0700 > @@ -348,7 +348,7 @@ struct rds_message *rds_message_map_pages(unsigned long > *page_addrs, unsigned in > rm->data.op_sg = rds_message_alloc_sgs(rm, num_sgs); > if (IS_ERR(rm->data.op_sg)) { > rds_message_put(rm);

Re: ip-nexthop does not support flush by id

2021-03-30 Thread David Ahern
On 3/30/21 7:05 AM, Ido Schimmel wrote: > Looks like a bug. 'flush' does not really make sense with 'id', but > 'list id' works, so I think 'flush id' should also work. right, neither were intended. If you know the id, you don't need the generic list / flush option. > > Can you send a patch? Ag

RE: [PATCH net v2] enetc: Avoid implicit sign extension

2021-03-30 Thread David Laight
t; (flags << ENETC_TXBD_FLAGS_OFFSET); > > Isn't it sufficient that you replace "u8 flags" in the function > prototype with "u32 flags"? That would be much better. It may save the value having to be masked with 0xff as well. Regardless of the domain of function parameters/results (and local variables) using machine-register sized types will typically give better code. x86 is probably unique in having sub-32bit arithmetic. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: [PATCH iproute2-next] police: add support for packet-per-second rate limiting

2021-03-29 Thread David Ahern
On 3/26/21 6:50 AM, Simon Horman wrote: > From: Baowen Zheng > > Allow a policer action to enforce a rate-limit based on packets-per-second, > configurable using a packet-per-second rate and burst parameters. > > e.g. > # $TC actions add action police pkts_rate 1000 pkts_burst 200 index 1 > #

Re: [PATCH] Add Open/R to rt_protos

2021-03-29 Thread David Ahern
On 3/26/21 9:05 AM, Cooper Ry Lees wrote: > From: Cooper Lees > > - Open Routing is using ID 99 for it's installed routes > - https://github.com/facebook/openr > - Kernel has accepted 99 in `rtnetlink.h` > > Signed-of-by: Cooper Lees > --- > etc/iproute2/rt_protos | 1 + > 1 file changed, 1 in

Re: [PATCH 8/9] ip6_tunnel:: Correct function name parse_tvl_tnl_enc_lim() in the kerneldoc comments

2021-03-27 Thread David Ahern
ned-off-by: Xiongfeng Wang > --- > net/ipv6/ip6_tunnel.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: David Ahern

Re: [PATCH 1/9] l3mdev: Correct function names in the kerneldoc comments

2021-03-27 Thread David Ahern
g prototype for > l3mdev_master_upper_ifindex_by_index(). Prototype was for > l3mdev_master_upper_ifindex_by_index_rcu() instead > > Reported-by: Hulk Robot > Signed-off-by: Xiongfeng Wang > --- > net/l3mdev/l3mdev.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH] sit: use min

2021-03-27 Thread David Ahern
sit.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: David Ahern

RE: [PATCH] net: intel: Remove unused function pointer typedef ixgbe_mc_addr_itr

2021-03-26 Thread Switzer, David
>-Original Message- >From: Chen Lin >Sent: Monday, February 15, 2021 4:05 AM >To: da...@davemloft.net; k...@kernel.org >Cc: Brandeburg, Jesse ; Nguyen, Anthony L >; intel-wired-...@lists.osuosl.org; >netdev@vger.kernel.org; linux-ker...@vger.kernel.org; Chen Lin > >Subject: [PATCH] net:

Re: [PATCH net-next v2 0/6] ethtool: clarify the ethtool FEC interface

2021-03-26 Thread David Miller
From: Jakub Kicinski Date: Thu, 25 Mar 2021 19:07:21 -0700 > Our FEC configuration interface is one of the more confusing. > It also lacks any error checking in the core. This certainly > shows in the varying implementations across the drivers. > > Improve the documentation and add most basic ch

Re: [PATCH net-next] nexthop: Rename artifacts related to legacy multipath nexthop groups

2021-03-26 Thread David Ahern
gacy multipath groups is nh_grp_entry::hash_threshold. > Functions that assume this have "hthr" in the name. > > - The flag for resilient groups is nh_grp_entry::resilient. > Functions that assume this have "res" in the name. > > Besides the above, struct nh

Re: [PATCH] fddi: skfp: Rudimentary spello fixes

2021-03-25 Thread David Miller
From: Bhaskar Chowdhury Date: Thu, 25 Mar 2021 12:38:35 +0530 > > s/autohorized/authorized/ > s/recsource/resource/ > s/measuered/measured/ > sauthoriziation/authorization/ > > Signed-off-by: Bhaskar Chowdhury Does not apply cleanly to net-next please respin. Thank you.

Re: [net-next 05/15] net/mlx5e: Move params logic into its dedicated file

2021-03-25 Thread David Miller
From: Saeed Mahameed Date: Wed, 24 Mar 2021 22:04:28 -0700 > +static inline u8 mlx5e_get_rqwq_log_stride(u8 wq_type, int ndsegs) Please no inline in foo.c files. Thasnk you.

Re: [pull request][net-next 00/15] mlx5 updates 2021-03-24

2021-03-25 Thread David Miller
From: Saeed Mahameed Date: Wed, 24 Mar 2021 22:04:23 -0700 > From: Saeed Mahameed > > Hi Dave/Jakub, > > This series provides update to mlx5 netdev driver, mostly refactoring. > For more information please see tag log below. > > Please pull and let me know if there is any problem. Please res

Re: [PATCH] ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation

2021-03-25 Thread David Miller
From: Guenter Roeck Date: Thu, 25 Mar 2021 03:23:07 -0700 > mul_u64_u64_div_u64() is not exported. As result, every build with > CONFIG_PTP_1588_CLOCK_QORIQ=m (ie every allmodconfig build) fails with: > > ERROR: modpost: "mul_u64_u64_div_u64" [drivers/ptp/ptp-qoriq.ko] undefined! > > or a simil

Re: [PATCH 2/2] net: ipv4: route.c: Remove unnecessary if()

2021-03-25 Thread David Ahern
Signed-off-by: Yejune Deng > --- > net/ipv4/route.c | 16 ++-- > 1 file changed, 6 insertions(+), 10 deletions(-) > Reviewed-by: David Ahern

Re: rfc5837 and rfc8335

2021-03-24 Thread David Ahern
On 3/23/21 10:39 AM, Ron Bonica wrote: > Hi Folks, > >   > > The rationale for RFC 8335 can be found in Section 5.0 of that document. > Currently, ICMP ECHO and ECHO RESPONSE messages can be used to determine > the liveness of some interfaces. However, they cannot determine the > liveness of: >

Re: [iproute2-next] tipc: add support for the netlink extack

2021-03-24 Thread David Ahern
On 3/24/21 7:56 PM, Hoang Le wrote: > Add support extack in tipc to dump the netlink extack error messages > (i.e -EINVAL) sent from kernel. > > Acked-by: Jon Maloy > Signed-off-by: Hoang Le > --- > tipc/msg.c | 29 ++--- > 1 file changed, 22 insertions(+), 7 deletions(-

[GIT] Networking

2021-03-24 Thread David Miller
hole dst ops net, bpf: Fix ip6ip6 crash with collect_md populated skbs Daniel Phan (1): mac80211: Check crypto_aead_encrypt for errors David Brazdil (1): selinux: vsock: Set SID for socket returned by accept() David S. Miller (19): Merge branch 'ip6ip6-crash'

RE: [PATCH net-next] net: ipa: avoid 64-bit modulus

2021-03-24 Thread David Laight
From: Alex Elder > Sent: 24 March 2021 17:07 > > On 3/24/21 11:27 AM, David Laight wrote: > > From: Alex Elder > >> Sent: 23 March 2021 01:05 > >> It is possible for a 32 bit x86 build to use a 64 bit DMA address. > >> > >> There are two

RE: [PATCH net-next] net: ipa: avoid 64-bit modulus

2021-03-24 Thread David Laight
_coherent(dev, size, &addr, GFP_KERNEL); Doesn't dma_alloc_coherent() guarantee that alignment? I doubt anywhere else checks? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

RE: [PATCH 02/11] x86: tboot: avoid Wstringop-overread-warning

2021-03-24 Thread David Laight
From: David Laight > Sent: 24 March 2021 09:12 > > From: Martin Sebor > > Sent: 22 March 2021 22:08 > ... > > In GCC 11, all access warnings expect objects to be either declared > > or allocated. Pointers with constant values are taken to point to > > nothing

RE: [PATCH 02/11] x86: tboot: avoid Wstringop-overread-warning

2021-03-24 Thread David Laight
can still happen before GCC 11 releases > sometime in April or May. A different solution is to define a normal C external data item and then assign a fixed address with an asm statement or in the linker script. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: [PATCH net-next 0/6] page_pool: recycle buffers

2021-03-23 Thread David Ahern
On 3/22/21 11:02 AM, Matteo Croce wrote: > From: Matteo Croce > > This series enables recycling of the buffers allocated with the page_pool API. > The first two patches are just prerequisite to save space in a struct and > avoid recycling pages allocated with other API. > Patch 2 was based on a p

Re: [PATCH] net: ipv4: route.c: Remove unnecessary {else} if()

2021-03-23 Thread David Ahern
subject line should have net-next as the target branch On 3/23/21 4:20 AM, Yejune Deng wrote: > Put if and else if together, and remove unnecessary judgments, because > it's caller can make sure it is true. And add likely() in > ipv4_confirm_neigh(). > > Signed-off-by: Yejune Deng > --- > net/

Re: [PATCH net-next] net: set initial device refcount to 1

2021-03-22 Thread David Miller
From: David Miller Date: Mon, 22 Mar 2021 16:55:26 -0700 (PDT) > From: Eric Dumazet > Date: Mon, 22 Mar 2021 11:21:45 -0700 > > This hunk: >> @@ -10682,6 +10682,9 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, >> const char *name, >> dev-&

Re: [PATCH net-next] net: set initial device refcount to 1

2021-03-22 Thread David Miller
From: Eric Dumazet Date: Mon, 22 Mar 2021 11:21:45 -0700 > From: Eric Dumazet > > When adding CONFIG_PCPU_DEV_REFCNT, I forgot that the > initial net device refcount was 0. > > When CONFIG_PCPU_DEV_REFCNT is not set, this means > the first dev_hold() triggers an illegal refcount > operation (a

Re: [PATCH] net: make unregister netdev warning timeout configurable

2021-03-22 Thread David Miller
From: Dmitry Vyukov Date: Sat, 20 Mar 2021 15:28:51 +0100 > netdev_wait_allrefs() issues a warning if refcount does not drop to 0 > after 10 seconds. While 10 second wait generally should not happen > under normal workload in normal environment, it seems to fire falsely > very often during fuzzin

Re: [PATCH v7 bpf-next 10/14] bpf: add new frame_length field to the XDP ctx

2021-03-22 Thread David Ahern
On 3/22/21 3:29 AM, Eelco Chaudron wrote: > > > On 20 Mar 2021, at 4:42, David Ahern wrote: > >> On 3/19/21 3:47 PM, Lorenzo Bianconi wrote: >>> diff --git a/include/net/xdp.h b/include/net/xdp.h >>> index 19cd6642e087..e47d9e8da547 100644 >>> --- a/

RE: [PATCH net-next 2/2] net: socket: change MSG_CMSG_COMPAT to BIT(21)

2021-03-22 Thread David Laight
ossibility of writing BIT(n) safely almost makes it worse that just defining appropriate constants. Personally I like the hex constants. The make it much easier to work out which bits are set in a diagnostic print (or memory hexdump). The only time I've really found BIT() type macr

Re: [PATCH iproute2-next] ip: xfrm: add support for tfcpad

2021-03-21 Thread David Ahern
On 3/19/21 10:57 AM, Sabrina Dubroca wrote: > This patch adds support for setting and displaying the Traffic Flow > Confidentiality attribute for an XFRM state, which allows padding ESP > packets to a specified length. > > Signed-off-by: Sabrina Dubroca > --- > ip/ipxfrm.c| 8 >

Re: [PATCH] ipv4/raw: support binding to nonlocal addresses

2021-03-21 Thread David Ahern
On 3/20/21 6:20 PM, Riccardo Paolo Bestetti wrote: > diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c > index 50a73178d63a..734c0332b54b 100644 > --- a/net/ipv4/raw.c > +++ b/net/ipv4/raw.c > @@ -717,6 +717,7 @@ static int raw_bind(struct sock *sk, struct sockaddr > *uaddr, int addr_len) > { >

rfc5837 and rfc8335

2021-03-20 Thread David Ahern
On 3/19/21 10:24 PM, David Ahern wrote: > At the end of the day, what is the value of this feature vs the other > ICMP probing set? Merging the conversations about both of these RFCs since my comments and questions are the same for both. What is the motivation for adding support for thes

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

2021-03-20 Thread David Ahern
On 3/20/21 10:01 AM, Andreas Roeseler wrote: > On Wed, 2021-03-17 at 21:24 -0600, David Ahern wrote: >> On 3/17/21 9:19 PM, David Miller wrote: >>> From: Andreas Roeseler >>> Date: Wed, 17 Mar 2021 22:11:47 -0500 >>> >>>> On Mon, 2021-03-15 at 04:

  1   2   3   4   5   6   7   8   9   10   >