Re: Fw: [Bug 199121] New: Packet header is incorrect when following through an IPsec tunnel after upgrade kernel to 4.15

2018-03-15 Thread Steffen Klassert
Ccing the reporter of this bug. On Thu, Mar 15, 2018 at 07:59:51AM -0700, Stephen Hemminger wrote: > > > Begin forwarded message: > > Date: Thu, 15 Mar 2018 06:37:27 + > From: bugzilla-dae...@bugzilla.kernel.org > To: step...@networkplumber.org > Subject: [Bug 199121] New: Packet header is

Re: linux-next: manual merge of the net-next tree with the rdma-fixes tree

2018-03-15 Thread Saeed Mahameed
On Thu, 2018-03-15 at 21:18 -0400, Doug Ledford wrote: > On Fri, 2018-03-16 at 11:56 +1100, Stephen Rothwell wrote: > > Hi all, > > > > Today's linux-next merge of the net-next tree got a conflict in: > > > > drivers/infiniband/hw/mlx5/main.c > > > > between commit: > > > > 42cea83f9524 ("I

Re: [PATCH net-next] tuntap: XDP_TX can use native XDP

2018-03-15 Thread Jason Wang
On 2018年03月15日 21:32, Michael S. Tsirkin wrote: On Thu, Mar 15, 2018 at 04:39:25PM +0800, Jason Wang wrote: On 2018年03月14日 11:37, Michael S. Tsirkin wrote: return NULL; case XDP_TX: - xdp_xmit = true; - /* fa

Re: [PATCH RFC 2/2] virtio_ring: support packed ring

2018-03-15 Thread Jason Wang
On 2018年03月16日 14:10, Tiwei Bie wrote: On Fri, Mar 16, 2018 at 12:03:25PM +0800, Jason Wang wrote: On 2018年02月23日 19:18, Tiwei Bie wrote: Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 699 +-- include/linux/virtio_ring.h | 8 +-

[PATCH bpf-next 4/4] tools: bpf: remove feature detection output

2018-03-15 Thread Jakub Kicinski
bpf tools use feature detection for libbfd dependency, clean up the output files on make clean. Signed-off-by: Jakub Kicinski --- tools/bpf/Makefile | 2 ++ tools/bpf/bpftool/Makefile | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/bpf/Makefile b/tools/bpf/Makefile index acf

[PATCH bpf-next 2/4] tools: bpftool: fix potential format truncation

2018-03-15 Thread Jakub Kicinski
GCC 7 complains: xlated_dumper.c: In function ‘print_call’: xlated_dumper.c:179:10: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 249 and 253 [-Wformat-truncation=] "%+d#%s", insn->off, sym->name); Add a bit more space to the buffer so

[PATCH bpf-next 0/4] tools: bpf: minor build improvements

2018-03-15 Thread Jakub Kicinski
Hi! As promised this series addresses nits and minor issues in tools/bpf build infra. One GCC-7 warning which is nice to get rid of. Dependencies when built with OUTPUT are fixed. make clean will now remove the FEATURE-DUMP.* files. PHONY target is also updated to match reality. Jakub Kicinsk

[PATCH bpf-next 3/4] tools: bpf: cleanup PHONY target

2018-03-15 Thread Jakub Kicinski
There is no FORCE target in the Makefile and some of the PHONY targets are missing, update the list. Signed-off-by: Jakub Kicinski --- tools/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bpf/Makefile b/tools/bpf/Makefile index c07b4e718eeb..acfaf4c8cc32 1

[PATCH bpf-next 1/4] tools: bpftool: fix dependency file path

2018-03-15 Thread Jakub Kicinski
Auto-generated dependency files are in the OUTPUT directory, we need to include them from there. This fixes object files not being rebuilt after header changes. Signed-off-by: Jakub Kicinski --- tools/bpf/bpftool/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools

Re: [PATCH RFC 2/2] virtio_ring: support packed ring

2018-03-15 Thread Tiwei Bie
On Fri, Mar 16, 2018 at 12:03:25PM +0800, Jason Wang wrote: > On 2018年02月23日 19:18, Tiwei Bie wrote: > > Signed-off-by: Tiwei Bie > > --- > > drivers/virtio/virtio_ring.c | 699 > > +-- > > include/linux/virtio_ring.h | 8 +- > > 2 files changed, 618

Re: [PATCH] [v2] Bluetooth: btrsi: rework dependencies

2018-03-15 Thread Kalle Valo
Arnd Bergmann writes: > On Thu, Mar 15, 2018 at 7:30 PM, Marcel Holtmann wrote: >> Hi Arnd, >> >>> The linkage between the bluetooth driver and the wireless >>> driver is not defined properly, leading to build problems >>> such as: >>> >>> warning: (BT_HCIRSI) selects RSI_COEX which has unmet di

Re: [PATCH 00/16] remove eight obsolete architectures

2018-03-15 Thread afzal mohammed
Hi, On Thu, Mar 15, 2018 at 10:56:48AM +0100, Arnd Bergmann wrote: > On Thu, Mar 15, 2018 at 10:42 AM, David Howells wrote: > > Do we have anything left that still implements NOMMU? Please don't kill !MMU. > Yes, plenty. > I've made an overview of the remaining architectures for my own refere

Re: [Intel-wired-lan] [PATCH v2 12/15] ice: Add stats and ethtool support

2018-03-15 Thread Stephen Hemminger
On Thu, 15 Mar 2018 17:50:10 -0700 Alexander Duyck wrote: > On Thu, Mar 15, 2018 at 4:52 PM, Stephen Hemminger > wrote: > > On Thu, 15 Mar 2018 16:47:59 -0700 > > Anirudh Venkataramanan wrote: > > > >> + > >> +static const struct ice_stats ice_gstrings_vsi_stats[] = { > >> + ICE_VSI_STAT(

[PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-15 Thread Kees Cook
Patch 1 adds const_max_t(), patch 2 uses it in all the places max() was used for stack arrays. Commit log from patch 1: ---snip--- kernel.h: Introduce const_max_t() for VLA removal In the effort to remove all VLAs from the kernel[1], it is desirable to build with -Wvla. However, this warning is o

[PATCH v5 2/2] Remove false-positive VLAs when using max()

2018-03-15 Thread Kees Cook
As part of removing VLAs from the kernel[1], we want to build with -Wvla, but it is overly pessimistic and only accepts constant expressions for stack array sizes, instead of also constant values. The max() macro triggers the warning, so this refactors these uses of max() to use the new const_max()

[PATCH v5 1/2] kernel.h: Introduce const_max_t() for VLA removal

2018-03-15 Thread Kees Cook
In the effort to remove all VLAs from the kernel[1], it is desirable to build with -Wvla. However, this warning is overly pessimistic, in that it is only happy with stack array sizes that are declared as constant expressions, and not constant values. One case of this is the evaluation of the max()

Re: [PATCH RFC 2/2] virtio_ring: support packed ring

2018-03-15 Thread Jason Wang
On 2018年02月23日 19:18, Tiwei Bie wrote: Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 699 +-- include/linux/virtio_ring.h | 8 +- 2 files changed, 618 insertions(+), 89 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/driver

Re: [RFC PATCH V1 01/12] audit: add container id

2018-03-15 Thread Richard Guy Briggs
On 2018-03-15 16:27, Stefan Berger wrote: > On 03/01/2018 02:41 PM, Richard Guy Briggs wrote: > > Implement the proc fs write to set the audit container ID of a process, > > emitting an AUDIT_CONTAINER record to document the event. > > > > This is a write from the container orchestrator task to a

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Miguel Ojeda
On Fri, Mar 16, 2018 at 12:49 AM, Kees Cook wrote: > On Thu, Mar 15, 2018 at 4:46 PM, Linus Torvalds > wrote: >> What I'm *not* so much ok with is "const_max(5,sizeof(x))" erroring >> out, or silently causing insane behavior due to hidden subtle type >> casts.. > > Yup! I like it as an explicit a

[PATCH V2] xfrm: fix rcu_read_unlock usage in xfrm_local_error

2018-03-15 Thread Taehee Yoo
In the xfrm_local_error, rcu_read_unlock should be called when afinfo is not NULL. because xfrm_state_get_afinfo calls rcu_read_unlock if afinfo is NULL. Fixes: af5d27c4e12b ("xfrm: remove xfrm_state_put_afinfo") Signed-off-by: Taehee Yoo --- V2 : - Add Fixes tag V1 : - Initial patch net/xf

Re: [PATCH] xfrm: fix rcu_read_unlock usage in xfrm_local_error

2018-03-15 Thread Taehee Yoo
2018-03-15 19:48 GMT+09:00 Steffen Klassert : > On Tue, Mar 13, 2018 at 05:26:07PM +0900, Taehee Yoo wrote: >> In the xfrm_local_error, rcu_read_unlock should be called when afinfo >> is not NULL. because xfrm_state_get_afinfo calls rcu_read_unlock >> if afinfo is NULL. >> >> Signed-off-by: Taehee

Re: linux-next: manual merge of the net-next tree with the rdma-fixes tree

2018-03-15 Thread Jason Gunthorpe
On Thu, Mar 15, 2018 at 09:18:02PM -0400, Doug Ledford wrote: > Here's the commit (from the rdma git repo) with the proper merge fix > (although it also has other minor merge stuff that needs to be ignored): > > 2d873449a202 (Merge branch 'k.o/wip/dl-for-rc' into k.o/wip/dl-for-next) Stephen,

Re: [PATCH] mlx5: Remove call to ida_pre_get

2018-03-15 Thread Matthew Wilcox
On Thu, Mar 15, 2018 at 11:58:07PM +, Saeed Mahameed wrote: > On Wed, 2018-03-14 at 19:57 -0700, Matthew Wilcox wrote: > > From: Matthew Wilcox > > > > The mlx5 driver calls ida_pre_get() in a loop for no readily apparent > > reason. The driver uses ida_simple_get() which will call > > ida_p

[PATCH net-next v4 2/7] ibmvnic: Update and clean up reset TX pool routine

2018-03-15 Thread Thomas Falcon
Update TX pool reset routine to accommodate new TSO pool array. Introduce a function that resets one TX pool, and use that function to initialize each pool in both pool arrays. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 45 +- 1 file

[PATCH net-next v4 6/7] ibmvnic: Improve TX buffer accounting

2018-03-15 Thread Thomas Falcon
Improve TX pool buffer accounting to prevent the producer index from overruning the consumer. First, set the next free index to an invalid value if it is in use. If next buffer to be consumed is in use, drop the packet. Finally, if the transmit fails for some other reason, roll back the consumer i

[PATCH net-next v4 4/7] ibmvnic: Update TX pool initialization routine

2018-03-15 Thread Thomas Falcon
Introduce function that initializes one TX pool. Use that to create each pool entry in both the standard TX pool and TSO pool arrays. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 90 -- 1 file changed, 48 insertions(+), 42 deletions(-)

[PATCH net-next v4 5/7] ibmvnic: Update TX and TX completion routines

2018-03-15 Thread Thomas Falcon
Update TX and TX completion routines to account for TX pool restructuring. TX routine first chooses the pool depending on whether a packet is GSO or not, then uses it accordingly. For the completion routine to know which pool it needs to use, set the most significant bit of the correlator index to

[PATCH net-next v4 7/7] ibmvnic: Update TX pool cleaning routine

2018-03-15 Thread Thomas Falcon
Update routine that cleans up any outstanding transmits that have not received completions when the device needs to close. Introduces a helper function that cleans one TX pool to make code more readable. Signed-off-by: Thomas Falcon --- v4: Update to use the number of buffers in the TX pool struc

[PATCH net-next v4 0/7] ibmvnic: Update TX pool and TX routines

2018-03-15 Thread Thomas Falcon
This patch restructures the TX pool data structure and provides a separate TX pool array for TSO transmissions. This is already used in some way due to our unique DMA situation, namely that we cannot use single DMA mappings for packet data. Previously, both buffer arrays used the same pool entry. T

[PATCH net-next v4 1/7] ibmvnic: Generalize TX pool structure

2018-03-15 Thread Thomas Falcon
Remove some unused fields in the structure and include values describing the individual buffer size and number of buffers in a TX pool. This allows us to use these fields for TX pool buffer accounting as opposed to using hard coded values. Finally, split TSO buffers out and provide an additional TX

[PATCH net-next v4 3/7] ibmvnic: Update release TX pool routine

2018-03-15 Thread Thomas Falcon
Introduce function that frees one TX pool. Use that to release each pool in both the standard TX pool and TSO pool arrays. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/net/eth

Re: linux-next: manual merge of the net-next tree with the rdma-fixes tree

2018-03-15 Thread Doug Ledford
On Fri, 2018-03-16 at 11:56 +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the net-next tree got a conflict in: > > drivers/infiniband/hw/mlx5/main.c > > between commit: > > 42cea83f9524 ("IB/mlx5: Fix cleanup order on unload") > > from the rdma-fixes tree and com

Re: [PATCH v2 5/6] ixgbevf: keep writel() closer to wmb()

2018-03-15 Thread Sinan Kaya
On 3/15/2018 9:04 PM, Sinan Kaya wrote: > /* notify HW of packet */ > - ixgbevf_write_tail(tx_ring, i); > + writel(value, tx_ring->tail); > oops. copy paste mistake. I'll hold onto posting v3 until i hear more feedback. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an

