Re: [RFC PATCH tip/master 2/3] kprobes: Allocate kretprobe instance if its free list is empty

2017-03-29 Thread Ingo Molnar
* Masami Hiramatsu wrote: > > So this is something I missed while the original code was merged, but the > > concept > > looks a bit weird: why do we do any "allocation" while a handler is > > executing? > > > > That's fundamentally fragile. What's the maximum number of parallel > > 'kretpro

Re: in_irq_or_nmi() and RFC patch

2017-03-29 Thread Peter Zijlstra
On Wed, Mar 29, 2017 at 09:44:41PM +0200, Jesper Dangaard Brouer wrote: > @@ -2481,7 +2481,11 @@ void free_hot_cold_page(struct page *page, bool cold) > unsigned long pfn = page_to_pfn(page); > int migratetype; > > - if (in_interrupt()) { > + /* > + * Exclude (hard) IRQ a

Re: [net-next v2] vxlan: fix ND proxy when skb doesn't have transport header offset

2017-03-29 Thread Vincent Bernat
❦ 29 mars 2017 22:47 +0200, Vincent Bernat  : > Parsing of neighbor discovery options is done earlier to ignore the > whole packet in case of a malformed option. Moreover, the assumption the > skb was linear is removed and options are extracted with > skb_header_pointer() as well. The check on th

RE: [RFC TLS Offload Support 00/15] cover letter

2017-03-29 Thread Boris Pismenny
> >> TLS Tx crypto offload is a new feature of network devices. It enables > >> the kernel TLS socket to skip encryption and authentication > >> operations on the transmit side of the data path, delegating those to > >> the NIC. In turn, the NIC encrypts packets that belong to an > >> offloaded TLS

Re: [PATCH net-next 2/2] net: dsa: dsa2: Add basic support of devlink

2017-03-29 Thread Jiri Pirko
Wed, Mar 29, 2017 at 07:36:24PM CEST, and...@lunn.ch wrote: >> Tangential question: we do not currently report to user space what kind >> of switch tagging protocol is used (DSA, eDSA etc.) I was going to add a >> sysfs attribute for that under the switch device's directory, but maybe >> devlink wo

Re: [PATCH 1/6] virtio: wrap find_vqs

2017-03-29 Thread Jason Wang
On 2017年03月30日 04:48, Michael S. Tsirkin wrote: We are going to add more parameters to find_vqs, let's wrap the call so we don't need to tweak all drivers every time. Signed-off-by: Michael S. Tsirkin --- A quick glance and it looks ok, but what the benefit of this series, is it required by

Re: [PATCH net-next] virtio_net: don't reset twice on XDP on/off

2017-03-29 Thread Jason Wang
On 2017年03月30日 04:14, Michael S. Tsirkin wrote: We already do a reset once in remove_vq_common - there appears to be no point in doing another one when we add/remove XDP. Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drive

Re: [PATCH v2] virtio_net: fix support for small rings

2017-03-29 Thread Jason Wang
On 2017年03月30日 01:42, Michael S. Tsirkin wrote: When ring size is small (<32 entries) making buffers smaller means a full ring might not be able to hold enough buffers to fit a single large packet. Make sure a ring full of buffers is large enough to allow at least one packet of max size. Fixe

[PATCH net] be2net: Fix endian issue in logical link config command

2017-03-29 Thread Suresh Reddy
Use cpu_to_le32() for link_config variable in set_logical_link_config command as this variable is of type u32. Signed-off-by: Suresh Reddy --- drivers/net/ethernet/emulex/benet/be_cmds.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/emulex/bene

Re: [PATCH] virtio_net: enable big packets for large MTU values

2017-03-29 Thread Jason Wang
On 2017年03月29日 20:38, Michael S. Tsirkin wrote: If one enables e.g. jumbo frames without mergeable buffers, packets won't fit in 1500 byte buffers we use. Switch to big packet mode instead. TODO: make sizing more exact, possibly extend small packet mode to use larger pages. Signed-off-by: Mich

Re: [PATCH] virtio_net: fix mergeable bufs error handling

2017-03-29 Thread Jason Wang
On 2017年03月29日 20:37, Michael S. Tsirkin wrote: On xdp error we try to free head_skb without having initialized it, that's clearly bogus. Fixes: f600b6905015 ("virtio_net: Add XDP support") Cc: John Fastabend Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 2 +- 1 file ch

[vhost:linux-next 6/19] drivers/remoteproc/remoteproc_virtio.c:148:9: error: 'ctx' undeclared

2017-03-29 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next head: d01047cb281d27bcedbf705089bdd38d86d20b01 commit: a965e977a1038cd738f874b5ee8a16d4fa55c64d [6/19] virtio: add context flag to find vqs config: x86_64-randconfig-x015-201713 (attached as .config) compiler: gcc-6

Re: [PATCH net-next 8/8] vhost_net: use lockless peeking for skb array during busy polling

2017-03-29 Thread Jason Wang
On 2017年03月30日 10:33, Michael S. Tsirkin wrote: On Thu, Mar 30, 2017 at 10:16:15AM +0800, Jason Wang wrote: On 2017年03月29日 20:07, Michael S. Tsirkin wrote: On Tue, Mar 21, 2017 at 12:04:47PM +0800, Jason Wang wrote: For the socket that exports its skb array, we can use lockless polling to a

Re: [PATCH] tcp: possible race between tcp_done() and tcp_poll()

2017-03-29 Thread Seiichi Ikarashi
On 2017-03-30 12:18, Eric Dumazet wrote: > On Thu, 2017-03-30 at 11:55 +0900, Seiichi Ikarashi wrote: > >> I got a report that receiving a RST packet but poll() got only POLLERR, no >> POLLIN|POLLRDHUP . >> It was an old x86_64 kernel which does not include sk_state_{load,store} >> functions. >>

Re: [PATCH] tcp: possible race between tcp_done() and tcp_poll()

2017-03-29 Thread Eric Dumazet
On Thu, 2017-03-30 at 11:55 +0900, Seiichi Ikarashi wrote: > I got a report that receiving a RST packet but poll() got only POLLERR, no > POLLIN|POLLRDHUP . > It was an old x86_64 kernel which does not include sk_state_{load,store} > functions. > I suspected some race might have occur above. It

Re: [PATCH net] ftgmac100: Mostly rewrite the driver

2017-03-29 Thread David Miller
From: Benjamin Herrenschmidt Date: Thu, 30 Mar 2017 11:46:18 +1100 > On Thu, 2017-03-30 at 08:08 +1100, Benjamin Herrenschmidt wrote: >> On Wed, 2017-03-29 at 11:08 -0700, Florian Fainelli wrote: >> > I hear your point that you are the only users of the driver and >> > it's >> > already in a bad

[PATCH net 7/7] ibmvnic: Cleanup failure path in ibmvnic_open

2017-03-29 Thread Nathan Fontenot
Now that ibmvnic_release_resources will clean up all of our resources properly, even if they were not allocated, we can just call this for failues in ibmvnic_open. This patch also moves the ibmvnic_release_resources() routine up in the file to avoid creating a forward declaration ad re-names it to

[PATCH net 6/7] ibmvnic: Create init/release routines for stats token

2017-03-29 Thread Nathan Fontenot
Create an initialization and a release routine for the stats token used by the ibmvnic driver. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 46 +++- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/i

[PATCH net 5/7] ibmvnic: Merge the two release_sub_crq_queue routines

2017-03-29 Thread Nathan Fontenot
Keeping two routines for releasing sub crqs, one for when irqs are not initialized and one for when they are, is a bit of overkill. Merge the two routines to a common release routine that will check for an irq and release it if needed. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/

[PATCH net 4/7] ibmvnic: Create init and release routines for the rx pool

2017-03-29 Thread Nathan Fontenot
Move the initialization and the release of the rx pool to their own routines, and update them to do validation. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 204 ++-- 1 file changed, 101 insertions(+), 103 deletions(-) diff --git a/dri

[PATCH net 0/7] ibmvnic: Cleanup resource handling

2017-03-29 Thread Nathan Fontenot
In order to better manage the resources of the ibmvnic driver, this set of patches creates a set of initialization and release routines for the drivers resources. Additionally, some patches do some re-naming of the affected routines so that there is a common naming scheme in the driver. -Nathan -

[PATCH net 2/7] ibmvnic: Create init and release routines for the bounce buffer

2017-03-29 Thread Nathan Fontenot
Move the handling of initialization and releasing the bounce buffer to their own init and release routines. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 77 +++- 1 file changed, 50 insertions(+), 27 deletions(-) diff --git a/drivers/n

[PATCH net 3/7] ibmvnic: Create init and release routines for the tx pool

2017-03-29 Thread Nathan Fontenot
Move the initialization and the release of the tx pool to their own routines, and update them to do validation. This also adds validation to the release of the long term buffer. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 134 +--- 1 f

[PATCH net 1/7] ibmvnic: Update main crq initialization and release

2017-03-29 Thread Nathan Fontenot
Update the initialization and release routines for the crq queue so that we validate the crq queue. Additionally this updates the naming of the init and release routines for the crq queue to drop the ibmvnic prefix. This matches the naming for similar routines in the driver Signed-off-by: Nathan

Re: [PATCH] tcp: possible race between tcp_done() and tcp_poll()

2017-03-29 Thread Seiichi Ikarashi
Hi Eric, On 2017-03-30 11:31, Eric Dumazet wrote: > On Thu, 2017-03-30 at 09:35 +0900, Seiichi Ikarashi wrote: >> Similar to a4d258036ed9 ("tcp: Fix race in tcp_poll"). >> >> Between receiving a packet and tcp_poll(), sk->sk_err is protected by memory >> barriers but >> sk->sk_shutdown and sk->sk

Re: [PATCH net-next 8/8] vhost_net: use lockless peeking for skb array during busy polling

2017-03-29 Thread Michael S. Tsirkin
On Thu, Mar 30, 2017 at 10:16:15AM +0800, Jason Wang wrote: > > > On 2017年03月29日 20:07, Michael S. Tsirkin wrote: > > On Tue, Mar 21, 2017 at 12:04:47PM +0800, Jason Wang wrote: > > > For the socket that exports its skb array, we can use lockless polling > > > to avoid touching spinlock during bu

Re: [PATCH] tcp: possible race between tcp_done() and tcp_poll()

2017-03-29 Thread Eric Dumazet
On Thu, 2017-03-30 at 09:35 +0900, Seiichi Ikarashi wrote: > Similar to a4d258036ed9 ("tcp: Fix race in tcp_poll"). > > Between receiving a packet and tcp_poll(), sk->sk_err is protected by memory > barriers but > sk->sk_shutdown and sk->sk_state are not. ... > So possibly, POLLIN|POLLRDNORM|P

Re: [PATCH net-next 8/8] vhost_net: use lockless peeking for skb array during busy polling

2017-03-29 Thread Jason Wang
On 2017年03月29日 20:07, Michael S. Tsirkin wrote: On Tue, Mar 21, 2017 at 12:04:47PM +0800, Jason Wang wrote: For the socket that exports its skb array, we can use lockless polling to avoid touching spinlock during busy polling. Signed-off-by: Jason Wang --- drivers/vhost/net.c | 7 +--

[vhost:linux-next 6/19] drivers/remoteproc/remoteproc_virtio.c:106:33: sparse: not enough arguments for function vring_new_virtqueue

2017-03-29 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next head: 8ab881d0e8136390da79aa0902fe03d2f6c65e32 commit: 281310d52c1d63630f54b1ac5cca6e9eb8715b3a [6/19] virtio: add context flag to find vqs reproduce: # apt-get install sparse git checkout 281310d52c

Re: [PATCH] Add checks for kmalloc allocation failures

2017-03-29 Thread Stefan Schmidt
Hello. On 03/29/2017 06:21 PM, Eric Dumazet wrote: On Wed, 2017-03-29 at 16:54 +0100, Colin King wrote: From: Colin Ian King Ensure we don't end up with a null pointer dereferences by checking for for allocation failures. Allocate by sizeof(*ptr) rather than the type to fix checkpack warning

Re: [PATCH] ixgbe: Check for skb->queue_mapping

2017-03-29 Thread tndave
On 03/29/2017 05:29 PM, Eric Dumazet wrote: On Wed, 2017-03-29 at 16:55 -0700, Tushar Dave wrote: There are events seen where skb->queue_mapping value is greater than adapter->num_tx_queue. In such cases, adapter->tx_ring becomes invalid (null) and xmit results in kernel panic. One such event

RE: [PATCH 1/6] virtio: wrap find_vqs

2017-03-29 Thread Gonglei (Arei)
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Thursday, March 30, 2017 4:49 AM > Subject: [PATCH 1/6] virtio: wrap find_vqs > > We are going to add more parameters to find_vqs, let's wrap the call so > we don't need to tweak all drivers every time. > >

[PATCH net-next] vxlan: vxlan dev should inherit lowerdev's gso_max_size

2017-03-29 Thread Felix Manlunas
vxlan dev currently ignores lowerdev's gso_max_size, which adversely affects TSO performance of liquidio if it's the lowerdev. Egress TCP packets' skb->len often exceed liquidio's advertised gso_max_size. This may happen on other NIC drivers. Fix it by assigning lowerdev's gso_max_size to that o

Re: [PATCH net] ftgmac100: Mostly rewrite the driver

2017-03-29 Thread Benjamin Herrenschmidt
On Thu, 2017-03-30 at 08:08 +1100, Benjamin Herrenschmidt wrote: > On Wed, 2017-03-29 at 11:08 -0700, Florian Fainelli wrote: > > I hear your point that you are the only users of the driver and > > it's > > already in a bad shape, but take this as an opportunity to increase > > your commit count ;)

[PATCH net 1/1] proc/sysctl: Fix the int overflow for jiffies conversion

2017-03-29 Thread gfree . wind
From: Gao Feng The function do_proc_dointvec_jiffies_conv uses LONG_MX/HZ as the max value to avoid overflow. But actually the *valp is int type, so it still causes overflow. For example, echo 2147483647 > ./sys/net/ipv4/tcp_keepalive_time Then, cat ./sys/net/ipv4/tcp_keepalive_time The output i

Re: [RFC PATCH tip/master 2/3] kprobes: Allocate kretprobe instance if its free list is empty

2017-03-29 Thread Masami Hiramatsu
On Wed, 29 Mar 2017 10:18:48 -0700 Josh Stone wrote: > On 03/29/2017 01:25 AM, Masami Hiramatsu wrote: > > On Wed, 29 Mar 2017 08:30:05 +0200 > > Ingo Molnar wrote: > >> > >> * Masami Hiramatsu wrote: > >> > >>> @@ -1824,6 +1823,30 @@ void unregister_jprobes(struct jprobe **jps, int > >>> num)

[PATCH] tcp: possible race between tcp_done() and tcp_poll()

2017-03-29 Thread Seiichi Ikarashi
Similar to a4d258036ed9 ("tcp: Fix race in tcp_poll"). Between receiving a packet and tcp_poll(), sk->sk_err is protected by memory barriers but sk->sk_shutdown and sk->sk_state are not. So possibly, POLLIN|POLLRDNORM|POLLRDHUP might not be set even when receiving a RST packet. Signed-off-by: S

Re: [PATCH] i40e: Check for skb->queue_mapping

2017-03-29 Thread Eric Dumazet
On Wed, 2017-03-29 at 16:57 -0700, Tushar Dave wrote: > There are events seen where skb->queue_mapping value is greater than > vsi->num_queue_pairs. In such cases, vsi->tx_ring becomes invalid > (null) and xmit results in kernel panic. > > One such event is running netconsole and enabling VF on th

Re: [PATCH] ixgbe: Check for skb->queue_mapping

2017-03-29 Thread Eric Dumazet
On Wed, 2017-03-29 at 16:55 -0700, Tushar Dave wrote: > There are events seen where skb->queue_mapping value is greater than > adapter->num_tx_queue. In such cases, adapter->tx_ring becomes invalid > (null) and xmit results in kernel panic. > > One such event is running netconsole and enabling VF

[next-queue v6 PATCH 4/7] net: store port/representator id in metadata_dst

2017-03-29 Thread Sridhar Samudrala
From: Jakub Kicinski Switches and modern SR-IOV enabled NICs may multiplex traffic from Port representators and control messages over single set of hardware queues. Control messages and muxed traffic may need ordered delivery. Those requirements make it hard to comfortably use TC infrastructure

[next-queue v6 PATCH 3/7] i40e: Sync link state between PF/VFs and Port representor netdevs

2017-03-29 Thread Sridhar Samudrala
This patch enables - reflecting the link state of port netdev based on PF/VF admin state & link state of PF/VF based on admin state of the associated port netdev. - bringing up/down the VF port netdev sends a notification to update VF link state. - bringing up/down the VF will cause the link st

[next-queue v6 PATCH 2/7] i40e: Introduce Port Representor netdevs and switchdev mode.

2017-03-29 Thread Sridhar Samudrala
Port Representator netdevs are created for each PF and VF if the switch mode is set to 'switchdev'. These netdevs can be used to control and configure VFs and PFs when they are moved to a different namespace. They enable exposing statistics, configure and monitor link state, mtu, filters,fdb/vlan e

[next-queue v6 PATCH 7/7] i40e: Add support to get switch id and port number for port netdevs

2017-03-29 Thread Sridhar Samudrala
Introduce switchdev_ops to PF and port netdevs to return the switch id via SWITCHDEV_ATTR_ID_PORT_PARENT_ID attribute. Also, ndo_get_phys_port_name() support is added to port netdevs to return the port number. PF: p4p1, VFs: p4p1_0,p4p1_1, VF port reps:p4p1-vf0, p4p1-vf1, PF port rep: p4p1-pf # rm

[next-queue v6 PATCH 1/7] i40e: Introduce devlink interface

2017-03-29 Thread Sridhar Samudrala
Add initial devlink support to get/set the mode of SRIOV switch. This patch sets the default mode as 'legacy' and enables getting the mode and and setting it to 'legacy'. The switch mode can be get/set via following 'devlink' commands. # devlink dev eswitch show pci/:42:00.0 pci/:42:00.0:

[next-queue v6 PATCH 6/7] i40e: Add support for exposing switch port statistics via port netdevs

2017-03-29 Thread Sridhar Samudrala
By default stats counted by HW are returned via the original ndo_get_stats64() api. Stats counted in SW are returned via ndo_get_offload_stats() api. Small script to demonstrate port stats in switchdev mode. PF: p4p1, VFs: p4p1_0,p4p1_1 VF Port Reps:p4p1-vf0, p4p1-vf1 PF Port rep: p4p1-pf # rmmod

[next-queue v6 PATCH 5/7] i40e: Add TX and RX support over port netdev's in switchdev mode

2017-03-29 Thread Sridhar Samudrala
In switchdev mode, broadcasts from VFs are received by the PF and passed to corresponding port representor netdev. Any frames sent via port netdevs are sent as directed transmits to the corresponding VFs. To enable directed transmit, skb metadata dst is used to pass the port id and the frame is req

[next-queue v6 PATCH 0/7] i40e: Add port representor and initial switchdev support

2017-03-29 Thread Sridhar Samudrala
- Patch 1 introduces devlink interface to get/set the mode of switch. - Patch 2 adds support to create control plane port representor netdevs associated with dataplane PF and VFs that can be used to control/configure PF/VFs even when they are in a different namespace. - Patch 3 enables syncing

[PATCH net] openvswitch: Fix ovs_flow_key_update()

2017-03-29 Thread Yi-Hung Wei
ovs_flow_key_update() is called when the flow key is invalid, and it is used to update and revalidate the flow key. Commit 329f45bc4f19 ("openvswitch: add mac_proto field to the flow key") introduces mac_proto field to flow key and use it to determine whether the flow key is valid. However, the com

[PATCH] i40e: Check for skb->queue_mapping

2017-03-29 Thread Tushar Dave
There are events seen where skb->queue_mapping value is greater than vsi->num_queue_pairs. In such cases, vsi->tx_ring becomes invalid (null) and xmit results in kernel panic. One such event is running netconsole and enabling VF on the same device. Or running netconsole and changing number of tx q

[PATCH] ixgbe: Check for skb->queue_mapping

2017-03-29 Thread Tushar Dave
There are events seen where skb->queue_mapping value is greater than adapter->num_tx_queue. In such cases, adapter->tx_ring becomes invalid (null) and xmit results in kernel panic. One such event is running netconsole and enabling VF on the same device. Or running netconsole and changing number of

Re: [PATCH] tcp: possible race between tcp_done() and tcp_poll()

2017-03-29 Thread Seiichi Ikarashi
Thanks Sergei! On 2017-03-29 20:57, Sergei Shtylyov wrote: > Hello! > > On 3/29/2017 8:22 AM, Seiichi Ikarashi wrote: > >> Similar to commit a4d258036ed9b2a1811. > >Commit citing is standardized: it should specify 12-digit (at least) SHA1 > and the commit summary line enclosed in (""). >

Re: [PATCH net-next v3 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch

2017-03-29 Thread Andrew Lunn
> +static struct mt7530_priv *lpriv; Hi Sean Why do you need this global variable? What if somebody has two switches connected? > +static void mt7530_port_disable(struct dsa_switch *ds, int port, > + struct phy_device *phy); > +static int mt7530_cpu_port_enable(struct

[vhost:linux-next 6/19] drivers//remoteproc/remoteproc_virtio.c:106:7: error: too few arguments to function 'vring_new_virtqueue'

2017-03-29 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next head: 8ab881d0e8136390da79aa0902fe03d2f6c65e32 commit: 281310d52c1d63630f54b1ac5cca6e9eb8715b3a [6/19] virtio: add context flag to find vqs config: x86_64-randconfig-i0-201713 (attached as .config) compiler: gcc-4.9

[PATCH nf-next 1/1] net: tcp: Refine the __tcp_select_window

2017-03-29 Thread gfree . wind
From: Gao Feng 1. Move the "window = tp->rcv_wnd;" into the condition block without tp->rx_opt.rcv_wscale. Because it is unnecessary when enable wscale; 2. Use the macro ALIGN instead of two statements. The two statements are used to make window align to 1< --- net/ipv4/tcp_output.c | 8 +++

[vhost:linux-next 6/19] drivers/remoteproc/remoteproc_virtio.c:107:27: error: passing argument 8 of 'vring_new_virtqueue' from incompatible pointer type

2017-03-29 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next head: 8ab881d0e8136390da79aa0902fe03d2f6c65e32 commit: 281310d52c1d63630f54b1ac5cca6e9eb8715b3a [6/19] virtio: add context flag to find vqs config: i386-randconfig-s0-201713 (attached as .config) compiler: gcc-6 (De

Re: [PATCH net-next 7/8] vhost_net: try batch dequing from skb array

2017-03-29 Thread Michael S. Tsirkin
On Wed, Mar 29, 2017 at 06:53:27PM +0800, Jason Wang wrote: > > > On 2017年03月29日 18:46, Pankaj Gupta wrote: > > Hi Jason, > > > > > On 2017年03月23日 13:34, Jason Wang wrote: > > > > > > > > > > +{ > > > > > > +if (rvq->rh != rvq->rt) > > > > > > +goto out; > > > > > > + > > > > > > +

Re: [PATCH] ezchip: nps_enet: check if napi has been completed

2017-03-29 Thread Eric Dumazet
On Wed, Mar 29, 2017 at 2:30 PM, David Miller wrote: Signed-off-by: Vlad Zakharov > > Applied. > > Eric, if this is really required now, we have 148 broken drivers still. Piece of cake :/ If we get more reports like that, we might implement a logic to prevent infinite loops. It is not clear to

Re: [PATCH 0/8] Netfilter fixes for net

2017-03-29 Thread David Miller
From: Pablo Neira Ayuso Date: Wed, 29 Mar 2017 14:14:02 +0200 > Hi David, > > The following patchset contains a rather large update with Netfilter > fixes, specifically targeted to incorrect RCU usage in several spots and > the userspace conntrack helper infrastructure (nfnetlink_cthelper), > mo

Re: [PATCH] ezchip: nps_enet: check if napi has been completed

2017-03-29 Thread David Miller
From: Vlad Zakharov Date: Wed, 29 Mar 2017 13:41:46 +0300 > After a new NAPI_STATE_MISSED state was added to NAPI we can get into > this state and in such case we have to reschedule NAPI as some work is > still pending and we have to process it. napi_complete_done() function > returns false if we

Re: [PATCH net-next 0/4] net: mpls: Allow users to configure more labels per route

2017-03-29 Thread David Ahern
On 3/27/17 9:08 PM, Eric W. Biederman wrote: > I believe we should just kill MAX_NEW_LABELS. > > I think the only significant change from your patch is the removal of an > array from mpls_route_config. > > With the removal of MAX_NEW_LABELS I would replace it by a sanity check > in mpls_rt_alloc

Re: [net-next 00/13][pull request] 40GbE Intel Wired LAN Driver Updates 2017-03-29

2017-03-29 Thread David Miller
From: Jeff Kirsher Date: Wed, 29 Mar 2017 03:12:02 -0700 > This series contains updates to i40e and i40evf only. Pulled, thanks Jeff. Please address Sergei's feedback about unnecessary parenthesization in followup changes. Thanks again.

Re: [PATCH net 0/3] bnxt_en: Small misc. fixes.

2017-03-29 Thread David Miller
From: Michael Chan Date: Tue, 28 Mar 2017 19:47:28 -0400 > Fix a NULL pointer crash in open failure path, wrong arguments when > printing error messages, and a DMA unmap bug in XDP shutdown path. Series applied.

Re: [PATCH net-next v1 0/2] tipc: add socketpair support

2017-03-29 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Wed, 29 Mar 2017 11:22:15 +0200 > We add socketpair support for connection oriented sockets in > the first patch and for connection less in the second. Series applied, thanks.

Re: [PATCH net] ftgmac100: Mostly rewrite the driver

2017-03-29 Thread Benjamin Herrenschmidt
On Wed, 2017-03-29 at 11:08 -0700, Florian Fainelli wrote: > I hear your point that you are the only users of the driver and it's > already in a bad shape, but take this as an opportunity to increase > your commit count ;) Haha, my commit count is fine thanks ;-) I'll see what I can do. I need to

Re: [PATCH net-next] net: mvneta: add RGMII_RXID and RGMII_TXID support

2017-03-29 Thread David Miller
From: Jisheng Zhang Date: Wed, 29 Mar 2017 16:42:26 +0800 > RGMII_RXID and RGMII_TX_ID share the same GMAC CTRL setting as RGMII > or RGMII_ID. > > Signed-off-by: Jisheng Zhang Applied.

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

2017-03-29 Thread David Miller
From: Philippe Reynes Date: Wed, 29 Mar 2017 08:24:21 +0200 > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > Signed-off-by: Philippe Reynes > --- > Changelog: > v2: > - avoid useless initiazation to zero (thanks Xin Long) Applie

Re: [PATCH net-next v2] net: mvneta: set rx mode during resume if interface is running

2017-03-29 Thread David Miller
From: Jisheng Zhang Date: Wed, 29 Mar 2017 16:47:19 +0800 > I found a bug by: > > 0. boot and start dhcp client > 1. echo mem > /sys/power/state > 2. resume back immediately > 3. don't touch dhcp client to renew the lease > 4. ping the gateway. No acks > > Usually, after step2, the DHCP lease i

[net-next v2] vxlan: fix ND proxy when skb doesn't have transport header offset

2017-03-29 Thread Vincent Bernat
When an incoming frame is tagged or when GRO is disabled, the skb handled to vxlan_xmit() doesn't contain a valid transport header offset. This makes ND proxying fail. Do not rely on skb_transport_offset(). Instead, use offsets from skb_network_offset() with skb_header_pointer() to extract appropr

[PATCH 6/6] virtio_net: reduce alignment for buffers

2017-03-29 Thread Michael S. Tsirkin
We don't need to align length to any particular value anymore. Aligning to L1 cache size probably sill makes sense to reduce false sharing. Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net

[PATCH 5/6] virtio_net: rework mergeable buffer handling

2017-03-29 Thread Michael S. Tsirkin
Use the new _ctx virtio API to maintain true length for each buffer. Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 91 +++- 1 file changed, 44 insertions(+), 47 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio

[PATCH 1/6] virtio: wrap find_vqs

2017-03-29 Thread Michael S. Tsirkin
We are going to add more parameters to find_vqs, let's wrap the call so we don't need to tweak all drivers every time. Signed-off-by: Michael S. Tsirkin --- drivers/block/virtio_blk.c | 3 +-- drivers/char/virtio_console.c | 6 +++--- drivers/crypto/virtio/virtio_cry

[PATCH 4/6] virtio_net: allow specifying context for rx

2017-03-29 Thread Michael S. Tsirkin
With mergeable buffers we never use s/g for rx, so allow specifying context in that case. Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 6

Re: [PATCH 3/7] NFC: nfcmrvl: do not use device-managed resources

2017-03-29 Thread Johan Hovold
On Wed, Mar 29, 2017 at 06:21:08PM +0200, Johan Hovold wrote: > This specifically fixes a NULL-pointer dereference when using the n_nci > line discipline on one end of a Unix98 pty as well as resource leaks in > the registration error paths. I noticed I forgot to actually fix up the error paths, s

[PATCH net-next 1/9] net: dsa: mv88e6xxx: move PVT description in info

2017-03-29 Thread Vivien Didelot
Not all Marvell switch chips feature a Cross-chip Port VLAN Table (PVT). Chips with a PVT use the same implementation, so a new mv88e6xxx_ops member won't be necessary yet. Add a "pvt" boolean member to the mv88e6xxx_info structure and kill the obsolete MV88E6XXX_FLAGS_PVT flag. Add a mv88e6xxx_h

[PATCH net-next 2/9] net: dsa: mv88e6xxx: use 4-bit port for PVT data

2017-03-29 Thread Vivien Didelot
The Cross-chip Port Based VLAN Table (PVT) supports two indexing modes, one using 5-bit for device and 4-bit for port, the other using 4-bit for device and 5-bit for port, configured via the Global 2 Misc register. Only 4 bits for the source port are needed when interconnecting 88E6xxx switch devi

[PATCH net-next 5/9] net: dsa: mv88e6xxx: rework in-chip bridging

2017-03-29 Thread Vivien Didelot
All ports -- internal and external, for chips featuring a PVT -- have a mask restricting to which internal ports a frame is allowed to egress. Now that DSA exposes the number of ports and their bridge devices, it is possible to extract the code generating the VLAN map and make it generic so that i

[PATCH net-next 9/9] net: dsa: mv88e6xxx: add cross-chip bridging

2017-03-29 Thread Vivien Didelot
Implement the DSA cross-chip bridging operations by remapping the local ports an external source port can egress frames to, when this cross-chip port joins or leaves a bridge. The PVT is no longer configured with all ones allowing any external frame to egress any local port. Only DSA and CPU ports

[PATCH net-next 8/9] net: dsa: add cross-chip bridging operations

2017-03-29 Thread Vivien Didelot
Introduce crosschip_bridge_{join,leave} operations in the dsa_switch_ops structure, which can be used by switches supporting interconnection. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 8 net/dsa/switch.c | 12 ++-- 2 files changed, 14 insertions(+), 6 deletions(-)

[PATCH net-next 7/9] net: dsa: mv88e6xxx: remap existing bridge members

2017-03-29 Thread Vivien Didelot
When a local port of a switch chip becomes a member of a bridge group, we need to reprogram the Cross-chip Port Based VLAN Table (PVT) to allow existing cross-chip bridge members to egress frames on the new ports. There is no functional changes yet, since the PVT is still programmed with all ones,

[PATCH net-next 3/9] net: dsa: mv88e6xxx: program the PVT with all ones

2017-03-29 Thread Vivien Didelot
The Cross-chip Port Based VLAN Table (PVT) is currently initialized with all ones, allowing any external ports to egress frames on local ports. This commit implements the PVT access functions and programs the PVT with all ones for the local switch ports only, instead of using the Init operation. T

[PATCH net-next 4/9] net: dsa: mv88e6xxx: allocate the number of ports

2017-03-29 Thread Vivien Didelot
The current code allocates DSA_MAX_PORTS ports for a Marvell dsa_switch structure. Provide the exact number of ports so the corresponding ds->num_ports is accurate. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[PATCH net-next 6/9] net: dsa: mv88e6xxx: factorize in-chip bridge map

2017-03-29 Thread Vivien Didelot
Factorize the code in the DSA port_bridge_{join,leave} routines used to program the port VLAN map of all local ports of a given bridge group. In the meantime shorten the _mv88e6xxx_port_based_vlan_map to get rid of the old underscore prefix naming convention. Signed-off-by: Vivien Didelot --- d

[PATCH net-next 0/9] net: dsa: mv88e6xxx: program cross-chip bridging

2017-03-29 Thread Vivien Didelot
The purpose of this patch series is to bring hardware cross-chip bridging configuration to the DSA layer and the mv88e6xxx DSA driver. Most recent Marvell switch chips have a Cross-chip Port Based VLAN Table (PVT) used to restrict to which internal destination port an arbitrary external source por

Re: [PATCH 2/2] net: ipv4: Use BIT macro.

2017-03-29 Thread Eric Dumazet
On Thu, 2017-03-30 at 00:46 +0530, Varsha Rao wrote: > Replace bitwise left shift by one operations with BIT() macro. This patch > fixes the checkpatch issue. > > Signed-off-by: Varsha Rao > --- > net/ipv4/tcp_bbr.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/ne

[PATCH net-next] virtio_net: don't reset twice on XDP on/off

2017-03-29 Thread Michael S. Tsirkin
We already do a reset once in remove_vq_common - there appears to be no point in doing another one when we add/remove XDP. Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index d

Re: in_irq_or_nmi() and RFC patch

2017-03-29 Thread Jesper Dangaard Brouer
On Wed, 29 Mar 2017 21:11:44 +0200 Jesper Dangaard Brouer wrote: > On Wed, 29 Mar 2017 11:12:26 -0700 Matthew Wilcox wrote: > > > On Wed, Mar 29, 2017 at 11:19:49AM +0200, Peter Zijlstra wrote: > > > On Wed, Mar 29, 2017 at 10:59:28AM +0200, Jesper Dangaard Brouer wrote: > > > > > > > On

[PATCH RESEND net-next] net: dsa: mv88e6xxx: debug ATU Age Time

2017-03-29 Thread Vivien Didelot
The ATU ageing time value programmed in the switch is rounded up to the nearest multiple of its coefficient (variable depending on the model.) Add a debug message to inform the user about the exact programmed value. On 6352, "brctl setageing br0 18" gives "AgeTime set to 0x01 (15000 ms)" while on

[PATCH 2/2] net: ipv4: Use BIT macro.

2017-03-29 Thread Varsha Rao
Replace bitwise left shift by one operations with BIT() macro. This patch fixes the checkpatch issue. Signed-off-by: Varsha Rao --- net/ipv4/tcp_bbr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c index 4da4bc1..9f2c869 100644 ---

[PATCH 1/2] net: ipv4: Use macro DIV_ROUND_UP.

2017-03-29 Thread Varsha Rao
The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It simplifies the divisor calculations. This was done using the following coccinelle script: @@ expression e1; expression e2; @@ ( - ((e1) + e2 - 1) / (e2) + DIV_ROUND_UP(e1,e2) | - ((e1) + (e2 - 1)) / (e2) + DIV_ROUND_UP(e1,e

[PATCH 0/2] net: ipv4: Use DIV_ROUND_UP and BIT macros.

2017-03-29 Thread Varsha Rao
This patchset uses DIV_ROUND_UP and BIT macros to simplify computations in tcp_bbr.c file. Varsha Rao (2): net: ipv4: Use DIV_ROUND_UP macro. net: ipv4: Use BIT macro. net/ipv4/tcp_bbr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.9.3

Re: in_irq_or_nmi()

2017-03-29 Thread Jesper Dangaard Brouer
On Wed, 29 Mar 2017 11:12:26 -0700 Matthew Wilcox wrote: > On Wed, Mar 29, 2017 at 11:19:49AM +0200, Peter Zijlstra wrote: > > On Wed, Mar 29, 2017 at 10:59:28AM +0200, Jesper Dangaard Brouer wrote: > > > On Wed, 29 Mar 2017 10:12:19 +0200 > > > Peter Zijlstra wrote: > > > > No, that's horr

Re: [PATCH net-next] rtnl: Add support for netdev event to link messages

2017-03-29 Thread David Ahern
On 3/29/17 11:05 AM, Vlad Yasevich wrote: > On 03/29/2017 12:37 PM, Roopa Prabhu wrote: >> On 3/29/17, 5:23 AM, Vlad Yasevich wrote: >>> [ resending to list. hit the wrong reply button last time ] >>> >>> On 03/27/2017 06:58 PM, David Miller wrote: From: Vladislav Yasevich Date: Sat, 25

Re: [PATCH][bluetooth-next][V2] ieee802154: ca8210: Add checks for kmalloc allocation failures

2017-03-29 Thread Marcel Holtmann
Hi Colin, > Ensure we don't end up with a null pointer dereferences by checking > for for allocation failures. Allocate by sizeof(*ptr) rather than > the type to fix checkpack warnings. Also merge multiple lines into > one line for the kmalloc call. > > Detected by CoverityScan, CID#1422435 ("D

Re: [PATCH] Add checks for kmalloc allocation failures

2017-03-29 Thread walter harms
Am 29.03.2017 17:54, schrieb Colin King: > From: Colin Ian King > > Ensure we don't end up with a null pointer dereferences by checking > for for allocation failures. Allocate by sizeof(*ptr) rather than > the type to fix checkpack warnings. Also merge multiple lines into > one line for the k

Re: [PATCH][bluetooth-next][V2] ieee802154: ca8210: Add checks for kmalloc allocation failures

2017-03-29 Thread Marcel Holtmann
Hi Dave, >> drivers/net/ieee802154/ca8210.c | 18 ++ > > This file doesn't exist in any of my trees. > because we have not send you a bluetooth-next pull request yet. I review it and take it through my tree first. Regards Marcel

Re: [pull request][net-next 00/12] Mellanox mlx5 offloading of TC pedit (header re-write) action

2017-03-29 Thread David Miller
From: Saeed Mahameed Date: Wed, 29 Mar 2017 02:27:01 +0300 > The following changes from Or Gerlitz provide mlx5 offloading support of > TC pedit (header re-write) action. > > For more information please see below. > > Please pull and let me know if there's any problem. Pulled, thanks!

Re: [PATCH][V2] VSOCK: remove unnecessary ternary operator on return value

2017-03-29 Thread Stefan Hajnoczi
On Wed, Mar 29, 2017 at 04:33:55PM +0100, Colin King wrote: > From: Colin Ian King > > Rather than assign the positive errno values to ret and then > checking if it is positive and flip the sign, just return the > errno value. > > Detected by CoverityScan, CID#986649 ("Logically Dead Code") > >

Re: in_irq_or_nmi()

2017-03-29 Thread Matthew Wilcox
On Wed, Mar 29, 2017 at 11:19:49AM +0200, Peter Zijlstra wrote: > On Wed, Mar 29, 2017 at 10:59:28AM +0200, Jesper Dangaard Brouer wrote: > > On Wed, 29 Mar 2017 10:12:19 +0200 > > Peter Zijlstra wrote: > > > No, that's horrible. Also, wth is this about? A memory allocator that > > > needs in_nmi(

Re: [RFC TLS Offload Support 00/15] cover letter

2017-03-29 Thread Hannes Frederic Sowa
Hello, On 29.03.2017 19:41, David Miller wrote: > From: Aviad Yehezkel > Date: Tue, 28 Mar 2017 16:26:17 +0300 > >> TLS Tx crypto offload is a new feature of network devices. It >> enables the kernel TLS socket to skip encryption and authentication >> operations on the transmit side of the data

Re: [PATCH net] ftgmac100: Mostly rewrite the driver

2017-03-29 Thread Florian Fainelli
On 03/28/2017 10:18 PM, Benjamin Herrenschmidt wrote: > On Tue, 2017-03-28 at 22:10 -0700, David Miller wrote: >> Do you prefer that I submit it as a new driver for that IP block >>> instead and take out the old one later ? >> >> You've decided to do this work in a way that makes it nearly >> impo

  1   2   3   >