[net-next v3 2/2] bpf: Add eBPF seccomp sample programs

2018-02-25 Thread Sargun Dhillon
This adds a sample program that uses seccomp-eBPF, called seccomp1. It shows the simple ability to code seccomp filters in C. Signed-off-by: Sargun Dhillon --- samples/bpf/Makefile| 5 + samples/bpf/bpf_load.c | 9 ++--

[net-next v3 1/2] bpf, seccomp: Add eBPF filter capabilities

2018-02-25 Thread Sargun Dhillon
This introduces the BPF_PROG_TYPE_SECCOMP bpf program type. It is meant to be used for seccomp filters as an alternative to cBPF filters. The program type has relatively limited capabilities in terms of helpers, but that can be extended later on. The eBPF code loading is separated from attachment

[net-next v3 0/2] eBPF seccomp filters

2018-02-25 Thread Sargun Dhillon
This patchset enables seccomp filters to be written in eBPF. Although, this patchset doesn't introduce much of the functionality enabled by eBPF, it lays the ground work for it. Currently, you have to disable CHECKPOINT_RESTORE support in order to utilize eBPF seccomp filters, as eBPF filters

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-25 Thread Jiri Pirko
Sat, Feb 24, 2018 at 12:59:04AM CET, step...@networkplumber.org wrote: >On Thu, 22 Feb 2018 13:30:12 -0800 >Alexander Duyck wrote: > >> > Again, I undertand your motivation. Yet I don't like your solution. >> > But if the decision is made to do this in-driver bonding. I

Re: [patch net-next] mlxsw: spectrum_switchdev: Allow port enslavement to a VLAN-unaware bridge

2018-02-25 Thread Ido Schimmel
Hi Dave, On Thu, Feb 22, 2018 at 01:58:39PM -0500, David Miller wrote: > I'm waiting for this discussion to be fully resolved before applying this > patch. Just FYI... I have a fix for the issue David reported, but it is not related to this patch (problem manifests itself with VLAN-aware

RE: [PATCH v2 net-next 1/2] lan743x: Add main source files for new lan743x driver

2018-02-25 Thread Bryan.Whitehead
> > Ok, but it seems to me that what I have is an example of "specific > > book keeping private information". Can you clarify the style you prefer? > > > > In cases of allocation where I can just compare a pointer to null, I > > can easily remove the flags. But in other cases I need a record of >

[RFC PATCH V4] pci: virtio_pci: Add SR-IOV support for virtio_pci devices

2018-02-25 Thread Mark Rustad
Hardware-realized virtio_pci devices can implement SR-IOV, so this patch enables its use. The device in question is an upcoming Intel NIC that implements both a virtio_net PF and virtio_net VFs. These are hardware realizations of what has been up to now been a software interface. The device in

Re: [PATCH iproute2 0/3] ss: fix slab statistics

2018-02-25 Thread David Ahern
On 2/24/18 12:16 PM, Stephen Hemminger wrote: > The ss -s command has been broken in several places since the > 2.6.13 kernel. The slab values it is looking for have changed > names and kernel started merging the values (see kernel patch > for fixing that). > > Stephen Hemminger (3): > ss: drop

Re: [PATCH iproute2-next v3] ip: link_gre6.c: Support IP6_TNL_F_ALLOW_LOCAL_REMOTE flag

2018-02-25 Thread David Ahern
On 2/21/18 4:18 AM, Petr Machata wrote: > For IP-in-IP tunnels, one can specify the [no]allow-localremote command > when configuring a device. Under the hood, this flips the > IP6_TNL_F_ALLOW_LOCAL_REMOTE flag on the netdevice. However, ip6gretap > and ip6erspan devices, where the flag is also

[no subject]

2018-02-25 Thread Alfred Chow
Good Day, I am Mr. Alfred Cheuk Yu Chow, the Director for Credit & Marketing Chong Hing Bank, Hong Kong, Chong Hing Bank Centre, 24 Des Voeux Road Central, Hong Kong. I have a business proposal of $38,980,369.00. All confirmable documents to back up the claims will be made available to you

Re: [PATCH net-next 5/5] ipv6: route: dissect flow in input path if fib rules need it

2018-02-25 Thread Roopa Prabhu
On Sun, Feb 25, 2018 at 7:19 PM, David Ahern wrote: > On 2/24/18 10:44 PM, Roopa Prabhu wrote: > >> @@ -1847,12 +1858,27 @@ void ip6_route_input(struct sk_buff *skb) >> .flowi6_mark = skb->mark, >> .flowi6_proto = iph->nexthdr, >> }; >>

Re: [PATCH net-next 0/5] fib_rules: support sport, dport and ip proto match