[PATCH v2 1/6] i40e/i40evf: Eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_relaxed(). Signed-off-

[PATCH v2 3/6] igbvf: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_relaxed(). Signed-off-

[PATCH v2 2/6] ixgbe: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
Code includes wmb() followed by writel() in multiple places. writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_rela

[PATCH v2 4/6] igb: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_relaxed(). Signed-off-

[PATCH v2 5/6] ixgbevf: keep writel() closer to wmb()

2018-03-15 Thread Sinan Kaya
Remove ixgbevf_write_tail() in favor of moving writel() close to wmb(). Signed-off-by: Sinan Kaya --- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 5 - drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/ne

[PATCH v2 6/6] ixgbevf: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
Code includes wmb() followed by writel() in multiple places. writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_rela

[PATCH v2 0/6] Eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
Code includes wmb() followed by writel() in multiple places. writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_rela

linux-next: manual merge of the net-next tree with the rdma-fixes tree

2018-03-15 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: drivers/infiniband/hw/mlx5/main.c between commit: 42cea83f9524 ("IB/mlx5: Fix cleanup order on unload") from the rdma-fixes tree and commit: b5ca15ad7e61 ("IB/mlx5: Add proper representors support") from the net-n

Re: [PATCH 6/7] e1000: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
On 3/15/2018 8:25 PM, Alexander Duyck wrote: > On Thu, Mar 15, 2018 at 4:30 PM, Sinan Kaya wrote: >> On 3/14/2018 9:41 PM, Alexander Duyck wrote: } >>> So you missed the writel in e1000_xmit_frame. You should probably get >>> that one too while you are doing these updates. The wmb() is

