[PATCH net-next 2/3] mlxsw: spectrum: Implement loopback ethtool feature

2019-05-04 Thread Ido Schimmel
From: Jiri Pirko Allow user to enable loopback feature for individual ports using ethtool. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/spectrum.c| 35 +-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/drivers/n

[PATCH net-next 1/3] mlxsw: reg: Add Port Physical Loopback Register

2019-05-04 Thread Ido Schimmel
From: Jiri Pirko The PPLR register allows configuration of the port's loopback mode. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 37 +++ 1 file changed, 37 insertions(+) diff --git a/drivers/net/ethernet/mellanox/m

[PATCH net-next 0/3] mlxsw: spectrum: Implement loopback ethtool feature

2019-05-04 Thread Ido Schimmel
From: Ido Schimmel This patchset from Jiri allows users to enable loopback feature for individual ports using ethtool. The loopback feature is useful for testing purposes and will also be used by upcoming patchsets to enable the monitoring of buffer drops. Patch #1 adds the relevant device regis

[PATCH net-next 3/3] selftests: Add loopback test

2019-05-04 Thread Ido Schimmel
From: Jiri Pirko Add selftest for loopback feature Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/loopback.sh | 94 +++ 1 file changed, 94 insertions(+) create mode 100755 tools/testing/selftests/net/forwarding/loopback.sh diff --

Re: [PATCH net-next v2 2/9] net: dsa: Optional VLAN-based port separation for switches without tagging