2018-02-25 Thread Roopa Prabhu
On Sun, Feb 25, 2018 at 7:20 PM, David Ahern wrote: > On 2/24/18 10:44 PM, Roopa Prabhu wrote: >> From: Roopa Prabhu >> >> This series extends fib rule match support to include sport, dport >> and ip proto match (to complete the 5-tuple match

Re: [PATCH net-next 1/5] net: fib_rules: support for match on ip_proto, sport and dport

2018-02-25 Thread Roopa Prabhu
On Sun, Feb 25, 2018 at 7:08 PM, David Ahern wrote: > On 2/24/18 10:44 PM, Roopa Prabhu wrote: >> From: Roopa Prabhu >> >> uapi for ip_proto, sport and dport range match >> in fib rules. >> >> Signed-off-by: Roopa Prabhu

Re: [PATCH iproute2-next v3 8/8] iplink: Reduce number of arguments to iplink_parse()

2018-02-25 Thread David Ahern
On 2/22/18 6:02 AM, Serhey Popovych wrote: > Introduce new @struct iplink_parse_args data structure to consolidate > arguments to iplink_parse(). This will reduce number of arguments > passed to it. > > Pass this data structure to ->parse_opt() in iplink specific modules: > it may be used to get

Re: [PATCH iproute2-next v3 6/8] iplink: Perform most of request buffer setups and checks in iplink_parse()

2018-02-25 Thread David Ahern
On 2/22/18 6:02 AM, Serhey Popovych wrote: > To benefit other users (e.g. link_veth.c) of iplink_parse() from > additional attribute checks and setups made in iplink_modify(). This > catches most of weired cobination of parameters to peer device > configuration. > > Drop @link, @group and @index

Re: [PATCH iproute2-next v3 5/8] veth,vxcan: Save/reinitialize/restore whole @struct ifinfomsg

2018-02-25 Thread David Ahern
On 2/22/18 6:02 AM, Serhey Popovych wrote: > Now in iplink_parse() we use ->ifi_change and ->ifi_flags fields and > plan to use ->ifi_index with upcoming change. > > Saving, restoring and reinitializing individual fields is error prone: > using new field in iplink_parse() without updating callers

Re: [PATCH net-next 0/5] fib_rules: support sport, dport and ip proto match

2018-02-25 Thread David Ahern
On 2/24/18 10:44 PM, Roopa Prabhu wrote: > From: Roopa Prabhu > > This series extends fib rule match support to include sport, dport > and ip proto match (to complete the 5-tuple match support). > Common use-cases of Policy based routing in the data center require >

Re: [PATCH net-next 5/5] ipv6: route: dissect flow in input path if fib rules need it

2018-02-25 Thread David Ahern
On 2/24/18 10:44 PM, Roopa Prabhu wrote: > @@ -1847,12 +1858,27 @@ void ip6_route_input(struct sk_buff *skb) > .flowi6_mark = skb->mark, > .flowi6_proto = iph->nexthdr, > }; > + struct flow_keys *flkeys = NULL, _flkeys; > > tun_info =

[RFC PATCH V3] virtio_pci: Add SR-IOV support

2018-02-25 Thread Mark Rustad
Hardware-realized virtio-pci devices can implement SR-IOV, so this patch enables its use. The device in question is an upcoming Intel NIC that implements both a virtio-net PF and virtio-net VFs. These are hardware realizations of what has been up to now been a software interface. The device in

Re: [PATCH net-next 4/5] ipv4: route: dissect flow in input path if fib rules need it