Re: [Intel-wired-lan] [PATCH v2 12/15] ice: Add stats and ethtool support

2018-03-15 Thread Alexander Duyck
On Thu, Mar 15, 2018 at 4:52 PM, Stephen Hemminger wrote: > On Thu, 15 Mar 2018 16:47:59 -0700 > Anirudh Venkataramanan wrote: > >> + >> +static const struct ice_stats ice_gstrings_vsi_stats[] = { >> + ICE_VSI_STAT("tx_unicast", eth_stats.tx_unicast), >> + ICE_VSI_STAT("rx_unicast", eth_s

Re: [PATCH net-next v3 0/7] ibmvnic: Update TX pool and TX routines

2018-03-15 Thread Thomas Falcon
On 03/15/2018 11:02 AM, Thomas Falcon wrote: > This patch restructures the TX pool data structure and provides a > separate TX pool array for TSO transmissions. This is already used > in some way due to our unique DMA situation, namely that we cannot > use single DMA mappings for packet data. Previ

Re: WARNING: CPU: 3 PID: 0 at net/sched/sch_hfsc.c:1388 hfsc_dequeue+0x319/0x350 [sch_hfsc]

2018-03-15 Thread Cong Wang
On Wed, Mar 14, 2018 at 1:10 AM, Marco Berizzi wrote: >> Il 9 marzo 2018 alle 0.14 Cong Wang ha scritto: >> >> >> On Thu, Mar 8, 2018 at 8:02 AM, Marco Berizzi wrote: >> >> Marco Berizzi wrote: >> >> >> >> >> >> Hello everyone, >> >> >> >> Yesterday I got this error on a slackware linux 4.16-rc4

Re: [PATCH net] net/sched: act_simple: don't leak 'index' in the error path

2018-03-15 Thread Cong Wang
On Wed, Mar 14, 2018 at 3:43 PM, Davide Caratti wrote: > hello Cong, thank you for reviewing this. > > On Wed, 2018-03-14 at 11:41 -0700, Cong Wang wrote: >> On Tue, Mar 13, 2018 at 7:13 PM, Davide Caratti wrote: >> >> Looks like we just need to replace the tcf_idr_cleanup() with >> tcf_idr_relea

Re: [bpf-next PATCH v2 05/18] bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data

2018-03-15 Thread Daniel Borkmann
On 03/16/2018 12:06 AM, Alexei Starovoitov wrote: > On Thu, Mar 15, 2018 at 11:55:39PM +0100, Daniel Borkmann wrote: >> On 03/15/2018 11:20 PM, Alexei Starovoitov wrote: >>> On Thu, Mar 15, 2018 at 11:17:12PM +0100, Daniel Borkmann wrote: On 03/15/2018 10:59 PM, Alexei Starovoitov wrote: >

Re: [PATCH net-next] net: ethernet: ti: cpsw: enable vlan rx vlan offload

2018-03-15 Thread Andrew Lunn
On Thu, Mar 15, 2018 at 03:15:50PM -0500, Grygorii Strashko wrote: > In VLAN_AWARE mode CPSW can insert VLAN header encapsulation word on Host > port 0 egress (RX) before the packet data if RX_VLAN_ENCAP bit is set in > CPSW_CONTROL register. VLAN header encapsulation word has following format: >

Re: [PATCH 6/7] e1000: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Alexander Duyck
On Thu, Mar 15, 2018 at 4:30 PM, Sinan Kaya wrote: > On 3/14/2018 9:41 PM, Alexander Duyck wrote: >>> } >>> >> So you missed the writel in e1000_xmit_frame. You should probably get >> that one too while you are doing these updates. The wmb() is in >> e1000_tx_queue(). >> > > I brought wmb() outsi

Re: [PATCH v6 0/6] staging: Introduce DPAA2 Ethernet Switch driver

2018-03-15 Thread Andrew Lunn
On Thu, Mar 15, 2018 at 01:56:42PM +0300, Dan Carpenter wrote: > On Thu, Mar 15, 2018 at 12:44:37AM +0100, Andrew Lunn wrote: > > On Wed, Mar 14, 2018 at 10:55:52AM -0500, Razvan Stefanescu wrote: > > > This patchset introduces the Ethernet Switch Driver for Freescale/NXP SoCs > > > with DPAA2 (Dat

Re: [PATCH] mlx5: Remove call to ida_pre_get

2018-03-15 Thread Saeed Mahameed
On Wed, 2018-03-14 at 19:57 -0700, Matthew Wilcox wrote: > From: Matthew Wilcox > > The mlx5 driver calls ida_pre_get() in a loop for no readily apparent > reason. The driver uses ida_simple_get() which will call > ida_pre_get() > by itself and there's no need to use ida_pre_get() unless using >

Re: [PATCH v2 12/15] ice: Add stats and ethtool support

2018-03-15 Thread Stephen Hemminger
On Thu, 15 Mar 2018 16:47:59 -0700 Anirudh Venkataramanan wrote: > + > +static const struct ice_stats ice_gstrings_vsi_stats[] = { > + ICE_VSI_STAT("tx_unicast", eth_stats.tx_unicast), > + ICE_VSI_STAT("rx_unicast", eth_stats.rx_unicast), > + ICE_VSI_STAT("tx_multicast", eth_stats.tx_

[PATCH v2 07/15] ice: Add support for VSI allocation and deallocation

2018-03-15 Thread Anirudh Venkataramanan
This patch introduces data structures and functions to alloc/free VSIs. The driver represents a VSI using the ice_vsi structure. Some noteworthy points about VSI allocation: 1) A VSI is allocated in the firmware using the "add VSI" admin queue command (implemented as ice_aq_add_vsi). The firmw

[PATCH v2 06/15] ice: Initialize PF and setup miscellaneous interrupt

2018-03-15 Thread Anirudh Venkataramanan
This patch continues the initialization flow as follows: 1) Allocate and initialize necessary fields (like vsi, num_alloc_vsi, irq_tracker, etc) in the ice_pf instance. 2) Setup the miscellaneous interrupt handler. This also known as the "other interrupt causes" (OIC) handler and is used to

[PATCH v2 09/15] ice: Configure VSIs for Tx/Rx

2018-03-15 Thread Anirudh Venkataramanan
This patch configures the VSIs to be able to send and receive packets by doing the following: 1) Initialize flexible parser to extract and include certain fields in the Rx descriptor. 2) Add Tx queues by programming the Tx queue context (implemented in ice_vsi_cfg_txqs). Note that adding th

