[PATCH net-next v2 3/3] mlxsw: spectrum: Load firmware version based on devlink parameter

2018-12-02 Thread Ido Schimmel
From: Shalom Toledo Load firmware version based on 'fw_load_policy' devlink parameter. The driver supports these two options: * DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER (0) Default, load firmware version preferred by the driver * DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH (1)

[PATCH net-next v2 1/3] devlink: Add 'fw_load_policy' generic parameter

2018-12-02 Thread Ido Schimmel
From: Shalom Toledo Many drivers load the device's firmware image during the initialization flow either from the flash or from the disk. Currently this option is not controlled by the user and the driver decides from where to load the firmware image. 'fw_load_policy' gives the ability to

[PATCH net-next v2 2/3] mlxsw: core: Reset firmware after flash during driver initialization

2018-12-02 Thread Ido Schimmel
From: Shalom Toledo After flashing new firmware during the driver initialization flow (reload or not), the driver should do a firmware reset when it gets -EAGAIN in order to load the new one. Signed-off-by: Shalom Toledo Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel ---

[PATCH net-next v2 0/3] mlxsw: Add 'fw_load_policy' devlink parameter

2018-12-02 Thread Ido Schimmel
Shalom says: Currently, drivers do not have the ability to control the firmware loading policy and they always use their own fixed policy. This prevents drivers from running the device with a different firmware version for testing and/or debugging purposes. For example, testing a firmware bug

Re: [PATCH bpf] mips: bpf: fix encoding bug for mm_srlv32_op

2018-12-02 Thread Song Liu
On Sat, Dec 1, 2018 at 1:12 AM Jiong Wang wrote: > > For micro-mips, srlv inside POOL32A encoding space should use 0x50 > sub-opcode, NOT 0x90. > > Some early version ISA doc describes the encoding as 0x90 for both srlv and > srav, this looks to me was a typo. I checked Binutils libopcode >

Re: [PATCH] samples: bpf: fix: seg fault with NULL pointer arg

2018-12-02 Thread Song Liu
On Sat, Dec 1, 2018 at 1:07 PM Daniel T. Lee wrote: > > When NULL pointer accidentally passed to write_kprobe_events, > due to strlen(NULL), segmentation fault happens. > Changed code returns -1 to deal with this situation. > > Bug issued with Smatch, static analysis. > > Signed-off-by: Daniel T.

Re: [PATCH bpf-next] libbpf: Fix license in README.rst

2018-12-02 Thread Song Liu
On Sun, Dec 2, 2018 at 1:04 PM Andrey Ignatov wrote: > > The whole libbpf is licensed as (LGPL-2.1 OR BSD-2-Clause). I missed it > while adding README.rst. Fix it and use same license as all other files > in libbpf do. Since I'm the only author of README.rst so far, no others' > permissions

Re: [PATCH bpf-next v2] bpf: allow BPF read access to qdisc pkt_len

2018-12-02 Thread Song Liu
On Sun, Dec 2, 2018 at 5:18 PM Willem de Bruijn wrote: > > From: Petar Penkov > > The pkt_len field in qdisc_skb_cb stores the skb length as it will > appear on the wire after segmentation. For byte accounting, this value > is more accurate than skb->len. It is computed on entry to the TC >

Re: [PATCH 0/3]: net: dsa: mt7530: support MT7530 in the MT7621 SoC

2018-12-02 Thread Greg Ungerer
Hi Bjorn, On 30/11/18 10:16 pm, Bjørn Mork wrote: g...@kernel.org writes: I have been working towards supporting the MT7530 switch as used in the MediaTek MT7621 SoC. Unlike the MediaTek MT7623 the MT7621 is built around a dual core MIPS CPU architecture. But underneath it is what appears to

[PATCH net] net: phy: don't allow __set_phy_supported to add unsupported modes

2018-12-02 Thread Heiner Kallweit
Currently __set_phy_supported allows to add modes w/o checking whether the PHY supports them. This is wrong, it should never add modes but only remove modes we don't want to support. The commit marked as fixed didn't do anything wrong, it just copied existing functionality to the helper which is

