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

2019-08-29 Thread Alexei Starovoitov
On Fri, Aug 30, 2019 at 06:39:48AM +, Yonghong Song wrote: > > > > The problem happens when you are trying to do batch lookup on a > > hashmap and when executing bpf_map_get_next_key(map, key, next_key) > > the key is removed, then that call will return the first key and you'd > > start iterat

Re: auto-split of commit. Was: [PATCH bpf-next 04/10] tools/bpf: add libbpf_prog_type_(from|to)_str helpers

2019-08-29 Thread Greg Kroah-Hartman
On Thu, Aug 29, 2019 at 10:16:56AM -0700, Alexei Starovoitov wrote: > On Thu, Aug 29, 2019 at 08:51:51AM +0200, Greg Kroah-Hartman wrote: > > On Wed, Aug 28, 2019 at 04:46:28PM -0700, Alexei Starovoitov wrote: > > > On Wed, Aug 28, 2019 at 04:34:22PM -0700, Jakub Kicinski wrote: > > > > > > > > Gr

Re: [PATCH bpf-next 01/13] bpf: add bpf_map_value_size and bp_map_copy_value helper functions

2019-08-29 Thread Yonghong Song
On 8/29/19 3:04 PM, Song Liu wrote: > > >> On Aug 28, 2019, at 11:45 PM, Yonghong Song wrote: >> >> From: Brian Vazquez >> >> Move reusable code from map_lookup_elem to helper functions to avoid code >> duplication in kernel/bpf/syscall.c >> >> Suggested-by: Stanislav Fomichev >> Signed-off-

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

2019-08-29 Thread Yonghong Song
On 8/29/19 4:01 PM, Brian Vazquez wrote: > Hi Yonghong! > > Thanks for sending this series of patches and starting the discussion. > > On Wed, Aug 28, 2019 at 11:45 PM Yonghong Song wrote: >> >> Brian Vazquez has proposed BPF_MAP_DUMP command to look up more than one >> map entries per syscall

[PATCH net] dev: Delay the free of the percpu refcount

2019-08-29 Thread Subash Abhinov Kasiviswanathan
While running stress-ng on an ARM64 kernel, the following oops was observedi - 44837.761523: <6> Unable to handle kernel paging request at virtual address 004a88287000 44837.761651: <2> pc : in_dev_finish_destroy+0x4c/0xc8 44837.761654: <2> lr : in_dev_finish_destroy

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

2019-08-29 Thread wenxu
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 together. When live migration the VF detached and send/recv packet through vir

Re: [PATCH v2 bpf-next 1/3] capability: introduce CAP_BPF and CAP_TRACING

