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

2016-11-28 Thread Jiri Benc
On Mon, 28 Nov 2016 14:29:39 -0800, Jarno Rajahalme wrote: > I’m not sure what you suggest here. Obviously the kernel ABI can not > be changed as existing userspace code expects upcalled packets to be > non-accelerated. Also, if userspace pushes vlan headers, the packet > will actually have them.

RE: [PATCH RFC v1] ethtool: implement helper to get flow_type value

2016-11-28 Thread Keller, Jacob E
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] On > Behalf Of David Miller > Sent: Friday, November 25, 2016 1:07 PM > To: Keller, Jacob E > Cc: netdev@vger.kernel.org; intel-wired-...@lists.osuosl.org > Subject: Re: [PATCH RFC v1] ethtool:

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

2016-11-28 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/brocade/bna/bnad_ethtool.c | 54 +-- 1 files changed, 30 insertions(+), 24 deletions(-) diff --git a/drivers/n

[net-next 1/1] samples: bpf: Refactor test_cgrp2_attach -- use getopt, and add mode

2016-11-28 Thread Sargun Dhillon
This patch modifies test_cgrp2_attach to use getopt so we can use standard command line parsing. It also adds an option to run the program in detach only mode. This does not attach a new filter at the cgroup, but only runs the detach command. Lastly, it changes the attach code to not detach and t

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

2016-11-28 Thread Jarno Rajahalme
> On Nov 28, 2016, at 2:42 PM, Jiri Benc wrote: > > On Mon, 28 Nov 2016 14:29:39 -0800, Jarno Rajahalme wrote: >> I’m not sure what you suggest here. Obviously the kernel ABI can not >> be changed as existing userspace code expects upcalled packets to be >> non-accelerated. Also, if userspace pu

Re: [PATCH] mlx4: give precise rx/tx bytes/packets counters

2016-11-28 Thread Eric Dumazet
On Mon, 2016-11-28 at 23:55 +0200, Saeed Mahameed wrote: > I have nothing against this patch, I just wanted to point out that > this patch is just fixing the symptom. > We keep ignoring the root cause that dev_get_stats is called under a > spin_lock which really ties our hands "us device drivers

[PATCH v2 06/13] net: ethernet: ti: cpts: disable cpts when unregistered

2016-11-28 Thread Grygorii Strashko
The cpts now is left enabled after unregistration. Hence, disable it in cpts_unregister(). Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpts.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c index cb851a7..9a

[PATCH v2 01/13] net: ethernet: ti: cpts: switch to readl/writel_relaxed()

2016-11-28 Thread Grygorii Strashko
Switch to readl/writel_relaxed() APIs, because this is recommended API and the CPTS IP is reused on Keystone 2 SoCs where LE/BE modes are supported. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 3/6] net: ethernet: ti: cpts: add support of cpts HW_TS_PUSH

2016-11-28 Thread Grygorii Strashko
This patch adds support of the CPTS HW_TS_PUSH events which are generated by external low frequency time stamp channels on TI's OMAP CPSW and Keystone 2 platforms. It supports up to 8 external time stamp channels for HW_TS_PUSH input pins (the number of supported channel is different for different

[PATCH v2 10/13] net: ethernet: ti: cpts: drop excessive writes to CTRL and INT_EN regs

2016-11-28 Thread Grygorii Strashko
CPTS module and IRQs are always enabled when CPTS is registered, before starting overflow check work, and disabled during deregistration, when overflow check work has been canceled already. So, It doesn't require to (re)enable CPTS module and IRQs in cpts_overflow_check(). Signed-off-by: Grygorii

[PATCH 2/6] net: ethernet: ti: cpts: add support for ext rftclk selection

2016-11-28 Thread Grygorii Strashko
Some CPTS instances, which can be found on KeyStone 2 1/10G Ethernet Switch Subsystems, can control an external multiplexer that selects one of up to 32 clocks for time sync reference (RFTCLK). This feature can be configured through CPTS_RFTCLK_SEL register (offset: x08). Hence, introduce optional

[PATCH 0/6] net: ethernet: ti: cpts: update and enable support on keystone 2 socs

2016-11-28 Thread Grygorii Strashko
Time Synchronization (CPTS) submodule which is present on KeyStone 66AK2HK/E/L/Gx 1G Switch Subsystem provides the same basic functionality as OMAP CPSW CPTS, but with few additional features: - CPTS rftclk selection (reg CPTS_RFTCLK_SEL). This feature is declared to be supported on am437x SoCs

[PATCH 5/6] ARM: keystone: dts: fix netcp clocks and add names

2016-11-28 Thread Grygorii Strashko
From: Murali Karicheri Fix the pa clock to point to the clkpa which has clock rate of 1/3 of PA PLL clock and add clock names. Signed-off-by: Murali Karicheri Signed-off-by: Grygorii Strashko --- arch/arm/boot/dts/keystone-k2e-netcp.dtsi | 3 ++- arch/arm/boot/dts/keystone-k2hk-netcp.dtsi |

[PATCH 6/6] ARM: dts: keystone: enable time synchronization (cpts) submodule

