[RFC PATCH 0/6] virtio-net: Add support for virtio-net header extensions

2017-03-18 Thread Vladislav Yasevich
Curreclty virtion net header is fixed size and adding things to it is rather difficult to do. This series attempt to add the infrastructure as well as some extensions that try to resolve some deficiencies we currently have. First, vnet header only has space for 16 flags. This may not be enough

[RFC PATCH 4/6] virtio-net: Add support for IPv6 fragment id vnet header extension.

2017-03-18 Thread Vladislav Yasevich
This adds the ability to pass a guest generated IPv6 fragment id to the host hypervisor. The id is passed as big endian to eliminate unnecessary conversions. The host will be able to directly use this id instead of attempting to generate its own. This makes the IPv6 framgnet id sligtly harder

[RFC PATCH 1/6] virtio-net: Remove the use the padded vnet_header structure

2017-03-18 Thread Vladislav Yasevich
We can replace the structure with a properly aligned size instead. The current structure attempts to align on a 16 byte boundary, so preserve it. Signed-off-by: Vlad Yaseivch --- drivers/net/virtio_net.c | 22 -- 1 file changed, 12 insertions(+), 10

[RFC PATCH 5/6] virtio-net: Add support for vlan acceleration vnet header extension.

2017-03-18 Thread Vladislav Yasevich
This extension allows us to pass vlan ID and vlan protocol data to the host hypervisor as part of the vnet header and lets us take advantage of HW accelerated vlan tagging in the host. It requires support in the host to negotiate the feature. When the extension is enabled, the virtio device will

[RFC PATCH 3/6] virtio_net: Add basic skeleton for handling vnet header extensions.

2017-03-18 Thread Vladislav Yasevich
This is the basic sceleton which will be fleshed out by individiual extensions. Signed-off-by: Vladislav Yasevich --- drivers/net/virtio_net.c| 21 + include/linux/virtio_net.h | 12 include/uapi/linux/virtio_net.h | 11

[RFC PATCH 6/6] virtio: Add support for UDP tunnel offload and extension.

2017-03-18 Thread Vladislav Yasevich
This patch provides the ablility to negotiate UDP tunnel offload features in the virtio devices as well as the necesary extension to pass additional information to the host. This work is based on earlier work by Jarno Rajahalme

[RFC PATCH 2/6] virtio-net: make header length handling uniform

2017-03-18 Thread Vladislav Yasevich
Consistently use hdr_len stored in virtnet_info structure instead of direclty using specific sizes. This will be required as the size of the virtio net header grows due to future extensions. Signed-off-by: Vladislav Yasevich --- drivers/net/virtio_net.c | 16

Re: [PATCH net v2] net: Do not hold the reference for the same sk_rx_dst

2017-03-18 Thread Kaiwen Xu
On Sat, Mar 18, 2017 at 08:49:43PM -0700, Cong Wang wrote: > On Sat, Mar 18, 2017 at 6:48 PM, Kevin Xu wrote: > > In some rare cases, inet_sk_rx_dst_set() may be called multiple times > > on the same dst, causing double refcounting. Eventually, it > > prevents net_device to be

Re: [PATCH net v2] net: Do not hold the reference for the same sk_rx_dst

2017-03-18 Thread Cong Wang
On Sat, Mar 18, 2017 at 6:48 PM, Kevin Xu wrote: > In some rare cases, inet_sk_rx_dst_set() may be called multiple times > on the same dst, causing double refcounting. Eventually, it > prevents net_device to be destroyed. The bug manifested as > > unregister_netdevice: waiting

Re: [PATCH net-next v2] net: Add sysctl to toggle early demux for tcp and udp

2017-03-18 Thread Subash Abhinov Kasiviswanathan
Less than 1% performance improvement in a benchmark doesn't justify the complexity of the patch. Eric's hypothesis was that an unconnected UDP socket may show issues because of cache misses in look-ups due to so many different sources. This should be fairly easy to benchmark by randomly setting

[PATCH net v2] net: Do not hold the reference for the same sk_rx_dst

2017-03-18 Thread Kevin Xu
In some rare cases, inet_sk_rx_dst_set() may be called multiple times on the same dst, causing double refcounting. Eventually, it prevents net_device to be destroyed. The bug manifested as unregister_netdevice: waiting for lo to become free. Usage count = 1 in the kernel log, preventing new

Re: [PATCH 07/17] net: convert sock.sk_refcnt from atomic_t to refcount_t

2017-03-18 Thread David Miller
From: Herbert Xu Date: Sun, 19 Mar 2017 00:47:59 +0800 > Eric Dumazet wrote: >> On Fri, 2017-03-17 at 07:42 +, Reshetova, Elena wrote: >> >>> Should we then first measure the actual numbers to understand what we >>> are talking here

[PATCH net 2/2] tcp: mark skbs with SCM_TIMESTAMPING_OPT_STATS