2019-08-29 Thread Alexei Starovoitov
On Thu, Aug 29, 2019 at 8:47 AM Daniel Borkmann wrote: > > On 8/29/19 7:12 AM, Alexei Starovoitov wrote: > [...] > > > > +/* > > + * CAP_BPF allows the following BPF operations: > > + * - Loading all types of BPF programs > > + * - Creating all types of BPF maps except: > > + *- stackmap that

[PATCH net-next v2 19/22] bnxt_en: Do not send firmware messages if firmware is in error state.

2019-08-29 Thread Michael Chan
Add a flag to mark that the firmware has encountered fatal condition. The driver will not send any more firmware messages and will return error to the caller. Fix up some clean up functions to continue and not abort when the firmware message function returns error. This is preparation work to ful

[PATCH net-next v2 17/22] bnxt_en: Add devlink health reset reporter.

2019-08-29 Thread Michael Chan
From: Vasundhara Volam Add devlink health reporter for the firmware reset event. Once we get the notification from firmware about the impending reset, the driver will report this to devlink and the call to bnxt_fw_reset() will be initiated to complete the reset sequence. Cc: Jiri Pirko Signed-

[PATCH net-next v2 10/22] bnxt_en: Discover firmware error recovery capabilities.

2019-08-29 Thread Michael Chan
Call the new firmware API HWRM_ERROR_RECOVERY_QCFG if it is supported to discover the firmware health and recovery capabilities and settings. This feature allows the driver to reset the chip if firmware crashes and becomes unresponsive. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadc

[PATCH net-next v2 18/22] bnxt_en: Retain user settings on a VF after RESET_NOTIFY event.

2019-08-29 Thread Michael Chan
From: Vasundhara Volam Retain the VF MAC address, default VLAN, TX rate control, trust settings of VFs after firmware reset. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c

[PATCH net-next v2 15/22] bnxt_en: Handle RESET_NOTIFY async event from firmware.

2019-08-29 Thread Michael Chan
This event from firmware signals a coordinated reset initiated by the firmware. It may be triggered by some error conditions encountered in the firmware or other orderly reset conditions. We store the parameters from this event. Subsequent patches will add logic to handle reset itself using devl

[PATCH net-next v2 20/22] bnxt_en: Add RESET_FW state logic to bnxt_fw_reset_task().

2019-08-29 Thread Michael Chan
This state handles driver initiated chip reset during error recovery. Only the master function will perform this step during error recovery. The next patch will add code to initiate this reset from the master function. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6

[PATCH net-next v2 12/22] bnxt_en: Enable health monitoring.

2019-08-29 Thread Michael Chan
Handle the async event from the firmware that enables firmware health monitoring. Store initial health metrics. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 66 ++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 9 + 2 files changed,

[PATCH net-next v2 01/22] bnxt_en: Use a common function to print the same ethtool -f error message.

2019-08-29 Thread Michael Chan
The same message is printed 3 times in the code, so use a common function to do that. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethto

[PATCH net-next v2 00/22] bnxt_en: health and error recovery.

2019-08-29 Thread Michael Chan
This patchset implements adapter health and error recovery. The status is reported through several devlink reporters and the driver will initiate and complete the recovery process using the devlink infrastructure. v2: Added 4 patches at the beginning of the patchset to clean up error code han

[PATCH net-next v2 05/22] bnxt_en: Suppress all error messages in hwrm_do_send_msg() in silent mode.

2019-08-29 Thread Michael Chan
If the silent parameter is set, suppress all messages when there is no response from firmware. When polling for firmware to come out of reset, no response may be normal and we want to suppress the error messages. Also, don't poll for the firmware DMA response if Bus Master is disabled. This is i

[PATCH net-next v2 02/22] bnxt_en: Remove the -1 error return code from bnxt_hwrm_do_send_msg().

2019-08-29 Thread Michael Chan
Replace the non-standard -1 code with -EBUSY when there is no firmware response after waiting for the maximum timeout. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/broadcom

[PATCH net-next v2 22/22] bnxt_en: Add FW fatal devlink_health_reporter.

2019-08-29 Thread Michael Chan
From: Vasundhara Volam Health show command example and output: $ devlink health show pci/:af:00.0 reporter fw_fatal pci/:af:00.0: name fw_fatal state healthy error 1 recover 1 grace_period 0 auto_recover true Fatal events from firmware or missing periodic heartbeats will be repor

[PATCH net-next v2 04/22] bnxt_en: Simplify error checking in the SR-IOV message forwarding functions.

2019-08-29 Thread Michael Chan
There are 4 functions handling message forwarding for SR-IOV. They check for non-zero firmware response code and then return -1. There is no need to do this anymore. The main messaging function will now return standard error code. Since we don't need to examine the response, we can use the hwrm

[PATCH net-next v2 03/22] bnxt_en: Convert error code in firmware message response to standard code.

2019-08-29 Thread Michael Chan
The main firmware messaging function returns the firmware defined error code and many callers have to convert to standard error code for proper propagation to userspace. Convert bnxt_hwrm_do_send_msg() to return standard error code so we can do away with all the special error code handling by the

[PATCH net-next v2 11/22] bnxt_en: Pre-map the firmware health monitoring registers.

2019-08-29 Thread Michael Chan
Pre-map the GRC registers for periodic firmware health monitoring. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 29 + drivers/net/ethernet/broadcom/bnxt/bnxt.h | 6 ++ 2 files changed, 35 insertions(

[PATCH net-next v2 06/22] bnxt_en: Prepare bnxt_init_one() to be called multiple times.

2019-08-29 Thread Michael Chan
In preparation for the new firmware reset feature, some of the logic in bnxt_init_one() and related functions will be called again after firmware has reset. Reset some of the flags and capabilities so that everything that can change can be re-initialized. Refactor some functions to probe firmware

[PATCH net-next v2 07/22] bnxt_en: Refactor bnxt_sriov_enable().

2019-08-29 Thread Michael Chan
Refactor the hardware/firmware configuration portion in bnxt_sriov_enable() into a new function bnxt_cfg_hw_sriov(). This new function can be called after a firmware reset to reconfigure the VFs previously enabled. v2: straight refactor of the code. Reordering done in the next patch. Signed-off

[PATCH net-next v2 21/22] bnxt_en: Add bnxt_fw_exception() to handle fatal firmware errors.

2019-08-29 Thread Michael Chan
This call will handle fatal firmware errors by forcing a reset on the firmware. The master function driver will carry out the forced reset. The sequence will go through the same bnxt_fw_reset_task() workqueue. This fatal reset differs from the non-fatal reset at the beginning stages. From the BNX

[PATCH net-next v2 13/22] bnxt_en: Add BNXT_STATE_IN_FW_RESET state.

2019-08-29 Thread Michael Chan
The new flag will be set in subsequent patches when firmware is going through reset. If bnxt_close() is called while the new flag is set, the FW reset sequence will have to be aborted because the NIC is prematurely closed before FW reset has completed. We also reject SRIOV configurations while FW

[PATCH net-next v2 16/22] bnxt_en: Handle firmware reset.

2019-08-29 Thread Michael Chan
Add the bnxt_fw_reset() main function to handle firmware reset. This is triggered by firmware to initiate an orderly reset, for example when a non-fatal exception condition has been detected. bnxt_fw_reset() will first wait for all VFs to shutdown and then start the bnxt_fw_reset_task() work queu

[PATCH net-next v2 09/22] bnxt_en: Handle firmware reset status during IF_UP.

2019-08-29 Thread Michael Chan
During IF_UP, newer firmware has a new status flag that indicates that firmware has reset. Add new function bnxt_fw_init_one() to re-probe the firmware and re-setup VF resources on the PF if necessary. If the re-probe fails, set a flag to prevent bnxt_open() from proceeding again. Signed-off-by:

[PATCH net-next v2 08/22] bnxt_en: Register buffers for VFs before reserving resources.

2019-08-29 Thread Michael Chan
From: Vasundhara Volam When VFs need to be reconfigured dynamically after firmwware reset, the configuration sequence on the PF needs to be changed to register the VF buffers first. Otherwise, some VF firmware commands may not succeed as there may not be PF buffers ready for the re-directed firm

[PATCH net-next v2 14/22] bnxt_en: Add new FW devlink_health_reporter

2019-08-29 Thread Michael Chan
From: Vasundhara Volam Create new FW devlink_health_reporter, to know the current health status of FW. Command example and output: $ devlink health show pci/:af:00.0 reporter fw pci/:af:00.0: name fw state healthy error 0 recover 0 FW status: Healthy; Reset count: 1 Cc: Jiri Pi

Re: [bpf-next, v2] samples: bpf: add max_pckt_size option at xdp_adjust_tail

2019-08-29 Thread Daniel T. Lee
On Fri, Aug 30, 2019 at 5:42 AM Song Liu wrote: > > On Mon, Aug 26, 2019 at 9:52 AM Daniel T. Lee wrote: > > > > Currently, at xdp_adjust_tail_kern.c, MAX_PCKT_SIZE is limited > > to 600. To make this size flexible, a new map 'pcktsz' is added. > > > > By updating new packet size to this map from

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

2019-08-29 Thread Jakub Kicinski
On Fri, 30 Aug 2019 02:53:32 +0200, Pablo Neira Ayuso wrote: > * Offsets do not need to be on the 32-bits boundaries anymore. This > patchset adds front-end code to adjust the offset and length coming > from the tc pedit representation, so drivers get an exact header field > offset and length

Re: [RFC PATCH v2 net-next 00/15] tc-taprio offload for SJA1105 DSA

2019-08-29 Thread Jakub Kicinski
On Fri, 30 Aug 2019 03:46:20 +0300, Vladimir Oltean wrote: > - Configuring the switch over SPI cannot apparently be done from this > ndo_setup_tc callback because it runs in atomic context. I also have > some downstream patches to offload tc clsact matchall with mirred > action, but in that c

[PATCH v2 net 2/3] taprio: Set default link speed to 10 Mbps in taprio_set_picos_per_byte

2019-08-29 Thread Vladimir Oltean
The taprio budget needs to be adapted at runtime according to interface link speed. But that handling is problematic. For one thing, installing a qdisc on an interface that doesn't have carrier is not illegal. But taprio prints the following stack trace: [ 31.851373] [ cut here ]---

[PATCH v2 net 3/3] net/sched: cbs: Set default link speed to 10 Mbps in cbs_set_port_rate

2019-08-29 Thread Vladimir Oltean
The discussion to be made is absolutely the same as in the case of previous patch ("taprio: Set default link speed to 10 Mbps in taprio_set_picos_per_byte"). Nothing is lost when setting a default. Cc: Leandro Dorileo Fixes: e0a7683d30e9 ("net/sched: cbs: fix port_rate miscalculation") Acked-by:

[PATCH v2 net 0/3] Fix issues in tc-taprio and tc-cbs

2019-08-29 Thread Vladimir Oltean
This series fixes one panic and one WARN_ON found in the tc-taprio qdisc, while trying to apply it: - On an interface which is not multi-queue - On an interface which has no carrier The tc-cbs was also visually found to suffer of the same issue as tc-taprio, and the fix was only compile-tested in

[PATCH v2 net 1/3] taprio: Fix kernel panic in taprio_destroy

2019-08-29 Thread Vladimir Oltean
taprio_init may fail earlier than this line: list_add(&q->taprio_list, &taprio_list); i.e. due to the net device not being multi queue. Attempting to remove q from the global taprio_list when it is not part of it will result in a kernel panic. Fix it by matching list_add and list_del be

[PATCH v3 net-next 0/2] Dynamic toggling of vlan_filtering for SJA1105 DSA

2019-08-29 Thread Vladimir Oltean
This patchset addresses a limitation in dsa_8021q where this sequence of commands was causing the switch to stop forwarding traffic: ip link add name br0 type bridge vlan_filtering 0 ip link set dev swp2 master br0 echo 1 > /sys/class/net/br0/bridge/vlan_filtering echo 0 > /sys/class/net/b

[PATCH v3 net-next 1/2] net: bridge: Populate the pvid flag in br_vlan_get_info

2019-08-29 Thread Vladimir Oltean
Currently this simplified code snippet fails: br_vlan_get_pvid(netdev, &pvid); br_vlan_get_info(netdev, pvid, &vinfo); ASSERT(!(vinfo.flags & BRIDGE_VLAN_INFO_PVID)); It is intuitive that the pvid of a netdevice should have the BRIDGE_VLAN_INFO_PVID flag set. However I ca

[PATCH v3 net-next 2/2] net: dsa: tag_8021q: Restore bridge VLANs when enabling vlan_filtering

2019-08-29 Thread Vladimir Oltean
The bridge core assumes that enabling/disabling vlan_filtering will translate into the simple toggling of a flag for switchdev drivers. That is clearly not the case for sja1105, which alters the VLAN table and the pvids in order to obtain port separation in standalone mode. There are 2 parts to t

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

2019-08-29 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

[PATCH net-next 4/4] netfilter: nft_payload: packet mangling offload support

2019-08-29 Thread Pablo Neira Ayuso
This patch allows for mangling packet fields using hardware offload infrastructure. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nft_payload.c | 72 + 1 file changed, 72 insertions(+) diff --git a/net/netfilter/nft_payload.c b/net/netfilter/nft_

[PATCH net-next 1/4] net: flow_offload: flip mangle action mask

2019-08-29 Thread Pablo Neira Ayuso
Userspace tc pedit action performs a bitwise NOT operation on the mask. All of the existing drivers in the tree undo this operation. Prepare the mangle mask in the way the drivers expect from the tc_setup_flow_action() function. Signed-off-by: Pablo Neira Ayuso --- drivers/net/ethernet/chelsio/c

[PATCH net-next 3/4] net: flow_offload: mangle action at byte level

2019-08-29 Thread Pablo Neira Ayuso
The flow mangle action is originally modeled after the tc pedit action, this has a number of shortcomings: 1) The tc pedit offset must be set on the 32-bits boundaries. Many protocol header field offsets are not aligned to 32-bits, eg. port destination, port source and ethernet destination.

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

2019-08-29 Thread Pablo Neira Ayuso
Hi, 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 actions. Patch 4) add payloa

Re: [PATCH net-next v2 0/9] r8169: add support for RTL8125

2019-08-29 Thread David Miller
From: Heiner Kallweit Date: Wed, 28 Aug 2019 22:23:22 +0200 > This series adds support for the 2.5Gbps chip RTl8125. It can be found > on PCIe network cards, and on an increasing number of consumer gaming > mainboards. Series is partially based on the r8125 vendor driver. > Tested with a Delock 8

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

2019-08-29 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 --- .../net/dsa/sja1105/sja1105_dynamic_config.c | 8 + .../net/dsa/sja1105/sja1105_static_config.c | 167

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

2019-08-29 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

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

2019-08-29 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 --- drivers/net/d

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

2019-08-29 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

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

2019-08-29 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

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

2019-08-29 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

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

2019-08-29 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

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

2019-08-29 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

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

2019-08-29 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 --- drivers/net/dsa/sja1105/sja1105.h | 20 +-- drivers/net/dsa/sja1105/sja1105_main.c | 12 ++-- driv

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

2019-08-29 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

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

2019-08-29 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

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

2019-08-29 Thread Vladimir Oltean
This is the v2 of the patchset from July: https://lists.openwall.net/netdev/2019/07/07/81 Changes: - Adapted the taprio offload patch to work by specifying "flags 2" to the iproute2-next tc. At the moment I don't clearly understand whether the full offload and the txtime assist ("flags 1") are

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

2019-08-29 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-

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

2019-08-29 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

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

2019-08-29 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/

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

2019-08-29 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

Re: ANNOUNCE: rpld an another RPL implementation for Linux

2019-08-29 Thread Reuben Hawkins
There is a COPYRIGHT file in radvd which I just read for the first time today. It’s been there for 19+ years. Sounds very BSD to me. I’ve been maintainer for 9 years. As far as I’m concerned, you can do with the code whatever you like. Good luck. 👍 Sent from my iPhone > On Aug 29, 2019, at 2

Re: [pull request][net-next v2 0/8] Mellanox, mlx5 updates 2019-08-22

2019-08-29 Thread David Miller
From: Saeed Mahameed Date: Wed, 28 Aug 2019 18:57:39 + > This series provides some misc updates to mlx5 driver. > 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,

Re: [PATCH net-next] net: dsa: mv88e6xxx: fix freeing unused SERDES IRQ

2019-08-29 Thread David Miller
From: Vivien Didelot Date: Wed, 28 Aug 2019 14:55:11 -0400 > Now mv88e6xxx does not enable its ports at setup itself and let > the DSA core handle this, unused ports are disabled without being > powered on first. While that is expected, the SERDES powering code > was assuming that a port was alre

Re: [iproute2, master 1/2] devlink: Print health reporter's dump time-stamp in a helper function

2019-08-29 Thread Stephen Hemminger
On Thu, 22 Aug 2019 14:05:41 +0300 Aya Levin wrote: > Add pr_out_dump_reporter prefix to the helper function's name and > encapsulate the print in it. > > Fixes: 2f1242efe9d0 ("devlink: Add devlink health show command") > Signed-off-by: Aya Levin > Acked-by: Jiri Pirko Looks fine, but devlin

Re: [PATCH net-next] net: dsa: mv88e6xxx: keep CMODE writable code private

2019-08-29 Thread David Miller
From: Vivien Didelot Date: Wed, 28 Aug 2019 12:26:59 -0400 > This is a follow-up patch for commit 7a3007d22e8d ("net: dsa: > mv88e6xxx: fully support SERDES on Topaz family"). > > Since .port_set_cmode is only called from mv88e6xxx_port_setup_mac and > mv88e6xxx_phylink_mac_config, it is fine to

Re: [PATCH net-next] net: dsa: mv88e6xxx: get serdes lane after lock

2019-08-29 Thread David Miller
From: Vivien Didelot Date: Wed, 28 Aug 2019 12:26:11 -0400 > This is a follow-up patch for commit 17deaf5cb37a ("net: dsa: > mv88e6xxx: create serdes_get_lane chip operation"). > > The .serdes_get_lane implementations access the CMODE of a port, > even though it is cached at the moment, it is sa

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

2019-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2019 16:13:59 -0700, Brian Vazquez wrote: > > We need a per-map implementation of the exec side, but roughly maps > > would do: > > > > LIST_HEAD(deleted); > > > > for entry in map { > > struct map_op_ctx { > > .key= entry->

Re: [PATCH net 1/3] taprio: Fix kernel panic in taprio_destroy

2019-08-29 Thread David Miller
From: Vladimir Oltean Date: Wed, 28 Aug 2019 17:48:27 +0300 > taprio_init may fail earlier than this line: > > list_add(&q->taprio_list, &taprio_list); > > i.e. due to the net device not being multi queue. > > Attempting to remove q from the global taprio_list when it is not part > of it

Re: [PATCH net-next v3 2/3] dpaa2-eth: Use stored link settings

2019-08-29 Thread David Miller
From: Ioana Radulescu Date: Wed, 28 Aug 2019 17:08:14 +0300 > Whenever a link state change occurs, we get notified and save > the new link settings in the device's private data. In ethtool > get_link_ksettings, use the stored state instead of interrogating > the firmware each time. > > Signed-of

Re: [PATCH net-next v3 3/3] dpaa2-eth: Add pause frame support

2019-08-29 Thread David Miller
From: Ioana Radulescu Date: Wed, 28 Aug 2019 17:08:15 +0300 > Starting with firmware version MC10.18.0, we have support for > L2 flow control. Asymmetrical configuration (Rx or Tx only) is > supported, but not pause frame autonegotioation. > > Pause frame configuration is done via ethtool. By de

Re: [PATCH net-next v3 1/3] dpaa2-eth: Remove support for changing link settings

2019-08-29 Thread David Miller
From: Ioana Radulescu Date: Wed, 28 Aug 2019 17:08:13 +0300 > We only support fixed-link for now, so there is no point in > offering users the option to change link settings via ethtool. > > Functionally there is no change, since firmware prevents us from > changing link parameters anyway. > >

[PATCH mlx5-next 5/5] net/mlx5: Set only stag for match untagged packets

2019-08-29 Thread Saeed Mahameed
From: Mark Bloch cvlan_tag enabled in match criteria and disabled in match value means both S & C tags don't exist (untagged of both). Signed-off-by: Mark Bloch Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 5 - 1 file changed, 4 insertions(+), 1 dele

[PATCH mlx5-next 0/5] Mellanox, mlx5 next updates 2019-09-29

2019-08-29 Thread Saeed Mahameed
Hi All, This series includes misc updates for mlx5-next shared branch required for upcoming software steering feature. 1) Alex adds HW bits and definitions required for SW steering 2) Ariel moves device memory management to mlx5_core (From mlx5_ib) 3) Maor, Cleanups and fixups for eswitch mode an

[PATCH mlx5-next 1/5] net/mlx5: Move device memory management to mlx5_core

2019-08-29 Thread Saeed Mahameed
From: Ariel Levkovich Move the device memory allocation and deallocation commands SW ICM memory to mlx5_core to expose this API for all mlx5_core users. This comes as preparation for supporting SW steering in kernel where it will be required to allocate and register device memory for direct rule

[PATCH mlx5-next 2/5] net/mlx5: Add HW bits and definitions required for SW steering

2019-08-29 Thread Saeed Mahameed
From: Alex Vesker Add the required Software Steering hardware definitions and bits to mlx5_ifc. Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Klitenik Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed --- include/linux/mlx5/device.h | 7 + include/linux/mlx5/mlx5_ifc.h | 235 +++

[PATCH mlx5-next 4/5] net/mlx5: Add stub for mlx5_eswitch_mode

2019-08-29 Thread Saeed Mahameed
From: Maor Gottlieb Return MLX5_ESWITCH_NONE when CONFIG_MLX5_ESWITCH is not selected. Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed --- include/linux/mlx5/eswitch.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/linux/

[PATCH mlx5-next 3/5] net/mlx5: Avoid disabling RoCE when uninitialized

2019-08-29 Thread Saeed Mahameed
From: Maor Gottlieb Move the check if RoCE steering is initialized to the disable RoCE function, it will ensure that we disable RoCE only if we succeeded in enabling it before. Fixes: 80f09dfc237f ("net/mlx5: Eswitch, enable RoCE loopback traffic") Signed-off-by: Maor Gottlieb Reviewed-by: Mark

Re: [PATCH bpf-next 04/13] bpf: refactor map_get_next_key()

2019-08-29 Thread Song Liu
> On Aug 28, 2019, at 11:45 PM, Yonghong Song wrote: > > Refactor function map_get_next_key() with a new helper > bpf_map_get_next_key(), which will be used later > for batched map lookup/lookup_and_delete/delete operations. > > Signed-off-by: Yonghong Song Acked-by: Song Liu

Re: [PATCH bpf-next 03/13] bpf: refactor map_delete_elem()

2019-08-29 Thread Song Liu
> On Aug 28, 2019, at 11:45 PM, Yonghong Song wrote: > > Refactor function map_delete_elem() with a new helper > bpf_map_delete_elem(), which will be used later > for batched lookup_and_delete and delete operations. > > Signed-off-by: Yonghong Song Acked-by: Song Liu

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

2019-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2019 11:27:17 -0700, Shannon Nelson wrote: > When the netdev gets a new name from userland, pass that name > down to the NIC for internal tracking. > > Signed-off-by: Shannon Nelson There is a precedent in ACPI for telling the FW what OS is running but how is the interface name us

Re: [PATCH bpf-next 02/13] bpf: refactor map_update_elem()

2019-08-29 Thread Song Liu
> On Aug 28, 2019, at 11:45 PM, Yonghong Song wrote: > > Refactor function map_update_elem() by creating a > helper function bpf_map_update_elem() which will be > used later by batched map update operation. > > Also reuse function bpf_map_value_size() > in map_update_elem(). > > Signed-off-b

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

2019-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2019 11:27:16 -0700, Shannon Nelson wrote: > +static int ionic_tx_tso(struct ionic_queue *q, struct sk_buff *skb) > +{ > + struct ionic_tx_stats *stats = q_to_tx_stats(q); > + struct ionic_desc_info *abort = q->head; > + struct device *dev = q->lif->ionic->dev; > + st

Re: [iproute2, master 2/2] devlink: Add a new time-stamp format for health reporter's dump

2019-08-29 Thread Stephen Hemminger
On Thu, 22 Aug 2019 14:05:42 +0300 Aya Levin wrote: > diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h > index fc195cbd66f4..3f8532711315 100644 > --- a/include/uapi/linux/devlink.h > +++ b/include/uapi/linux/devlink.h > @@ -348,6 +348,8 @@ enum devlink_attr { > DEVL

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

2019-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2019 11:27:16 -0700, Shannon Nelson wrote: > +netdev_tx_t ionic_start_xmit(struct sk_buff *skb, struct net_device *netdev) > +{ > + u16 queue_index = skb_get_queue_mapping(skb); > + struct ionic_lif *lif = netdev_priv(netdev); > + struct ionic_queue *q; > + int ndescs

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

2019-08-29 Thread Brian Vazquez
On Thu, Aug 29, 2019 at 11:40 AM Jakub Kicinski wrote: > > On Wed, 28 Aug 2019 23:45:02 -0700, Yonghong Song wrote: > > Brian Vazquez has proposed BPF_MAP_DUMP command to look up more than one > > map entries per syscall. > > > > https://lore.kernel.org/bpf/cabcgpau3xxx6cmmxd+1knapivtc2jlbhysdx

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

2019-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2019 11:27:15 -0700, Shannon Nelson wrote: > +static int ionic_get_module_eeprom(struct net_device *netdev, > +struct ethtool_eeprom *ee, > +u8 *data) > +{ > + struct ionic_lif *lif = netdev_priv(netdev); > + str

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

2019-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2019 11:27:13 -0700, Shannon Nelson wrote: > @@ -588,8 +866,26 @@ static int ionic_set_features(struct net_device *netdev, > > static int ionic_set_mac_address(struct net_device *netdev, void *sa) > { > - netdev_info(netdev, "%s: stubbed\n", __func__); > - return 0; > +

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

2019-08-29 Thread Brian Vazquez
Hi Yonghong! Thanks for sending this series of patches and starting the discussion. On Wed, Aug 28, 2019 at 11:45 PM Yonghong Song wrote: > > Brian Vazquez has proposed BPF_MAP_DUMP command to look up more than one > map entries per syscall. > > https://lore.kernel.org/bpf/cabcgpau3xxx6cmmxd+

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

2019-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2019 11:27:08 -0700, Shannon Nelson wrote: > +static void ionic_lif_qcq_deinit(struct ionic_lif *lif, struct ionic_qcq > *qcq) > +{ > + struct ionic_dev *idev = &lif->ionic->idev; > + struct device *dev = lif->ionic->dev; > + > + if (!qcq) > + return; > + > +

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

2019-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2019 11:27:05 -0700, Shannon Nelson wrote: > 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

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

2019-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2019 11:27:03 -0700, Shannon Nelson wrote: > 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 > diff --git a/drivers/net/ethernet/pe

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

2019-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2019 11:27:02 -0700, Shannon Nelson wrote: > 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: Jakub Kicinski > Cc: Jiri Pirko > Signed-off-by: Shannon Nelson Acked-by: Jakub

Re: [PATCH bpf-next 01/13] bpf: add bpf_map_value_size and bp_map_copy_value helper functions

2019-08-29 Thread Song Liu
> On Aug 28, 2019, at 11:45 PM, Yonghong Song wrote: > > From: Brian Vazquez > > Move reusable code from map_lookup_elem to helper functions to avoid code > duplication in kernel/bpf/syscall.c > > Suggested-by: Stanislav Fomichev > Signed-off-by: Brian Vazquez Acked-by: Song Liu Yongh

ANNOUNCE: rpld an another RPL implementation for Linux

2019-08-29 Thread Alexander Aring
Hi, I had some free time, I wanted to know how RPL [0] works so I did a implementation. It's _very_ basic as it only gives you a "routable" (is that a word?) thing afterwards in a very constrained setup of RPL messages. Took ~1 month to implement it and I reused some great code from radvd [1]. I

Re: [PATCH net-next v2 3/3] net: tls: export protocol version, cipher, tx_conf/rx_conf to socket diag

2019-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2019 18:48:04 +0200, Davide Caratti wrote: > When an application configures kernel TLS on top of a TCP socket, it's > now possible for inet_diag_handler() to collect information regarding the > protocol version, the cipher type and TX / RX configuration, in case > INET_DIAG_INFO is r

Re: [PATCH bpf-next 2/2] nfp: bpf: add simple map op cache

2019-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2019 14:29:44 -0700, Song Liu wrote: > On Tue, Aug 27, 2019 at 10:40 PM Jakub Kicinski > wrote: > > > > Each get_next and lookup call requires a round trip to the device. > > However, the device is capable of giving us a few entries back, > > instead of just one. > > > > In this pat

Re: [PATCH bpf-next 2/2] nfp: bpf: add simple map op cache

2019-08-29 Thread Song Liu
On Tue, Aug 27, 2019 at 10:40 PM Jakub Kicinski wrote: > > Each get_next and lookup call requires a round trip to the device. > However, the device is capable of giving us a few entries back, > instead of just one. > > In this patch we ask for a small yet reasonable number of entries > (4) on ever

Re: [PATCH bpf-next 1/2] nfp: bpf: rework MTU checking

2019-08-29 Thread Song Liu
On Tue, Aug 27, 2019 at 10:38 PM Jakub Kicinski wrote: > > If control channel MTU is too low to support map operations a warning > will be printed. This is not enough, we want to make sure probe fails > in such scenario, as this would clearly be a faulty configuration. > > Signed-off-by: Jakub Kic

  1   2   >