2018-02-25 Thread David Ahern
On 2/24/18 10:44 PM, Roopa Prabhu wrote: > diff --git a/net/ipv4/route.c b/net/ipv4/route.c > index 26eefa2..72dd6c6 100644 > --- a/net/ipv4/route.c > +++ b/net/ipv4/route.c > @@ -1783,7 +1783,7 @@ static void ip_multipath_l3_keys(const struct sk_buff > *skb, > > /* if skb is set it will be

Re: [RFC PATCH v2] ptr_ring: linked list fallback

2018-02-25 Thread Jason Wang
On 2018年02月26日 09:17, Michael S. Tsirkin wrote: So pointer rings work fine, but they have a problem: make them too small and not enough entries fit. Make them too large and you start flushing your cache and running out of memory. This is a new idea of mine: a ring backed by a linked list.

[PATCH net] r8152: fix tx packets accounting

2018-02-25 Thread Eric Dumazet
From: Eric Dumazet r8152 driver handles TSO packets (limited to ~16KB) quite well, but pretends each TSO logical packet is a single packet on the wire. There is also some error since headers are accounted once, but error rate is small enough that we do not care.

Re: [PATCH net-next 1/5] net: fib_rules: support for match on ip_proto, sport and dport

2018-02-25 Thread David Ahern
On 2/24/18 10:44 PM, Roopa Prabhu wrote: > From: Roopa Prabhu > > uapi for ip_proto, sport and dport range match > in fib rules. > > Signed-off-by: Roopa Prabhu > --- > include/net/fib_rules.h| 31 +- >

Re: [PATCH net] net: phy: Restore phy_resume() locking assumption

2018-02-25 Thread Andrew Lunn
> > +int phy_resume(struct phy_device *phydev) > > +{ > > + int ret; > > + > > + mutex_lock(>lock); > > + ret = phy_resume(phydev); > > phy_resume -> __phy_resume? Ah, where did i put the brown paper bag :-( Thanks Andrew

[RFC PATCH] e1000e: Fix link check race condition.

2018-02-25 Thread Benjamin Poirier
Alex reported the following race condition: /* link goes up... interrupt... schedule watchdog */ \ e1000_watchdog_task \ e1000e_has_link \ hw->mac.ops.check_for_link() === e1000e_check_for_copper_link \ e1000e_phy_has_link_generic(..., )

Re: [PATCH net] net: phy: Restore phy_resume() locking assumption

2018-02-25 Thread Yunsheng Lin
Hi, Andrew On 2018/2/26 7:04, Lunn wrote: > commit f5e64032a799 ("net: phy: fix resume handling") changes the > locking semantics for phy_resume() such that the caller now needs to > hold the phy mutex. Not all call sites were adopted to this new > semantic, resulting in warnings from the added >

[PATCH bpf-next v2] samples/bpf: Add program for CPU state statistics

2018-02-25 Thread Leo Yan
CPU is active when have running tasks on it and CPUFreq governor can select different operating points (OPP) according to different workload; we use 'pstate' to present CPU state which have running tasks with one specific OPP. On the other hand, CPU is idle which only idle task on it, CPUIdle

[RFC PATCH v2] ptr_ring: linked list fallback

2018-02-25 Thread Michael S. Tsirkin
So pointer rings work fine, but they have a problem: make them too small and not enough entries fit. Make them too large and you start flushing your cache and running out of memory. This is a new idea of mine: a ring backed by a linked list. Once you run out of ring entries, instead of a drop

Re: [RFC PATCH] ptr_ring: linked list fallback

2018-02-25 Thread Michael S. Tsirkin
On Fri, Feb 16, 2018 at 04:32:05PM -0500, David Miller wrote: > From: "Michael S. Tsirkin" > Date: Fri, 16 Feb 2018 09:40:54 +0200 > > > So pointer rings work fine, but they have a problem: > > make them too small and not enough entries fit. > > Make them too large and you start

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

2018-02-25 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the bpf-next tree got a conflict in: tools/testing/selftests/bpf/test_verifier.c between commit: ca36960211eb ("bpf: allow xadd only on aligned memory") from the bpf tree and commit: 23d191a82c13 ("bpf: add various jit test cases") from the bpf-next

Re: [Intel-wired-lan] [next-queue PATCH 7/8] igb: Add support for adding offloaded clsflower filters

2018-02-25 Thread kbuild test robot
Hi Vinicius, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on jkirsher-next-queue/dev-queue] [also build test WARNING on v4.16-rc2 next-20180223] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[PATCH V3 net-next 1/3] selftests/net: revert the zerocopy Rx path for PF_RDS

2018-02-25 Thread Sowmini Varadhan
In preparation for optimized reception of zerocopy completion, revert the Rx side changes introduced by Commit dfb8434b0a94 ("selftests/net: add zerocopy support for PF_RDS test case") Signed-off-by: Sowmini Varadhan --- v2: prepare to remove sk_error_queue based

[PATCH V3 net-next 3/3] selftests/net: reap zerocopy completions passed up as ancillary data.

2018-02-25 Thread Sowmini Varadhan
PF_RDS sockets pass up cookies for zerocopy completion as ancillary data. Update msg_zerocopy to reap this information. Signed-off-by: Sowmini Varadhan --- v2: receive zerocopy completion notification as POLLIN v3: drop ncookies arg in do_process_zerocopy_cookies;

[PATCH V3 net-next 2/3] rds: deliver zerocopy completion notification with data

2018-02-25 Thread Sowmini Varadhan
This commit is an optimization over commit 01883eda72bd ("rds: support for zcopy completion notification") for PF_RDS sockets. RDS applications are predominantly request-response transactions, so it is more efficient to reduce the number of system calls and have zerocopy completion notification

[PATCH V3 net-next 0/3] RDS: optimized notification for zerocopy completion

2018-02-25 Thread Sowmini Varadhan
RDS applications use predominantly request-response, transacation based IPC, so that ingress and egress traffic are well-balanced, and it is possible/desirable to reduce system-call overhead by piggybacking the notifications for zerocopy completion response with data. Moreover, it has been

[PATCH net] net: phy: Restore phy_resume() locking assumption

2018-02-25 Thread Andrew Lunn
commit f5e64032a799 ("net: phy: fix resume handling") changes the locking semantics for phy_resume() such that the caller now needs to hold the phy mutex. Not all call sites were adopted to this new semantic, resulting in warnings from the added WARN_ON(!mutex_is_locked(>lock)). Rather than

Re: [Intel-wired-lan] [next-queue PATCH 4/8] igb: Add support for MAC address filters specifying source addresses

2018-02-25 Thread Alexander Duyck
On Fri, Feb 23, 2018 at 5:20 PM, Vinicius Costa Gomes wrote: > Makes it possible to direct packets to queues based on their source > address. Documents the expected usage of the 'flags' parameter. > > Signed-off-by: Vinicius Costa Gomes > --- >

Re: [Intel-wired-lan] [next-queue PATCH 3/8] igb: Enable the hardware traffic class feature bit for igb models