2016-11-28 Thread Grygorii Strashko
This patch adds DT configuration for Time Synchronization (CPTS) submodule which is present on KeyStone 66AK2HK/E/Lx 1G Switch Subsystem. The SYSCLK2 is selected as CPTS rftclk by default. The ts_comp enabled for 66AK2E/L SoCs. Signed-off-by: Grygorii Strashko --- arch/arm/boot/dts/keystone-k2e-

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

2016-11-28 Thread Grygorii Strashko
The TS_COMP output in the CPSW CPTS module is asserted for ts_comp_length[15:0] RCLK periods when the time_stamp value compares with the ts_comp_val[31:0] and the length value is non-zero. The TS_COMP pulse edge occurs three RCLK periods after the values compare. A timestamp compare event is pushed

[PATCH 1/6] net: ethernet: ti: netcp: add support of cpts

2016-11-28 Thread Grygorii Strashko
From: WingMan Kwok This patch adds support of the cpts device found in the gbe and 10gbe ethernet switches on the keystone 2 SoCs (66AK2E/L/Hx, 66AK2Gx). Signed-off-by: WingMan Kwok Signed-off-by: Grygorii Strashko --- .../devicetree/bindings/net/keystone-netcp.txt | 9 + drivers/net/et

[PATCH v2 12/13] net: ethernet: ti: cpts: calc mult and shift from refclk freq

2016-11-28 Thread Grygorii Strashko
The cyclecounter mult and shift values can be calculated based on the CPTS rfclk frequency and timekeepnig framework provides required algos and API's. Hence, calc mult and shift basing on CPTS rfclk frequency if both cpts_clock_shift and cpts_clock_mult properties are not provided in DT (the basi

[PATCH v2 13/13] net: ethernet: ti: cpts: fix overflow check period

2016-11-28 Thread Grygorii Strashko
The CPTS drivers uses 8sec period for overflow checking with assumption that CPTS retclk will not exceed 500MHz. But that's not true on some TI platforms (Kesytone 2). As result, it is possible that CPTS counter will overflow more than once between two readings. Hence, fix it by selecting overflow

[PATCH v2 11/13] clocksource: export the clocks_calc_mult_shift to use by timestamp code

2016-11-28 Thread Grygorii Strashko
From: Murali Karicheri The CPSW CPTS driver is capable of doing timestamping on tx/rx packets and requires to know mult and shift factors for timestamp conversion from raw value to nanoseconds (ptp clock). Now these mult and shift factors are calculated manually and provided through DT, which mak

[PATCH v2 00/13] net: ethernet: ti: cpts: update and fixes

2016-11-28 Thread Grygorii Strashko
It is preparation series intended to clean up and optimize TI CPTS driver to facilitate further integration with other TI's SoCs like Keystone 2. Changes in v2: - patch "net: ethernet: ti: cpts: rework initialization/deinitialization" was split on 4 patches - applied comments from Richard Cochra

[PATCH v2 07/13] net: ethernet: ti: cpts: rework initialization/deinitialization

2016-11-28 Thread Grygorii Strashko
The current implementation CPTS initialization and deinitialization (represented by cpts_register/unregister()) does too many static initialization from .ndo_open(), which is reasonable to do once at probe time instead, and also require caller to allocate memory for struct cpts, which is internal f

[PATCH v2 03/13] net: ethernet: ti: cpsw: minimize direct access to struct cpts

2016-11-28 Thread Grygorii Strashko
This will provide more flexibility in changing CPTS internals and also required for further changes. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw.c | 28 +++- drivers/net/ethernet/ti/cpts.h | 39 +++ 2 files changed

[PATCH v2 02/13] net: ethernet: ti: allow cpts to be built separately

2016-11-28 Thread Grygorii Strashko
TI CPTS IP is used as part of TI OMAP CPSW driver, but it's also present as part of NETCP on TI Keystone 2 SoCs. So, It's required to enable build of CPTS for both this drivers and this can be achieved by allowing CPTS to be built separately. Hence, allow cpts to be built separately and convert it

[PATCH RFC v2] ethtool: implement helper to get flow_type value

2016-11-28 Thread Jacob Keller
Often a driver wants to store the flow type and thus it must mask the extra fields. This is a task that could grow more complex as more flags are added in the future. Add a helper function that masks the flags for marking additional fields. Modify drivers in drivers/net/ethernet that currently che

[PATCH v2 08/13] net: ethernet: ti: cpts: move dt props parsing to cpts driver

2016-11-28 Thread Grygorii Strashko
Move DT properties parsing into CPTS driver to simplify CPSW code and CPTS driver porting on other SoC in the future (like Keystone 2) - with this change it will not be required to add the same DT parsing code in Keystone 2 NETCP driver. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/

[PATCH v2 05/13] net: ethernet: ti: cpts: fix registration order

2016-11-28 Thread Grygorii Strashko
The ptp clock registered before spinlock, which is protecting it, and before timecounter and cyclecounter initialization in cpts_register(). So, ensure that ptp clock is registered the last, after everything else is done. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpts.c | 24

[PATCH v2 04/13] net: ethernet: ti: cpts: fix unbalanced clk api usage in cpts_register/unregister

