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

2016-12-02 Thread Eric Dumazet
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 is 1514 > in x86. > > AFAICT, since mlx4 is doing one page per packet for XDP, > we can at least raise the MTU limitation up to >

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

2016-12-02 Thread Alexei Starovoitov
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 is 1514 in x86. AFAICT, since mlx4 is doing one page per packet for XDP, we can at least r

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

2016-12-02 Thread Kees Cook
Prior to commit c0371da6047a ("put iov_iter into msghdr") in v3.19, there was no check that the iovec contained enough bytes for a icmp header, and the read loop would walk across neighboring stack contents. Since the iov_iter conversion, bad arguments are noticed, but the returned error is EFAULT.

Re: [PATCH net-next] liquidio: 'imply' ptp instead of 'select'

2016-12-02 Thread kbuild test robot
Hi Arnd, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Arnd-Bergmann/liquidio-imply-ptp-instead-of-select/20161203-084019 config: x86_64-allmodconfig compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: make ARCH=x86_64 allmodconfig

[PATCH] net: ethernet: ti: cpdma: use desc_read in chan_process instead of raw read

2016-12-02 Thread Ivan Khoronzhuk
There is desc_read() macros to read desc fields, so no need to use __raw_readl(); Signed-off-by: Ivan Khoronzhuk --- Based on net-next/master drivers/net/ethernet/ti/davinci_cpdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/dr

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

2016-12-02 Thread Eric Dumazet
On Fri, 2016-12-02 at 16:53 -0800, 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 is 1514 > >> in x

[PATCH net-next v2 4/4] bnxt_en: Add PFC statistics.

2016-12-02 Thread Michael Chan
Report PFC statistics to ethtool -S and DCBNL. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 7 +++ drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c | 14 +- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 23 --- 3

[PATCH net-next v2 3/4] bnxt_en: Implement DCBNL to support host-based DCBX.

2016-12-02 Thread Michael Chan
Support only IEEE DCBX initially. Add IEEE DCBNL ops and functions to get and set the hardware DCBX parameters. The DCB code is conditional on Kconfig CONFIG_BNXT_DCB. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/Kconfig | 10 + drivers/net/ethernet/broadcom/bnxt/Make

[PATCH net-next v2 0/4] bnxt_en: Add DCBNL support.

2016-12-02 Thread Michael Chan
This series adds DCBNL operations to support host-based IEEE DCBX. v2: Updated to the latest firmware interface spec. David, please consider this series for net-next. Michael Chan (4): bnxt_en: Re-factor bnxt_setup_tc(). bnxt_en: Update firmware header file to latest 1.6.0. bnxt_en: Implem

[PATCH net-next v2 1/4] bnxt_en: Re-factor bnxt_setup_tc().

2016-12-02 Thread Michael Chan
Add a new function bnxt_setup_mq_tc() to handle MQPRIO. This new function will be called during ETS setup when we add DCBNL in the next patch. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 18 ++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + 2 f

[PATCH net-next v2 2/4] bnxt_en: Update firmware header file to latest 1.6.0.

2016-12-02 Thread Michael Chan
Latest interface has the latest DCB command structs. Get and store the max number of lossless TCs the hardware can support. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 28 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h |5 +- drivers/net/ethernet/

Re: [PATCH] net: wireless: realtek: constify rate_control_ops structures

2016-12-02 Thread Bhumika Goyal
On Sat, Dec 3, 2016 at 2:09 AM, Larry Finger wrote: > On 12/02/2016 03:50 AM, Bhumika Goyal wrote: >> >> The structures rate_control_ops are only passed as an argument to the >> functions ieee80211_rate_control_{register/unregister}. This argument is >> of type const, so rate_control_ops having th

Re: [PATCH 2/3] uapi: export tc_skbmod.h