2018-02-25 Thread Alexander Duyck
On Fri, Feb 23, 2018 at 5:20 PM, Vinicius Costa Gomes wrote: > This will allow functionality depending on the hardware being traffic > class aware to work. In particular the tc-flower offloading checks > verifies that this bit is set. > > Signed-off-by: Vinicius Costa

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-25 Thread Alexander Duyck
On Fri, Feb 23, 2018 at 3:59 PM, Stephen Hemminger wrote: > On Thu, 22 Feb 2018 13:30:12 -0800 > Alexander Duyck wrote: > >> > Again, I undertand your motivation. Yet I don't like your solution. >> > But if the decision is made to do this

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-25 Thread Alexander Duyck
On Fri, Feb 23, 2018 at 4:03 PM, Stephen Hemminger wrote: > (pruned to reduce thread) > > On Wed, 21 Feb 2018 16:17:19 -0800 > Alexander Duyck wrote: > >> >>> FWIW two solutions that immediately come to mind is to export "backup" >> >>> as

[PATCH] ip_tunnel: Do not use mark in skb by default

2018-02-25 Thread Thomas Winter
This reverts commit 5c38bd1b82e1f76f9fa96c1e61c9897cabf1ce45. skb->mark contains the mark the encapsulated traffic which can result in incorrect routing decisions being made such as routing loops if the route chosen is via tunnel itself. The correct method should be to use tunnel->fwmark.

Re: [virtio-dev] [RFC PATCH V2] virtio_pci: Add SR-IOV support

2018-02-25 Thread Mark D Rustad
> On Feb 25, 2018, at 7:20 AM, Yan Vugenfirer wrote: > > Small mistake in the commit message. Red Hat (Qumranet) vendor ID is 1af4, > virtio-net device ID is 1041. > Should be: > PF: vendor: 1af4 device: 1041 subvendor: 8086 subdevice: 15fe > VF: vendor: 1af4 device: 1041

Re: [PATCH net] bridge: Fix VLAN reference count problem

2018-02-25 Thread Nikolay Aleksandrov
On 25/02/18 21:59, Ido Schimmel wrote: > When a VLAN is added on a port, a reference is taken on the > corresponding master VLAN entry. If it does not already exist, then it > is created and a reference taken. > > However, in the second case a reference is not really taken when >

[PATCH net] bridge: Fix VLAN reference count problem

2018-02-25 Thread Ido Schimmel
When a VLAN is added on a port, a reference is taken on the corresponding master VLAN entry. If it does not already exist, then it is created and a reference taken. However, in the second case a reference is not really taken when CONFIG_REFCOUNT_FULL is enabled as refcount_inc() is replaced by

Re: [for-next 7/7] IB/mlx5: Implement fragmented completion queue (CQ)

2018-02-25 Thread Santosh Shilimkar
n 2/24/2018 1:40 AM, Majd Dibbiny wrote: On Feb 23, 2018, at 9:13 PM, Saeed Mahameed wrote: On Thu, 2018-02-22 at 16:04 -0800, Santosh Shilimkar wrote: Hi Saeed On 2/21/2018 12:13 PM, Saeed Mahameed wrote: [...] Jason mentioned about this patch to me off-list. We

Re: [PATCH v2] netfilter: use skb_to_full_sk in ip6_route_me_harder

2018-02-25 Thread Pablo Neira Ayuso
On Sun, Feb 25, 2018 at 11:49:07AM -0800, Eric Dumazet wrote: > From: Eric Dumazet > > For some reason, Florian forgot to apply to ip6_route_me_harder > the fix that went in commit 29e09229d9f2 ("netfilter: use > skb_to_full_sk in ip_route_me_harder") Applied this one,

[PATCH RFC net-next 17/20] net/ipv6: introduce fib6_info struct and helpers

2018-02-25 Thread David Ahern
Add fib6_info struct and alloc, destroy, hold and release helpers. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 57 net/ipv6/ip6_fib.c| 60 +++ 2 files changed, 117

[PATCH RFC net-next 05/20] net/ipv6: Move support functions up in route.c