[PATCH net-next] net: phy: don't allow __set_phy_supported to add unsupported modes

2018-12-02 Thread Heiner Kallweit
Currently __set_phy_supported allows to add modes w/o checking whether the PHY supports them. This is wrong, it should never add modes but only remove modes we don't want to support. Signed-off-by: Heiner Kallweit --- I'll submit the same functionality for net, but it needs a different

Re: [PATCH 3/3] dt-bindings: net: dsa: add new bindings MT7530

2018-12-02 Thread Greg Ungerer
Hi Florian, On 1/12/18 3:41 am, Florian Fainelli wrote: Hi Greg, On 11/29/2018 11:57 PM, g...@kernel.org wrote: From: Greg Ungerer Add descriptive entries for the new bindings introduced to support the MT7530 implementation in the MediaTek MT7621 SoC. New bindings added for:

Re: [PATCH 0/3]: net: dsa: mt7530: support MT7530 in the MT7621 SoC

2018-12-02 Thread Greg Ungerer
Hi Andrew, On 30/11/18 11:33 pm, Andrew Lunn wrote: 2. Maximal sized RX packets get silently dropped. So receive side packets that are large (perfect case is the all-but-last packets in a fragemented larger packet) appear to be dropped at the mt7621 ethernet MAC level. The 7530 MIB

Re: [PATCH 0/5] VSOCK: support mergeable rx buffer in vhost-vsock

2018-12-02 Thread jiangyiwen
On 2018/11/29 22:19, Stefan Hajnoczi wrote: > On Tue, Nov 06, 2018 at 01:53:54PM +0800, jiangyiwen wrote: >> On 2018/11/6 11:32, Jason Wang wrote: >>> >>> On 2018/11/6 上午11:17, jiangyiwen wrote: On 2018/11/6 10:41, Jason Wang wrote: > On 2018/11/6 上午10:17, jiangyiwen wrote: >> On

Fill the form

2018-12-02 Thread KOZAK FINANCIAL
We are licensed loan company, rendering our customers with amount they need is our main priority. We offer all kinds of loans. reply us now for more details.

[PATCH] igb: Fix an issue that PME is not enabled during runtime suspend

2018-12-02 Thread Kai-Heng Feng
I210 ethernet card doesn't wakeup when a cable gets plugged. It's because its PME is not set. Since commit 42eca2302146 ("PCI: Don't touch card regs after runtime suspend D3"), if the PCI state is saved, pci_pm_runtime_suspend() stops calling pci_finish_runtime_suspend(), which enables the PCI

Re: [Patch net] mlx5: check for malformed packets

