Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH v2 1/7] dt-bindings: net: Fix Broadcom iProc mdio mux driver base address
From: Andrew Lunn @ 2018-07-28 21:09 UTC (permalink / raw)
  To: Arun Parameswaran
  Cc: David S. Miller, Florian Fainelli, Rob Herring, Mark Rutland,
	Ray Jui, Scott Branden, Catalin Marinas, Will Deacon, netdev,
	devicetree, linux-arm-kernel, linux-kernel,
	bcm-kernel-feedback-list
In-Reply-To: <1532726613-6483-2-git-send-email-arun.parameswaran@broadcom.com>

On Fri, Jul 27, 2018 at 02:23:27PM -0700, Arun Parameswaran wrote:
> Modify the base address of the Broadcom iProc MDIO mux driver to
> point to the start of the block's register address space.
> 
> Signed-off-by: Arun Parameswaran <arun.parameswaran@broadcom.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply

* Re: [PATCH v2 2/7] net: phy: Fix the register offsets in Broadcom iProc mdio mux driver
From: Andrew Lunn @ 2018-07-28 21:10 UTC (permalink / raw)
  To: Arun Parameswaran
  Cc: David S. Miller, Florian Fainelli, Rob Herring, Mark Rutland,
	Ray Jui, Scott Branden, Catalin Marinas, Will Deacon, netdev,
	devicetree, linux-arm-kernel, linux-kernel,
	bcm-kernel-feedback-list
In-Reply-To: <1532726613-6483-3-git-send-email-arun.parameswaran@broadcom.com>

On Fri, Jul 27, 2018 at 02:23:28PM -0700, Arun Parameswaran wrote:
> Modify the register offsets in the Broadcom iProc mdio mux to start
> from the top of the register address space.
> 
> Earlier, the base address pointed to the end of the block's register
> space. The base address will now point to the start of the mdio's
> address space. The offsets have been fixed to match this.
> 
> Signed-off-by: Arun Parameswaran <arun.parameswaran@broadcom.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply

* Re: [PATCH v2 3/7] arm64: dts: Fix the base address of the Broadcom iProc mdio mux
From: Andrew Lunn @ 2018-07-28 21:11 UTC (permalink / raw)
  To: Arun Parameswaran
  Cc: David S. Miller, Florian Fainelli, Rob Herring, Mark Rutland,
	Ray Jui, Scott Branden, Catalin Marinas, Will Deacon, netdev,
	devicetree, linux-arm-kernel, linux-kernel,
	bcm-kernel-feedback-list
In-Reply-To: <1532726613-6483-4-git-send-email-arun.parameswaran@broadcom.com>

On Fri, Jul 27, 2018 at 02:23:29PM -0700, Arun Parameswaran wrote:
> Modify the base address of the mdio mux driver to point to the
> start of the mdio mux block's register address space.
> 
> Signed-off-by: Arun Parameswaran <arun.parameswaran@broadcom.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply

* Re: [PATCH v2 4/7] net: phy: Disable external master access in bcm mdio mux driver
From: Andrew Lunn @ 2018-07-28 21:13 UTC (permalink / raw)
  To: Arun Parameswaran
  Cc: David S. Miller, Florian Fainelli, Rob Herring, Mark Rutland,
	Ray Jui, Scott Branden, Catalin Marinas, Will Deacon, netdev,
	devicetree, linux-arm-kernel, linux-kernel,
	bcm-kernel-feedback-list
In-Reply-To: <1532726613-6483-5-git-send-email-arun.parameswaran@broadcom.com>

On Fri, Jul 27, 2018 at 02:23:30PM -0700, Arun Parameswaran wrote:
> Configure the scan control register in the Broadcom iProc
> mdio mux driver to disable access to external master.
> 
> In some SoC's, the scan control register defaults to an incorrect
> value.
> 
> Signed-off-by: Arun Parameswaran <arun.parameswaran@broadcom.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply

* Re: [PATCH v2 5/7] dt-bindings: net: Add clock handle to Broadcom iProc mdio mux
From: Andrew Lunn @ 2018-07-28 21:15 UTC (permalink / raw)
  To: Arun Parameswaran
  Cc: David S. Miller, Florian Fainelli, Rob Herring, Mark Rutland,
	Ray Jui, Scott Branden, Catalin Marinas, Will Deacon, netdev,
	devicetree, linux-arm-kernel, linux-kernel,
	bcm-kernel-feedback-list
In-Reply-To: <1532726613-6483-6-git-send-email-arun.parameswaran@broadcom.com>

On Fri, Jul 27, 2018 at 02:23:31PM -0700, Arun Parameswaran wrote:
> Add clock phandle, of the core clock driving the mdio block, as an
> optional property to the Broadcom iProc mdio mux.
> 
> The clock, when specified, will be used to setup the rate adjust registers
> in the mdio to derrive the mdio's operating frequency.
> 
> Signed-off-by: Arun Parameswaran <arun.parameswaran@broadcom.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply

* Re: [PATCH 00/18] xfrm: Add compat layer
From: David Miller @ 2018-07-28 21:18 UTC (permalink / raw)
  To: dima
  Cc: nharold, fw, steffen.klassert, linux-kernel, herbert, 0x7f454c46,
	netdev, luto, ard.biesheuvel, hpa, mingo, john.stultz,
	kirill.shutemov, oleg, sboyd, rostedt, tglx, x86, linux-efi, akpm,
	gregkh, mchehab+samsung, shuah, linux-kselftest, eparis, kadlec,
	pablo, paul, coreteam, linux-audit, netfilter-devel, fan.du
In-Reply-To: <1532795215.2679.27.camel@arista.com>

From: Dmitry Safonov <dima@arista.com>
Date: Sat, 28 Jul 2018 17:26:55 +0100

> Well, I think, I'll rework my patches set according to critics and
> separate compat xfrm layer. I've already a selftest to check that 32/64
> bit xfrm works - so the most time-taking part is done.

The way you've done the compat structures using __packed is only going
to work on x86, just FYI.

The "32-bit alignment for 64-bit objects" thing x86 has is very much
not universal amongst ABIs having 32-bit and 64-bit variants.

^ permalink raw reply

