RE: [RFC PATCH v3 1/2] Documentation: DT: net: Add Xilinx gmiitorgmii converter device tree binding documentation

2016-08-04 Thread Appana Durga Kedareswara Rao
Hi Rob, Thanks for the review... > > +XILINX GMIITORGMII Converter Driver Device Tree Bindings > > + > > + > > +The Gigabit Media Independent Interface (GMII) to Reduced Gigabit > > +Media Independent Interface (RGMII) core provide

[PATCH v2] net: phy: micrel: Add specific suspend

2016-08-04 Thread Wenyou Yang
Disable all interrupts when suspend, they will be enabled when resume. Otherwise, the suspend/resume process will be blocked occasionally. Signed-off-by: Wenyou Yang Acked-by: Nicolas Ferre --- Changes in v2: - Use fairly generic phydrv->config_intr() with PHY_INTERRUPT_DISABLED, then call

RE: [RFC PATCH v3 2/2] net: phy: Add gmiitorgmii converter support

2016-08-04 Thread Appana Durga Kedareswara Rao
Hi zhuyj, Thanks for the review... > > + switch (phydev->speed) { > + case SPEED_1000: > + val |= BMCR_SPEED1000; > + case SPEED_100: > + val |= BMCR_SPEED100; > + } > > Are there only 2 kinds of speed? Converter supports 3 different

Re: [RFC PATCH v3 2/2] net: phy: Add gmiitorgmii converter support

2016-08-04 Thread zhuyj
+ switch (phydev->speed) { + case SPEED_1000: + val |= BMCR_SPEED1000; + case SPEED_100: + val |= BMCR_SPEED100; + } Are there only 2 kinds of speed? On Thu, Aug 4, 2016 at 8:13 PM, Kedareswara rao Appana wrote: > This patch adds support for g

RE: [PATCH v1] net: phy: micrel: Add specific suspend

2016-08-04 Thread Wenyou.Yang
Hi Florian, > -Original Message- > From: Florian Fainelli [mailto:f.faine...@gmail.com] > Sent: 2016年8月4日 11:33 > To: Wenyou Yang > Cc: netdev@vger.kernel.org; linux-ker...@vger.kernel.org; linux-arm- > ker...@lists.infradead.org; Alexandre Belloni electrons.com>; Nicolas Ferre ; Andrew

Re: Buggy rhashtable walking

2016-08-04 Thread Johannes Berg
> So I'm going to fix this by consolidating identical objects into > a single rhashtable entry which also lets us get rid of the > insecure_elasticity setting. Hm. Would you rather allocate a separate head entry for the hashtable, or chain the entries? (Luckily) the colliding key case practicall

Re: [PATCH net 1/2] tg3: Fix for diasllow rx coalescing time to be 0