2018-12-02 Thread Cong Wang
On Sun, Dec 2, 2018 at 12:56 AM Tariq Toukan wrote: > > > > On 01/12/2018 10:38 PM, Cong Wang wrote: > > + if (*proto == htons(ETH_P_IP)) { > > + if (unlikely(*network_depth > skb->len - sizeof(struct > > iphdr))) > > + return false; > > + return

Re: [PATCH 2/3] net: macb: fix dropped RX frames due to a race

2018-12-02 Thread Harini Katakam
Hi Anssi, On Fri, Nov 30, 2018 at 11:53 PM Anssi Hannula wrote: > > Bit RX_USED set to 0 in the address field allows the controller to write > data to the receive buffer descriptor. > > The driver does not ensure the ctrl field is ready (cleared) when the > controller sees the RX_USED=0 written

Re: [PATCH iproute2] iproute2: Installation errors without libnml

2018-12-02 Thread Florian Fainelli
Hi Émeric, On December 2, 2018 11:57:00 AM PST, "Émeric Dupont" wrote: >When performing make install in iproute2 (current git master), > if $(HAVE_MNL) is not selected, some Makefiles try to call > install with an empty target, which causes a non-critical make error. You need to add a

Re: [PATCH 1/3] net: macb: fix random memory corruption on RX with 64-bit DMA

2018-12-02 Thread Harini Katakam
On Fri, Nov 30, 2018 at 11:53 PM Anssi Hannula wrote: > > 64-bit DMA addresses are split in upper and lower halves that are > written in separate fields on GEM. For RX, bit 0 of the address is used > as the ownership bit (RX_USED). When the RX_USED bit is unset the > controller is allowed to

[PATCH v2 net-next] ip6_tunnel: Adding support of mapping rules for MAP-E tunnel

2018-12-02 Thread Felix Jia
From: Blair Steven Mapping of Addresses and Ports with Encapsulation (MAP-E) is defined in RFC7597, and is an IPv6 transition technology providing interoperability between IPv4 and IPv6 networks. MAP-E uses the encapsulation mode described in RFC2473 (IPv6 Tunneling) to transport IPv4 and IPv6

Re: [PATCH bpf-next v2 0/4] libbpf: ABI versioning and documentation

2018-12-02 Thread Andrey Ignatov
Daniel Borkmann [Tue, 2018-11-27 03:36 -0800]: > On 11/27/2018 04:06 AM, Alexei Starovoitov wrote: > > On Fri, Nov 23, 2018 at 04:44:31PM -0800, Andrey Ignatov wrote: > >> This patch set adds ABI versioning and documentation to libbpf. > >> > >> Patch 1 renames btf_get_from_id to btf__get_from_id

Re: DSA support for Marvell 88e6065 switch

2018-12-02 Thread Lennert Buytenhek
On Thu, Nov 22, 2018 at 09:27:24PM +0100, Pavel Machek wrote: > Hi! Hello! > > > > > If I wanted it to work, what do I need to do? AFAICT phy autoprobing > > > > > should just attach it as soon as it is compiled in? > > > > > > > > Nope. It is a switch, not a PHY. Switches are never

[PATCH bpf-next v2] bpf: allow BPF read access to qdisc pkt_len

2018-12-02 Thread Willem de Bruijn
From: Petar Penkov The pkt_len field in qdisc_skb_cb stores the skb length as it will appear on the wire after segmentation. For byte accounting, this value is more accurate than skb->len. It is computed on entry to the TC layer, so only valid there. Allow read access to this field from BPF tc

Re: IP fragmentation performance and don't fragment bug when forwarding

2018-12-02 Thread Risto Pajula
Hello. You can most likely ignore the "DF Bit, mtu bug when forwarding" case. There isn't actually big IP packets on the wire, instead there is burst of packets on the wire, which are combined by the GRO... And thus dropping them should not happen. Sorry about the invalid bug report.

[PATCH bpf-next] libbpf: Fix license in README.rst

2018-12-02 Thread Andrey Ignatov
The whole libbpf is licensed as (LGPL-2.1 OR BSD-2-Clause). I missed it while adding README.rst. Fix it and use same license as all other files in libbpf do. Since I'm the only author of README.rst so far, no others' permissions should be needed. Fixes: 76d1b894c515 ("libbpf: Document API and ABI

[PATCH iproute2] iproute2: Installation errors without libnml

2018-12-02 Thread Émeric Dupont
When performing make install in iproute2 (current git master), if $(HAVE_MNL) is not selected, some Makefiles try to call install with an empty target, which causes a non-critical make error. --- devlink/Makefile | 4 +++- rdma/Makefile| 4 +++- tipc/Makefile| 4 +++- 3 files

Re: [PATCH net-next v2] net: phy: Also request modules for C45 IDs

2018-12-02 Thread Florian Fainelli
On December 2, 2018 7:33:14 AM PST, Jose Abreu wrote: >Logic of phy_device_create() requests PHY modules according to PHY ID >but for C45 PHYs we use different field for the IDs. > >Let's also request the modules for these IDs. > >Changes from v1: >- Only request C22 modules if C45 are not

Re: [PATCH bpf-next] bpf: Fix memleak in aux->func_info and aux->btf

2018-12-02 Thread Alexei Starovoitov
On Sat, Dec 01, 2018 at 05:08:44PM -0800, Martin KaFai Lau wrote: > The aux->func_info and aux->btf are leaked in the error out cases > during bpf_prog_load(). This patch fixes it. > > Fixes: ba64e7d85252 ("bpf: btf: support proper non-jit func info") > Cc: Yonghong Song > Signed-off-by: Martin

Re: [PATCH net-next v2] net: phy: Also request modules for C45 IDs

2018-12-02 Thread Andrew Lunn
On Sun, Dec 02, 2018 at 04:33:14PM +0100, Jose Abreu wrote: > Logic of phy_device_create() requests PHY modules according to PHY ID > but for C45 PHYs we use different field for the IDs. > > Let's also request the modules for these IDs. > > Changes from v1: > - Only request C22 modules if C45

[PATCH net-next 0/2] mlx4_core cleanups

2018-12-02 Thread Tariq Toukan
Hi Dave, This patchset by Erez contains cleanups to the mlx4_core driver. Patch 1 replaces -EINVAL with -EOPNOTSUPP for unsupported operations. Patch 2 fixes some coding style issues. Series generated against net-next commit: 97e6c858a26e net: usb: aqc111: Initialize wol_cfg with memset in

[PATCH net-next 2/2] net/mlx4_core: Fix several coding style errors

2018-12-02 Thread Tariq Toukan
From: Erez Alfasi Fix 3 checkpatch errors within mlx4/main.c: - Unnecessary mlx4_debug_level global variable initialization to 0. - Prohibited space before comma. - Whitespaces instead of tab. Signed-off-by: Erez Alfasi Signed-off-by: Tariq Toukan ---

[PATCH net-next 1/2] net/mlx4_core: Fix return codes of unsupported operations

2018-12-02 Thread Tariq Toukan
From: Erez Alfasi Functions __set_port_type and mlx4_check_port_params returned -EINVAL while the proper return code is -EOPNOTSUPP as a result of an unsupported operation. All drivers should generate this and all users should check for it when detecting an unsupported functionality.

[PATCH net-next v2] net: phy: Also request modules for C45 IDs

2018-12-02 Thread Jose Abreu
Logic of phy_device_create() requests PHY modules according to PHY ID but for C45 PHYs we use different field for the IDs. Let's also request the modules for these IDs. Changes from v1: - Only request C22 modules if C45 are not present (Andrew) Signed-off-by: Jose Abreu Cc: Andrew Lunn Cc:

[PATCH net-next V2 0/2] net/sched: act_tunnel_key: support key-less tunnels

2018-12-02 Thread Or Gerlitz
This short series from Adi Nissim allows to support key-less tunnels by the tc tunnel key actions, which is needed for some GRE use-cases. changes from V0: - addresses build warning spotted by kbuild, make sure to always init to zero the tunnel key Adi Nissim (2): net/sched:

[PATCH net-next V2 2/2] net/sched: act_tunnel_key: Don't dump dst port if it wasn't set

2018-12-02 Thread Or Gerlitz
From: Adi Nissim It's possible to set a tunnel without a destination port. However, on dump(), a zero dst port is returned to user space even if it was not set, fix that. Note that so far it wasn't required, b/c key less tunnels were not supported and the UDP tunnels do require destination

[PATCH net-next V2 1/2] net/sched: act_tunnel_key: Allow key-less tunnels

2018-12-02 Thread Or Gerlitz
From: Adi Nissim Allow setting a tunnel without a tunnel key. This is required for tunneling protocols, such as GRE, that define the key as an optional field. Signed-off-by: Adi Nissim Acked-by: Or Gerlitz Reviewed-by: Oz Shlomo Acked-by: Jiri Pirko --- net/sched/act_tunnel_key.c | 21

[PATCH net-next v2 14/14] octeontx2-af: Enable mkex profile

2018-12-02 Thread Jerin Jacob
From: Vamsi Attunuru The following set of NPC registers allow the driver to configure NPC to generate different key value schemes to compare against packet payload in MCAM search. NPC_AF_INTF(0..1)_KEX_CFG NPC_AF_KEX_LDATA(0..1)_FLAGS_CFG NPC_AF_INTF(0..1)_LID(0..7)_LT(0..15)_LD(0..1)_CFG

[PATCH net-next v2 12/14] octeontx2-af: Add L3 and L4 packet verification mailbox

2018-12-02 Thread Jerin Jacob
From: Vidhya Raman Adds mailbox support for L4 checksum verification and L3 and L4 length verification configuration. Signed-off-by: Vidhya Raman Signed-off-by: Jerin Jacob --- .../net/ethernet/marvell/octeontx2/af/mbox.h | 10 + .../net/ethernet/marvell/octeontx2/af/rvu.h | 3 ++

[PATCH net-next v2 13/14] octeontx2-af: Add LSO format configuration mailbox

2018-12-02 Thread Jerin Jacob
From: Nithin Dabilpuram NIX_AF_LSO_FORMAT(0..31)_FIELD(0..7) register enables an SW defined means to define LSO packet modification formats. 0..31 works as an index to choose the algorithm, On success, the mailbox returns the index to the client of chosen LSO algorithm selection. This index

[PATCH net-next v2 06/14] octeontx2-af: Allow freeing single TLx Tx schedule queue

2018-12-02 Thread Jerin Jacob
From: Nithin Dabilpuram The default behavior was to free all the TLx Tx schedule queues. This patch adds support for freeing a single Tx schedule queue if TXSCHQ_FREE_ALL flag is not set. Signed-off-by: Krzysztof Kanas Signed-off-by: Nithin Dabilpuram Signed-off-by: Jerin Jacob ---

[PATCH net-next v2 07/14] octeontx2-af: Enable inner IPv4 checksum and its error code

2018-12-02 Thread Jerin Jacob
This patch enables the inner IPv4 checksum and defines the error code for Rx inner and outer checksum errors. Setting ERRCODE as 1 so that CQE descriptor can be embedded valid checksum error code and the driver can interpret checksum error as ERRLEV = LID + 1 and ERRCODE = 1. Signed-off-by: Jerin

[PATCH net-next v2 08/14] octeontx2-af: Define all NIX_AF_RX_DEF_* registers

2018-12-02 Thread Jerin Jacob
In order to support all NIX specific valid length errors and checksum errors on Rx, Update all NIX_AF_RX_DEF_* registers. Also sorted all registers in HRM definition order. Signed-off-by: Jerin Jacob --- .../ethernet/marvell/octeontx2/af/rvu_nix.c | 25 +++ 1 file changed, 20

[PATCH net-next v2 09/14] octeontx2-af: Enable RSS with promiscuous mode

2018-12-02 Thread Jerin Jacob
From: Vamsi Attunuru This patch adds support for enabling RSS in promiscuous mode if RSS is already requested by the AF client. Signed-off-by: Vamsi Attunuru Signed-off-by: Jerin Jacob --- .../ethernet/marvell/octeontx2/af/rvu_npc.c | 35 --- 1 file changed, 31

[PATCH net-next v2 10/14] octeontx2-af: Add support for Tx packet marking

2018-12-02 Thread Jerin Jacob
From: Krzysztof Kanas NIX_AF_MARK_FORMAT(0..127)_CTL register enables an SW defined means to mark/insert various data in the packet based on final packet color from traffic shaping HW. 0..127 works as an index to choose the algorithm. On success, the mailbox returns the index to the client.

[PATCH net-next v2 05/14] octeontx2-af: Restrict TL1 allocation and configuration

2018-12-02 Thread Jerin Jacob
From: Nithin Dabilpuram TL1 is the root node in the scheduling hierarchy and it is a global resource with a limited number. This patch introduces restriction and validation on the allocation of the TL1 nodes for the effective resource sharing across the AF consumers. - Limit TL1 allocation to

[PATCH net-next v2 11/14] octeontx2-af: Configure VLAN TPIDs

2018-12-02 Thread Jerin Jacob
From: Nithin Dabilpuram Setup TPID's for vlan0 and vlan1 for Tx VLAN insertion offloads. Signed-off-by: Nithin Dabilpuram Signed-off-by: Jerin Jacob --- drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH net-next v2 04/14] octeontx2-af: Add support for runtime RSS algo index reservation

2018-12-02 Thread Jerin Jacob
Introduced reserve_flowkey_alg_idx()to reserve RSS algorithm index, it would internally use set_flowkey_fields() to generate fields based on the flow key dynamically. On AF driver init, it would reserve a predefined set RSS algo indexes, which will be available all the time for all the AF driver

[PATCH net-next v2 02/14] octeontx2-af: Add response for RSS flow key cfg message

2018-12-02 Thread Jerin Jacob
Added response for nix_rss_flowkey_cfg message to return selected RSS algorithm index. The FLOW_KEY_TYPE* definition is part of the mbox message and it will be used by the other consumers of AF driver hence moving to mbox.h. Also renamed FLOW_* definitions to NIX_FLOW_* to avoid global name

[PATCH net-next v2 03/14] octeontx2-af: Add support for dynamic flow cfg to RSS field generation

2018-12-02 Thread Jerin Jacob
Introduce state-based algorithm to convert the flow_key value to RSS algo field used by NIX_AF_RX_FLOW_KEY_ALGX_FIELDX register. The outer `for loop` goes over _all_ protocol field and the following variables depict the state machine forward progress logic. a) keyoff_marker - Enabled when hash

[PATCH net-next v2 01/14] octeontx2-af: Skip NIXLF check for bcast MCE entry

2018-12-02 Thread Jerin Jacob
From: Sunil Goutham At the time of initial broadcast packet replication table init, NIXLFs are not yet attached to PF_FUNCs. Hence skipped checking NIXLF while submitting MCE entry init instruction to NIX admin queue. Also did a minor cleanup while installing bcast match entry in packet parser

[PATCH net-next v2 00/14] octeontx2-af: NIX and NPC enhancements

2018-12-02 Thread Jerin Jacob
This patchset is a continuation to earlier submitted four patch series to add a new driver for Marvell's OcteonTX2 SOC's Resource virtualization unit (RVU) admin function driver. 1. octeontx2-af: Add RVU Admin Function driver https://www.spinics.net/lists/netdev/msg528272.html 2. octeontx2-af:

[PATCH net 1/2] net/mlx4_en: Change min MTU size to ETH_MIN_MTU

2018-12-02 Thread Tariq Toukan
From: Eran Ben Elisha NIC driver minimal MTU size shall be set to ETH_MIN_MTU, as defined in the RFC791 and in the network stack. Remove old mlx4_en only define for it, which was set to wrong value. Fixes: b80f71f5816f ("ethernet/mellanox: use core min/max MTU checking") Signed-off-by: Eran Ben

[PATCH net 2/2] net/mlx4_en: Fix build break when CONFIG_INET is off

2018-12-02 Thread Tariq Toukan
From: Saeed Mahameed MLX4_EN depends on NETDEVICES, ETHERNET and INET Kconfigs. Make sure they are listed in MLX4_EN Kconfig dependencies. This fixes the following build break: drivers/net/ethernet/mellanox/mlx4/en_rx.c:582:18: warning: ‘struct iphdr’ declared inside parameter list [enabled

[PATCH net 0/2] mlx4 fixes for 4.20-rc

2018-12-02 Thread Tariq Toukan
Hi Dave, This patchset includes small fixes for the mlx4_en driver. First patch by Eran fixes the value used to init the netdevice's min_mtu field. Please queue it to -stable >= v4.10. Second patch by Saeed adds missing Kconfig build dependencies. Series generated against net commit:

IP fragmentation performance and don't fragment bug when forwarding

2018-12-02 Thread Risto Pajula
Hello. I have encountered a weird performance problem in Linux IP fragmentation when using video streaming services behind the NAT. Also I have studied a possible bug in the DF bit (don't fragment) handling when forwarding the IP packets. First the system setup description: [host1]-int

Re: [Patch net] mlx5: check for malformed packets

2018-12-02 Thread Tariq Toukan
On 01/12/2018 10:38 PM, Cong Wang wrote: > is_last_ethertype_ip() is used to check IP/IPv6 protocol before > parsing IP/IPv6 headers. > > But __vlan_get_protocol() is only bound to skb->len, a malicious > packet could exhaust all skb->len by inserting sufficient ETH_P_8021AD > headers, and it