2016-12-02 Thread kbuild test robot
Hi Stephen, [auto build test ERROR on linus/master] [also build test ERROR on v4.9-rc7] [cannot apply to next-20161202] [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/Stephen-Hemminger/UAPI

Re: [net-next PATCH v4 5/6] virtio_net: add XDP_TX support

2016-12-02 Thread John Fastabend
On 16-12-02 12:51 PM, John Fastabend wrote: > This adds support for the XDP_TX action to virtio_net. When an XDP > program is run and returns the XDP_TX action the virtio_net XDP > implementation will transmit the packet on a TX queue that aligns > with the current CPU that the XDP packet was proce

[PATCH v3 net-next 3/4] net: dsa: mv88e6xxx: Move the tagging protocol into info

2016-12-02 Thread Andrew Lunn
Older chips support a single tagging protocol, DSA. New chips support both DSA and EDSA, an enhanced version. Having both as an option changes the register layouts. Up until now, it has been assumed that if EDSA is supported, it will be used. Hence the register layout has been determined by which p

[PATCH v3 net-next 4/4] net: dsa: mv88e6xxx: Refactor CPU and DSA port setup

2016-12-02 Thread Andrew Lunn
Older chips only support DSA tagging. Newer chips have both DSA and EDSA tagging. Refactor the code by adding port functions for setting the frame mode, egress mode, and if to forward unknown frames. This results in the helper mv88e6xxx_6065_family() becoming unused, so remove it. Signed-off-by:

[PATCH v3 net-next 1/4] net: dsa: mv88e6xxx: Implement mv88e6390 tag remap

2016-12-02 Thread Andrew Lunn
The mv88e6390 does not have the two registers to set the frame priority map. Instead it has an indirection registers for setting a number of different priority maps. Refactor the old code into an function, implement the mv88e6390 version, and use an op to call the right one. Signed-off-by: Andrew

[PATCH v3 net-next 2/4] net: dsa: mv88e6xxx: Monitor and Management tables

2016-12-02 Thread Andrew Lunn
The mv88e6390 changes the monitor control register into the Monitor and Management control, which is an indirection register to various registers. Add ops to set the CPU port and the ingress/egress port for both register layouts, to global1 Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6x

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

2016-12-02 Thread Martin KaFai Lau
On Fri, Dec 02, 2016 at 06:15:26PM -0800, Eric Dumazet wrote: > On Fri, 2016-12-02 at 16:53 -0800, 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 > > >>

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

2016-12-02 Thread Martin KaFai Lau
On Sat, Dec 03, 2016 at 01:22:05AM +0100, Daniel Borkmann wrote: > On 12/03/2016 12:23 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(). > > > >

[PATCH v1 net-next 5/5] net: dsa: mv88e6xxx: Implement mv88e6390 pause control

2016-12-02 Thread Andrew Lunn
The mv88e6390 has a number flow control registers accessed via the Flow Control register. Use these to set the pause control. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 7 +++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 2 ++ drivers/net/dsa/mv88e6xxx/port.c |

[PATCH v1 net-next 3/5] net: dsa: mv88e6xxx: Refactor egress rate limiting

2016-12-02 Thread Andrew Lunn
There are two different rate limiting configurations, depending on the switch generation. Refactor this into ops. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 31 +++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 2 ++ drivers/net/dsa/mv88e6xxx/po

[PATCH v1 net-next 4/5] net: dsa: mv88e6xxx: Refactor pause configuration

2016-12-02 Thread Andrew Lunn
The mv88e6390 has a different mechanism for configuring pause. Refactor the code into an ops function, and for the moment, don't add any mv88e6390 code yet. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 28 drivers/net/dsa/mv88e6xxx/mv88e6xxx

[PATCH v1 net-next 2/5] net: dsa: mv88e6xxx: Refactor setting of jumbo frames

2016-12-02 Thread Andrew Lunn
Some switches support jumbo frames. Refactor this code into operations in the ops structure. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 26 ++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + drivers/net/dsa/mv88e6xxx/port.c | 14

[PATCH v1 net-next 0/5] mv88e6390 batch 3

2016-12-02 Thread Andrew Lunn
More patches to support the MV88e6390. This is mostly refactoring existing code and adding implementations for the mv88e6390. This patchset set which reserved frames are sent to the cpu, the size of jumbo frames that will be accepted, turn off egress rate limiting, and configuration of pause frame

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

2016-12-02 Thread Andrew Lunn
Older devices have a couple of registers in global2. The mv88e6390 family has a single register in global1 behind which hides similar configuration. Implement and op for this. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 35 drivers/net/dsa/

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

2016-12-02 Thread Eric Dumazet
On Fri, 2016-12-02 at 19:42 -0800, Martin KaFai Lau wrote: > On Fri, Dec 02, 2016 at 06:15:26PM -0800, Eric Dumazet wrote: > > My question was more like : > > > > Can we double check all these patches wont break mlx4 driver (non XDP > > path) on arches with PAGE_SIZE=64KB. > The page/pkt requiremen

[PATCHv2 net-next 0/4] MV88E6390 batch two

2016-12-02 Thread Andrew Lunn
This is the second batch of patches adding support for the MV88e6390. They are not sufficient to make it work properly. The mv88e6390 has a much expanded set of priority maps. Refactor the existing code, and implement basic support for the new device. Similarly, the monitor control register has b

Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses.

2016-12-02 Thread Giuseppe CAVALLARO
Hello On 11/24/2016 10:25 PM, Pavel Machek wrote: Hi! I'm debugging strange delays during transmit in stmmac driver. They seem to be present in 4.4 kernel (and older kernels, too). Workload is burst of udp packets being sent, pause, burst of udp packets, ... ... 4.9-rc6 still has the delay

Re: [PATCH] stmmac: simplify flag assignment

2016-12-02 Thread Giuseppe CAVALLARO
+ Alex On 11/30/2016 12:44 PM, Pavel Machek wrote: Simplify flag assignment. Signed-off-by: Pavel Machek diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index ed20668..0b706a7 100644 --- a/drivers/net/ethernet/stmicro/stmmac

[PATCH 2/2] can: peak: Add support for PCAN-USB X6 USB interface

2016-12-02 Thread Marc Kleine-Budde
From: Stephane Grosjean This adds support for PEAK-System PCAN-USB X6 USB to CAN interface. The CAN FD adapter PCAN-USB X6 allows the connection of up to 6 CAN FD or CAN networks to a computer via USB. The interface is installed in an aluminum profile casing and is shipped in versions with D-Sub

[PATCH 1/2] can: peak: Fix bittiming fields size in bits

2016-12-02 Thread Marc Kleine-Budde
From: Stephane Grosjean This fixes the bitimings fields ranges supported by all the CAN-FD USB interfaces of the PEAK-System CAN-FD adapters. Very first development versions of the IP core API defined smaller TSGEx and SJW fields for both nominal and data bittimings records than the production v

pull-request: can 2016-12-02

2016-12-02 Thread Marc Kleine-Budde
Hello David, this is a pull request for net/master. THere are two patches by Stephane Grosjean, who adds support for the new PCAN-USB X6 USB interface to the pcan_usb driver. regards, Marc --- The following changes since commit aa196eed3d80d4b003b04a270712b978a012a939: macvtap: handle ubuf

Re: [RFC PATCH net-next v2] ipv6: implement consistent hashing for equal-cost multipath routing

2016-12-02 Thread David Lebrun
On 12/01/2016 06:55 PM, Roopa Prabhu wrote: > I think Its best for it to be a global setting, and thats why sysctl > seems like the best way (unless there are other ways to set this > globally via rtnetlink). If it helps, most hw switch vendors > supporting this feature also provide a globally tuna

[PATCH net v3] tipc: check minimum bearer MTU

2016-12-02 Thread Michal Kubecek
Qian Zhang (张谦) reported a potential socket buffer overflow in tipc_msg_build() which is also known as CVE-2016-8632: due to insufficient checks, a buffer overflow can occur if MTU is too short for even tipc headers. As anyone can set device MTU in a user/net namespace, this issue can be abused by

Re: [PATCH iproute2 net-next 2/4] tc: flower: document SCTP ip_proto

2016-12-02 Thread Simon Horman
On Thu, Dec 01, 2016 at 10:50:10AM -0800, Stephen Hemminger wrote: > On Tue, 29 Nov 2016 16:51:31 +0100 > Simon Horman wrote: > > > Add SCTP ip_proto to help text and man page. > > > > Signed-off-by: Simon Horman > > Sorry doesn't apply to current net-next branch in iproute2 git. > Probably so

Re: stmmac: turn coalescing / NAPI off in stmmac

2016-12-02 Thread Giuseppe CAVALLARO
On 12/1/2016 11:48 PM, Pavel Machek wrote: @@ -2771,12 +2771,8 @@ static netdev_features_t stmmac_fix_features(struct net_device *dev, features &= ~NETIF_F_CSUM_MASK; /* Disable tso if asked by ethtool */ - if ((priv->plat->tso_en) && (priv->dma_cap.tsoen)) { -

Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses.

2016-12-02 Thread Giuseppe CAVALLARO
+ Lino On 12/2/2016 9:24 AM, Giuseppe CAVALLARO wrote: Hello On 11/24/2016 10:25 PM, Pavel Machek wrote: Hi! I'm debugging strange delays during transmit in stmmac driver. They seem to be present in 4.4 kernel (and older kernels, too). Workload is burst of udp packets being sent, pause, bu

Re: [PATCH 1/2] net: stmmac: avoid Camelcase naming

2016-12-02 Thread Giuseppe CAVALLARO
Hello Corentin patches look ok, I just wonder if you tested it in case of the stmmac is connected to a transceiver. Let me consider it a critical part of the driver to properly work. Regards Peppe On 12/1/2016 4:19 PM, Corentin Labbe wrote: This patch simply rename regValue to value, like it w

Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses.

2016-12-02 Thread Pavel Machek
Hi! > >>1 HZ, which is the lowest granularity of non-highres timers in the > >>kernel, is variable as well as already too large of a delay for > >>effective TX coalescing. > >> > >>I seriously think that the TX coalescing support should be ripped out > >>or disabled entirely until it is implemente

[[PATCH iproute2/net-next v2] 2/4] tc: flower: document SCTP ip_proto

2016-12-02 Thread Simon Horman
Add SCTP ip_proto to help text and man page. Signed-off-by: Simon Horman --- man/man8/tc-flower.8 | 14 +++--- tc/f_flower.c| 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/man/man8/tc-flower.8 b/man/man8/tc-flower.8 index 56db42f983c1..a401293fed50 100644

[[PATCH iproute2/net-next v2] 3/4] tc: flower: correct name of ip_proto parameter to flower_parse_port()

2016-12-02 Thread Simon Horman
This corrects a typo. Fixes: a1fb0d484237 ("tc: flower: Support matching on SCTP ports") Signed-off-by: Simon Horman --- tc/f_flower.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tc/f_flower.c b/tc/f_flower.c index dacf24faf00e..d86ccdc3d3f0 100644 --- a/tc/f

[[PATCH iproute2/net-next v2] 4/4] tc: flower: make use of flower_port_attr_type() safe and silent

2016-12-02 Thread Simon Horman
Make use of flower_port_attr_type() safe: * flower_port_attr_type() may return a valid index into tb[] or -1. Only access tb[] in the case of the former. * Do not access null entries in tb[] Also make usage silent - it is valid for ip_proto to be invalid, for example if it is not specified as pa

[[PATCH iproute2/net-next v2] 0/4] tc: flower: SCTP and other port fixes

2016-12-02 Thread Simon Horman
Hi Stephen, this short series: * Makes some improvements to the documentation of flower; A follow-up to recent work by Paul Blakey and myself. * Corrects some errors introduced when SCTP port matching support was recently added. Changes since v2: * Rebase Simon Horman (4): tc: flower: rem

[[PATCH iproute2/net-next v2] 1/4] tc: flower: remove references to eth_type in manpage

2016-12-02 Thread Simon Horman
Remove references to eth_type and ether_type (spelling error) in the tc flower manpage. Also correct formatting of boldface text with whitespace. Cc: Paul Blakey Signed-off-by: Simon Horman --- man/man8/tc-flower.8 | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-)

Re: [PATCH net 0/7] net: stmmac: fix probe error handling and phydev leaks

2016-12-02 Thread Giuseppe CAVALLARO
On 11/30/2016 3:29 PM, Johan Hovold wrote: This series fixes a number of issues with the stmmac-driver probe error handling, which for example left clocks enabled after probe failures. The final patch fixes a failure to deregister and free any fixed-link PHYs that were registered during probe on

Re: [PATCH 1/4] bindings: net: stmmac: correct note about TSO

2016-12-02 Thread Giuseppe CAVALLARO
On 11/23/2016 3:24 PM, Niklas Cassel wrote: From: Niklas Cassel snps,tso was previously placed under AXI BUS Mode parameters, suggesting that the property should be in the stmmac-axi-config node. TSO (TCP Segmentation Offloading) has nothing to do with AXI BUS Mode parameters, and the parser a

Re: pull request (net-next): ipsec-next 2016-12-01

2016-12-02 Thread Steffen Klassert
On Thu, Dec 01, 2016 at 11:45:16AM -0500, David Miller wrote: > From: Steffen Klassert > Date: Thu, 1 Dec 2016 12:48:04 +0100 > > > git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git > > master > > > > for you to fetch changes up to 2258d927a691ddd2ab585adb17ea9f96e89d0638:

Re: [PATCH 1/2] net: stmmac: avoid Camelcase naming

2016-12-02 Thread Corentin Labbe
On Fri, Dec 02, 2016 at 09:44:48AM +0100, Giuseppe CAVALLARO wrote: > Hello Corentin > > patches look ok, I just wonder if you tested it in case of > the stmmac is connected to a transceiver. Let me consider it > a critical part of the driver to properly work. > > Regards > Peppe > I tested it

Re: [PATCH v2] cpsw: ethtool: add support for getting/setting EEE registers

2016-12-02 Thread Giuseppe CAVALLARO
Hi Florian sorry for my delay. On 11/24/2016 7:23 PM, Florian Fainelli wrote: +Peppe, Le 24/11/2016 à 07:38, Andrew Lunn a écrit : As for enabling advertising and correct working of cpsw do you mean it would be better to disable EEE in any PHY on cpsw initialization as long as cpsw doesn't pro

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

2016-12-02 Thread Jiri Benc
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 case when there's an interface with MTU 1500 forwarding to an interface with MTU 1

Re: [PATCH 1/2] net: stmmac: avoid Camelcase naming

2016-12-02 Thread Giuseppe CAVALLARO
On 12/2/2016 9:58 AM, Corentin Labbe wrote: On Fri, Dec 02, 2016 at 09:44:48AM +0100, Giuseppe CAVALLARO wrote: Hello Corentin patches look ok, I just wonder if you tested it in case of the stmmac is connected to a transceiver. Let me consider it a critical part of the driver to properly work.

Re: [RFC PATCH net-next v2] ipv6: implement consistent hashing for equal-cost multipath routing

2016-12-02 Thread David Lebrun
On 11/30/2016 05:04 AM, Tom Herbert wrote: > This is a lot of code to make ECMP work better. Can you be more > specific as to what the "issues" are? Assuming this is just the > transient packet reorder that happens in one link flap I am wondering > if this complexity is justified. Unconsistent has

Re: [patch net-next v3 11/12] mlxsw: spectrum_router: Request a dump of FIB tables during init

2016-12-02 Thread Ido Schimmel
On Fri, Dec 02, 2016 at 12:27:25AM +0100, Hannes Frederic Sowa wrote: > I really like that. Would you mind adding this? Yes. I'll send another version to Jiri today after testing and hopefully we can submit today / tomorrow. I think Linus is still undecided about -rc8 and I would like to get this

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

2016-12-02 Thread Jiri Benc
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 this in place, no core kernel functions that > > depend on skb->protocol may be called from

Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses.

2016-12-02 Thread Giuseppe CAVALLARO
Hi Pavel On 12/2/2016 9:45 AM, Pavel Machek wrote: Hi! 1 HZ, which is the lowest granularity of non-highres timers in the kernel, is variable as well as already too large of a delay for effective TX coalescing. I seriously think that the TX coalescing support should be ripped out or disabled

RE: [PATCH] net:phy fix driver reference count error when attach and detach phy device

2016-12-02 Thread David Laight
From: Mao Wenan > Sent: 30 November 2016 10:23 > The nic in my board use the phy dev from marvell, and the system will > load the marvell phy driver automatically, but when I remove the phy > drivers, the system immediately panic: > Call trace: > [ 2582.834493] [] phy_state_machine+0x3c/0x438 [ > 2

Re: [patch] net: renesas: ravb: unintialized return value

2016-12-02 Thread Johan Hovold
On Thu, Dec 01, 2016 at 11:57:44PM +0300, Dan Carpenter wrote: > We want to set the other "err" variable here so that we can return it > later. My version of GCC misses this issue but I caught it with a > static checker. > Fixes: 9f70eb339f52 ("net: ethernet: renesas: ravb: fix fixed-link phydev

[PATCH v2] netfilter: avoid warn and OOM killer on vmalloc call

2016-12-02 Thread Marcelo Ricardo Leitner
Andrey Konovalov reported that this vmalloc call is based on an userspace request and that it's spewing traces, which may flood the logs and cause DoS if abused. Florian Westphal also mentioned that this call should not trigger OOM killer. This patch brings the vmalloc call in sync to kmalloc and

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

2016-12-02 Thread Jiri Benc
On Fri, 2 Dec 2016 10:42:02 +0100, Jiri Benc wrote: > On Thu, 1 Dec 2016 12:31:09 -0800, Pravin Shelar wrote: > It's not set exactly by the caller, because that's what this patch is > removing. It is set by whoever handed over the packet to openvswitch. > The point is we don't know *what* it is set

[PATCH] net: wireless: realtek: constify rate_control_ops structures

2016-12-02 Thread Bhumika Goyal
The structures rate_control_ops are only passed as an argument to the functions ieee80211_rate_control_{register/unregister}. This argument is of type const, so rate_control_ops having this property can also be declared as const. Done using Coccinelle: @r1 disable optional_qualifier @ identifier

[PATCH/RFC net-next 0/2] net/sched: cls_flower: Support matching on ICMP

2016-12-02 Thread Simon Horman
Hi, this series add supports for matching on ICMP type and code to cls_flower. This is modeled on existing support for matching on L4 ports. The updates to the dissector are intended to allow for code and storage re-use. Simon Horman (2): flow dissector: ICMP support net/sched: cls_flower: Su

[PATCH/RFC net-next 1/2] flow dissector: ICMP support

2016-12-02 Thread Simon Horman
Allow dissection of ICMP(V6) type and code. This re-uses transport layer port dissection code as although ICMP is not a transport protocol and their type and code are not ports this allows sharing of both code and storage. Signed-off-by: Simon Horman --- drivers/net/bonding/bond_main.c | 6

[PATCH/RFC net-next 2/2] net/sched: cls_flower: Support matching on ICMP type and code

2016-12-02 Thread Simon Horman
Support matching on ICMP type and code. Example usage: tc qdisc add dev eth0 ingress tc filter add dev eth0 protocol ip parent : flower \ indev eth0 ip_proto icmp type 8 code 0 action drop tc filter add dev eth0 protocol ipv6 parent : flower \ indev eth0 ip_proto icmpv6

Re: [PATCH 4/6] net: ethernet: ti: cpts: add ptp pps support

2016-12-02 Thread Richard Cochran
On Wed, Nov 30, 2016 at 11:17:38PM +0100, Richard Cochran wrote: > On Wed, Nov 30, 2016 at 02:43:57PM -0600, Grygorii Strashko wrote: > > Sry, but this is questionable - code for pps comes from TI internal > > branches (SDK releases) where it survived for a pretty long time. Actually, there is a w

[PATCH/RFC iproute2/net-next 2/3] tc: flower: introduce enum flower_endpoint

2016-12-02 Thread Simon Horman
Introduce enum flower_endpoint and use it instead of a bool as the type for paramatising source and destination. This is intended to improve read-ability and provide some type checking of endpoint parameters. Signed-off-by: Simon Horman --- tc/f_flower.c | 22 ++ 1 file chan

[PATCH/RFC iproute2/net-next 3/3] tc: flower: support matching on ICMP type and code

2016-12-02 Thread Simon Horman
Support matching on ICMP type and code. Example usage: tc qdisc add dev eth0 ingress tc filter add dev eth0 protocol ip parent : flower \ indev eth0 ip_proto icmp type 8 code 0 action drop tc filter add dev eth0 protocol ipv6 parent : flower \ indev eth0 ip_proto icmpv6

[PATCH/RFC iproute2/net-next 0/3] tc: flower: Support matching on ICMP

2016-12-02 Thread Simon Horman
Add support for matching on ICMP type and code to flower. This is modeled on existing support for matching on L4 ports. The second patch provided a minor cleanup which is in keeping with they style used in the last patch. This is marked as an RFC to match the same designation given to the corresp

[PATCH/RFC iproute2/net-next 1/3] tc: flower: update headers for TCA_FLOWER_KEY_ICMP*

2016-12-02 Thread Simon Horman
These are proposed changes for net-next. Signed-off-by: Simon Horman --- include/linux/pkt_cls.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index a3d8a4f17d8e..fa435ea8ad21 100644 --- a/include/linux/pkt_cls.h +++ b/include/l

Re: [PATCH net] tcp: warn on bogus MSS and try to amend it

2016-12-02 Thread marcelo . leitner
On Thu, Dec 01, 2016 at 03:29:49PM -0500, David Miller wrote: > From: Marcelo Ricardo Leitner > Date: Wed, 30 Nov 2016 11:14:32 -0200 > > > There have been some reports lately about TCP connection stalls caused > > by NIC drivers that aren't setting gso_size on aggregated packets on rx > > path.

Re: [flamebait] xdp, well meaning but pointless

2016-12-02 Thread Jesper Dangaard Brouer
On Thu, 1 Dec 2016 13:51:32 -0800 Tom Herbert wrote: > >> The technical plenary at last IETF on Seoul a couple of weeks ago was > >> exclusively focussed on DDOS in light of the recent attack against > >> Dyn. There were speakers form Cloudflare and Dyn. The Cloudflare > >> presentation by Nick S

[iproute PATCH v2 09/18] ss: Make tmr_name local to tcp_timer_print()

2016-12-02 Thread Phil Sutter
It's used only there, so no need to have it globally defined. Signed-off-by: Phil Sutter --- misc/ss.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 71040a82ca6b1..97fcfd4a85548 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -882,15

[iproute PATCH v2 03/18] ss: Add missing tab when printing UNIX details

2016-12-02 Thread Phil Sutter
When dumping UNIX sockets and show_details is active but not show_mem (ss -xne), the socket details are printed without being prefixed by tab. Fix this by printing the tab character when either one of '-e' or '-m' has been specified. Signed-off-by: Phil Sutter --- misc/ss.c | 4 ++-- 1 file chan

[iproute PATCH v2 04/18] ss: Use sockstat->type in all socket types

2016-12-02 Thread Phil Sutter
Unix sockets used that field already to hold info about the socket type. By replicating this approach in all other socket types, we can get rid of protocol parameter in inet_stats_print() and have sock_state_print() figure things out by itself. Signed-off-by: Phil Sutter --- misc/ss.c | 132

[iproute PATCH v2 07/18] ss: Eliminate unix_use_proc()

2016-12-02 Thread Phil Sutter
This function is used only at a single place anymore, so replace the call to it by it's content, which makes that specific part of unix_show() consistent with e.g. tcp_show(). Signed-off-by: Phil Sutter --- misc/ss.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mis

[iproute PATCH v2 12/18] ss: Make slabstat_ids local to get_slabstat()

2016-12-02 Thread Phil Sutter
Signed-off-by: Phil Sutter --- misc/ss.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 3662f5f4861c7..c498478421190 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -601,21 +601,19 @@ struct slabstat { static struct slabstat slabstat;

[iproute PATCH v2 15/18] ss: Make unix_state_map local to unix_show()

2016-12-02 Thread Phil Sutter
Also make it const, since there won't be any write access happening. Signed-off-by: Phil Sutter --- misc/ss.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index c7818eadf9e75..e82c416b5fa72 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -2914,9 +2914,

[iproute PATCH v2 08/18] ss: Turn generic_proc_open() wrappers into macros

2016-12-02 Thread Phil Sutter
Signed-off-by: Phil Sutter --- misc/ss.c | 89 ++- 1 file changed, 19 insertions(+), 70 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index ad38eb97b0055..71040a82ca6b1 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -327,76 +327,25 @@ stat

[iproute PATCH v2 06/18] ss: Drop list traversal from unix_stats_print()

2016-12-02 Thread Phil Sutter
Although this complicates the dedicated procfs-based code path in unix_show() a bit, it's the only sane way to get rid of unix_show_sock() output diverging from other socket types in that it prints all socket details in a new line. As a side effect, it allows to eliminate all procfs specific code

[iproute PATCH v2 01/18] ss: Mark fall through in arg parsing switch()

2016-12-02 Thread Phil Sutter
As there is a certain chance of overlooking this, better add a comment to draw readers' attention. Signed-off-by: Phil Sutter --- misc/ss.c | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/ss.c b/misc/ss.c index 07dcd8c209c04..469721fd9aee3 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -4223

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

2016-12-02 Thread Amir Vadai
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 > > > @@ -119,18 +119,45 @@ static bool offset_valid(struct sk_buff *skb, int > > offset) > > return true; > > } > > > > +static int pedit_skb_hdr_offset(struct sk_buff

[iproute PATCH v2 02/18] ss: Drop empty lines in UDP output

2016-12-02 Thread Phil Sutter
When dumping UDP sockets and show_tcpinfo (-i) is active but not show_mem (-m), print_tcpinfo() does not output anything leading to an empty line being printed after every socket. Fix this by skipping the call to print_tcpinfo() and the previous newline printing in that case. Signed-off-by: Phil S

[iproute PATCH v2 18/18] ss: unix_show: No need to initialize members of calloc'ed structs

2016-12-02 Thread Phil Sutter
Signed-off-by: Phil Sutter --- misc/ss.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index c72aba7e65ad3..f23aa6be33174 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -3066,8 +3066,6 @@ static int unix_show(struct filter *f) if (!(u = calloc(1, sizeof(*

[iproute PATCH v2 13/18] ss: Get rid of useless goto in handle_follow_request()

2016-12-02 Thread Phil Sutter
Signed-off-by: Phil Sutter --- misc/ss.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index c498478421190..ec71c21ce6a4a 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -3632,7 +3632,7 @@ static int generic_show_sock(const struct sockaddr_nl *addr,

[iproute PATCH v2 11/18] ss: Make some variables function-local

2016-12-02 Thread Phil Sutter
addrp_width and screen_width are used in main() only, so no need to have them globally available. Signed-off-by: Phil Sutter --- misc/ss.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 44386c82c7578..3662f5f4861c7 100644 --- a/misc/ss.c +++ b/

[iproute PATCH v2 05/18] ss: introduce proc_ctx_print()

2016-12-02 Thread Phil Sutter
This consolidates identical code in three places. While the function name is not quite perfect as there is different proc_ctx printing code in netlink_show_one() as well, I sadly didn't find a more suitable one. Signed-off-by: Phil Sutter --- misc/ss.c | 49 ++

[iproute PATCH v2 00/18] ss: Minor code review

2016-12-02 Thread Phil Sutter
This is a series of misc changes to ss code which happened as fall-out when working on a unified output formatter (still unfinished). Changes since v1: - Rebased onto current upstream, resolved conflicts in patch 4 generated by previously added SCTP socket support. Phil Sutter (18): ss: Mark

[iproute PATCH v2 14/18] ss: Get rid of single-fielded struct snmpstat

2016-12-02 Thread Phil Sutter
A struct with only a single field does not make much sense. Besides that, it was used by print_summary() only. Signed-off-by: Phil Sutter --- misc/ss.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index ec71c21ce6a4a..c7818eadf9e75 100644 -

[PATCH net-next 0/2] samples, bpf: Refactor; Add automated tests for cgroups

2016-12-02 Thread Sargun Dhillon
These two patches are around refactoring out some old, reusable code from the existing test_current_task_under_cgroup_user test, and adding a new, automated test. There is some generic cgroupsv2 setup & cleanup code, given that most environment still don't have it setup by default. With this co

[iproute PATCH v2 17/18] ss: Make sstate_namel local to scan_state()

2016-12-02 Thread Phil Sutter
Signed-off-by: Phil Sutter --- misc/ss.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 8439f473d7f7b..c72aba7e65ad3 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -666,21 +666,6 @@ static const char *sctp_sstate_name[] =

Re: stmmac: turn coalescing / NAPI off in stmmac

2016-12-02 Thread Pavel Machek
Hi! > >Anyway... since you asked. I belive I have way to disable NAPI / tx > >coalescing in the driver. Unfortunately, locking is missing on the rx > >path, and needs to be extended to _irqsave variant on tx path. > > I have just replied to a previous thread about that... Yeah, please reply to D

[iproute PATCH v2 10/18] ss: Make user_ent_hash_build_init local to user_ent_hash_build()

2016-12-02 Thread Phil Sutter
By having it statically defined, there is no need for it to be global. Signed-off-by: Phil Sutter --- misc/ss.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 97fcfd4a85548..44386c82c7578 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -100,8 +100,6 @

[iproute PATCH v2 16/18] ss: Make sstate_name local to sock_state_print()

2016-12-02 Thread Phil Sutter
Signed-off-by: Phil Sutter --- misc/ss.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index e82c416b5fa72..8439f473d7f7b 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -655,21 +655,6 @@ static unsigned long long cookie_sk_get

[PATCH net-next 1/2] samples, bpf: Refactor test_current_task_under_cgroup - separate out helpers

2016-12-02 Thread Sargun Dhillon
This patch modifies test_current_task_under_cgroup_user. The test has several helpers around creating a temporary environment for cgroup testing, and moving the current task around cgroups. This set of helpers can then be used in other tests. Signed-off-by: Sargun Dhillon --- samples/bpf/Makefil

[PATCH net-next 2/2] samples, bpf: Add automated test for cgroup filter attachments

2016-12-02 Thread Sargun Dhillon
This patch adds the sample program test_cgrp2_attach2. This program is similar to test_cgrp2_attach, but it performs automated testing of the cgroupv2 BPF attached filters. It runs the following checks: * Simple filter attachment * Application of filters to child cgroups * Overriding filters on chi

[PATCH net v2] tcp: warn on bogus MSS and try to amend it

2016-12-02 Thread Marcelo Ricardo Leitner
There have been some reports lately about TCP connection stalls caused by NIC drivers that aren't setting gso_size on aggregated packets on rx path. This causes TCP to assume that the MSS is actually the size of the aggregated packet, which is invalid. Although the proper fix is to be done at each

Re: [PATCH 2/7] net: ethernet: ti: cpdma: fix desc re-queuing

2016-12-02 Thread Ivan Khoronzhuk
On Thu, Dec 01, 2016 at 05:34:27PM -0600, Grygorii Strashko wrote: > The currently processing cpdma descriptor with EOQ flag set may > contain two values in Next Descriptor Pointer field: > - valid pointer: means CPDMA missed addition of new desc in queue; It shouldn't happen in normal circumstance

[PATCH iproute2 V5 1/3] libnetlink: Introduce rta_getattr_be*()

2016-12-02 Thread Amir Vadai
Add the utility functions rta_getattr_be16() and rta_getattr_be32(), and change existing code to use it. Signed-off-by: Amir Vadai --- bridge/fdb.c | 4 ++-- include/libnetlink.h | 9 + ip/iplink_geneve.c | 2 +- ip/iplink_vxlan.c| 2 +- tc/f_flower.c| 2 +- 5 files

[PATCH iproute2 V5 3/3] tc/act_tunnel: Introduce ip tunnel action

2016-12-02 Thread Amir Vadai
This action could be used before redirecting packets to a shared tunnel device, or when redirecting packets arriving from a such a device. The 'unset' action is optional. It is used to explicitly unset the metadata created by the tunnel device during decap. If not used, the metadata will be releas

[PATCH iproute2 V5 2/3] tc/cls_flower: Classify packet in ip tunnels

2016-12-02 Thread Amir Vadai
Introduce classifying by metadata extracted by the tunnel device. Outer header fields - source/dest ip and tunnel id, are extracted from the metadata when classifying. For example, the following will add a filter on the ingress Qdisc of shared vxlan device named 'vxlan0'. To forward packets with o

  1   2   3   4   >