2017-03-18 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh SOF_TIMESTAMPING_OPT_STATS can be enabled and disabled while packets are collected on the error queue. So, checking SOF_TIMESTAMPING_OPT_STATS in sk->sk_tsflags is not enough to safely assume that the skb contains OPT_STATS data. Add a bit in

Re: [PATCH RFC net-next v2 1/4] skbuff: add stub to help computing crc32c on SCTP packets

2017-03-18 Thread Tom Herbert
On Sat, Mar 18, 2017 at 6:17 AM, Davide Caratti wrote: > hello Alexander and Tom, > > On Tue, 2017-03-07 at 10:06 -0800, Alexander Duyck wrote: >> >> You might even take this one step >> further. You could convert crc32_csum into a 1 bit enum for now. >> Basically you would

[PATCH net 1/2] tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs

2017-03-18 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh __sock_recv_timestamp can be called for both normal skbs (for receive timestamps) and for skbs on the error queue (for transmit timestamps). Commit 1c885808e456 (tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING) assumes any skb passed to

Re: [net-next sample action optimization v3 4/4] Openvswitch: Refactor sample and recirc actions implementation

2017-03-18 Thread Pravin Shelar
On Thu, Mar 16, 2017 at 3:48 PM, Andy Zhou wrote: > Added clone_execute() that both the sample and the recirc > action implementation can use. > > Signed-off-by: Andy Zhou > --- > net/openvswitch/actions.c | 175 > -- >

Re: [PATCH net] sctp: define dst_pending_confirm as a bit in sctp_transport

2017-03-18 Thread Neil Horman
On Sat, Mar 18, 2017 at 07:27:23PM +0800, Xin Long wrote: > As tp->dst_pending_confirm's value can only be set 0 or 1, this > patch is to change to define it as a bit instead of __u32. > > Signed-off-by: Xin Long > --- > include/net/sctp/structs.h | 4 ++-- > 1 file

Re: [PATCH net] sctp: remove temporary variable confirm from sctp_packet_transmit

2017-03-18 Thread Neil Horman
On Sat, Mar 18, 2017 at 07:12:22PM +0800, Xin Long wrote: > Commit c86a773c7802 ("sctp: add dst_pending_confirm flag") introduced > a temporary variable "confirm" in sctp_packet_transmit. > > But it broke the rule that longer lines should be above shorter ones. > Besides, this variable is not

Re: [PATCH net-next v2] net: Add sysctl to toggle early demux for tcp and udp

2017-03-18 Thread Tom Herbert
On Sat, Mar 18, 2017 at 10:32 AM, Subash Abhinov Kasiviswanathan wrote: >> All these hypotheses are quite testable, and it should be obvious that >> if a patch is supposed to improve performance there should be some >> effort to quantify the impact. > > > Hi Tom > > I ran

Re: [PATCH net-next v2] net: Add sysctl to toggle early demux for tcp and udp

2017-03-18 Thread Subash Abhinov Kasiviswanathan
All these hypotheses are quite testable, and it should be obvious that if a patch is supposed to improve performance there should be some effort to quantify the impact. Hi Tom I ran a single stream unconnected UDPv4 test on an ARM64 system and I see a slight increase in performance (782 ->

Re: [PATCH 0/5] mm subsystem refcounter conversions

2017-03-18 Thread Herbert Xu
Andrew Morton wrote: > > The performance implications of this proposal are terrifying. > > I suggest adding a set of non-debug inlined refcount functions which > just fall back to the simple atomic.h operations. > > And add a new CONFIG_DEBUG_REFCOUNT. So the

Re: [PATCH 07/17] net: convert sock.sk_refcnt from atomic_t to refcount_t

2017-03-18 Thread Herbert Xu
Eric Dumazet wrote: > On Fri, 2017-03-17 at 07:42 +, Reshetova, Elena wrote: > >> Should we then first measure the actual numbers to understand what we >> are talking here about? >> I would be glad to do it if you suggest what is the correct way to do >> measurements

Re: [PATCH net] sctp: remove temporary variable confirm from sctp_packet_transmit

2017-03-18 Thread Xin Long
On Sat, Mar 18, 2017 at 7:48 PM, Julian Anastasov wrote: > > Hello, > > On Sat, 18 Mar 2017, Xin Long wrote: > >> Commit c86a773c7802 ("sctp: add dst_pending_confirm flag") introduced >> a temporary variable "confirm" in sctp_packet_transmit. >> >> But it broke the rule that

Re: [PATCH] net: convert sk_filter.refcnt from atomic_t to refcount_t

2017-03-18 Thread Sergei Shtylyov
Hello! On 3/18/2017 3:58 PM, Elena Reshetova wrote: refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by:

[PATCH net] sctp: out_qlen should be updated when pruning unsent queue

2017-03-18 Thread Xin Long
This patch is to fix the issue that sctp_prsctp_prune_sent forgot to update q->out_qlen when removing a chunk from unsent queue. Fixes: 8dbdf1f5b09c ("sctp: implement prsctp PRIO policy") Signed-off-by: Xin Long --- net/sctp/outqueue.c | 11 +-- 1 file changed, 5

Re: [PATCH RFC net-next v2 1/4] skbuff: add stub to help computing crc32c on SCTP packets

2017-03-18 Thread Davide Caratti
hello Alexander and Tom, On Tue, 2017-03-07 at 10:06 -0800, Alexander Duyck wrote: > > You might even take this one step > further. You could convert crc32_csum into a 1 bit enum for now. > Basically you would use 0 for 1's compliement csum, and 1 to represent > a crc32c csum. Then if we end

[PATCH] net: convert sk_filter.refcnt from atomic_t to refcount_t

2017-03-18 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-18 Thread Wolfgang Grandegger
Hello Akshay, Am 17.03.2017 um 19:28 schrieb Akshay Bhat: Hi Wolfgang, On 03/17/2017 01:04 PM, Wolfgang Grandegger wrote: Hm, that's unusual. Cable disconnected and then send a message: $ grep /proc/interrupts; sleep 10; /proc/interrupts should make things clear. But maybe it's a clever

Re: SO_BINDTODEVICE in VRFs not working?

2017-03-18 Thread Daniele Orlandi
On 18/03/2017 06:54, David Ahern wrote: > >> int s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); >> >> char *ifname = "eth1"; > > Bind to the VRF device not an interface enslaved to it. Oh... thanks, it was that simple... Well, yes, I think it should be possible to bind to the specific

