Re: [PATCH bpf 2/2] libbpf: remove dependency on barrier.h in xsk.h

2019-09-03 Thread Yauheni Kaliuta
Hi, Magnus! > On Wed, 4 Sep 2019 08:39:24 +0200, Magnus Karlsson wrote: > On Wed, Sep 4, 2019 at 7:32 AM Yauheni Kaliuta > wrote: >> >> Hi, Magnus! >> >> > On Tue, 9 Apr 2019 08:44:13 +0200, Magnus Karlsson wrote: >> >> > The use of smp_rmb() and smp_wmb() creates a Linux h

Re: [PATCH bpf 2/2] libbpf: remove dependency on barrier.h in xsk.h

2019-09-03 Thread Magnus Karlsson
On Wed, Sep 4, 2019 at 7:32 AM Yauheni Kaliuta wrote: > > Hi, Magnus! > > > On Tue, 9 Apr 2019 08:44:13 +0200, Magnus Karlsson wrote: > > > The use of smp_rmb() and smp_wmb() creates a Linux header dependency > > on barrier.h that is uneccessary in most parts. This patch implements > > th

Re: [PATCH bpf 2/2] libbpf: remove dependency on barrier.h in xsk.h

2019-09-03 Thread Yauheni Kaliuta
Hi, Magnus! > On Tue, 9 Apr 2019 08:44:13 +0200, Magnus Karlsson wrote: > The use of smp_rmb() and smp_wmb() creates a Linux header dependency > on barrier.h that is uneccessary in most parts. This patch implements > the two small defines that are needed from barrier.h. As a bonus, the

Re: [PATCHv2 1/1] net: rds: add service level support in rds-info

