RE: [patch net] net: fec: fix compile with CONFIG_M5272

2016-12-04 Thread Andy Duan
From: Nikita Yushchenko Sent: Sunday, December 04, 2016 11:18 PM >To: David S. Miller ; Andy Duan >; Troy Kisky ; >Andrew Lunn ; Eric Nelson ; Philippe

Re: [PATCH v2 net-next 1/4] bpf: xdp: Allow head adjustment in XDP prog

2016-12-04 Thread Jesper Dangaard Brouer
On Sat, 3 Dec 2016 19:17:23 -0800 Martin KaFai Lau wrote: > This patch allows XDP prog to extend/remove the packet > data at the head (like adding or removing header). It is > done by adding a new XDP helper bpf_xdp_adjust_head(). > > It also renames

[v2 PATCH] netlink: Do not schedule work from sk_destruct

2016-12-04 Thread Herbert Xu
On Mon, Dec 05, 2016 at 03:19:46PM +0800, Herbert Xu wrote: > > Thanks for the patch. It'll obviously work but I wanted avoid that > because it penalises the common path for the rare case. > > Andrey, please try this patch and let me know if it's any better. > > ---8<--- > Subject: netlink: Do

Re: net: use-after-free in worker_thread

2016-12-04 Thread Herbert Xu
On Sat, Dec 03, 2016 at 05:49:07AM -0800, Eric Dumazet wrote: > > @@ -600,6 +600,7 @@ static int __netlink_create(struct net *net, struct > socket *sock, > } > init_waitqueue_head(>wait); > > + sock_set_flag(sk, SOCK_RCU_FREE); > sk->sk_destruct = netlink_sock_destruct; >

Re: [PATCH net-next 3/3] net: ethoc: Demote packet dropped error message to debug

2016-12-04 Thread Tobias Klauser
On 2016-12-04 at 21:40:30 +0100, Florian Fainelli wrote: > Spamming the console with: net eth1: packet dropped can happen > fairly frequently if the adapter is busy transmitting, demote the > message to a debug print. > > Signed-off-by: Florian Fainelli

Re: net: use-after-free in worker_thread

2016-12-04 Thread Herbert Xu
On Sat, Dec 03, 2016 at 10:14:48AM -0800, Cong Wang wrote: > On Sat, Dec 3, 2016 at 9:41 AM, Cong Wang wrote: > > On Sat, Dec 3, 2016 at 4:56 AM, Andrey Konovalov > > wrote: > >> Hi! > >> > >> I'm seeing lots of the following error reports while

Re: [PATCH net-next 1/3] net: ethoc: Account for duplex changes

2016-12-04 Thread Tobias Klauser
On 2016-12-04 at 21:40:28 +0100, Florian Fainelli wrote: > ethoc_mdio_poll() which is our PHYLIB adjust_link callback does nothing, > we should at least react to duplex changes and change MODER accordingly. > Speed changes is not a problem, since the OpenCores Ethernet core

Re: [PATCH net-next 2/3] net: ethoc: Utilize of_get_mac_address()

2016-12-04 Thread Tobias Klauser
On 2016-12-04 at 21:40:29 +0100, Florian Fainelli wrote: > Do not open code getting the MAC address exclusively from the > "local-mac-address" property, but instead use of_get_mac_address() which > looks up the MAC address using the 3 typical property names. > >

[net-next][PATCH 03/18] RDS: IB: include faddr in connection log

2016-12-04 Thread Santosh Shilimkar
Also use pr_* for it. Signed-off-by: Santosh Shilimkar --- net/rds/ib_cm.c | 19 +-- net/rds/ib_recv.c | 4 ++-- net/rds/ib_send.c | 4 ++-- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index

[net-next][PATCH 18/18] RDS: IB: add missing connection cache usage info

2016-12-04 Thread Santosh Shilimkar
rds-tools already support it. Signed-off-by: Santosh Shilimkar --- include/uapi/linux/rds.h | 1 + net/rds/ib.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h index 3833113..410ae3c 100644 ---

[net-next][PATCH 01/18] RDS: log the address on bind failure

2016-12-04 Thread Santosh Shilimkar
It's useful to know the IP address when RDS fails to bind a connection. Thus, adding it to the error message. Orabug: 21894138 Reviewed-by: Wei Lin Guay Signed-off-by: Santosh Shilimkar --- net/rds/bind.c | 4 ++-- 1 file changed, 2

[net-next][PATCH 05/18] RDS: RDMA: fix the ib_map_mr_sg_zbva() argument

2016-12-04 Thread Santosh Shilimkar
Fixes warning: Using plain integer as NULL pointer Signed-off-by: Santosh Shilimkar --- net/rds/ib_frmr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/rds/ib_frmr.c b/net/rds/ib_frmr.c index d921adc..66b3d62 100644 ---

[net-next][PATCH 11/18] RDS: IB: add few useful cache stasts

