Re: [PATCH bpf-next] libbpf: remove zc variable as it is not used

2019-08-18 Thread Maxim Mikityanskiy
On 2019-08-19 09:35, Magnus Karlsson wrote: > On Sat, Aug 17, 2019 at 12:02 AM Jonathan Lemon > wrote: >> >> >> >> On 16 Aug 2019, at 8:37, Yonghong Song wrote: >> >>> On 8/16/19 3:26 AM, Magnus Karlsson wrote: The zc is not used in the xsk part of libbpf, so let us remove it. Not g

Re: [PATCH bpf-next] libbpf: remove zc variable as it is not used

2019-08-18 Thread Magnus Karlsson
On Sat, Aug 17, 2019 at 12:02 AM Jonathan Lemon wrote: > > > > On 16 Aug 2019, at 8:37, Yonghong Song wrote: > > > On 8/16/19 3:26 AM, Magnus Karlsson wrote: > >> The zc is not used in the xsk part of libbpf, so let us remove it. > >> Not > >> good to have dead code lying around. > >> > >> Signed-

Re: [PATCH net-next] net: openvswitch: Set OvS recirc_id from tc chain

2019-08-18 Thread Paul Blakey
On 8/18/2019 7:00 PM, Paul Blakey wrote: > What do you guys say about the following diff on top of the last one? > Use static key, and also have OVS_DP_CMD_SET command probe/enable the feature. > > This will allow userspace to probe the feature, and selectivly enable it via > the > OVS_DP_CMD_SET

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

2019-08-18 Thread Jason Wang
On 2019/8/16 下午7:00, Yang Yingliang wrote: > I got a UAF repport in tun driver when doing fuzzy test: > > [ 466.269490] > == > [ 466.271792] BUG: KASAN: use-after-free in tun_chr_read_iter+0x2ca/0x2d0 > [ 466.271806] Read of size

Re: [RFC PATCH net-next 03/11] spi: Add a PTP system timestamp to the transfer structure