* Re: [PATCH v2 6/7] net: phy: Add support to configure clock in Broadcom iProc mdio mux
From: Andrew Lunn @ 2018-07-28 21:22 UTC (permalink / raw)
  To: Arun Parameswaran
  Cc: David S. Miller, Florian Fainelli, Rob Herring, Mark Rutland,
	Ray Jui, Scott Branden, Catalin Marinas, Will Deacon, netdev,
	devicetree, linux-arm-kernel, linux-kernel,
	bcm-kernel-feedback-list
In-Reply-To: <1532726613-6483-7-git-send-email-arun.parameswaran@broadcom.com>

> @@ -198,10 +219,22 @@ static int mdio_mux_iproc_probe(struct platform_device *pdev)
>  		return PTR_ERR(md->base);
>  	}
>  
> +	md->core_clk = devm_clk_get(&pdev->dev, NULL);
> +	if (IS_ERR(md->core_clk)) {
> +		md->core_clk = NULL;
> +	} else {
> +		rc = clk_prepare_enable(md->core_clk);
> +		if (rc) {
> +			dev_err(&pdev->dev, "failed to enable core clk\n");
> +			return rc;
> +		}
> +	}
> +
>  	md->mii_bus = mdiobus_alloc();
>  	if (!md->mii_bus) {
>  		dev_err(&pdev->dev, "mdiomux bus alloc failed\n");
> -		return -ENOMEM;
> +		rc = -ENOMEM;
> +		goto out;

Hi Arun

There is a devm_mdiobus_alloc() which could make the cleanup on error
simple.

>  	}
>  
>  	bus = md->mii_bus;
> @@ -217,7 +250,7 @@ static int mdio_mux_iproc_probe(struct platform_device *pdev)
>  	rc = mdiobus_register(bus);
>  	if (rc) {
>  		dev_err(&pdev->dev, "mdiomux registration failed\n");
> -		goto out;
> +		goto out_alloc;
>  	}
>  
>  	platform_set_drvdata(pdev, md);
> @@ -236,8 +269,11 @@ static int mdio_mux_iproc_probe(struct platform_device *pdev)
>  
>  out_register:
>  	mdiobus_unregister(bus);
> -out:
> +out_alloc:
>  	mdiobus_free(bus);
> +out:
> +	if (md->core_clk)
> +		clk_disable_unprepare(md->core_clk);
>  	return rc;
>  }

   Andrew

^ permalink raw reply

* Re: [PATCH v2 7/7] net: phy: Add pm support to Broadcom iProc mdio mux driver
From: Andrew Lunn @ 2018-07-28 21:27 UTC (permalink / raw)
  To: Arun Parameswaran
  Cc: Mark Rutland, devicetree, Florian Fainelli, Scott Branden,
	Ray Jui, Will Deacon, linux-kernel, Rob Herring,
	bcm-kernel-feedback-list, Catalin Marinas, netdev,
	David S. Miller, linux-arm-kernel
In-Reply-To: <1532726613-6483-8-git-send-email-arun.parameswaran@broadcom.com>

On Fri, Jul 27, 2018 at 02:23:33PM -0700, Arun Parameswaran wrote:
> Add support for suspend and resume to the Broadcom iProc mdio
> mux driver.
> 
> Signed-off-by: Arun Parameswaran <arun.parameswaran@broadcom.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply

* Re: [PATCH v2 0/7] Add clock config and pm support to bcm iProc mdio mux
From: Andrew Lunn @ 2018-07-28 21:32 UTC (permalink / raw)
  To: Arun Parameswaran
  Cc: David S. Miller, Florian Fainelli, Rob Herring, Mark Rutland,
	Ray Jui, Scott Branden, Catalin Marinas, Will Deacon, netdev,
	devicetree, linux-arm-kernel, linux-kernel,
	bcm-kernel-feedback-list
In-Reply-To: <1532726613-6483-1-git-send-email-arun.parameswaran@broadcom.com>

On Fri, Jul 27, 2018 at 02:23:26PM -0700, Arun Parameswaran wrote:
> Hi,
> The patchset is based on David Miller's "net-next" repo.
> 
> The patchset extends the Broadcom iProc mdio mux to add support for
> suspend/resume and the ability to configure the internal clock
> divider. The patchset also sets the scan control register to
> disable external master access.

Hi Arun

It would be good to modify the .dtsi files to make use of the new
clock properties.

      Andrew

^ permalink raw reply

* [PATCH iproute2-next] Add tc(8) userspace support for SKB Priority qdisc
From: Nishanth Devarajan @ 2018-07-28 21:03 UTC (permalink / raw)
  To: netdev; +Cc: doucette, michel

sch_skbprio is a qdisc that prioritizes packets according to their skb->priority
field. Under congestion, it drops already-enqueued lower priority packets to
make space available for higher priority packets. Skbprio was conceived as a
solution for denial-of-service defenses that need to route packets with
different priorities as a means to overcome DoS attacks.

Signed-off-by: Nishanth Devarajan <ndev2021@gmail.com>
Reviewed-by: Michel Machado <michel@digirati.com.br>
---
 include/uapi/linux/pkt_sched.h |  7 ++++
 man/man8/tc-skbprio.8          | 70 ++++++++++++++++++++++++++++++++++++
 tc/Makefile                    |  1 +
 tc/q_skbprio.c                 | 81 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 159 insertions(+)
 create mode 100644 man/man8/tc-skbprio.8
 create mode 100644 tc/q_skbprio.c

diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index 37b5096..81af99e 100644
--- a/include/uapi/linux/pkt_sched.h
+++ b/include/uapi/linux/pkt_sched.h
@@ -124,6 +124,12 @@ struct tc_fifo_qopt {
 	__u32	limit;	/* Queue length: bytes for bfifo, packets for pfifo */
 };
 
+/* SKBPRIO section */
+
+struct tc_skbprio_qopt {
+	__u32	limit;		/* Queue length in packets. */
+};
+
 /* PRIO section */
 
 #define TCQ_PRIO_BANDS	16