2019-05-04 Thread kbuild test robot
Hi Vladimir, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Vladimir-Oltean/net-dsa-Call-driver-s-setup-callback-after-setting-up-its-switchdev-notifier/20190505-104551 config: x86_64-allmodconfig (attache

Re: [PATCH bpf 0/2] libbpf: fixes for AF_XDP teardown

2019-05-04 Thread Alexei Starovoitov
On Tue, Apr 30, 2019 at 8:38 AM Jonathan Lemon wrote: > > > > On 30 Apr 2019, at 5:45, Björn Töpel wrote: > > > William found two bugs, when doing socket teardown within the same > > process. > > > > The first issue was an invalid munmap call, and the second one was an > > invalid XSKMAP cleanup.

Re: [net-next][PATCH v2 1/2] rds: handle unsupported rdma request to fs dax memory

2019-05-04 Thread Leon Romanovsky
On Thu, May 02, 2019 at 10:52:23AM -0700, Santosh Shilimkar wrote: > On 5/1/2019 11:21 PM, Leon Romanovsky wrote: > > On Wed, May 01, 2019 at 10:54:00AM -0700, Santosh Shilimkar wrote: > > > On 5/1/2019 12:44 AM, Leon Romanovsky wrote: > > > > On Mon, Apr 29, 2019 at 04:37:19PM -0700, Santosh Shili

Re: [PATCH bpf-next] selftests/bpf: set RLIMIT_MEMLOCK properly for test_libbpf_open.c

2019-05-04 Thread Alexei Starovoitov
On Mon, Apr 29, 2019 at 5:01 PM Yonghong Song wrote: > > Test test_libbpf.sh failed on my development server with failure > -bash-4.4$ sudo ./test_libbpf.sh > [0] libbpf: Error in bpf_object__probe_name():Operation not permitted(1). > Couldn't load basic 'r0 = 0' BPF program. > test_li

Re: [net-next][PATCH v2 2/2] rds: add sysctl for rds support of On-Demand-Paging

2019-05-04 Thread Leon Romanovsky
On Thu, May 02, 2019 at 10:59:58AM -0700, Santosh Shilimkar wrote: > > > On 5/1/2019 11:18 PM, Leon Romanovsky wrote: > > On Wed, May 01, 2019 at 10:54:50AM -0700, Santosh Shilimkar wrote: > > > On 5/1/2019 12:45 AM, Leon Romanovsky wrote: > > > > On Mon, Apr 29, 2019 at 04:37:20PM -0700, Santosh S

Re: [PATCH net-next] bpf: Use PTR_ERR_OR_ZERO in bpf_fd_sk_storage_update_elem()

2019-05-04 Thread Alexei Starovoitov
On Mon, Apr 29, 2019 at 8:42 AM Martin Lau wrote: > > On Mon, Apr 29, 2019 at 08:40:17AM -0700, Martin KaFai Lau wrote: > > On Mon, Apr 29, 2019 at 01:56:11PM +, YueHaibing wrote: > > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > Acked-by: Martin KaFai Lau > btw, that should

Re: [PATCH bpf-next 4/6] bpf: make BPF_LOG_* flags available in UAPI header

2019-05-04 Thread Alexei Starovoitov
On Mon, Apr 29, 2019 at 10:52:25AM +0100, Quentin Monnet wrote: > The kernel verifier combines several flags to select what kind of logs > to print to the log buffer provided by users. > > In order to make it easier to provide the relevant flags, move the > related #define-s to the UAPI header, so

[PATCH iproute2 v4] ipnetns: use-after-free problem in get_netnsid_from_name func

2019-05-04 Thread Zhiqiang Liu
From: Zhiqiang Liu Follow the following steps: # ip netns add net1 # export MALLOC_MMAP_THRESHOLD_=0 # ip netns list then Segmentation fault (core dumped) will occur. In get_netnsid_from_name func, answer is freed before rta_getattr_u32(tb[NETNSA_NSID]), where tb[] refers to answer`s content. I

Re: [net-next v2 11/11] i40e: Introduce recovery mode support

2019-05-04 Thread Jeff Kirsher
On Sat, 2019-05-04 at 07:35 -0400, Jakub Kicinski wrote: > On Fri, 3 May 2019 16:09:39 -0700, Jeff Kirsher wrote: > > From: Alice Michael > > > > This patch introduces "recovery mode" to the i40e driver. It is > > part of a new Any2Any idea of upgrading the firmware. In this > > approach, it is

[net-next 00/12][pull request] 40GbE Intel Wired LAN Driver Updates 2019-05-04

2019-05-04 Thread Jeff Kirsher
This series contains updates to i40e only. Grzegorz fixes a bug with promiscuous mode not being kept when the VF switched to a new VLAN. Fixed a typo in the link mode code, by using the correct define. Fixed truncation issue, which changed an function argument to a smaller value that should have

[net-next 06/12] i40e: Wrong truncation from u16 to u8

2019-05-04 Thread Jeff Kirsher
From: Grzegorz Siwik In this patch fixed wrong truncation method from u16 to u8 during validation. It was changed by changing u8 to u32 parameter in method declaration and arguments were changed to u32. Signed-off-by: Grzegorz Siwik Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- d

[net-next 04/12] i40e: Fix the typo in adding 40GE KR4 mode

2019-05-04 Thread Jeff Kirsher
From: Grzegorz Siwik This patch fixes the typo in I40E_CAP_PHY_TYPE mode link code. It was fixed by changing 4baseLR4_Full to 4baseKR4_Full Signed-off-by: Grzegorz Siwik Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 ++--

[net-next 05/12] i40e: add num_vectors checker in iwarp handler

2019-05-04 Thread Jeff Kirsher
From: Sergey Nemov Field num_vectors from struct virtchnl_iwarp_qvlist_info should not be larger than num_msix_vectors_vf in the hw struct. The iwarp uses the same set of vectors as the LAN VF driver. Signed-off-by: Sergey Nemov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drive

[net-next 02/12] i40e: add new pci id for X710/XXV710 N3000 cards

2019-05-04 Thread Jeff Kirsher
From: Aleksandr Loktionov New device ids are created to support X710/XXV710 N3000 cards. Signed-off-by: Aleksandr Loktionov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_common.c | 2 ++ drivers/net/ethernet/intel/i40e/i40e_devids.h | 2 ++ dri

[net-next 08/12] i40e: missing input validation on VF message handling by the PF

2019-05-04 Thread Jeff Kirsher
From: Martyna Szapar Patch is adding missing input validation on VF message handling by the PF to the functions with opcodes: VIRTCHNL_OP_CONFIG_VSI_QUEUES = 6 VIRTCHNL_OP_CONFIG_IRQ_MAP = 7, VIRTCHNL_OP_DISABLE_QUEUES = 9, VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE = 14,

[net-next 10/12] i40e: Use struct_size() in kzalloc()

2019-05-04 Thread Jeff Kirsher
From: "Gustavo A. R. Silva" One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; s

[net-next 12/12] i40e: Memory leak in i40e_config_iwarp_qvlist

2019-05-04 Thread Jeff Kirsher
From: Martyna Szapar Added freeing the old allocation of vf->qvlist_info in function i40e_config_iwarp_qvlist before overwriting it with the new allocation. Signed-off-by: Martyna Szapar Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- .../ethernet/intel/i40e/i40e_virtchnl_pf.c|

[net-next 09/12] i40e: Revert ShadowRAM checksum calculation change

2019-05-04 Thread Jeff Kirsher
From: Maciej Paczkowski The reason of this revert is unexpected issue found in NVM Update tool during NVM image downgrade. The implementation is no longer needed since the QV tools are already aware of new FW double ShadowRAM dump mechanism. This patch reverts ShadowRAM checksum calculation chan

[net-next 11/12] i40e: Fix of memory leak and integer truncation in i40e_virtchnl.c

2019-05-04 Thread Jeff Kirsher
From: Martyna Szapar Fixed possible memory leak in i40e_vc_add_cloud_filter function: cfilter is being allocated and in some error conditions the function returns without freeing the memory. Fix of integer truncation from u16 (type of queue_id value) to u8 when calling i40e_vc_isvalid_queue_id f

[net-next 03/12] i40e: Setting VF to VLAN 0 requires restart

2019-05-04 Thread Jeff Kirsher
From: Grzegorz Siwik This patch fixes a bug where changing VLAN to 0 was not set until VF restart. Now we are setting pvid info to 0 when we have to change VLAN to 0. Without this change when VF VLAN was changed to 0 nothing happened until VF restart. For changing to VLAN different than 0 it wor

[net-next 01/12] i40e: VF's promiscuous attribute is not kept

2019-05-04 Thread Jeff Kirsher
From: Grzegorz Siwik This patch fixes a bug where the promiscuous mode was not being kept when the VF switched to a new VLAN. Now we are config two times a promiscuous mode when we switch VLAN. Without this change when we change VF VLAN we still receive all the packets from previous VLAN and only

Re: [PATCH iproute2 v3] ipnetns: use-after-free problem in get_netnsid_from_name func

2019-05-04 Thread Zhiqiang Liu
> On 5/4/19 1:26 AM, Zhiqiang Liu wrote: >> >> diff --git a/ip/ipnetns.c b/ip/ipnetns.c >> index 430d884..d72be95 100644 >> --- a/ip/ipnetns.c >> +++ b/ip/ipnetns.c >> @@ -107,7 +107,7 @@ int get_netnsid_from_name(const char *name) >> struct nlmsghdr *answer; >> struct rtattr *tb[NETNSA_M

[net-next 07/15] net/mlx5: Issue SW reset on FW assert

2019-05-04 Thread Saeed Mahameed
From: Feras Daoud If a FW assert is considered fatal, indicated by a new bit in the health buffer, reset the FW. After the reset go through the normal recovery flow. Only one PF needs to issue the reset, so an attempt is made to prevent the 2nd function from also issuing the reset. It's not an er

[net-next 11/15] net/mlx5: Add support for FW reporter dump

2019-05-04 Thread Saeed Mahameed
From: Moshe Shemesh Add support of dump callback for mlx5 FW reporter. Once we trigger FW dump, the FW will write the core dump to its raw data buffer. The tracer translates the raw data to traces and save it to a buffer. Once dump is done, the saved traces data is filled as objects into the dump

[net-next 09/15] net/mlx5: Create FW devlink health reporter

2019-05-04 Thread Saeed Mahameed
From: Moshe Shemesh Create mlx5_devlink_health_reporter for FW reporter. The FW reporter implements devlink_health_reporter diagnose callback. The fw reporter diagnose command can be triggered any time by the user to check current fw status. In healthy status, it will return clear syndrome. Othe

[net-next 12/15] net/mlx5: Report devlink health on FW issues

2019-05-04 Thread Saeed Mahameed
From: Moshe Shemesh Use devlink_health_report() to report any symptom of FW issue as FW counter miss or new health syndrom. The FW issues detected in mlx5 during poll_health which is called in timer atomic context and so health work queue is used to schedule the reports. Signed-off-by: Moshe She

[net-next 13/15] net/mlx5: Add fw fatal devlink health reporter

2019-05-04 Thread Saeed Mahameed
From: Moshe Shemesh Create mlx5_devlink_health_reporter for fw fatal reporter. The fw fatal reporter is added in addition to the fw reporter and implements the recover callback. The point of having two reporters for FW issues, is that we don't want to run FW recover on any issue, but only fatal o

[net-next 15/15] net/mlx5: Report devlink health on FW fatal issues

2019-05-04 Thread Saeed Mahameed
From: Moshe Shemesh Report devlink health on FW fatal issues via fw_fatal_reporter. The driver recover flow for FW fatal error is now being handled by the devlink health. Having the recovery controlled by devlink health, the user has the ability to cancel the auto-recovery for debug session and

[net-next 14/15] net/mlx5: Add support for FW fatal reporter dump

2019-05-04 Thread Saeed Mahameed
From: Moshe Shemesh Add support of dump callback for mlx5 FW fatal reporter. The FW fatal dump use cr-dump functionality to gather cr-space data for debug. The cr-dump uses vsc interface which is valid even if the FW command interface is not functional, which is the case in most FW fatal errors.

[net-next 10/15] net/mlx5: Add core dump register access functions

2019-05-04 Thread Saeed Mahameed
From: Moshe Shemesh Add access functions to core dump register to enable trigger FW core dump. Signed-off-by: Moshe Shemesh Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/diag/fw_tracer.c | 34 +++ include/linux/mlx5/driver.h

[net-next 06/15] net/mlx5: Control CR-space access by different PFs

2019-05-04 Thread Saeed Mahameed
From: Feras Daoud Since the FW can be shared between different PFs/VFs it is common that more than one health poll will detected a failure, this can lead to multiple resets which are unneeded. The solution is to use a FW locking mechanism using semaphore space to provide a way to allow only one

[net-next 08/15] net/mlx5: Refactor print health info

2019-05-04 Thread Saeed Mahameed
From: Moshe Shemesh Refactor print health info code, split to two functions: 1. mlx5_get_health_info() - writes the health info into a buffer. 2. mlx5_print_health_info() - prints the health info to kernel log. This refactoring is done to enable using the health info data by devlink health repo

[net-next 02/15] net/mlx5: Add Vendor Specific Capability access gateway

2019-05-04 Thread Saeed Mahameed
From: Alex Vesker The Vendor Specific Capability (VSC) is used to activate a gateway interfacing with the device. The gateway is used to read or write device configurations, which are organized in different domains (spaces). A configuration access may result in multiple actions, reads, writes. E

[pull request][net-next 00/15] Mellanox, mlx5 Firmware devlink health and sw reset

2019-05-04 Thread Saeed Mahameed
Hi Dave, This series provides the support for mlx5 Firmware devlink health and sw reset. We plan to follow up this series with a patch that provides mlx5 documentation under Documentation/networking/mlx5.rst, first thing in 5.3 kernel release, it will include all new mlx5 devlink options and more

[net-next 03/15] net/mlx5: Add Crdump FW snapshot support

2019-05-04 Thread Saeed Mahameed
From: Alex Vesker Crdump allows the driver to create a snapshot of the FW PCI crspace. This is useful in case of catastrophic issues which may require FW reset. The snapshot can be used for later debug. The snapshot is exposed using devlink region_snapshot in downstream patch, cr-space address r

[net-next 04/15] net/mlx5: Add support for devlink region_snapshot parameter

2019-05-04 Thread Saeed Mahameed
From: Alex Vesker This parameter enables capturing region snapshot of the crspace during critical errors. The default value of this parameter is disabled, it can be enabled using devlink param commands. It is possible to configure during runtime and also driver init. Command line examples: Dele

[net-next 05/15] net/mlx5: Handle SW reset of FW in error flow

2019-05-04 Thread Saeed Mahameed
From: Feras Daoud New mlx5 adapters allow the driver to reset the FW in the event of an error, this action called "SW Reset". When an SW reset is issued on any PF all PFs enter reset state which is a recoverable condition. The existing recovery flow was designed to allow the recovery of a VF afte

[net-next 01/15] net/mlx5: Move all devlink related functions calls to devlink.c

2019-05-04 Thread Saeed Mahameed
From: Eran Ben Elisha Centralize all devlink related callbacks in one file. In the downstream patch, some more functionality will be added, this patch is preparing the driver infrastructure for it. Currently, move devlink un/register functions calls into this file. Signed-off-by: Eran Ben Elish

[net-next 03/15] ice: Preserve VLAN Rx stripping settings

2019-05-04 Thread Jeff Kirsher
From: Tony Nguyen When Tx insertion is set, we are not accounting for the state of Rx stripping. This causes Rx stripping to be enabled any time Tx insertion is changed, even when it's supposed to be disabled. Signed-off-by: Tony Nguyen Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew

[net-next 11/15] ice: Separate if conditions for ice_set_features()

2019-05-04 Thread Jeff Kirsher
From: Tony Nguyen Set features can have multiple features turned on|off in a single call. Grouping these all in an if/else means after one condition is met, other conditions/features will not be evaluated. Break the if/else statements by feature to ensure all features will be handled properly.

[net-next 02/15] ice: Fix for allowing too many MDD events on VF

2019-05-04 Thread Jeff Kirsher
From: Michal Swiatkowski Disable VF if any malicious device driver (MDD) event is detected by hardware. Track vf->num_mdd_events for information about VF MDD events. Signed-off-by: Michal Swiatkowski Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher -

[net-next 04/15] ice: Don't remove VLAN filters that were never programmed

2019-05-04 Thread Jeff Kirsher
From: Akeem G Abodunrin In case of non-trusted VFs, it is possible to program VLAN filter far less than what is requested by the VF originally, thereby makes number of VLAN elements being tracked by VF different from actual VLAN tags. This patch makes sure that we are not attempting to remove VLA

[net-next 06/15] ice: Do not unnecessarily initialize local variable

2019-05-04 Thread Jeff Kirsher
From: Bruce Allan The local variable speed does not need to be initialized and can cause some static analysis tools to complain the initial assigned value is never used. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher ---

[net-next 10/15] ice: Remove __always_unused attribute

2019-05-04 Thread Jeff Kirsher
From: Tony Nguyen The variable netdev is being used in this function; remove the __always_unused attribute from it. Signed-off-by: Tony Nguyen Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_ethtool.c | 2 +-

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

2019-05-04 Thread Jeff Kirsher
This series contains updates to the ice driver only. Jesse updated the driver to make more functions consistent in their use of a local variable for vsi->back. Updates the driver to use bit fields when possible to avoid wasting lots of storage space to store single bit values. Optimized the driv

[net-next 07/15] ice: Always free/allocate q_vectors

2019-05-04 Thread Jeff Kirsher
From: Brett Creeley Currently when probing/removing the driver we allocate/deallocate each vsi->q_vectors array in ice_vsi_alloc_arrays() and ice_vsi_free_arrays() respectively. However, we don't do this during the reset and VSI rebuild flow. This is inconsistent and unnecessary to have a differe

[net-next 05/15] ice: Add more validation in ice_vc_cfg_irq_map_msg

2019-05-04 Thread Jeff Kirsher
From: Michal Swiatkowski Add few checks to validate msg from iavf driver. Test if we have got enough q_vectors allocated in VSI connected with VF. Add masks for itr_indx and msix_indx to avoid writing to reserved fieldi of QINT. Clear q_vector->num_ring_rx/tx, without it we can increment this va

[net-next 09/15] ice: Suppress false-positive style issues reported by static analyzer

2019-05-04 Thread Jeff Kirsher
From: Bruce Allan A recent version of cppcheck falsely reports- Variable ip.hdr is assigned a value that is never used. ip is a union so the pointer ip.hdr is actually used when referenced as ip.v4 and ip.v6. Silence these false reports when using cppcheck with the --inline-suppr command-li

[net-next 12/15] ice: Add function to program ethertype based filter rule on VSIs

2019-05-04 Thread Jeff Kirsher
From: Akeem G Abodunrin This patch adds function to program VSI with ethertype based filter rule, so that all flow control frames would be disallowed from being transmitted to the client, in order to prevent malicious VSI, especially VF from sending out PAUSE or PFC frames, and then control other

[net-next 08/15] ice: Refactor getting/setting coalesce

2019-05-04 Thread Jeff Kirsher
From: Brett Creeley Currently if the driver has an uneven amount of Rx/Tx queues setting the coalesce settings through ethtool will result in an error. This is happening because in the setting coalesce flow we are reporting an error if either Rx or Tx fails. Also, the flow for setting/getting pe

[net-next 14/15] ice: Use more efficient structures

2019-05-04 Thread Jeff Kirsher
From: Jesse Brandeburg Move a bunch of members around to make more efficient use of memory, eliminating holes where possible. None of these members are hot path so cache line alignment is not very important here. Signed-off-by: Jesse Brandeburg Signed-off-by: Anirudh Venkataramanan Tested-by:

[net-next 15/15] ice: Disable sniffing VF traffic on PF

2019-05-04 Thread Jeff Kirsher
From: Michal Swiatkowski Delete code that add default Tx rule on PF. With this rule PF can see Tx VF traffic that should go outside. For traffic from VF to another VF default Tx rule on PF doesn't apply because of lower priority than VF mac rule. With this change on PF in promisc mode we can see

[net-next 13/15] ice: Use bitfields where possible

2019-05-04 Thread Jeff Kirsher
From: Jesse Brandeburg The driver was converted to not use bool, but it was neglected that the bools should have been converted to bit fields as bit fields in software structures are ok, as long as they use the correct kinds of unsigned types. This avoids wasting lots of storage space to store si

[PATCH net-next 2/2] net_sched: sch_fq: handle non connected flows

2019-05-04 Thread Eric Dumazet
FQ packet scheduler assumed that packets could be classified based on their owning socket. This means that if a UDP server uses one UDP socket to send packets to different destinations, packets all land in one FQ flow. This is unfair, since each TCP flow has a unique bucket, meaning that in case

[PATCH net-next 1/2] net_sched: sch_fq: do not assume EDT packets are ordered

2019-05-04 Thread Eric Dumazet
TCP stack makes sure packets for a given flow are monotically increasing, but we want to allow UDP packets to use EDT as well, so that QUIC servers can use in-kernel pacing. This patch adds a per-flow rb-tree on which packets might be stored. We still try to use the linear list for the typical cas

[PATCH net-next 0/2] net_sched: sch_fq: enable in-kernel pacing for QUIC servers

2019-05-04 Thread Eric Dumazet
Willem added GSO support to UDP stack, greatly improving performance of QUIC servers. We also want to enable in-kernel pacing, which is possible thanks to EDT model, since each sendmsg() can provide a timestamp for the skbs. We have to change sch_fq to enable feeding packets in arbitrary EDT orde

Re: [PATCH net-next v2 3/9] net: dsa: Allow drivers to filter packets they can decode source port from

2019-05-04 Thread Vladimir Oltean
On Sun, 5 May 2019 at 01:49, Vivien Didelot wrote: > > Hi Vladimir, > > On Sat, 4 May 2019 16:59:13 +0300, Vladimir Oltean wrote: > > Frames get processed by DSA and redirected to switch port net devices > > based on the ETH_P_XDSA multiplexed packet_type handler found by the > > network stack w

Re: [PATCH net-next v2 3/9] net: dsa: Allow drivers to filter packets they can decode source port from

2019-05-04 Thread Vivien Didelot
Hi Vladimir, On Sat, 4 May 2019 16:59:13 +0300, Vladimir Oltean wrote: > Frames get processed by DSA and redirected to switch port net devices > based on the ETH_P_XDSA multiplexed packet_type handler found by the > network stack when calling eth_type_trans(). > > The running assumption is that

Re: [PATCH net-next v2 6/9] net: dsa: Add a private structure pointer to dsa_port

2019-05-04 Thread Vivien Didelot
On Sat, 4 May 2019 16:59:16 +0300, Vladimir Oltean wrote: > This is supposed to share information between the driver and the tagger, > or used by the tagger to keep some state. Its use is optional. > > Signed-off-by: Vladimir Oltean > Reviewed-by: Florian Fainelli Reviewed-by: Vivien Didelot

Re: [PATCH net-next v2 2/9] net: dsa: Optional VLAN-based port separation for switches without tagging

2019-05-04 Thread Vivien Didelot
Hi Vladimir, On Sat, 4 May 2019 16:59:12 +0300, Vladimir Oltean wrote: > This patch provides generic DSA code for using VLAN (802.1Q) tags for > the same purpose as a dedicated switch tag for injection/extraction. > It is based on the discussions and interest that has been so far > expressed in

Re: [PATCH net-next v2 1/9] net: dsa: Call driver's setup callback after setting up its switchdev notifier

2019-05-04 Thread Vivien Didelot
On Sat, 4 May 2019 16:59:11 +0300, Vladimir Oltean wrote: > This allows the driver to perform some manipulations of its own during > setup, using generic switchdev calls. Having the notifiers registered at > setup time is important because otherwise any switchdev transaction > emitted during this

Hello

2019-05-04 Thread Chris Ben
-- Hello dear. I am Mr Chris Ben, while going through your profile I pick interest on you. I will introduce myself better. Write me at my private email (chrisben...@gmail.com) Mr. Chris Ben +22898632395

Re: [Patch net-next] sch_htb: redefine htb qdisc overlimits

2019-05-04 Thread Eric Dumazet
On 5/4/19 2:27 PM, Cong Wang wrote: > On Sat, May 4, 2019 at 11:10 AM Eric Dumazet wrote: >> >> On Sat, May 4, 2019 at 1:49 PM Cong Wang wrote: >> >>> Sure, v2 is coming. :) >> >> Another possibility would to reuse existing sch->qstats.overlimits ? > > I don't find any way to retrieve qdisc p

[Patch net-next v2] sch_htb: redefine htb qdisc overlimits

2019-05-04 Thread Cong Wang
In commit 3c75f6ee139d ("net_sched: sch_htb: add per class overlimits counter") we added an overlimits counter for each HTB class which could properly reflect how many times we use up all the bandwidth on each class. However, the overlimits counter in HTB qdisc does not, it is way bigger than the s

Re: [Patch net-next] sch_htb: redefine htb qdisc overlimits

2019-05-04 Thread Cong Wang
On Sat, May 4, 2019 at 11:10 AM Eric Dumazet wrote: > > On Sat, May 4, 2019 at 1:49 PM Cong Wang wrote: > > > Sure, v2 is coming. :) > > Another possibility would to reuse existing sch->qstats.overlimits ? I don't find any way to retrieve qdisc pointer from struct htb_sched, unless we add a poin