[PATCH v2 05/15] ice: Get MAC/PHY/link info and scheduler topology

2018-03-15 Thread Anirudh Venkataramanan
This patch adds code to continue the initialization flow as follows: 1) Get PHY/link information and store it 2) Get default scheduler tree topology and store it 3) Get the MAC address associated with the port and store it Signed-off-by: Anirudh Venkataramanan --- drivers/net/ethernet/intel/ice

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Kees Cook
On Thu, Mar 15, 2018 at 4:46 PM, Linus Torvalds wrote: > What I'm *not* so much ok with is "const_max(5,sizeof(x))" erroring > out, or silently causing insane behavior due to hidden subtle type > casts.. Yup! I like it as an explicit argument. Thanks! -Kees -- Kees Cook Pixel Security

[PATCH v2 08/15] ice: Add support for switch filter programming

2018-03-15 Thread Anirudh Venkataramanan
A VSI needs traffic directed towards it. This is done by programming filter rules on the switch (embedded vSwitch) element in the hardware, which connects the VSI to the ingress/egress port. This patch introduces data structures and functions necessary to add remove or update switch rules on the s

[PATCH v2 02/15] ice: Add support for control queues

2018-03-15 Thread Anirudh Venkataramanan
A control queue is a hardware interface which is used by the driver to interact with other subsystems (like firmware, PHY, etc.). It is implemented as a producer-consumer ring. More specifically, an "admin queue" is a type of control queue used to interact with the firmware. This patch introduces

