[PATCH net-next 4/5] net: aquantia: implement EEE support

2018-08-08 Thread Igor Russkikh
From: Yana Esina Support of Energy-Efficient Ethernet to aQuantia NIC's via ethtool (according to the IEEE 802.3az specifications) We do replace some duplicate speed bits definitions here (HW_ATL_B0_RATE_) with driver generic constants (AQ_NIC_RATE_) Signed-off-by: Yana Esina Signed-off-by:

[PATCH net-next 3/5] net: aquantia: implement WOL support

2018-08-08 Thread Igor Russkikh
From: Yana Esina Add WOL support. Currently only magic packet (ethtool -s wol g) feature is implemented. Remove hw_set_power and move that to FW_OPS set_power: because WOL configuration behaves differently on 1x and 2x firmwares Signed-off-by: Yana Esina Signed-off-by: Nikita Danilov

[PATCH net-next 0/5] net: aquantia: implement WOL and EEE support

2018-08-08 Thread Igor Russkikh
In this patchset Yana Esina and Nikita Danilov implemented: - Upload function to interact with FW memory - Definitions and structures necessary for the correct operation of Wake ON Lan - The functionality Wake On Lan via ethtool (Magic packet is supported) - The functionality for Energy-Efficient

[PATCH net-next 1/5] net: aquantia: fix hw_atl_utils_fw_upload_dwords

2018-08-08 Thread Igor Russkikh
From: Yana Esina This patch fixes the upload function, which worked incorrectly with some chips. Signed-off-by: Yana Esina Signed-off-by: Nikita Danilov Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh --- .../ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c | 7

Re: [PATCH lora-next 01/10] net: lora: sx1301: add register, bit-fields, and helpers for regmap