Re: [PATCH] net: usb: pegasus: use new api ethtool_{get|set}_link_ksettings

2017-03-18 Thread Petko Manolov
On 17-03-17 23:34:04, Philippe Reynes wrote: > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > As I don't have the hardware, I'd be very pleased if someone may test this > patch. Yep, the patch seems to be working fine on real

Re: Great Loan offer!!!

2017-03-18 Thread Bar. Nasir Mehmood Raja
My name is Yusuf Khaled Group Chief Financial Officer in GIFG, UAE. The GIFG is financial powerhouse in the gulf region, capable of funding extremely wide variety of projects including real estate, amusement parks, eco and green projects, golf courses, hotels and hotel resorts, manufacturing,

Re: [PATCH net] sctp: remove temporary variable confirm from sctp_packet_transmit

2017-03-18 Thread Julian Anastasov
Hello, On Sat, 18 Mar 2017, Xin Long wrote: > Commit c86a773c7802 ("sctp: add dst_pending_confirm flag") introduced > a temporary variable "confirm" in sctp_packet_transmit. > > But it broke the rule that longer lines should be above shorter ones. > Besides, this variable is not

Re: [net-next PATCH 0/5] Add busy poll support for epoll under certain circumstances

2017-03-18 Thread Michael Kerrisk
[CC += linux-...@vger.kernel.org] Hello Alexander Since this is a kernel-user-space API change, please CC linux-api@ (and on future iterations of the patch). The kernel source file Documentation/SubmitChecklist notes that all Linux kernel patches that change userspace interfaces should be CCed

[PATCH net] sctp: remove temporary variable confirm from sctp_packet_transmit

2017-03-18 Thread Xin Long
Commit c86a773c7802 ("sctp: add dst_pending_confirm flag") introduced a temporary variable "confirm" in sctp_packet_transmit. But it broke the rule that longer lines should be above shorter ones. Besides, this variable is not necessary, so this patch is to just remove it and use

[PATCH net] sctp: define dst_pending_confirm as a bit in sctp_transport

2017-03-18 Thread Xin Long
As tp->dst_pending_confirm's value can only be set 0 or 1, this patch is to change to define it as a bit instead of __u32. Signed-off-by: Xin Long --- include/net/sctp/structs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] net: veth: use new api ethtool_{get|set}_link_ksettings

2017-03-18 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes --- drivers/net/veth.c | 22 ++ 1 files changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/net/veth.c

Re: SO_BINDTODEVICE in VRFs not working?

2017-03-18 Thread Rami Rosen
Hi, >Bind to the VRF device not an interface enslaved to it. I want to add >the option for enslaved interfaces but have not gotten around to it. Maybe this should be added as a note/TBD to the VRF documentation (which does mention setsockopt with SO_BINDTODEVICE):

Re: SO_BINDTODEVICE in VRFs not working?

2017-03-18 Thread David Ahern
On 3/17/17 7:59 PM, Daniele Orlandi wrote: > > Hello, > > I'm writing an application that should listen on a TCP port bound to an > inteface in a VRF. > > The bind/listen sequence is the following: > > int s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); > > char *ifname = "eth1"; Bind to