2016-12-04 Thread Santosh Shilimkar
Tracks the ib receive cache total, incoming and frag allocations. Signed-off-by: Santosh Shilimkar --- net/rds/ib.h | 7 +++ net/rds/ib_recv.c | 6 ++ net/rds/ib_stats.c | 2 ++ 3 files changed, 15 insertions(+) diff --git a/net/rds/ib.h

[net-next][PATCH 15/18] RDS: add stat for socket recv memory usage

2016-12-04 Thread Santosh Shilimkar
From: Venkat Venkatsubra Tracks the receive side memory added to scokets and removed from sockets. Signed-off-by: Venkat Venkatsubra Signed-off-by: Santosh Shilimkar --- net/rds/rds.h | 3 +++

[net-next][PATCH 04/18] RDS: IB: make the transport retry count smallest

2016-12-04 Thread Santosh Shilimkar
Transport retry is not much useful since it indicate packet loss in fabric so its better to failover fast rather than longer retry. Signed-off-by: Santosh Shilimkar --- net/rds/ib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rds/ib.h

[net-next][PATCH 16/18] RDS: make message size limit compliant with spec

2016-12-04 Thread Santosh Shilimkar
From: Avinash Repaka RDS support max message size as 1M but the code doesn't check this in all cases. Patch fixes it for RDMA & non-RDMA and RDS MR size and its enforced irrespective of underlying transport. Signed-off-by: Avinash Repaka

[net-next][PATCH 00/18] net: RDS updates

2016-12-04 Thread Santosh Shilimkar
Series consist of: - RDMA transport fixes for map failure, listen sequence, handler panic and composite message notification. - Couple of sparse fixes. - Message logging improvements for bind failure, use once mr semantics and connection remote address, active end point. - Performance

[net-next][PATCH 02/18] RDS: mark few internal functions static to make sparse build happy

2016-12-04 Thread Santosh Shilimkar
Fixes below warnings: warning: symbol 'rds_send_probe' was not declared. Should it be static? warning: symbol 'rds_send_ping' was not declared. Should it be static? warning: symbol 'rds_tcp_accept_one_path' was not declared. Should it be static? warning: symbol 'rds_walk_conn_path_info' was not

[net-next][PATCH 06/18] RDS: RDMA: start rdma listening after init

2016-12-04 Thread Santosh Shilimkar
From: Qing Huang This prevents RDS from handling incoming rdma packets before RDS completes initializing its recv/send components. Signed-off-by: Qing Huang Signed-off-by: Santosh Shilimkar ---

[net-next][PATCH 10/18] RDS: IB: track and log active side endpoint in connection

2016-12-04 Thread Santosh Shilimkar
Useful to know the active and passive end points in a RDS IB connection. Signed-off-by: Santosh Shilimkar --- net/rds/ib.h| 3 +++ net/rds/ib_cm.c | 11 +++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/net/rds/ib.h b/net/rds/ib.h

[net-next][PATCH 17/18] RDS: add receive message trace used by application

2016-12-04 Thread Santosh Shilimkar
Socket option to tap receive path latency in various stages in nano seconds. It can be enabled on selective sockets using using SO_RDS_MSG_RXPATH_LATENCY socket option. RDS will return the data to application with RDS_CMSG_RXPATH_LATENCY in defined format. Scope is left to add more trace points

[net-next][PATCH 07/18] RDS: RDMA: return appropriate error on rdma map failures

2016-12-04 Thread Santosh Shilimkar
The first message to a remote node should prompt a new connection even if it is RDMA operation. For RDMA operation the MR mapping can fail because connections is not yet up. Since the connection establishment is asynchronous, we make sure the map failure because of unavailable connection reach to

[net-next][PATCH 13/18] RDS: RDMA: Fix the composite message user notification

2016-12-04 Thread Santosh Shilimkar
When application sends an RDS RDMA composite message consist of RDMA transfer to be followed up by non RDMA payload, it expect to be notified *only* when the full message gets delivered. RDS RDMA notification doesn't behave this way though. Thanks to Venkat for debug and root casuing the issue

[net-next][PATCH 08/18] RDS: IB: split the mr registration and invalidation path

2016-12-04 Thread Santosh Shilimkar
MR invalidation in RDS is done in background thread and not in data path like registration. So break the dependency between them which helps to remove the performance bottleneck. Signed-off-by: Santosh Shilimkar --- net/rds/ib.h | 4 +++- net/rds/ib_cm.c |

[net-next][PATCH 09/18] RDS: RDMA: silence the use_once mr log flood

2016-12-04 Thread Santosh Shilimkar
In absence of extension headers, message log will keep flooding the console. As such even without use_once we can clean up the MRs so its not really an error case message so make it debug message Signed-off-by: Santosh Shilimkar --- net/rds/rdma.c | 3 ++- 1 file

[net-next][PATCH 14/18] RDS: IB: fix panic due to handlers running post teardown

