Re: [PATCH iproute2/net-next v2] tc_util: Add support for showing TCA_STATS_BASIC_HW statistics

2018-10-01 Thread Eelco Chaudron
On 10 Aug 2018, at 16:48, Eelco Chaudron wrote: On 10 Aug 2018, at 16:44, Stephen Hemminger wrote: On Fri, 10 Aug 2018 07:59:30 -0400 Eelco Chaudron wrote: + if (bs.bytes >= bs_hw.bytes && bs.packets >= bs_hw.packets) { + print_string(PRINT_FP, NULL, "%

[PATCH net-next] ipv4: Allow sending multicast packets on specific i/f using VRF socket

2018-10-01 Thread Mike Manning
From: Robert Shearman It is useful to be able to use the same socket for listening in a specific VRF, as for sending multicast packets out of a specific interface. However, the bound device on the socket currently takes precedence and results in the packets not being sent. Relax the condition on

[PATCH net-next] ipv6: add vrf table handling code for ipv6 mcast

2018-10-01 Thread Mike Manning
From: Patrick Ruddy The code to obtain the correct table for the incoming interface was missing for IPv6. This has been added along with the table creation notification to fib rules for the RTNL_FAMILY_IP6MR address family. Signed-off-by: Patrick Ruddy Signed-off-by: Mike Manning --- drivers/

[PATCH net-next v2 00/10] vrf: allow simultaneous service instances in default and other VRFs

2018-10-01 Thread Mike Manning
Services currently have to be VRF-aware if they are using an unbound socket. One cannot have multiple service instances running in the default and other VRFs for services that are not VRF-aware and listen on an unbound socket. This is because there is no way of isolating packets received in the def

[PATCH net-next v2 04/10] net: provide a sysctl raw_l3mdev_accept for raw socket lookup with VRFs

2018-10-01 Thread Mike Manning
Add a sysctl raw_l3mdev_accept to control raw socket lookup in a manner similar to use of tcp_l3mdev_accept for stream and of udp_l3mdev_accept for datagram sockets. Have this default to off as this is what users expect, given that there is no explicit mechanism to set unmodified VRF-unaware applic

[PATCH net-next v2 10/10] ipv6: do not drop vrf udp multicast packets

2018-10-01 Thread Mike Manning
From: Dewi Morgan For bound udp sockets in a vrf, also check the sdif to get the index for ingress devices enslaved to an l3mdev. Signed-off-by: Dewi Morgan Signed-off-by: Mike Manning --- net/ipv6/udp.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/net/ipv6/udp.

[PATCH net-next v2 05/10] net: fix raw socket lookup device bind matching with VRFs

2018-10-01 Thread Mike Manning
From: Duncan Eastoe When there exist a pair of raw sockets one unbound and one bound to a VRF but equal in all other respects, when a packet is received in the VRF context, __raw_v4_lookup() matches on both sockets. This results in the packet being delivered over both sockets, instead of only th

[PATCH net-next v2 02/10] net: ensure unbound stream socket to be chosen when not in a VRF

2018-10-01 Thread Mike Manning
The commit a04a480d4392 ("net: Require exact match for TCP socket lookups if dif is l3mdev") only ensures that the correct socket is selected for packets in a VRF. However, there is no guarantee that the unbound socket will be selected for packets when not in a VRF. By checking for a device match i

[PATCH net-next v2 06/10] net: IP[V6]_MULTICAST_IF constraint on unbound socket if VRFs present

2018-10-01 Thread Mike Manning
From: Duncan Eastoe If setsockopt(IP_MULTICAST_IF) or setsockopt(IPV6_MULTICAST_IF) is called on a socket which is not bound to a VRF then we should ensure that the output device chosen is also not bound to a VRF master. This avoids inadvertently sending traffic out of the wrong interface. This

[PATCH net-next v2 09/10] ipv6: handling of multicast packets received in VRF

2018-10-01 Thread Mike Manning
If the skb for multicast packets marked as enslaved to a VRF are received, then the secondary device index should be used to obtain the real device. And verify the multicast address against the enslaved rather than the l3mdev device. Signed-off-by: Dewi Morgan Signed-off-by: Mike Manning --- ne

[PATCH net-next v2 03/10] net: ensure unbound datagram socket to be chosen when not in a VRF

2018-10-01 Thread Mike Manning
Ensure an unbound datagram skt is chosen when not in a VRF. The check for a device match in compute_score() for UDP must be performed when there is no device match. For this, a failure is returned when there is no device match. This ensures that bound sockets are never selected, even if there is no

[PATCH net-next v2 01/10] net: allow binding socket in a VRF when there's an unbound socket

2018-10-01 Thread Mike Manning
From: Robert Shearman There is no easy way currently for applications that want to receive packets in the default VRF to be isolated from packets arriving in VRFs, which makes using VRF-unaware applications in a VRF-aware system a potential security risk. So change the inet socket lookup to avoi

[PATCH net-next v2 08/10] ipv6: allow ping to link-local address in VRF

2018-10-01 Thread Mike Manning
If link-local packets are marked as enslaved to a VRF, then to allow ping to the link-local from a vrf, the error handling for IPV6_PKTINFO needs to be relaxed to also allow the pkt ipi6_ifindex to be that of a slave device to the vrf. Note that the real device also needs to be retrieved in icmp6_

[PATCH net-next v2 07/10] vrf: mark skb for multicast or link-local as enslaved to VRF

2018-10-01 Thread Mike Manning
The skb for packets that are multicast or to a link-local address are not marked as being enslaved to a VRF, if they are received on a socket bound to the VRF. This is needed for ND and it is preferable for the kernel not to have to deal with the additional use-cases if ll or mcast packets are hand

Re: [PATCH net-next v1 1/5] net: allow binding socket in a VRF when there's an unbound socket

2018-10-01 Thread Mike Manning
On 25/09/2018 18:16, David Ahern wrote: > On 9/25/18 9:26 AM, Mike Manning wrote: >> On 24/09/2018 23:44, David Ahern wrote: >>> On 9/24/18 10:13 AM, Mike Manning wrote: From: Robert Shearman There is no easy way currently for applications that want to receive packets in the de

[PATCH 2/6] xfrm6: call kfree_skb when skb is toobig

2018-10-01 Thread Steffen Klassert
From: Thadeu Lima de Souza Cascardo After commit d6990976af7c5d8f55903bfb4289b6fb030bf754 ("vti6: fix PMTU caching and reporting on xmit"), some too big skbs might be potentially passed down to __xfrm6_output, causing it to fail to transmit but not free the skb, causing a leak of skb, and consequ

[PATCH 4/6] xfrm: reset crypto_done when iterating over multiple input xfrms

2018-10-01 Thread Steffen Klassert
From: Sowmini Varadhan We only support one offloaded xfrm (we do not have devices that can handle more than one offload), so reset crypto_done in xfrm_input() when iterating over multiple transforms in xfrm_input, so that we can invoke the appropriate x->type->input for the non-offloaded transfor

[PATCH 5/6] xfrm: Fix NULL pointer dereference when skb_dst_force clears the dst_entry.

2018-10-01 Thread Steffen Klassert
Since commit 222d7dbd258d ("net: prevent dst uses after free") skb_dst_force() might clear the dst_entry attached to the skb. The xfrm code don't expect this to happen, so we crash with a NULL pointer dereference in this case. Fix it by checking skb_dst(skb) for NULL after skb_dst_force() and drop

[PATCH 3/6] xfrm: reset transport header back to network header after all input transforms ahave been applied

2018-10-01 Thread Steffen Klassert
From: Sowmini Varadhan A policy may have been set up with multiple transforms (e.g., ESP and ipcomp). In this situation, the ingress IPsec processing iterates in xfrm_input() and applies each transform in turn, processing the nexthdr to find any additional xfrm that may apply. This patch resets

pull request (net): ipsec 2018-10-01

2018-10-01 Thread Steffen Klassert
1) Validate address prefix lengths in the xfrm selector, otherwise we may hit undefined behaviour in the address matching functions if the prefix is too big for the given address family. 2) Fix skb leak on local message size errors. From Thadeu Lima de Souza Cascardo. 3) We currently