@@ -256,6 +262,7 @@ struct tc_red_qopt {
 #define TC_RED_ECN		1
 #define TC_RED_HARDDROP		2
 #define TC_RED_ADAPTATIVE	4
+#define TC_RED_OFFLOADED	8
 };
 
 struct tc_red_xstats {
diff --git a/man/man8/tc-skbprio.8 b/man/man8/tc-skbprio.8
new file mode 100644
index 0000000..ae4f9e1
--- /dev/null
+++ b/man/man8/tc-skbprio.8
@@ -0,0 +1,70 @@
+.TH SKBPRIO 8 "27 July 2018" "iproute2" "Linux"
+.SH NAME
+skbprio \- SKB Priority Queue
+
+.SH SYNOPSIS
+.B tc qdisc ... add skbprio
+.B [ limit
+packets
+.B ]
+
+.SH DESCRIPTION
+SKB Priority Queue is a queueing discipline intended to prioritize
+the most important packets during a denial-of-service (
+.B DoS
+) attack. The priority of a packet is given by
+.B skb->priority
+, where a higher value places the packet closer to the exit of the queue. When
+the queue is full, the lowest priority packet in the queue is dropped to make
+room for the packet to be added if it has higher priority. If the packet to be
+added has lower priority than all packets in the queue, it is dropped.
+
+Without SKB priority queue, queue length limits must be imposed
+on individual sub-queues, and there is no straightforward way to enforce
+a global queue length limit across all priorities. SKBprio queue enforces a
+global queue length limit while not restricting the lengths of individual
+sub-queues.
+
+While SKB Priority Queue is agnostic to how
+.B skb->priority
+is assigned. A typical use case is to copy
+the 6-bit DS field of IPv4 and IPv6 packets using
+.BR tc-skbedit (8)
+. If
+.B skb->priority
+is greater or equal to 64, the priority is assumed to be 63.
+Priorities less than 64 are taken at face value.
+
+SKB Priority Queue enables routers to locally decide which
+packets to drop under a DoS attack.
+Priorities should be assigned to packets such that the higher the priority,
+the more expected behavior a source shows.
+So sources have an incentive to play by the rules.
+
+.SH ALGORITHM
+
+Skbprio maintains 64 lists (priorities go from 0 to 63).
+When a packet is enqueued, it gets inserted at the
+.B tail
+of its priority list. When a packet needs to be sent out to the network, it is
+taken from the head of the highest priority list. When the queue is full,
+the packet at the tail of the lowest priority list is dropped to serve the
+ingress packet - if it is of higher priority, otherwise the ingress packet is
+dropped. This algorithm allocates as much bandwidth as possible to high
+priority packets, while only servicing low priority packets when
+there is enough bandwidth.
+
+.SH PARAMETERS
+.TP
+limit
+Maximum queue size specified in packets. It defaults to 64.
+The range for this parameter is [0, UINT32_MAX].
+
+.SH SEE ALSO
+.BR tc-prio (8),
+.BR tc-skbedit (8)
+
+.SH AUTHORS
+Nishanth Devarajan <devarajn@uci.edu>, Michel Machado <michel@digirati.com.br>
+
+This manpage maintained by Bert Hubert <ahu@ds9a.nl>
diff --git a/tc/Makefile b/tc/Makefile
index dfd0026..7646105 100644
--- a/tc/Makefile
+++ b/tc/Makefile
@@ -71,6 +71,7 @@ TCMODULES += q_clsact.o
 TCMODULES += e_bpf.o
 TCMODULES += f_matchall.o
 TCMODULES += q_cbs.o
+TCMODULES += q_skbprio.o
 
 TCSO :=
 ifeq ($(TC_CONFIG_ATM),y)
diff --git a/tc/q_skbprio.c b/tc/q_skbprio.c
new file mode 100644
index 0000000..a2a5077
--- /dev/null
+++ b/tc/q_skbprio.c
@@ -0,0 +1,81 @@
+/*
+ * q_skbprio.c		SKB PRIORITY QUEUE.
+ *
+ *		This program is free software; you can redistribute it and/or
+ *		modify it under the terms of the GNU General Public License
+ *		as published by the Free Software Foundation; either version
+ *		2 of the License, or (at your option) any later version.
+ *
+ * Authors:	Nishanth Devarajan, <ndev2021@gmail.com>
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <syslog.h>
+#include <fcntl.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <string.h>
+
+#include "utils.h"
+#include "tc_util.h"
+
+static void explain(void)
+{
+	fprintf(stderr, "Usage: ... <skbprio> [ limit NUMBER ]\n");
+}
+
+static int skbprio_parse_opt(struct qdisc_util *qu, int argc, char **argv,
+			     struct nlmsghdr *n, const char *dev)
+{
+	int ok = 0;
+	struct tc_skbprio_qopt opt = {};
+
+	while (argc > 0) {
+		if (strcmp(*argv, "limit") == 0) {
+			NEXT_ARG();
+			if (get_size(&opt.limit, *argv)) {
+				fprintf(stderr, "%s: Illegal value for \"limit\": \"%s\"\n", qu->id, *argv);
+				return -1;
+			}
+			ok++;
+		}
+		else if (strcmp(*argv, "help") == 0) {
+			explain();
+			return -1;
+		} else {
+			fprintf(stderr, "%s: unknown parameter \"%s\"\n", qu->id, *argv);
+			explain();
+			return -1;
+		}
+		argc--; argv++;
+	}
+
+	if (ok)
+		addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt));
+	return 0;
+}
+
+static int skbprio_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
+{
+	struct tc_skbprio_qopt *qopt;
+
+	if (opt == NULL)
+		return 0;
+
+	if (RTA_PAYLOAD(opt)  < sizeof(*qopt))
+		return -1;
+	qopt = RTA_DATA(opt);
+	fprintf(f, "limit %u ", qopt->limit);
+	return 0;
+}
+
+
+struct qdisc_util skbprio_qdisc_util = {
+	.id = "skbprio",
+	.parse_qopt = skbprio_parse_opt,
+	.print_qopt = skbprio_print_opt,
+};
-- 
1.9.1

^ permalink raw reply related

* Re: [PATCH net] nfp: flower: fix port metadata conversion bug
From: David Miller @ 2018-07-28 21:28 UTC (permalink / raw)
  To: jakub.kicinski; +Cc: oss-drivers, netdev, john.hurley
In-Reply-To: <20180728035652.22604-1-jakub.kicinski@netronome.com>

From: Jakub Kicinski <jakub.kicinski@netronome.com>
Date: Fri, 27 Jul 2018 20:56:52 -0700

> From: John Hurley <john.hurley@netronome.com>
> 
> Function nfp_flower_repr_get_type_and_port expects an enum nfp_repr_type
> return value but, if the repr type is unknown, returns a value of type
> enum nfp_flower_cmsg_port_type.  This means that if FW encodes the port
> ID in a way the driver does not understand instead of dropping the frame
> driver may attribute it to a physical port (uplink) provided the port
> number is less than physical port count.
> 
> Fix this and ensure a net_device of NULL is returned if the repr can not
> be determined.
> 
> Fixes: 1025351a88a4 ("nfp: add flower app")
> Signed-off-by: John Hurley <john.hurley@netronome.com>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> ---
> This is low impact and unlikely, but also fix is trivial so either
> net or net-next works.

Applied to 'net', thanks.

^ permalink raw reply

* Re: [PATCH] net: lan78xx: fix rx handling before first packet is send
From: David Miller @ 2018-07-28 21:30 UTC (permalink / raw)
  To: stefan.wahren
  Cc: woojung.huh, UNGLinuxDriver, gregkh, dave.stevenson, netdev,
	linux-usb
In-Reply-To: <1532764330-14522-1-git-send-email-stefan.wahren@i2se.com>

From: Stefan Wahren <stefan.wahren@i2se.com>
Date: Sat, 28 Jul 2018 09:52:10 +0200

> As long the bh tasklet isn't scheduled once, no packet from the rx path
> will be handled. Since the tx path also schedule the same tasklet
> this situation only persits until the first packet transmission.
> So fix this issue by scheduling the tasklet after link reset.
> 
> Link: https://github.com/raspberrypi/linux/issues/2617
> Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet")
> Suggested-by: Floris Bos <bos@je-eigen-domein.nl>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* [PATCH net] openvswitch: meter: Fix setting meter id for new entries
From: Justin Pettit @ 2018-07-28 22:26 UTC (permalink / raw)
  To: netdev; +Cc: Andy Zhou

The meter code would create an entry for each new meter.  However, it
would not set the meter id in the new entry, so every meter would appear
to have a meter id of zero.  This commit properly sets the meter id when
adding the entry.

Fixes: 96fbc13d7e77 ("openvswitch: Add meter infrastructure")
Signed-off-by: Justin Pettit <jpettit@ovn.org>
Cc: Andy Zhou <azhou@ovn.org>
---
 net/openvswitch/meter.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c
index b891a91577f8..c038e021a591 100644
--- a/net/openvswitch/meter.c
+++ b/net/openvswitch/meter.c
@@ -211,6 +211,7 @@ static struct dp_meter *dp_meter_create(struct nlattr **a)
 	if (!meter)
 		return ERR_PTR(-ENOMEM);
 
+	meter->id = nla_get_u32(a[OVS_METER_ATTR_ID]);
 	meter->used = div_u64(ktime_get_ns(), 1000 * 1000);
 	meter->kbps = a[OVS_METER_ATTR_KBPS] ? 1 : 0;
 	meter->keep_stats = !a[OVS_METER_ATTR_CLEAR];
@@ -280,6 +281,10 @@ static int ovs_meter_cmd_set(struct sk_buff *skb, struct genl_info *info)
 	u32 meter_id;
 	bool failed;
 
+	if (!a[OVS_METER_ATTR_ID]) {
+		return -ENODEV;
+	}
+
 	meter = dp_meter_create(a);
 	if (IS_ERR_OR_NULL(meter))
 		return PTR_ERR(meter);
@@ -298,11 +303,6 @@ static int ovs_meter_cmd_set(struct sk_buff *skb, struct genl_info *info)
 		goto exit_unlock;
 	}
 
-	if (!a[OVS_METER_ATTR_ID]) {
-		err = -ENODEV;
-		goto exit_unlock;
-	}
-
 	meter_id = nla_get_u32(a[OVS_METER_ATTR_ID]);
 
 	/* Cannot fail after this. */
-- 
2.17.1

^ permalink raw reply related

* Re: [PATCH] net: mdio-mux: bcm-iproc: fix wrong getter and setter pair
From: David Miller @ 2018-07-29  2:08 UTC (permalink / raw)
  To: andrew
  Cc: vasilyev, f.fainelli, rjui, sbranden, jonmason,
	bcm-kernel-feedback-list, netdev, linux-arm-kernel, linux-kernel,
	ldv-project
In-Reply-To: <20180727161707.GP10686@lunn.ch>

From: Andrew Lunn <andrew@lunn.ch>
Date: Fri, 27 Jul 2018 18:17:07 +0200

> On Fri, Jul 27, 2018 at 06:57:47PM +0300, Anton Vasilyev wrote:
>> mdio_mux_iproc_probe() uses platform_set_drvdata() to store md pointer
>> in device, whereas mdio_mux_iproc_remove() restores md pointer by
>> dev_get_platdata(&pdev->dev). This leads to wrong resources release.
>> 
>> The patch replaces getter to platform_get_drvdata.
>> 
>> Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
> 
> Fixes: 98bc865a1ec8 ("net: mdio-mux: Add MDIO mux driver for iProc SoCs")
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [PATCH net] enic: handle mtu change for vf properly
From: David Miller @ 2018-07-29  2:05 UTC (permalink / raw)
  To: gvaradar; +Cc: netdev, benve
In-Reply-To: <20180727181929.7249-1-gvaradar@cisco.com>

From: Govindarajulu Varadarajan <gvaradar@cisco.com>
Date: Fri, 27 Jul 2018 11:19:29 -0700

> When driver gets notification for mtu change, driver does not handle it for
> all RQs. It handles only RQ[0].
> 
> Fix is to use enic_change_mtu() interface to change mtu for vf.
> 
> Signed-off-by: Govindarajulu Varadarajan <gvaradar@cisco.com>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH net] ipv4: remove BUG_ON() from fib_compute_spec_dst
From: David Miller @ 2018-07-29  2:07 UTC (permalink / raw)
  To: lorenzo.bianconi; +Cc: netdev