Re: [Patch net-next] sch_htb: redefine htb qdisc overlimits

2019-05-04 Thread Eric Dumazet
On Sat, May 4, 2019 at 1:49 PM Cong Wang wrote: > Sure, v2 is coming. :) Another possibility would to reuse existing sch->qstats.overlimits ?

Re: [RFC] ifa_list needs proper rcu protection

2019-05-04 Thread Eric Dumazet
On 5/4/19 2:01 PM, Florian Westphal wrote: > Eric Dumazet wrote: > > Sorry for late reply. > >> It looks that unless RTNL is held, accessing ifa_list needs proper RCU >> protection ? >> >> indev->ifa_list can be changed under us by another cpu (which owns RTNL) >> >> Lets took an example. >>

Re: [RFC] ifa_list needs proper rcu protection

2019-05-04 Thread Florian Westphal
Eric Dumazet wrote: Sorry for late reply. > It looks that unless RTNL is held, accessing ifa_list needs proper RCU > protection ? > > indev->ifa_list can be changed under us by another cpu (which owns RTNL) > > Lets took an example. > > (A proper rcu_dereference() with an happy sparse suppor

Re: [Patch net-next] sch_htb: redefine htb qdisc overlimits

2019-05-04 Thread Cong Wang
On Sat, May 4, 2019 at 8:41 AM Eric Dumazet wrote: > > > > On 5/2/19 2:06 PM, Cong Wang wrote: > > In commit 3c75f6ee139d ("net_sched: sch_htb: add per class overlimits > > counter") > > we added an overlimits counter for each HTB class which could > > properly reflect how many times we use up al

Re: [PATCH bpf-next v2 04/16] xsk: Extend channels to support combined XSK/non-XSK traffic

2019-05-04 Thread Björn Töpel
On Tue, 30 Apr 2019 at 20:12, Maxim Mikityanskiy wrote: > > Currently, the drivers that implement AF_XDP zero-copy support (e.g., > i40e) switch the channel into a different mode when an XSK is opened. It > causes some issues that have to be taken into account. For example, RSS > needs to be recon

Re: [PATCH bpf-next v2 02/16] xsk: Add getsockopt XDP_OPTIONS

2019-05-04 Thread Björn Töpel
On Tue, 30 Apr 2019 at 20:12, Maxim Mikityanskiy wrote: > > Make it possible for the application to determine whether the AF_XDP > socket is running in zero-copy mode. To achieve this, add a new > getsockopt option XDP_OPTIONS that returns flags. The only flag > supported for now is the zero-copy

Re: [PATCH bpf-next v2 00/16] AF_XDP infrastructure improvements and mlx5e support

2019-05-04 Thread Björn Töpel
On Tue, 30 Apr 2019 at 20:12, Maxim Mikityanskiy wrote: > > This series contains improvements to the AF_XDP kernel infrastructure > and AF_XDP support in mlx5e. The infrastructure improvements are > required for mlx5e, but also some of them benefit to all drivers, and > some can be useful for othe

Re: CVE-2019-11683

2019-05-04 Thread Reindl Harald
Am 04.05.19 um 18:43 schrieb Eric Dumazet: > In any case, this discussion has nothing to do with netdev@ > > Are you suggesting that we should not fix bugs at given period of times, > just because a 'release of some stable kernel' happened one day before? sorry to get cynical but that's likely

Re: CVE-2019-11683

2019-05-04 Thread Eric Dumazet
On 5/4/19 12:39 PM, Reindl Harald wrote: > > > Am 04.05.19 um 18:32 schrieb Eric Dumazet: >> On 5/4/19 12:13 PM, Reindl Harald wrote: >>> >>> ok, so the answer is no >>> >>> what's the point then release every 2 days a new "stable" kernel? >>> even distributions like Fedora are not able to cop

Re: CVE-2019-11683

2019-05-04 Thread Stephen Hemminger
On Sat, 4 May 2019 18:39:15 +0200 Reindl Harald wrote: > Am 04.05.19 um 18:32 schrieb Eric Dumazet: > > On 5/4/19 12:13 PM, Reindl Harald wrote: > >> > >> ok, so the answer is no > >> > >> what's the point then release every 2 days a new "stable" kernel? > >> even distributions like Fedora are

Re: CVE-2019-11683

2019-05-04 Thread Reindl Harald
Am 04.05.19 um 18:32 schrieb Eric Dumazet: > On 5/4/19 12:13 PM, Reindl Harald wrote: >> >> ok, so the answer is no >> >> what's the point then release every 2 days a new "stable" kernel? >> even distributions like Fedora are not able to cope with that > > That is a question for distros, not fo

Re: CVE-2019-11683

2019-05-04 Thread Eric Dumazet
On 5/4/19 12:13 PM, Reindl Harald wrote: > > > > ok, so the answer is no > > what's the point then release every 2 days a new "stable" kernel? > even distributions like Fedora are not able to cope with that That is a question for distros, not for netdev@ ?

Re: [PATCH iproute2 net-next v1 2/3] taprio: Add support for changing schedules

2019-05-04 Thread David Ahern
On 4/29/19 4:52 PM, Vinicius Costa Gomes wrote: > This allows for a new schedule to be specified during runtime, without > removing the current one. > > For that, the semantics of the 'tc qdisc change' operation in the > context of taprio is that if "change" is called and there is a running > sche

Re: [PATCH 1/3] nsfs: add evict callback into struct proc_ns_operations

2019-05-04 Thread Wenbin Zeng
On Thu, May 02, 2019 at 04:04:06AM +0100, Al Viro wrote: > On Wed, May 01, 2019 at 02:42:23PM +0800, Wenbin Zeng wrote: > > The newly added evict callback shall be called by nsfs_evict(). Currently > > only put() callback is called in nsfs_evict(), it is not able to release > > all netns refcount,

[PATCH bpf-next 2/2] xsk: honor BPF_EXIST and BPF_NOEXIST flags in XSKMAP

2019-05-04 Thread Björn Töpel
From: Björn Töpel The XSKMAP did not honor the BPF_EXIST/BPF_NOEXIST flags when updating an entry. This patch addresses that. Signed-off-by: Björn Töpel --- kernel/bpf/xskmap.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/kernel/bpf/xskmap.c b/kernel/b

Re: [PATCH iproute2-next v2] tc: add support for plug qdisc

2019-05-04 Thread David Ahern
On 4/30/19 10:53 AM, Paolo Abeni wrote: > sch_plug can be used to perform functional qdisc unit tests > controlling explicitly the queuing behaviour from user-space. Hi Paolo: Do you have or are you planning to write unit tests? > > Plug support lacks since its introduction in 2012. This change

[PATCH bpf-next 0/2] Two XSKMAP improvements

2019-05-04 Thread Björn Töpel
This series add two improvements for the XSKMAP, used by AF_XDP sockets. 1. Automatic cleanup when an AF_XDP socket goes out of scope. Instead of manually cleaning out the "released" state socket from the map, this is done automatically. 2. The XSKMAP did not honor the BPF_EXIST/BPF_NOEXIST

Re: CVE-2019-11683

2019-05-04 Thread Reindl Harald
Am 04.05.19 um 18:06 schrieb Eric Dumazet: >> -- >> >> https://www.openwall.com/lists/oss-security/2019/05/02/1 >> >> syzbot has reported a remotely triggerable memory corruption in the >> Linux kernel. It's been introduced quite recently in e20cf8d3f1f7 >> ("udp: implement G

Re: CVE-2019-11683

2019-05-04 Thread Eric Dumazet
On 5/4/19 11:49 AM, Reindl Harald wrote: > is this fixed in 5.0.12 and just not visible in the changelog? > > because if not there's no poiunt to reboot a over a long time randomly > crahsing firewall setup which *appears* stable now after replace "LOG" > with "NFLOG" and remove --reap from the

[PATCH bpf-next 1/2] xsk: remove AF_XDP socket from map when the socket is released

2019-05-04 Thread Björn Töpel
From: Björn Töpel When an AF_XDP socket is released/closed the XSKMAP still holds a reference to the socket in a "released" state. The socket will still use the netdev queue resource, and block newly created sockets from attaching to that queue, but no user application can access the fill/complet

CVE-2019-11683

2019-05-04 Thread Reindl Harald
is this fixed in 5.0.12 and just not visible in the changelog? because if not there's no poiunt to reboot a over a long time randomly crahsing firewall setup which *appears* stable now after replace "LOG" with "NFLOG" and remove --reap from the xt_recent rules -- https://www.

Re: [Patch net-next] sch_htb: redefine htb qdisc overlimits

2019-05-04 Thread Eric Dumazet
On 5/2/19 2:06 PM, Cong Wang wrote: > In commit 3c75f6ee139d ("net_sched: sch_htb: add per class overlimits > counter") > we added an overlimits counter for each HTB class which could > properly reflect how many times we use up all the bandwidth > on each class. However, the overlimits counter

[PATCH net-next] r8169: move EEE LED config to rtl8168_config_eee_mac

2019-05-04 Thread Heiner Kallweit
Move adjusting the EEE LED frequency to rtl8168_config_eee_mac. Exclude RTL8411 (version 38) like in the existing code. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/net/eth

Re: [PATCH iproute2 v3] ipnetns: use-after-free problem in get_netnsid_from_name func

2019-05-04 Thread David Ahern
On 5/4/19 1:26 AM, Zhiqiang Liu wrote: > > diff --git a/ip/ipnetns.c b/ip/ipnetns.c > index 430d884..d72be95 100644 > --- a/ip/ipnetns.c > +++ b/ip/ipnetns.c > @@ -107,7 +107,7 @@ int get_netnsid_from_name(const char *name) > struct nlmsghdr *answer; > struct rtattr *tb[NETNSA_MAX + 1];

[PATCH net-next] r8169: simplify rtl_writephy_batch and rtl_ephy_init

2019-05-04 Thread Heiner Kallweit
Make both functions macros to allow omitting the ARRAY_SIZE(x) argument. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 100 ++- 1 file changed, 52 insertions(+), 48 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/

[PATCH net-next v2 7/9] net: dsa: sja1105: Add support for traffic through standalone ports

2019-05-04 Thread Vladimir Oltean
In order to support this, we are creating a make-shift switch tag out of a VLAN trunk configured on the CPU port. Termination of normal traffic on switch ports only works when not under a vlan_filtering bridge. Termination of management (PTP, BPDU) traffic works under all circumstances because it u

[PATCH net-next v2 9/9] Documentation: net: dsa: sja1105: Add info about supported traffic modes

2019-05-04 Thread Vladimir Oltean
Signed-off-by: Vladimir Oltean --- Changes in v2: - Added clarification about bridging other netdevices with swich ports. - Removed "Other notable features" section. Documentation/networking/dsa/sja1105.rst | 54 1 file changed, 54 insertions(+) diff --git a/Doc

[PATCH net-next v2 3/9] net: dsa: Allow drivers to filter packets they can decode source port from

2019-05-04 Thread Vladimir Oltean
Frames get processed by DSA and redirected to switch port net devices based on the ETH_P_XDSA multiplexed packet_type handler found by the network stack when calling eth_type_trans(). The running assumption is that once the DSA .rcv function is called, DSA is always able to decode the switch tag i

[PATCH net-next v2 8/9] net: dsa: sja1105: Add support for Spanning Tree Protocol

2019-05-04 Thread Vladimir Oltean
While not explicitly documented as supported in UM10944, compliance with the STP states can be obtained by manipulating 3 settings at the (per-port) MAC config level: dynamic learning, inhibiting reception of regular traffic, and inhibiting transmission of regular traffic. In all these modes, tran

[PATCH net-next v2 5/9] net: dsa: Add support for deferred xmit

2019-05-04 Thread Vladimir Oltean
Some hardware needs to take work to get convinced to receive frames on the CPU port (such as the sja1105 which takes temporary L2 forwarding rules over SPI that last for a single frame). Such work needs a sleepable context, and because the regular .ndo_start_xmit is atomic, this cannot be done in t

[PATCH net-next v2 2/9] net: dsa: Optional VLAN-based port separation for switches without tagging

2019-05-04 Thread Vladimir Oltean
This patch provides generic DSA code for using VLAN (802.1Q) tags for the same purpose as a dedicated switch tag for injection/extraction. It is based on the discussions and interest that has been so far expressed in https://www.spinics.net/lists/netdev/msg556125.html. Unlike all other DSA-support

  1   2   >