[PATCH v2 13/15] ice: Update Tx scheduler tree for VSI multi-Tx queue support

2018-03-15 Thread Anirudh Venkataramanan
This patch adds the ability for a VSI to use multiple Tx queues. More specifically, the patch 1) Provides the ability to update the Tx scheduler tree in the firmware. The driver can configure the Tx scheduler tree by adding/removing multiple Tx queues per TC per VSI. 2) Allow

[PATCH v2 12/15] ice: Add stats and ethtool support

2018-03-15 Thread Anirudh Venkataramanan
This patch implements a watchdog task to get packet statistics from the device. This patch also adds support for the following ethtool operations: ethtool devname ethtool -s devname [msglvl N] [msglevel type on|off] ethtool -g|--show-ring devname ethtool -G|--set-ring devname [rx N] [tx N] ethtoo

[PATCH v2 04/15] ice: Get switch config, scheduler config and device capabilities

2018-03-15 Thread Anirudh Venkataramanan
This patch adds to the initialization flow by getting switch configuration, scheduler configuration and device capabilities. Switch configuration: On boot, an L2 switch element is created in the firmware per physical function. Each physical function is also mapped to a port, to which its switch el

[PATCH v2 03/15] ice: Start hardware initialization

2018-03-15 Thread Anirudh Venkataramanan
This patch implements multiple pieces of the initialization flow as follows: 1) A reset is issued to ensure a clean device state, followed by initialization of admin queue interface. 2) Once the admin queue interface is up, clear the PF config and transition the device to non-PXE mode. 3)

[PATCH v2 14/15] ice: Support link events, reset and rebuild

2018-03-15 Thread Anirudh Venkataramanan
Link events are posted to a PF's admin receive queue (ARQ). This patch adds the ability to detect and process link events. This patch also adds the ability to process resets. The driver can process the following resets: 1) EMP Reset (EMPR) 2) Global Reset (GLOBR) 3) Core Reset (CORER)