2018-08-08 Thread Andreas Färber
Am 07.08.2018 um 19:32 schrieb Ben Whitten: > diff --git a/drivers/net/lora/sx1301.c b/drivers/net/lora/sx1301.c > index 5342b61..49958f0 100644 > --- a/drivers/net/lora/sx1301.c > +++ b/drivers/net/lora/sx1301.c [...] > @@ -76,8 +287,29 @@ struct sx1301_priv { > struct gpio_desc *rst_gpio;

Re: [PATCH lora-next 03/10] net: lora: sx1301: convert to devm registration of netdev

2018-08-08 Thread Andreas Färber
Am 07.08.2018 um 19:32 schrieb Ben Whitten: > diff --git a/drivers/net/lora/sx1301.c b/drivers/net/lora/sx1301.c > index 49958f0..54bfc31 100644 > --- a/drivers/net/lora/sx1301.c > +++ b/drivers/net/lora/sx1301.c [...] > @@ -885,7 +889,7 @@ static int sx1301_probe(struct spi_device *spi) >

Re: [PATCH lora-next 01/10] net: lora: sx1301: add register, bit-fields, and helpers for regmap

2018-08-08 Thread Andreas Färber
Am 07.08.2018 um 19:32 schrieb Ben Whitten: > From: Ben Whitten > > The register and bit-field definitions are taken from the SX1301 > datasheet version 2.01 dated June 2014 with the revision information > 'First released version'. > > The reset state and RW capability of each field is not

Re: [PATCH net-next 12/14] net: sched: act_mirred: remove dependency on rtnl lock

2018-08-08 Thread Jiri Pirko
Wed, Aug 08, 2018 at 10:47:04AM CEST, vla...@mellanox.com wrote: > >On Wed 08 Aug 2018 at 08:03, Jiri Pirko wrote: >> Wed, Aug 08, 2018 at 09:40:35AM CEST, vla...@mellanox.com wrote: >>> >>>On Tue 07 Aug 2018 at 16:36, Jiri Pirko wrote: Mon, Aug 06, 2018 at 08:54:23AM CEST,

[PATCH net-next] net: ipv6_gre: Fix GRO to work on IPv6 over GRE tap

2018-08-08 Thread Tariq Toukan
From: Maria Pasechnik IPv6 GRO over GRE tap is not working while GRO is not set over the native interface. gro_list_prepare function updates the same_flow variable of existing sessions to 1 if their mac headers match the one of the incoming packet. same_flow is used to filter out non-matching

Re: [PATCH net-next 12/14] net: sched: act_mirred: remove dependency on rtnl lock

2018-08-08 Thread Vlad Buslov
On Wed 08 Aug 2018 at 08:03, Jiri Pirko wrote: > Wed, Aug 08, 2018 at 09:40:35AM CEST, vla...@mellanox.com wrote: >> >>On Tue 07 Aug 2018 at 16:36, Jiri Pirko wrote: >>> Mon, Aug 06, 2018 at 08:54:23AM CEST, vla...@mellanox.com wrote: >>> >>> [...] >>> diff --git

Re: for newbies, it would be useful to document values of netdev_state_t

2018-08-08 Thread Julian Wiedmann
On 08/04/2018 05:30 PM, Robert P. J. Day wrote: > > i'm sure this is second nature for the experts here, but in > netdevice.h: > > /* These flag bits are private to the generic network queueing > * layer; they may not be explicitly referenced by any other > * code. > */ > > enum

Re: [PATCH net-next 12/14] net: sched: act_mirred: remove dependency on rtnl lock

2018-08-08 Thread Jiri Pirko
Wed, Aug 08, 2018 at 09:40:35AM CEST, vla...@mellanox.com wrote: > >On Tue 07 Aug 2018 at 16:36, Jiri Pirko wrote: >> Mon, Aug 06, 2018 at 08:54:23AM CEST, vla...@mellanox.com wrote: >> >> [...] >> >>>diff --git a/include/net/tc_act/tc_tunnel_key.h >>>b/include/net/tc_act/tc_tunnel_key.h

[PATCH v4 net-next 9/9] dt-bindings: net: stmmac: Add the bindings documentation for XGMAC2.

2018-08-08 Thread Jose Abreu
Adds the documentation for XGMAC2 DT bindings. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Sergei Shtylyov Cc: devicet...@vger.kernel.org Cc: Rob Herring --- Changes from v3: - Remove driver mention (Rob) Changes from

[PATCH v4 net-next 2/9] net: stmmac: Add MAC related callbacks for XGMAC2

2018-08-08 Thread Jose Abreu
Add the MAC related callbacks for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/common.h | 3 +

[PATCH v4 net-next 1/9] net: stmmac: Add XGMAC 2.10 HWIF entry

2018-08-08 Thread Jose Abreu
Add a new entry to HWIF table for XGMAC 2.10. For now we fill it with empty callbacks which will be added in posterior patches. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/common.h | 14

[PATCH v4 net-next 7/9] net: stmmac: Integrate XGMAC into main driver flow

2018-08-08 Thread Jose Abreu
Now that we have all the XGMAC related callbacks, lets start integrating this IP block into main driver. Also, we corrected the initialization flow to only start DMA after setting descriptors length. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc:

[PATCH v4 net-next 5/9] net: stmmac: Add MDIO related functions for XGMAC2

2018-08-08 Thread Jose Abreu
Add the MDIO related funcionalities for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Andrew Lunn Cc: Florian Fainelli --- Changes from v3: - Check if unsupported phy_addr was specified in DT

[PATCH v4 net-next 8/9] net: stmmac: Add the bindings parsing for XGMAC2

2018-08-08 Thread Jose Abreu
Add the bindings parsing for XGMAC2 IP block. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 6 ++ 2 files

[PATCH v4 net-next 0/9] Add support for XGMAC2 in stmmac

2018-08-08 Thread Jose Abreu
This series adds support for 10Gigabit IP in stmmac. The IP is called XGMAC2 and has many similarities with GMAC4. Due to this, its relatively easy to incorporate this new IP into stmmac driver by adding a new block and filling the necessary callbacks. The functionality added by this series is

[PATCH v4 net-next 3/9] net: stmmac: Add DMA related callbacks for XGMAC2

2018-08-08 Thread Jose Abreu
Add the DMA related callbacks for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Florian Fainelli --- Changes from v3: - Clear previous BLEN values (Florian) ---

[PATCH v4 net-next 4/9] net: stmmac: Add descriptor related callbacks for XGMAC2

2018-08-08 Thread Jose Abreu
Add the descriptor related callbacks for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/Makefile | 3 +- drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h |

[PATCH v4 net-next 6/9] net: stmmac: Add PTP support for XGMAC2

2018-08-08 Thread Jose Abreu
XGMAC2 uses the same engine of timestamping as GMAC4. Let's use the same callbacks. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/hwif.c | 4 ++--

[PATCH] net: ethernet: cpsw-phy-sel: prefer phandle for phy sel and update binding

2018-08-08 Thread Tony Lindgren
The cpsw-phy-sel device is not a child of the cpsw interconnect target module. It lives in the system control module. Let's fix this issue by trying to use cpsw-phy-sel phandle first if it exists and if not fall back to current usage of trying to find the cpsw-phy-sel child. That way the phy sel

[PATCH bpf-next 9/9] bpf: Test BPF_PROG_TYPE_SK_REUSEPORT

2018-08-08 Thread Martin KaFai Lau
This patch add tests for the new BPF_PROG_TYPE_SK_REUSEPORT. The tests cover: - IPv4/IPv6 + TCP/UDP - TCP syncookie - TCP fastopen - Cases when the bpf_sk_select_reuseport() returning errors - Cases when the bpf prog returns SK_DROP - Values from sk_reuseport_md - outer_map => reuseport_array

[PATCH bpf-next 4/9] bpf: Introduce BPF_PROG_TYPE_SK_REUSEPORT

2018-08-08 Thread Martin KaFai Lau
This patch adds a BPF_PROG_TYPE_SK_REUSEPORT which can select a SO_REUSEPORT sk from a BPF_MAP_TYPE_REUSEPORT_ARRAY. Like other non SK_FILTER/CGROUP_SKB program, it requires CAP_SYS_ADMIN. BPF_PROG_TYPE_SK_REUSEPORT introduces "struct sk_reuseport_kern" to store the bpf context instead of using

[PATCH bpf-next 2/9] net: Add ID (if needed) to sock_reuseport and expose reuseport_lock

2018-08-08 Thread Martin KaFai Lau
A later patch will introduce a BPF_MAP_TYPE_REUSEPORT_ARRAY which allows a SO_REUSEPORT sk to be added to a bpf map. When a sk is removed from reuse->socks[], it also needs to be removed from the bpf map. Also, when adding a sk to a bpf map, the bpf map needs to ensure it is indeed in a

[PATCH bpf-next 8/9] bpf: test BPF_MAP_TYPE_REUSEPORT_SOCKARRAY

2018-08-08 Thread Martin KaFai Lau
This patch adds tests for the new BPF_MAP_TYPE_REUSEPORT_SOCKARRAY. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov --- tools/lib/bpf/libbpf.c | 1 + tools/testing/selftests/bpf/test_maps.c | 262 +++- 2 files changed, 262 insertions(+), 1

[PATCH bpf-next 3/9] bpf: Introduce BPF_MAP_TYPE_REUSEPORT_SOCKARRAY

2018-08-08 Thread Martin KaFai Lau
This patch introduces a new map type BPF_MAP_TYPE_REUSEPORT_SOCKARRAY. To unleash the full potential of a bpf prog, it is essential for the userspace to be capable of directly setting up a bpf map which can then be consumed by the bpf prog to make decision. In this case, decide which

[PATCH bpf-next 6/9] bpf: Refactor ARRAY_SIZE macro to bpf_util.h

2018-08-08 Thread Martin KaFai Lau
This patch refactors the ARRAY_SIZE macro to bpf_util.h. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov --- tools/testing/selftests/bpf/bpf_util.h | 4 tools/testing/selftests/bpf/test_align.c | 5 + tools/testing/selftests/bpf/test_btf.c | 5 +

[PATCH bpf-next 5/9] bpf: Enable BPF_PROG_TYPE_SK_REUSEPORT bpf prog in reuseport selection

2018-08-08 Thread Martin KaFai Lau
This patch allows a BPF_PROG_TYPE_SK_REUSEPORT bpf prog to select a SO_REUSEPORT sk from a BPF_MAP_TYPE_REUSEPORT_ARRAY introduced in the earlier patch. "bpf_run_sk_reuseport()" will return -ECONNREFUSED when the BPF_PROG_TYPE_SK_REUSEPORT prog returns SK_DROP. The callers, in inet[6]_hashtable.c

[PATCH bpf-next 7/9] bpf: Sync bpf.h uapi to tools/

2018-08-08 Thread Martin KaFai Lau
This patch sync include/uapi/linux/bpf.h to tools/include/uapi/linux/ Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov --- tools/include/uapi/linux/bpf.h | 37 +- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git

[PATCH bpf-next 1/9] tcp: Avoid TCP syncookie rejected by SO_REUSEPORT socket

2018-08-08 Thread Martin KaFai Lau
Although the actual cookie check "__cookie_v[46]_check()" does not involve sk specific info, it checks whether the sk has recent synq overflow event in "tcp_synq_no_recent_overflow()". The tcp_sk(sk)->rx_opt.ts_recent_stamp is updated every second when it has sent out a syncookie (through

[PATCH bpf-next 0/9] Introduce BPF_MAP_TYPE_REUSEPORT_SOCKARRAY and BPF_PROG_TYPE_SK_REUSEPORT

2018-08-08 Thread Martin KaFai Lau
This series introduces a new map type "BPF_MAP_TYPE_REUSEPORT_SOCKARRAY" and a new prog type BPF_PROG_TYPE_SK_REUSEPORT. Here is a snippet from a commit message: "To unleash the full potential of a bpf prog, it is essential for the userspace to be capable of directly setting up a bpf map which

[PATCH net-next v1 0/1] net/tls: Combined memory allocation for decryption request

2018-08-08 Thread Vakul Garg
This patch does a combined memory allocation from heap for scatterlists, aead_request, aad and iv for the tls record decryption path. In present code, aead_request is allocated from heap, scatterlists on a conditional basis are allocated on heap or on stack. This is inefficient as it may requires

[PATCH net-next v1 1/1] net/tls: Combined memory allocation for decryption request

2018-08-08 Thread Vakul Garg
For preparing decryption request, several memory chunks are required (aead_req, sgin, sgout, iv, aad). For submitting the decrypt request to an accelerator, it is required that the buffers which are read by the accelerator must be dma-able and not come from stack. The buffers for aad and iv can be

Re: [PATCH net-next 12/14] net: sched: act_mirred: remove dependency on rtnl lock

2018-08-08 Thread Vlad Buslov
On Tue 07 Aug 2018 at 16:36, Jiri Pirko wrote: > Mon, Aug 06, 2018 at 08:54:23AM CEST, vla...@mellanox.com wrote: > > [...] > >>diff --git a/include/net/tc_act/tc_tunnel_key.h >>b/include/net/tc_act/tc_tunnel_key.h >>index 46b8c7f1c8d5..e6e475d788c6 100644 >>---

<    1   2