[PATCH 1/6] xfrm: Validate address prefix lengths in the xfrm selector.

2018-10-01 Thread Steffen Klassert
We don't validate the address prefix lengths in the xfrm selector we got from userspace. This can lead to undefined behaviour in the address matching functions if the prefix is too big for the given address family. Fix this by checking the prefixes and refuse SA/policy insertation when a prefix is

[PATCH 6/6] xfrm: validate template mode

2018-10-01 Thread Steffen Klassert
From: Sean Tranchetti XFRM mode parameters passed as part of the user templates in the IP_XFRM_POLICY are never properly validated. Passing values other than valid XFRM modes can cause stack-out-of-bounds reads to occur later in the XFRM processing: [ 140.535608] ===

Re: [PATCH iproute2/net-next v2] tc_util: Add support for showing TCA_STATS_BASIC_HW statistics

2018-10-01 Thread Stephen Hemminger
On Mon, 01 Oct 2018 09:08:32 +0200 "Eelco Chaudron" wrote: > On 10 Aug 2018, at 16:48, Eelco Chaudron wrote: > > > On 10 Aug 2018, at 16:44, Stephen Hemminger wrote: > > > >> On Fri, 10 Aug 2018 07:59:30 -0400 > >> Eelco Chaudron wrote: > >> > >>> + if (bs.bytes >= bs_hw.bytes && bs

[PATCH 1/3] xfrm: Make function xfrmi_get_link_net() static

2018-10-01 Thread Steffen Klassert
From: Wei Yongjun Fixes the following sparse warning: net/xfrm/xfrm_interface.c:745:12: warning: symbol 'xfrmi_get_link_net' was not declared. Should it be static? Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Signed-off-by: Wei Yongjun Signed-off-by: Steffen Klassert --- net/xf

Re: [PATCH net-next 2/7] net: phy: mscc: add support for VSC8584 PHY

2018-10-01 Thread Quentin Schulz
Hi Andrew, On Fri, Sep 14, 2018 at 07:27:54PM +0200, Andrew Lunn wrote: > > > struct vsc8531_private { > > int rate_magic; > > u16 supp_led_modes; > > @@ -181,6 +354,7 @@ struct vsc8531_private { > > struct vsc85xx_hw_stat *hw_stats; > > u64 *stats; > > int nstats; > > + bo

[PATCH 3/3] xfrm: allow driver to quietly refuse offload

2018-10-01 Thread Steffen Klassert
From: Shannon Nelson If the "offload" attribute is used to create an IPsec SA and the .xdo_dev_state_add() fails, the SA creation fails. However, if the "offload" attribute is used on a device that doesn't offer it, the attribute is quietly ignored and the SA is created without an offload. Along

pull request (net-next): ipsec-next 2018-10-01

2018-10-01 Thread Steffen Klassert
1) Make xfrmi_get_link_net() static to silence a sparse warning. From Wei Yongjun. 2) Remove a unused esph pointer definition in esp_input(). From Haishuang Yan. 3) Allow the NIC driver to quietly refuse xfrm offload in case it does not support it, the SA is created without offload in

