[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) L

[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 control

[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 --- drivers/net/eth

[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 fix.

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 > implem

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 should

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 > layer

[PATCH] net: 8139cp: fix a BUG triggered by changing mtu with network traffic

2018-12-02 Thread Su Yanjun
When changing mtu many times with traffic, a bug is triggered: [ 1035.684037] kernel BUG at lib/dynamic_queue_limits.c:26! [ 1035.684042] invalid opcode: [#1] SMP [ 1035.684049] Modules linked in: loop binfmt_misc 8139cp(OE) macsec tcp_diag udp_diag inet_diag unix_diag af_packet_diag netlink_

Re: [RFC PATCH net v2] net: phy: Fix the issue that netif always links up after resuming

2018-12-02 Thread Heiner Kallweit
On 03.12.2018 05:35, Kunihiko Hayashi wrote: > Hi Florian Heiner, > > On Fri, 30 Nov 2018 19:47:37 +0100 wrote: > >> On 30.11.2018 18:46, Florian Fainelli wrote: >>> >>> >>> On 11/30/2018 1:25 AM, Kunihiko Hayashi wrote: Even though the link is down before entering hibernation, there i

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 b

[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 b

[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 implementa

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: mediatek,no

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 s

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 2018/

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 PME

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 tr

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 by

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 Sign

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 write

Re: [RFC PATCH net v2] net: phy: Fix the issue that netif always links up after resuming

2018-12-02 Thread Kunihiko Hayashi
Hi Florian Heiner, On Fri, 30 Nov 2018 19:47:37 +0100 wrote: > On 30.11.2018 18:46, Florian Fainelli wrote: > > > > > > On 11/30/2018 1:25 AM, Kunihiko Hayashi wrote: > >> Even though the link is down before entering hibernation, > >> there is an issue that the network interface always links u

[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 p

Re: [RFC] Discuss about an new idea "Vsock over Virtio-net"

2018-12-02 Thread jiangyiwen
On 2018/11/30 21:40, Michael S. Tsirkin wrote: > On Fri, Nov 30, 2018 at 09:10:03PM +0800, Jason Wang wrote: >> >> On 2018/11/30 下午8:55, Jason Wang wrote: >>> >>> On 2018/11/30 下午8:52, Michael S. Tsirkin wrote: >>If you want to compare it with >> something that would be TCP or QUIC. Th

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

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

2018-12-02 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/core/filter.c between commits: b7df9ada9a77 ("bpf: fix pointer offsets in context for 32 bit") f71c6143c203 ("bpf: Support sk lookup in netns with id 0") from the bpf tree and commits: c8123ead13a5 ("bpf: Ext

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

2018-12-02 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: include/uapi/linux/bpf.h tools/include/uapi/linux/bpf.h between commits: b7df9ada9a77 ("bpf: fix pointer offsets in context for 32 bit") d74286d2c25a ("bpf: Improve socket lookup reuseport documentation") from the

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

2018-12-02 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: drivers/net/ethernet/netronome/nfp/flower/offload.c between commits: b5f0cf083400 ("nfp: flower: prevent offload if rhashtable insert fails") from the net tree and commit: 7885b4fc8d8e ("nfp: flower: allow non repr

Re: [PATCH v3] rhashtable: detect when object movement between tables might have invalidated a lookup

2018-12-02 Thread Herbert Xu
On Mon, Dec 03, 2018 at 09:20:23AM +1100, NeilBrown wrote: > > I don't understand how this is relevant. Thanks for the explanation, I had missed the double pointer part. With that, I'm happy with this patch as it stands: Acked-by: Herbert Xu Cheers, -- Email: Herbert Xu Home Page: http://gond

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 auto-probe

[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 c

[RFC net-next 1/9] net: hns3: Add "bd info" query function

2018-12-02 Thread Salil Mehta
From: liuzhongzhu This patch prints Sending and receiving packet descriptor information. debugfs command: echo dump bd info 1 > cmd Sample Command: root@(none)# echo bd info 1 > cmd hns3 :7d:00.0: TX Queue Num: 0, BD Index: 0 hns3 :7d:00.0: (TX) addr: 0x0 hns3 :7d:00.0: (TX)vlan_tag

[RFC net-next 2/9] net: hns3: Add "mac table" information query function

2018-12-02 Thread Salil Mehta
From: liuzhongzhu This patch prints mac table information. debugfs command: echo dump mac tbl > cmd Sample Command: root@(none)# echo dump mac tbl > cmd Unicast tab: |index |mac_addr |vlan_id |VMDq1 |U_M |mac_en |in_port |0088 |22:22:22:22:22:00 ||0 |0 |0 |2 |05

[RFC net-next 4/9] net: hns3: Add "vf vlan table" information query function

2018-12-02 Thread Salil Mehta
From: liuzhongzhu This patch prints vf vlan table information. debugfs command: echo dump port vlan tbl 0 > cmd Sample Command: root@(none)# echo dump vf vlan tbl 0 > cmd vlan | vf filter bitMap: | :::::::0001 root@(none)# Signed

[RFC net-next 6/9] net: hns3: Add "status register" information query function

2018-12-02 Thread Salil Mehta
From: liuzhongzhu This patch prints status register information by module. debugfs command: echo dump reg [mode name] > cmd Sample Command: root@(none)# echo dump reg bios common > cmd BP_CPU_STATE: 0x0 DFX_MSIX_INFO_NIC_0: 0xc000 DFX_MSIX_INFO_NIC_1: 0xf DFX_MSIX_INFO_NIC_2: 0x2 DFX_MSIX_

[RFC net-next 7/9] net: hns3: Add "dcb register" status information query function

2018-12-02 Thread Salil Mehta
From: liuzhongzhu This patch prints dcb register status information by module. debugfs command: root@(none)# echo dump reg dcb > cmd roce_qset_mask: 0x0 nic_qs_mask: 0x0 qs_shaping_pass: 0x0 qs_bp_sts: 0x0 pri_mask: 0x0 pri_cshaping_pass: 0x0 pri_pshaping_pass: 0x0 root@(none)# Signed-o

[RFC net-next 5/9] net: hns3: Add "manager table" information query function

2018-12-02 Thread Salil Mehta
From: liuzhongzhu This patch prints manager table information. debugfs command: echo dump mng tbl > cmd Sample Command: root@(none)# echo dump mng tbl > cmd entry|mac_addr |mask|ether|mask|vlan|mask|i_map|i_dir|e_type 00 |01:00:5e:00:00:01|0 |0|0 ||0 |00 |00 |0 01

[RFC net-next 8/9] net: hns3: Add "queue map" information query function

2018-12-02 Thread Salil Mehta
From: liuzhongzhu This patch prints queue map information. debugfs command: echo dump queue map > cmd Sample Command: root@(none)# echo queue map > cmd local queue id | global queue id | vector id 0 32 769 1 33 770

[RFC net-next 9/9] net: hns3: Add "tm map" status information query function

2018-12-02 Thread Salil Mehta
From: liuzhongzhu This patch prints dcb register status information by module. debugfs command: root@(none)# echo dump tm map 100 > cmd queue_id | qset_id | pri_id | tc_id 0100 | 0065| 08 | 00 root@(none)# Signed-off-by: liuzhongzhu Signed-off-by: Salil Mehta --- drivers/net/eth

[RFC net-next 3/9] net: hns3: Add "port vlan table" information query function

2018-12-02 Thread Salil Mehta
From: liuzhongzhu This patch prints port vlan table information. debugfs command: echo dump port vlan tbl > cmd Sample Command: root@(none)# echo dump port vlan tbl > cmd vlan | port filter bitMap: | :::::0001 root@(none)# Signed-off-by: liuzh

[RFC net-next 0/9] net: hns3: Add more commands to Debugfs in HNS3 driver

2018-12-02 Thread Salil Mehta
This patch-set adds few more debugfs commands to HNS3 Ethernet Driver. Support has been added to query info related to below items: 1. Packet buffer descriptor ("echo bd info [queue no] [bd index] > cmd") 2. Mac Forward table("echo dump mac tbl > cmd") 3. Port vlan Forward table("echo dump port vla

Re: [PATCH v3] rhashtable: detect when object movement between tables might have invalidated a lookup

2018-12-02 Thread NeilBrown
On Sat, Dec 01 2018, Herbert Xu wrote: > On Fri, Nov 30, 2018 at 10:26:50AM +1100, NeilBrown wrote: >> >> diff --git a/lib/rhashtable.c b/lib/rhashtable.c >> index 30526afa8343..852ffa5160f1 100644 >> --- a/lib/rhashtable.c >> +++ b/lib/rhashtable.c >> @@ -1179,8 +1179,7 @@ struct rhash_head __rcu

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. However

[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 cha

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 pres

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 are

[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 aqc11

[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 --- drivers/net/ethernet/mellanox/mlx4/main.

[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. Signed-off-

[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: Flo

[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: act_tunnel_key:

[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 port.

[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 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 will

[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 NPC_AF

[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 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 --- .../ether

[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 insertions(+)

[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. Add

[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 2

[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 a/drivers/net/ethernet/marvell/

[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 c

[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 space

[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 by

[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 u

[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 by

[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: 35b827b6

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 lan-

[PATCH] wireless: convert to DEFINE_SHOW_ATTRIBUTE

2018-12-02 Thread Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li --- drivers/net/wireless/ath/wil6210/debugfs.c| 240 +++--- .../wireless/mediatek/mt76/mt76x0/debugfs.c | 20 +- .../wireless/mediatek/mt76/mt76x2/debugfs.c | 38 +-- .../net/wireless/mediatek/m

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 ma