[PATCH v2 11/15] ice: Add support for VLANs and offloads

2018-03-15 Thread Anirudh Venkataramanan
This patch adds support for VLANs. When a VLAN is created a switch filter is added to direct the VLAN traffic to the corresponding VSI. When a VLAN is deleted, the filter is deleted as well. This patch also adds support for the following hardware offloads. 1) VLAN tag insertion/stripping 2

[PATCH v2 15/15] ice: Implement filter sync, NDO operations and bump version

2018-03-15 Thread Anirudh Venkataramanan
This patch implements multiple pieces of functionality: 1. Added ice_vsi_sync_filters, which is called through the service task to push filter updates to the hardware. 2. Add support to enable/disable promiscuous mode on an interface. Enabling/disabling promiscuous mode on an interface resu

[PATCH v2 01/15] ice: Add basic driver framework for Intel(R) E800 Series

2018-03-15 Thread Anirudh Venkataramanan
This patch adds a basic driver framework for the Intel(R) E800 Ethernet Series of network devices. There is no functionality right now other than the ability to load. Signed-off-by: Anirudh Venkataramanan --- Documentation/networking/ice.txt| 39 +++ MAINTAINERS

[PATCH v2 10/15] ice: Implement transmit and NAPI support

2018-03-15 Thread Anirudh Venkataramanan
This patch implements ice_start_xmit (the handler for ndo_start_xmit) and related functions. ice_start_xmit ultimately calls ice_tx_map, where the Tx descriptor is built and posted to the hardware by bumping the ring tail. This patch also implements ice_napi_poll, which is invoked when there's an

[PATCH v2 00/15] Add ice driver

2018-03-15 Thread Anirudh Venkataramanan
This patch series adds the ice driver, which will support the Intel(R) E800 Series of network devices. This is the first phase in the release of this driver where we implement basic transmit and receive. The idea behind the multi-phase release is to aid in code review as well as testing. Subsequen

Re: netns: send uevent messages

2018-03-15 Thread Christian Brauner
On Thu, Mar 15, 2018 at 05:14:13PM +0300, Kirill Tkhai wrote: > On 15.03.2018 16:39, Christian Brauner wrote: > > On Thu, Mar 15, 2018 at 12:47:30PM +0300, Kirill Tkhai wrote: > >> CC Andrey Vagin > > > > Hey Kirill, > > > > Thanks for CCing Andrey. > > > >> > >> On 15.03.2018 03:12, Christian B

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Linus Torvalds
On Thu, Mar 15, 2018 at 4:46 PM, Linus Torvalds wrote: > > Well, the explicit typing allows that mixing, in that you can just > have "const_max_t(5,sizeof(x))" I obviously meant "const_max_t(size_t,5,sizeof(x))". Heh. Linus

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Linus Torvalds
On Thu, Mar 15, 2018 at 4:41 PM, Kees Cook wrote: > > I much prefer explicit typing, but both you and Rasmus mentioned > wanting the int/sizeof_t mixing. Well, the explicit typing allows that mixing, in that you can just have "const_max_t(5,sizeof(x))" So I'm ok with that. What I'm *not* so muc

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Kees Cook
On Thu, Mar 15, 2018 at 4:34 PM, Linus Torvalds wrote: > On Thu, Mar 15, 2018 at 3:46 PM, Kees Cook wrote: >> >> So, AIUI, I can either get strict type checking, in which case, this >> is rejected (which I assume there is still a desire to have): >> >> int foo[const_max(6, sizeof(whatever))]; > >

[PATCH v1] netns: send uevent messages

2018-03-15 Thread Christian Brauner
This patch adds a receive method to NETLINK_KOBJECT_UEVENT netlink sockets to allow sending uevent messages into the network namespace the socket belongs to. Currently non-initial network namespaces are already isolated and don't receive uevents. There are a number of cases where it is beneficial

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Linus Torvalds
On Thu, Mar 15, 2018 at 3:46 PM, Kees Cook wrote: > > So, AIUI, I can either get strict type checking, in which case, this > is rejected (which I assume there is still a desire to have): > > int foo[const_max(6, sizeof(whatever))]; Ehh, yes, that looks fairly sane, and erroring out would be annoy

Re: [Intel-wired-lan] [next-queue 4/4] ixgbe: enable tso with ipsec offload

2018-03-15 Thread Shannon Nelson
On 3/15/2018 3:03 PM, Alexander Duyck wrote: On Thu, Mar 15, 2018 at 2:23 PM, Shannon Nelson wrote: Fix things up to support TSO offload in conjunction with IPsec hw offload. This raises throughput with IPsec offload on to nearly line rate. Signed-off-by: Shannon Nelson --- drivers/net/eth

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Kees Cook
On Thu, Mar 15, 2018 at 4:17 PM, Miguel Ojeda wrote: >> The full one, using your naming convention: >> >> #define const_max(x, y) \ >> ({ \ >> if (!__builtin_constant_p(x))