[PATCH 2/3] esp: remove redundant define esph

2018-10-01 Thread Steffen Klassert
From: Haishuang Yan The pointer 'esph' is defined but is never used hence it is redundant and canbe removed. Signed-off-by: Haishuang Yan Signed-off-by: Steffen Klassert --- net/ipv4/esp4.c | 7 +++ net/ipv6/esp6.c | 7 +++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git

[PATCH net] team: Forbid enslaving team device to itself

2018-10-01 Thread Ido Schimmel
team's ndo_add_slave() acquires 'team->lock' and later tries to open the newly enslaved device via dev_open(). This emits a 'NETDEV_UP' event that causes the VLAN driver to add VLAN 0 on the team device. team's ndo_vlan_rx_add_vid() will also try to acquire 'team->lock' and deadlock. Fix this by c

Re: [net-next, PATCH 1/2, v3] net: socionext: different approach on DMA

2018-10-01 Thread Jesper Dangaard Brouer
On Sat, 29 Sep 2018 14:28:01 +0300 Ilias Apalodimas wrote: > +static void *netsec_alloc_rx_data(struct netsec_priv *priv, > + dma_addr_t *dma_handle, u16 *desc_len) > +{ > + size_t len = priv->ndev->mtu + ETH_HLEN + 2 * VLAN_HLEN + NET_SKB_PAD + > +

Re: [PATCH] knav: qmss: Introduce queue descriptors monitor

2018-10-01 Thread Gomonovych, Vasyl
Hi, TI experts During work with rapidio and ethernet driver, we have faced ingress and egress queue descriptors starvation. Obvious things were to find which queues were under pressure. Existing interface knav_queue in debugfs can help debug starvation issue by a periodic process which cat existin

Re: [net-next, PATCH 1/2, v3] net: socionext: different approach on DMA

2018-10-01 Thread Ilias Apalodimas
On Mon, Oct 01, 2018 at 11:26:31AM +0200, Jesper Dangaard Brouer wrote: > > On Sat, 29 Sep 2018 14:28:01 +0300 Ilias Apalodimas > wrote: > > > +static void *netsec_alloc_rx_data(struct netsec_priv *priv, > > + dma_addr_t *dma_handle, u16 *desc_len) > > +{ > > + siz

Re: [net-next, PATCH 1/2, v3] net: socionext: different approach on DMA

2018-10-01 Thread Ilias Apalodimas
> > #2: You have allocations on the XDP fast-path. > > > > The REAL secret behind the XDP performance is to avoid allocations on > > the fast-path. While I just told you to use the page-allocator and > > order-0 pages, this will actually kill performance. Thus, to make this > > fast, you need a

Re: [PATCH iproute2/net-next v2] tc_util: Add support for showing TCA_STATS_BASIC_HW statistics

2018-10-01 Thread Eelco Chaudron
On 1 Oct 2018, at 11:10, Stephen Hemminger wrote: > On Mon, 01 Oct 2018 09:08:32 +0200 > "Eelco Chaudron" wrote: > >> On 10 Aug 2018, at 16:48, Eelco Chaudron wrote: >> >>> On 10 Aug 2018, at 16:44, Stephen Hemminger wrote: >>> On Fri, 10 Aug 2018 07:59:30 -0400 Eelco Chaudron wrote

Re: Marvell phy errata origins?

2018-10-01 Thread GokulChand Casheekar (gcasheek)
Sorry - I was sick and out of office. The phy_id reads 0x01410cc1. Regards, Gokul. On 26/09/18, 9:05 PM, "Daniel Walker (danielwa)" wrote: On 09/25/2018 10:42 PM, Harini Katakam wrote: > Hi, > On Tue, Sep 25, 2018 at 11:00 PM Harini Katakam wrote: >> >> Hi Daniel, >>

[PATCH net-next 0/4] dpaa2-eth: Add support for Rx flow classification

2018-10-01 Thread Ioana Radulescu
The Management Complex (MC) firmware initially allowed the configuration of a single key to be used both for Rx flow hashing and flow classification. This prevented us from supporting Rx flow classification independently of the hash key configuration. Newer firmware versions expose separate comman

[PATCH net-next 2/4] dpaa2-eth: Rename structure

2018-10-01 Thread Ioana Radulescu
Since the array of supported header fields will be used for Rx flow classification as well, rename it from "hash_fields" to the more inclusive "dist_fields". Signed-off-by: Ioana Radulescu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 12 ++-- drivers/net/ethernet/freescale/dpaa

[PATCH net-next 1/4] dpaa2-eth: Use new API for Rx flow hashing

2018-10-01 Thread Ioana Radulescu
The Management Complex (MC) firmware initially allowed the configuration of a single key to be used both for Rx flow hashing and flow classification. This prevented us from supporting Rx flow classification through ethtool. Starting with version 10.7.0, the Management Complex(MC) offers a new set

[PATCH net-next 3/4] dpaa2-eth: Configure Rx flow classification key

2018-10-01 Thread Ioana Radulescu
For firmware versions that support it, configure an Rx flow classification key at probe time. Hardware expects all rules in the classification table to share the same key. So we setup a key containing all supported fields at driver init and when a user adds classification rules through ethtool, we

[PATCH net-next 4/4] dpaa2-eth: Add ethtool support for flow classification

2018-10-01 Thread Ioana Radulescu
Add support for inserting and deleting Rx flow classification rules through ethtool. We support classification based on some header fields for flow-types ether, ip4, tcp4, udp4 and sctp4. Rx queues are core affine, so the action argument effectively selects on which cpu the matching frame will be

[PATCH 0/3] bpf: allow zero-initialising hash map seed

2018-10-01 Thread Lorenz Bauer
This patch set adds a new flag BPF_F_ZERO_SEED, which allows forcing the seed used by hash maps to zero. This makes it possible to write deterministic tests. Based on an off-list conversation with Alexei Starovoitov and Daniel Borkmann. Lorenz Bauer (3): bpf: allow zero-initializing hash map se

[PATCH 1/3] bpf: allow zero-initializing hash map seed

2018-10-01 Thread Lorenz Bauer
Add a new flag BPF_F_ZERO_SEED, which forces a hash map to initialize the seed to zero. --- include/uapi/linux/bpf.h | 2 ++ kernel/bpf/hashtab.c | 8 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index aa5ccd2385ed.

[PATCH 3/3] tools: add selftest for BPF_F_ZERO_SEED

2018-10-01 Thread Lorenz Bauer
--- tools/testing/selftests/bpf/test_maps.c | 67 + 1 file changed, 56 insertions(+), 11 deletions(-) diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/selftests/bpf/test_maps.c index 9b552c0fc47d..2a1cc00475f6 100644 --- a/tools/testing/selftests/bpf/t

[PATCH 2/3] tools: sync linux/bpf.h

2018-10-01 Thread Lorenz Bauer
--- tools/include/uapi/linux/bpf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index aa5ccd2385ed..9d15c8f179ac 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -252,6 +252,8 @@ enum bpf_at

Re: [PATCH net-next] geneve: fix ttl inherit type

2018-10-01 Thread Phil Sutter
Hangbin, On Sat, Sep 29, 2018 at 05:16:05PM +0800, Hangbin Liu wrote: [...] > > Is it desirable to switch to a flag? If I read geneve_changelink() and > > geneve_nl2info() correctly, it allows you to set the ttl_inherit flag > > for an existing device but doesn't allow you to clear it. With NLA_U8

Re: [net-next, PATCH 1/2, v3] net: socionext: different approach on DMA

2018-10-01 Thread Jesper Dangaard Brouer
On Mon, 1 Oct 2018 12:56:58 +0300 Ilias Apalodimas wrote: > > > #2: You have allocations on the XDP fast-path. > > > > > > The REAL secret behind the XDP performance is to avoid allocations on > > > the fast-path. While I just told you to use the page-allocator and > > > order-0 pages, this wil

Re: [net-next, PATCH 1/2, v3] net: socionext: different approach on DMA

2018-10-01 Thread Ilias Apalodimas
On Mon, Oct 01, 2018 at 01:03:13PM +0200, Jesper Dangaard Brouer wrote: > On Mon, 1 Oct 2018 12:56:58 +0300 > Ilias Apalodimas wrote: > > > > > #2: You have allocations on the XDP fast-path. > > > > > > > > The REAL secret behind the XDP performance is to avoid allocations on > > > > the fast-pa

Re: [PATCH 5/6] xfrm: Fix NULL pointer dereference when skb_dst_force clears the dst_entry.

2018-10-01 Thread Sergei Shtylyov
On 10/01/2018 11:58 AM, Steffen Klassert wrote: > Since commit 222d7dbd258d ("net: prevent dst uses after free") > skb_dst_force() might clear the dst_entry attached to the skb. > The xfrm code don't expect this to happen, so we crash with Doesn't. > a NULL pointer dereference in this case. F

[PATCH v5 05/15] octeontx2-af: Add mailbox IRQ and msg handlers

2018-10-01 Thread sunil . kovvuri
From: Sunil Goutham This patch adds support for mailbox interrupt and message handling. Mapped mailbox region and registered a workqueue for message handling. Enabled mailbox IRQ of RVU PFs and registered a interrupt handler. When IRQ is triggered work is added to the mbox workqueue for msgs to g

[PATCH v5 10/15] octeontx2-af: Reconfig MSIX base with IOVA

2018-10-01 Thread sunil . kovvuri
From: Geetha sowjanya HW interprets RVU_AF_MSIXTR_BASE address as an IOVA, hence create a IOMMU mapping for the physcial address configured by firmware and reconfig RVU_AF_MSIXTR_BASE with IOVA. Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeo

[PATCH v5 09/15] octeontx2-af: Configure block LF's MSIX vector offset

2018-10-01 Thread sunil . kovvuri
From: Sunil Goutham Firmware configures a certain number of MSIX vectors to each of enabled RVU PF/VF. When a block LF is attached to a PF/VF, number of MSIX vectors needed by that LF are set aside (out of PF/VF's total MSIX vectors) and LF's msix_offset is configured in HW. Also added support f

[PATCH v5 02/15] octeontx2-af: Reset all RVU blocks

2018-10-01 Thread sunil . kovvuri
From: Sunil Goutham Go through all BLKADDRs and check which ones are implemented on this silicon and do a HW reset of each implemented block. Also added all RVU AF and PF register offsets. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/rvu.c| 78 ++

[PATCH v5 06/15] octeontx2-af: Convert mbox msg id check to a macro

2018-10-01 Thread sunil . kovvuri
From: Aleksey Makarov With 10's of mailbox messages expected to be handled in future, checking for message id could become a lengthy switch case. Hence added a macro to auto generate the switch case for each msg id. Signed-off-by: Aleksey Makarov Signed-off-by: Sunil Goutham --- drivers/net/e

[PATCH v5 07/15] octeontx2-af: Scan blocks for LFs provisioned to PF/VF

2018-10-01 Thread sunil . kovvuri
From: Sunil Goutham Scan all RVU blocks to find any 'LF to RVU PF/VF' mapping done by low level firmware. If found any, mark them as used in respective block's LF bitmap and also save mapped PF/VF's PF_FUNC info. This is done to avoid reattaching a block LF to a different RVU PF/VF. Signed-off-

[PATCH v5 04/15] octeontx2-af: Add mailbox support infra

2018-10-01 Thread sunil . kovvuri
From: Sunil Goutham This patch adds mailbox support infrastructure APIs. Each RVU device has a dedicated 64KB mailbox region shared with it's peer for communication. RVU AF has a separate mailbox region shared with each of RVU PFs and a RVU PF has a separate region shared with each of it's VF. T

[PATCH v5 11/15] octeontx2-af: Add Marvell OcteonTX2 CGX driver

2018-10-01 Thread sunil . kovvuri
From: Sunil Goutham This patch adds basic template for Marvell OcteonTX2's CGX ethernet interface driver. Just the probe. RVU AF driver will use APIs exported by this driver for various things like PF to physical interface mapping, loopback mode, interface stats etc. Hence marged both drivers int

[PATCH v5 08/15] octeontx2-af: Add RVU block LF provisioning support

2018-10-01 Thread sunil . kovvuri
From: Sunil Goutham Added support for a RVU PF/VF to request AF via mailbox to attach or detach NPA/NIX/SSO/SSOW/TIM/CPT block LFs. Also supports partial detachment and modifying current LF attached count of a certian block type. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/oc

[PATCH v5 00/15] octeontx2-af: Add RVU Admin Function driver

2018-10-01 Thread sunil . kovvuri
From: Sunil Goutham Resource virtualization unit (RVU) on Marvell's OcteonTX2 SOC maps HW resources from the network, crypto and other functional blocks into PCI-compatible physical and virtual functions. Each functional block again has multiple local functions (LFs) for provisioning to PCI devic

[PATCH v5 01/15] octeontx2-af: Add Marvell OcteonTX2 RVU AF driver

2018-10-01 Thread sunil . kovvuri
From: Sunil Goutham This patch adds basic template for Marvell OcteonTX2's resource virtualization unit (RVU) admin function (AF) driver. Just the driver registration and probe. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/Kconfig | 3 + drivers/net/ethernet/ma

[PATCH v5 12/15] octeontx2-af: Set RVU PFs to CGX LMACs mapping

2018-10-01 Thread sunil . kovvuri
From: Linu Cherian Each of the enabled CGX LMAC is considered a physical interface and RVU PFs are mapped to these. VFs of these SRIOV PFs will be virtual interfaces and share CGX LMAC along with PF. This mapping info will be used later on for Rx/Tx pkt steering. Signed-off-by: Linu Cherian Si

[PATCH v5 13/15] octeontx2-af: Add support for CGX link management

2018-10-01 Thread sunil . kovvuri
From: Linu Cherian CGX LMAC initialization, link status polling etc is done by low level secure firmware. For link management this patch adds a interface or communication mechanism between firmware and this kernel CGX driver. - Firmware interface specification is defined in cgx_fw_if.h. - Suppor

[PATCH v5 03/15] octeontx2-af: Gather RVU blocks HW info

2018-10-01 Thread sunil . kovvuri
From: Sunil Goutham This patch gathers NPA/NIX/SSO/SSOW/TIM/CPT RVU blocks's HW info like number of LFs. Important register offsets saved for later use to avoid code duplication for each block. A bitmap is allocated for each of the blocks which later on will be used to allocate a LF for a RVU PF/

[PATCH v5 15/15] MAINTAINERS: Add entry for Marvell OcteonTX2 Admin Function driver

2018-10-01 Thread sunil . kovvuri
From: Sunil Goutham Added maintainers entry for Marvell OcteonTX2 SOC's RVU admin function driver. Signed-off-by: Sunil Goutham --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 15565de..cf12fa3 100644 --- a/MAINTAINERS +++ b/MAINTAINE

[PATCH v5 14/15] octeontx2-af: Register for CGX lmac events

2018-10-01 Thread sunil . kovvuri
From: Linu Cherian Added support in RVU AF driver to register for CGX LMAC link status change events from firmware and managing them. Processing part will be added in followup patches. - Introduced eventqueue for posting events from cgx lmac. Queueing mechanism will ensure that events can be p

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-01 Thread Mauricio Faria de Oliveira
On Sun, Sep 30, 2018 at 10:06 PM David Ahern wrote: > > On 9/28/18 1:35 PM, Mauricio Faria de Oliveira wrote: > > Currently, rtnl_fdb_dump() assumes the family header is 'struct ifinfomsg', > > which is not always true. For example, 'struct ndmsg' is used by iproute2 > > as well (in the 'ip neigh

Re: [PATCH v5 13/15] octeontx2-af: Add support for CGX link management

2018-10-01 Thread Arnd Bergmann
On Mon, Oct 1, 2018 at 1:37 PM wrote: > + * Not applicable for commands : > + * CGX_CMD_LINK_BRING_UP/DOWN/CGX_EVT_LINK_CHANGE > + * check struct cgx_lnk_sts comments > + */ > +struct cgx_err_sts_s { > +#if defined(__BIG_ENDIAN_BITFIELD) > + uint64_t reserved2:35; > + uint64_t type:10

Re: [net-next, PATCH 0/2, v3] net: socionext: XDP support

2018-10-01 Thread Björn Töpel
On 2018-09-29 13:28, Ilias Apalodimas wrote: This patch series adds AF_XDP support socionext netsec driver This series adds *XDP* support and as a result, the AF_XDP batteries are included. ;-) Björn In addition the new dma allocation scheme offers a 10% boost on Rx pps rate using 64b packe

[PATCH bpf-next v2 2/5] xsk: fix bug when trying to use both copy and zero-copy on one queue id

2018-10-01 Thread Magnus Karlsson
Previously, the xsk code did not record which umem was bound to a specific queue id. This was not required if all drivers were zero-copy enabled as this had to be recorded in the driver anyway. So if a user tried to bind two umems to the same queue, the driver would say no. But if copy-mode was fir

[PATCH bpf-next v2 3/5] ethtool: rename local variable max -> curr

2018-10-01 Thread Magnus Karlsson
From: Jakub Kicinski ethtool_set_channels() validates the config against driver's max settings. It retrieves the current config and stores it in a variable called max. This was okay when only max settings were accessed but we will soon want to access current settings as well, so calling the entir

Re: [PATCH 1/1] macsec: reflect the master interface state

2018-10-01 Thread Sabrina Dubroca
2018-09-19, 12:44:41 -0400, Radu Rendec wrote: > Hello, Gah, sorry, this fell into the "week-end" crack and I forgot to answer :( > On Wed, Sep 19, 2018 at 11:24 AM Sabrina Dubroca wrote: > > 2018-09-18, 20:16:12 -0400, Radu Rendec wrote: > > > This patch makes macsec interfaces reflect the stat

[PATCH bpf-next v2 5/5] xsk: simplify xdp_clear_umem_at_qid implementation

2018-10-01 Thread Magnus Karlsson
As we now do not allow ethtool to deactivate the queue id we are running an AF_XDP socket on, we can simplify the implementation of xdp_clear_umem_at_qid(). Signed-off-by: Magnus Karlsson --- net/xdp/xdp_umem.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/xdp/xd

[PATCH bpf-next v2 4/5] ethtool: don't allow disabling queues with umem installed

2018-10-01 Thread Magnus Karlsson
From: Jakub Kicinski We already check the RSS indirection table does not use queues which would be disabled by channel reconfiguration. Make sure user does not try to disable queues which have a UMEM and zero-copy AF_XDP socket installed. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monne

[PATCH bpf-next v2 0/5] xsk: fix bug when trying to use both copy and zero-copy mode

2018-10-01 Thread Magnus Karlsson
Previously, the xsk code did not record which umem was bound to a specific queue id. This was not required if all drivers were zero-copy enabled as this had to be recorded in the driver anyway. So if a user tried to bind two umems to the same queue, the driver would say no. But if copy-mode was fir

[PATCH bpf-next v2 1/5] net: add umem reference in netdev{_rx}_queue

2018-10-01 Thread Magnus Karlsson
These references to the umem will be used to store information on what kind of AF_XDP umem that is bound to a queue id, if any. Signed-off-by: Magnus Karlsson --- include/linux/netdevice.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/netdevice.h b/include/linux/netdevi

[PATCH net] rhashtable: prevent work queue schedule while dismantling

2018-10-01 Thread Eric Dumazet
syszbot found an interesting use-after-free [1] happening while IPv4 fragment rhashtable was destroyed at netns dismantle. While no insertions can possibly happen at the time a dismantling netns is destroying this rhashtable, timers can still fire and attempt to remove elements from this rhashtabl

Re: [PATCH net] rhashtable: prevent work queue schedule while dismantling

2018-10-01 Thread Herbert Xu
On Mon, Oct 01, 2018 at 06:16:27AM -0700, Eric Dumazet wrote: > syszbot found an interesting use-after-free [1] happening > while IPv4 fragment rhashtable was destroyed at netns dismantle. > > While no insertions can possibly happen at the time a dismantling > netns is destroying this rhashtable,

Re: [net-next, PATCH 1/2, v3] net: socionext: different approach on DMA

2018-10-01 Thread Jesper Dangaard Brouer
On Mon, 1 Oct 2018 14:20:21 +0300 Ilias Apalodimas wrote: > On Mon, Oct 01, 2018 at 01:03:13PM +0200, Jesper Dangaard Brouer wrote: > > On Mon, 1 Oct 2018 12:56:58 +0300 > > Ilias Apalodimas wrote: > > > > > > > #2: You have allocations on the XDP fast-path. > > > > > > > > > > The REAL secr

Re: [net-next, PATCH 0/2, v3] net: socionext: XDP support

2018-10-01 Thread Ilias Apalodimas
On Mon, Oct 01, 2018 at 02:48:54PM +0200, Björn Töpel wrote: > On 2018-09-29 13:28, Ilias Apalodimas wrote: > >This patch series adds AF_XDP support socionext netsec driver > > This series adds *XDP* support and as a result, the AF_XDP batteries > are included. ;-) > Noted, thanks for cathcing th

Re: [net-next, PATCH 1/2, v3] net: socionext: different approach on DMA

2018-10-01 Thread Ilias Apalodimas
On Mon, Oct 01, 2018 at 03:48:45PM +0200, Jesper Dangaard Brouer wrote: > On Mon, 1 Oct 2018 14:20:21 +0300 > Ilias Apalodimas wrote: > > > On Mon, Oct 01, 2018 at 01:03:13PM +0200, Jesper Dangaard Brouer wrote: > > > On Mon, 1 Oct 2018 12:56:58 +0300 > > > Ilias Apalodimas wrote: > > > > > >

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-01 Thread David Ahern
On 10/1/18 6:44 AM, Mauricio Faria de Oliveira wrote: >> I suspect rtnl_fdb_dump is forever stuck with the ifinfomsg struct as >> the header if any kernel side filtering is to be done. [snip] > > Why exactly? I understand currently there may be little information > to distinguish family headers,

Re: [PATCH iproute2/net-next v2] tc_util: Add support for showing TCA_STATS_BASIC_HW statistics

2018-10-01 Thread David Ahern
On 10/1/18 4:29 AM, Eelco Chaudron wrote: >>> Hi Stephen, anything else required for this patch to be accepted? >>> >>> FYI the kernel side of this patch has been excepted on net-next. >>> >>> Cheers, >>> >>> Eelco >> >> David Ahern handles net-next see patchwork >> https://patchwork.ozlabs.org/p

Re: [PATCH v2 1/9] net: ip_rt_get_source() - use new style struct initializer instead of memset

2018-10-01 Thread David Ahern
On 9/30/18 12:44 AM, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > (allows for better compiler optimization) > > Signed-off-by: Maciej Żenczykowski > --- > net/ipv4/route.c | 21 + > 1 file changed, 9 insertions(+), 12 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH v2 3/9] net: ip6_redirect() - use new style struct initializer instead of memset

2018-10-01 Thread David Ahern
On 9/30/18 12:44 AM, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > (allows for better compiler optimization) > > Signed-off-by: Maciej Żenczykowski > --- > net/ipv6/route.c | 19 +-- > 1 file changed, 9 insertions(+), 10 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH v2 4/9] net: ip6_redirect_no_header() - use new style struct initializer instead of memset

2018-10-01 Thread David Ahern
On 9/30/18 12:44 AM, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > (allows for better compiler optimization) > > Signed-off-by: Maciej Żenczykowski > --- > net/ipv6/route.c | 17 - > 1 file changed, 8 insertions(+), 9 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH v2 5/9] net: remove 1 always zero parameter from ip6_redirect_no_header()

2018-10-01 Thread David Ahern
On 9/30/18 12:44 AM, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > (the parameter in question is mark) > > Signed-off-by: Maciej Żenczykowski > --- > include/net/ip6_route.h | 3 +-- > net/ipv6/ndisc.c| 2 +- > net/ipv6/route.c| 4 +--- > 3 files changed, 3 inserti

Re: [PATCH v2 6/9] net: ip6_update_pmtu() - use new style struct initializer instead of memset

2018-10-01 Thread David Ahern
On 9/30/18 12:44 AM, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > (allows for better compiler optimization) > > Signed-off-by: Maciej Żenczykowski > --- > net/ipv6/route.c | 17 - > 1 file changed, 8 insertions(+), 9 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH v2 9/9] net: inet6_rtm_getroute() - use new style struct initializer instead of memset