In-Reply-To: <ecd53925d2d5d5ed19c5e18b8a7998b63be39be0.1532705461.git.lorenzo.bianconi@redhat.com>

From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Date: Fri, 27 Jul 2018 18:15:46 +0200

> Remove BUG_ON() from fib_compute_spec_dst routine and check
> in_dev pointer during flowi4 data structure initialization.
> fib_compute_spec_dst routine can be run concurrently with device removal
> where ip_ptr net_device pointer is set to NULL. This can happen
> if userspace enables pkt info on UDP rx socket and the device
> is removed while traffic is flowing
> 
> Fixes: 35ebf65e851c ("ipv4: Create and use fib_compute_spec_dst() helper")
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

Applied and queued up for -stable, thank you.

^ permalink raw reply

* pull-request: bpf 2018-07-28
From: Daniel Borkmann @ 2018-07-29  2:22 UTC (permalink / raw)
  To: davem; +Cc: daniel, ast, netdev

Hi David,

The following pull-request contains BPF updates for your *net* tree.

The main changes are:

1) API fixes for libbpf's BTF mapping of map key/value types in order
   to make them compatible with iproute2's BPF_ANNOTATE_KV_PAIR()
   markings, from Martin.

2) Fix AF_XDP to not report POLLIN prematurely by using the non-cached
   consumer pointer of the RX queue, from Björn.