2019-08-18 Thread Andrew Lunn
> MDIO bus controllers are in a similar situation (with Hubert's patch) > but at least there the frame size is fixed and I haven't heard of an > MDIO controller to use DMA. Linux does not have any DMA driver MDIO busses, as far as i know. It does not make sense, since you are only transferring 16b

Re: [PATCH] ravb: Fix use-after-free ravb_tstamp_skb

2019-08-18 Thread David Miller
From: Simon Horman Date: Fri, 16 Aug 2019 17:17:02 +0200 > From: Tho Vu > > When a Tx timestamp is requested, a pointer to the skb is stored in the > ravb_tstamp_skb struct. This was done without an skb_get. There exists > the possibility that the skb could be freed by ravb_tx_free (when > ravb

Re: [PATCH net-next 4/4 v3] net: ethernet: mediatek: Add MT7628/88 SoC support

2019-08-18 Thread David Miller
From: Stefan Roese Date: Fri, 16 Aug 2019 15:23:25 +0200 > This patch adds support for the MediaTek MT7628/88 SoCs to the common > MediaTek ethernet driver. Some minor changes are needed for this and > a bigger change, as the MT7628 does not support QDMA (only PDMA). > > Signed-off-by: Stefan Ro

Re: [PATCH net-next 3/4 v3] net: ethernet: mediatek: Rename NEXT_RX_DESP_IDX to NEXT_DESP_IDX

2019-08-18 Thread David Miller
From: Stefan Roese Date: Fri, 16 Aug 2019 15:23:24 +0200 > Rename the NEXT_RX_DESP_IDX macro to NEXT_DESP_IDX, so that it better > can be used for TX ops as well. This will be used in the upcoming > MT7628/88 support (same functionality for RX and TX in this macro). > > Signed-off-by: Stefan Roe

Re: [PATCH net-next 1/4 v3] dt-bindings: net: mediatek: Add support for MediaTek MT7628/88 SoC

2019-08-18 Thread David Miller
From: Stefan Roese Date: Fri, 16 Aug 2019 15:23:22 +0200 > Add compatible for the ethernet IP core on MT7628/88 SoCs. Its > compatible with the older Ralink Rt5350F SoC. And OpenWrt already > uses this compatible string for the MT76x8. > > Signed-off-by: Stefan Roese Applied.

Re: [PATCH net-next 2/4 v3] net: ethernet: mediatek: Rename MTK_QMTK_INT_STATUS to MTK_QDMA_INT_STATUS

2019-08-18 Thread David Miller
From: Stefan Roese Date: Fri, 16 Aug 2019 15:23:23 +0200 > Currently all QDMA registers are named "MTK_QDMA_foo" in this driver > with one exception: MTK_QMTK_INT_STATUS. This patch renames > MTK_QMTK_INT_STATUS to MTK_QDMA_INT_STATUS so that all macros follow > this rule. > > Signed-off-by: Ste

Re: [PATCH] be2net: eliminate enable field from be_aic_obj

2019-08-18 Thread David Miller
From: Ivan Vecera Date: Fri, 16 Aug 2019 09:15:35 +0200 > Adaptive coalescing is managed per adapter not per event queue so it > does not needed to store 'enable' flag for each event queue. > > Signed-off-by: Ivan Vecera Applied to net-next.

Re: [PATCH net,v5 0/2] flow_offload hardware priority fixes

2019-08-18 Thread David Miller
From: Pablo Neira Ayuso Date: Fri, 16 Aug 2019 03:24:08 +0200 > This patchset contains two updates for the flow_offload users: > > 1) Pass the major tc priority to drivers so they do not have to >lshift it. This is a preparation patch for the fix coming in >patch #2. > > 2) Set the hard

Re: [PATCH] net: cavium: fix driver name

2019-08-18 Thread David Miller
From: Stephen Hemminger Date: Thu, 15 Aug 2019 12:49:49 -0700 > The driver name gets exposed in sysfs under /sys/bus/pci/drivers > so it should look like other devices. Change it to be common > format (instead of "Cavium PTP"). > > This is a trivial fix that was observed by accident because > De

Re: [net-next v2 1/1] tipc: clean up skb list lock handling on send path

2019-08-18 Thread David Miller
From: Jon Maloy Date: Thu, 15 Aug 2019 16:42:50 +0200 > The policy for handling the skb list locks on the send and receive paths > is simple. > > - On the send path we never need to grab the lock on the 'xmitq' list > when the destination is an exernal node. > > - On the receive path we alway

Re: [PATCH net] ibmvnic: Unmap DMA address of TX descriptor buffers after use

2019-08-18 Thread David Miller
From: Thomas Falcon Date: Wed, 14 Aug 2019 14:57:05 -0500 > There's no need to wait until a completion is received to unmap > TX descriptor buffers that have been passed to the hypervisor. > Instead unmap it when the hypervisor call has completed. This patch > avoids the possibility that a buffer

Re: [PATCH net 0/6] bnxt_en: Bug fixes.

2019-08-18 Thread David Miller
From: Michael Chan Date: Fri, 16 Aug 2019 18:33:31 -0400 > 2 Bug fixes related to 57500 shutdown sequence and doorbell sequence, > 2 TC Flower bug fixes related to the setting of the flow direction, > 1 NVRAM update bug fix, and a minor fix to suppress an unnecessary > error message. Please queu

Re: [PATCH net 1/1] bnx2x: Fix VF's VLAN reconfiguration in reload.

2019-08-18 Thread David Miller
From: Manish Chopra Date: Sun, 18 Aug 2019 07:25:48 -0700 > Commit 04f05230c5c13 ("bnx2x: Remove configured vlans as > part of unload sequence."), introduced a regression in driver > that as a part of VF's reload flow, VLANs created on the VF > doesn't get re-configured in hardware as vlan metada

Re: [PATCH iproute2-next v2 0/4] Add devlink-trap support

2019-08-18 Thread David Ahern
On 8/13/19 2:31 AM, Ido Schimmel wrote: > From: Ido Schimmel > > This patchset adds devlink-trap support in iproute2. > > Patch #1 increases the number of options devlink can handle. > > Patches #2-#3 gradually add support for all devlink-trap commands. > > Patch #4 adds a man page for devlink

Re: [PATCH 2/2] ip nexthop: Allow flush|list operations to specify a specific protocol

2019-08-18 Thread David Ahern
On 8/9/19 6:18 PM, Donald Sharp wrote: > In the case where we have a large number of nexthops from a specific > protocol, allow the flush and list operations to take a protocol > to limit the commands scopes. > > Signed-off-by: Donald Sharp > --- > ip/ipnexthop.c | 16 +++- > 1 file

[PATCH spi for-5.4 2/5] spi: Add a PTP system timestamp to the transfer structure

2019-08-18 Thread Vladimir Oltean
SPI is one of the interfaces used to access devices which have a POSIX clock driver (real time clocks, 1588 timers etc). Since there are lots of sources of timing jitter when retrieving the time from such a device (queuing delays, locking contention, running in interruptible context etc), introduc

[PATCH spi for-5.4 3/5] spi: spi-fsl-dspi: Use poll mode in case the platform IRQ is missing

2019-08-18 Thread Vladimir Oltean
On platforms like LS1021A which use TCFQ mode, an interrupt needs to be processed after each byte is TXed/RXed. I tried to make the DSPI implementation on this SoC operate in other, more efficient modes (EOQ, DMA) but it looks like it simply isn't possible. Therefore allow the driver to operate in

[PATCH spi for-5.4 4/5] spi: spi-fsl-dspi: Implement the PTP system timestamping for TCFQ mode

2019-08-18 Thread Vladimir Oltean
In this mode, the DSPI controller uses PIO to transfer word by word. In comparison, in EOQ mode the 4-word deep FIFO is being used, hence the current logic will need some adaptation for which I do not have the hardware (Coldfire) to test. It is not clear what is the timing of DMA transfers and whet

[PATCH spi for-5.4 5/5] spi: spi-fsl-dspi: Disable interrupts and preemption during poll mode transfer

2019-08-18 Thread Vladimir Oltean
While the poll mode helps reduce the overall latency in transmitting a SPI message in the EOQ and TCFQ modes, the transmission can still have jitter due to the CPU needing to service interrupts. The transmission latency does not matter except in situations where the SPI transfer represents the rea

[PATCH spi for-5.4 1/5] spi: Use an abbreviated pointer to ctlr->cur_msg in __spi_pump_messages

2019-08-18 Thread Vladimir Oltean
This helps a bit with line fitting now (the list_first_entry call) as well as during the next patch which needs to iterate through all transfers of ctlr->cur_msg so it timestamps them. Signed-off-by: Vladimir Oltean --- drivers/spi/spi.c | 23 --- 1 file changed, 12 insertion

[PATCH spi for-5.4 0/5] Deterministic SPI latency with NXP DSPI driver

2019-08-18 Thread Vladimir Oltean
This patchset proposes an interface from the SPI subsystem for software timestamping SPI transfers. There is a default implementation provided in the core, as well as a mechanism for SPI slave drivers to check which byte was in fact timestamped post-facto. The patchset also adds the first user of t

Re: [PATCH RFC v2 net-next 0/4] mv88e6xxx: setting 2500base-x mode for CPU/DSA port in dts

2019-08-18 Thread Vivien Didelot
Hi Marek, On Sat, 17 Aug 2019 15:50:25 -0400, Vivien Didelot wrote: > > here is another proposal for supporting setting 2500base-x mode for > > CPU/DSA ports in device tree correctly. > > > > The changes from v1 are that instead of adding .port_setup() and > > .port_teardown() methods to the DS

[PATCH net-next 2/6] net: dsa: do not enable or disable non user ports

2019-08-18 Thread Vivien Didelot
The .port_enable and .port_disable operations are currently only called for user ports, hence assuming they have a slave device. In preparation for using these operations for other port types as well, simply guard all implementations against non user ports and return directly in such case. Signed-

[PATCH net-next 6/6] net: dsa: mv88e6xxx: wrap SERDES IRQ in power function

2019-08-18 Thread Vivien Didelot
Now that mv88e6xxx_serdes_power is only called after driver setup, we can wrap the SERDES IRQ code directly within it for clarity. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 32 +++- 1 file changed, 19 insertions(+), 13 deletions(-) diff --g

[PATCH net-next 1/6] net: dsa: use a single switch statement for port setup

2019-08-18 Thread Vivien Didelot
It is currently difficult to read the different steps involved in the setup and teardown of ports in the DSA code. Keep it simple with a single switch statement for each port type: UNUSED, CPU, DSA, or USER. Also no need to call devlink_port_unregister from within dsa_port_setup as this step is in

[PATCH net-next 0/6] net: dsa: enable and disable all ports

2019-08-18 Thread Vivien Didelot
The DSA stack currently calls the .port_enable and .port_disable switch callbacks for slave ports only. However, it is useful to call them for all port types. For example this allows some drivers to delay the optimization of power consumption after the switch is setup. This can also help reducing t

[PATCH net-next 4/6] net: dsa: mv88e6xxx: do not change STP state on port disabling

2019-08-18 Thread Vivien Didelot
When disabling a port, that is not for the driver to decide what to do with the STP state. This is already handled by the DSA layer. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers

[PATCH net-next 3/6] net: dsa: enable and disable all ports

2019-08-18 Thread Vivien Didelot
Call the .port_enable and .port_disable functions for all ports, not only the user ports, so that drivers may optimize the power consumption of all ports after a successful setup. Unused ports are now disabled on setup. CPU and DSA ports are now enabled on setup and disabled on teardown. User port

[PATCH net-next 5/6] net: dsa: mv88e6xxx: enable SERDES after setup

2019-08-18 Thread Vivien Didelot
SERDES is powered on for CPU and DSA ports and powered down for unused ports at setup time. But now that DSA calls mv88e6xxx_port_enable and mv88e6xxx_port_disable for all ports, the SERDES power can now be handled after setup inconditionally for all ports. Using the port enable and disable callba

Re: [PATCH net-next] net: openvswitch: Set OvS recirc_id from tc chain

2019-08-18 Thread Paul Blakey
What do you guys say about the following diff on top of the last one? Use static key, and also have OVS_DP_CMD_SET command probe/enable the feature. This will allow userspace to probe the feature, and selectivly enable it via the OVS_DP_CMD_SET command. Thansk, Paul. --- include/uapi/linux/ope

[PATCH net 1/1] bnx2x: Fix VF's VLAN reconfiguration in reload.

2019-08-18 Thread Manish Chopra
Commit 04f05230c5c13 ("bnx2x: Remove configured vlans as part of unload sequence."), introduced a regression in driver that as a part of VF's reload flow, VLANs created on the VF doesn't get re-configured in hardware as vlan metadata/info was not getting cleared for the VFs which causes vlan PING t

Question on xen-netfront code to fix a potential ring buffer corruption

2019-08-18 Thread Dongli Zhang
Hi, Would you please help confirm why the condition at line 908 is ">="? In my opinion, we would only hit "skb_shinfo(skb)->nr_frag == MAX_SKB_FRAGS" at line 908. 890 static RING_IDX xennet_fill_frags(struct netfront_queue *queue, 891 struct sk_buff *skb, 892