2016-12-04 Thread Santosh Shilimkar
Shutdown code reaping loop takes care of emptying the CQ's before they being destroyed. And once tasklets are killed, the hanlders are not expected to run. But because of core tasklet code issues, tasklet handler could still run even after tasklet_kill, RDS IB shutdown code already reaps the CQs

[net-next][PATCH 12/18] RDS: IB: Add vector spreading for cqs

2016-12-04 Thread Santosh Shilimkar
Based on available device vectors, allocate cqs accordingly to get better spread of completion vectors which helps performace great deal.. Signed-off-by: Santosh Shilimkar --- net/rds/ib.c| 11 +++ net/rds/ib.h| 5 + net/rds/ib_cm.c | 40

[PATCH 07/28] bnxt_en: Add interface to support RDMA driver.

2016-12-04 Thread Selvin Xavier
From: Michael Chan Since the network driver and RDMA driver operate on the same PCI function, we need to create an interface to allow the RDMA driver to share resources with the network driver. 1. Create a new bnxt_en_dev struct which will be returned by

[PATCH 04/28] bnxt_en: Improve completion ring allocation for VFs.

2016-12-04 Thread Selvin Xavier
From: Michael Chan All available remaining completion rings not used by the PF should be made available for the VFs so that there are enough rings in the VF to support RDMA. The earlier workaround code of capping the rings by the statistics context is removed. When

[PATCH 03/28] bnxt_en: Move function reset to bnxt_init_one().

2016-12-04 Thread Selvin Xavier
From: Michael Chan Now that MSIX is enabled in bnxt_init_one(), resources may be allocated by the RDMA driver before the network device is opened. So we cannot do function reset in bnxt_open() which will clear all the resources. The proper place to do function reset

[PATCH 06/28] bnxt_en: Refactor the driver registration function with firmware.

2016-12-04 Thread Selvin Xavier
From: Michael Chan The driver register function with firmware consists of passing version information and registering for async events. To support the RDMA driver, the async events that we need to register may change. Separate the driver register function into 2

[PATCH 05/28] bnxt_en: Reserve RDMA resources by default.

2016-12-04 Thread Selvin Xavier
From: Michael Chan If the device supports RDMA, we'll setup network default rings so that there are enough minimum resources for RDMA, if possible. However, the user can still increase network rings to the max if he wants. The actual RDMA resources won't be reserved

[PATCH 01/28] bnxt_en: Add bnxt_set_max_func_irqs().

2016-12-04 Thread Selvin Xavier
From: Michael Chan By refactoring existing code into this new function. The new function will be used in subsequent patches. Cc: David Miller Cc: Signed-off-by: Michael Chan Signed-off-by:

[PATCH 02/28] bnxt_en: Enable MSIX early in bnxt_init_one().

2016-12-04 Thread Selvin Xavier
From: Michael Chan To better support the new RDMA driver, we need to move pci_enable_msix() from bnxt_open() to bnxt_init_one(). This way, MSIX vectors are available to the RDMA driver whether the network device is up or down. Part of the existing

Re: [PATCH V2 net 10/20] net/ena: remove redundant logic in napi callback for busy poll mode

2016-12-04 Thread Eric Dumazet
On Sun, 2016-12-04 at 15:19 +0200, Netanel Belgazal wrote: > sk_busy_loop can call the napi callback few million times a sec. > For each call there is unmask interrupt. > We want to reduce the number of unmasks. > > Add an atomic variable that will tell the napi handler if > it was called from

Re: [PATCH] iproute2: ss: escape all null bytes in abstract unix domain socket

2016-12-04 Thread Isaac Boukris
On Sat, Dec 3, 2016 at 1:24 AM, Eric Dumazet wrote: > On Fri, 2016-12-02 at 15:18 -0800, Stephen Hemminger wrote: >> name[i] = '@'; >> > >> > ss.c: In function 'unix_show_sock': >> > ss.c:3128:4: error: 'for' loop initial declarations

Re: [PATCH V2 net 13/20] net/ena: change driver's default timeouts

2016-12-04 Thread Matt Wilson
On Sun, Dec 04, 2016 at 03:19:31PM +0200, Netanel Belgazal wrote: ... because? (they turned out to be too aggressive, I believe.) > Signed-off-by: Netanel Belgazal > --- > drivers/net/ethernet/amazon/ena/ena_com.c| 4 ++-- >

Re: [PATCH V2 net 08/20] net/ena: add hardware hints capability to the driver

2016-12-04 Thread Matt Wilson
On Sun, Dec 04, 2016 at 03:19:26PM +0200, Netanel Belgazal wrote: > The ENA device can update the ena driver about the desire timeouts. > The hardware hints are transmitted as Asynchronous event to the driver. This is really a new feature, not a bugfix - correct? If it is a new feature, submit it

Re: [PATCH V2 net 06/20] net/ena: fix NULL dereference when removing the driver after device reset faild

2016-12-04 Thread Matt Wilson
On Sun, Dec 04, 2016 at 03:19:24PM +0200, Netanel Belgazal wrote: > If for some reason the device stop responding and the device reset failed > to recover the device, the mmio register read datastructure will not be > reinitialized. If for some reason the device stops responding, and the device