2019-09-03 Thread Zhu Yanjun
On 2019/9/3 9:58, Gustavo A. R. Silva wrote: Hi, On 8/23/19 8:04 PM, Zhu Yanjun wrote: [..] diff --git a/net/rds/ib.c b/net/rds/ib.c index ec05d91..45acab2 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c @@ -291,7 +291,7 @@ static int rds_ib_conn_info_visitor(struct rds_connection *conn,

Re: [net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2019-09-03

2019-09-03 Thread David Miller
From: Jeff Kirsher Date: Tue, 3 Sep 2019 21:34:57 -0700 > This series contains updates to ice driver only. Looks good, pulled, thanks Jeff.

Re: [pull request][net-next V2 00/18] Mellanox, mlx5 software managed steering

2019-09-03 Thread David Miller
From: Saeed Mahameed Date: Tue, 3 Sep 2019 20:04:24 + > This series adds the support for software (driver managed) flow steering. > For more information please see tag log below. > > Please pull and let me know if there is any problem. > > Please note that the series starts with a merge of

Re: [PATCH net-next 0/5] net/tls: minor cleanups

2019-09-03 Thread John Fastabend
Boris Pismenny wrote: > On 9/3/2019 7:31 AM, Jakub Kicinski wrote: > > Hi! > > > > This set is a grab bag of TLS cleanups accumulated in my tree > > in an attempt to avoid merge problems with net. Nothing stands > > out. First patch dedups context information. Next control path > > locking is very

[net-next 09/15] ice: Cleanup defines in ice_type.h

2019-09-03 Thread Jeff Kirsher
From: Tony Nguyen Conventionally, if the #defines/other are not needed by other header files being included, #includes are done first followed by #defines and other stuff. Move the #defines before the #includes to follow this convention. Suggested by: Bruce Allan Signed-off-by: Tony Nguyen Tes

[net-next 11/15] ice: Correctly handle return values for init DCB

2019-09-03 Thread Jeff Kirsher
From: Dave Ertman In the init path for DCB, the call to ice_init_dcb() can return a non-zero value for either an actual error, or due to the FW lldp engine being stopped. We are currently treating all non-zero values only as an indication that the FW LLDP engine is stopped. Check for an actual

[net-next 12/15] ice: Always notify FW of VF reset

2019-09-03 Thread Jeff Kirsher
From: Mitch Williams The call to ice_dis_vsi_txq() acts as the notification to the firmware that the VF is being reset. Because of this, we need to make this call every time we reset, regardless of whatever else we do to stop the Tx queues. Without this change, VF resets would fail to complete o

[net-next 02/15] ice: Fix resource leak in ice_remove_rule_internal()

2019-09-03 Thread Jeff Kirsher
From: Jeb Cramer We don't free s_rule if ice_aq_sw_rules() returns a non-zero status. If it returned a zero status, s_rule would be freed right after, so this implies it should be freed within the scope of the function regardless. Signed-off-by: Jeb Cramer Tested-by: Andrew Bowers Signed-off-

[net-next 05/15] ice: add needed PFR during driver unload

2019-09-03 Thread Jeff Kirsher
From: Bruce Allan According to the specification, a PF Reset must be done as part of the driver unload flow. Signed-off-by: Bruce Allan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_main.c | 5 + 1 file changed, 5 insertions(+) diff --git a/

[net-next 06/15] ice: update driver unloading field for Queue Shutdown AQ command

2019-09-03 Thread Jeff Kirsher
From: Bruce Allan According to recent specification versions, the field in the Queue Shutdown AdminQ command consisting of the "driver unloading" indication is not a 4 byte field (it is byte.bit 16.0). Change it to a byte and remove the unnecessary endian conversion. Signed-off-by: Bruce Allan

[net-next 01/15] ice: Fix EMP reset handling

2019-09-03 Thread Jeff Kirsher
From: Anirudh Venkataramanan ice_reset_subtask needs to handle EMP resets as well, as EMP resets can be triggered by the firmware. This patch adds the logic to do this. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i

[net-next 03/15] ice: Report what the user set for coalesce [tx|rx]-usecs

2019-09-03 Thread Jeff Kirsher
From: Brett Creeley Currently if the user sets an odd value for [tx|rx]-usecs we align the value because the hardware only understands ITR values in multiples of 2. This seems misleading because we are essentially telling the user that the ITR value is odd, when in fact we have changed it interna

[net-next 08/15] ice: print extra message if topology issue

2019-09-03 Thread Jeff Kirsher
From: Jesse Brandeburg The driver needs to inform the user if there is an issue with the topology / configuration of the link. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_main.c | 17 + 1 file cha

[net-next 15/15] ice: Only disable VLAN pruning for the VF when all VLANs are removed

2019-09-03 Thread Jeff Kirsher
From: Brett Creeley Currently if the VF adds a VLAN, VLAN pruning will be enabled for that VSI. Also, when a VLAN gets deleted it will disable VLAN pruning even if other VLAN(s) exists for the VF. Fix this by only disabling VLAN pruning on the VF VSI when removing the last VF (i.e. vf->num_vlan =

[net-next 07/15] ice: add print of autoneg state to link message

2019-09-03 Thread Jeff Kirsher
From: Jesse Brandeburg Print the state of auto-negotiation when printing the Link up message. Adds new text to the "NIC Link is up" line like Autoneg: Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_main.c | 11 +++

[net-next 14/15] ice: Remove enable DCB when SW LLDP is activated

2019-09-03 Thread Jeff Kirsher
From: Michal Swiatkowski Remove code that enables DCB in initialization when SW LLDP is activated. DCB flag is set or reset before in ice_init_pf_dcb based on number of TCs. So there is not need to overwrite it. Setting DCB without checking number of TCs can cause communication problems with oth

[net-next 04/15] ice: Deduce TSA value from the priority value in the CEE mode

2019-09-03 Thread Jeff Kirsher
From: Chinh T Cao In CEE mode, the TSA information can be derived from the reported priority value. Signed-off-by: Chinh T Cao Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_dcb.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff

[net-next 10/15] ice: Limit Max TCs on devices with more than 4 ports

2019-09-03 Thread Jeff Kirsher
From: Usha Ketineni This patch limits the max TCs set by the driver to the value provided by the firmware as per the capabilities of the device. Otherwise, hard coding to 8 TC max would fail the device configurations with more than 4 ports. Signed-off-by: Usha Ketineni Signed-off-by: Tony Nguye

[net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2019-09-03

2019-09-03 Thread Jeff Kirsher
This series contains updates to ice driver only. Anirudh adds the ability for the driver to handle EMP resets correctly by adding the logic to the existing ice_reset_subtask(). Jeb fixes up the logic to properly free up the resources for a switch rule whether or not it was successful in the remov

[net-next 13/15] ice: Report stats when VSI is down

2019-09-03 Thread Jeff Kirsher
From: Dave Ertman There is currently a check in get_ndo_stats that returns before updating stats if the VSI is down or there are no Tx or Rx queues. This causes the netdev to report zero stats with the netdev is down. Remove the check so that the behavior of reporting stats is the same as it wa

RE: [PATCH net-next 4/5] net/tls: clean up the number of #ifdefs for CONFIG_TLS_DEVICE

2019-09-03 Thread John Fastabend
Jakub Kicinski wrote: > TLS code has a number of #ifdefs which make the code a little > harder to follow. Recent fixes removed the ifdef around the > TLS_HW define, so we can switch to the often used pattern > of defining tls_device functions as empty static inlines > in the header when CONFIG_TLS_

RE: [PATCH net-next 1/5] net/tls: use the full sk_proto pointer

2019-09-03 Thread John Fastabend
Jakub Kicinski wrote: > Since we already have the pointer to the full original sk_proto > stored use that instead of storing all individual callback > pointers as well. > > Signed-off-by: Jakub Kicinski > Reviewed-by: John Hurley > Reviewed-by: Dirk van der Merwe > --- > drivers/crypto/chelsio

[PATCHv2 net-next] ipmr: remove cache_resolve_queue_len

2019-09-03 Thread Hangbin Liu
This is a re-post of previous patch wrote by David Miller[1]. Phil Karn reported[2] that on busy networks with lots of unresolved multicast routing entries, the creation of new multicast group routes can be extremely slow and unreliable. The reason is we hard-coded multicast route entries with un

Re: [PATCH] net-ipv6: fix excessive RTF_ADDRCONF flag on ::1/128 local route (and others)

2019-09-03 Thread Lorenzo Colitti
On Wed, Sep 4, 2019 at 4:45 AM David Ahern wrote: > > exactly. It was shortsighted of me to add the ADDRCONF flag and removing > it reverts back to the previous behavior. > > When I enable radvd, I do see the flag set when it should be and not for > other addresses. I believe the patch is correct.

Re: [PATCH v2 bpf-next 2/3] bpf: implement CAP_BPF

2019-09-03 Thread Alexei Starovoitov
On 8/30/19 8:19 AM, Nicolas Dichtel wrote: > Le 29/08/2019 à 19:30, Alexei Starovoitov a écrit : > [snip] >> These are the links that showing that k8 can delegates caps. >> Are you saying that you know of folks who specifically >> delegate cap_sys_admin and cap_net_admin _only_ to a container to ru

Re: [PATCH bpf-next 00/13] bpf: adding map batch processing support

2019-09-03 Thread Alexei Starovoitov
On Tue, Sep 03, 2019 at 04:07:17PM -0700, Brian Vazquez wrote: > > We could also modify get_next_key behaviour _only_ when it's called > from a dumping function in which case we do know that we want to move > forward not backwards (basically if prev_key is not found, then > retrieve the first key

Re: [PATCH] Clock-independent TCP ISN generation

2019-09-03 Thread Cyrus Sh
On 9/3/19 4:45 PM, David Miller wrote: > At least our problematic code, unlike your patch, compiles. I obviously compiled and tested the code before sending along and this should be easy to understand. Even I published the results in the link that I mentioned in the initial message. Now I'm not s

Re: Proposal: r8152 firmware patching framework

2019-09-03 Thread Prashant Malani
(Narrowing the recipient list for now) On Tue, Sep 3, 2019 at 3:50 PM David Miller wrote: > > From: Prashant Malani > Date: Tue, 3 Sep 2019 14:32:01 -0700 > > > I've moved David to the TO list to hopefully get his suggestions and > > guidance about how to design this in a upstream-compatible way

Re: [PATCH bpf-next 00/13] bpf: adding map batch processing support

2019-09-03 Thread Yonghong Song
On 9/3/19 3:30 PM, Stanislav Fomichev wrote: > On 09/03, Alexei Starovoitov wrote: >> On Fri, Aug 30, 2019 at 02:18:09PM -0700, Stanislav Fomichev wrote: > > I personally like Jakub's/Quentin's proposal more. So if I get to choose > between this series and Jakub's filter+dump in BPF,

Re: [PATCH bpf-next 00/13] bpf: adding map batch processing support

2019-09-03 Thread Brian Vazquez
On Tue, Sep 3, 2019 at 3:30 PM Stanislav Fomichev wrote: > > On 09/03, Alexei Starovoitov wrote: > > On Fri, Aug 30, 2019 at 02:18:09PM -0700, Stanislav Fomichev wrote: > > > > > > > > > > I personally like Jakub's/Quentin's proposal more. So if I get to > > > > > choose > > > > > between this se

[PATCH bpf-next] selftests/bpf: precision tracking tests

2019-09-03 Thread Alexei Starovoitov
Add two tests to check that stack slot marking during backtracking doesn't trigger 'spi > allocated_stack' warning. One test is using BPF_ST insn. Another is using BPF_STX. Signed-off-by: Alexei Starovoitov --- these tests depend on the fix https://patchwork.ozlabs.org/patch/1157368/ --- .../tes

Re: Proposal: r8152 firmware patching framework

2019-09-03 Thread David Miller
From: Prashant Malani Date: Tue, 3 Sep 2019 14:32:01 -0700 > I've moved David to the TO list to hopefully get his suggestions and > guidance about how to design this in a upstream-compatible way. I am not an expert in this area so please do not solicit my opinion. Thank you.

Re: [PATCH] Clock-independent TCP ISN generation

2019-09-03 Thread David Miller
From: Cyrus Sh Date: Tue, 3 Sep 2019 10:27:41 -0600 > It's up to you whether to want to keep using a problematic code that > may endanger users or want to do something about it since we won't > insist on having a patch accepted. At least our problematic code, unlike your patch, compiles.

Re: [PATCH] Clock-independent TCP ISN generation

2019-09-03 Thread David Miller
From: Cyrus Sh Date: Tue, 3 Sep 2019 10:06:03 -0600 > On 9/3/19 9:59 AM, Eric Dumazet wrote: >> >> You could add a random delay to all SYN packets, if you believe your host >> has clock skews. > > In theory yes, but again do you know any practical example with tested > applications and the lis

Re: [PATCH bpf-next 00/13] bpf: adding map batch processing support

2019-09-03 Thread Stanislav Fomichev
On 09/03, Alexei Starovoitov wrote: > On Fri, Aug 30, 2019 at 02:18:09PM -0700, Stanislav Fomichev wrote: > > > > > > > > I personally like Jakub's/Quentin's proposal more. So if I get to choose > > > > between this series and Jakub's filter+dump in BPF, I'd pick filter+dump > > > > (pending per-c

[PATCH v7 net-next 10/19] ionic: Add the basic NDO callbacks for netdev support

2019-09-03 Thread Shannon Nelson
Set up the initial NDO structure and callbacks for netdev to use, and register the netdev. This will allow us to do a few basic operations on the device, but no traffic yet. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 2 + .../ethernet/pensando/ionic/ioni

[PATCH v7 net-next 19/19] ionic: Add coalesce and other features

2019-09-03 Thread Shannon Nelson
Interrupt coalescing, tunable copybreak value, and tx timeout. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_dev.h | 1 + .../ethernet/pensando/ionic/ionic_ethtool.c | 108 ++ .../net/ethernet/pensando/ionic/ionic_lif.c | 28 - .../net/ether

[PATCH v7 net-next 14/19] ionic: Add initial ethtool support

2019-09-03 Thread Shannon Nelson
Add in the basic ethtool callbacks for device information and control. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile | 2 +- .../net/ethernet/pensando/ionic/ionic_dev.h | 7 + .../ethernet/pensando/ionic/ionic_ethtool.c | 497 ++ .../ethe

[PATCH v7 net-next 09/19] ionic: Add notifyq support

2019-09-03 Thread Shannon Nelson
The AdminQ is fine for sending messages and requests to the NIC, but we also need to have events published from the NIC to the driver. The NotifyQ handles this for us, using the same interrupt as AdminQ. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_debugfs.c | 15 +- .

[PATCH v7 net-next 12/19] ionic: Add Rx filter and rx_mode ndo support

2019-09-03 Thread Shannon Nelson
Add the Rx filtering and rx_mode NDO callbacks. Also add the deferred work thread handling needed to manage the filter requests outside of the netif_addr_lock spinlock. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 400 +- .../net/ethernet/pen

[PATCH v7 net-next 15/19] ionic: Add Tx and Rx handling

2019-09-03 Thread Shannon Nelson
Add both the Tx and Rx queue setup and handling. The related stats display comes later. Instead of using the generic napi routines used by the slow-path commands, the Tx and Rx paths are simplified and inlined in one file in order to get better compiler optimizations. Signed-off-by: Shannon Nels

[PATCH v7 net-next 07/19] ionic: Add basic adminq support

2019-09-03 Thread Shannon Nelson
Most of the NIC configuration happens through the AdminQ message queue. NAPI is used for basic interrupt handling and message queue management. These routines are set up to be shared among different types of queues when used in slow-path handling. Signed-off-by: Shannon Nelson --- drivers/net/

[PATCH v7 net-next 16/19] ionic: Add netdev-event handling

2019-09-03 Thread Shannon Nelson
When the netdev gets a new name from userland, pass that name down to the NIC for internal tracking. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 2 + .../net/ethernet/pensando/ionic/ionic_lif.c | 62 +++ 2 files changed, 64 insertions(+)

[PATCH v7 net-next 06/19] ionic: Add interrupts and doorbells

2019-09-03 Thread Shannon Nelson
The ionic interrupt model is based on interrupt control blocks accessed through the PCI BAR. Doorbell registers are used by the driver to signal to the NIC that requests are waiting on the message queues. Interrupts are used by the NIC to signal to the driver that answers are waiting on the compl

[PATCH v7 net-next 05/19] ionic: Add basic lif support

2019-09-03 Thread Shannon Nelson
The LIF is the Logical Interface, which represents the external connections. The NIC can multiplex many LIFs to a single port, but in most setups, LIF0 is the primary control for the port. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile | 2 +- drivers/net/ethe

[PATCH v7 net-next 03/19] ionic: Add hardware init and device commands

2019-09-03 Thread Shannon Nelson
The ionic device has a small set of PCI registers, including a device control and data space, and a large set of message commands. Also adds new DEVLINK_INFO_VERSION_GENERIC tags for ASIC_ID, ASIC_REV, and FW. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile |

[PATCH v7 net-next 17/19] ionic: Add driver stats

2019-09-03 Thread Shannon Nelson
Add in the detailed statistics for ethtool -S that the driver keeps as it processes packets. Display of the additional debug statistics can be enabled through the ethtool priv-flags feature. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile | 2 +- .../ethernet/p

[PATCH v7 net-next 13/19] ionic: Add async link status check and basic stats

2019-09-03 Thread Shannon Nelson
Add code to handle the link status event, and wire up the basic netdev hardware stats. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 116 +- .../net/ethernet/pensando/ionic/ionic_lif.h | 1 + 2 files changed, 111 insertions(+), 6 deletions(

[PATCH v7 net-next 18/19] ionic: Add RSS support

2019-09-03 Thread Shannon Nelson
Add code to manipulate through ethtool the RSS configuration used by the NIC. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_ethtool.c | 73 .../net/ethernet/pensando/ionic/ionic_lif.c | 84 +++ .../net/ethernet/pensando/ionic/ionic_lif.h

[PATCH v7 net-next 11/19] ionic: Add management of rx filters

2019-09-03 Thread Shannon Nelson
Set up the infrastructure for managing Rx filters. We can't ask the hardware for what filters it has, so we keep a local list of filters that we've pushed into the HW. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile | 2 +- .../net/ethernet/pensando/ionic/ionic

[PATCH v7 net-next 08/19] ionic: Add adminq action

2019-09-03 Thread Shannon Nelson
Add AdminQ specific message requests and completion handling. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 7 ++ .../net/ethernet/pensando/ionic/ionic_main.c | 111 ++ 2 files changed, 118 insertions(+) diff --git a/drivers/net/ethernet/pe

[PATCH v7 net-next 02/19] ionic: Add basic framework for IONIC Network device driver

2019-09-03 Thread Shannon Nelson
This patch adds a basic driver framework for the Pensando IONIC network device. There is no functionality right now other than the ability to load and unload. Signed-off-by: Shannon Nelson --- .../networking/device_drivers/index.rst | 1 + .../device_drivers/pensando/ionic.rst |

[PATCH v7 net-next 04/19] ionic: Add port management commands

2019-09-03 Thread Shannon Nelson
The port management commands apply to the physical port associated with the PCI device, which might be shared among several logical interfaces. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 4 + .../ethernet/pensando/ionic/ionic_bus_pci.c | 16 .../net

[PATCH v7 net-next 00/19] ionic: Add ionic driver

2019-09-03 Thread Shannon Nelson
This is a patch series that adds the ionic driver, supporting the Pensando ethernet device. In this initial patchset we implement basic transmit and receive. Later patchsets will add more advanced features. Our thanks to Saeed Mahameed, David Miller, Andrew Lunn, Michal Kubecek, Jacub Kicinski,

[PATCH v7 net-next 01/19] devlink: Add new info version tags for ASIC and FW

2019-09-03 Thread Shannon Nelson
The current tag set is still rather small and needs a couple more tags to help with ASIC identification and to have a more generic FW version. Cc: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: Shannon Nelson --- .../networking/devlink-info-versions.rst | 16 inclu

[PATCH net 1/2] ipv6: Fix RTA_MULTIPATH with nexthop objects

2019-09-03 Thread David Ahern
From: David Ahern A change to the core nla helpers was missed during the push of the nexthop changes. rt6_fill_node_nexthop should be calling nla_nest_start_noflag not nla_nest_start. Currently, iproute2 does not print multipath data because of parsing issues with the attribute. Fixes: f88d8ea67

[PATCH net 2/2] selftest: A few cleanups for fib_nexthops.sh

2019-09-03 Thread David Ahern
From: David Ahern Cleanups of the tests in fib_nexthops.sh 1. Several tests noted unexpected route output, but the discrepancy was not showing in the summary output and overlooked in the verbose output. Add a WARNING message to the summary output to make it clear a test is not showing

[PATCH net 0/2] nexthops: Fix multipath notifications for IPv6 and selftests

2019-09-03 Thread David Ahern
From: David Ahern A couple of bug fixes noticed while testing Donald's patch. David Ahern (2): ipv6: Fix RTA_MULTIPATH with nexthop objects selftest: A few cleanups for fib_nexthops.sh net/ipv6/route.c| 2 +- tools/testing/selftests/net/fib_nexthops.sh | 24 +++

Re: [PATCH v2 net] net: Properly update v4 routes with v6 nexthop

2019-09-03 Thread David Ahern
On 8/31/19 6:22 AM, Donald Sharp wrote: > @@ -1684,7 +1684,8 @@ EXPORT_SYMBOL_GPL(fib_add_nexthop); > #endif > > #ifdef CONFIG_IP_ROUTE_MULTIPATH > -static int fib_add_multipath(struct sk_buff *skb, struct fib_info *fi) > +static int fib_add_multipath(struct sk_buff *skb, struct fib_info *fi, >

[PATCH bpf] bpf: fix precision tracking of stack slots

2019-09-03 Thread Alexei Starovoitov
The problem can be seen in the following two tests: 0: (bf) r3 = r10 1: (55) if r3 != 0x7b goto pc+0 2: (7a) *(u64 *)(r3 -8) = 0 3: (79) r4 = *(u64 *)(r10 -8) .. 0: (85) call bpf_get_prandom_u32#7 1: (bf) r3 = r10 2: (55) if r3 != 0x7b goto pc+0 3: (7b) *(u64 *)(r3 -8) = r0 4: (79) r4 = *(u64 *)(r1

rtnl_lock() question

2019-09-03 Thread Jonathan Lemon
How appropriate is it to hold the rtnl_lock() across a sleepable memory allocation? On one hand it's just a mutex, but it would seem like it could block quite a few things. -- Jonathan

Re: Proposal: r8152 firmware patching framework

2019-09-03 Thread Prashant Malani
Hi Bambi, Thank you for your response. We'd be more than happy to assist in working out a solution that would be acceptable by the upstream maintainers. I think having a maintainable and safe way to deploy firmware fixes would be much appreciated by hardware users as well as upstream devs, and cer

Re: [PATCH bpf-next 00/13] bpf: adding map batch processing support

2019-09-03 Thread Alexei Starovoitov
On Fri, Aug 30, 2019 at 02:18:09PM -0700, Stanislav Fomichev wrote: > > > > > > I personally like Jakub's/Quentin's proposal more. So if I get to choose > > > between this series and Jakub's filter+dump in BPF, I'd pick filter+dump > > > (pending per-cpu issue which we actually care about). > > >

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-09-03 Thread Yonghong Song
On 9/3/19 11:45 AM, Carlos Antonio Neira Bustos wrote: > Hi Yonghong, > >>> Yes, the samples/bpf test case can be removed. >>> Could you create a selftest with tracpoint net/netif_receive_skb, which >>> also uses the proposed helper? net/netif_receive_skb will happen in >>> interrupt context and

Re: [PATCH net-next] net: Fail explicit bind to local reserved ports

2019-09-03 Thread Subash Abhinov Kasiviswanathan
I don't know how happy I am about this. Whatever sets up the transparent proxy business can block any attempt to communicate over these ports. Also, protocols like SCTP need the new handling too. Hi David The purpose of this patch was to allow the transparent proxy application to block the s

[net PATCH] net: sock_map, fix missing ulp check in sock hash case

2019-09-03 Thread John Fastabend
sock_map and ULP only work together when ULP is loaded after the sock map is loaded. In the sock_map case we added a check for this to fail the load if ULP is already set. However, we missed the check on the sock_hash side. Add a ULP check to the sock_hash update path. Fixes: 604326b41a6fb ("bpf,

Re: net/mlx5e: bind() always returns EINVAL with XDP_ZEROCOPY

2019-09-03 Thread Saeed Mahameed
On Mon, 2019-09-02 at 11:08 +0200, Jesper Dangaard Brouer wrote: > On Sun, 1 Sep 2019 18:47:15 +0200 > Kal Cutter Conley wrote: > > > Hi, > > I figured out the problem. Let me document the issue here for > > others > > and hopefully start a discussion. > > > > The mlx5 driver uses special queue

Re: [net-next 01/18] net/mlx5: Add flow steering actions to fs_cmd shim layer

2019-09-03 Thread Saeed Mahameed
On Mon, 2019-09-02 at 12:10 -0700, David Miller wrote: > From: Saeed Mahameed > Date: Mon, 2 Sep 2019 07:22:52 + > > > + maction->flow_action_raw.pkt_reformat = > > + mlx5_packet_reformat_alloc(dev->mdev, prm_prt, len, > > +in, namespace

[net-next V2 16/18] net/mlx5: Add API to set the namespace steering mode

2019-09-03 Thread Saeed Mahameed
From: Maor Gottlieb Add API to set the flow steering root namesapce mode. Setting new mode should be called before any steering operation is executed on the namespace. This API is going to be used by steering users such switchdev. Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Signed-off

[net-next V2 14/18] net/mlx5: DR, Add CONFIG_MLX5_SW_STEERING for software steering support

2019-09-03 Thread Saeed Mahameed
From: Alex Vesker Add new mlx5 Kconfig flag to allow selecting software steering support and compile all the steering files only if the flag is selected. Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Kliteynik Reviewed-by: Erez Shitrit Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahamee

[net-next V2 15/18] net/mlx5: Add direct rule fs_cmd implementation

2019-09-03 Thread Saeed Mahameed
From: Maor Gottlieb Add support to create flow steering objects via direct rule API (SW steering). New layer is added - fs_dr, this layer translates the command that fs_core sends to the FW into direct rule API. In case that direct rule is not supported in some feature then -EOPNOTSUPP is returne

[net-next V2 13/18] net/mlx5: DR, Expose APIs for direct rule managing

2019-09-03 Thread Saeed Mahameed
From: Alex Vesker Expose APIs for direct rule managing to increase insertion rate by bypassing the firmware. Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/steering/mlx5dr.h | 212 ++

[net-next V2 18/18] net/mlx5: Add devlink flow_steering_mode parameter

2019-09-03 Thread Saeed Mahameed
From: Maor Gottlieb Add new parameter (flow_steering_mode) to control the flow steering mode of the driver. Two modes are supported: 1. DMFS - Device managed flow steering 2. SMFS - Software/Driver managed flow steering. In the DMFS mode, the HW steering entities are created through the FW. In t

[net-next V2 02/18] net/mlx5: DR, Add the internal direct rule types definitions

2019-09-03 Thread Saeed Mahameed
From: Alex Vesker Add the internal header file that contains various types definition that will be used in coming patches as well as the internal functions decelerations. Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Kliteynik Reviewed-by: Erez Shitrit Reviewed-by: Mark Bloch Signed-off-

[net-next V2 11/18] net/mlx5: DR, Expose steering rule functionality

2019-09-03 Thread Saeed Mahameed
From: Alex Vesker Rules are the actual objects that tie matchers, header values and actions. Each rule belongs to a matcher, which can hold multiple rules sharing the same mask. Each rule is a specific set of values and actions. When a packet reaches a matcher it is being matched against the matc

[net-next V2 17/18] net/mlx5: Add support to use SMFS in switchdev mode

2019-09-03 Thread Saeed Mahameed
From: Maor Gottlieb In case that flow steering mode of the driver is SMFS (Software Managed Flow Steering), then use the DR (SW steering) API to create the steering objects. In addition, add a call to the set peer namespace when switchdev gets devcom pair event. It is required to support VF LAG

[net-next V2 10/18] net/mlx5: DR, Expose steering action functionality

2019-09-03 Thread Saeed Mahameed
From: Alex Vesker On rule creation a set of actions can be provided, the actions describe what to do with the packet in case of a match. It is possible to provide a set of actions which will be done by order. Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit Reviewed-by: Mark Bloch Signed-

[net-next V2 09/18] net/mlx5: DR, Expose steering matcher functionality

2019-09-03 Thread Saeed Mahameed
From: Alex Vesker Matcher defines which packets fields are matched when a packet arrives. Matcher is a part of a table and can contain one or more rules. Where rule defines specific values of the matcher's mask definition. Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit Reviewed-by: Mark

[net-next V2 12/18] net/mlx5: DR, Add required FW steering functionality

2019-09-03 Thread Saeed Mahameed
From: Alex Vesker SW steering is capable of doing many steering functionalities but there are still some functionalities which are not exposed to upper layers and therefore performed by the FW. This is the support for recalculating checksum using a hairpin QP. The recalculation is required after

[net-next V2 08/18] net/mlx5: DR, Expose steering table functionality

2019-09-03 Thread Saeed Mahameed
From: Alex Vesker Tables are objects which are used for storing matchers, each table belongs to a domain and defined by the domain type. When a packet reaches the table it is being processed by each of its matchers until a successful match. Tables can hold multiple matchers ordered by matcher pri

[net-next V2 07/18] net/mlx5: DR, Expose steering domain functionality

2019-09-03 Thread Saeed Mahameed
From: Alex Vesker Domain is the frame for all of the dr (direct rule) objects. There are different domain types which also affect the object under that domain. Each domain can hold multiple tables which can hold multiple matchers and so on, this means that all of the dr (direct rule) objects exis

[net-next V2 04/18] net/mlx5: DR, ICM pool memory allocator

2019-09-03 Thread Saeed Mahameed
From: Alex Vesker ICM device memory is used for writing steering rules (STEs) to the NIC. An ICM memory pool allocator was implemented to manage the required memory. The pool consists of buckets, a bucket per chunk size. Once a bucket is empty we will cut a row of memory from the latest allocated

[net-next V2 06/18] net/mlx5: DR, Add Steering entry (STE) utilities

2019-09-03 Thread Saeed Mahameed
From: Alex Vesker Steering Entry (STE) object is the basic building block of the steering map. There are several types of STEs. Each rule can be constructed of multiple STEs. Each STE dictates which fields of the packet's header are being matched as well as the information about the next step in

[net-next V2 03/18] net/mlx5: DR, Add direct rule command utilities

2019-09-03 Thread Saeed Mahameed
From: Alex Vesker Add direct rule command utilities which consists of all the FW commands that are executed to provide the SW steering functionality. Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/steerin

[net-next V2 05/18] net/mlx5: DR, Expose an internal API to issue RDMA operations

2019-09-03 Thread Saeed Mahameed
From: Alex Vesker Inserting or deleting a rule is done by RDMA read/write operation to SW ICM device memory. This file provides the support for executing these operations. It includes allocating the needed resources and providing an API for writing steering entries to the memory. Signed-off-by:

[pull request][net-next V2 00/18] Mellanox, mlx5 software managed steering

2019-09-03 Thread Saeed Mahameed
Hi Dave, This series adds the support for software (driver managed) flow steering. For more information please see tag log below. Please pull and let me know if there is any problem. Please note that the series starts with a merge of mlx5-next branch, to resolve and avoid dependency with rdma tr

[net-next V2 01/18] net/mlx5: Add flow steering actions to fs_cmd shim layer

2019-09-03 Thread Saeed Mahameed
From: Maor Gottlieb Add flow steering actions: modify header and packet reformat to the fs_cmd shim layer. This allows each namespace to define possibly different functionality for alloc/dealloc action commands. Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed

Re: [PATCH] net-ipv6: fix excessive RTF_ADDRCONF flag on ::1/128 local route (and others)

2019-09-03 Thread David Ahern
On 9/3/19 6:17 AM, Maciej Żenczykowski wrote: > Well, if you look at the commit my commit is fixing, ie. > commit c7a1ce397adacaf5d4bb2eab0a738b5f80dc3e43 > then you'll see this in the commit description: > "- dst_nocount is handled by the RTF_ADDRCONF flag" > and the patch diff itself is from

[PATCH v2 net-next 1/2] i40e: fix hw_dbg usage in i40e_hmc_get_object_va

2019-09-03 Thread Mauro S. M. Rodrigues
The mentioned function references a i40e_hw attribute, as parameter for hw_dbg, but it doesn't exist in the function scope. Fixes it by changing parameters from i40e_hmc_info to i40e_hw which can retrieve the necessary i40e_hmc_info. v2: - Fixed reverse xmas tree code style issue as suggested by

[PATCH v2 net-next 2/2] i40e: Implement debug macro hw_dbg using dev_dbg

2019-09-03 Thread Mauro S. M. Rodrigues
There are several uses of hw_dbg in the code, producing no output. This patch implments it using dev_debug. Initially the intention was to implement it using netdev_dbg, analogously to what is done in ixgbe for instance. That approach was avoided due to some early usages of hw_dbg, like i40e_pf_re

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-09-03 Thread Carlos Antonio Neira Bustos
Hi Yonghong, > > Yes, the samples/bpf test case can be removed. > > Could you create a selftest with tracpoint net/netif_receive_skb, which > > also uses the proposed helper? net/netif_receive_skb will happen in > > interrupt context and it should catch the issue as well if > > filename_lookup s

Re: Is bug 200755 in anyone's queue??

2019-09-03 Thread Willem de Bruijn
On Fri, Aug 30, 2019 at 4:30 PM Willem de Bruijn wrote: > > On Fri, Aug 30, 2019 at 4:54 AM Eric Dumazet wrote: > > > > > > > > On 8/29/19 9:26 PM, Willem de Bruijn wrote: > > > > > SO_REUSEPORT was not intended to be used in this way. Opening > > > multiple connected sockets with the same local

Re: [PATCH net-next v3 2/3] dt-bindings: net: dsa: mt7530: Add support for port 5

2019-09-03 Thread Rob Herring
On Mon, 2 Sep 2019 15:02:25 +0200, =?UTF-8?q?Ren=C3=A9=20van=20Dorst?= wrote: > MT7530 port 5 has many modes/configurations. > Update the documentation how to use port 5. > > Signed-off-by: René van Dorst > Cc: devicet...@vger.kernel.org > Cc: Rob Herring > --- > v2->v3: > * Remove 'status = "o

Re: BUG_ON in skb_segment, after bpf_skb_change_proto was applied

2019-09-03 Thread Willem de Bruijn
On Tue, Sep 3, 2019 at 1:03 PM Shmulik Ladkani wrote: > > On Tue, 3 Sep 2019 12:23:54 -0400 > Willem de Bruijn wrote: > > > This is a lot more code change. Especially for stable fixes that need > > to be backported, a smaller patch is preferable. > > Indeed. Thanks for the feedback. > > > My sugg

Re: BUG_ON in skb_segment, after bpf_skb_change_proto was applied

2019-09-03 Thread Shmulik Ladkani
On Tue, 3 Sep 2019 12:23:54 -0400 Willem de Bruijn wrote: > This is a lot more code change. Especially for stable fixes that need > to be backported, a smaller patch is preferable. Indeed. Thanks for the feedback. > My suggestion only tested the first frag_skb length. If a list can be > created

[PATCH net-next,v2 0/4] flow_offload: update mangle action representation

2019-09-03 Thread Pablo Neira Ayuso
This patch updates the mangle action representation: Patch 1) Undo bitwise NOT operation on the mangle mask (coming from tc pedit userspace). Patch 2) mangle value &= mask from the front-end side. Patch 3) adjust offset, length and coalesce consecutive pedit keys into one singl

[PATCH net-next,v2 2/4] net: flow_offload: bitwise AND on mangle action value field

2019-09-03 Thread Pablo Neira Ayuso
Drivers perform a bitwise AND on the value and the mask. Update tc_setup_flow_action() to perform this operation so drivers do not need to do this. Signed-off-by: Pablo Neira Ayuso --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

  1   2   >