[PATCH net] sctp: use memdup_user instead of vmemdup_user

2019-03-19 Thread Xin Long
In sctp_setsockopt_bindx()/__sctp_setsockopt_connectx(), it allocates memory with addrs_size which is passed from userspace. We used flag GFP_USER to put some more restrictions on it in Commit cacc06215271 ("sctp: use GFP_USER for user-controlled kmalloc"). However, since Commit c981f254cc82 ("sct

[PATCHv2 net] ipv6: make ip6_create_rt_rcu return ip6_null_entry instead of NULL

2019-03-19 Thread Xin Long
Jianlin reported a crash: [ 381.484332] BUG: unable to handle kernel NULL pointer dereference at 0068 [ 381.619802] RIP: 0010:fib6_rule_lookup+0xa3/0x160 [ 382.009615] Call Trace: [ 382.020762] [ 382.030174] ip6_route_redirect.isra.52+0xc9/0xf0 [ 382.050984] ip6_

Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-19 Thread Heiner Kallweit
On 20.03.2019 06:16, Phil Reid wrote: > On 20/03/2019 11:37 am, Florian Fainelli wrote: >> >> >> On 3/19/2019 7:34 PM, liweihang wrote: >>> Hi all, >>> >>> I've met a similar issue and sent an email to discuss about it before: >>> Question about setting speed and duplex failed after auto-negotiatio

Re: [PATCH] v2 Check for SKBTX_HW_TSTAMP in macb driver

2019-03-19 Thread Harini Katakam
Hi Paul, On Tue, Mar 19, 2019 at 11:13 PM Paul Thomas wrote: > > Oh I notice that this is in the xilnx github repo so if it makes it in > from there that works too. No, I don't plan to send anything. I just used your patch (retained your signed-off, of course) and added the && check, because I w

Re: [PATCH v3 bpf-next 3/3] BPF: helpers: New helper to obtain namespace data from current task

2019-03-19 Thread Carlos Neira
>From 7b7759029fb2bbf6d65a6ac26bb78121e91a30f1 Mon Sep 17 00:00:00 2001 From: Carlos Date: Tue, 19 Mar 2019 18:00:56 -0300 Subject: [PATCH] [PATCH bpf-next 3/3] BPF: New helper to obtain namespace data from current task This helper obtains the active namespace from current and returns pid, tgid,

Re: [PATCH v3 bpf-next 2/3] BPF: helpers: New helper to obtain namespace data from current task

2019-03-19 Thread Carlos Neira
>From b7f5af5c1513b6e89fc5b68ddb1ad65e4fbede02 Mon Sep 17 00:00:00 2001 From: Carlos Date: Mon, 18 Mar 2019 13:09:35 -0300 Subject: [PATCH] [PATCH bpf-next 2/3] BPF: New helper to obtain namespace data from current task This helper obtains the active namespace from current and returns pid, tgi

[PATCH v3 bpf-next 2/3] BPF: helpers: New helper to obtain namespace data from current task

2019-03-19 Thread Carlos Neira
This is a series of patches to introduce a new helper called bpf_get_current_pidns_info, this change has been splitted into the following patches: 1- Feature introduction 2- Update tools/.../bpf.h 3- Self tests and samples >From b7f5af5c1513b6e89fc5b68ddb1ad65e4fbede02 Mon Sep 17 00:00:00 2001 Fr

Re: [Patch net] xfrm: unify xfrm protocol checks

2019-03-19 Thread Herbert Xu
On Tue, Mar 19, 2019 at 01:42:53PM -0700, Cong Wang wrote: > > IIRC, it is Steffen who suggested to add IPPROTO_ROUTING/IPPROTO_DSTOPTS > back to commit 6a53b7593233. My xfrm knowledge is not enough to > figure out IPPROTO_ROUTING/IPPROTO_DSTOPTS. OK I dug into the history of xfrm_id_proto_match a

[PATCH v3 bpf-next 1/3] BPF: helpers: New helper to obtain namespace data from current task

2019-03-19 Thread Carlos Neira
This is a series of patches to introduce a new helper called bpf_get_current_pidns_info, this change has been splitted into the following patches: 1- Feature introduction 2- Update tools/.../bpf.h 3- Self tests and samples >From 852a65906122b05b4d1a23af868b2c245d240402 Mon Sep 17 00:00:00 2001 Fr

Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-19 Thread Phil Reid
On 20/03/2019 11:37 am, Florian Fainelli wrote: On 3/19/2019 7:34 PM, liweihang wrote: Hi all, I've met a similar issue and sent an email to discuss about it before: Question about setting speed and duplex failed after auto-negotiation disabled on marvell phy d6ab93364734 net: phy: marvell:

[PATCH] samples: bpf: add xdp_sample_pkts to .gitignore

2019-03-19 Thread Daniel T. Lee
This commit adds xdp_sample_pkts to .gitignore which is currently ommited from the ignore file. Signed-off-by: Daniel T. Lee --- samples/bpf/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/bpf/.gitignore b/samples/bpf/.gitignore index 8ae4940025f8..5a1d084be806 100644 ---

Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-19 Thread Florian Fainelli
On 3/19/2019 7:34 PM, liweihang wrote: > Hi all, > > I've met a similar issue and sent an email to discuss about it before: > Question about setting speed and duplex failed after auto-negotiation > disabled on marvell phy > > d6ab93364734 net: phy: marvell: Avoid unnecessary soft reset > I re

RE: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-19 Thread liweihang
Hi all, I've met a similar issue and sent an email to discuss about it before: Question about setting speed and duplex failed after auto-negotiation disabled on marvell phy d6ab93364734 net: phy: marvell: Avoid unnecessary soft reset I reverted this patch and the auto-negotiation works ok. Flor

[PATCH net-next] macvlan: pass get_ts_info and SIOC[SG]HWTSTAMP ioctl to real device

2019-03-19 Thread Hangbin Liu
Similiar to commit a6111d3c93d0 ("vlan: Pass SIOC[SG]HWTSTAMP ioctls to real device") and commit 37dd9255b2f6 ("vlan: Pass ethtool get_ts_info queries to real device."), add MACVlan HW ptp support. Signed-off-by: Hangbin Liu --- drivers/net/macvlan.c | 48

RE

2019-03-19 Thread Ms.Ella Golan
I am Ms.Ella Golan, I am the Executive Vice President Banking Division with FIRST INTERNATIONAL BANK OF ISRAEL LTD (FIBI). I am getting in touch with you regarding an extremely important and urgent matter. If you would oblige me the opportunity, I shall provide you with details upon your respons

Re: [RFC bpf-next v2 2/9] net: introduce skb_net helper

2019-03-19 Thread Willem de Bruijn
On Tue, Mar 19, 2019 at 6:20 PM Stanislav Fomichev wrote: > > skb_net returns network namespace from the associated device or socket. > > This will be used in the next commit. > > I tried to inline it in skbuff.h, but I don't think it's feasible. If so, is this helper necessary? All existing cas

Re: [RFC bpf-next v2 7/9] bpf: when doing BPF_PROG_TEST_RUN for flow dissector use no-skb mode

2019-03-19 Thread Willem de Bruijn
On Tue, Mar 19, 2019 at 6:21 PM Stanislav Fomichev wrote: > > Now that we have __flow_bpf_dissect which works on raw data (by > constructing temporary on-stack skb), use it when doing > BPF_PROG_TEST_RUN for flow dissector. > > This should help us catch any possible bugs due to missing shinfo on >

[PATCH net-next v2] net/tls: Add support of AES128-CCM based ciphers

2019-03-19 Thread Vakul Garg
Added support for AES128-CCM based record encryption. AES128-CCM is similar to AES128-GCM. Both of them have same salt/iv/mac size. The notable difference between the two is that while invoking AES128-CCM operation, the salt||nonce (which is passed as IV) has to be prefixed with a hardcoded value '

Re: [PATCH] bpf, tests: tweak endianness selection

2019-03-19 Thread Sergey Senozhatsky
On (03/19/19 09:01), Stanislav Fomichev wrote: > > diff --git a/tools/testing/selftests/bpf/bpf_endian.h > > b/tools/testing/selftests/bpf/bpf_endian.h > > index b25595ea4a78..ba06222963d5 100644 > > --- a/tools/testing/selftests/bpf/bpf_endian.h > > +++ b/tools/testing/selftests/bpf/bpf_endian.h

Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-19 Thread Phil Reid
On 20/03/2019 12:53 am, Florian Fainelli wrote: On 3/18/19 6:32 PM, Phil Reid wrote: On 19/03/2019 1:09 am, Florian Fainelli wrote: On 3/17/19 7:11 PM, Phil Reid wrote: On 16/03/2019 5:58 am, Florian Fainelli wrote: On 3/15/19 1:52 AM, Phil Reid wrote: G'day All, I've just update from kerne

[net-next 11/11] ice: Determine descriptor count and ring size based on PAGE_SIZE

2019-03-19 Thread Jeff Kirsher
From: Brett Creeley Currently we set the default number of Tx and Rx descriptors to 128 by default. For Rx this amounts to a full page (assuming 4K pages) because each Rx descriptor is 32 Bytes, but for Tx it only amounts to a half page because each Tx descriptor is 16 Bytes (assuming 4K pages).

[net-next 02/11] ice: Fix issue with VF reset and multiple VFs support on PFs

2019-03-19 Thread Jeff Kirsher
From: Akeem G Abodunrin This patch fixes issues with VF queues being disabled, and VF netdev network carrier being lost after reset. Basically, we need to check if VF is enabled, and queue configured in reset_all_vfs flow, and disable/enable those queues appropriately whenever the function is cal

[net-next 03/11] ice: avoid multiple unnecessary de-references in probe

2019-03-19 Thread Jeff Kirsher
From: Bruce Allan Add a local variable struct device *dev to avoid unnecessary de-references throughout ice_probe(). Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_main.c | 33 +

[net-next 04/11] ice: remove redundant variable and if condition

2019-03-19 Thread Jeff Kirsher
From: Brett Creeley In ice_pf_rxq_wait we are using an unnecessary local variable and also we are checking if the timeout time was reached after the loop. Get rid of the local variable and return 0 right when we get a successful result. This makes it so we can return -ETIMEDOUT if we ever exit th

[net-next 05/11] ice : Ensure only valid bits are set in ice_aq_set_phy_cfg

2019-03-19 Thread Jeff Kirsher
From: Chinh T Cao In the ice_aq_set_phy_cfg AQ command, the 16.4 bit is reserved. This patch will make sure that this bit will never be set to 1. Signed-off-by: Chinh T Cao Reviewed-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --

[net-next 09/11] ice: Get resources per function

2019-03-19 Thread Jeff Kirsher
From: Brett Creeley ice_get_guar_num_vsi currently calculates the number of VSIs per PF. Rework this into a general function ice_get_num_per_func, that can calculate per PF allocations for not just VSIs but across multiple resource types. Signed-off-by: Brett Creeley Reviewed-by: Bruce Allan S

[net-next 10/11] ice: Reset all VFs with VFLR during SR-IOV init flow

2019-03-19 Thread Jeff Kirsher
From: Akeem G Abodunrin During SR-IOV initialization, we allocate and setup VFs with reset, and since we were going to inform Firmware about our intention to do VFLR by disabling LAN TX Queue, then we really have to complete VF reset flow with VFLR using appropriate registers - Otherwise, reset s

[net-next 06/11] ice: use ice_for_each_vsi macro when possible

2019-03-19 Thread Jeff Kirsher
From: Brett Creeley Replace all instances of: for (i = 0; i < pf->num_alloc_vsi; i++) with the following macro: ice_for_each_vsi(pf, i) This will allow the code to be consistent since there are currently cases of using both. Signed-off-by: Brett Creeley Signed-off-by: Anirudh

[net-next 07/11] ice: configure GLINT_ITR to always have an ITR gran of 2

2019-03-19 Thread Jeff Kirsher
From: Brett Creeley Instead of hoping that our ITR granularity will be 2 usec program the GLINT_CTL register to make sure the ITR granularity is always 2 usecs. Now that we know what the ITR granularity will be get rid of the check in ice_probe() to verify our previous assumption. Signed-off-by

[net-next 01/11] ice: Fix broadcast traffic in port VLAN mode

2019-03-19 Thread Jeff Kirsher
From: Michal Swiatkowski Set egress (Rx) pruning enable flag for VF VSI in VSI ctxt to enable prune action. To avoid seeing broadcast packet in different VLAN, pruning enable flag in VSI ctxt should be set. Write new functions (fill VSI ctx) to not repeat send ctxt code. Signed-off-by: Michal

[net-next 00/11][pull request] 100GbE Intel Wired LAN Driver Updates 2019-03-19

2019-03-19 Thread Jeff Kirsher
This series contains updates to ice driver only. Michal adds support for the pruning enable flag to avoid seeing broadcast packets on different VLANs. Akeem fixes an issue with VF queues being disabled and the VF netdev network carrier being lost after reset. Fixed an issue issue when doing PFR a

[net-next 08/11] ice: Implement flow to reset VFs with PFR and other resets

2019-03-19 Thread Jeff Kirsher
From: Akeem G Abodunrin All VF VSIs need to be reset and rebuild with the main VSIs before replaying all VSIs, so that all existing switch filters, scheduler tree and other configuration could be replayed at once. This fixes issues when doing PFR and CORER reset. Signed-off-by: Akeem G Abodunrin

Re: [ipsec/xfrm] IPv6 fragmentation/path-mtu

2019-03-19 Thread Bram Yvahk
Bram Yvahk wrote: > (What I think should happen in this particular case: do not send a > PKT_TOOBIG to the client but instead transmit fragmented IPv6 ESP > packets to accommodate the path-mtu) A follow-up to clarify my thinking (since my original mail might not be clear enough). Let me first st

Re: [PATCH bpf-next v2] tools/bpf: generate pkg-config file for libbpf

2019-03-19 Thread Stanislav Fomichev
On 03/19, Luca Boccassi wrote: > Generate a libbpf.pc file at build time so that users can rely > on pkg-config to find the library, its CFLAGS and LDFLAGS. > > Signed-off-by: Luca Boccassi > --- > v2: use QUIET_GEN instead of QUIET_LINK to generate pc file, > save kernel version in its own v

Re: [PATCH bpf-next] tools/bpf: generate pkg-config file for libbpf

2019-03-19 Thread Stanislav Fomichev
On 03/19, Luca Boccassi wrote: > On Tue, 2019-03-19 at 14:23 -0700, Stanislav Fomichev wrote: > > On 03/19, Luca Boccassi wrote: > > > Generate a libbpf.pc file at build time so that users can rely > > > on pkg-config to find the library, its CFLAGS and LDFLAGS. > > > > > > Signed-off-by: Luca Boc

Re: [PATCH bpf-next] tools/bpf: generate pkg-config file for libbpf

2019-03-19 Thread Luca Boccassi
On Tue, 2019-03-19 at 14:23 -0700, Stanislav Fomichev wrote: > On 03/19, Luca Boccassi wrote: > > Generate a libbpf.pc file at build time so that users can rely > > on pkg-config to find the library, its CFLAGS and LDFLAGS. > > > > Signed-off-by: Luca Boccassi > > --- > >  tools/lib/bpf/.gitignor

[PATCH bpf-next v2] tools/bpf: generate pkg-config file for libbpf

2019-03-19 Thread Luca Boccassi
Generate a libbpf.pc file at build time so that users can rely on pkg-config to find the library, its CFLAGS and LDFLAGS. Signed-off-by: Luca Boccassi --- v2: use QUIET_GEN instead of QUIET_LINK to generate pc file, save kernel version in its own variable instead of calling make inline

Re: [PATCH net] mpls: Fix 6PE forwarding

2019-03-19 Thread David Miller
From: Vinay K Nallamothu Date: Tue, 19 Mar 2019 22:41:18 + > This patch adds support for 6PE (RFC 4798) which uses IPv4-mapped IPv6 > nexthop to connect IPv6 islands over IPv4 only MPLS network core. > > Prior to this fix, to find the link-layer destination mac address, 6PE > enabled host/ro

[PATCH net] mpls: Fix 6PE forwarding

2019-03-19 Thread Vinay K Nallamothu
This patch adds support for 6PE (RFC 4798) which uses IPv4-mapped IPv6 nexthop to connect IPv6 islands over IPv4 only MPLS network core. Prior to this fix, to find the link-layer destination mac address, 6PE enabled host/router was sending IPv6 ND requests for IPv4-mapped IPv6 nexthop address over

[net-next 03/10] igb: fix various indentation issues

2019-03-19 Thread Jeff Kirsher
From: Colin Ian King There are some lines that have indentation issues, fix these Signed-off-by: Colin Ian King Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igb/igb_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/

[net-next 04/10] e1000e: Disable runtime PM on CNP+

2019-03-19 Thread Jeff Kirsher
From: Kai-Heng Feng There are some new e1000e devices can only be woken up from D3 one time, by plugging Ethernet cable. Subsequent cable plugging does set PME bit correctly, but it still doesn't get woken up. Since e1000e connects to the root complex directly, we rely on ACPI to wake it up. In

[net-next 05/10] igc: Add multiple receive queues control supporting

2019-03-19 Thread Jeff Kirsher
From: Sasha Neftin Enable the multi queues to receive. Program the direction of packets to specified queues according to the mode selected in the MRQC register. Multiple receive queues defined by filters and RSS for 4 queues. Enable/disable RSS hashing and also to enable multiple receive queues.

[net-next 10/10] igc: Remove unneeded hw_dbg prints

2019-03-19 Thread Jeff Kirsher
From: Sasha Neftin Remove unneeded hw_dbg prints from igc_ethtool.c file. Clean up code. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_ethtool.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet

[net-next 06/10] igc: Extend the ethtool supporting

2019-03-19 Thread Jeff Kirsher
From: Sasha Neftin Add show and configure network flow classification (NFC) methods to the ethtool. Show the specifies Rx ntuple filters. Configures receive network flow classification option or rules. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers

[net-next 01/10] intel: correct return from set features callback

2019-03-19 Thread Jeff Kirsher
From: Serhey Popovych According to comments in we should return either >0 or -errno from ->ndo_set_features() if changing dev->features by itself. Return 1 in such places to notify netdev_update_features() about applied changes in dev->features. Signed-off-by: Serhey Popovych Tested-by: Aaron

[net-next 02/10] igb: Exclude device from suspend direct complete optimization

2019-03-19 Thread Jeff Kirsher
From: Kai-Heng Feng igb sets different WoL settings in system suspend callback and runtime suspend callback. The suspend direct complete optimization leaves igb in runtime suspended state with wrong WoL setting during system suspend. To fix this, we need to disable suspend direct complete optim

[net-next 08/10] igc: Add support for the ntuple feature

2019-03-19 Thread Jeff Kirsher
From: Sasha Neftin Copy the ntuple feature into list of user selectable features. Enable the ntuple feature. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_defines.h | 3 + drivers/net/ethernet/intel/igc/igc_main.c|

[net-next 09/10] igc: Fix the typo in igc_base.h header definition

2019-03-19 Thread Jeff Kirsher
From: Sasha Neftin Add the underline for the _IGC_BASE_H_. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_b

[net-next 07/10] igc: Add support for statistics

2019-03-19 Thread Jeff Kirsher
From: Sasha Neftin Add support for statistics and show basic counters. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc.h | 4 + drivers/net/ethernet/intel/igc/igc_ethtool.c | 233 +++ drivers/net/

[net-next 00/10][pull request] 1GbE Intel Wired LAN Driver Updates 2019-03-19

2019-03-19 Thread Jeff Kirsher
This series contains updates to e100, e1000, e1000e, igb, igc and ixgbe. Serhey Popovych fixes the return value for several of our older drivers for netdev_update_features() to notify of changes applied. Kai-Heng Feng fixes the WoL setting for system suspend, which should not set to runtime suspe

Re: [PATCH iproute2 1/2] ip route: print route type in JSON output

2019-03-19 Thread Stephen Hemminger
On Mon, 18 Mar 2019 18:19:29 +0100 Matteo Croce wrote: > ip route generates an invalid JSON if the route type has to be printed, > eg. when detailed mode is active, or the type is different that unicast: > > $ ip -d -j -p route show > [ {"unicast", > "dst": "192.168.122.0/24"

Re: [PATCH iproute2-next] tc: m_connmark: fix action error messages

2019-03-19 Thread Stephen Hemminger
On Fri, 15 Mar 2019 10:50:45 + Kevin 'ldir' Darbyshire-Bryant wrote: > action m_connmark returns error messages identifying itself as the > 'simple' action instead of 'connmark' action. e.g. > > tc filter add dev eth0 protocol all u32 match u32 0 0 flowid 1:1 \ > action connmark index

[RFC bpf-next v2 6/9] net: flow_dissector: handle no-skb use case

2019-03-19 Thread Stanislav Fomichev
When flow_dissector is called without skb (with only data and hlen), use temporary per-cpu skb (which has a linear chunk of data passed to the flow dissector). This should let us handle eth_get_headlen case where only data is provided and we don't want to (yet) allocate an skb. Since this per-cpu

[RFC bpf-next v2 9/9] net: flow_dissector: pass net argument to the eth_get_headlen

2019-03-19 Thread Stanislav Fomichev
This is an example and for RFC only, just to show what the end result would look like. In a proper submission, we need to introduce new helper and convert each driver one by one to make sure we don't break 'git bisect'. Signed-off-by: Stanislav Fomichev --- drivers/net/ethernet/broadcom/bnxt/bnx

[RFC bpf-next v2 7/9] bpf: when doing BPF_PROG_TEST_RUN for flow dissector use no-skb mode

2019-03-19 Thread Stanislav Fomichev
Now that we have __flow_bpf_dissect which works on raw data (by constructing temporary on-stack skb), use it when doing BPF_PROG_TEST_RUN for flow dissector. This should help us catch any possible bugs due to missing shinfo on the per-cpu skb. Note that existing __skb_flow_bpf_dissect swallows L2

[RFC bpf-next v2 3/9] net: plumb network namespace into __skb_flow_dissect

2019-03-19 Thread Stanislav Fomichev
This new argument will be used in the next patches for the eth_get_headlen use case. eth_get_headlen calls flow dissector with only data (without skb) so there is currently no way to pull attached BPF flow dissector program. With this new argument, we can amend the callers to explicitly pass networ

[RFC bpf-next v2 5/9] flow_dissector: allow access only to a subset of __sk_buff fields

2019-03-19 Thread Stanislav Fomichev
Use whitelist instead of a blacklist and allow only a small set of fields that might be relevant in the context of flow dissector: * len * protocol * vlan_present * vlan_tci * vlan_proto * cb This is required for the eth_get_headlen case where we construct temporary skb which might not have full/c

[RFC bpf-next v2 8/9] selftests/bpf: add flow dissector bpf_skb_load_bytes helper test

2019-03-19 Thread Stanislav Fomichev
With the per-cpu skb, we want to make sure we don't trigger any shinfo access. Add small test which tries to read the data past the packet boundary. Signed-off-by: Stanislav Fomichev --- .../prog_tests/flow_dissector_load_bytes.c| 50 +++ 1 file changed, 50 insertions(+) cre

[RFC bpf-next v2 4/9] net: flow_dissector: prepare for no-skb use case

2019-03-19 Thread Stanislav Fomichev
Create helpers that will be reused by both versions: * init_flow_keys - initialize flow keys * clamp_flow_keys - clam flow keys when done Rename (to have consistent bpf_flow_ prefix): * __skb_flow_bpf_dissect to bpf_flow_dissect_skb * __skb_flow_bpf_to_target to bpf_flow_keys_to_target Signed-off

[RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-19 Thread Stanislav Fomichev
__init_skb is essentially a version of __build_skb which accepts skb as an argument (instead of doing kmem_cache_alloc to allocate it). __init_skb_shinfo initializes shinfo. __init_skb_data initializes skb data pointers. No functional changes. Signed-off-by: Stanislav Fomichev --- include/lin

[RFC bpf-next v2 2/9] net: introduce skb_net helper

2019-03-19 Thread Stanislav Fomichev
skb_net returns network namespace from the associated device or socket. This will be used in the next commit. I tried to inline it in skbuff.h, but I don't think it's feasible. It depends on 'net/sock.h' for sock_net() and 'linux/netdevice.h' for dev_net(), both of which we don't include from 'li

[RFC bpf-next v2 0/9] net: flow_dissector: trigger BPF hook when called from eth_get_headlen

2019-03-19 Thread Stanislav Fomichev
Currently, when eth_get_headlen calls flow dissector, it doesn't pass any skb. Because we use passed skb to lookup associated networking namespace to find whether we have a BPF program attached or not, we always use C-based flow dissector in this case. The goal of this patch series is to add new n

Re: [PATCH v2 4/8] bpf: add helper to check for a valid SYN cookie

2019-03-19 Thread Alexei Starovoitov
On Tue, Mar 19, 2019 at 10:20:59AM +, Lorenz Bauer wrote: > Using bpf_skc_lookup_tcp it's possible to ascertain whether a packet > belongs to a known connection. However, there is one corner case: no > sockets are created if SYN cookies are active. This means that the final > ACK in the 3WHS is

[PATCH net-next 2/2] net: phy: aquantia: check for changed interface mode in read_status

2019-03-19 Thread Heiner Kallweit
From: Nikita Yushchenko Depending on the auto-negotiated speed the PHY may change the interface mode. Check for new mode and set phydev->interface accordingly. Signed-off-by: Nikita Yushchenko Signed-off-by: Andrew Lunn [hkallwe...@gmail.com: picked from bigger patch and reworked] Signed-off-by

[PATCH net-next 1/2] net: phy: aquantia: check for supported interface modes in config_init

2019-03-19 Thread Heiner Kallweit
From: Andrew Lunn Let config_init check for unsupported interface modes on AQR107/AQCS109. Signed-off-by: Andrew Lunn [hkallwe...@gmail.com: adjusted for AQR107/AQCS109 specifics] Signed-off-by: Heiner Kallweit --- drivers/net/phy/aquantia_main.c | 17 + 1 file changed, 17 inse

Re: [PATCH] net: mvneta: Switch to using devm_alloc_etherdev_mqs

2019-03-19 Thread David Miller
From: Rosen Penev Date: Tue, 19 Mar 2019 13:53:40 -0700 > It allows some of the code to be simplified. ... > @@ -4641,9 +4640,6 @@ static int mvneta_probe(struct platform_device *pdev) > phylink_destroy(pp->phylink); > err_free_irq: > irq_dispose_mapping(dev->irq); > -err_fr

[PATCH net-next 0/2] net: phy: aquantia: add interface mode handling

2019-03-19 Thread Heiner Kallweit
These two patches add interface mode handling for the AQR107/AQCS109. Andrew Lunn (1): net: phy: aquantia: check for supported interface mode in config_init Nikita Yushchenko (1): net: phy: aquantia: check for changed interface mode in read_status drivers/net/phy/aquantia_main.c | 63 ++

Re: [PATCH v2 00/13] enc28j60: messaging clean up and ACPI improvements

2019-03-19 Thread David Miller
From: Andy Shevchenko Date: Tue, 19 Mar 2019 20:49:17 +0200 > Most of the patches in the series dedicated to update messaging to use modern > APIs, such as netdev, with a benefit to distinguish devices, if more than one > installed on the system. > > Besides that, patch 1 targeting ACPI enabled

[PATCH bpf-next] selftests: bpf: don't depend on hardcoded perf sample_freq

2019-03-19 Thread Stanislav Fomichev
When running stacktrace_build_id_nmi, try to query kernel.perf_event_max_sample_rate sysctl and use it as a sample_freq. If there was an error reading sysctl, fallback to 5000. kernel.perf_event_max_sample_rate sysctl can drift and/or can be adjusted by the perf tool, so assuming a fixed number mi

Re: [PATCH v2 3/8] bpf: add skc_lookup_tcp helper

2019-03-19 Thread Alexei Starovoitov
On Tue, Mar 19, 2019 at 10:20:58AM +, Lorenz Bauer wrote: > Allow looking up a sock_common. This gives eBPF programs > access to timewait and request sockets. > > Signed-off-by: Lorenz Bauer > --- > include/uapi/linux/bpf.h | 20 ++- > kernel/bpf/verifier.c| 3 +- > net/core/filte

Re: [PATCH net-next,v2] ipv6: Add icmp_echo_ignore_multicast support for ICMPv6

2019-03-19 Thread David Miller
From: Stephen Suryaputra Date: Tue, 19 Mar 2019 12:37:12 -0400 > IPv4 has icmp_echo_ignore_broadcast to prevent responding to broadcast pings. > IPv6 needs a similar mechanism. > > v1->v2: > - Remove NET_IPV6_ICMP_ECHO_IGNORE_MULTICAST. > > Signed-off-by: Stephen Suryaputra Applied.

Re: [PATCH bpf-next] tools/bpf: generate pkg-config file for libbpf

2019-03-19 Thread Stanislav Fomichev
On 03/19, Luca Boccassi wrote: > Generate a libbpf.pc file at build time so that users can rely > on pkg-config to find the library, its CFLAGS and LDFLAGS. > > Signed-off-by: Luca Boccassi > --- > tools/lib/bpf/.gitignore | 1 + > tools/lib/bpf/Makefile | 18 +++--

Re: [PATCH net] ipv6: make ip6_create_rt_rcu return ip6_null_entry instead of NULL

2019-03-19 Thread David Ahern
On 3/19/19 7:21 PM, Xin Long wrote: > I will post v2 by moving down 'fallback:': > > { ... > if (!fib6_info_hold_safe(rt)) > goto fallback; > > nrt = ip6_dst_alloc(dev_net(dev), dev, flags); > if (!nrt) { > fib6_info_release(rt); >

Re: [PATCH net-next] tcp: free request sock directly upon TFO or syncookies error

2019-03-19 Thread David Miller
From: Guillaume Nault Date: Tue, 19 Mar 2019 16:05:44 +0100 > Since the request socket is created locally, it'd make more sense to > use reqsk_free() instead of reqsk_put() in TFO and syncookies' error > path. > > However, tcp_get_cookie_sock() may set ->rsk_refcnt before freeing the > socket; t

Re: [PATCH net-next] net: hns3: Make hclgevf_update_link_mode static

2019-03-19 Thread David Miller
From: Yue Haibing Date: Tue, 19 Mar 2019 22:46:41 +0800 > From: YueHaibing > > Fix sparse warning: > > drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c:407:6: > warning: symbol 'hclgevf_update_link_mode' was not declared. Should it be > static? > > Signed-off-by: YueHaibing Appli

Re: bpf-next is OPEN

2019-03-19 Thread Daniel Borkmann
On 03/19/2019 06:01 PM, Alban Crequy wrote: > On Tue, 19 Mar 2019 at 09:56, Daniel Borkmann wrote: >> >> Merge window is closed, so new round begins. >> >> Thanks everyone, >> Daniel > > Thanks! I see that the bpf tree is more recent than the bpf-next tree: > https://git.kernel.org/?q=BPF+Group >

Re: [PATCH net-next] tcp: add tcp_inet6_sk() helper

2019-03-19 Thread David Miller
From: Eric Dumazet Date: Tue, 19 Mar 2019 07:01:08 -0700 > TCP ipv6 fast path dereferences a pointer to get to the inet6 > part of a tcp socket, but given the fixed memory placement, > we can do better and avoid a possible cache line miss. > > This also reduces register pressure, since we let th

mgmt-tx issues with off-channel neighbor response on channel 100

2019-03-19 Thread Ben Greear
Hello, I'm not sure if the fault is hostapd or the wireless stack (or something else), but this is what I see: I put an AP on channel 100, configured for RRM. STA associates to it and sends a channel report request. hostapd reports tx of the response frame failed with EBUSY (-16). Debugging i

Re: [PATCH net-next] ibmvnic: Report actual backing device speed and duplex values

2019-03-19 Thread David Miller
From: Murilo Fossa Vicentini Date: Tue, 19 Mar 2019 10:28:51 -0300 > The ibmvnic driver currently reports a fixed value for both speed and > duplex settings regardless of the actual backing device that is being > used. By adding support to the QUERY_PHYS_PARMS command defined by the > PAPR+ we ca

Re: [summary] virtio network device failover writeup

2019-03-19 Thread Michael S. Tsirkin
On Tue, Mar 19, 2019 at 02:38:06PM +0200, Liran Alon wrote: > Hi Michael, > > Great blog-post which summarise everything very well! > > Some comments I have: Thanks! I'll try to update everything in the post when I'm not so jet-lagged. > 1) I think that when we are using the term “1-netdev mode

[PATCH bpf-next] tools/bpf: generate pkg-config file for libbpf

2019-03-19 Thread Luca Boccassi
Generate a libbpf.pc file at build time so that users can rely on pkg-config to find the library, its CFLAGS and LDFLAGS. Signed-off-by: Luca Boccassi --- tools/lib/bpf/.gitignore | 1 + tools/lib/bpf/Makefile | 18 +++--- tools/lib/bpf/libbpf.pc.template | 11

Re: [PATCH net-next 1/2] packet: rework packet_pick_tx_queue() to use common code selection

2019-03-19 Thread David Miller
From: Paolo Abeni Date: Tue, 19 Mar 2019 14:25:01 +0100 > Currently packet_pick_tx_queue() is the only caller of > ndo_select_queue() using a fallback argument other than > __netdev_pick_tx. > > Leveraging rx queue, we can obtain a similar queue selection > behavior using core helpers. After thi

Re: [PATCH net] dccp: do not use ipv6 header for ipv4 flow

2019-03-19 Thread David Miller
From: Eric Dumazet Date: Tue, 19 Mar 2019 05:46:18 -0700 > When a dual stack dccp listener accepts an ipv4 flow, > it should not attempt to use an ipv6 header or > inet6_iif() helper. > > Fixes: 3df80d9320bc ("[DCCP]: Introduce DCCPv6") > Signed-off-by: Eric Dumazet Applied and queued up for -

Re: [PATCH net] tcp: do not use ipv6 header for ipv4 flow

2019-03-19 Thread David Miller
From: Eric Dumazet Date: Tue, 19 Mar 2019 05:45:35 -0700 > When a dual stack tcp listener accepts an ipv4 flow, > it should not attempt to use an ipv6 header or tcp_v6_iif() helper. > > Fixes: 1397ed35f22d ("ipv6: add flowinfo for tcp6 pkt_options for all cases") > Fixes: df3687ffc665 ("ipv6: ad

[PATCH] net: mvneta: Switch to using devm_alloc_etherdev_mqs

2019-03-19 Thread Rosen Penev
It allows some of the code to be simplified. Signed-off-by: Rosen Penev --- drivers/net/ethernet/marvell/mvneta.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index a78a39244b79..8

Re: [PATCH net-next] net/tls: Add support of AES128-CCM based ciphers

2019-03-19 Thread David Miller
From: Vakul Garg Date: Tue, 19 Mar 2019 05:15:20 + > @@ -479,11 +477,18 @@ static int tls_do_encryption(struct sock *sk, > struct tls_rec *rec = ctx->open_rec; > struct sk_msg *msg_en = &rec->msg_encrypted; > struct scatterlist *sge = sk_msg_elem(msg_en, start); > - int

Re: [Patch net] xfrm: unify xfrm protocol checks

2019-03-19 Thread Cong Wang
On Mon, Mar 18, 2019 at 10:17 PM Herbert Xu wrote: > > On Mon, Mar 18, 2019 at 10:08:24PM -0700, Cong Wang wrote: > > > > +static inline bool xfrm_id_proto_valid(u8 proto) > > +{ > > + switch (proto) { > > + case IPPROTO_AH: > > + case IPPROTO_ESP: > > + case IPPROTO_COMP: > > +#if

Re: [PATCH net] mpls: Fix 6PE forwarding

2019-03-19 Thread David Miller
From: Vinay K Nallamothu Date: Mon, 18 Mar 2019 19:31:54 + > Acknowledgements: > > We thank Avinash Lingala who brought up this usecase and > for having this fix verified in a large scale datacenter deployment. > > Aravind Srinivas Srinivasa Prabhakar helped us validate > the fix. Please

[PATCH v3 3/3] net: dsa: qca8k: extend slave-bus implementations

2019-03-19 Thread Christian Lamparter
This patch implements accessors for the QCA8337 MDIO access through the MDIO_MASTER register, which makes it possible to access the PHYs on slave-bus through the switch. In cases where the switch ports are already mapped via external "phy-phandles", the internal mdio-bus is disabled in order to pre

[PATCH v3 2/3] dt-bindings: net: dsa: qca8k: support internal mdio-bus

2019-03-19 Thread Christian Lamparter
This patch updates the qca8k's binding to document to the approach for using the internal mdio-bus of the supported qca8k switches. Signed-off-by: Christian Lamparter --- .../devicetree/bindings/net/dsa/qca8k.txt | 69 +-- 1 file changed, 64 insertions(+), 5 deletions(-) dif

[PATCH v3 1/3] dt-bindings: net: dsa: qca8k: fix example

2019-03-19 Thread Christian Lamparter
In the example, the phy at phy@0 is clashing with the switch0@0 at the same address. Usually, the switches are accessible through pseudo PHYs which in case of the qca8k are located at 0x10 - 0x18. Signed-off-by: Christian Lamparter --- Documentation/devicetree/bindings/net/dsa/qca8k.txt | 4 ++--

[PATCH 1/1] net: sched: Introduce conndscp action

2019-03-19 Thread Kevin 'ldir' Darbyshire-Bryant
Conndscp is a new tc filter action module. It is designed to copy DSCPs to conntrack marks and the reverse operation of conntrack mark contained DSCPs to the diffserv field of suitable skbs. The feature is intended for use and has been found useful for restoring ingress classifications based on e

[RFC PATCH 0/1 net-next] net: sched: Introduce conndscp action

2019-03-19 Thread Kevin 'ldir' Darbyshire-Bryant
With nervousness and trepidation I'm submitting the attached RFC patch for 'conndscp'. Conndscp is a new tc filter action module. It is designed to copy DSCPs to conntrack marks and the reverse operation of conntrack mark contained DSCPs to the diffserv field of suitable skbs. The feature is int

hello dear

2019-03-19 Thread Asha Gadafi
Assalamu Alaikum Wa Rahmatullahi Wa Barakatuh, hello dear I came across your contact during my private search. Mrs Aisha Al- Qaddafi is my name, the only daughter of late Libyan president, am a single Mother and a Widow with three Children.I have funds the sum of $27.5 million USD for, investme

[PATCH net-next] net: phy: improve handling link_change_notify callback

2019-03-19 Thread Heiner Kallweit
Currently the Phy driver's link_change_notify callback is called whenever the state machine is run (every second if polling), no matter whether the state changed or not. This isn't needed and may confuse users considering the name of the callback. Actually it contradicts its kernel-doc description.

[PATCH v2 03/13] enc28j60: Replace dev_*(&netdev->dev, ...) with netdev_*()

2019-03-19 Thread Andy Shevchenko
Replace open coded netdev_() macros. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/microchip/enc28j60.c | 42 ++- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/drivers/net/ethernet/microchip/enc28j60.c i

[PATCH v2 13/13] enc28j60: Convert to use SPDX identifier

2019-03-19 Thread Andy Shevchenko
Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/microchip/enc28j60.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/driver

[PATCH v2 09/13] enc28j60: Convert printk() to netdev_printk()

2019-03-19 Thread Andy Shevchenko
The debug prints of network operations will look better if network device name is printed. The benefit of that is a possibility to distinguish the actual hardware when more than one is installed on the system. Convert appropriate printk(KERN_DEBUG) to netdev_print(KERN_DEBUG, ndev). Signed-off-by

[PATCH v2 08/13] enc28j60: Convert HW related printk() to dev_printk()

2019-03-19 Thread Andy Shevchenko
The debug prints of hardware status and operations will look better if SPI device name is printed. The benefit of that is a possibility to distinguish the actual hardware when more than one is installed on the system. Convert appropriate printk(KERN_DEBUG) to dev_print(KERN_DEBUG, &spi->dev). Sig

[PATCH v2 05/13] enc28j60: Switch to use module_spi_driver() macro

2019-03-19 Thread Andy Shevchenko
Eliminate some boilerplate code by using module_spi_driver() instead of ->init() / ->exit(), moving the salient bits from ->init() into ->probe(). Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/microchip/enc28j60.c | 21 ++--- 1 file changed, 2 insertions(+), 19 deletion

  1   2   >