3) Fix __xdp_return() to check for NULL pointer after the rhashtable
   lookup that retrieves the allocator object, from Taehee.

4) Fix x86-32 JIT to adjust ebp register in prologue and epilogue
   by 4 bytes which got removed from overall stack usage, from Wang.

5) Fix bpf_skb_load_bytes_relative() length check to use actual
   packet length, from Daniel.

6) Fix uninitialized return code in libbpf bpf_perf_event_read_simple()
   handler, from Thomas.

Please consider pulling these changes from:

  git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git

Thanks a lot!

----------------------------------------------------------------

The following changes since commit 1a4f14bab1868b443f0dd3c55b689a478f82e72e:

  Merge branch 'tcp-robust-ooo' (2018-07-23 12:01:48 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git 

for you to fetch changes up to 71eb5255f55bdb484d35ff7c9a1803f453dfbf82:

  bpf: use GFP_ATOMIC instead of GFP_KERNEL in bpf_parse_prog() (2018-07-28 21:23:24 +0200)

----------------------------------------------------------------
Björn Töpel (1):
      xsk: fix poll/POLLIN premature returns

Daniel Borkmann (2):
      Merge branch 'bpf-annotate-kv-pair'
      bpf: fix bpf_skb_load_bytes_relative pkt length check

Martin KaFai Lau (5):
      bpf: btf: Ensure the member->offset is in the right order
      bpf: btf: Sync uapi btf.h to tools
      bpf: Replace [u]int32_t and [u]int64_t in libbpf
      bpf: Introduce BPF_ANNOTATE_KV_PAIR
      bpf: btf: Use exact btf value_size match in map_check_btf()

Taehee Yoo (2):
      xdp: add NULL pointer check in __xdp_return()
      bpf: use GFP_ATOMIC instead of GFP_KERNEL in bpf_parse_prog()

Thomas Richter (1):
      perf build: Build error in libbpf missing initialization

Wang YanQing (1):
      bpf, x32: Fix regression caused by commit 24dea04767e6

 arch/x86/net/bpf_jit_comp32.c                |   8 +-
 kernel/bpf/arraymap.c                        |   2 +-
 kernel/bpf/btf.c                             |  14 +++-
 net/core/filter.c                            |  12 +--
 net/core/lwt_bpf.c                           |   2 +-
 net/core/xdp.c                               |   3 +-
 net/xdp/xsk_queue.h                          |   2 +-
 tools/include/uapi/linux/btf.h               |   2 +-
 tools/lib/bpf/btf.c                          |  39 +++++----
 tools/lib/bpf/btf.h                          |  10 ++-
 tools/lib/bpf/libbpf.c                       |  87 ++++++++++----------
 tools/lib/bpf/libbpf.h                       |   4 +-
 tools/testing/selftests/bpf/bpf_helpers.h    |   9 +++
 tools/testing/selftests/bpf/test_btf.c       | 114 ++++++++++++++++++++++++++-
 tools/testing/selftests/bpf/test_btf_haskv.c |   7 +-
 15 files changed, 225 insertions(+), 90 deletions(-)

^ permalink raw reply

* Re: [PATCH net-next v4 4/4] act_mirred: use TC_ACT_REINSERT when possible
From: kbuild test robot @ 2018-07-29  2:58 UTC (permalink / raw)
  To: Paolo Abeni
  Cc: kbuild-all, netdev, Jamal Hadi Salim, Cong Wang, Jiri Pirko,
	Daniel Borkmann, Marcelo Ricardo Leitner, Eyal Birger,
	David S. Miller
In-Reply-To: <5d417f3968ffb75b4cd3a44bc8ffca2a6d85f100.1532611319.git.pabeni@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4288 bytes --]

Hi Paolo,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Paolo-Abeni/TC-refactor-act_mirred-packets-re-injection/20180729-102154
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=xtensa 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   net/sched/act_mirred.c: In function 'tcf_mirred':
>> net/sched/act_mirred.c:268:6: warning: 'is_redirect' may be used uninitialized in this function [-Wmaybe-uninitialized]
      if (is_redirect)
         ^