Re: [PATCH 6/7] e1000: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
On 3/14/2018 9:41 PM, Alexander Duyck wrote: >> } >> > So you missed the writel in e1000_xmit_frame. You should probably get > that one too while you are doing these updates. The wmb() is in > e1000_tx_queue(). > I brought wmb() outside along with the next descriptor assignment to be similar to

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Miguel Ojeda
On Fri, Mar 16, 2018 at 12:08 AM, Miguel Ojeda wrote: > On Thu, Mar 15, 2018 at 11:58 PM, Miguel Ojeda > wrote: >> On Thu, Mar 15, 2018 at 11:46 PM, Kees Cook wrote: >>> >>> By using this eye-bleed: >>> >>> size_t __error_not_const_arg(void) \ >>> __compiletime_error("const_max() used with non-c

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Miguel Ojeda
On Thu, Mar 15, 2018 at 11:58 PM, Miguel Ojeda wrote: > On Thu, Mar 15, 2018 at 11:46 PM, Kees Cook wrote: >> >> By using this eye-bleed: >> >> size_t __error_not_const_arg(void) \ >> __compiletime_error("const_max() used with non-compile-time constant arg"); >> size_t __error_not_positive_arg(vo

Announce: Netdev 0x12 Conference

2018-03-15 Thread Jamal Hadi Salim
The NetDev Society is pleased to announce that Netdev 0x12 will take place July 11-13, 2018 in Montreal, Canada. More details here: https://www.netdevconf.org/0x12 For regular updates, please subscribe to peo...@lists.netdevconf.org (more info at: https://lists.netdevconf.org/cgi-bin/mailman/lis

Re: [bpf-next PATCH v2 05/18] bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data

2018-03-15 Thread Alexei Starovoitov
On Thu, Mar 15, 2018 at 11:55:39PM +0100, Daniel Borkmann wrote: > On 03/15/2018 11:20 PM, Alexei Starovoitov wrote: > > On Thu, Mar 15, 2018 at 11:17:12PM +0100, Daniel Borkmann wrote: > >> On 03/15/2018 10:59 PM, Alexei Starovoitov wrote: > >>> On Mon, Mar 12, 2018 at 12:23:29PM -0700, John Fasta

[PATCH net 5/5] net/sched: fix NULL dereference on the error path of tcf_skbmod_init()

2018-03-15 Thread Davide Caratti
when the following command # tc action replace action skbmod swap mac index 100 is run for the first time, and tcf_skbmod_init() fails to allocate struct tcf_skbmod_params, tcf_skbmod_cleanup() calls kfree_rcu(NULL), thus causing the following error: BUG: unable to handle kernel NULL pointer d

[PATCH net 1/5] net/sched: fix NULL dereference in the error path of tcf_vlan_init()

2018-03-15 Thread Davide Caratti
when the following command # tc actions replace action vlan pop index 100 is run for the first time, and tcf_vlan_init() fails allocating struct tcf_vlan_params, tcf_vlan_cleanup() calls kfree_rcu(NULL, ...). This causes the following error: BUG: unable to handle kernel NULL pointer dereferenc

[PATCH net 3/5] net/sched: fix NULL dereference in the error path of tunnel_key_init()

2018-03-15 Thread Davide Caratti
when the following command # tc action add action tunnel_key unset index 100 is run for the first time, and tunnel_key_init() fails to allocate struct tcf_tunnel_key_params, tunnel_key_release() dereferences NULL pointers. This causes the following error: BUG: unable to handle kernel NULL poin

[PATCH net 0/5] net/sched: fix NULL dereference in the error path of .init()

2018-03-15 Thread Davide Caratti
with several TC actions it's possible to see NULL pointer dereference, when the .init() function calls tcf_idr_alloc(), fails at some point and then calls tcf_idr_release(): this series fixes all them introducing non-NULL tests in the .cleanup() function. Davide Caratti (5): net/sched: fix NULL

[PATCH net 4/5] net/sched: fix NULL dereference in the error path of tcf_sample_init()

2018-03-15 Thread Davide Caratti
when the following command # tc action add action sample rate 100 group 100 index 100 is run for the first time, and psample_group_get(100) fails to create a new group, tcf_sample_cleanup() calls psample_group_put(NULL), thus causing the following error: BUG: unable to handle kernel NULL point

[PATCH net 2/5] net/sched: fix NULL dereference in the error path of tcf_csum_init()

2018-03-15 Thread Davide Caratti
when the following command # tc action add action csum udp continue index 100 is run for the first time, and tcf_csum_init() fails allocating struct tcf_csum, tcf_csum_cleanup() calls kfree_rcu(NULL,...). This causes the following error: BUG: unable to handle kernel NULL pointer dereference at

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Miguel Ojeda
On Thu, Mar 15, 2018 at 11:46 PM, Kees Cook wrote: > On Thu, Mar 15, 2018 at 3:23 PM, Linus Torvalds > wrote: >> On Thu, Mar 15, 2018 at 3:16 PM, Kees Cook wrote: >>> >>> size_t __error_not_const_arg(void) \ >>> __compiletime_error("const_max() used with non-compile-time constant arg"); >>> #def

Re: [bpf-next PATCH v2 05/18] bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data

2018-03-15 Thread Daniel Borkmann
On 03/15/2018 11:20 PM, Alexei Starovoitov wrote: > On Thu, Mar 15, 2018 at 11:17:12PM +0100, Daniel Borkmann wrote: >> On 03/15/2018 10:59 PM, Alexei Starovoitov wrote: >>> On Mon, Mar 12, 2018 at 12:23:29PM -0700, John Fastabend wrote: +/* User return codes for SK_MSG prog type. */ >>

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Kees Cook
On Thu, Mar 15, 2018 at 3:23 PM, Linus Torvalds wrote: > On Thu, Mar 15, 2018 at 3:16 PM, Kees Cook wrote: >> >> size_t __error_not_const_arg(void) \ >> __compiletime_error("const_max() used with non-compile-time constant arg"); >> #define const_max(x, y) \

Re: [bug, bisected] pfifo_fast causes packet reordering

2018-03-15 Thread John Fastabend
On 03/15/2018 11:08 AM, Jakob Unterwurzacher wrote: > On 14.03.18 05:03, John Fastabend wrote: >> On 03/13/2018 11:35 AM, Dave Taht wrote: >>> On Tue, Mar 13, 2018 at 11:24 AM, Jakob Unterwurzacher >>> wrote: During stress-testing our "ucan" USB/CAN adapter SocketCAN driver on Linux v4.1

Re: [PATCH 3/7] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Jason Gunthorpe
On Tue, Mar 13, 2018 at 11:20:24PM -0400, Sinan Kaya wrote: > Code includes wmb() followed by writel() in multiple places. writel() > already has a barrier on some architectures like arm64. > > This ends up CPU observing two barriers back to back before executing the > register write. > > Since c

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Linus Torvalds
On Thu, Mar 15, 2018 at 3:16 PM, Kees Cook wrote: > > size_t __error_not_const_arg(void) \ > __compiletime_error("const_max() used with non-compile-time constant arg"); > #define const_max(x, y) \ > __builtin_choose_expr(__builtin_constant_p(x) &&

Re: [PATCH net] net/sched: fix NULL dereference in the error path of tcf_vlan_init()

2018-03-15 Thread Davide Caratti
On Thu, 2018-03-15 at 15:29 +0100, Davide Caratti wrote: > On Thu, 2018-03-15 at 15:21 +0100, Jiri Pirko wrote: > ... > > > Acked-by: Jiri Pirko > > thank you for reviewing! > > apparently, also act_tunnel_key seem and act_csum have a similar problem. > I will check and eventually do a followup

Re: [bpf-next PATCH v2 05/18] bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data

2018-03-15 Thread Alexei Starovoitov
On Thu, Mar 15, 2018 at 11:17:12PM +0100, Daniel Borkmann wrote: > On 03/15/2018 10:59 PM, Alexei Starovoitov wrote: > > On Mon, Mar 12, 2018 at 12:23:29PM -0700, John Fastabend wrote: > >> > >> +/* User return codes for SK_MSG prog type. */ > >> +enum sk_msg_action { > >> + SK_MSG_DROP = 0, > >

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Kees Cook
On Thu, Mar 15, 2018 at 2:42 PM, Linus Torvalds wrote: > On Thu, Mar 15, 2018 at 12:47 PM, Kees Cook wrote: >> >> To gain the ability to compare differing types, the arguments are >> explicitly cast to size_t. > > Ugh, I really hate this. > > It silently does insane things if you do > >const_

Re: [bpf-next PATCH v2 05/18] bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data

2018-03-15 Thread Daniel Borkmann
On 03/15/2018 10:59 PM, Alexei Starovoitov wrote: > On Mon, Mar 12, 2018 at 12:23:29PM -0700, John Fastabend wrote: >> >> +/* User return codes for SK_MSG prog type. */ >> +enum sk_msg_action { >> +SK_MSG_DROP = 0, >> +SK_MSG_PASS, >> +}; > > do we really need new enum here? > It's the s

Re: [bpf-next PATCH v2 05/18] bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data

2018-03-15 Thread John Fastabend
On 03/15/2018 02:59 PM, Alexei Starovoitov wrote: > On Mon, Mar 12, 2018 at 12:23:29PM -0700, John Fastabend wrote: >> >> +/* User return codes for SK_MSG prog type. */ >> +enum sk_msg_action { >> +SK_MSG_DROP = 0, >> +SK_MSG_PASS, >> +}; > > do we really need new enum here? Nope and as

Re: [bpf-next PATCH v2 15/18] bpf: sockmap sample support for bpf_msg_cork_bytes()

2018-03-15 Thread John Fastabend
On 03/15/2018 01:15 PM, Alexei Starovoitov wrote: > On Mon, Mar 12, 2018 at 12:24:21PM -0700, John Fastabend wrote: >> Add sample application support for the bpf_msg_cork_bytes helper. This >> lets the user specify how many bytes each verdict should apply to. >> >> Similar to apply_bytes() tests th

  1   2   3   4   >