2018-10-01 Thread David Ahern
On 9/30/18 12:44 AM, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > Signed-off-by: Maciej Żenczykowski > --- > net/ipv6/route.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH v2 2/9] net: inet_rtm_getroute() - use new style struct initializer instead of memset

2018-10-01 Thread David Ahern
On 9/30/18 12:44 AM, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > Signed-off-by: Maciej Żenczykowski > --- > net/ipv4/route.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH v2 7/9] net: rtmsg_to_fib6_config() - use new style struct initializer instead of memset

2018-10-01 Thread David Ahern
On 9/30/18 12:44 AM, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > (allows for better compiler optimization) > > Signed-off-by: Maciej Żenczykowski > --- > net/ipv6/route.c | 32 > 1 file changed, 16 insertions(+), 16 deletions(-) > Reviewed-by:

Re: [PATCH v2 8/9] net: rtm_to_fib6_config() - use new style struct initializer instead of memset

2018-10-01 Thread David Ahern
On 9/30/18 12:44 AM, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > (allows for better compiler optimization) > > Signed-off-by: Maciej Żenczykowski > --- > net/ipv6/route.c | 23 --- > 1 file changed, 12 insertions(+), 11 deletions(-) > Reviewed-by: David Ahe

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-01 Thread Mauricio Faria de Oliveira
On Mon, Oct 1, 2018 at 12:01 PM David Ahern wrote: > > On 10/1/18 6:44 AM, Mauricio Faria de Oliveira wrote: > >> I suspect rtnl_fdb_dump is forever stuck with the ifinfomsg struct as > >> the header if any kernel side filtering is to be done. [snip] > > > > Why exactly? I understand currently t

