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

2019-09-02 Thread Boris Pismenny
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 slightly optimized. Fourth patch cle

Re: [Intel-wired-lan] [PATCH] i40e: clear __I40E_VIRTCHNL_OP_PENDING on invalid min tx rate

2019-09-02 Thread Paul Menzel
Dear Stefan, On 03.09.19 08:08, Stefan Assmann wrote: In the case of an invalid min tx rate being requested i40e_ndo_set_vf_bw() immediately returns -EINVAL instead of releasing __I40E_VIRTCHNL_OP_PENDING first. What problem does this cause? Signed-off-by: Stefan Assmann --- drivers/net/

[PATCH] i40e: clear __I40E_VIRTCHNL_OP_PENDING on invalid min tx rate

2019-09-02 Thread Stefan Assmann
In the case of an invalid min tx rate being requested i40e_ndo_set_vf_bw() immediately returns -EINVAL instead of releasing __I40E_VIRTCHNL_OP_PENDING first. Signed-off-by: Stefan Assmann --- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(

Re: [PATCH v3] tun: fix use-after-free when register netdev failed

2019-09-02 Thread Jason Wang
On 2019/9/3 下午1:42, Yang Yingliang wrote: On 2019/9/3 11:03, Jason Wang wrote: On 2019/9/3 上午9:45, Yang Yingliang wrote: On 2019/9/2 13:32, Jason Wang wrote: On 2019/8/23 下午5:36, Yang Yingliang wrote: On 2019/8/23 11:05, Jason Wang wrote: - Original Message - On 2019/8/22

Re: [PATCH v3] tun: fix use-after-free when register netdev failed

2019-09-02 Thread Yang Yingliang
On 2019/9/3 11:03, Jason Wang wrote: On 2019/9/3 上午9:45, Yang Yingliang wrote: On 2019/9/2 13:32, Jason Wang wrote: On 2019/8/23 下午5:36, Yang Yingliang wrote: On 2019/8/23 11:05, Jason Wang wrote: - Original Message - On 2019/8/22 14:07, Yang Yingliang wrote: On 2019/8/22

[PATCH] Clock-independent TCP ISN generation

2019-09-02 Thread Cyrus Sh
This patch addresses the privacy issue of TCP ISN generation in Linux kernel. Currently an adversary can deanonymize a user behind an anonymity network by inducing a load pattern on the target machine and correlating its clock skew with the pattern. Since the kernel adds a clock-based counter to ge

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

2019-09-02 Thread Lorenzo Colitti
On Tue, Sep 3, 2019 at 11:18 AM David Ahern wrote: > addrconf_f6i_alloc is used for addresses added by userspace > (ipv6_add_addr) and anycast. ie., from what I can see it is not used for RAs Isn't ipv6_add_addr called by addrconf_prefix_rcv_add_addr, which is called by addrconf_prefix_rcv, which

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

2019-09-02 Thread Jakub Kicinski
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/chtls/chtls_main.c | 6 +++-- include/

[PATCH net-next 5/5] net/tls: dedup the record cleanup

2019-09-02 Thread Jakub Kicinski
If retransmit record hint fall into the cleanup window we will free it by just walking the list. No need to duplicate the code. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Dirk van der Merwe --- net/tls/tls_device.c | 6 +- 1 file changed, 1 insertion(+), 5 deletion

[PATCH net-next 2/5] net/tls: don't jump to return

2019-09-02 Thread Jakub Kicinski
Reusing parts of error path for normal exit will make next commit harder to read, untangle the two. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Dirk van der Merwe --- net/tls/tls_device.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-)

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

2019-09-02 Thread Jakub Kicinski
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_DEVICE=n. Signed-off-by: Jakub

[PATCH net-next 3/5] net/tls: narrow down the critical area of device_offload_lock

2019-09-02 Thread Jakub Kicinski
On setsockopt path we need to hold device_offload_lock from the moment we check netdev is up until the context is fully ready to be added to the tls_device_list. No need to hold it around the get_netdev_for_sock(). Change the code and remove the confusing comment. Signed-off-by: Jakub Kicinski R

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