2018-02-25 Thread David Ahern
Code move only. Signed-off-by: David Ahern --- net/ipv6/route.c | 119 +++ 1 file changed, 59 insertions(+), 60 deletions(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 325a3d30fa2e..8f73335c325a 100644 ---

[PATCH RFC net-next 11/20] net/ipv6: Add fib6_null_entry

2018-02-25 Thread David Ahern
ip6_null_entry will stay a dst based return for lookups that fail to match an entry. Add a new fib6_null_entry which constitutes the root node and leafs for fibs. Signed-off-by: David Ahern --- include/net/netns/ipv6.h | 3 ++- net/ipv6/ip6_fib.c | 26

[PATCH v2] netfilter: use skb_to_full_sk in ip6_route_me_harder

2018-02-25 Thread Eric Dumazet
From: Eric Dumazet For some reason, Florian forgot to apply to ip6_route_me_harder the fix that went in commit 29e09229d9f2 ("netfilter: use skb_to_full_sk in ip_route_me_harder") Fixes: ca6fb0651883 ("tcp: attach SYNACK messages to request sockets instead of listener") 

[PATCH RFC net-next 10/20] net/ipv6: move expires into rt6_info

2018-02-25 Thread David Ahern
Add expires to rt6_info for FIB entries, and add fib6 helpers to manage it. Data path use of dst.expires remains. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 26 +- net/ipv6/addrconf.c | 6 +++--- net/ipv6/ip6_fib.c| 8

[PATCH RFC net-next 16/20] net/ipv6: Cleanup exception route handling

2018-02-25 Thread David Ahern
IPv6 FIB will only contain FIB entries with exception routes added to the FIB entry. Remove CACHE and dst checks from fib6 add and delete since they can never happen once the data type changes. Fixup the lookup functions to use a f6i name for fib lookups and retain the current rt name for return

[PATCH RFC net-next 08/20] net/ipv6: Defer initialization of dst to data path

2018-02-25 Thread David Ahern
Defer setting dst input, output and error until fib entry is copied. Signed-off-by: David Ahern --- net/ipv6/route.c | 115 +++ 1 file changed, 74 insertions(+), 41 deletions(-) diff --git a/net/ipv6/route.c

[PATCH RFC net-next 15/20] net/ipv6: Add gfp_flags to route add functions

2018-02-25 Thread David Ahern
Most FIB entries can be added using memory allocated with GFP_KERNEL. Add gfp_flags to ip6_route_add and addrconf_dst_alloc. Code paths that can be reached from the packet path (e.g., ndisc and autoconfig) or atomic notifiers use GFP_ATOMIC; paths from user context (adding addresses and routes)

[PATCH RFC net-next 12/20] net/ipv6: Add rt6_info create function for ip6_pol_route_lookup

2018-02-25 Thread David Ahern
ip6_pol_route_lookup is the lookup function for ip6_route_lookup and rt6_lookup. At the moment it returns either a reference to a FIB entry or a cached exception. To move FIB entries to a separate struct, this lookup function need to convert FIB entries to an rt6_info that is returned to the

[PATCH RFC net-next 18/20] net/ipv6: separate handling of FIB entries from dst based routes

2018-02-25 Thread David Ahern
Signed-off-by: David Ahern --- include/net/ip6_fib.h | 4 +- include/net/ip6_route.h | 3 +- net/ipv6/addrconf.c | 31 ++--- net/ipv6/anycast.c | 7 +- net/ipv6/ip6_fib.c | 50 +-- net/ipv6/ip6_output.c | 3 +- net/ipv6/ndisc.c

[PATCH RFC net-next 03/20] net/ipv6: Pass net to fib6_update_sernum

2018-02-25 Thread David Ahern
Pass net namespace to fib6_update_sernum. Can not be marked const as fib6_new_sernum will change ipv6.fib6_sernum. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 2 +- net/ipv6/ip6_fib.c| 3 +-- net/ipv6/route.c | 10 +- 3 files changed, 7

[PATCH RFC net-next 13/20] net/ipv6: Move dst flags to booleans in fib entries

2018-02-25 Thread David Ahern
Use bool to hold requests for certain dst settings when a FIB entry is converted to a dst. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 5 - net/ipv6/addrconf.c | 4 ++-- net/ipv6/route.c | 29 - 3 files changed, 30

[PATCH RFC net-next 19/20] net/ipv6: Flip FIB entries to fib6_info

2018-02-25 Thread David Ahern
Signed-off-by: David Ahern --- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 64 ++--- include/net/if_inet6.h | 4 +- include/net/ip6_fib.h | 38 +-- include/net/ip6_route.h| 28

[PATCH RFC net-next 14/20] net/ipv6: Create a neigh_lookup for FIB entries

2018-02-25 Thread David Ahern
Refactor dst_neigh_lookup and create a new function that takes the gateway and device. Since rt6_get_dflt_router returns a FIB entry, change ndisc_router_discovery to use the new ip6_neigh_lookup. Signed-off-by: David Ahern --- include/net/ip6_route.h | 5 +

[PATCH RFC net-next 07/20] net/ipv6: Move nexthop data to fib6_nh

2018-02-25 Thread David Ahern
Introduce fib6_nh structure and move nexthop related data from rt6_info and rt6_info.dst to fib6_nh. References to dev, gateway or lwtstate from a FIB lookup perspective are converted to use fib6_nh; datapath references to dst version are left as is. Signed-off-by: David Ahern

[PATCH RFC net-next 20/20] net/ipv6: Remove unused code and variables for rt6_info

2018-02-25 Thread David Ahern
Signed-off-by: David Ahern --- include/net/ip6_fib.h | 58 + net/ipv6/ip6_fib.c | 22 --- net/ipv6/route.c| 27 ++- net/ipv6/xfrm6_policy.c | 2 -- 4 files changed, 3

[PATCH RFC net-next 06/20] net/ipv6: Save route type in rt6_info flags

2018-02-25 Thread David Ahern
Signed-off-by: David Ahern --- include/net/ip6_fib.h | 1 + net/ipv6/addrconf.c | 2 ++ net/ipv6/route.c | 46 -- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h

[PATCH RFC net-next 04/20] net/ipv6: Pass net namespace to route functions

2018-02-25 Thread David Ahern
Pass network namespace reference into route add, delete and get functions. Signed-off-by: David Ahern --- include/net/ip6_route.h | 12 ++- net/ipv6/addrconf.c | 33 -- net/ipv6/anycast.c | 10 + net/ipv6/ndisc.c|

Re: [PATCH] netfilter: use skb_to_full_sk in ip6_route_me_harder

2018-02-25 Thread Eric Dumazet
On Sun, 2018-02-25 at 11:47 -0800, Eric Dumazet wrote: > > > No idea what happened, but it looks like this garbage should not affect >patchwork. > > Tell me if a resend is needed, thanks. Hmm... I will send a V2, sorry for this mess.

[PATCH RFC net-next 09/20] net/ipv6: move metrics from dst to rt6_info

2018-02-25 Thread David Ahern
Similar to IPv4, add fib metrics to the fib struct, which at the moment is rt6_info. Will be moved to fib6_info in a later patch. Copy metrics into dst by reference using refcount. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 13 +-- net/core/dst.c| 1 +

[PATCH RFC net-next 00/20] net/ipv6: Separate data structures for FIB and data path

2018-02-25 Thread David Ahern
IPv6 uses the same data struct for both control plane (FIB entries) and data path (dst entries). This struct has elements needed for both paths adding memory overhead and complexity (taking a dst hold in most places but an additional reference on rt6i_ref in a few). Furthermore, because of the

[PATCH RFC net-next 01/20] net: Move fib_convert_metrics to dst core

2018-02-25 Thread David Ahern
Move logic of fib_convert_metrics into dst_metrics_convert. This allows the code that converts netlink attributes into metrics struct to be re-used in a later patch by IPv6. This is mostly a code move only; it involvesthe following changes to variable names: - fi->fib_net becomes net - fc_mx

[PATCH RFC net-next 02/20] vrf: Move fib6_table into net_vrf

2018-02-25 Thread David Ahern
A later patch removes rt6i_table from rt6_info. Save the ipv6 table for a VRF in net_vrf. fib tables can not be deleted so no reference counting or locking is required. Signed-off-by: David Ahern --- drivers/net/vrf.c | 25 ++--- 1 file changed, 6

Re: [PATCH] netfilter: use skb_to_full_sk in ip6_route_me_harder

2018-02-25 Thread Pablo Neira Ayuso
On Sun, Feb 25, 2018 at 11:43:39AM -0800, Eric Dumazet wrote: > From: Eric Dumazet > > For some reason, Florian forgot to apply to ip6_route_me_harder > the fix that went in commit 29e09229d9f2 ("netfilter: use > skb_to_full_sk in ip_route_me_harder") Applied, thanks Eric.

Re: [PATCH] netfilter: use skb_to_full_sk in ip6_route_me_harder

2018-02-25 Thread Eric Dumazet
On Sun, 2018-02-25 at 11:43 -0800, Eric Dumazet wrote: > From: Eric Dumazet > > For some reason, Florian forgot to apply to ip6_route_me_harder > the fix that went in commit 29e09229d9f2 ("netfilter: use > skb_to_full_sk in ip_route_me_harder") > > Fixes: ca6fb0651883

Re: [PATCH] netfilter: use skb_to_full_sk in ip6_route_me_harder

2018-02-25 Thread Florian Westphal
Eric Dumazet wrote: > From: Eric Dumazet > > For some reason, Florian forgot to apply to ip6_route_me_harder > the fix that went in commit 29e09229d9f2 ("netfilter: use > skb_to_full_sk in ip_route_me_harder") Indeed, sorry about that, thanks for

[PATCH] netfilter: use skb_to_full_sk in ip6_route_me_harder

2018-02-25 Thread Eric Dumazet
From: Eric Dumazet For some reason, Florian forgot to apply to ip6_route_me_harder the fix that went in commit 29e09229d9f2 ("netfilter: use skb_to_full_sk in ip_route_me_harder") Fixes: ca6fb0651883 ("tcp: attach SYNACK messages to request sockets instead of listener") 

Re: [PATCH net-next 0/5] Modernize bitbanged GPIO MDIO

2018-02-25 Thread Andrew Lunn
On Sun, Feb 25, 2018 at 01:51:27PM +0100, Linus Walleij wrote: > This kills off the platform data support from the bitbanged > GPIO-based MDIO driver and moves it over to using GPIO > descriptors exclusively. Hi Linus I like where this ends up. I wounder about the path it takes to get there.

Re: [PATCH nf] netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets

2018-02-25 Thread Pablo Neira Ayuso
On Mon, Feb 19, 2018 at 01:24:15AM +0100, Florian Westphal wrote: > We need to make sure the offsets are not out of range of the > total size. > Also check that they are in ascending order. > > The WARN_ON triggered by syzkaller (it sets panic_on_warn) is > changed to also bail out, no point in

Re: [PATCH nf] netfilter: bridge: ebt_among: add missing match size checks

2018-02-25 Thread Pablo Neira Ayuso
On Mon, Feb 19, 2018 at 03:01:45AM +0100, Florian Westphal wrote: > ebt_among is special, it has a dynamic match size and is exempt > from the central size checks. > > Therefore it must check that the size of the match structure > provided from userspace is sane by making sure em->match_size > is

Re: [PATCH net-next 1/5] net: fib_rules: support for match on ip_proto, sport and dport

2018-02-25 Thread Roopa Prabhu
On Sun, Feb 25, 2018 at 7:04 AM, Nikolay Aleksandrov wrote: > On 25/02/18 07:44, Roopa Prabhu wrote: >> From: Roopa Prabhu >> >> uapi for ip_proto, sport and dport range match >> in fib rules. >> >> Signed-off-by: Roopa Prabhu

Re: [PATCH net-next 5/5] ipv6: route: dissect flow in input path if fib rules need it

2018-02-25 Thread Roopa Prabhu
On Sun, Feb 25, 2018 at 7:10 AM, Nikolay Aleksandrov wrote: > On 25/02/18 07:44, Roopa Prabhu wrote: >> From: Roopa Prabhu >> >> Dissect flow in fwd path if fib rules require it. Controlled by >> a flag to avoid penatly for the common case.

Re: [PATCH V2 net-next 2/3] rds: deliver zerocopy completion notification with data

2018-02-25 Thread Willem de Bruijn
On Sun, Feb 25, 2018 at 11:20 AM, Sowmini Varadhan wrote: > On (02/25/18 10:56), Willem de Bruijn wrote: >> > @@ -91,22 +85,19 @@ static void rds_rm_zerocopy_callback(struct rds_sock >> > *rs, >> > spin_unlock_irqrestore(>lock, flags); >> >

Re: Potential issue with f5e64032a799 "net: phy: fix resume handling"

2018-02-25 Thread Andrew Lunn
On Sun, Feb 25, 2018 at 02:00:43PM +0100, Heiner Kallweit wrote: > Am 03.02.2018 um 21:17 schrieb Andrew Lunn: > > On Sat, Feb 03, 2018 at 05:41:54PM +0100, Heiner Kallweit wrote: > >> This commit forces callers of phy_resume() and phy_suspend() to hold > >> mutex phydev->lock. This was done for

Re: [PATCH 0/2] mark some slabs as visible not mergeable

2018-02-25 Thread Stephen Hemminger
On Sat, 24 Feb 2018 11:04:52 -0800 Stephen Hemminger wrote: > This fixes an old bug in iproute2's ss command because it was > reading slabinfo to get statistics. There isn't a better API > to do this, and one can argue that /proc is a UAPI that must > not change. > >

Re: [PATCH V2 net-next 2/3] rds: deliver zerocopy completion notification with data

2018-02-25 Thread Sowmini Varadhan
On (02/25/18 10:56), Willem de Bruijn wrote: > > @@ -91,22 +85,19 @@ static void rds_rm_zerocopy_callback(struct rds_sock > > *rs, > > spin_unlock_irqrestore(>lock, flags); > > mm_unaccount_pinned_pages(>z_mmp); > >

Re: [PATCH V2 net-next 3/3] selftests/net: reap zerocopy completions passed up as ancillary data.

2018-02-25 Thread Willem de Bruijn
On Fri, Feb 23, 2018 at 5:08 PM, Sowmini Varadhan wrote: > PF_RDS sockets pass up cookies for zerocopy completion as ancillary > data. Update msg_zerocopy to reap this information. > > Signed-off-by: Sowmini Varadhan > --- > v2: receive

Re: [PATCH V2 net-next 2/3] rds: deliver zerocopy completion notification with data

2018-02-25 Thread Willem de Bruijn
On Fri, Feb 23, 2018 at 5:08 PM, Sowmini Varadhan wrote: > This commit is an optimization of the commit 01883eda72bd > ("rds: support for zcopy completion notification") for PF_RDS sockets. > > RDS applications are predominantly request-response transactions, so > it

Re: [PATCH net-next 1/5] net: fib_rules: support for match on ip_proto, sport and dport

2018-02-25 Thread Nikolay Aleksandrov
On 25/02/18 17:04, Nikolay Aleksandrov wrote: > On 25/02/18 07:44, Roopa Prabhu wrote: >> From: Roopa Prabhu >> >> uapi for ip_proto, sport and dport range match >> in fib rules. >> >> Signed-off-by: Roopa Prabhu >> --- [snip] >> struct

Re: [virtio-dev] [RFC PATCH V2] virtio_pci: Add SR-IOV support

2018-02-25 Thread Yan Vugenfirer
> On 22 Feb 2018, at 19:52, Mark Rustad wrote: > > Hardware-realized virtio-pci devices can implement SR-IOV, so this > patch enables its use. The device in question is an upcoming Intel > NIC that implements both a virtio-net PF and virtio-net VFs. These > are

Re: [PATCH net-next 5/5] ipv6: route: dissect flow in input path if fib rules need it

2018-02-25 Thread Nikolay Aleksandrov
On 25/02/18 07:44, Roopa Prabhu wrote: > From: Roopa Prabhu > > Dissect flow in fwd path if fib rules require it. Controlled by > a flag to avoid penatly for the common case. Flag is set when fib > rules with sport, dport and proto match that require flow dissect > are

Re: [PATCH net-next 4/5] ipv4: route: dissect flow in input path if fib rules need it

2018-02-25 Thread Nikolay Aleksandrov
On 25/02/18 07:44, Roopa Prabhu wrote: > From: Roopa Prabhu > > Dissect flow in fwd path if fib rules require it. Controlled by > a flag to avoid penatly for the common case. Flag is set when fib > rules with sport, dport and proto match that require flow dissect > are

Re: [PATCH net-next 1/5] net: fib_rules: support for match on ip_proto, sport and dport

2018-02-25 Thread Nikolay Aleksandrov
On 25/02/18 07:44, Roopa Prabhu wrote: > From: Roopa Prabhu > > uapi for ip_proto, sport and dport range match > in fib rules. > > Signed-off-by: Roopa Prabhu > --- > include/net/fib_rules.h| 31 +- >

Re: [PATCH] DT: net: renesas,ravb: document R8A77980 bindings

2018-02-25 Thread Sergei Shtylyov
On 02/25/2018 11:48 AM, Sergei Shtylyov wrote: Renesas R-Car V3H (R8A77980) SoC has the R-Car gen3 compatible EtherAVB >>> device, so document the SoC specific bindings.>> Signed-off-by: > Sergei Shtylyov >> --->>> The patch > is against

Re: [PATCH net-next] sh_eth: TSU_QTAG0/1 registers the same as TSU_QTAGM0/1

2018-02-25 Thread Sergei Shtylyov
On 02/25/2018 04:14 PM, Geert Uytterhoeven wrote: >> The TSU_QTAG0/1 registers found in the Gigabit Ether controllers actually >> have the same long name as the TSU_QTAGM0/1 registers in the early Ether >> controllers: Qtag Addition/Deletion Set Register (Port 0/1 to 1/0); thus >> there's no

Re: [PATCH net-next] sh_eth: TSU_QTAG0/1 registers the same as TSU_QTAGM0/1

2018-02-25 Thread Geert Uytterhoeven
Hi Sergei, On Sat, Feb 24, 2018 at 6:28 PM, Sergei Shtylyov wrote: > The TSU_QTAG0/1 registers found in the Gigabit Ether controllers actually > have the same long name as the TSU_QTAGM0/1 registers in the early Ether > controllers: Qtag Addition/Deletion

Re: Potential issue with f5e64032a799 "net: phy: fix resume handling"

2018-02-25 Thread Heiner Kallweit
Am 03.02.2018 um 21:17 schrieb Andrew Lunn: > On Sat, Feb 03, 2018 at 05:41:54PM +0100, Heiner Kallweit wrote: >> This commit forces callers of phy_resume() and phy_suspend() to hold >> mutex phydev->lock. This was done for calls to phy_resume() and >> phy_suspend() in phylib, however there are

[PATCH net-next 4/5] net: mdio-gpio: Merge platform data into state

2018-02-25 Thread Linus Walleij
There is no instantiation without DT data, we can now move to a single state container and merge the DT property retrieveal into mdio_gpio_bus_init(). We decomission the phy_mask, phy_ignore_ta_mask and irqs array and the reset() callback that were all just sitting unused and taking up space. If

[PATCH net-next 3/5] net: mdio-gpio: Remove non-DT probe path

2018-02-25 Thread Linus Walleij
This driver can now only be created using the device tree. Remove the platform data probe path and require OF_MDIO in Kconfig. Signed-off-by: Linus Walleij --- drivers/net/phy/Kconfig | 2 +- drivers/net/phy/mdio-gpio.c | 21 ++--- 2 files changed,

[PATCH net-next 2/5] net: mdio-gpio: Allocate state in probe()

2018-02-25 Thread Linus Walleij
Allocate the state container for the driver, struct mdio_gpio_info inside the probe() function instead of in the mdio_gpio_bus_init() function. Create the local struct device *dev variable in probe() and pass that around instead of constantly dereferencing the struct platform_data. Signed-off-by:

[PATCH net-next 5/5] net: mdio-gpio: Move to gpiod API

2018-02-25 Thread Linus Walleij
Move the bitbanged GPIO based MDIO driver over to using the gpiolib GPIO descriptors and transfer the line inversion and optional MDO handling semantics to gpiolib. The driver has been parsing the device tree to handle GPIO semantics on its own, but this is completely unnecessary as the gpiolib

[PATCH net-next 1/5] net: mdio-gpio: Localize platform data

2018-02-25 Thread Linus Walleij
It is late on the day for platforms using platform data to pass information to drivers. As of today, the only thing in the kernel including the file is the MDIO GPIO driver itself. Essentially it is exposing a kernel-internal interface unused by any in-kernel code. Let's decomission this and

[PATCH net-next 0/5] Modernize bitbanged GPIO MDIO

2018-02-25 Thread Linus Walleij
This kills off the platform data support from the bitbanged GPIO-based MDIO driver and moves it over to using GPIO descriptors exclusively. We are certainly not going to merge any more platforms into the kernel using platform data, and nothing is using it at the moment. The only concern would be

Re: [PATCH iproute2-next v3 2/8] iplink: Correctly report error when network device isn't found

2018-02-25 Thread Serhey Popovych
David Ahern wrote: > On 2/22/18 6:02 AM, Serhey Popovych wrote: >> @@ -650,6 +658,9 @@ int iplink_parse(int argc, char **argv, struct >> iplink_req *req, >> bool drv = strcmp(*argv, "xdpdrv") == 0; >> bool offload = strcmp(*argv, "xdpoffload") == 0; >>

  1   2   >