Re: [PATCH V2 net 05/20] net/ena: fix RSS default hash configuration

2016-12-04 Thread Matt Wilson
On Sun, Dec 04, 2016 at 03:19:23PM +0200, Netanel Belgazal wrote: > ENA default hash configure IPv4_frag hash twice instead of configure -> configures. You may want to include "erroneously". What is the consequence of this bug? > configure non ip packets. configuring non-IP packets. --msw >

Re: [PATCH V2 net 04/20] net/ena: fix ethtool RSS flow configuration

2016-12-04 Thread Matt Wilson
On Sun, Dec 04, 2016 at 03:19:22PM +0200, Netanel Belgazal wrote: > ena_flow_data_to_flow_hash and ena_flow_hash_to_flow_type > treat the ena_flow_hash_to_flow_type enum as power of two values. > > Change the values of ena_admin_flow_hash_fields to be power of two values. Then I generally prefer

Re: [PATCH V2 net 03/20] net/ena: fix queues number calculation

2016-12-04 Thread Matt Wilson
On Sun, Dec 04, 2016 at 03:19:21PM +0200, Netanel Belgazal wrote: > The ENA driver tries to open a queue per vCPU. > To determine how many vCPUs the instance have it uses num_possible_cpus > while it should have use num_online_cpus instead. use () when referring to functions: num_possible_cpus(),

Re: [PATCH V2 net 02/20] net/ena: fix error handling when probe fails

2016-12-04 Thread Matt Wilson
On Sun, Dec 04, 2016 at 03:19:20PM +0200, Netanel Belgazal wrote: > When driver fails in probe, it will release all resources, including > adapter. > In case of probe failure, ena_remove should not try to free the adapter > resources. Please word wrap your commit message around 75 columns. >

Re: [PATCH V2 net 01/20] net/ena: remove ntuple filter support from device feature list

2016-12-04 Thread Matt Wilson
On Sun, Dec 04, 2016 at 03:19:19PM +0200, Netanel Belgazal wrote: > Remove NETIF_F_NTUPLE from netdev->features. > The ENA device driver does not support ntuple filtering. > > Signed-off-by: Netanel Belgazal Reviewed-by: Matt Wilson > --- >

Re: "af_unix: conditionally use freezable blocking calls in read" is wrong

2016-12-04 Thread Al Viro
On Sun, Dec 04, 2016 at 09:42:14PM -0500, David Miller wrote: > > I've run into that converting AF_UNIX to generic_file_splice_read(); > > I can kludge around that ("freezable unless ->msg_iter is ITER_PIPE"), but > > that only delays trouble. > > > > Note that the only other user of

[PATCH] ixgbe: initialize u64_stats_sync structures early at ixgbe_probe

2016-12-04 Thread Liwei Song
Fix the following CallTrace: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 71 PID: 1 Comm: swapper/0 Not tainted 4.8.8-WR9.0.0.1_standard #11 Hardware name: Intel Corporation S2600WTT/S2600WTT, BIOS

Re: [PATCH] net: ping: check minimum size on ICMP header length

2016-12-04 Thread Lorenzo Colitti
On Sat, Dec 3, 2016 at 9:58 AM, Kees Cook wrote: > - if (len > 0x) > + if (len > 0x || len < icmph_len) > return -EMSGSIZE; EMSGSIZE usually means the message is too long. Maybe use EINVAL? That's what the code will return if the

Re: [PATCH V2 net 00/20] Increase ENA driver version to 1.1.2

2016-12-04 Thread Matt Wilson
On Sun, Dec 04, 2016 at 09:37:43PM -0500, David Miller wrote: > > It is not appropriate to submit so many patches at one time. Indeed, https://www.kernel.org/doc/Documentation/SubmittingPatches recommends submitting no more than 15 or so at once. > Please keep your patch series to no more than

[PATCH net] net: ep93xx_eth: Do not crash unloading module

2016-12-04 Thread Florian Fainelli
When we unload the ep93xx_eth, whether we have opened the network interface or not, we will either hit a kernel paging request error, or a simple NULL pointer de-reference because: - if ep93xx_open has been called, we have created a valid DMA mapping for ep->descs, when we call ep93xx_stop, we

Re: [Patch net-next] act_mirred: fix a typo in get_dev

2016-12-04 Thread Hadar Hen Zion
On 12/3/2016 8:36 PM, Cong Wang wrote: Cc: Hadar Hen Zion Cc: Jiri Pirko Signed-off-by: Cong Wang --- net/sched/act_mirred.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/act_mirred.c

Re: [RFC PATCH 2/2] Documentation: devictree: Add macb mdio bindings

2016-12-04 Thread Harini Katakam
Hi Florian, On Sun, Dec 4, 2016 at 4:10 AM, Florian Fainelli wrote: > Le 12/03/16 à 13:35, Rob Herring a écrit : >> On Mon, Nov 28, 2016 at 03:19:27PM +0530, Harini Katakam wrote: >>> +- reg: Address and length of the register set of MAC to be used >>> +- clock-names: Tuple