2019-09-02 Thread Jakub Kicinski
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 slightly optimized. Fourth patch cleans up ugly #ifdefs. Jakub Kicinski (5): net/tls: u

Re: how to search for the best route from userspace in netlink?

2019-09-02 Thread David Ahern
On 9/2/19 4:07 PM, Dave Taht wrote: > Windows has the "RtmGetMostSpecificDestination" call: > https://docs.microsoft.com/en-us/windows/win32/rras/search-for-the-best-route > > In particular, I wanted to search for the best route, AND pick up the > PMTU from that (if it existed) > for older UDP app

Re: [PATCH v3] tun: fix use-after-free when register netdev failed

2019-09-02 Thread Jason Wang
On 2019/9/3 上午9:45, Yang Yingliang wrote: On 2019/9/2 13:32, Jason Wang wrote: On 2019/8/23 下午5:36, Yang Yingliang wrote: On 2019/8/23 11:05, Jason Wang wrote: - Original Message - On 2019/8/22 14:07, Yang Yingliang wrote: On 2019/8/22 10:13, Jason Wang wrote: On 2019/8/20

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

2019-09-02 Thread Gustavo A. R. Silva
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, > void *

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

2019-09-02 Thread David Ahern
On 9/1/19 8:12 PM, Lorenzo Colitti wrote: > Not sure if this patch is the right fix, though, because it breaks > things in the opposite direction: even routes created by an IPv6 > address added by receiving an RA will no longer have RTF_ADDRCONF. > Perhaps add something like this as well? > > str

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

2019-09-02 Thread David Ahern
On 9/2/19 10:23 AM, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > There is a subtle change in behaviour introduced by: > commit c7a1ce397adacaf5d4bb2eab0a738b5f80dc3e43 > 'ipv6: Change addrconf_f6i_alloc to use ip6_route_info_create' > > Before that patch /proc/net/ipv6_route in

Re: [PATCH v3] tun: fix use-after-free when register netdev failed

2019-09-02 Thread Yang Yingliang
On 2019/9/2 13:32, Jason Wang wrote: On 2019/8/23 下午5:36, Yang Yingliang wrote: On 2019/8/23 11:05, Jason Wang wrote: - Original Message - On 2019/8/22 14:07, Yang Yingliang wrote: On 2019/8/22 10:13, Jason Wang wrote: On 2019/8/20 上午10:28, Jason Wang wrote: On 2019/8/20 上午9

Re: [PATCH net] sctp: use transport pf_retrans in sctp_do_8_2_transport_strike

2019-09-02 Thread Marcelo Ricardo Leitner
On Mon, Sep 02, 2019 at 11:24:21PM +0800, Xin Long wrote: > Transport should use its own pf_retrans to do the error_count > check, instead of asoc's. Otherwise, it's meaningless to make > pf_retrans per transport. > > Fixes: 5aa93bcf66f4 ("sctp: Implement quick failover draft from tsvwg") > Signed

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

2019-09-02 Thread Pablo Neira Ayuso
On Sun, Sep 01, 2019 at 01:47:54PM -0700, Jakub Kicinski wrote: > On Sat, 31 Aug 2019 16:22:17 +0200, Pablo Neira Ayuso wrote: [...] > > > Please see the definitions of: > > > > > > struct nfp_fl_set_eth > > > struct nfp_fl_set_ip4_addrs > > > struct nfp_fl_set_ip4_ttl_tos > > > struct nfp_fl_set_

[PATCH net-next] Convert usage of IN_MULTICAST to ipv4_is_multicast

2019-09-02 Thread Dave Taht
IN_MULTICAST's primary intent is as a uapi macro. Elsewhere in the kernel we use ipv4_is_multicast consistently. This patch unifies linux's multicast checks to use that function rather than this macro. Signed-off-by: Dave Taht Reviewed-by: Toke Høiland-Jørgensen --- drivers/net/geneve.c | 2

how to search for the best route from userspace in netlink?

2019-09-02 Thread Dave Taht
Windows has the "RtmGetMostSpecificDestination" call: https://docs.microsoft.com/en-us/windows/win32/rras/search-for-the-best-route In particular, I wanted to search for the best route, AND pick up the PMTU from that (if it existed) for older UDP applications like dnssec[1] and newer ones like QUI

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

2019-09-02 Thread David Miller
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); > + if (IS_ERR(maction->flow_action_raw.pkt_reformat)) >

Re: [PATCH] net: dsa: Fix off-by-one number of calls to devlink_port_unregister

2019-09-02 Thread David Miller
From: Vladimir Oltean Date: Sat, 31 Aug 2019 15:46:19 +0300 > When a function such as dsa_slave_create fails, currently the following > stack trace can be seen: ... > devlink_free is complaining right here: > > WARN_ON(!list_empty(&devlink->port_list)); > > This happens because devlink_p

Re: [patch net-next v2] mlx5: Add missing init_net check in FIB notifier

2019-09-02 Thread David Miller
From: Jiri Pirko Date: Fri, 30 Aug 2019 10:25:30 +0200 > From: Jiri Pirko > > Take only FIB events that are happening in init_net into account. No other > namespaces are supported. > > Signed-off-by: Jiri Pirko > --- > v1->v2: > - no change, just cced maintainers (fat finger made me avoid the

Re: [PATCH net-next] net_failover: get rid of the limitaion receive packet from standy dev when primary exist

2019-09-02 Thread David Miller
From: we...@ucloud.cn Date: Fri, 30 Aug 2019 13:07:48 +0800 > From: wenxu > > For receive side the standby, primary and failover is the same one, > If the packet receive from standby or primary should can be deliver > to failover dev. > > For example: there are VF and virtio device failover tog

Re: [net-next 11/15] i40e: Implement debug macro hw_dbg using pr_debug

2019-09-02 Thread Mauro Rodrigues
On Wed, Aug 28, 2019 at 03:39:53PM -0700, Jakub Kicinski wrote: > On Tue, 27 Aug 2019 23:44:03 -0700, Jeff Kirsher wrote: > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_osdep.h > > b/drivers/net/ethernet/intel/i40e/i40e_osdep.h > > index a07574bff550..c0c9ce3eab23 100644 > > --- a/drivers/n

[PATCH v1 net-next 14/15] net: dsa: sja1105: Make the PTP command read-write

2019-09-02 Thread Vladimir Oltean
The PTPSTRTSCH and PTPSTOPSCH bits are actually readable and indicate whether the time-aware scheduler is running or not. We will be using that for monitoring the scheduler in the next patch, so refactor the PTP command API in order to allow that. Signed-off-by: Vladimir Oltean --- Changes since

[PATCH v1 net-next 06/15] net: dsa: sja1105: Disallow management xmit during switch reset

2019-09-02 Thread Vladimir Oltean
The purpose here is to avoid ptp4l fail due to this condition: timed out while polling for tx timestamp increasing tx_timestamp_timeout may correct this issue, but it is likely caused by a driver bug port 1: send peer delay request failed So either reset the switch before the management fr

[PATCH v1 net-next 15/15] net: dsa: sja1105: Implement state machine for TAS with PTP clock source

2019-09-02 Thread Vladimir Oltean
Tested using the following bash script and the tc from iproute2-next: #!/bin/bash set -e -u -o pipefail NSEC_PER_SEC="10" gatemask() { local tc_list="$1" local mask=0 for tc in ${tc_list}; do

[PATCH v1 net-next 04/15] net: dsa: sja1105: Implement the .gettimex64 system call for PTP

2019-09-02 Thread Vladimir Oltean
Through the PTP_SYS_OFFSET_EXTENDED ioctl, it is possible for userspace applications (i.e. phc2sys) to compensate for the delays incurred while reading the PHC's time. For now implement this ioctl in the driver, although the performance improvements are minimal. The goal with this patch is to rewo

[PATCH v1 net-next 10/15] net: dsa: Pass ndo_setup_tc slave callback to drivers

2019-09-02 Thread Vladimir Oltean
DSA currently handles shared block filters (for the classifier-action qdisc) in the core due to what I believe are simply pragmatic reasons - hiding the complexity from drivers and offerring a simple API for port mirroring. Extend the dsa_slave_setup_tc function by passing all other qdisc offloads

[PATCH v1 net-next 13/15] net: dsa: sja1105: Make HOSTPRIO a kernel config

2019-09-02 Thread Vladimir Oltean
Unfortunately with this hardware, there is no way to transmit in-band QoS hints with management frames (i.e. VLAN PCP is ignored). The traffic class for these is fixed in the static config (which in turn requires a reset to change). With the new ability to add time gates for individual traffic cla

[PATCH v1 net-next 08/15] net: dsa: sja1105: Advertise the 8 TX queues

2019-09-02 Thread Vladimir Oltean
This is a preparation patch for the tc-taprio offload (and potentially for other future offloads such as tc-mqprio). Instead of looking directly at skb->priority during xmit, let's get the netdev queue and the queue-to-traffic-class mapping, and put the resulting traffic class into the dsa_8021q P

[PATCH v1 net-next 11/15] net: dsa: sja1105: Add static config tables for scheduling

2019-09-02 Thread Vladimir Oltean
In order to support tc-taprio offload, the TTEthernet egress scheduling core registers must be made visible through the static interface. Signed-off-by: Vladimir Oltean --- Changes since RFC: - None. .../net/dsa/sja1105/sja1105_dynamic_config.c | 8 + .../net/dsa/sja1105/sja1105_static_confi

[PATCH v1 net-next 09/15] taprio: Add support for hardware offloading

2019-09-02 Thread Vladimir Oltean
From: Vinicius Costa Gomes This allows taprio to offload the schedule enforcement to capable network cards, resulting in more precise windows and less CPU usage. The important detail here is the difference between the gate_mask in taprio and gate_mask for the network driver. For the driver, each

[PATCH v1 net-next 12/15] net: dsa: sja1105: Configure the Time-Aware Scheduler via tc-taprio offload

2019-09-02 Thread Vladimir Oltean
This qdisc offload is the closest thing to what the SJA1105 supports in hardware for time-based egress shaping. The switch core really is built around SAE AS6802/TTEthernet (a TTTech standard) but can be made to operate similarly to IEEE 802.1Qbv with some constraints: - The gate control list is a

[PATCH v1 net-next 07/15] net: dsa: sja1105: Move PTP data to its own private structure

2019-09-02 Thread Vladimir Oltean
Reduce the size of the sja1105_private structure when CONFIG_NET_DSA_SJA1105_PTP is not enabled. Also make the PTP code a little bit more self-contained. Signed-off-by: Vladimir Oltean --- Changes since RFC: - None. drivers/net/dsa/sja1105/sja1105.h | 20 +-- drivers/net/dsa/sja1105/sj

[PATCH v1 net-next 01/15] net: dsa: sja1105: Change the PTP command access pattern

2019-09-02 Thread Vladimir Oltean
The PTP command register contains enable bits for: - Putting the 64-bit PTPCLKVAL register in add/subtract or write mode - Taking timestamps off of the corrected vs free-running clock - Starting/stopping the TTEthernet scheduling - Starting/stopping PPS output - Resetting the switch When a command

[PATCH v1 net-next 02/15] net: dsa: sja1105: Get rid of global declaration of struct ptp_clock_info

2019-09-02 Thread Vladimir Oltean
We need priv->ptp_caps to hold a structure and not just a pointer, because we use container_of in the various PTP callbacks. Therefore, the sja1105_ptp_caps structure declared in the global memory of the driver serves no further purpose after copying it into priv->ptp_caps. So just populate priv-

[PATCH v1 net-next 00/15] tc-taprio offload for SJA1105 DSA

2019-09-02 Thread Vladimir Oltean
This is the first attempt to submit the tc-taprio offload model for inclusion in the net tree. Changes in this version: - Made "flags 1" and "flags 2" mutually exclusive in the taprio qdisc - Moved taprio_enable_offload and taprio_disable_offload out of atomic context - spin_lock_bh(qdisc_lock(s

[PATCH v1 net-next 05/15] net: dsa: sja1105: Restore PTP time after switch reset

2019-09-02 Thread Vladimir Oltean
The PTP time of the switch is not preserved when uploading a new static configuration. Work around this hardware oddity by reading its PTP time before a static config upload, and restoring it afterwards. Static config changes are expected to occur at runtime even in scenarios directly related to P

[PATCH v1 net-next 03/15] net: dsa: sja1105: Switch to hardware operations for PTP

2019-09-02 Thread Vladimir Oltean
Adjusting the hardware clock (PTPCLKVAL, PTPCLKADD, PTPCLKRATE) is a requirement for the auxiliary PTP functionality of the switch (TTEthernet, PPS input, PPS output). Now that the sync precision issues have been identified (and fixed in the spi-fsl-dspi driver), we can get rid of the timecounter/

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

2019-09-02 Thread Maciej Żenczykowski
From: Maciej Żenczykowski There is a subtle change in behaviour introduced by: commit c7a1ce397adacaf5d4bb2eab0a738b5f80dc3e43 'ipv6: Change addrconf_f6i_alloc to use ip6_route_info_create' Before that patch /proc/net/ipv6_route includes: 0001 80 0

[PATCH net] sctp: use transport pf_retrans in sctp_do_8_2_transport_strike

2019-09-02 Thread Xin Long
Transport should use its own pf_retrans to do the error_count check, instead of asoc's. Otherwise, it's meaningless to make pf_retrans per transport. Fixes: 5aa93bcf66f4 ("sctp: Implement quick failover draft from tsvwg") Signed-off-by: Xin Long --- net/sctp/sm_sideeffect.c | 2 +- 1 file change

Re: BUG_ON in skb_segment, after bpf_skb_change_proto was applied

2019-09-02 Thread Shmulik Ladkani
On Sun, 1 Sep 2019 16:05:48 -0400 Willem de Bruijn wrote: > One quick fix is to disable sg and thus revert to copying in this > case. Not ideal, but better than a kernel splat: > > @@ -3714,6 +3714,9 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb, > sg = !!(features & NETIF_F_SG

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

2019-09-02 Thread David Ahern
On 9/1/19 11:47 AM, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > There is a subtle change in behaviour introduced by: > commit c7a1ce397adacaf5d4bb2eab0a738b5f80dc3e43 > 'ipv6: Change addrconf_f6i_alloc to use ip6_route_info_create' > > Before that patch /proc/net/ipv6_route in

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

2019-09-02 Thread René van Dorst
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 = "okay";' lines, suggested by Rob Herring v1->v2: * Adding extra note about RGMII2 and gpio use. rfc

[PATCH net-next v3 1/3] net: dsa: mt7530: Convert to PHYLINK API

2019-09-02 Thread René van Dorst
Convert mt7530 to PHYLINK API Signed-off-by: René van Dorst Tested-by: Frank Wunderlich Acked-by: Russell King --- v2->v3: * No change * Add tags acked-by and tested-by v1->v2: * Refactor "unsupported" phy_interface part in mt7530_phylink_mac_validate() suggested by Russell King * Report and

[PATCH net-next v3 0/3] net: dsa: mt7530: Convert to PHYLINK and add support for port 5

2019-09-02 Thread René van Dorst
1. net: dsa: mt7530: Convert to PHYLINK API This patch converts mt7530 to PHYLINK API. 2. dt-bindings: net: dsa: mt7530: Add support for port 5 3. net: dsa: mt7530: Add support for port 5 These 2 patches adding support for port 5 of the switch. v2->v3: * Removed 'status = "okay"' lines in p

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

2019-09-02 Thread René van Dorst
Adding support for port 5. Port 5 can muxed/interface to: - internal 5th GMAC of the switch; can be used as 2nd CPU port or as extra port with an external phy for a 6th ethernet port. - internal PHY of port 0 or 4; Used in most applications so that port 0 or 4 is the WAN port and interfaces wi

[PATCH net-next v2 0/3] dpaa2-eth: Add new statistics counters

2019-09-02 Thread Ioana Radulescu
Recent firmware versions offer access to more DPNI statistics counters. Add the relevant ones to ethtool interface stats. Also we can now make use of a new counter for in flight egress frames to avoid sleeping an arbitrary amount of time in the ndo_stop routine. v2: in patch 2/3, treat separately

[PATCH net-next v2 1/3] dpaa2-eth: Minor refactoring in ethtool stats

2019-09-02 Thread Ioana Radulescu
As we prepare to read more pages from the DPNI stat counters, reorganize the code a bit to make it easier to extend. Signed-off-by: Ioana Radulescu --- v2: no changes drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-)

[PATCH net-next v2 3/3] dpaa2-eth: Poll Tx pending frames counter on if down

2019-09-02 Thread Ioana Radulescu
Starting with firmware version MC10.18.0, a new counter for in flight Tx frames is offered. Use it when bringing down the interface to determine when all pending Tx frames have been processed by hardware instead of sleeping a fixed amount of time. Signed-off-by: Ioana Radulescu --- v2: no changes

[PATCH net-next v2 2/3] dpaa2-eth: Add new DPNI statistics counters

2019-09-02 Thread Ioana Radulescu
Recent firmware versions expose more DPNI counters. Export relevant ones via ethtool -S. Signed-off-by: Ioana Radulescu --- v2: treat separately error case for unsupported statistics pages .../net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 19 -- drivers/net/ethernet/freescale/dpaa2/

Re: [PATCH net 0/5] net: aquantia: fixes on vlan filters and other conditions

2019-09-02 Thread Igor Russkikh
>> >> LGTM, Fixes tag should had been first there on patch 4. > > Series applied with fixes tag ordering fixed in patch 4. Thanks Jakub, David, > You should also perhaps check the return value from > napi_complete_done() as an optimization for net-next? Right, thanks, will put that with next n

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

2019-09-02 Thread Jesper Dangaard Brouer
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 ids for ZC. If N is the number of > configured queues, then for XDP_ZEROCOPY the queu

Re: [RFC PATCH v2 net-next 10/15] net: dsa: Pass ndo_setup_tc slave callback to drivers

2019-09-02 Thread Vladimir Oltean
Hi Kurt, On Mon, 2 Sep 2019 at 10:52, Kurt Kanzenbach wrote: > > Hi, > > On Fri, Aug 30, 2019 at 03:46:30AM +0300, Vladimir Oltean wrote: > > DSA currently handles shared block filters (for the classifier-action > > qdisc) in the core due to what I believe are simply pragmatic reasons - > > hidin

Re: [RFC PATCH v2 net-next 10/15] net: dsa: Pass ndo_setup_tc slave callback to drivers

2019-09-02 Thread Kurt Kanzenbach
Hi, On Fri, Aug 30, 2019 at 03:46:30AM +0300, Vladimir Oltean wrote: > DSA currently handles shared block filters (for the classifier-action > qdisc) in the core due to what I believe are simply pragmatic reasons - > hiding the complexity from drivers and offerring a simple API for port > mirrorin

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

2019-09-02 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 15/18] net/mlx5: Add direct rule fs_cmd implementation

2019-09-02 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 14/18] net/mlx5: DR, Add CONFIG_MLX5_SW_STEERING for software steering support

2019-09-02 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 16/18] net/mlx5: Add API to set the namespace steering mode

2019-09-02 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 07/18] net/mlx5: DR, Expose steering domain functionality

2019-09-02 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 09/18] net/mlx5: DR, Expose steering matcher functionality

2019-09-02 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 08/18] net/mlx5: DR, Expose steering table functionality

2019-09-02 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 06/18] net/mlx5: DR, Add Steering entry (STE) utilities

2019-09-02 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 17/18] net/mlx5: Add support to use SMFS in switchdev mode

2019-09-02 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 11/18] net/mlx5: DR, Expose steering rule functionality

2019-09-02 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 18/18] net/mlx5: Add devlink flow_steering_mode parameter

2019-09-02 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 02/18] net/mlx5: DR, Add the internal direct rule types definitions

2019-09-02 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 10/18] net/mlx5: DR, Expose steering action functionality

2019-09-02 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 05/18] net/mlx5: DR, Expose an internal API to issue RDMA operations

2019-09-02 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:

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

2019-09-02 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 01/18] net/mlx5: Add flow steering actions to fs_cmd shim layer

2019-09-02 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

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

2019-09-02 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

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

2019-09-02 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 03/18] net/mlx5: DR, Add direct rule command utilities

2019-09-02 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