vim +/is_redirect +268 net/sched/act_mirred.c

   182	
   183	static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a,
   184			      struct tcf_result *res)
   185	{
   186		struct tcf_mirred *m = to_mirred(a);
   187		struct sk_buff *skb2 = skb;
   188		bool m_mac_header_xmit;
   189		struct net_device *dev;
   190		int retval, err = 0;
   191		bool use_reinsert;
   192		bool want_ingress;
   193		bool is_redirect;
   194		int m_eaction;
   195		int mac_len;
   196	
   197		tcf_lastuse_update(&m->tcf_tm);
   198		bstats_cpu_update(this_cpu_ptr(m->common.cpu_bstats), skb);
   199	
   200		m_mac_header_xmit = READ_ONCE(m->tcfm_mac_header_xmit);
   201		m_eaction = READ_ONCE(m->tcfm_eaction);
   202		retval = READ_ONCE(m->tcf_action);
   203		dev = rcu_dereference_bh(m->tcfm_dev);
   204		if (unlikely(!dev)) {
   205			pr_notice_once("tc mirred: target device is gone\n");
   206			goto out;
   207		}
   208	
   209		if (unlikely(!(dev->flags & IFF_UP))) {
   210			net_notice_ratelimited("tc mirred to Houston: device %s is down\n",
   211					       dev->name);
   212			goto out;
   213		}
   214	
   215		/* we could easily avoid the clone only if called by ingress and clsact;
   216		 * since we can't easily detect the clsact caller, skip clone only for
   217		 * ingress - that covers the TC S/W datapath.
   218		 */
   219		is_redirect = tcf_mirred_is_act_redirect(m_eaction);
   220		use_reinsert = skb_at_tc_ingress(skb) && is_redirect &&
   221			       tcf_mirred_can_reinsert(retval);
   222		if (!use_reinsert) {
   223			skb2 = skb_clone(skb, GFP_ATOMIC);
   224			if (!skb2)
   225				goto out;
   226		}
   227	
   228		/* If action's target direction differs than filter's direction,
   229		 * and devices expect a mac header on xmit, then mac push/pull is
   230		 * needed.
   231		 */
   232		want_ingress = tcf_mirred_act_wants_ingress(m_eaction);
   233		if (skb_at_tc_ingress(skb) != want_ingress && m_mac_header_xmit) {
   234			if (!skb_at_tc_ingress(skb)) {
   235				/* caught at egress, act ingress: pull mac */
   236				mac_len = skb_network_header(skb) - skb_mac_header(skb);
   237				skb_pull_rcsum(skb2, mac_len);
   238			} else {
   239				/* caught at ingress, act egress: push mac */
   240				skb_push_rcsum(skb2, skb->mac_len);
   241			}
   242		}
   243	
   244		skb2->skb_iif = skb->dev->ifindex;
   245		skb2->dev = dev;
   246	
   247		/* mirror is always swallowed */
   248		if (is_redirect) {
   249			skb2->tc_redirected = 1;
   250			skb2->tc_from_ingress = skb2->tc_at_ingress;
   251	
   252			/* let's the caller reinsert the packet, if possible */
   253			if (use_reinsert) {
   254				res->ingress = want_ingress;
   255				res->qstats = this_cpu_ptr(m->common.cpu_qstats);
   256				return TC_ACT_REINSERT;
   257			}
   258		}
   259	
   260		if (!want_ingress)
   261			err = dev_queue_xmit(skb2);
   262		else
   263			err = netif_receive_skb(skb2);
   264	
   265		if (err) {
   266	out:
   267			qstats_overlimit_inc(this_cpu_ptr(m->common.cpu_qstats));
 > 268			if (is_redirect)
   269				retval = TC_ACT_SHOT;
   270		}
   271	
   272		return retval;
   273	}
   274	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 54195 bytes --]

^ permalink raw reply

* Re: [PATCH net-next v4 3/4] net/tc: introduce TC_ACT_REINSERT.
From: kbuild test robot @ 2018-07-29  3:21 UTC (permalink / raw)
  To: Paolo Abeni
  Cc: kbuild-all, netdev, Jamal Hadi Salim, Cong Wang, Jiri Pirko,
	Daniel Borkmann, Marcelo Ricardo Leitner, Eyal Birger,
	David S. Miller
In-Reply-To: <9f1f9426acce7764e0376a1bcfb44b49f6e15eb3.1532611319.git.pabeni@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3941 bytes --]

Hi Paolo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Paolo-Abeni/TC-refactor-act_mirred-packets-re-injection/20180729-102154
config: i386-randconfig-n0-201829 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   net//core/dev.c: In function 'netif_receive_generic_xdp':
>> net//core/dev.c:4255:28: error: 'struct sk_buff' has no member named 'tc_redirected'
     if (skb_cloned(skb) || skb->tc_redirected)
                               ^~

vim +4255 net//core/dev.c

  4241	
  4242	static u32 netif_receive_generic_xdp(struct sk_buff *skb,
  4243					     struct xdp_buff *xdp,
  4244					     struct bpf_prog *xdp_prog)
  4245	{
  4246		struct netdev_rx_queue *rxqueue;
  4247		void *orig_data, *orig_data_end;
  4248		u32 metalen, act = XDP_DROP;
  4249		int hlen, off;
  4250		u32 mac_len;
  4251	
  4252		/* Reinjected packets coming from act_mirred or similar should
  4253		 * not get XDP generic processing.
  4254		 */
> 4255		if (skb_cloned(skb) || skb->tc_redirected)
  4256			return XDP_PASS;
  4257	
  4258		/* XDP packets must be linear and must have sufficient headroom
  4259		 * of XDP_PACKET_HEADROOM bytes. This is the guarantee that also
  4260		 * native XDP provides, thus we need to do it here as well.
  4261		 */
  4262		if (skb_is_nonlinear(skb) ||
  4263		    skb_headroom(skb) < XDP_PACKET_HEADROOM) {
  4264			int hroom = XDP_PACKET_HEADROOM - skb_headroom(skb);
  4265			int troom = skb->tail + skb->data_len - skb->end;
  4266	
  4267			/* In case we have to go down the path and also linearize,
  4268			 * then lets do the pskb_expand_head() work just once here.
  4269			 */
  4270			if (pskb_expand_head(skb,
  4271					     hroom > 0 ? ALIGN(hroom, NET_SKB_PAD) : 0,
  4272					     troom > 0 ? troom + 128 : 0, GFP_ATOMIC))
  4273				goto do_drop;
  4274			if (skb_linearize(skb))
  4275				goto do_drop;
  4276		}
  4277	
  4278		/* The XDP program wants to see the packet starting at the MAC
  4279		 * header.
  4280		 */
  4281		mac_len = skb->data - skb_mac_header(skb);
  4282		hlen = skb_headlen(skb) + mac_len;
  4283		xdp->data = skb->data - mac_len;
  4284		xdp->data_meta = xdp->data;
  4285		xdp->data_end = xdp->data + hlen;
  4286		xdp->data_hard_start = skb->data - skb_headroom(skb);
  4287		orig_data_end = xdp->data_end;
  4288		orig_data = xdp->data;
  4289	
  4290		rxqueue = netif_get_rxqueue(skb);
  4291		xdp->rxq = &rxqueue->xdp_rxq;
  4292	
  4293		act = bpf_prog_run_xdp(xdp_prog, xdp);
  4294	
  4295		off = xdp->data - orig_data;
  4296		if (off > 0)
  4297			__skb_pull(skb, off);
  4298		else if (off < 0)
  4299			__skb_push(skb, -off);
  4300		skb->mac_header += off;
  4301	
  4302		/* check if bpf_xdp_adjust_tail was used. it can only "shrink"
  4303		 * pckt.
  4304		 */
  4305		off = orig_data_end - xdp->data_end;
  4306		if (off != 0) {
  4307			skb_set_tail_pointer(skb, xdp->data_end - xdp->data);
  4308			skb->len -= off;
  4309	
  4310		}
  4311	
  4312		switch (act) {
  4313		case XDP_REDIRECT:
  4314		case XDP_TX:
  4315			__skb_push(skb, mac_len);
  4316			break;
  4317		case XDP_PASS:
  4318			metalen = xdp->data - xdp->data_meta;
  4319			if (metalen)
  4320				skb_metadata_set(skb, metalen);
  4321			break;
  4322		default:
  4323			bpf_warn_invalid_xdp_action(act);
  4324			/* fall through */
  4325		case XDP_ABORTED:
  4326			trace_xdp_exception(skb->dev, xdp_prog, act);
  4327			/* fall through */
  4328		case XDP_DROP:
  4329		do_drop:
  4330			kfree_skb(skb);
  4331			break;
  4332		}
  4333	
  4334		return act;
  4335	}
  4336	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26257 bytes --]