Re: [RFC PATCH 2/2] Documentation: devictree: Add macb mdio bindings

2016-12-04 Thread Harini Katakam
Hi Rob, Thanks for the review. On Sun, Dec 4, 2016 at 3:05 AM, Rob Herring wrote: > On Mon, Nov 28, 2016 at 03:19:27PM +0530, Harini Katakam wrote: >> +Required properties: >> +- compatible: Should be "cdns,macb-mdio" > > Only one version ever? This needs more specific

Re: "af_unix: conditionally use freezable blocking calls in read" is wrong

2016-12-04 Thread David Miller
From: Al Viro Date: Sun, 4 Dec 2016 21:04:55 + > Could we please kill that kludge? "af_unix: use freezable blocking > calls in read" had been wrong to start with; having a method make assumptions > of that sort ("nobody will call me while holding locks I

Re: [PATCH v2 net-next 8/8] tcp: tsq: move tsq_flags close to sk_wmem_alloc

2016-12-04 Thread Eric Dumazet
On Sat, Dec 3, 2016 at 5:37 PM, David Miller wrote: > > Sorry, just noticed by visual inspection. I expected the > struct sock part to show up in the same patch as the one > that removed it from tcp_sock and adjusted the users. > > I'll re-review this series, thanks. Yes,

[RFC] udp: some improvements on RX path.

2016-12-04 Thread Eric Dumazet
We currently access 3 cache lines from an skb in receive queue while holding receive queue lock : First cache line (contains ->next / prev pointers ) 2nd cache line (skb->peeked) 3rd cache line (skb->truesize) I believe we could get rid of skb->peeked completely. I will cook a patch, but

Re: [PATCH V2 net 00/20] Increase ENA driver version to 1.1.2

2016-12-04 Thread David Miller
It is not appropriate to submit so many patches at one time. Please keep your patch series to no more than about a dozen at a time. Also, group your changes logically and tie an appropriately descriptive cover letter. "Increase driver version to X.Y.Z" tells the reader absolutely nothing.

Re: [PATCH v2 net-next 8/8] tcp: tsq: move tsq_flags close to sk_wmem_alloc

2016-12-04 Thread David Miller
From: Eric Dumazet Date: Sat, 03 Dec 2016 17:13:51 -0800 > On Sat, 2016-12-03 at 19:16 -0500, David Miller wrote: >> From: Eric Dumazet >> Date: Sat, 3 Dec 2016 11:14:57 -0800 >> >> > diff --git a/include/linux/tcp.h b/include/linux/tcp.h >> >

Re: [PATCH v2 main-v4.9-rc7] net/ipv6: allow sysctl to change link-local address generation mode

2016-12-04 Thread Roopa Prabhu
On 12/4/16, 2:31 PM, Felix Jia wrote: > Removed the rtnl lock and switch to use RCU lock to iterate through > the netdev list. > > The address generation mode for IPv6 link-local can only be configured > by netlink messages. This patch adds the ability to change the address > generation mode via

Re: [PATCH v3 net-next 3/3] openvswitch: Fix skb->protocol for vlan frames.

2016-12-04 Thread Pravin Shelar
On Fri, Dec 2, 2016 at 1:42 AM, Jiri Benc wrote: > On Thu, 1 Dec 2016 12:31:09 -0800, Pravin Shelar wrote: >> On Wed, Nov 30, 2016 at 6:30 AM, Jiri Benc wrote: >> > I'm not opposed to changing this but I'm afraid it needs much deeper >> > review. Because with

Re: [PATCH v2 net-next 3/4] mlx4: xdp: Reserve headroom for receiving packet when XDP prog is active

2016-12-04 Thread Saeed Mahameed
On Sun, Dec 4, 2016 at 5:17 AM, Martin KaFai Lau wrote: > Reserve XDP_PACKET_HEADROOM and honor bpf_xdp_adjust_head() > when XDP prog is active. This patch only affects the code > path when XDP is active. > > Signed-off-by: Martin KaFai Lau > --- Hi Martin, Sorry

Re: [PATCH net-next 2/4] mlx4: xdp: Allow raising MTU up to one page minus eth and vlan hdrs

2016-12-04 Thread Eric Dumazet
On Mon, 2016-12-05 at 01:31 +0200, Saeed Mahameed wrote: > Alexei, we should start considering PPC archs for XDP use cases, > demanding page per packet on those archs is a little bit heavy > requirement Well, 'little' is an understatement ;) Note that PPC had serious problems before commit

Re: [PATCH v1 net-next 1/5] net: dsa: mv88e6xxx: Reserved Management frames to CPU

2016-12-04 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> You can have several implementations in the same file (e.g. global1.c), >> so again the only value is the function name, not the struct member. > > The structure member have g1_ has a lot of value. > > if (chip->info->ops->set_cpu_port)

Re: [PATCH v3 net-next 2/3] openvswitch: Use is_skb_forwardable() for length check.

2016-12-04 Thread Pravin Shelar
On Fri, Dec 2, 2016 at 1:25 AM, Jiri Benc wrote: > On Thu, 1 Dec 2016 11:50:00 -0800, Pravin Shelar wrote: >> This is not changing any behavior compared to current OVS vlan checks. >> Single vlan header is not considered for MTU check. > > It is changing it. > > Consider the

Re: [PATCH net-next 2/4] mlx4: xdp: Allow raising MTU up to one page minus eth and vlan hdrs

2016-12-04 Thread Saeed Mahameed
On Sat, Dec 3, 2016 at 2:53 AM, Alexei Starovoitov wrote: > On 12/2/16 4:38 PM, Eric Dumazet wrote: >> >> On Fri, 2016-12-02 at 15:23 -0800, Martin KaFai Lau wrote: >>> >>> When XDP prog is attached, it is currently limiting >>> MTU to be FRAG_SZ0 - ETH_HLEN - (2 * VLAN_HLEN) which

Re: [PATCH] mlx4: Use kernel sizeof and alloc styles

2016-12-04 Thread Joe Perches
On Sun, 2016-12-04 at 12:58 -0800, Eric Dumazet wrote: > On Sun, 2016-12-04 at 12:11 -0800, Joe Perches wrote: > > Convert sizeof foo to sizeof(foo) and allocations with multiplications > > to the appropriate kcalloc/kmalloc_array styles. > > > > Signed-off-by: Joe Perches > >

Re: [PATCH v1 net-next 1/5] net: dsa: mv88e6xxx: Reserved Management frames to CPU

2016-12-04 Thread Andrew Lunn
> You can have several implementations in the same file (e.g. global1.c), > so again the only value is the function name, not the struct member. The structure member have g1_ has a lot of value. if (chip->info->ops->set_cpu_port) { err =

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

2016-12-04 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/ethernet/calxeda/xgmac.c | 17 - 1 files changed, 8 insertions(+), 9 deletions(-) diff --git

[PATCH v2 main-v4.9-rc7] net/ipv6: allow sysctl to change link-local address generation mode

2016-12-04 Thread Felix Jia
Removed the rtnl lock and switch to use RCU lock to iterate through the netdev list. The address generation mode for IPv6 link-local can only be configured by netlink messages. This patch adds the ability to change the address generation mode via sysctl. An possible improvement is to remove the

[PATCH net-next 0/3] Minor BPF cleanups and digest

2016-12-04 Thread Daniel Borkmann
First two patches are minor cleanups, and the third one adds a prog digest. For details, please see individual patches. After this one, I have a set with tracepoint support that makes use of this facility as well. Thanks! Daniel Borkmann (3): bpf: remove type arg from __is_valid_{,xdp_}access

[PATCH net-next 1/3] bpf: remove type arg from __is_valid_{,xdp_}access

2016-12-04 Thread Daniel Borkmann
Commit d691f9e8d440 ("bpf: allow programs to write to certain skb fields") pushed access type check outside of __is_valid_access() to have different restrictions for socket filters and tc programs. type is thus not used anymore within __is_valid_access() and should be removed as a function

[PATCH net-next 3/3] bpf: add prog_digest and expose it via fdinfo/netlink

2016-12-04 Thread Daniel Borkmann
When loading a BPF program via bpf(2), calculate the digest over the program's instruction stream and store it in struct bpf_prog's digest member. This is done at a point in time before any instructions are rewritten by the verifier. Any unstable map file descriptor number part of the imm field

[PATCH net-next 2/3] bpf, cls: consolidate prog deletion path

2016-12-04 Thread Daniel Borkmann
Commit 18cdb37ebf4c ("net: sched: do not use tcf_proto 'tp' argument from call_rcu") removed the last usage of tp from cls_bpf_delete_prog(), so also remove it from the function as argument to not give a wrong impression. tp is illegal to access from this callback, since it could already have been

Re: [PATCH v1 net-next 1/5] net: dsa: mv88e6xxx: Reserved Management frames to CPU

2016-12-04 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> The mv88e6xxx_ops actually implements the *features*. They can be >> prefixed for clarity (e.g. .ppu_*, port_*, .atu_*, etc.). They don't >> describe the register layout. >> >> But we can discuss two ways of seeing this structure

Re: [PATCH net-next 2/3] net/act_pedit: Support using offset relative to the conventional network headers

2016-12-04 Thread Or Gerlitz
On Fri, Dec 2, 2016 at 12:40 PM, Amir Vadai wrote: > On Thu, Dec 01, 2016 at 02:41:14PM -0500, David Miller wrote: >> From: Amir Vadai >> Date: Wed, 30 Nov 2016 11:09:27 +0200 >> > +static int pedit_skb_hdr_offset(struct sk_buff *skb, >> > +

Re: [PATCH] mlx4: Use kernel sizeof and alloc styles

2016-12-04 Thread Eric Dumazet
On Sun, 2016-12-04 at 12:11 -0800, Joe Perches wrote: > Convert sizeof foo to sizeof(foo) and allocations with multiplications > to the appropriate kcalloc/kmalloc_array styles. > > Signed-off-by: Joe Perches > --- Gah. This is one of the hotest NIC driver on linux at this

"af_unix: conditionally use freezable blocking calls in read" is wrong

2016-12-04 Thread Al Viro
Could we please kill that kludge? "af_unix: use freezable blocking calls in read" had been wrong to start with; having a method make assumptions of that sort ("nobody will call me while holding locks I hadn't thought of") is asking for serious trouble. splice is just a place where

[PATCH net-next 1/3] net: ethoc: Account for duplex changes

2016-12-04 Thread Florian Fainelli
ethoc_mdio_poll() which is our PHYLIB adjust_link callback does nothing, we should at least react to duplex changes and change MODER accordingly. Speed changes is not a problem, since the OpenCores Ethernet core seems to be reacting okay without us telling it. Signed-off-by: Florian Fainelli

[PATCH net-next 0/3] net: ethoc: Misc improvements

2016-12-04 Thread Florian Fainelli
Hi all, This patch series fixes/improves a few things: - implement a proper PHYLIB adjust_link callback to set the duplex mode accordingly - do not open code the fetching of a MAC address in OF/DT environments - demote an error message that occurs more frequently than expected in low

[PATCH net-next 2/3] net: ethoc: Utilize of_get_mac_address()

2016-12-04 Thread Florian Fainelli
Do not open code getting the MAC address exclusively from the "local-mac-address" property, but instead use of_get_mac_address() which looks up the MAC address using the 3 typical property names. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/ethoc.c | 7 +++

[PATCH net-next 3/3] net: ethoc: Demote packet dropped error message to debug

2016-12-04 Thread Florian Fainelli
Spamming the console with: net eth1: packet dropped can happen fairly frequently if the adapter is busy transmitting, demote the message to a debug print. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/ethoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH v1 net-next 1/5] net: dsa: mv88e6xxx: Reserved Management frames to CPU

2016-12-04 Thread Andrew Lunn
> > +int mv88e6095_g2_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip) > > +{ > > + int err; > > + > > + /* Consider the frames with reserved multicast destination > > +* addresses matching 01:80:c2:00:00:2x as MGMT. > > +*/ > > + if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_G2_MGMT_EN_2X)) { >

Re: [GIT PULL nf-next 0/2] IPVS Updates for v4.10

2016-12-04 Thread Pablo Neira Ayuso
On Tue, Nov 15, 2016 at 10:01:41AM +0100, Simon Horman wrote: > Hi Pablo, > > please consider these enhancements to the IPVS for v4.10. > > * Decrement the IP ttl in all the modes in order to prevent infinite > route loops. Thanks to Dwip Banerjee. > * Use IS_ERR_OR_NULL macro. Clean-up from

[PATCH] mlx4: Use kernel sizeof and alloc styles

2016-12-04 Thread Joe Perches
Convert sizeof foo to sizeof(foo) and allocations with multiplications to the appropriate kcalloc/kmalloc_array styles. Signed-off-by: Joe Perches --- drivers/net/ethernet/mellanox/mlx4/alloc.c | 6 +++--- drivers/net/ethernet/mellanox/mlx4/cmd.c | 8

Re: [PATCH v1 net-next 1/5] net: dsa: mv88e6xxx: Reserved Management frames to CPU

2016-12-04 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > + /* Some generations have the configuration of sending reserved > + * management frames to the CPU in global2, others in > + * global1. Hence it does not fit the two setup functions > + * above. > + */ > + if

Re: [net-next PATCH v4 1/6] net: virtio dynamically disable/enable LRO

2016-12-04 Thread John Fastabend
On 16-12-03 09:36 PM, Michael S. Tsirkin wrote: > On Fri, Dec 02, 2016 at 12:49:45PM -0800, John Fastabend wrote: >> This adds support for dynamically setting the LRO feature flag. The >> message to control guest features in the backend uses the >> CTRL_GUEST_OFFLOADS msg type. >> >>

[PATCH v2 net-next] bnx2x: ethtool -x full support

2016-12-04 Thread Eric Dumazet
From: Eric Dumazet Implement ethtool -x full support, so that rss key can be fetched instead of assuming it matches /proc/sys/net/core/netdev_rss_key content. We might add "ethtool --rxfh" support later to set a different rss key. Tested: lpk51:~# ethtool --show-rxfh eth0

Re: Trigger EHOSTUNREACH

2016-12-04 Thread Neal Cardwell
On Sun, Dec 4, 2016 at 7:04 AM, Marco Zunino wrote: > Hallo everyone, hope you are having a good day > we are building a networking testing tool to simulate network error > condition, and we are having difficulties triggering the EHOSTUNREACH > socket error. > > We are

[PATCH v3 net-next] net_sched: gen_estimator: complete rewrite of rate estimators

2016-12-04 Thread Eric Dumazet
From: Eric Dumazet 1) Old code was hard to maintain, due to complex lock chains. (We probably will be able to remove some kfree_rcu() in callers) 2) Using a single timer to update all estimators does not scale. 3) Code was buggy on 32bit kernel (WRITE_ONCE() on 64bit

Re: [PATCN v2 net-next] net_sched: gen_estimator: complete rewrite of rate estimators

2016-12-04 Thread Eric Dumazet
On Sat, 2016-12-03 at 23:18 -0800, Eric Dumazet wrote: > From: Eric Dumazet > > 1) Old code was hard to maintain, due to complex lock chains. >(We probably will be able to remove some kfree_rcu() in callers) > > 2) Using a single timer to update all estimators does not