2016-11-28 Thread Grygorii Strashko
There are two issues with TI CPTS code which are reproducible when TI CPSW ethX device passes few up/down iterations: - cpts refclk prepare counter continuously incremented after each up/down iteration; - devm_clk_get(dev, "cpts") is called many times. Hence, fix these issues by using clk_disable_

[PATCH v2 09/13] net: ethernet: ti: cpts: clean up event list if event pool is empty

2016-11-28 Thread Grygorii Strashko
From: WingMan Kwok When a CPTS user does not exit gracefully by disabling cpts timestamping and leaving a joined multicast group, the system continues to receive and timestamps the ptp packets which eventually occupy all the event list entries. When this happns, the added code tries to remove so

Re: net: GPF in eth_header

2016-11-28 Thread Eric Dumazet
On Mon, 2016-11-28 at 23:19 +0100, Florian Westphal wrote: > It currently returns -EINVAL in cases where skb wasn't changed/altered > (e.g. because it doesn't have a fragment header), so we should ACCEPT in > that case. > Maybe nf_ct_frag6_queue() should return direct NF_ codes then ...

[PATCH net-next v2] ipv6 addrconf: Implemented enhanced DAD (RFC7527)

2016-11-28 Thread Erik Nordmark
Implemented RFC7527 Enhanced DAD. IPv6 duplicate address detection can fail if there is some temporary loopback of Ethernet frames. RFC7527 solves this by including a random nonce in the NS messages used for DAD, and if an NS is received with the same nonce it is assumed to be a looped back DAD pr

Re: [net-next PATCH v2 3/5] virtio_net: Add XDP support

2016-11-28 Thread John Fastabend
[...] >> Perfect! hacking qemu for testing is no problem this helps a lot thanks >> and saves me time trying to figure out how to get qemu to do this. > > Pls note I didn't try this at all, so might not work, but should > give you the idea. > >>> >>> diff --git a/hw/net/virtio-net.c b/hw/net/vir

[PATCH net] ipv6: Allow IPv4-mapped address as next-hop

2016-11-28 Thread Erik Nordmark
Made kernel accept IPv6 routes with IPv4-mapped address as next-hop. It is possible to configure IP interfaces with IPv4-mapped addresses, and one can add IPv6 routes for IPv4-mapped destinations/prefixes, yet prior to this fix the kernel returned an EINVAL when attempting to add an IPv6 route wi

Re: [net PATCH 0/2] Don't use lco_csum to compute IPv4 checksum

2016-11-28 Thread Stephen Rothwell
Hi Jeff, On Mon, 28 Nov 2016 14:26:02 -0800 Jeff Kirsher wrote: > > On Mon, 2016-11-28 at 10:42 -0500, Alexander Duyck wrote: > > When I implemented the GSO partial support in the Intel drivers I was > > using > > lco_csum to compute the checksum that we needed to plug into the IPv4 > > checksum

[PATCH net] openvswitch: Fix skb leak in IPv6 reassembly.

2016-11-28 Thread Daniele Di Proietto
If nf_ct_frag6_gather() returns an error other than -EINPROGRESS, it means that we still have a reference to the skb. We should free it before returning from handle_fragments, as stated in the comment above. Fixes: daaa7d647f81 ("netfilter: ipv6: avoid nf_iterate recursion") CC: Florian Westphal

Re: [PATCH net-next 2/2] net: phy: bcm7xxx: Plug in support for reading PHY error counters

2016-11-28 Thread kbuild test robot
Hi Florian, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/net-phy-broadcom-Add-support-code-for-reading-PHY-counters/20161129-054614 config: x86_64-randconfig-a0-11290519 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 2

Re: Aw: Re: [PATCH] mlx4: give precise rx/tx bytes/packets counters

2016-11-28 Thread Eric Dumazet
On Mon, 2016-11-28 at 23:02 +0100, Lino Sanfilippo wrote: > Hi Eric, > > On 25.11.2016 20:19, Eric Dumazet wrote: > > On Fri, 2016-11-25 at 17:30 +0100, Lino Sanfilippo wrote: > >> Hi, > >> > >> > >> > > >> > The READ_ONCE() are documenting the fact that no lock is taken to fetch > >> > the sta

linux-next: manual merge of the net-next tree with the net tree