Re: [PATCH net-next v3 1/2] netlink: ipv4 igmp join notifications

2018-10-01 Thread Roopa Prabhu
On Wed, Sep 26, 2018 at 10:23 AM Roopa Prabhu wrote: > > On Tue, Sep 25, 2018 at 2:34 AM, Patrick Ruddy > wrote: > > On Wed, 2018-09-19 at 21:47 -0700, David Ahern wrote: > >> On 9/18/18 6:12 AM, Patrick Ruddy wrote: > >> > > >> > I've hit a small snag with adding the new groups. The number of de

RE: [net-next 1/8] ice: use [sr]q.count when checking if queue is initialized

2018-10-01 Thread Keller, Jacob E
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Sergei Shtylyov > Sent: Friday, September 28, 2018 2:02 AM > To: Kirsher, Jeffrey T ; da...@davemloft.net > Cc: Keller, Jacob E ; netdev@vger.kernel.org; > nhor...@redhat.com; sa

Re: [net-next, PATCH 1/2, v3] net: socionext: different approach on DMA

2018-10-01 Thread Jesper Dangaard Brouer
On Mon, 1 Oct 2018 17:37:06 +0300 Ilias Apalodimas wrote: > On Mon, Oct 01, 2018 at 03:48:45PM +0200, Jesper Dangaard Brouer wrote: > > On Mon, 1 Oct 2018 14:20:21 +0300 > > Ilias Apalodimas wrote: > > > > > On Mon, Oct 01, 2018 at 01:03:13PM +0200, Jesper Dangaard Brouer wrote: > > > > On

Re: [PATCH net] rhashtable: prevent work queue schedule while dismantling

2018-10-01 Thread Eric Dumazet
On Mon, Oct 1, 2018 at 6:40 AM Herbert Xu wrote: > > On Mon, Oct 01, 2018 at 06:16:27AM -0700, Eric Dumazet wrote: > > syszbot found an interesting use-after-free [1] happening > > while IPv4 fragment rhashtable was destroyed at netns dismantle. > > > > While no insertions can possibly happen at t

[net 3/3] net/mlx5e: Set vlan masks for all offloaded TC rules

2018-10-01 Thread Saeed Mahameed
From: Jianbo Liu In flow steering, if asked to, the hardware matches on the first ethertype which is not vlan. It's possible to set a rule as follows, which is meant to match on untagged packet, but will match on a vlan packet: tc filter add dev eth0 parent : protocol ip flower ... To av

[net 2/3] net/mlx5: E-Switch, Fix out of bound access when setting vport rate

2018-10-01 Thread Saeed Mahameed
From: Eran Ben Elisha The code that deals with eswitch vport bw guarantee was going beyond the eswitch vport array limit, fix that. This was pointed out by the kernel address sanitizer (KASAN). The error from KASAN log: [2018-09-15 15:04:45] BUG: KASAN: slab-out-of-bounds in mlx5_eswitch_set_vp