Re: [flamebait] xdp Was: Re: bpf bounded loops. Was: [flamebait] xdp

2016-12-04 Thread Hannes Frederic Sowa
Hello, On 03.12.2016 00:34, Alexei Starovoitov wrote: > On Fri, Dec 02, 2016 at 08:42:41PM +0100, Hannes Frederic Sowa wrote: >> On Fri, Dec 2, 2016, at 20:25, Hannes Frederic Sowa wrote: >>> On 02.12.2016 19:39, Alexei Starovoitov wrote: On Thu, Dec 01, 2016 at 10:27:12PM +0100, Hannes

[patch net] net: fec: fix compile with CONFIG_M5272

2016-12-04 Thread Nikita Yushchenko
Commit 4dfb80d18d05 ("net: fec: cache statistics while device is down") introduced unconditional statistics-related actions. However, when driver is compiled with CONFIG_M5272, staticsics-related definitions do not exist, which results into build errors. Fix that by adding needed #if

Re: [PATCH v2 net-next 1/4] bpf: xdp: Allow head adjustment in XDP prog

2016-12-04 Thread Daniel Borkmann
On 12/04/2016 04:17 AM, Martin KaFai Lau wrote: This patch allows XDP prog to extend/remove the packet data at the head (like adding or removing header). It is done by adding a new XDP helper bpf_xdp_adjust_head(). It also renames bpf_helper_changes_skb_data() to bpf_helper_changes_pkt_data()

[PATCH net-next] net/sched: cls_flower: Set the filter Hardware device for all use-cases

2016-12-04 Thread Hadar Hen Zion
Check if the returned device from tcf_exts_get_dev function supports tc offload and in case the rule can't be offloaded, set the filter hw_dev parameter to the original device given by the user. The filter hw_device parameter should always be set by fl_hw_replace_filter function, since this

967799855664878

2016-12-04 Thread ???
ÎÄṠÝ܊netdemon 967799855664878 23 ???.xls Description: application/msexcel

[PATCH net 0/2] bnx2x: fixes series

2016-12-04 Thread Yuval Mintz
Hi Dave, Two unrelated fixes for bnx2x - the first one is nice-to-have, while the other fixes fatal behaviour in older adapters. Please consider applying them to `net'. Thanks, Yuval Yuval Mintz (2): bnx2x: Correct ringparam estimate when interface is down bnx2x: Prevent tunnel

[PATCH net 2/2] bnx2x: Prevent tunnel config for 577xx

2016-12-04 Thread Yuval Mintz
Only the 578xx adapters are capable of configuring UDP ports for the purpose of tunnelling - doing the same on 577xx might lead to a firmware assertion. We're already not claiming support for any related feature for such devices, but we also need to prevent the configuration of the UDP ports to

[PATCH net 1/2] bnx2x: Correct ringparam estimate when DOWN

2016-12-04 Thread Yuval Mintz
Until interface is up [and assuming ringparams weren't explicitly configured] when queried for the size of its rings bnx2x would claim they're the maximal size by default. That is incorrect as by default the maximal number of buffers would be equally divided between the various rx rings. This

[PATCH V2 net 02/20] net/ena: fix error handling when probe fails

2016-12-04 Thread Netanel Belgazal
When driver fails in probe, it will release all resources, including adapter. In case of probe failure, ena_remove should not try to free the adapter resources. Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 + 1 file changed, 1

[PATCH V2 net 00/20] Increase ENA driver version to 1.1.2

2016-12-04 Thread Netanel Belgazal
Changes between V1 and V2: * reorder the patches so the bug fixes will appear first. * fix the commit message of removing a tuple filter. The first patch stated mistakenly that it removes RFS. * add another bug fix (fix RSS default hash configuration). * split the driver's version increase to a

[PATCH V2 net 03/20] net/ena: fix queues number calculation

2016-12-04 Thread Netanel Belgazal
The ENA driver tries to open a queue per vCPU. To determine how many vCPUs the instance have it uses num_possible_cpus while it should have use num_online_cpus instead. Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- 1 file

  1   2   >