2016-11-28 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: drivers/net/ethernet/amd/xgbe/xgbe-main.c between commit: 91eefaabf102 ("amd-xgbe: Fix unused suspend handlers build warning") from the net tree and commit: bd8255d8ba35 ("amd-xgbe: Prepare for supporting PCI devic

Re: [PATCH net] openvswitch: Fix skb leak in IPv6 reassembly.

2016-11-28 Thread Eric Dumazet
On Mon, 2016-11-28 at 15:43 -0800, Daniele Di Proietto wrote: > If nf_ct_frag6_gather() returns an error other than -EINPROGRESS, it > means that we still have a reference to the skb. We should free it > before returning from handle_fragments, as stated in the comment above. > > Fixes: daaa7d647f

linux-next: manual merge of the net-next tree with the net tree

2016-11-28 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: drivers/net/ethernet/mellanox/mlx4/en_netdev.c between commit: b4353708f5a1 ("Revert "net/mlx4_en: Avoid unregister_netdev at shutdown flow"") from the net tree and commit: 67f8b1dcb9ee ("net/mlx4_en: Refactor the

linux-next: manual merge of the net-next tree with the net tree

2016-11-28 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/sched/cls_flower.c between commit: d936377414fa ("net, sched: respect rcu grace period on cls destruction") from the net tree and commit: 13fa876ebd03 ("net/sched: cls_flower: merge filter delete/destroy common

Re: [PATCH v2] net: phy: Fix use after free in phy_detach()

2016-11-28 Thread Zach Brown
On Mon, Nov 28, 2016 at 03:18:31PM +0100, Geert Uytterhoeven wrote: > If device_release_driver(&phydev->mdio.dev) is called, it releases all > resources belonging to the PHY device. Hence the subsequent call to > phy_led_triggers_unregister() will access already freed memory when > unregistering th

Re: [PATCH net-next 1/3] ethtool: (uapi) Add ETHTOOL_PHY_LOOPBACK to PHY tunables

2016-11-28 Thread Andrew Lunn
> > If you really do what to do this, you should look at NETIF_F_LOOPBACK > > and consider how this concept can be applied at the PHY, not the MAC. > > But you need the full concept, so you see things like: > > > > 2: eth0: mtu 1500 qdisc > > pfifo_fast state UP mode DEFAULT group default qlen 1

Re: [PATCH net] openvswitch: Fix skb leak in IPv6 reassembly.

2016-11-28 Thread Florian Westphal
Eric Dumazet wrote: > On Mon, 2016-11-28 at 15:43 -0800, Daniele Di Proietto wrote: > > If nf_ct_frag6_gather() returns an error other than -EINPROGRESS, it > > means that we still have a reference to the skb. We should free it > > before returning from handle_fragments, as stated in the comment

[PATCH net-next V3 1/9] liquidio CN23XX: VF register definitions

2016-11-28 Thread Raghu Vatsavayi
Adds support for CN23xx VF registers. Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas --- .../net/ethernet/cavium/liquidio/cn23xx_vf_regs.h | 274 + 1 file changed, 274 insertions(+) create mode 100

[PATCH net-next V3 0/9] liquidio VF operations

2016-11-28 Thread Raghu Vatsavayi
Hi Dave, This patchseries adds support for VF device specific operations like mailbox, queues and register access. This V3 patchset also has changes based on comments form earlier versions: 1) Removed extra 'void *' casting. 2) Fixed all cross compilations issues reported on S390 and Powerpc a

[PATCH net-next V3 4/9] liquidio CN23XX: VF queue setup

2016-11-28 Thread Raghu Vatsavayi
Adds support for configuring VF input/output queues. Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas --- .../ethernet/cavium/liquidio/cn23xx_vf_device.c| 144 + .../ethernet/cavium/liquidio/cn23xx

[PATCH net-next V3 5/9] liquidio CN23XX: VF register access

2016-11-28 Thread Raghu Vatsavayi
This patch adds support for VF device register access. Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas --- .../ethernet/cavium/liquidio/cn23xx_vf_device.c| 189 + .../ethernet/cavium/liquidio/cn23

[PATCH net-next V3 6/9] liquidio CN23XX: init VF softcommand queues

2016-11-28 Thread Raghu Vatsavayi
Adds support for initializing softcommand, dispatch and instructions queues for VF. Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas --- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 74 +- .../

[PATCH net-next V3 9/9] liquidio CN23XX: VF init and destroy

2016-11-28 Thread Raghu Vatsavayi
Adds support for VF initialization and destroy resources. Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas --- .../ethernet/cavium/liquidio/cn23xx_vf_device.h| 2 + drivers/net/ethernet/cavium/liquidio/lio_vf_main.c

[PATCH net-next V3 8/9] liquidio CN23XX: VF interrupt

2016-11-28 Thread Raghu Vatsavayi
Adds support for VF interrupt processing. Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas --- .../ethernet/cavium/liquidio/cn23xx_vf_device.c| 265 + .../ethernet/cavium/liquidio/cn23xx_vf_device.

[PATCH net-next V3 7/9] liquidio CN23XX: VF mailbox

2016-11-28 Thread Raghu Vatsavayi
Adds support for VF mailbox setup. Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas --- .../ethernet/cavium/liquidio/cn23xx_vf_device.c| 59 ++ drivers/net/ethernet/cavium/liquidio/lio_vf_main.c |

[PATCH net-next V3 2/9] liquidio CN23XX: VF registration

2016-11-28 Thread Raghu Vatsavayi
Adds support for cn23xx VF probe and registration. Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas --- drivers/net/ethernet/cavium/Kconfig| 12 +++ drivers/net/ethernet/cavium/liquidio/Makefile | 2

[PATCH net-next V3 3/9] liquidio CN23XX: VF config setup

2016-11-28 Thread Raghu Vatsavayi
Adds support for setting up VF configuration. Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas --- drivers/net/ethernet/cavium/liquidio/Makefile | 2 + .../ethernet/cavium/liquidio/cn23xx_vf_device.c| 44 +

[PATCH net-next v2 2/2] net: phy: bcm7xxx: Plug in support for reading PHY error counters

2016-11-28 Thread Florian Fainelli
Broadcom BCM7xxx internal PHYs can leverage the Broadcom PHY library module PHY error counters helper functions, just implement the appropriate PHY driver function calls to do so. We need to allocate some storage space for our PHY statistics, and provide it to the Broadcom PHY library, so do this i

[PATCH net-next v2 0/2] net: phy: broadcom: Support for PHY counters

2016-11-28 Thread Florian Fainelli
Hi all, This patch series adds support for reading the Broadcom PHYs internal counters. Changes in v2: - fixed modular build reported by kbuild - constify array of stats Florian Fainelli (2): net: phy: broadcom: Add support code for reading PHY counters net: phy: bcm7xxx: Plug in support f

[PATCH net-next v2 1/2] net: phy: broadcom: Add support code for reading PHY counters

2016-11-28 Thread Florian Fainelli
Broadcom PHYs expose a number of PHY error counters: receive errors, false carrier sense, SerDes BER count, local and remote receive errors. Add support code to allow retrieving these error counters. Since the Broadcom PHY library code is used by several drivers, make it possible for them to specif

Re: [PATCH net-next 1/1] driver: ipvlan: Add the sanity check for ipvlan mode

2016-11-28 Thread Feng Gao
Hi David & Mahesh, On Tue, Nov 29, 2016 at 4:08 AM, David Miller wrote: > From: Mahesh Bandewar (महेश बंडेवार) > Date: Mon, 28 Nov 2016 11:02:45 -0800 > >> On Mon, Nov 28, 2016 at 5:23 AM, wrote: >> >>> From: Gao Feng >>> >>> The ipvlan mode variable "nval" is from userspace, so the ipvlan cod

Re: [PATCH net-next v2 1/1] driver: ipvlan: Use NF_IP_PRI_LAST as hook priority instead of INT_MAX

2016-11-28 Thread Gao Feng
Hi Mahesh, On Tue, Nov 29, 2016 at 3:26 AM, Mahesh Bandewar (महेश बंडेवार) wrote: > On Sun, Nov 27, 2016 at 3:18 AM, wrote: >> From: Gao Feng >> >> It is better to use NF_IP_PRI_LAST instead of INT_MAX as hook priority. >> The former is good at readability and easier to maintain. >> > This IPv

Re: [PATCH net] openvswitch: Fix skb leak in IPv6 reassembly.

2016-11-28 Thread Joe Stringer
On 28 November 2016 at 16:45, Florian Westphal wrote: > Eric Dumazet wrote: >> On Mon, 2016-11-28 at 15:43 -0800, Daniele Di Proietto wrote: >> > If nf_ct_frag6_gather() returns an error other than -EINPROGRESS, it >> > means that we still have a reference to the skb. We should free it >> > befo

RE: [patch net] net: fec: cache statistics while device is down

2016-11-28 Thread Andy Duan
From: Nikita Yushchenko Sent: Monday, November 28, 2016 10:27 PM >To: David S. Miller ; Andy Duan >; Troy Kisky ; >Andrew Lunn ; Eric Nelson ; Philippe >Reynes ; Johannes Berg ; >netdev@vger.kernel.org >Cc: Chris Healy ; Fabio Estevam >; linux-ker...@vger.kernel.org; Nikita >Yushchenko

[PATCH v2] vxlan: fix a potential issue when create a new vxlan fdb entry.

2016-11-28 Thread Haishuang Yan
vxlan_fdb_append may return error, so add the proper check, otherwise it will cause memory leak. Signed-off-by: Haishuang Yan Changes in v2: - Unnecessary to initialize rc to zero. --- drivers/net/vxlan.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/n

Re: [PATCH net V2] net/sched: pedit: make sure that offset is valid

2016-11-28 Thread zhuyj
+ if (offset > 0 && offset > skb->len) offset > skb->len is enough? On Mon, Nov 28, 2016 at 6:56 PM, Amir Vadai wrote: > Add a validation function to make sure offset is valid: > 1. Not below skb head (could happen when offset is negative). > 2. Validate both 'offset' and 'at'. > > Signed

[PATCH net 2/2] Revert: "ip6_tunnel: Update skb->protocol to ETH_P_IPV6 in ip6_tnl_xmit()"

2016-11-28 Thread Eli Cooper
This reverts commit ae148b085876fa771d9ef2c05f85d4b4bf09ce0d ("ip6_tunnel: Update skb->protocol to ETH_P_IPV6 in ip6_tnl_xmit()"). skb->protocol is now set in ip_local_out() and ip6_local_out() right before dst_output() is called. It is no longer necessary to do it in each tunnel. Cc: sta...@vger

[PATCH net 1/2] Set skb->protocol properly before calling dst_output()

2016-11-28 Thread Eli Cooper
When xfrm is applied to TSO/GSO packets, it follows this path: xfrm_output() -> xfrm_output_gso() -> skb_gso_segment() where skb_gso_segment() relies on skb->protocol to function properly. This patch sets skb->protocol properly before dst_output() is called, fixing a bug where GSO packets se

[PATCH v2 net-next 1/2] openvswitch: Add a missing break statement.

2016-11-28 Thread Jarno Rajahalme
Add a break statement to prevent fall-through from OVS_KEY_ATTR_ETHERNET to OVS_KEY_ATTR_TUNNEL. Without the break actions setting ethernet addresses fail to validate with log messages complaining about invalid tunnel attributes. Fixes: 0a6410fbde ("openvswitch: netlink: support L3 packets") Sign

[PATCH v2 net-next 2/2] openvswitch: Fix skb->protocol for vlan frames.

2016-11-28 Thread Jarno Rajahalme
Do not set skb->protocol to be the ethertype of the L3 header, unless the packet only has the L3 header. For a non-hardware offloaded VLAN frame skb->protocol needs to be one of the VLAN ethertypes. Any VLAN offloading is undone on the OVS netlink interface. Also any VLAN tags added by userspace

Re: [PATCH net-next v2 2/2] net: phy: bcm7xxx: Plug in support for reading PHY error counters

2016-11-28 Thread Andrew Lunn
> +struct bcm7xxx_phy_priv { > + u64 *stats; > +}; > +static int bcm7xxx_28nm_probe(struct phy_device *phydev) > +{ > + struct bcm7xxx_phy_priv *priv; > + > + priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL); > + if (!priv) > + return -ENOMEM; > + >

RE: Account Verification

2016-11-28 Thread Marquell Woodson
From: Marquell Woodson Sent: Monday, November 28, 2016 9:35 PM Subject: Account Verification Dear Account Owner, we noticed your account being used in sending spam emails from an IP Address situated in Malaysia 689.9087.0987. we have placed a stop on your accoun

Re: [PATCH net] bpf: fix states equal logic for varlen access

2016-11-28 Thread Alexei Starovoitov
On Mon, Nov 28, 2016 at 02:44:10PM -0500, Josef Bacik wrote: > If we have a branch that looks something like this > > int foo = map->value; > if (condition) { > foo += blah; > } else { > foo = bar; > } > map->array[foo] = baz; > > We will incorrectly assume that the !condition branch is equal

Re: [PATCH net-next v2 2/2] net: phy: bcm7xxx: Plug in support for reading PHY error counters

2016-11-28 Thread Florian Fainelli
Le 11/28/16 à 18:50, Andrew Lunn a écrit : >> +struct bcm7xxx_phy_priv { >> +u64 *stats; >> +}; > >> +static int bcm7xxx_28nm_probe(struct phy_device *phydev) >> +{ >> +struct bcm7xxx_phy_priv *priv; >> + >> +priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL); >> +

[net-next] macvtap: replace printk with netdev_err

2016-11-28 Thread Zhang Shengju
This patch replaces printk() with netdev_err() for macvtap device. Signed-off-by: Zhang Shengju --- drivers/net/macvtap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 5da9861..2513939 100644 --- a/drivers/net/macvtap.c ++

Re: [net-next 1/1] samples: bpf: Refactor test_cgrp2_attach -- use getopt, and add mode

2016-11-28 Thread Alexei Starovoitov
On Mon, Nov 28, 2016 at 02:52:42PM -0800, Sargun Dhillon wrote: > This patch modifies test_cgrp2_attach to use getopt so we can use standard > command line parsing. > > It also adds an option to run the program in detach only mode. This does > not attach a new filter at the cgroup, but only runs t

Re: [RFC PATCH 1/2] net: macb: Add MDIO driver for accessing multiple PHY devices

2016-11-28 Thread Harini Katakam
Hi Andrew, On Mon, Nov 28, 2016 at 10:03 PM, Andrew Lunn wrote: > On Mon, Nov 28, 2016 at 03:19:14PM +0530, Harini Katakam wrote: >> This patch is to add support for the hardware with multiple ethernet >> MAC controllers and a single MDIO bus connected to multiple PHY devices. >> MDIO lines are c

Re: Crash due to mutex genl_lock called from RCU context

2016-11-28 Thread Cong Wang
On Mon, Nov 28, 2016 at 3:22 AM, Herbert Xu wrote: > netlink: Call cb->done from a worker thread > > The cb->done interface expects to be called in process context. > This was broken by the netlink RCU conversion. This patch fixes > it by adding a worker struct to make the cb->done call where > n

[PATCH] openvswitch: add sanity check in queue_userspace_packet.

2016-11-28 Thread Haishuang Yan
kernel will crash in oops if genlmsg_put return NULL, so add the sanity check. Signed-off-by: Haishuang Yan --- net/openvswitch/datapath.c | 4 1 file changed, 4 insertions(+) diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 2d4c4d3..ceb1b1e 100644 --- a/net/openv

[PATCH net-next v4 1/3] bpf: Refactor cgroups code in prep for new type

2016-11-28 Thread David Ahern
Code move and rename only; no functional change intended. Signed-off-by: David Ahern --- v4 - dropped refactor of __cgroup_bpf_run_filter and renamed it to __cgroup_bpf_run_filter_skb v3 - dropped the rename v2 - fix bpf_prog_run_clear_cb to bpf_prog_run_save_cb as caught by Daniel - rename

[PATCH net-next v4 0/3] net: Add bpf support to set sk_bound_dev_if

2016-11-28 Thread David Ahern
The recently added VRF support in Linux leverages the bind-to-device API for programs to specify an L3 domain for a socket. While SO_BINDTODEVICE has been around for ages, not every ipv4/ipv6 capable program has support for it. Even for those programs that do support it, the API requires processes

[PATCH net-next v4 2/3] bpf: Add new cgroup attach type to enable sock modifications

2016-11-28 Thread David Ahern
Add new cgroup based program type, BPF_PROG_TYPE_CGROUP_SOCK. Similar to BPF_PROG_TYPE_CGROUP_SKB programs can be attached to a cgroup and run any time a process in the cgroup opens an AF_INET or AF_INET6 socket. Currently only sk_bound_dev_if is exported to userspace for modification by a bpf prog

[PATCH net-next v4 3/3] samples: bpf: add userspace example for modifying sk_bound_dev_if

2016-11-28 Thread David Ahern
Add a simple program to demonstrate the ability to attach a bpf program to a cgroup that sets sk_bound_dev_if for AF_INET{6} sockets when they are created. Signed-off-by: David Ahern --- v4 - added test_cgrp2_sock.sh for an automated test v3 - revert to BPF_PROG_TYPE_CGROUP_SOCK prog type v2 -

Re: [PATCH] openvswitch: add sanity check in queue_userspace_packet.

2016-11-28 Thread Pravin Shelar
On Mon, Nov 28, 2016 at 8:36 PM, Haishuang Yan wrote: > kernel will crash in oops if genlmsg_put return NULL, > so add the sanity check. > > Signed-off-by: Haishuang Yan > --- > net/openvswitch/datapath.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/net/openvswitch/datapath.c b/n

Re: [PATCH net] net, sched: respect rcu grace period on cls destruction

2016-11-28 Thread Roi Dayan
On 27/11/2016 02:18, Daniel Borkmann wrote: Roi reported a crash in flower where tp->root was NULL in ->classify() callbacks. Reason is that in ->destroy() tp->root is set to NULL via RCU_INIT_POINTER(). It's problematic for some of the classifiers, because this doesn't respect RCU grace period

Re: [net-next 1/1] samples: bpf: Refactor test_cgrp2_attach -- use getopt, and add mode

2016-11-28 Thread Sargun Dhillon
On Mon, Nov 28, 2016 at 7:50 PM, Alexei Starovoitov wrote: > On Mon, Nov 28, 2016 at 02:52:42PM -0800, Sargun Dhillon wrote: >> This patch modifies test_cgrp2_attach to use getopt so we can use standard >> command line parsing. >> >> It also adds an option to run the program in detach only mode. T

Re: [patch net] net: fec: cache statistics while device is down

2016-11-28 Thread Nikita Yushchenko
> > > >+ fec_enet_update_ethtool_stats(ndev); > >+ > If user never open the interface, ethtool_stats[] always is 0 that are not > expected. > So, it also should be called at . fec_enet_init() ? I don't think that zero stats is wrong for never-opened interface. However a call at init path wo

Re: [net-next 1/1] samples: bpf: Refactor test_cgrp2_attach -- use getopt, and add mode

2016-11-28 Thread Alexei Starovoitov
On Mon, Nov 28, 2016 at 09:42:25PM -0800, Sargun Dhillon wrote: > On Mon, Nov 28, 2016 at 7:50 PM, Alexei Starovoitov > wrote: > > On Mon, Nov 28, 2016 at 02:52:42PM -0800, Sargun Dhillon wrote: > >> This patch modifies test_cgrp2_attach to use getopt so we can use standard > >> command line parsi

[PATCH v2] net: macb: Write only necessary bits in NCR in macb reset

2016-11-28 Thread Harini Katakam
In macb_reset_hw, use read-modify-write to disable RX and TX. Existing settings, for ex. management port enable, are being cleared in the current implementation. Also certain reserved bits are read only. Hence it is better to use read-modify-write. Use the same method for clearing statistics as wel

Re: net: deadlock on genl_mutex

2016-11-28 Thread subashab
Issue was reported yesterday and is under investigation. http://marc.info/?l=linux-netdev&m=148014004331663&w=2 Thanks ! Hi Dmitry Can you try the patch below with your reproducer? I haven't seen similar crashes reported after this (or even with Eric's patch). https://patchwork.ozlabs.o

Re: net: deadlock on genl_mutex

2016-11-28 Thread Eric Dumazet
On Mon, 2016-11-28 at 22:59 -0700, subas...@codeaurora.org wrote: > > > > Issue was reported yesterday and is under investigation. > > > > > > http://marc.info/?l=linux-netdev&m=148014004331663&w=2 > > > > > > Thanks ! > > Hi Dmitry > > Can you try the patch below with your reproducer? I hav

[PATCH net-next] samples/bpf: fix include path

2016-11-28 Thread Alexei Starovoitov
Fix the following build error: HOSTCC samples/bpf/test_lru_dist.o ../samples/bpf/test_lru_dist.c:25:22: fatal error: bpf_util.h: No such file or directory This is due to objtree != srctree. Use srctree, since that's where bpf_util.h is located. Fixes: e00c7b216f34 ("bpf: fix multiple issues in

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-28 Thread Vishwanathapura, Niranjana
On Thu, Nov 24, 2016 at 09:15:45AM -0700, Jason Gunthorpe wrote: And will move the hfi_vnic module under ‘drivers/infiniband/ulp/hfi_vnic’. I would prefer drivers/net/ethernet This is clearly not a ULP since it doesn't use verbs. I understand it is not using verbs, but the control path (ib_

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-28 Thread Vishwanathapura, Niranjana
On Fri, Nov 25, 2016 at 12:05:09PM -0700, Jason Gunthorpe wrote: On Thu, Nov 24, 2016 at 06:13:50PM -0800, Vishwanathapura, Niranjana wrote: In order to be truely device independent the hfi_vnic ULP should not depend on a device exported symbol. Instead device should register its functions with

Re: linux-next: manual merge of the net-next tree with the net tree

2016-11-28 Thread Daniel Borkmann
On 11/29/2016 01:31 AM, Stephen Rothwell wrote: Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/sched/cls_flower.c between commit: d936377414fa ("net, sched: respect rcu grace period on cls destruction") from the net tree and commit: 13fa876ebd03 ("net/

Re: [PATCH net-next] samples/bpf: fix include path

2016-11-28 Thread Daniel Borkmann
On 11/29/2016 07:07 AM, Alexei Starovoitov wrote: Fix the following build error: HOSTCC samples/bpf/test_lru_dist.o ../samples/bpf/test_lru_dist.c:25:22: fatal error: bpf_util.h: No such file or directory This is due to objtree != srctree. Use srctree, since that's where bpf_util.h is located.

[PATCH] ipv6:ip6_xmit remove unnecessary np NULL check

2016-11-28 Thread Manjeet Pawar
From: Rohit Thapliyal np NULL check doesn't seem required here as it shall never be NULL anyways in inet6_sk(sk). Signed-off-by: Rohit Thapliyal Signed-off-by: Manjeet Pawar Signed-off-by: David Miller Reviewed-by: Akhilesh Kumar --- v2->v3: Modified as per the suggestion from David Miller

bpf debug info

2016-11-28 Thread Alexei Starovoitov
Hi All, The support for debug information in BPF was recently added to llvm. In order to use it recompile bpf programs with the following patch in samples/bpf/Makefile @@ -155,4 +155,4 @@ $(obj)/%.o: $(src)/%.c $(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \ -

[patch net v2] net: fec: cache statistics while device is down

2016-11-28 Thread Nikita Yushchenko
Execution 'ethtool -S' on fec device that is down causes OOPS on Vybrid board: Unhandled fault: external abort on non-linefetch (0x1008) at 0xe0898200 pgd = ddecc000 [e0898200] *pgd=9e406811, *pte=400d1653, *ppte=400d1453 Internal error: : 1008 [#1] SMP ARM ... Reason of OOPS is that fec_enet_get

Re: [PATCH] ethernet :mellanox :mlx4: Replace pci_pool_alloc by pci_pool_zalloc

2016-11-28 Thread Souptick Joarder
On Tue, Nov 29, 2016 at 12:36 AM, Sergei Shtylyov wrote: > Hello. > > On 11/28/2016 04:28 PM, Souptick Joarder wrote: > >> In mlx4_alloc_cmd_mailbox(), pci_pool_alloc() followed by memset will be >> replaced by pci_pool_zalloc() >> >> Signed-off-by: Souptick joarder >> --- >> drivers/net/etherne

Re: [PATCH net] net, sched: respect rcu grace period on cls destruction

2016-11-28 Thread Cong Wang
On Mon, Nov 28, 2016 at 2:47 AM, Paul E. McKenney wrote: > RCU callbacks are always executed in softirq context, so yes, you do need > to use something like a work struct. (Or a wakeup to a kthread or > whatever.) Thanks for your information.

bnx2 breaks Dell R815 BMC IPMI since 4.8

2016-11-28 Thread Brice Goglin
Hello My Dell PowerEdge R815 doesn't have IPMI anymore when I boot a 4.8 kernel, the BMC doesn't even ping anymore. Its Ethernet devices are 4 of those: 01:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20) DeviceName: Embedded NIC 1

Re: [Patch net-next] net_sched: move the empty tp check from ->destroy() to ->delete()

2016-11-28 Thread Cong Wang
On Sun, Nov 27, 2016 at 6:57 PM, John Fastabend wrote: > Hi Cong, > > Thanks a lot for doing this. Can you rebase it on top of Daniel's patch > though, > > [PATCH net] net, sched: respect rcu grace period on cls destruction > > And then push the NULL pointer work for the cls_fw and cls_route > cl

[WIP] net+mlx4: auto doorbell

2016-11-28 Thread Eric Dumazet
On Mon, 2016-11-21 at 10:10 -0800, Eric Dumazet wrote: > Not sure it this has been tried before, but the doorbell avoidance could > be done by the driver itself, because it knows a TX completion will come > shortly (well... if softirqs are not delayed too much !) > > Doorbell would be forced onl

<    1   2   3   4   5   >