^ permalink raw reply

* Re: [PATCH net-next v3 0/8] A fix and a few improvements on mvneta
From: David Miller @ 2018-07-29  5:14 UTC (permalink / raw)
  To: gregory.clement
  Cc: andrew, jason, antoine.tenart, netdev, linux-kernel,
	maxime.chevallier, nadavh, yelena, thomas.petazzoni,
	miquel.raynal, mw, dima, linux-arm-kernel, sebastian.hesselbarth
In-Reply-To: <87h8ko7ozf.fsf@bootlin.com>

From: Gregory CLEMENT <gregory.clement@bootlin.com>
Date: Tue, 24 Jul 2018 15:16:52 +0200

> Hi David,
>  
>  On mer., juil. 18 2018, Gregory CLEMENT <gregory.clement@bootlin.com> wrote:
> 
>> Hello,
>>
>> This series brings some improvements for the mvneta driver and also
>> adds a fix.
>>
>> Compared to the v2, the main change is another patch fixing a bug
>> in mtu_change.
>>
> 
> I saw in patchwork, the status was "Accepted" (for example the 1st patch
> [1]). However the series is not in your git branches and usually you
> also answered to the series to inform that you have applied it. So I
> would like to know what is the status of the series.

This series should now really be in net-next.

Sorry about that!

^ permalink raw reply

* Re: pull-request: bpf 2018-07-28
From: David Miller @ 2018-07-29  4:07 UTC (permalink / raw)
  To: daniel; +Cc: ast, netdev
In-Reply-To: <20180729022224.28825-1-daniel@iogearbox.net>

From: Daniel Borkmann <daniel@iogearbox.net>
Date: Sun, 29 Jul 2018 04:22:24 +0200

> The following pull-request contains BPF updates for your *net* tree.
> 
> The main changes are:
> 
> 1) API fixes for libbpf's BTF mapping of map key/value types in order
>    to make them compatible with iproute2's BPF_ANNOTATE_KV_PAIR()
>    markings, from Martin.
> 
> 2) Fix AF_XDP to not report POLLIN prematurely by using the non-cached
>    consumer pointer of the RX queue, from Björn.
> 
> 3) Fix __xdp_return() to check for NULL pointer after the rhashtable
>    lookup that retrieves the allocator object, from Taehee.
> 
> 4) Fix x86-32 JIT to adjust ebp register in prologue and epilogue
>    by 4 bytes which got removed from overall stack usage, from Wang.
> 
> 5) Fix bpf_skb_load_bytes_relative() length check to use actual
>    packet length, from Daniel.
> 
> 6) Fix uninitialized return code in libbpf bpf_perf_event_read_simple()
>    handler, from Thomas.
> 
> Please consider pulling these changes from:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git

Pulled, thanks!

^ permalink raw reply

* Re: [PATCH net-next v4 3/4] net/tc: introduce TC_ACT_REINSERT.
From: kbuild test robot @ 2018-07-29  3:34 UTC (permalink / raw)
  To: Paolo Abeni
  Cc: kbuild-all, netdev, Jamal Hadi Salim, Cong Wang, Jiri Pirko,
	Daniel Borkmann, Marcelo Ricardo Leitner, Eyal Birger,
	David S. Miller
In-Reply-To: <9f1f9426acce7764e0376a1bcfb44b49f6e15eb3.1532611319.git.pabeni@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 5330 bytes --]

Hi Paolo,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Paolo-Abeni/TC-refactor-act_mirred-packets-re-injection/20180729-102154
config: x86_64-randconfig-u0-07291027 (attached as .config)
compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from arch/x86/include/asm/current.h:5:0,
                    from include/linux/sched.h:12,
                    from include/linux/uaccess.h:5,
                    from net/core/dev.c:75:
   net/core/dev.c: In function 'netif_receive_generic_xdp':
   net/core/dev.c:4255:28: error: 'struct sk_buff' has no member named 'tc_redirected'
     if (skb_cloned(skb) || skb->tc_redirected)
                               ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^
>> net/core/dev.c:4255:2: note: in expansion of macro 'if'
     if (skb_cloned(skb) || skb->tc_redirected)
     ^
   net/core/dev.c:4255:28: error: 'struct sk_buff' has no member named 'tc_redirected'
     if (skb_cloned(skb) || skb->tc_redirected)
                               ^
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^
>> net/core/dev.c:4255:2: note: in expansion of macro 'if'
     if (skb_cloned(skb) || skb->tc_redirected)
     ^
   net/core/dev.c:4255:28: error: 'struct sk_buff' has no member named 'tc_redirected'
     if (skb_cloned(skb) || skb->tc_redirected)
                               ^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^
>> net/core/dev.c:4255:2: note: in expansion of macro 'if'
     if (skb_cloned(skb) || skb->tc_redirected)
     ^