2016-08-04 Thread Siva Reddy Kallam
On Thu, Aug 4, 2016 at 3:45 AM, Michael Chan wrote: > On Wed, Aug 3, 2016 at 9:04 AM, Rick Jones wrote: >> >> Should anything then happen with: >> >> /* No rx interrupts will be generated if both are zero */ >> if ((ec->rx_coalesce_usecs == 0) && >> (ec->rx_max_coalesc

[PATCH] net: macb: Correct CAPS mask

2016-08-04 Thread Harini Katakam
USRIO and JUMBO CAPS have the same mask. Fix the same. Fixes: ce721a702197 ("net: ethernet: cadence-macb: Add disabled usrio caps") Cc: sta...@vger.kernel.org # v4.5+ Signed-off-by: Harini Katakam Acked-by: Nicolas Ferre --- drivers/net/ethernet/cadence/macb.h | 2 +- 1 file changed, 1 insertio

Re: [RFC PATCH 1/2] net: macb: Correct CAPS mask

2016-08-04 Thread Harini Katakam
On Thu, Aug 4, 2016 at 7:37 PM, Nicolas Ferre wrote: > Le 01/08/2016 à 09:20, Harini Katakam a écrit : >> USRIO and JUMBO CAPS have the same mask. >> Fix the same. >> >> Signed-off-by: Harini Katakam > > Hi, > Indeed there's a bug... > > >> --- >> drivers/net/ethernet/cadence/macb.h | 2 +- >> 1

Re: order-0 vs order-N driver allocation. Was: [PATCH v10 07/12] net/mlx4_en: add page recycle to prepare rx ring for tx support

2016-08-04 Thread Alexei Starovoitov
On Thu, Aug 04, 2016 at 05:30:56PM -0700, Alexander Duyck wrote: > On Thu, Aug 4, 2016 at 9:19 AM, Jesper Dangaard Brouer > wrote: > > > > On Wed, 3 Aug 2016 10:45:13 -0700 Alexei Starovoitov > > wrote: > > > >> On Mon, Jul 25, 2016 at 09:35:20AM +0200, Eric Dumazet wrote: > >> > On Tue, 2016-07

Re: [RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue

2016-08-04 Thread Tom Herbert
On Thu, Aug 4, 2016 at 12:36 PM, wrote: > From: Kan Liang > > To achieve better network performance, the key step is to distribute the > packets to dedicated queues according to policy and system run time > status. > > This patch provides an interface which can return the proper dedicated > queu

[PATCH] proc: make proc entries inherit ownership from parent

2016-08-04 Thread Dmitry Torokhov
There are certain parameters that belong to net namespace and that are exported in /proc. They should be controllable by the container's owner, but are currently owned by global root and thus not available. Let's change proc code to inherit ownership of parent entry, and when create per-ns "net" p

Re: [RFC V2 PATCH 00/25] Kernel NET policy

2016-08-04 Thread Alexei Starovoitov
On Wed, Dec 31, 2014 at 08:38:49PM -0500, kan.li...@intel.com wrote: > > Changes since V1: > - Using work queue to set Rx network flow classification rules and search >available NET policy object asynchronously. > - Using RCU lock to replace read-write lock > - Redo performance test and upd

Re: order-0 vs order-N driver allocation. Was: [PATCH v10 07/12] net/mlx4_en: add page recycle to prepare rx ring for tx support

2016-08-04 Thread Alexander Duyck
On Thu, Aug 4, 2016 at 9:19 AM, Jesper Dangaard Brouer wrote: > > On Wed, 3 Aug 2016 10:45:13 -0700 Alexei Starovoitov > wrote: > >> On Mon, Jul 25, 2016 at 09:35:20AM +0200, Eric Dumazet wrote: >> > On Tue, 2016-07-19 at 12:16 -0700, Brenden Blanco wrote: >> > > The mlx4 driver by default alloc

Re: [RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue

2016-08-04 Thread Daniel Borkmann
On 08/05/2016 12:54 AM, Andi Kleen wrote: +1, I tried to bring this up here [1] in the last spin. I think only very few changes would be needed, f.e. on eBPF side to add a queue setting helper function which is probably straight forward ~10loc patch; and with regards to actually picking it up aft

Re: [PATCH] net: ethernet: ti: cpsw: split common driver data and slaves data

2016-08-04 Thread kbuild test robot
Hi Ivan, [auto build test ERROR on net/master] [also build test ERROR on next-20160804] [cannot apply to net-next/master v4.7] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Ivan-Khoronzhuk/net

Re: [RFC PATCH] sunrpc: do not allow process to freeze within RPC state machine

2016-08-04 Thread Cyrill Gorcunov
On Wed, Aug 03, 2016 at 08:54:50PM +0400, Stanislav Kinsburskiy wrote: > Otherwise freezer cgroup state might never become "FROZEN". > > Here is a deadlock scheme for 2 processes in one freezer cgroup, which is > freezing: > > CPU 0 CPU 1 >

Re: [RFC V2 PATCH 00/25] Kernel NET policy

2016-08-04 Thread Stephen Hemminger
On Wed, 31 Dec 2014 20:38:49 -0500 kan.li...@intel.com wrote: > 5. Why disable IRQ balance? > A: Disabling IRQ balance is a common way (recommend way for some devices) > to >tune network performance. I appreciate that network tuning is hard, most people get it wrong, and nobody agre

Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver

2016-08-04 Thread Lino Sanfilippo
Hi Timur, On 03.08.2016 22:12, Timur Tabi wrote: > +/* Fill up transmit descriptors */ > +static void emac_tx_fill_tpd(struct emac_adapter *adpt, > + struct emac_tx_queue *tx_q, struct sk_buff *skb, > + struct emac_tpd *tpd) > +{ > + u16 nr_f

RE: [E1000-devel] igb: question regarding auto-negotiation

2016-08-04 Thread Pieper, Jeffrey E
-Original Message- From: Dominic Curran [mailto:dominic.cur...@citrix.com] Sent: Thursday, August 04, 2016 4:02 PM To: Alexander Duyck ; e1000-de...@lists.sourceforge.net Cc: Netdev Subject: Re: [E1000-devel] igb: question regarding auto-negotiation On 07/29/2016 09:35 PM, Alexander

Re: igb: question regarding auto-negotiation

2016-08-04 Thread Dominic Curran
On 07/29/2016 09:35 PM, Alexander Duyck wrote: On Fri, Jul 29, 2016 at 4:37 PM, Dominic Curran wrote: Hi This question refers to igb codebase. I have a question regarding the setting of hw->mac.autoneg. Is it correct to say for igb driver: "if speed=1000 and duplex=FULL and media_type=C

Re: [RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue

2016-08-04 Thread Andi Kleen
> +1, I tried to bring this up here [1] in the last spin. I think only very > few changes would be needed, f.e. on eBPF side to add a queue setting > helper function which is probably straight forward ~10loc patch; and with > regards to actually picking it up after clsact egress, we'd need to adapt

Re: [RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue

2016-08-04 Thread Daniel Borkmann
On 08/04/2016 10:21 PM, John Fastabend wrote: On 16-08-04 12:36 PM, kan.li...@intel.com wrote: From: Kan Liang To achieve better network performance, the key step is to distribute the packets to dedicated queues according to policy and system run time status. This patch provides an interface

[PATCH net 2/3] mlxsw: spectrum: Do not override PAUSE settings

2016-08-04 Thread Ido Schimmel
The PFCC register is used to configure both PAUSE and PFC frames. Therefore, when PFC frames are disabled we must make sure we don't mistakenly also disable PAUSE frames (which might be enabled). Fix this by packing the PFCC register with the current PAUSE settings. Note that this register is als

[PATCH net v2 1/3] bpf: also call skb_postpush_rcsum on xmit occasions

2016-08-04 Thread Daniel Borkmann
Follow-up to commit f8ffad69c9f8 ("bpf: add skb_postpush_rcsum and fix dev_forward_skb occasions") to fix an issue for dev_queue_xmit() redirect locations which need CHECKSUM_COMPLETE fixups on ingress. For the same reasons as described in f8ffad69c9f8 already, we of course also need this here, si

[PATCH net v2 3/3] bpf: fix checksum for vlan push/pop helper

2016-08-04 Thread Daniel Borkmann
When having skbs on ingress with CHECKSUM_COMPLETE, tc BPF programs don't push rcsum of mac header back in and after BPF run back pull out again as opposed to some other subsystems (ovs, for example). For cases like q-in-q, meaning when a vlan tag for offloading is already present and we're about

[PATCH net v2 2/3] bpf: fix checksum fixups on bpf_skb_store_bytes

2016-08-04 Thread Daniel Borkmann
bpf_skb_store_bytes() invocations above L2 header need BPF_F_RECOMPUTE_CSUM flag for updates, so that CHECKSUM_COMPLETE will be fixed up along the way. Where we ran into an issue with bpf_skb_store_bytes() is when we did a single-byte update on the IPv6 hoplimit despite using BPF_F_RECOMPUTE_CSUM f

[PATCH net v2 0/3] Few BPF helper related checksum fixes

2016-08-04 Thread Daniel Borkmann
The set contains three fixes with regards to CHECKSUM_COMPLETE and BPF helper functions. For details please see individual patches. Thanks! v1 -> v2: - Fixed make htmldocs issue reported by kbuild bot. - Rest as is. Daniel Borkmann (3): bpf: also call skb_postpush_rcsum on xmit occasions

Re: [PATCH 2/2] net: core: ethtool: add ringparam perqueue command

2016-08-04 Thread Ivan Khoronzhuk
Please, ignore it It was sent by mistake On 05.08.16 00:11, Ivan Khoronzhuk wrote: It useful feature to be able to configure number of buffers for every queue. Signed-off-by: Ivan Khoronzhuk --- include/linux/ethtool.h | 4 ++ net/core/ethtool.c | 104 ++

Re: [PATCH 1/2] net: core: ethtool: add per queue bandwidth command

2016-08-04 Thread Ivan Khoronzhuk
Please, ignore it It was sent by mistake On 05.08.16 00:11, Ivan Khoronzhuk wrote: Signed-off-by: Ivan Khoronzhuk --- include/linux/ethtool.h | 4 ++ include/uapi/linux/ethtool.h | 2 + net/core/ethtool.c | 102 +++ 3 files changed, 10

Re: [PATCH] priority improvement

2016-08-04 Thread Ivan Khoronzhuk
Please, ignore it It was sent by mistake On 05.08.16 00:11, Ivan Khoronzhuk wrote: Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 45 +- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c

Re: [PATCH 0/2] Add ability to configure ethernet h/w shaper

2016-08-04 Thread Ivan Khoronzhuk
Please, ignore it It was sent by mistake On 05.08.16 00:11, Ivan Khoronzhuk wrote: These two patches can be used to set per queue bandwidth with ethtool. I've create them as logical continuation of patchset from intel, that have introduced per-queue setting command month ago for ethtool interfac

[PATCH 3/3] net: ethernet: ti: cpsw: split common driver data and private net data

2016-08-04 Thread Ivan Khoronzhuk
Simplify driver by splitting common driver data and net dev private data. In case of dual_emac mode 2 networks devices are created, each of them contains its own private data. But 2 net devices share a bunch of h/w resources, that shouldn't be duplicated. This patch leads to the following: - no fun

[PATCH] net: ethernet: ti: cpsw: split common driver data and slaves data

2016-08-04 Thread Ivan Khoronzhuk
Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 761 +++-- 1 file changed, 359 insertions(+), 402 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index c51f346..38b04bf 100644 --- a/drivers/net/ethe

[PATCH 2/3] net: ethernet: ti: cpsw: remove redundant check in napi poll

2016-08-04 Thread Ivan Khoronzhuk
No need to check number of handled packets, when in most cases (> 99%) it's not 0. It can be 0 only in rarely cases, even in this case it's not bad to print just 0. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) di

[PATCH 1/3] net: ethernet: ti: cpsw: simplify submit routine

2016-08-04 Thread Ivan Khoronzhuk
As second net dev is created only in case of dual_emac mode, port number can be figured out in simpler way. Also no need to pass redundant ndev struct. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) dif

Re: [PATCH] net: ethernet: ti: cpsw: split common driver data and slaves data

2016-08-04 Thread Ivan Khoronzhuk
Please, ignore it. It was sent by mistake. On 05.08.16 00:11, Ivan Khoronzhuk wrote: Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 761 +++-- 1 file changed, 359 insertions(+), 402 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw

[PATCH 0/2] Add ability to configure ethernet h/w shaper

2016-08-04 Thread Ivan Khoronzhuk
These two patches can be used to set per queue bandwidth with ethtool. I've create them as logical continuation of patchset from intel, that have introduced per-queue setting command month ago for ethtool interface (http://kernel.opensuse.org/cgit/kernel-source/commit/?h=rpm-4.4.9-36&; id=feaab26ab

[PATCH 0/3] net: ethernet: ti: cpsw: split driver data and per ndev data

2016-08-04 Thread Ivan Khoronzhuk
In dual_emac mode the driver can handle 2 network devices. Each of them can use its own private data and common data/resources. This patchset splits common driver data/resources and private per net device data. Doesn't have bad impact on performance. Based on net-next/master Ivan Khoronzhuk (3)

[PATCH] priority improvement

2016-08-04 Thread Ivan Khoronzhuk
Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 45 +- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 9ddaccc..cd12f52 100644 --- a/drivers/net/ethern

[PATCH 2/2] net: core: ethtool: add ringparam perqueue command

2016-08-04 Thread Ivan Khoronzhuk
It useful feature to be able to configure number of buffers for every queue. Signed-off-by: Ivan Khoronzhuk --- include/linux/ethtool.h | 4 ++ net/core/ethtool.c | 104 2 files changed, 108 insertions(+) diff --git a/include/linux/ethtool

[PATCH 1/2] net: core: ethtool: add per queue bandwidth command

2016-08-04 Thread Ivan Khoronzhuk
Signed-off-by: Ivan Khoronzhuk --- include/linux/ethtool.h | 4 ++ include/uapi/linux/ethtool.h | 2 + net/core/ethtool.c | 102 +++ 3 files changed, 108 insertions(+) diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index

Re: [RFC PATCH] sunrpc: do not allow process to freeze within RPC state machine

2016-08-04 Thread Stanislav Kinsburskiy
03.08.2016 19:36, Jeff Layton пишет: On Wed, 2016-08-03 at 20:54 +0400, Stanislav Kinsburskiy wrote: Otherwise freezer cgroup state might never become "FROZEN". Here is a deadlock scheme for 2 processes in one freezer cgroup, which is freezing: CPU 0 CPU 1 -

Re: [v5.1] ucc_fast: Fix to avoid IS_ERR_VALUE abuses and dead code on 64bit systems.

2016-08-04 Thread Arnd Bergmann
On Thursday, August 4, 2016 10:22:43 PM CEST Arvind Yadav wrote: > index df8ea79..ada9070 100644 > --- a/include/soc/fsl/qe/ucc_fast.h > +++ b/include/soc/fsl/qe/ucc_fast.h > @@ -165,10 +165,12 @@ struct ucc_fast_private { > int stopped_tx; /* Whether channel has been stopped for Tx

[PATCH iproute v2 3/5] ip6tnl: Support for fou encapsulation

2016-08-04 Thread Tom Herbert
Signed-off-by: Tom Herbert --- ip/link_ip6tnl.c | 92 +++- 1 file changed, 91 insertions(+), 1 deletion(-) diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c index 89861c6..59162a3 100644 --- a/ip/link_ip6tnl.c +++ b/ip/link_ip6tnl.c @@ -37,6 +37

[PATCH iproute v2 4/5] gre6: Support for fou encapsulation

2016-08-04 Thread Tom Herbert
Signed-off-by: Tom Herbert --- ip/link_gre.c | 2 +- ip/link_gre6.c | 101 + 2 files changed, 102 insertions(+), 1 deletion(-) diff --git a/ip/link_gre.c b/ip/link_gre.c index 5dc4067..3b99e56 100644 --- a/ip/link_gre.c +++ b/ip/link_gre

[PATCH iproute v2 2/5] ila: Support for configuring ila to use netfilter hook

2016-08-04 Thread Tom Herbert
Signed-off-by: Tom Herbert --- ip/Makefile| 2 +- ip/ip.c| 3 +- ip/ip_common.h | 1 + ip/ipila.c | 267 + 4 files changed, 271 insertions(+), 2 deletions(-) create mode 100644 ip/ipila.c diff --git a/ip/Makefile b/ip

[PATCH iproute v2 5/5] fou: Allowing configuring IPv6 listener

2016-08-04 Thread Tom Herbert
Signed-off-by: Tom Herbert --- ip/ipfou.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ip/ipfou.c b/ip/ipfou.c index 2a6ae17..0673d11 100644 --- a/ip/ipfou.c +++ b/ip/ipfou.c @@ -25,8 +25,9 @@ static void usage(void) { - fprintf(stderr, "Usage: ip fou add

[PATCH iproute v2 0/5] iproute: ila and fou addition

2016-08-04 Thread Tom Herbert
Patch set includes: - Allow configuring checksum mode for ila LWT (e.g. configure checksum neutral - Configuration for performing ila translations using netfilter hook - fou encapsulation for ip6tnl and gre6 - fou listener for IPv6 v2: - Style fixes - Replace occurences of RTA_DATA with rta

[PATCH iproute v2 1/5] ila: Support for checksum neutral translation

2016-08-04 Thread Tom Herbert
Add configuration of ila LWT tunnels for checksum mode including checksum neutral translation. Signed-off-by: Tom Herbert --- ip/iproute_lwtunnel.c | 58 +-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/ip/iproute_lwtunnel.c b/ip/

Re: [RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue

2016-08-04 Thread John Fastabend
On 16-08-04 12:36 PM, kan.li...@intel.com wrote: > From: Kan Liang > > To achieve better network performance, the key step is to distribute the > packets to dedicated queues according to policy and system run time > status. > > This patch provides an interface which can return the proper dedicat

Re: [RFC V2 PATCH 01/25] net: introduce NET policy

2016-08-04 Thread Randy Dunlap
On 08/04/16 12:36, kan.li...@intel.com wrote: > From: Kan Liang > > This patch introduce NET policy subsystem. If proc is supported in the > system, it creates netpolicy node in proc system. > > Signed-off-by: Kan Liang > --- > include/linux/netdevice.h | 7 +++ > include/net/net_namespace

[PATCH -net] net/ethernet: tundra: fix dump_eth_one warning in tsi108_eth

2016-08-04 Thread Paul Gortmaker
The call site for this function appears as: #ifdef DEBUG data->msg_enable = DEBUG; dump_eth_one(dev); #endif ...leading to the following warning for !DEBUG builds: drivers/net/ethernet/tundra/tsi108_eth.c:169:13: warning: 'dump_eth_one' defined but not used [-Wunused-functio

[RFC V2 PATCH 06/25] net/netpolicy: set and remove IRQ affinity

2016-08-04 Thread kan . liang
From: Kan Liang This patches introduces functions to set and remove IRQ affinity according to cpu and queue mapping. The functions will not record the previous affinity status. After a set/remove cycles, it will set the affinity on all online CPU with IRQ balance enabling. Signed-off-by: Kan Li

[RFC V2 PATCH 01/25] net: introduce NET policy

2016-08-04 Thread kan . liang
From: Kan Liang This patch introduce NET policy subsystem. If proc is supported in the system, it creates netpolicy node in proc system. Signed-off-by: Kan Liang --- include/linux/netdevice.h | 7 +++ include/net/net_namespace.h | 3 ++ net/Kconfig | 7 +++ net/core/Mak

[RFC V2 PATCH 04/25] net/netpolicy: get CPU information

2016-08-04 Thread kan . liang
From: Kan Liang Net policy also needs to know CPU information. Currently, online CPU number is enough. Signed-off-by: Kan Liang --- net/core/netpolicy.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/core/netpolicy.c b/net/core/netpolicy.c index 7c34c8a..075aaca 100644 --- a/net/

[RFC V2 PATCH 02/25] net/netpolicy: init NET policy

2016-08-04 Thread kan . liang
From: Kan Liang This patch tries to initialize NET policy for all the devices in the system. However, not all device drivers have NET policy support. For those drivers who does not have NET policy support, the node will not be showed in /proc/net/netpolicy/. The device driver who has NET policy s

[RFC V2 PATCH 00/25] Kernel NET policy

2016-08-04 Thread kan . liang
From: Kan Liang (re-send to correct system time issue. Sorry for any inconvenience.) It is a big challenge to get good network performance. First, the network performance is not good with default system settings. Second, it is too difficult to do automatic tuning for all possible workloads, since

[RFC V2 PATCH 05/25] net/netpolicy: create CPU and queue mapping

2016-08-04 Thread kan . liang
From: Kan Liang Current implementation forces CPU and queue 1:1 mapping. This patch introduces the function netpolicy_update_sys_map to create this mapping. The result is stored in netpolicy_sys_info. If the CPU count and queue count are different, the remaining CPUs/queues are not used for now.

[RFC V2 PATCH 12/25] net/netpolicy: NET device hotplug

2016-08-04 Thread kan . liang
From: Kan Liang Support NET device up/down/namechange in the NET policy code. Signed-off-by: Kan Liang --- net/core/netpolicy.c | 66 +--- 1 file changed, 58 insertions(+), 8 deletions(-) diff --git a/net/core/netpolicy.c b/net/core/netpolicy.c

[RFC V2 PATCH 09/25] net/netpolicy: set NET policy by policy name

2016-08-04 Thread kan . liang
From: Kan Liang User can write policy name to /proc/net/netpolicy/$DEV/policy to enable net policy for specific device. When the policy is enabled, the subsystem automatically disables IRQ balance and set IRQ affinity. The object list is also generated accordingly. It is device driver's respons

[RFC V2 PATCH 08/25] net/netpolicy: introduce NET policy object

2016-08-04 Thread kan . liang
From: Kan Liang This patch introduces the concept of NET policy object and policy object list. The NET policy object is the instance of CPU/queue mapping. The object can be shared between different tasks/sockets. So besides CPU and queue information, the object also maintains a reference counter

[RFC V2 PATCH 10/25] net/netpolicy: add three new NET policies

2016-08-04 Thread kan . liang
From: Kan Liang Introduce three NET policies CPU policy: configure for higher throughput and lower CPU% (power saving). BULK policy: configure for highest throughput. LATENCY policy: configure for lowest latency. Signed-off-by: Kan Liang --- include/linux/netpolicy.h | 3 +++ net/core/netpolic

[RFC V2 PATCH 13/25] net/netpolicy: support CPU hotplug

2016-08-04 Thread kan . liang
From: Kan Liang For CPU hotplug, the NET policy subsystem will rebuild the sys map and object list. Signed-off-by: Kan Liang --- net/core/netpolicy.c | 76 1 file changed, 76 insertions(+) diff --git a/net/core/netpolicy.c b/net/core/netpol

[RFC V2 PATCH 07/25] net/netpolicy: enable and disable NET policy

2016-08-04 Thread kan . liang
From: Kan Liang This patch introduces functions to enable and disable NET policy. For enabling, it collects device and CPU information, setup CPU/queue mapping, and set IRQ affinity accordingly. For disabling, it removes the IRQ affinity and mapping information. np_lock should protect the enab

[RFC V2 PATCH 15/25] net/netpolicy: implement netpolicy register

2016-08-04 Thread kan . liang
From: Kan Liang The socket/task can only be benefited when it register itself with specific policy. If it's the first time to register, a record will be created and inserted into RCU hash table. The record includes ptr, policy and object information. ptr is the socket/task's pointer which is used

[RFC V2 PATCH 11/25] net/netpolicy: add MIX policy

2016-08-04 Thread kan . liang
From: Kan Liang MIX policy is combine of other policies. It allows different queue has different policy. If MIX policy is applied, /proc/net/netpolicy/$DEV/policy shows per queue policy. Usually, the workloads requires either high throughput or low latency. So for current implementation, MIX pol

[RFC V2 PATCH 18/25] net/netpolicy: set Tx queues according to policy

2016-08-04 Thread kan . liang
From: Kan Liang When the device tries to transmit a packet, netdev_pick_tx is called to find the available Tx queues. If the net policy is applied, it picks up the assigned Tx queue from net policy subsystem, and redirect the traffic to the assigned queue. Signed-off-by: Kan Liang --- include/

[RFC V2 PATCH 16/25] net/netpolicy: introduce per socket netpolicy

2016-08-04 Thread kan . liang
From: Kan Liang The network socket is the most basic unit which control the network traffic. This patch introduces a new socket option SO_NETPOLICY to set/get net policy for socket. so that the application can set its own policy on socket to improve the network performance. Per socket net policy

[RFC V2 PATCH 21/25] net/netpolicy: set per task policy by proc

2016-08-04 Thread kan . liang
From: Kan Liang Users may not want to change the source code to add per task net polic support. Or they may want to change a running task's net policy. prctl does not work for both cases. This patch adds an interface in /proc, which can be used to set and retrieve policy of already running tasks

[RFC V2 PATCH 14/25] net/netpolicy: handle channel changes

2016-08-04 Thread kan . liang
From: Kan Liang User can uses ethtool to set the channel number. This patch handles the channel changes by rebuilding the object list. Signed-off-by: Kan Liang --- include/linux/netpolicy.h | 8 net/core/ethtool.c| 8 +++- net/core/netpolicy.c | 1 + 3 files changed,

[RFC V2 PATCH 19/25] net/netpolicy: set Rx queues according to policy

2016-08-04 Thread kan . liang
From: Kan Liang For setting Rx queues, this patch configure Rx network flow classification rules to redirect the packets to the assigned queue. Since we may not get all the information required for rule until the first packet arrived, it will add the rule after recvmsg. Also, to avoid destroying

[RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue

2016-08-04 Thread kan . liang
From: Kan Liang To achieve better network performance, the key step is to distribute the packets to dedicated queues according to policy and system run time status. This patch provides an interface which can return the proper dedicated queue for socket/task. Then the packets of the socket/task w

[RFC V2 PATCH 25/25] Documentation/networking: Document NET policy

2016-08-04 Thread kan . liang
From: Kan Liang Signed-off-by: Kan Liang --- Documentation/networking/netpolicy.txt | 157 + 1 file changed, 157 insertions(+) create mode 100644 Documentation/networking/netpolicy.txt diff --git a/Documentation/networking/netpolicy.txt b/Documentation/network

[RFC V2 PATCH 24/25] net/netpolicy: limit the total record number

2016-08-04 Thread kan . liang
From: Kan Liang NET policy can not fulfill users request without limit, because of the security consideration and device limitation. For security consideration, the attacker may fake millions of per task/socket request to crash the system. For device limitation, the flow director rules number is

[RFC V2 PATCH 23/25] net/netpolicy: optimize for queue pair

2016-08-04 Thread kan . liang
From: Kan Liang Some drivers like i40e driver does not support separate Tx and Rx queues as channels. Using Rx queue to stand for the channels, if queue_pair is set by driver. Signed-off-by: Kan Liang --- include/linux/netpolicy.h | 1 + net/core/netpolicy.c | 3 +++ 2 files changed, 4 in

[RFC V2 PATCH 22/25] net/netpolicy: fast path for finding the queues

2016-08-04 Thread kan . liang
From: Kan Liang Current implementation searches the hash table to get assigned object for each transmit/receive packet. It's not necessory, because the assigned object usually remain unchanged. This patch store the assigned queue to speed up the searching process. But under certain situations, t

[RFC V2 PATCH 20/25] net/netpolicy: introduce per task net policy

2016-08-04 Thread kan . liang
From: Kan Liang Usually, application as a whole has specific requirement. Applying the net policy to all sockets one by one in the application is too complex. This patch introduces per task net policy to address this case. Once the per task net policy is applied, all the sockets in the applicatio

[RFC V2 PATCH 03/25] net/netpolicy: get device queue irq information

2016-08-04 Thread kan . liang
From: Kan Liang Net policy needs to know device information. Currently, it's enough to only get irq information of rx and tx queues. This patch introduces ndo ops to do so, not ethtool ops. Because there are already several ways to get irq information in userspace. It's not necessory to extend t

RE: [Intel-wired-lan] [PATCH net-next v3 1/2] e1000e: factor out systim sanitization

2016-08-04 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@lists.osuosl.org] On > Behalf Of Woodford, Timothy W. > Sent: Friday, July 29, 2016 7:41 AM > To: Woodford, Timothy W. ; Avargil, > Raanan ; Jarod Wilson ; > linux-ker...@vger.kernel.org; Hall, Christopher S > > Cc: netdev@vger.kernel.org; in

RE: [Intel-wired-lan] [PATCH net-next v3 2/2] e1000e: fix PTP on e1000_pch_lpt variants

2016-08-04 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@lists.osuosl.org] On > Behalf Of Jarod Wilson > Sent: Tuesday, July 26, 2016 11:26 AM > To: linux-ker...@vger.kernel.org > Cc: netdev@vger.kernel.org; intel-wired-...@lists.osuosl.org > Subject: [Intel-wired-lan] [PATCH net-next v3 2/2] e1000e

RE: [Intel-wired-lan] [PATCH net-next v3 1/2] e1000e: factor out systim sanitization

2016-08-04 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@lists.osuosl.org] On > Behalf Of Jarod Wilson > Sent: Tuesday, July 26, 2016 11:26 AM > To: linux-ker...@vger.kernel.org > Cc: netdev@vger.kernel.org; intel-wired-...@lists.osuosl.org > Subject: [Intel-wired-lan] [PATCH net-next v3 1/2] e1000e

[RFC V2 PATCH 04/25] net/netpolicy: get CPU information

2016-08-04 Thread kan . liang
From: Kan Liang Net policy also needs to know CPU information. Currently, online CPU number is enough. Signed-off-by: Kan Liang --- net/core/netpolicy.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/core/netpolicy.c b/net/core/netpolicy.c index 7c34c8a..075aaca 100644 --- a/net/

[RFC V2 PATCH 01/25] net: introduce NET policy

2016-08-04 Thread kan . liang
From: Kan Liang This patch introduce NET policy subsystem. If proc is supported in the system, it creates netpolicy node in proc system. Signed-off-by: Kan Liang --- include/linux/netdevice.h | 7 +++ include/net/net_namespace.h | 3 ++ net/Kconfig | 7 +++ net/core/Mak

[RFC V2 PATCH 11/25] net/netpolicy: add MIX policy

2016-08-04 Thread kan . liang
From: Kan Liang MIX policy is combine of other policies. It allows different queue has different policy. If MIX policy is applied, /proc/net/netpolicy/$DEV/policy shows per queue policy. Usually, the workloads requires either high throughput or low latency. So for current implementation, MIX pol

[RFC V2 PATCH 03/25] net/netpolicy: get device queue irq information

2016-08-04 Thread kan . liang
From: Kan Liang Net policy needs to know device information. Currently, it's enough to only get irq information of rx and tx queues. This patch introduces ndo ops to do so, not ethtool ops. Because there are already several ways to get irq information in userspace. It's not necessory to extend t

[RFC V2 PATCH 12/25] net/netpolicy: NET device hotplug

2016-08-04 Thread kan . liang
From: Kan Liang Support NET device up/down/namechange in the NET policy code. Signed-off-by: Kan Liang --- net/core/netpolicy.c | 66 +--- 1 file changed, 58 insertions(+), 8 deletions(-) diff --git a/net/core/netpolicy.c b/net/core/netpolicy.c

[RFC V2 PATCH 02/25] net/netpolicy: init NET policy

2016-08-04 Thread kan . liang
From: Kan Liang This patch tries to initialize NET policy for all the devices in the system. However, not all device drivers have NET policy support. For those drivers who does not have NET policy support, the node will not be showed in /proc/net/netpolicy/. The device driver who has NET policy s

[RFC V2 PATCH 13/25] net/netpolicy: support CPU hotplug

2016-08-04 Thread kan . liang
From: Kan Liang For CPU hotplug, the NET policy subsystem will rebuild the sys map and object list. Signed-off-by: Kan Liang --- net/core/netpolicy.c | 76 1 file changed, 76 insertions(+) diff --git a/net/core/netpolicy.c b/net/core/netpol

[RFC V2 PATCH 05/25] net/netpolicy: create CPU and queue mapping

2016-08-04 Thread kan . liang
From: Kan Liang Current implementation forces CPU and queue 1:1 mapping. This patch introduces the function netpolicy_update_sys_map to create this mapping. The result is stored in netpolicy_sys_info. If the CPU count and queue count are different, the remaining CPUs/queues are not used for now.

[RFC V2 PATCH 00/25] Kernel NET policy

2016-08-04 Thread kan . liang
From: Kan Liang It is a big challenge to get good network performance. First, the network performance is not good with default system settings. Second, it is too difficult to do automatic tuning for all possible workloads, since workloads have different requirements. Some workloads may want high

[PATCH net 1/3] mlxsw: spectrum: Do not assume PAUSE frames are disabled

2016-08-04 Thread Ido Schimmel
When ieee_setpfc() gets called, PAUSE frames are not necessarily disabled on the port. Check if PAUSE frames are disabled or enabled and configure the port's headroom buffer accordingly. Fixes: d81a6bdb87ce ("mlxsw: spectrum: Add IEEE 802.1Qbb PFC support") Signed-off-by: Ido Schimmel --- drive

[RFC V2 PATCH 15/25] net/netpolicy: implement netpolicy register

2016-08-04 Thread kan . liang
From: Kan Liang The socket/task can only be benefited when it register itself with specific policy. If it's the first time to register, a record will be created and inserted into RCU hash table. The record includes ptr, policy and object information. ptr is the socket/task's pointer which is used

[RFC V2 PATCH 18/25] net/netpolicy: set Tx queues according to policy

2016-08-04 Thread kan . liang
From: Kan Liang When the device tries to transmit a packet, netdev_pick_tx is called to find the available Tx queues. If the net policy is applied, it picks up the assigned Tx queue from net policy subsystem, and redirect the traffic to the assigned queue. Signed-off-by: Kan Liang --- include/

[RFC V2 PATCH 09/25] net/netpolicy: set NET policy by policy name

2016-08-04 Thread kan . liang
From: Kan Liang User can write policy name to /proc/net/netpolicy/$DEV/policy to enable net policy for specific device. When the policy is enabled, the subsystem automatically disables IRQ balance and set IRQ affinity. The object list is also generated accordingly. It is device driver's respons

[RFC V2 PATCH 19/25] net/netpolicy: set Rx queues according to policy

2016-08-04 Thread kan . liang
From: Kan Liang For setting Rx queues, this patch configure Rx network flow classification rules to redirect the packets to the assigned queue. Since we may not get all the information required for rule until the first packet arrived, it will add the rule after recvmsg. Also, to avoid destroying

[PATCH net 3/3] mlxsw: spectrum: Add missing DCB rollback in error path

2016-08-04 Thread Ido Schimmel
We correctly execute mlxsw_sp_port_dcb_fini() when port is removed, but I missed its rollback in the error path of port creation, so add it. Fixes: f00817df2b42 ("mlxsw: spectrum: Introduce support for Data Center Bridging (DCB)") Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/ml

[RFC V2 PATCH 16/25] net/netpolicy: introduce per socket netpolicy

2016-08-04 Thread kan . liang
From: Kan Liang The network socket is the most basic unit which control the network traffic. This patch introduces a new socket option SO_NETPOLICY to set/get net policy for socket. so that the application can set its own policy on socket to improve the network performance. Per socket net policy

[RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue

2016-08-04 Thread kan . liang
From: Kan Liang To achieve better network performance, the key step is to distribute the packets to dedicated queues according to policy and system run time status. This patch provides an interface which can return the proper dedicated queue for socket/task. Then the packets of the socket/task w

[RFC V2 PATCH 14/25] net/netpolicy: handle channel changes

2016-08-04 Thread kan . liang
From: Kan Liang User can uses ethtool to set the channel number. This patch handles the channel changes by rebuilding the object list. Signed-off-by: Kan Liang --- include/linux/netpolicy.h | 8 net/core/ethtool.c| 8 +++- net/core/netpolicy.c | 1 + 3 files changed,

  1   2   >