[net 1/3] net/mlx5e: Avoid unbounded peer devices when unpairing TC hairpin rules

2018-10-01 Thread Saeed Mahameed
From: Alaa Hleihel If the peer device was already unbound, then do not attempt to modify it's resources, otherwise we will crash on dereferencing non-existing device. Fixes: 5c65c564c962 ("net/mlx5e: Support offloading TC NIC hairpin flows") Signed-off-by: Alaa Hleihel Reviewed-by: Or Gerlitz

[pull request][net 0/3] Mellanox, mlx5 fixes 2018-10-01

2018-10-01 Thread Saeed Mahameed
Hi Dave, This pull request includes some fixes to mlx5 driver, Please pull and let me know if there's any problem. For -stable v4.11: "6e0a4a23c59a ('net/mlx5: E-Switch, Fix out of bound access when setting vport rate')" For -stable v4.18: "98d6627c372a ('net/mlx5e: Set vlan masks for all offl

[PATCH net] inet: frags: rework rhashtable dismantle

2018-10-01 Thread Eric Dumazet
syszbot found an interesting use-after-free [1] happening while IPv4 fragment rhashtable was destroyed at netns dismantle. While no insertions can possibly happen at the time a dismantling netns is destroying this rhashtable, timers can still fire and attempt to remove elements from this rhashtabl

  1   2   3   >