vim +/if +4255 net/core/dev.c

  4241	
  4242	static u32 netif_receive_generic_xdp(struct sk_buff *skb,
  4243					     struct xdp_buff *xdp,
  4244					     struct bpf_prog *xdp_prog)
  4245	{
  4246		struct netdev_rx_queue *rxqueue;
  4247		void *orig_data, *orig_data_end;
  4248		u32 metalen, act = XDP_DROP;
  4249		int hlen, off;
  4250		u32 mac_len;
  4251	
  4252		/* Reinjected packets coming from act_mirred or similar should
  4253		 * not get XDP generic processing.
  4254		 */
> 4255		if (skb_cloned(skb) || skb->tc_redirected)
  4256			return XDP_PASS;
  4257	
  4258		/* XDP packets must be linear and must have sufficient headroom
  4259		 * of XDP_PACKET_HEADROOM bytes. This is the guarantee that also
  4260		 * native XDP provides, thus we need to do it here as well.
  4261		 */
  4262		if (skb_is_nonlinear(skb) ||
  4263		    skb_headroom(skb) < XDP_PACKET_HEADROOM) {
  4264			int hroom = XDP_PACKET_HEADROOM - skb_headroom(skb);
  4265			int troom = skb->tail + skb->data_len - skb->end;
  4266	
  4267			/* In case we have to go down the path and also linearize,
  4268			 * then lets do the pskb_expand_head() work just once here.
  4269			 */
  4270			if (pskb_expand_head(skb,
  4271					     hroom > 0 ? ALIGN(hroom, NET_SKB_PAD) : 0,
  4272					     troom > 0 ? troom + 128 : 0, GFP_ATOMIC))
  4273				goto do_drop;
  4274			if (skb_linearize(skb))
  4275				goto do_drop;
  4276		}
  4277	
  4278		/* The XDP program wants to see the packet starting at the MAC
  4279		 * header.
  4280		 */
  4281		mac_len = skb->data - skb_mac_header(skb);
  4282		hlen = skb_headlen(skb) + mac_len;
  4283		xdp->data = skb->data - mac_len;
  4284		xdp->data_meta = xdp->data;
  4285		xdp->data_end = xdp->data + hlen;
  4286		xdp->data_hard_start = skb->data - skb_headroom(skb);
  4287		orig_data_end = xdp->data_end;
  4288		orig_data = xdp->data;
  4289	
  4290		rxqueue = netif_get_rxqueue(skb);
  4291		xdp->rxq = &rxqueue->xdp_rxq;
  4292	
  4293		act = bpf_prog_run_xdp(xdp_prog, xdp);
  4294	
  4295		off = xdp->data - orig_data;
  4296		if (off > 0)
  4297			__skb_pull(skb, off);
  4298		else if (off < 0)
  4299			__skb_push(skb, -off);
  4300		skb->mac_header += off;
  4301	
  4302		/* check if bpf_xdp_adjust_tail was used. it can only "shrink"
  4303		 * pckt.
  4304		 */
  4305		off = orig_data_end - xdp->data_end;
  4306		if (off != 0) {
  4307			skb_set_tail_pointer(skb, xdp->data_end - xdp->data);
  4308			skb->len -= off;
  4309	
  4310		}
  4311	
  4312		switch (act) {
  4313		case XDP_REDIRECT:
  4314		case XDP_TX:
  4315			__skb_push(skb, mac_len);
  4316			break;
  4317		case XDP_PASS:
  4318			metalen = xdp->data - xdp->data_meta;
  4319			if (metalen)
  4320				skb_metadata_set(skb, metalen);
  4321			break;
  4322		default:
  4323			bpf_warn_invalid_xdp_action(act);
  4324			/* fall through */
  4325		case XDP_ABORTED:
  4326			trace_xdp_exception(skb->dev, xdp_prog, act);
  4327			/* fall through */
  4328		case XDP_DROP:
  4329		do_drop:
  4330			kfree_skb(skb);
  4331			break;
  4332		}
  4333	
  4334		return act;
  4335	}
  4336	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34296 bytes --]

^ permalink raw reply

* Re: [PATCH 0/2] net: socket: Fix potential spectre v1 gadgets
From: David Miller @ 2018-07-29  5:45 UTC (permalink / raw)
  To: jcline; +Cc: netdev, linux-kernel, jpoimboe
In-Reply-To: <20180727224302.5503-1-jcline@redhat.com>

From: Jeremy Cline <jcline@redhat.com>
Date: Fri, 27 Jul 2018 22:43:00 +0000

> This fixes a pair of potential spectre v1 gadgets.
> 
> Note that because the speculation window is large, the policy is to stop
> the speculative out-of-bounds load and not worry if the attack can be
> completed with a dependent load or store[0].
> 
> [0] https://marc.info/?l=linux-kernel&m=152449131114778

Series applied, thank you.

^ permalink raw reply

* Re: [PATCH net] tcp_bbr: fix bw probing to raise in-flight data for very small BDPs
From: David Miller @ 2018-07-29  5:46 UTC (permalink / raw)
  To: ncardwell; +Cc: netdev
In-Reply-To: <20180727211912.241232-1-ncardwell@google.com>

From: Neal Cardwell <ncardwell@google.com>
Date: Fri, 27 Jul 2018 17:19:12 -0400

> For some very small BDPs (with just a few packets) there was a
> quantization effect where the target number of packets in flight
> during the super-unity-gain (1.25x) phase of gain cycling was
> implicitly truncated to a number of packets no larger than the normal
> unity-gain (1.0x) phase of gain cycling. This meant that in multi-flow
> scenarios some flows could get stuck with a lower bandwidth, because
> they did not push enough packets inflight to discover that there was
> more bandwidth available. This was really only an issue in multi-flow
> LAN scenarios, where RTTs and BDPs are low enough for this to be an
> issue.
> 
> This fix ensures that gain cycling can raise inflight for small BDPs
> by ensuring that in PROBE_BW mode target inflight values with a
> super-unity gain are always greater than inflight values with a gain
> <= 1. Importantly, this applies whether the inflight value is
> calculated for use as a cwnd value, or as a target inflight value for
> the end of the super-unity phase in bbr_is_next_cycle_phase() (both
> need to be bigger to ensure we can probe with more packets in flight
> reliably).
> 
> This is a candidate fix for stable releases.
> 
> Fixes: 0f8782ea1497 ("tcp_bbr: add BBR congestion control")
> Signed-off-by: Neal Cardwell <ncardwell@google.com>
> Acked-by: Yuchung Cheng <ycheng@google.com>
> Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
> Acked-by: Priyaranjan Jha <priyarjha@google.com>
> Reviewed-by: Eric Dumazet <edumazet@google.com>

Applied and queued up for -stable, thank you.

^ permalink raw reply

* Re: [PATCH net-next v2 0/2] tls: Fix improper revert in zerocopy_from_iter
From: David Miller @ 2018-07-29  5:53 UTC (permalink / raw)
  To: doronrk; +Cc: vakul.garg, davejwatson, mmullins, netdev
In-Reply-To: <20180726145936.3547913-1-doronrk@fb.com>

From: Doron Roberts-Kedes <doronrk@fb.com>
Date: Thu, 26 Jul 2018 07:59:34 -0700

> This series fixes the improper iov_iter_revert introcded in 
> "tls: Fix zerocopy_from_iter iov handling". 
> 
> Changes from v1:
> - call iov_iter_revert inside zerocopy_from_iter

Series applied, thank you.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox