Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-23 Thread Cong Wang
On Thu, Dec 22, 2016 at 4:26 PM, Daniel Borkmann wrote: > On 12/22/2016 08:05 PM, Cong Wang wrote: >> >> On Wed, Dec 21, 2016 at 1:07 PM, Daniel Borkmann >> wrote: >>> >>> >>> Ok, you mean for net. In that case I prefer the smaller sized fix to be >>> honest. It also covers everything from the po

Re: [PATCH v3 3/3] nfc: trf7970a: Prevent repeated polling from crashing the kernel

2016-12-23 Thread Mark Greer
On Wed, Dec 21, 2016 at 11:18:34PM -0500, Geoff Lansberry wrote: > From: Jaret Cantu > > Repeated polling attempts cause a NULL dereference error to occur. > This is because the state of the trf7970a is currently reading but > another request has been made to send a command before it has finished

[PATCH v2] scsi: bfa: Increase requested firmware version to 3.2.5.1

2016-12-23 Thread Benjamin Poirier
bna & bfa firmware version 3.2.5.1 was submitted to linux-firmware on Feb 17 19:10:20 2015 -0500 in 0ab54ff1dc ("linux-firmware: Add QLogic BR Series Adapter Firmware"). bna was updated to use the newer firmware on Feb 19 16:02:32 2015 -0500 in 3f307c3d70 ("bna: Update the Driver and Firmware Vers

[PATCH net] net: korina: Fix NAPI versus resources freeing

2016-12-23 Thread Florian Fainelli
Commit beb0babfb77e ("korina: disable napi on close and restart") introduced calls to napi_disable() that were missing before, unfortunately this leaves a small window during which NAPI has a chance to run, yet we just freed resources since korina_free_ring() has been called: Fix this by disabling

Re: [RFC PATCH 4.10 1/6] crypto/sha256: Refactor the API so it can be used without shash

2016-12-23 Thread Andy Lutomirski
On Fri, Dec 23, 2016 at 6:22 PM, Andy Lutomirski wrote: > There are some pieecs of kernel code that want to compute SHA256 > directly without going through the crypto core. Adjust the exported > API to decouple it from the crypto core. > > I suspect this will very slightly speed up the SHA256 sha

[RFC PATCH 4.10 3/6] bpf: Use SHA256 instead of SHA1 for bpf digests

2016-12-23 Thread Andy Lutomirski
BPF digests are intended to be used to avoid reloading programs that are already loaded. For use cases (CRIU?) where untrusted programs are involved, intentional hash collisions could cause the wrong BPF program to execute. Additionally, if BPF digests are ever used in-kernel to skip verification

[RFC PATCH 4.10 2/6] crypto/sha256: Make the sha256 library functions selectable

2016-12-23 Thread Andy Lutomirski
This will let other kernel code call into sha256_init(), etc. without pulling in the core crypto code. Signed-off-by: Andy Lutomirski --- crypto/Kconfig | 8 crypto/Makefile | 2 +- crypto/sha256_generic.c | 4 include/crypto/sha.h| 4 4 files changed, 17

[RFC PATCH 4.10 1/6] crypto/sha256: Refactor the API so it can be used without shash

2016-12-23 Thread Andy Lutomirski
There are some pieecs of kernel code that want to compute SHA256 directly without going through the crypto core. Adjust the exported API to decouple it from the crypto core. I suspect this will very slightly speed up the SHA256 shash operations as well by reducing the amount of indirection involv

[RFC PATCH 4.10 0/6] Switch BPF's digest to SHA256

2016-12-23 Thread Andy Lutomirski
Since there are plenty of uses for the new-in-4.10 BPF digest feature that would be problematic if malicious users could produce collisions, the BPF digest should be collision-resistant. SHA-1 is no longer considered collision-resistant, so switch it to SHA-256. The actual switchover is trivial.

[RFC PATCH 4.10 5/6] bpf: Rename fdinfo's prog_digest to prog_sha256

2016-12-23 Thread Andy Lutomirski
This makes it easier to add another digest algorithm down the road if needed. It also serves to force any programs that might have been written against a kernel that had 'prog_digest' to be updated. This shouldn't violate any stable API policies, as no released kernel has ever had 'prog_digest'.

[RFC PATCH 4.10 4/6] bpf: Avoid copying the entire BPF program when hashing it

2016-12-23 Thread Andy Lutomirski
The sha256 helpers can consume a message incrementally, so there's no need to allocate a buffer to store the whole blob to be hashed. This may be a slight slowdown for very long messages because gcc can't inline the sha256_update() calls. For reasonably-sized programs, however, this should be a c

[RFC PATCH 4.10 6/6] net: Rename TCA*BPF_DIGEST to ..._SHA256

2016-12-23 Thread Andy Lutomirski
This makes it easier to add another digest algorithm down the road if needed. It also serves to force any programs that might have been written against a kernel that had the old field name to notice the change and make any necessary changes. This shouldn't violate any stable API policies, as no r

Re: [PATCH] drivers: net: ethernet: 3com: fix return value

2016-12-23 Thread David Dillow
On Sat, 2016-12-24 at 00:00 +0100, Thomas Preisner wrote: > diff --git a/drivers/net/ethernet/3com/typhoon.c > b/drivers/net/ethernet/3com/typhoon.c > index a0cacbe..9a3ab58 100644 > --- a/drivers/net/ethernet/3com/typhoon.c > +++ b/drivers/net/ethernet/3com/typhoon.c > @@ -2404,6 +2404,7 @@ typho

Re: George's crazy full state idea (Re: HalfSipHash Acceptable Usage)

2016-12-23 Thread George Spelvin
Hannes Frederic Sowa wrote: > On 24.12.2016 00:39, George Spelvin wrote: >> We just finished discussing why 8 bytes isn't enough. If you only >> feed back 8 bytes, an attacker who can do 2^64 computation can find it >> (by guessing and computing forward to verify the guess) and recover the >> prev

RE: [PATCH] scsi: bfa: Increase requested firmware version to 3.2.5.1

2016-12-23 Thread Mody, Rasesh
> From: Benjamin Poirier [mailto:benjamin.poir...@gmail.com] On Behalf Of > Benjamin Poirier > Sent: Friday, December 23, 2016 2:01 PM > > bna & bfa firmware version 3.2.5.1 was submitted to linux-firmware on Tue > Feb 17 19:10:20 2015 -0500 in 0ab54ff1dc ("linux-firmware: Add QLogic BR > Series A

Re: George's crazy full state idea (Re: HalfSipHash Acceptable Usage)

2016-12-23 Thread Hannes Frederic Sowa
Hi, On 24.12.2016 00:39, George Spelvin wrote: > Hannes Frederic Sowa wrote: >> In general this looks good, but bitbuffer needs to be protected from >> concurrent access, thus needing at least some atomic instruction and >> disabling of interrupts for the locking if done outside of >> get_random_l

Re: George's crazy full state idea (Re: HalfSipHash Acceptable Usage)

2016-12-23 Thread George Spelvin
Hannes Frederic Sowa wrote: > In general this looks good, but bitbuffer needs to be protected from > concurrent access, thus needing at least some atomic instruction and > disabling of interrupts for the locking if done outside of > get_random_long. Thus I liked your previous approach more where yo

[PATCH] drivers: net: ethernet: 3com: fix return value

2016-12-23 Thread Thomas Preisner
In a few cases the err-variable is not set to a negative error code if a function call fails and thus 0 is returned instead. It may be better to set err to the proper negative error code before returning. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188841 Reported-by: Pan Bian Signed-o

[PATCH] scsi: bfa: Increase requested firmware version to 3.2.5.1

2016-12-23 Thread Benjamin Poirier
bna & bfa firmware version 3.2.5.1 was submitted to linux-firmware on Tue Feb 17 19:10:20 2015 -0500 in 0ab54ff1dc ("linux-firmware: Add QLogic BR Series Adapter Firmware"). bna was updated to use the newer firmware on Thu, 19 Feb 2015 16:02:32 -0500 in 3f307c3d70 ("bna: Update the Driver and Firm

[PATCH RFC net-next 1/5] qed: Add support for hardware offloaded FCoE.

2016-12-23 Thread Dupuis, Chad
From: Arun Easi This adds the backbone required for the various HW initalizations which are necessary for the FCoE driver (qedf) for QLogic FastLinQ 4 line of adapters - FW notification, resource initializations, etc. Signed-off-by: Arun Easi Signed-off-by: Yuval Mintz --- drivers/net/eth

[PATCH RFC 5/5] qedf: Add FIP request handling

2016-12-23 Thread Dupuis, Chad
From: "Dupuis, Chad" This patch adds handling for FIP requests and responses that are handled by the driver itself and not by libfcoe. Signed-off-by: Nilesh Javali Signed-off-by: Manish Rangankar Signed-off-by: Saurav Kashyap Signed-off-by: Chad Dupuis --- drivers/scsi/qedf/qedf_fip.c | 267

Re: [RFC PATCH] virtio_net: XDP support for adjust_head

2016-12-23 Thread John Fastabend
On 16-12-23 10:43 AM, John Fastabend wrote: > Add support for XDP adjust head by allocating a 256B header region > that XDP programs can grow into. This is only enabled when a XDP > program is loaded. > > In order to ensure that we do not have to unwind queue headroom push > queue setup below bpf_

Re: BPF hash algo (Re: [kernel-hardening] Re: [PATCH v7 3/6] random: use SipHash in place of MD5)

2016-12-23 Thread Jason A. Donenfeld
On Fri, Dec 23, 2016 at 7:19 PM, Hannes Frederic Sowa wrote: > Factoring out sha3 Per the other thread, you probably don't actually want SHA3, because it's slow in software. You want SHA2. If you want something faster and better, then Blake2 is most certainly the way to go. I'll be submitting som

Re: George's crazy full state idea (Re: HalfSipHash Acceptable Usage)

2016-12-23 Thread Hannes Frederic Sowa
Hi, On Fri, 2016-12-23 at 13:26 -0500, George Spelvin wrote: > (Cc: list trimmed slightly as the topic is wandering a bit.) > > Hannes Frederic Sowa wrote: > > On Thu, 2016-12-22 at 19:07 -0500, George Spelvin wrote: > > > Adding might_lock() annotations will improve coverage a lot. > > > > Migh

Re: [PATCH] brcmfmac: fix spelling mistakes on "Ivalid"

2016-12-23 Thread Arend Van Spriel
On 23-12-2016 1:43, Colin King wrote: > From: Colin Ian King > > Trivial fixes to spelling mistake "Ivalid" to "Invalid" in > brcmf_err error messages. Acked-by: Arend van Spriel > Signed-off-by: Colin Ian King > --- > drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 ++-- > 1

[PATCH RFC 0/5] Add QLogic FastLinQ FCoE (qedf) driver

2016-12-23 Thread Dupuis, Chad
From: "Dupuis, Chad" This series introduces the hardware offload FCoE initiator driver for the 41000 Series Converged Network Adapters (579xx chip) by QLogic. The overall driver design includes a common module ('qed') and protocol specific dependent modules ('qedf' for FCoE). This driver uses th

Re: [PATCH net 1/9] virtio-net: remove the warning before XDP linearizing

2016-12-23 Thread Daniel Borkmann
Hi Jason, On 12/23/2016 03:37 PM, Jason Wang wrote: Since we use EWMA to estimate the size of rx buffer. When rx buffer size is underestimated, it's usual to have a packet with more than one buffers. Consider this is not a bug, remove the warning and correct the comment before XDP linearizing.

[GIT] Networking

2016-12-23 Thread David Miller
1) We have to be careful to not try and place a checksum after the end of a rawv6 packet, fix from Dave Jones with help from Hannes Frederic Sowa. 2) Missing memory barriers in tcp_tasklet_func() lead to crashes, from Eric Dumazet. 3) Several bug fixes for the new XDP support in virtio_

[PATCH RFC 3/5] qedf: Add offloaded I/O request functions.

2016-12-23 Thread Dupuis, Chad
From: "Dupuis, Chad" This patch adds various I/O requests types that are handled in firmware: - Normal I/O requests - ABTS requests - Cleanup requests - Task management requests It also contains: - I/O request initialization - Firmware completion handling Signed-off-by: Nilesh Javali Signed-

[PATCH RFC 4/5] qedf: Add offload ELS request handling.

2016-12-23 Thread Dupuis, Chad
From: "Dupuis, Chad" This patch adds support for ELS requests that are handled by the firmware for offloaded sessions. Signed-off-by: Nilesh Javali Signed-off-by: Manish Rangankar Signed-off-by: Saurav Kashyap Signed-off-by: Chad Dupuis --- drivers/scsi/qedf/qedf_els.c | 984 +++

[PATCH] net: Use kmemdup instead of kmalloc and memcpy

2016-12-23 Thread Shyam Saini
when some other buffer is immediately copied into allocated region. Replace calls to kmalloc followed by a memcpy with a direct call to kmemdup. Signed-off-by: Shyam Saini --- drivers/net/virtio_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c

Re: [PATCH net] sctp: fix recovering from 0 win with small data chunks

2016-12-23 Thread David Miller
From: Marcelo Ricardo Leitner Date: Fri, 23 Dec 2016 14:29:37 -0200 > Currently if SCTP closes the receive window with window pressure, mostly > caused by excessive skb overhead on payload/overheads ratio, SCTP will > close the window abruptly while saving the delta on rwnd_press. It will > start

Re: [PATCH net] sctp: do not loose window information if in rwnd_over

2016-12-23 Thread David Miller
From: Marcelo Ricardo Leitner Date: Fri, 23 Dec 2016 14:29:02 -0200 > It's possible that we receive a packet that is larger than current > window. If it's the first packet in this way, it will cause it to > increase rwnd_over. Then, if we receive another data chunk (specially as > SCTP allows you

Re: [PATCH 6/6 net-next] inet: reset tb->fastreuseport when adding a reuseport sk

2016-12-23 Thread David Miller
From: Josef Bacik Date: Thu, 22 Dec 2016 16:26:38 -0500 > @@ -74,12 +74,16 @@ struct inet_ehash_bucket { > * users logged onto your box, isn't it nice to know that new data > * ports are created in O(1) time? I thought so. ;-)-DaveM > */ > +#define FASTREUSEPORT_ANY1 > +#define

Re: [PATCH 4/6 net-next] inet: don't check for bind conflicts twice when searching for a port

2016-12-23 Thread David Miller
From: Josef Bacik Date: Thu, 22 Dec 2016 16:26:36 -0500 > This is just wasted time, we've already found a tb that doesn't have a bind > conflict, and we don't drop the head lock so scanning again isn't going to > give > us a different answer. Instead move the tb->reuse setting logic outside of

Re: [PATCH net 0/9] several fixups for virtio-net XDP

2016-12-23 Thread David Miller
From: Jason Wang Date: Fri, 23 Dec 2016 22:37:23 +0800 > Merry Xmas and a Happy New year to all: > > This series tries to fixes several issues for virtio-net XDP which > could be categorized into several parts: > > - fix several issues during XDP linearizing > - allow csumed packet to work for

Re: [PATCH net] virtio_net: reject XDP programs using header adjustment

2016-12-23 Thread John Fastabend
On 16-12-20 04:30 AM, Jakub Kicinski wrote: > On Mon, Dec 19, 2016 at 5:50 PM, John Fastabend > wrote: >> On 16-12-19 07:05 AM, Jakub Kicinski wrote: >>> commit 17bedab27231 ("bpf: xdp: Allow head adjustment in XDP prog") >>> added a new XDP helper to prepend and remove data from a frame. >>> Make

[RFC PATCH] virtio_net: XDP support for adjust_head

2016-12-23 Thread John Fastabend
Add support for XDP adjust head by allocating a 256B header region that XDP programs can grow into. This is only enabled when a XDP program is loaded. In order to ensure that we do not have to unwind queue headroom push queue setup below bpf_prog_add. It reads better to do a prog ref unwind vs ano

Re: George's crazy full state idea (Re: HalfSipHash Acceptable Usage)

2016-12-23 Thread George Spelvin
(Cc: list trimmed slightly as the topic is wandering a bit.) Hannes Frederic Sowa wrote: > On Thu, 2016-12-22 at 19:07 -0500, George Spelvin wrote: >> Adding might_lock() annotations will improve coverage a lot. > > Might be hard to find the correct lock we take later down the code > path, but if

Re: BPF hash algo (Re: [kernel-hardening] Re: [PATCH v7 3/6] random: use SipHash in place of MD5)

2016-12-23 Thread Hannes Frederic Sowa
On 23.12.2016 17:42, Andy Lutomirski wrote: > On Fri, Dec 23, 2016 at 8:23 AM, Andy Lutomirski wrote: >> On Fri, Dec 23, 2016 at 3:59 AM, Daniel Borkmann >> wrote: >>> On 12/23/2016 11:59 AM, Hannes Frederic Sowa wrote: On Fri, 2016-12-23 at 11:04 +0100, Daniel Borkmann wrote: > >>

Re: [net/mm PATCH v2 0/3] Page fragment updates

2016-12-23 Thread David Miller
From: Alexander Duyck Date: Fri, 23 Dec 2016 09:16:39 -0800 > I tried to get in touch with Andrew about this fix but I haven't heard any > reply to the email I sent out on Tuesday. The last comment I had from > Andrew against v1 was "Looks good to me. I have it all queued for post-4.9 > process

Re: [patch net 0/3] mlxsw: Router fixes

2016-12-23 Thread David Miller
From: Jiri Pirko Date: Fri, 23 Dec 2016 09:32:47 +0100 > From: Jiri Pirko > > Ido says: > > First two patches ensure we remove from the device's table neighbours > that are considered to be dead by the neighbour core. > > The last patch removes nexthop groups from the device when they are no

Re: ipv6: handle -EFAULT from skb_copy_bits

2016-12-23 Thread David Miller
From: Dave Jones Date: Thu, 22 Dec 2016 11:16:22 -0500 > By setting certain socket options on ipv6 raw sockets, we can confuse the > length calculation in rawv6_push_pending_frames triggering a BUG_ON. ... > Signed-off-by: Dave Jones Applied and queued up for -stable, thanks Dave.

Re: [PATCH net] inet: fix IP(V6)_RECVORIGDSTADDR for udp sockets

2016-12-23 Thread David Miller
From: Willem de Bruijn Date: Thu, 22 Dec 2016 18:19:16 -0500 > From: Willem de Bruijn > > Socket cmsg IP(V6)_RECVORIGDSTADDR checks that port range lies within > the packet. For sockets that have transport headers pulled, transport > offset can be negative. Use signed comparison to avoid overfl

[net/mm PATCH v2 2/3] mm: Rename __page_frag functions to __page_frag_cache, drop order from drain

2016-12-23 Thread Alexander Duyck
From: Alexander Duyck This patch does two things. First it goes through and renames the __page_frag prefixed functions to __page_frag_cache so that we can be clear that we are draining or refilling the cache, not the frags themselves. Second we drop the order parameter from __page_frag_cache_dr

[net/mm PATCH v2 3/3] mm: Add documentation for page fragment APIs

2016-12-23 Thread Alexander Duyck
From: Alexander Duyck This is a first pass at trying to add documentation for the page_frag APIs. They may still change over time but for now I thought I would try to get these documented so that as more network drivers and stack calls make use of them we have one central spot to document how the

[net/mm PATCH v2 1/3] mm: Rename __alloc_page_frag to page_frag_alloc and __free_page_frag to page_frag_free

2016-12-23 Thread Alexander Duyck
From: Alexander Duyck This patch renames the page frag functions to be more consistent with other APIs. Specifically we place the name page_frag first in the name and then have either an alloc or free call name that we append as the suffix. This makes it a bit clearer in terms of naming. In ad

[net/mm PATCH v2 0/3] Page fragment updates

2016-12-23 Thread Alexander Duyck
This patch series takes care of a few cleanups for the page fragments API. First we do some renames so that things are much more consistent. First we move the page_frag_ portion of the name to the front of the functions names. Secondly we split out the cache specific functions from the other pag

Re: [PATCH net 0/9] several fixups for virtio-net XDP

2016-12-23 Thread John Fastabend
On 16-12-23 06:37 AM, Jason Wang wrote: > Merry Xmas and a Happy New year to all: > > This series tries to fixes several issues for virtio-net XDP which > could be categorized into several parts: > > - fix several issues during XDP linearizing > - allow csumed packet to work for XDP_PASS > - make

Re: [PATCH net 0/2] net/sched fixes for cls_flower and act_tunnel_key

2016-12-23 Thread David Miller
From: Or Gerlitz Date: Thu, 22 Dec 2016 14:28:13 +0200 > This small series contain a fix to the matching flags support > in flower and to the tunnel key action MD prep for IPv6. Series applied, thanks. > On a non related note, wishing everyone around here a happy new year, > celebrate and tak

Re: [PATCH net 9/9] virtio-net: XDP support for small buffers

2016-12-23 Thread John Fastabend
On 16-12-23 06:37 AM, Jason Wang wrote: > Commit f600b6905015 ("virtio_net: Add XDP support") leaves the case of > small receive buffer untouched. This will confuse the user who want to > set XDP but use small buffers. Other than forbid XDP in small buffer > mode, let's make it work. XDP then can o

Re: [PATCH v3] stmmac: CSR clock configuration fix

2016-12-23 Thread David Miller
From: Joao Pinto Date: Fri, 23 Dec 2016 10:15:59 + > When testing stmmac with my QoS reference design I checked a problem in the > CSR clock configuration that was impossibilitating the phy discovery, since > every read operation returned 0x. This patch fixes the issue. > > Signed-of

Re: BPF hash algo (Re: [kernel-hardening] Re: [PATCH v7 3/6] random: use SipHash in place of MD5)

2016-12-23 Thread Andy Lutomirski
On Fri, Dec 23, 2016 at 8:23 AM, Andy Lutomirski wrote: > On Fri, Dec 23, 2016 at 3:59 AM, Daniel Borkmann wrote: >> On 12/23/2016 11:59 AM, Hannes Frederic Sowa wrote: >>> >>> On Fri, 2016-12-23 at 11:04 +0100, Daniel Borkmann wrote: On 12/22/2016 05:59 PM, Hannes Frederic Sowa wrote:

[PATCH net] sctp: fix recovering from 0 win with small data chunks

2016-12-23 Thread Marcelo Ricardo Leitner
Currently if SCTP closes the receive window with window pressure, mostly caused by excessive skb overhead on payload/overheads ratio, SCTP will close the window abruptly while saving the delta on rwnd_press. It will start recovering rwnd as the chunks are consumed by the application and the rwnd_pr

[PATCH net] sctp: do not loose window information if in rwnd_over

2016-12-23 Thread Marcelo Ricardo Leitner
It's possible that we receive a packet that is larger than current window. If it's the first packet in this way, it will cause it to increase rwnd_over. Then, if we receive another data chunk (specially as SCTP allows you to have one data chunk in flight even during 0 window), rwnd_over will be ove

Re: BPF hash algo (Re: [kernel-hardening] Re: [PATCH v7 3/6] random: use SipHash in place of MD5)

2016-12-23 Thread Andy Lutomirski
On Fri, Dec 23, 2016 at 3:59 AM, Daniel Borkmann wrote: > On 12/23/2016 11:59 AM, Hannes Frederic Sowa wrote: >> >> On Fri, 2016-12-23 at 11:04 +0100, Daniel Borkmann wrote: >>> >>> On 12/22/2016 05:59 PM, Hannes Frederic Sowa wrote: On Thu, 2016-12-22 at 08:07 -0800, Andy Lutomirski wro

Re: [PATCH net 7/9] virtio-net: forbid XDP when VIRTIO_NET_F_GUEST_UFO is support

2016-12-23 Thread John Fastabend
On 16-12-23 08:02 AM, John Fastabend wrote: > On 16-12-23 06:37 AM, Jason Wang wrote: >> When VIRTIO_NET_F_GUEST_UFO is negotiated, host could still send UFO >> packet that exceeds a single page which could not be handled >> correctly by XDP. So this patch forbids setting XDP when GUEST_UFO is >> s

Re: [PATCH net 7/9] virtio-net: forbid XDP when VIRTIO_NET_F_GUEST_UFO is support

2016-12-23 Thread John Fastabend
On 16-12-23 06:37 AM, Jason Wang wrote: > When VIRTIO_NET_F_GUEST_UFO is negotiated, host could still send UFO > packet that exceeds a single page which could not be handled > correctly by XDP. So this patch forbids setting XDP when GUEST_UFO is > supported. While at it, forbid XDP for ECN (which c

Re: [PATCH net 6/9] virtio-net: make rx buf size estimation works for XDP

2016-12-23 Thread John Fastabend
On 16-12-23 06:37 AM, Jason Wang wrote: > We don't update ewma rx buf size in the case of XDP. This will lead > underestimation of rx buf size which causes host to produce more than > one buffers. This will greatly increase the possibility of XDP page > linearization. > > Cc: John Fastabend > Sig

Re: [PATCH net 5/9] virtio-net: unbreak csumed packets for XDP_PASS

2016-12-23 Thread John Fastabend
On 16-12-23 06:37 AM, Jason Wang wrote: > We drop csumed packet when do XDP for packets. This breaks > XDP_PASS when GUEST_CSUM is supported. Fix this by allowing csum flag > to be set. With this patch, simple TCP works for XDP_PASS. > > Cc: John Fastabend > Signed-off-by: Jason Wang > --- > dr

Re: [PATCH net 4/9] virtio-net: correctly handle XDP_PASS for linearized packets

2016-12-23 Thread John Fastabend
On 16-12-23 06:37 AM, Jason Wang wrote: > When XDP_PASS were determined for linearized packets, we try to get > new buffers in the virtqueue and build skbs from them. This is wrong, > we should create skbs based on existed buffers instead. Fixing them by > creating skb based on xdp_page. > > With

Re: [PATCH net 3/9] virtio-net: fix page miscount during XDP linearizing

2016-12-23 Thread John Fastabend
On 16-12-23 06:37 AM, Jason Wang wrote: > We don't put page during linearizing, the would cause leaking when > xmit through XDP_TX or the packet exceeds PAGE_SIZE. Fix them by > put page accordingly. Also decrease the number of buffers during > linearizing to make sure caller can free buffers corre

Re: [PATCH] ethtool: add one ethtool option to set relax ordering mode

2016-12-23 Thread Alexander Duyck
On Thu, Dec 22, 2016 at 10:14 PM, maowenan wrote: > > >> -Original Message- >> From: Jeff Kirsher [mailto:jeffrey.t.kirs...@intel.com] >> Sent: Friday, December 23, 2016 9:07 AM >> To: maowenan; Alexander Duyck >> Cc: Stephen Hemminger; netdev@vger.kernel.org; weiyongjun (A); >> Dingtianho

Re: [PATCH net 2/9] virtio-net: correctly xmit linearized page on XDP_TX

2016-12-23 Thread John Fastabend
On 16-12-23 06:37 AM, Jason Wang wrote: > After we linearize page, we should xmit this page instead of the page > of first buffer which may lead unexpected result. With this patch, we > can see correct packet during XDP_TX. > > Cc: John Fastabend > Signed-off-by: Jason Wang > --- > drivers/net/

[PATCH] vif queue counters from int to long

2016-12-23 Thread Mart van Santen
Hello, This patch fixes an issue where counters in the queue have type int, while the counters of the vif itself are specified as long. This can cause incorrect reporting of tx/rx values of the vif interface. More extensively reported on xen-devel mailinglist. Signed-off-by: Mart van Santen -

[PATCH net 5/9] virtio-net: unbreak csumed packets for XDP_PASS

2016-12-23 Thread Jason Wang
We drop csumed packet when do XDP for packets. This breaks XDP_PASS when GUEST_CSUM is supported. Fix this by allowing csum flag to be set. With this patch, simple TCP works for XDP_PASS. Cc: John Fastabend Signed-off-by: Jason Wang --- drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 inser

[PATCH net 8/9] virtio-net: remove big packet XDP codes

2016-12-23 Thread Jason Wang
Now we in fact don't allow XDP for big packets, remove its codes. Cc: John Fastabend Signed-off-by: Jason Wang --- drivers/net/virtio_net.c | 44 +++- 1 file changed, 3 insertions(+), 41 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/vi

[PATCH net 7/9] virtio-net: forbid XDP when VIRTIO_NET_F_GUEST_UFO is support

2016-12-23 Thread Jason Wang
When VIRTIO_NET_F_GUEST_UFO is negotiated, host could still send UFO packet that exceeds a single page which could not be handled correctly by XDP. So this patch forbids setting XDP when GUEST_UFO is supported. While at it, forbid XDP for ECN (which comes only from GRO) too to prevent user from mis

[PATCH net 1/9] virtio-net: remove the warning before XDP linearizing

2016-12-23 Thread Jason Wang
Since we use EWMA to estimate the size of rx buffer. When rx buffer size is underestimated, it's usual to have a packet with more than one buffers. Consider this is not a bug, remove the warning and correct the comment before XDP linearizing. Cc: John Fastabend Signed-off-by: Jason Wang --- dri

[PATCH net 6/9] virtio-net: make rx buf size estimation works for XDP

2016-12-23 Thread Jason Wang
We don't update ewma rx buf size in the case of XDP. This will lead underestimation of rx buf size which causes host to produce more than one buffers. This will greatly increase the possibility of XDP page linearization. Cc: John Fastabend Signed-off-by: Jason Wang --- drivers/net/virtio_net.c

[PATCH net 9/9] virtio-net: XDP support for small buffers

2016-12-23 Thread Jason Wang
Commit f600b6905015 ("virtio_net: Add XDP support") leaves the case of small receive buffer untouched. This will confuse the user who want to set XDP but use small buffers. Other than forbid XDP in small buffer mode, let's make it work. XDP then can only work at skb->data since virtio-net create sk

[PATCH net 3/9] virtio-net: fix page miscount during XDP linearizing

2016-12-23 Thread Jason Wang
We don't put page during linearizing, the would cause leaking when xmit through XDP_TX or the packet exceeds PAGE_SIZE. Fix them by put page accordingly. Also decrease the number of buffers during linearizing to make sure caller can free buffers correctly when packet exceeds PAGE_SIZE. With this pa

[PATCH net 4/9] virtio-net: correctly handle XDP_PASS for linearized packets

2016-12-23 Thread Jason Wang
When XDP_PASS were determined for linearized packets, we try to get new buffers in the virtqueue and build skbs from them. This is wrong, we should create skbs based on existed buffers instead. Fixing them by creating skb based on xdp_page. With this patch "ping 192.168.100.4 -s 3900 -M do" works

[PATCH net 2/9] virtio-net: correctly xmit linearized page on XDP_TX

2016-12-23 Thread Jason Wang
After we linearize page, we should xmit this page instead of the page of first buffer which may lead unexpected result. With this patch, we can see correct packet during XDP_TX. Cc: John Fastabend Signed-off-by: Jason Wang --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 d

[PATCH net 0/9] several fixups for virtio-net XDP

2016-12-23 Thread Jason Wang
Merry Xmas and a Happy New year to all: This series tries to fixes several issues for virtio-net XDP which could be categorized into several parts: - fix several issues during XDP linearizing - allow csumed packet to work for XDP_PASS - make EWMA rxbuf size estimation works for XDP - forbid XDP w

Re: [PATCHv2 net] netfilter: check duplicate config when initializing in ipt_CLUSTERIP

2016-12-23 Thread Pablo Neira Ayuso
On Tue, Dec 20, 2016 at 07:14:34PM +0800, Xin Long wrote: > Now when adding an ipt_CLUSTERIP rule, it only checks duplicate config in > clusterip_config_find_get(). But after that, there may be still another > thread to insert a config with the same ip, then it leaves proc_create_data > to do dupli

Re: George's crazy full state idea (Re: HalfSipHash Acceptable Usage)

2016-12-23 Thread Hannes Frederic Sowa
On Thu, 2016-12-22 at 19:07 -0500, George Spelvin wrote: > Hannes Frederic Sowa wrote: > > A lockdep test should still be done. ;) > > Adding might_lock() annotations will improve coverage a lot. Might be hard to find the correct lock we take later down the code path, but if that is possible, cer

Re: BPF hash algo (Re: [kernel-hardening] Re: [PATCH v7 3/6] random: use SipHash in place of MD5)

2016-12-23 Thread Daniel Borkmann
On 12/23/2016 11:59 AM, Hannes Frederic Sowa wrote: On Fri, 2016-12-23 at 11:04 +0100, Daniel Borkmann wrote: On 12/22/2016 05:59 PM, Hannes Frederic Sowa wrote: On Thu, 2016-12-22 at 08:07 -0800, Andy Lutomirski wrote: [...] The hashing is not a proper sha1 neither, unfortunately. I think th

[ANNOUNCE] ipvsadm release v1.29

2016-12-23 Thread Jesper Dangaard Brouer
We are happy to announce the release of ipvsadm v1.29. ipvsadm is a utility to administer the kernels IPVS/LVS load-balancer service It has been far too long since the last ipvsadm release. Even-though only two changes to the ipvsadm tool happened since last release, a release must be made as t

Re: BPF hash algo (Re: [kernel-hardening] Re: [PATCH v7 3/6] random: use SipHash in place of MD5)

2016-12-23 Thread Hannes Frederic Sowa
On Fri, 2016-12-23 at 11:04 +0100, Daniel Borkmann wrote: > On 12/22/2016 05:59 PM, Hannes Frederic Sowa wrote: > > On Thu, 2016-12-22 at 08:07 -0800, Andy Lutomirski wrote: > > > On Thu, Dec 22, 2016 at 7:51 AM, Hannes Frederic Sowa > > > wrote: > > > > On Thu, 2016-12-22 at 16:41 +0100, Jason A.

[PATCH iproute2] fix typo in ip-xfrm man page, rmd610 -> rmd160

2016-12-23 Thread Alexey Kodanev
Signed-off-by: Alexey Kodanev --- man/man8/ip-xfrm.8 |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/man/man8/ip-xfrm.8 b/man/man8/ip-xfrm.8 index 11f7104..a0bbef5 100644 --- a/man/man8/ip-xfrm.8 +++ b/man/man8/ip-xfrm.8 @@ -477,7 +477,7 @@ Encryption algorithms include

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-23 Thread Andrew Lunn
On Fri, Dec 23, 2016 at 10:30:27AM +0100, Volodymyr Bendiuga wrote: > Hi Andrew, > Here is the program I promised you. Hi Volodymyr Thanks for this. I will try it out beginning of January. I don't have access to the hardware at the moment. Thanks Andrew

Re: BPF hash algo (Re: [kernel-hardening] Re: [PATCH v7 3/6] random: use SipHash in place of MD5)

2016-12-23 Thread Daniel Borkmann
On 12/22/2016 06:25 PM, Andy Lutomirski wrote: On Thu, Dec 22, 2016 at 8:59 AM, Hannes Frederic Sowa [...] I wondered if bpf program loading should have used the module loading infrastructure from the beginning... That would be way too complicated and would be nasty for the unprivileged cases

[PATCH v3] stmmac: CSR clock configuration fix

2016-12-23 Thread Joao Pinto
When testing stmmac with my QoS reference design I checked a problem in the CSR clock configuration that was impossibilitating the phy discovery, since every read operation returned 0x. This patch fixes the issue. Signed-off-by: Joao Pinto --- changes v2->v3 (Phil Reid) - Altera uses the

Re: [PATCH v2] stmmac: CSR clock configuration fix

2016-12-23 Thread Joao Pinto
Hello Phil, Às 1:09 AM de 12/23/2016, Phil Reid escreveu: > G'day Joao, > On 23/12/2016 01:06, Joao Pinto wrote: >> Às 4:57 PM de 12/22/2016, Phil Reid escreveu: >>> On 22/12/2016 23:47, Joao Pinto wrote: Hello Phil, Às 3:42 PM de 12/22/2016, Phil Reid escreveu: > G'day Jo

Re: BPF hash algo (Re: [kernel-hardening] Re: [PATCH v7 3/6] random: use SipHash in place of MD5)

2016-12-23 Thread Daniel Borkmann
On 12/22/2016 05:59 PM, Hannes Frederic Sowa wrote: On Thu, 2016-12-22 at 08:07 -0800, Andy Lutomirski wrote: On Thu, Dec 22, 2016 at 7:51 AM, Hannes Frederic Sowa wrote: On Thu, 2016-12-22 at 16:41 +0100, Jason A. Donenfeld wrote: On Thu, Dec 22, 2016 at 4:33 PM, Hannes Frederic Sowa wrote:

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-23 Thread Volodymyr Bendiuga
Hi Andrew, Here is the program I promised you. There is a .c and Makefile attached to this mail. Simply type ”make” to build it. There is a dependency on libnl3, which needs to be installed. If you don’t have it Just install it: "apt-get install libnl-3-dev libnl-route-3-dev” if you use ubuntu b

[patch net 1/3] neigh: Send netevent after marking neigh as dead

2016-12-23 Thread Jiri Pirko
From: Ido Schimmel neigh_cleanup_and_release() is always called after marking a neighbour as dead, but it only notifies user space and not in-kernel listeners of the netevent notification chain. This can cause multiple problems. In my specific use case, it causes the listener (a switch driver ca

[patch net 3/3] mlxsw: spectrum_router: Correctly remove nexthop groups

2016-12-23 Thread Jiri Pirko
From: Ido Schimmel At the end of the nexthop initialization process we determine whether the nexthop should be offloaded or not based on the NUD state of the neighbour representing it. After all the nexthops were initialized we refresh the nexthop group and potentially offload it to the device, i

[patch net 2/3] mlxsw: spectrum_router: Don't reflect dead neighs

2016-12-23 Thread Jiri Pirko
From: Ido Schimmel When a neighbour is considered to be dead, we should remove it from the device's table regardless of its NUD state. Without this patch, after setting a port to be administratively down we get the following errors when we periodically try to update the kernel about neighbours a

[patch net 0/3] mlxsw: Router fixes

2016-12-23 Thread Jiri Pirko
From: Jiri Pirko Ido says: First two patches ensure we remove from the device's table neighbours that are considered to be dead by the neighbour core. The last patch removes nexthop groups from the device when they are no longer valid. Ido Schimmel (3): neigh: Send netevent after marking nei