Re: Fw: [Bug 201071] New: Creating a vxlan in state 'up' does not give proper RTM_NEWLINK message

2018-09-11 Thread Roopa Prabhu
On Tue, Sep 11, 2018 at 3:10 PM, Roopa Prabhu wrote: > On Mon, Sep 10, 2018 at 11:55 AM, Stephen Hemminger > wrote: >> >> >> Begin forwarded message: >> >> Date: Mon, 10 Sep 2018 04:04:37 + >> From: bugzilla-dae...@bugzilla.kernel.org >> To: step...@networkplumber.org >> Subject: [Bug

Re: [PATCH net-next 5/5] ebpf: Add sample ebpf program for SOCKET_SG_FILTER

2018-09-11 Thread Alexei Starovoitov
On Tue, Sep 11, 2018 at 09:38:04PM +0200, Tushar Dave wrote: > Add a sample program that shows how socksg program is used and attached > to socket filter. The kernel sample program deals with struct > scatterlist that is passed as bpf context. > > When run in server mode, the sample RDS program

Re: [PATCH net-next 3/5] ebpf: Add sg_filter_run()

2018-09-11 Thread Alexei Starovoitov
On Tue, Sep 11, 2018 at 09:38:02PM +0200, Tushar Dave wrote: > When sg_filter_run() is invoked it runs the attached eBPF > prog of type BPF_PROG_TYPE_SOCKET_SG_FILTER which deals with > struct scatterlist. > > Signed-off-by: Tushar Dave > Acked-by: Sowmini Varadhan > --- >

Re: [PATCH net-next 2/5] eBPF: Add new eBPF prog type BPF_PROG_TYPE_SOCKET_SG_FILTER

2018-09-11 Thread Alexei Starovoitov
On Tue, Sep 11, 2018 at 09:38:01PM +0200, Tushar Dave wrote: > Add new eBPF prog type BPF_PROG_TYPE_SOCKET_SG_FILTER which uses the > existing socket filter infrastructure for bpf program attach and load. > SOCKET_SG_FILTER eBPF program receives struct scatterlist as bpf context > contrast to

Re: [bpf-next, v2 1/3] flow_dissector: implements flow dissector BPF hook

2018-09-11 Thread Alexei Starovoitov
On Fri, Sep 07, 2018 at 05:11:08PM -0700, Petar Penkov wrote: > From: Petar Penkov > > Adds a hook for programs of type BPF_PROG_TYPE_FLOW_DISSECTOR and > attach type BPF_FLOW_DISSECTOR that is executed in the flow dissector > path. The BPF program is per-network namespace. > > Signed-off-by:

Re: [PATCH net-next] virtio_net: ethtool tx napi configuration

2018-09-11 Thread Jason Wang
On 2018年09月11日 09:14, Willem de Bruijn wrote: I cook a fixup, and it looks works in my setup: diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index b320b6b14749..9181c3f2f832 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2204,10 +2204,17 @@ static

[PATCH net] geneve: add ttl inherit support

2018-09-11 Thread Hangbin Liu
Similar with commit 72f6d71e491e6 ("vxlan: add ttl inherit support"), currently ttl == 0 means "use whatever default value" on geneve instead of inherit inner ttl. To respect compatibility with old behavior, let's add a new IFLA_GENEVE_TTL_INHERIT for geneve ttl inherit support. Reported-by:

[PATCHv4 iproute2] bridge/mdb: fix missing new line when show bridge mdb

2018-09-11 Thread Hangbin Liu
The bridge mdb show is broken on current iproute2. e.g. ]# bridge mdb show 34: br0 veth0_br 224.1.1.2 temp 34: br0 veth0_br 224.1.1.1 temp After fix: ]# bridge mdb show 34: br0 veth0_br 224.1.1.2 temp 34: br0 veth0_br 224.1.1.1 temp v2: Use json print lib as Stephen suggested. v3: No

Re: [PATCH] net: dsa: mv88e6xxx: Add MV88E6352 DT compatible

2018-09-11 Thread Andrew Lunn
On Wed, Sep 12, 2018 at 02:04:54AM +0200, Marek Vasut wrote: > On 09/12/2018 01:32 AM, Andrew Lunn wrote: > >> compatible = "marvell,mv88e6352", "marvell,mv88e6085"; > > > > Just "marvell,mv88e6085"; > > > > Please take a look at all the other DT files using the Marvell > > chips. You will only

[PATCH bpf-next 11/11] Documentation: Describe bpf reference tracking

2018-09-11 Thread Joe Stringer
Signed-off-by: Joe Stringer --- Documentation/networking/filter.txt | 64 + 1 file changed, 64 insertions(+) diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt index e6b4ebb2b243..4443ce958862 100644 ---

[PATCH bpf-next 08/11] selftests/bpf: Add tests for reference tracking

2018-09-11 Thread Joe Stringer
reference tracking: leak potential reference reference tracking: leak potential reference on stack reference tracking: leak potential reference on stack 2 reference tracking: zero potential reference reference tracking: copy and zero potential references reference tracking: release reference

[PATCH bpf-next 02/11] bpf: Simplify ptr_min_max_vals adjustment

2018-09-11 Thread Joe Stringer
An upcoming commit will add another two pointer types that need very similar behaviour, so generalise this function now. Signed-off-by: Joe Stringer Acked-by: Alexei Starovoitov --- kernel/bpf/verifier.c | 22 ++---

[PATCH bpf-next 10/11] selftests/bpf: Add C tests for reference tracking

2018-09-11 Thread Joe Stringer
Signed-off-by: Joe Stringer --- tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/test_progs.c | 38 ++ .../selftests/bpf/test_sk_lookup_kern.c | 128 ++ 3 files changed, 167 insertions(+), 1 deletion(-) create mode 100644

[PATCH bpf-next 09/11] libbpf: Support loading individual progs

2018-09-11 Thread Joe Stringer
Allow the individual program load to be invoked. This will help with testing, where a single ELF may contain several sections, some of which denote subprograms that are expected to fail verification, along with some which are expected to pass verification. By allowing programs to be iterated and

[PATCH bpf-next 00/11] Add socket lookup support

2018-09-11 Thread Joe Stringer
This series proposes a new helper for the BPF API which allows BPF programs to perform lookups for sockets in a network namespace. This would allow programs to determine early on in processing whether the stack is expecting to receive the packet, and perform some action (eg drop, forward

[PATCH bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-09-11 Thread Joe Stringer
This patch adds new BPF helper functions, bpf_sk_lookup_tcp() and bpf_sk_lookup_udp() which allows BPF programs to find out if there is a socket listening on this host, and returns a socket pointer which the BPF program can then access to determine, for instance, whether to forward or drop

[PATCH bpf-next 06/11] bpf: Add reference tracking to verifier

2018-09-11 Thread Joe Stringer
Allow helper functions to acquire a reference and return it into a register. Specific pointer types such as the PTR_TO_SOCKET will implicitly represent such a reference. The verifier must ensure that these references are released exactly once in each path through the program. To achieve this,

[PATCH bpf-next 04/11] bpf: Add PTR_TO_SOCKET verifier type

2018-09-11 Thread Joe Stringer
Teach the verifier a little bit about a new type of pointer, a PTR_TO_SOCKET. This pointer type is accessed from BPF through the 'struct bpf_sock' structure. Signed-off-by: Joe Stringer --- include/linux/bpf.h | 17 + include/linux/bpf_verifier.h | 2 + kernel/bpf/verifier.c

[PATCH bpf-next 05/11] bpf: Macrofy stack state copy

2018-09-11 Thread Joe Stringer
An upcoming commit will need very similar copy/realloc boilerplate, so refactor the existing stack copy/realloc functions into macros to simplify it. Signed-off-by: Joe Stringer --- kernel/bpf/verifier.c | 106 -- 1 file changed, 60 insertions(+), 46

[PATCH bpf-next 01/11] bpf: Add iterator for spilled registers

2018-09-11 Thread Joe Stringer
Add this iterator for spilled registers, it concentrates the details of how to get the current frame's spilled registers into a single macro while clarifying the intention of the code which is calling the macro. Signed-off-by: Joe Stringer Acked-by: Alexei Starovoitov ---

[PATCH bpf-next 03/11] bpf: Generalize ptr_or_null regs check

2018-09-11 Thread Joe Stringer
This check will be reused by an upcoming commit for conditional jump checks for sockets. Refactor it a bit to simplify the later commit. Signed-off-by: Joe Stringer Acked-by: Alexei Starovoitov --- kernel/bpf/verifier.c | 43 +-- 1 file changed, 25

Re: [PATCH] net: dsa: mv88e6xxx: Add MV88E6352 DT compatible

2018-09-11 Thread Marek Vasut
On 09/12/2018 01:32 AM, Andrew Lunn wrote: >> compatible = "marvell,mv88e6352", "marvell,mv88e6085"; > > Just "marvell,mv88e6085"; > > Please take a look at all the other DT files using the Marvell > chips. You will only ever find "marvell,mv88e6085" or > "marvell,mv88e6190", because everything

[PATCH v3 net-next 12/12] net: ethernet: Add helper to determine if pause configuration is supported

2018-09-11 Thread Andrew Lunn
Rather than have MAC drivers open code the test, add a helper in phylib. This will help when we change the type of phydev->supported. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli --- .../ethernet/apm/xgene/xgene_enet_ethtool.c | 4 +--- drivers/net/ethernet/broadcom/tg3.c

[PATCH v3 net-next 11/12] net: ethernet: Add helper for set_pauseparam for Pause

2018-09-11 Thread Andrew Lunn
ethtool can be used to enable/disable pause. Add a helper to configure the PHY when Pause is supported. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli --- v3: Fix kerndoc, missing parameter. v2: Rename phy_set_pause() to phy_set_sym_pause() Use the bcm63xx_enet.c logic, not

[PATCH v3 net-next 10/12] net: ethernet: Add helper for set_pauseparam for Asym Pause

2018-09-11 Thread Andrew Lunn
ethtool can be used to enable/disable pause. Add a helper to configure the PHY when asym pause is supported. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli --- v3: Fix return from phy_set_asym_pause found by 0-day. v2: Also trigger autoneg if the advertising settings have changed. ---

[PATCH v3 net-next 02/12] net: phy: et1011c: Remove incorrect missing 1000 Half

2018-09-11 Thread Andrew Lunn
The driver indicates it can do 10/100 full and half duplex, plus 1G Full. The datasheet indicates 1G half is also supported. So make use of the standard PHY_GBIT_FEATURES. It could be, this was added because there is a MAC which does not support 1G half. Bit this is the wrong place to enforce

[PATCH v3 net-next 08/12] net: ethernet: Add helper for MACs which support asym pause

2018-09-11 Thread Andrew Lunn
Rather than have the MAC drivers manipulate phydev members to indicate they support Asym Pause, add a helper function. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli --- v2: Fixup bad indentation in tg3.c --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 4 ++--

[PATCH v3 net-next 09/12] net: ethernet: Add helper for MACs which support pause

2018-09-11 Thread Andrew Lunn
Rather than have the MAC drivers manipulate phydev members, add a helper function for MACs supporting Pause, but not Asym Pause. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli --- v2: rename phy_support_pause() to phy_support_sym_pause() ---

[PATCH v3 net-next 07/12] net: ethernet: Add helper to remove a supported link mode

2018-09-11 Thread Andrew Lunn
Some MAC hardware cannot support a subset of link modes. e.g. often 1Gbps Full duplex is supported, but Half duplex is not. Add a helper to remove such a link mode. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 6 +++---

[PATCH v3 net-next 05/12] net: bcmgenet: Fix speed selection for reverse MII

2018-09-11 Thread Andrew Lunn
The phy supported speed is being used to determine if the MAC should be configured to 100 or 1G. The masking logic is broken. Instead, look at 1G supported speeds to enable 1G MAC support. Signed-off-by: Andrew Lunn Acked-by: Florian Fainelli --- v3: Add missing at in commit message Change

[PATCH v3 net-next 03/12] net: phy: bcm63xx: Allow to be built with COMPILE_TEST

2018-09-11 Thread Andrew Lunn
There is nothing in this driver which prevents it to be compiled for other architectures. Add COMPILE_TEST so we get better compile test coverage. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/phy/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v3 net-next 04/12] net: ethernet: Use phy_set_max_speed() to limit advertised speed

2018-09-11 Thread Andrew Lunn
Many Ethernet MAC drivers want to limit the PHY to only advertise a maximum speed of 100Mbs or 1Gbps. Rather than using a mask, make use of the helper function phy_set_max_speed(). Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/ethernet/8390/ax88796.c |

[PATCH v3 net-next 00/12] Preparing for phylib limkmodes

2018-09-11 Thread Andrew Lunn
phylib currently makes us of a u32 bitmap for advertising, supported, and link partner capabilities. For a long time, this has been sufficient, for devices up to 1Gbps. With more MAC/PHY combinations now supporting speeds greater than 1Gbps, we have run out of bits. There is the need to replace

[PATCH v3 net-next 06/12] net: ethernet: Fix up drivers masking pause support

2018-09-11 Thread Andrew Lunn
PHY drivers don't indicate they support pause. They expect MAC drivers to enable its support if the MAC has the needed hardware. Thus MAC drivers should not mask Pause support, but enable it. Change a few ANDs to ORs. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli ---

[PATCH v3 net-next 01/12] net: phy: ste10Xp: Remove wrong SUPPORTED_Pause

2018-09-11 Thread Andrew Lunn
The PHY driver should not indicate that Pause is supported. It is upto the MAC drive enable it, if it supports Pause frames. So remove it from the ste10Xp driver. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli --- v2: The datasheet indicates the PHY can negotiated pause, confirming

Re: [PATCH] net: dsa: mv88e6xxx: Add MV88E6352 DT compatible

2018-09-11 Thread Brandon Streiff
On 9/11/2018 6:32 PM, Andrew Lunn wrote: > Please take a look at all the other DT files using the Marvell > chips. You will only ever find "marvell,mv88e6085" or > "marvell,mv88e6190", because everything is compatible to one of these > two. To extend what Andrew stated above,

Re: [PATCH] net: dsa: mv88e6xxx: Add MV88E6352 DT compatible

2018-09-11 Thread Andrew Lunn
> compatible = "marvell,mv88e6352", "marvell,mv88e6085"; Just "marvell,mv88e6085"; Please take a look at all the other DT files using the Marvell chips. You will only ever find "marvell,mv88e6085" or "marvell,mv88e6190", because everything is compatible to one of these two. Andrew

Re: [PATCH] net: dsa: mv88e6xxx: Add MV88E6352 DT compatible

2018-09-11 Thread Marek Vasut
On 09/12/2018 01:12 AM, Andrew Lunn wrote: > On Wed, Sep 12, 2018 at 12:15:36AM +0200, Marek Vasut wrote: >> Add DT compatible string for MV88E6352 switch. >> >> Signed-off-by: Marek Vasut >> Cc: Andrew Lunn >> --- >> drivers/net/dsa/mv88e6xxx/chip.c | 4 >> 1 file changed, 4 insertions(+)

Re: [PATCH] net: dsa: mv88e6xxx: Make sure to configure ports with external PHYs

2018-09-11 Thread Marek Vasut
On 09/12/2018 01:14 AM, Andrew Lunn wrote: > On Wed, Sep 12, 2018 at 12:15:24AM +0200, Marek Vasut wrote: >> The MV88E6xxx can have external PHYs attached to certain ports and those >> PHYs could even be on different MDIO bus than the one within the switch. >> This patch makes sure that ports with

Re: [PATCH] net: dsa: mv88e6xxx: Make sure to configure ports with external PHYs

2018-09-11 Thread Andrew Lunn
On Wed, Sep 12, 2018 at 12:15:24AM +0200, Marek Vasut wrote: > The MV88E6xxx can have external PHYs attached to certain ports and those > PHYs could even be on different MDIO bus than the one within the switch. > This patch makes sure that ports with such PHYs are configured correctly > according

Re: [PATCH] net: dsa: mv88e6xxx: Add MV88E6352 DT compatible

2018-09-11 Thread Andrew Lunn
On Wed, Sep 12, 2018 at 12:15:36AM +0200, Marek Vasut wrote: > Add DT compatible string for MV88E6352 switch. > > Signed-off-by: Marek Vasut > Cc: Andrew Lunn > --- > drivers/net/dsa/mv88e6xxx/chip.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/dsa/mv88e6xxx/chip.c

Re: [PATCH] net: dsa: mv88e6xxx: Make sure to configure ports with external PHYs

2018-09-11 Thread Andrew Lunn
On Wed, Sep 12, 2018 at 12:15:24AM +0200, Marek Vasut wrote: > The MV88E6xxx can have external PHYs attached to certain ports and those > PHYs could even be on different MDIO bus than the one within the switch. > This patch makes sure that ports with such PHYs are configured correctly > according

[PATCH net] Revert "rtnetlink: add rtnl_link_state check in rtnl_configure_link"

2018-09-11 Thread mcbirnie . l
From: Liam McBirnie This reverts commit 8d356b89f36d234a56434a110ae779e8ac389ca2. This commit was intended to remove duplicate RTM_NEWLINK notifications by only sending the notification if the link hadn't been initialized. However, if a vxlan is created and set up with the same message, then no

[PATCH iproute2] q_cake: Add printing of no-split-gso option

2018-09-11 Thread Toke Høiland-Jørgensen
When the GSO splitting was turned into dual split-gso/no-split-gso options, the printing of the latter was left out. Add that, so output is consistent with the options passed. Signed-off-by: Toke Høiland-Jørgensen --- tc/q_cake.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tc/q_cake.c

[PATCH] net: dsa: mv88e6xxx: Add MV88E6352 DT compatible

2018-09-11 Thread Marek Vasut
Add DT compatible string for MV88E6352 switch. Signed-off-by: Marek Vasut Cc: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index e07838430d16..15427380e32e 100644 ---

[PATCH] net: dsa: mv88e6xxx: Make sure to configure ports with external PHYs

2018-09-11 Thread Marek Vasut
The MV88E6xxx can have external PHYs attached to certain ports and those PHYs could even be on different MDIO bus than the one within the switch. This patch makes sure that ports with such PHYs are configured correctly according to the information provided by the PHY. Signed-off-by: Marek Vasut

Re: Fw: [Bug 201071] New: Creating a vxlan in state 'up' does not give proper RTM_NEWLINK message

2018-09-11 Thread Roopa Prabhu
On Mon, Sep 10, 2018 at 11:55 AM, Stephen Hemminger wrote: > > > Begin forwarded message: > > Date: Mon, 10 Sep 2018 04:04:37 + > From: bugzilla-dae...@bugzilla.kernel.org > To: step...@networkplumber.org > Subject: [Bug 201071] New: Creating a vxlan in state 'up' does not give > proper

Re: [PATCH v2 net] MIPS: lantiq: dma: add dev pointer

2018-09-11 Thread Hauke Mehrtens
On 09/10/2018 02:45 PM, Andrew Lunn wrote: > On Sun, Sep 09, 2018 at 09:26:23PM +0200, Hauke Mehrtens wrote: >> dma_zalloc_coherent() now crashes if no dev pointer is given. >> Add a dev pointer to the ltq_dma_channel structure and fill it in the >> driver using it. >> >> This fixes a bug

Re: [PATCH v3 net-next 3/6] dt-bindings: net: Add lantiq,xrx200-net DT bindings

2018-09-11 Thread Hauke Mehrtens
On 09/10/2018 02:53 PM, Andrew Lunn wrote: > On Sun, Sep 09, 2018 at 10:16:44PM +0200, Hauke Mehrtens wrote: >> This adds the binding for the PMAC core between the CPU and the GSWIP >> switch found on the xrx200 / VR9 Lantiq / Intel SoC. >> >> Signed-off-by: Hauke Mehrtens >> Cc:

Re: [PATCH bpf-next] tools/bpf: fix a netlink recv issue

2018-09-11 Thread Alexei Starovoitov
On Tue, Sep 11, 2018 at 02:09:11PM -0700, Yonghong Song wrote: > Commit f7010770fbac ("tools/bpf: move bpf/lib netlink related > functions into a new file") introduced a while loop for the > netlink recv path. This while loop is needed since the > buffer in recv syscall may not be enough to hold

[Patch net] net_sched: notify filter deletion when deleting a chain

2018-09-11 Thread Cong Wang
When we delete a chain of filters, we need to notify user-space we are deleting each filters in this chain too. Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi") Cc: Jiri Pirko Signed-off-by: Cong Wang --- net/sched/cls_api.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCH bpf-next 0/2] bpf: add bpffs/bpftool dump for prog_array and map_in_map maps

2018-09-11 Thread Alexei Starovoitov
On Thu, Sep 06, 2018 at 05:26:03PM -0700, Yonghong Song wrote: > The support to dump program array and map_in_map maps > for bpffs and bpftool is added. Patch #1 added bpffs support > and Patch #2 added bpftool support. Please see > individual patches for example output. Applied, Thanks

[PATCH bpf-next] tools/bpf: fix a netlink recv issue

2018-09-11 Thread Yonghong Song
Commit f7010770fbac ("tools/bpf: move bpf/lib netlink related functions into a new file") introduced a while loop for the netlink recv path. This while loop is needed since the buffer in recv syscall may not be enough to hold all the information and in such cases multiple recv calls are needed.

Re: [PATCH net-next 4/5] rds: invoke socket sg filter attached to rds socket

2018-09-11 Thread santosh.shilim...@oracle.com
On 9/11/18 12:38 PM, Tushar Dave wrote: RDS module sits on top of TCP (rds_tcp) and IB (rds_rdma), so messages arrive in form of skb (over TCP) and scatterlist (over IB/RDMA). However, because socket filter only deal with skb (e.g. struct skb as bpf context) we can only use socket filter for

Re: [PATCH v2 net-next 11/12] net: ethernet: Add helper for set_pauseparam for Pause

2018-09-11 Thread kbuild test robot
Hi Andrew, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Andrew-Lunn/Preparing-for-phylib-limkmodes/20180911-204149 reproduce: make htmldocs All warnings (new ones prefixed by >>): d

Re: [PATCH v3 net-next 5/6] dt-bindings: net: dsa: Add lantiq,xrx200-gswip DT bindings

2018-09-11 Thread Hauke Mehrtens
On 09/11/2018 12:01 AM, Rob Herring wrote: > On Sun, Sep 09, 2018 at 10:20:27PM +0200, Hauke Mehrtens wrote: >> This adds the binding for the GSWIP (Gigabit switch) core found in the >> xrx200 / VR9 Lantiq / Intel SoC. >> >> This part takes care of the switch, MDIO bus, and loading the FW into >>

[PATCH net-next 2/5] eBPF: Add new eBPF prog type BPF_PROG_TYPE_SOCKET_SG_FILTER

2018-09-11 Thread Tushar Dave
Add new eBPF prog type BPF_PROG_TYPE_SOCKET_SG_FILTER which uses the existing socket filter infrastructure for bpf program attach and load. SOCKET_SG_FILTER eBPF program receives struct scatterlist as bpf context contrast to SOCKET_FILTER which deals with struct skb. This is useful for kernel

[PATCH net-next 0/5] eBPF and struct scatterlist

2018-09-11 Thread Tushar Dave
This non-RFC patch-set is follow-up on the RFC v3 that was sent earlier. (https://www.spinics.net/lists/netdev/msg519380.html) In this patch-set following changes are made, RFC v3 -> this patch-set: - "RFC v3 patch 3" is removed as it is no longer needed because bpf_msg_pull_data() has all

[PATCH net-next 1/5] bpf: use __GFP_COMP while allocating page

2018-09-11 Thread Tushar Dave
Helper bpg_msg_pull_data() can allocate multiple pages while linearizing multiple scatterlist elements into one shared page. However, if the shared page has size > PAGE_SIZE, using copy_page_to_iter() causes below warning. e.g. [ 6367.019832] WARNING: CPU: 2 PID: 7410 at lib/iov_iter.c:825

[PATCH net-next 5/5] ebpf: Add sample ebpf program for SOCKET_SG_FILTER

2018-09-11 Thread Tushar Dave
Add a sample program that shows how socksg program is used and attached to socket filter. The kernel sample program deals with struct scatterlist that is passed as bpf context. When run in server mode, the sample RDS program opens PF_RDS socket, attaches eBPF program to RDS socket which then uses

[PATCH net-next 3/5] ebpf: Add sg_filter_run()

2018-09-11 Thread Tushar Dave
When sg_filter_run() is invoked it runs the attached eBPF prog of type BPF_PROG_TYPE_SOCKET_SG_FILTER which deals with struct scatterlist. Signed-off-by: Tushar Dave Acked-by: Sowmini Varadhan --- include/linux/filter.h | 8 include/uapi/linux/bpf.h | 6 ++

[PATCH net-next 4/5] rds: invoke socket sg filter attached to rds socket

2018-09-11 Thread Tushar Dave
RDS module sits on top of TCP (rds_tcp) and IB (rds_rdma), so messages arrive in form of skb (over TCP) and scatterlist (over IB/RDMA). However, because socket filter only deal with skb (e.g. struct skb as bpf context) we can only use socket filter for rds_tcp and not for rds_rdma. Considering

Re: [RFC] managing PHY carrier from user space

2018-09-11 Thread Joakim Tjernlund
On Tue, 2018-09-11 at 09:56 -0700, Florian Fainelli wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > On 09/11/2018 09:41 AM, Joakim Tjernlund wrote: > > I am

Re: kernels > v4.12 oops/crash with ipsec-traffic: bisected to b838d5e1c5b6e57b10ec8af2268824041e3ea911: ipv4: mark DST_NOGC and remove the operation of dst_free()

2018-09-11 Thread Tobias Hommel
> > Subject: [PATCH RFC] xfrm: Fix NULL pointer dereference when skb_dst_force > > clears the dst_entry. > > > > Since commit 222d7dbd258d ("net: prevent dst uses after free") > > skb_dst_force() might clear the dst_entry attached to the skb. > > The xfrm code don't expect this to happen, so we

Re: tools/bpf regression causing samples/bpf/ to hang

2018-09-11 Thread Björn Töpel
Den tis 11 sep. 2018 kl 20:21 skrev Yonghong Song : > > > > On 9/11/18 10:15 AM, Björn Töpel wrote: > > Den tis 11 sep. 2018 kl 18:47 skrev Yonghong Song : > >> > >> > >> > >> On 9/11/18 4:11 AM, Björn Töpel wrote: > >>> Hi Yonghong, I tried to run the XDP samples from the bpf-next tip > >>>

[Patch net-next] llc: avoid blocking in llc_sap_close()

2018-09-11 Thread Cong Wang
llc_sap_close() is called by llc_sap_put() which could be called in BH context in llc_rcv(). We can't block in BH. There is no reason to block it here, kfree_rcu() should be sufficient. Signed-off-by: Cong Wang --- include/net/llc.h | 1 + net/llc/llc_core.c | 4 +--- 2 files changed, 2

Re: [PATCH v2 net-next 0/4] net: batched receive in GRO path

2018-09-11 Thread Edward Cree
On 07/09/18 03:32, Eric Dumazet wrote: > Adding this complexity and icache pressure needs more experimental results. > What about RPC workloads (eg 100 concurrent netperf -t TCP_RR -- -r > 8000,8000 ) > > Thanks. Some more results.  Note that the TCP_STREAM figures given in the cover  letter

Re: tools/bpf regression causing samples/bpf/ to hang

2018-09-11 Thread Yonghong Song
On 9/11/18 10:15 AM, Björn Töpel wrote: Den tis 11 sep. 2018 kl 18:47 skrev Yonghong Song : On 9/11/18 4:11 AM, Björn Töpel wrote: Hi Yonghong, I tried to run the XDP samples from the bpf-next tip today, and was hit by a regression. Commit f7010770fbac ("tools/bpf: move bpf/lib netlink

Re: bpf: btf: Change how section is supported in btf_header

2018-09-11 Thread Martin KaFai Lau
On Tue, Sep 11, 2018 at 06:40:05PM +0200, Dmitry Vyukov wrote: > Hi Martin, > > I am looking at the subj commit: > > static int btf_add_type(struct btf_verifier_env *env, struct btf_type *t) > @@ -1754,9 +1756,9 @@ static int btf_check_all_metas(struct > btf_verifier_env *env) > struct

Re: tools/bpf regression causing samples/bpf/ to hang

2018-09-11 Thread Björn Töpel
Den tis 11 sep. 2018 kl 18:47 skrev Yonghong Song : > > > > On 9/11/18 4:11 AM, Björn Töpel wrote: > > Hi Yonghong, I tried to run the XDP samples from the bpf-next tip > > today, and was hit by a regression. > > > > Commit f7010770fbac ("tools/bpf: move bpf/lib netlink related > > functions into

Re: [RFC] managing PHY carrier from user space

2018-09-11 Thread Florian Fainelli
On 09/11/2018 09:41 AM, Joakim Tjernlund wrote: > I am looking for a way to induce carrier state from user space, primarily > for Fixed PHYs as these are always up. ifplugd/dhcp etc. does not behave > properly > if the link is up when it really isn't. Was my suggestion in my email to you somehow

Re: kernels > v4.12 oops/crash with ipsec-traffic: bisected to b838d5e1c5b6e57b10ec8af2268824041e3ea911: ipv4: mark DST_NOGC and remove the operation of dst_free()

2018-09-11 Thread Wolfgang Walter
Am Dienstag, 11. September 2018, 12:33:34 schrieb Steffen Klassert: > On Mon, Sep 10, 2018 at 10:18:47AM +0200, Kristian Evensen wrote: > > Hi, > > > > Thanks everyone for all the effort in debugging this issue. > > > > On Mon, Sep 10, 2018 at 8:39 AM Steffen Klassert > > > > wrote: > > > The

Re: tools/bpf regression causing samples/bpf/ to hang

2018-09-11 Thread Yonghong Song
On 9/11/18 4:11 AM, Björn Töpel wrote: Hi Yonghong, I tried to run the XDP samples from the bpf-next tip today, and was hit by a regression. Commit f7010770fbac ("tools/bpf: move bpf/lib netlink related functions into a new file") adds a while(1) around the recv call in bpf_set_link_xdp_fd

Re: [PATCH v2 net-next 05/12] net: ethernet: genet: Fix speed selection

2018-09-11 Thread Florian Fainelli
On 09/10/2018 02:52 PM, Andrew Lunn wrote: > The phy supported speed is being used to determine if the MAC should > be configured to 100 or 1G. The masking logic is broken. Instead, look > 1G supported speeds to enable 1G MAC support. Since you likely need to respin to address the kbuild test

[RFC] managing PHY carrier from user space

2018-09-11 Thread Joakim Tjernlund
I am looking for a way to induce carrier state from user space, primarily for Fixed PHYs as these are always up. ifplugd/dhcp etc. does not behave properly if the link is up when it really isn't. I came up with a new 'phy_carrier' attribute in /sys/class/net/eth0/phydev where I can induce

Re: bpf: btf: Change how section is supported in btf_header

2018-09-11 Thread Dmitry Vyukov
Hi Martin, I am looking at the subj commit: static int btf_add_type(struct btf_verifier_env *env, struct btf_type *t) @@ -1754,9 +1756,9 @@ static int btf_check_all_metas(struct btf_verifier_env *env) struct btf_header *hdr; void *cur, *end; - hdr = btf->hdr; + hdr

Re: unexpected GRO/veth behavior

2018-09-11 Thread Eric Dumazet
On 09/11/2018 04:44 AM, Paolo Abeni wrote: > On Tue, 2018-09-11 at 03:27 -0700, Eric Dumazet wrote: >> On 09/10/2018 11:54 PM, Paolo Abeni wrote: >>> I *think* we can hit a similar condition with a tun device in IFF_NAPI >>> mode. >> >> Why ? >> >> tun_get_user() does not attach skb to a

Re: [PATCHv3 iproute2] bridge/mdb: fix missing new line when show bridge mdb

2018-09-11 Thread Stephen Hemminger
On Tue, 11 Sep 2018 22:04:50 +0800 Hangbin Liu wrote: > The bridge mdb show is broken on current iproute2. e.g. > ]# bridge mdb show > 34: br0 veth0_br 224.1.1.2 temp 34: br0 veth0_br 224.1.1.1 temp > > After fix: > ]# bridge mdb show > 34: br0 veth0_br 224.1.1.2 temp > 34: br0

Re: [PATCHv2 iproute2] bridge/mdb: fix missing new line when show bridge mdb

2018-09-11 Thread Stephen Hemminger
On Tue, 11 Sep 2018 09:26:35 +0800 Hangbin Liu wrote: > + if (!is_json_context() && !show_stats) > + print_string(PRINT_FP, NULL, "\n", NULL); I just added print_nl to json_print which does what you want.

Re: [PATCH] cxgb4: fix abort_req_rss6 struct

2018-09-11 Thread Jason Gunthorpe
On Fri, Aug 31, 2018 at 11:52:00AM -0700, Steve Wise wrote: > Remove the incorrect WR_HDR field which can cause a misinterpretation > of this CPL by ULDs. > > Fixes: a3cdaa69e4ae ("cxgb4: Adds CPL support for Shared Receive Queues") > Signed-off-by: Steve Wise > --- > > Dave, Doug, and Jason, >

Re: [RFC PATCH bpf-next v2 0/4] Implement bpf queue/stack maps

2018-09-11 Thread Mauricio Vasquez
On 09/10/2018 08:04 PM, Alexei Starovoitov wrote: On Fri, Sep 7, 2018 at 1:40 PM, Mauricio Vasquez wrote: I read the Joe's proposal and using that for this problem looks like a nice solution. I think a good trade-off for now would be to go ahead with a queue/stack map without preallocating

Inquiry 11-09-2018

2018-09-11 Thread Invictus Group
Hello, This is Ms Julian Smith and i am from Invictus Group Co.,LTD in United Kingdom. We are glad to know about your company from the web and we are interested in your products. Could you kindly send us your Latest catalog and price list for our trial order. Best Regards, Julian Smith

[PATCHv3 iproute2] bridge/mdb: fix missing new line when show bridge mdb

2018-09-11 Thread Hangbin Liu
The bridge mdb show is broken on current iproute2. e.g. ]# bridge mdb show 34: br0 veth0_br 224.1.1.2 temp 34: br0 veth0_br 224.1.1.1 temp After fix: ]# bridge mdb show 34: br0 veth0_br 224.1.1.2 temp 34: br0 veth0_br 224.1.1.1 temp v2: Use json print lib as Stephen suggested. v3: No

[PATCH net-next] nfp: report FW vNIC stats in interface stats

2018-09-11 Thread Jakub Kicinski
Report in standard netdev stats drops and errors as well as RX multicast from the FW vNIC counters. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 9 + 1 file changed, 9 insertions(+) diff --git

[PATCH net 2/2] nfp: flower: reject tunnel encap with ipv6 outer headers for offloading

2018-09-11 Thread Jakub Kicinski
From: Louis Peens This fixes a bug where ipv6 tunnels would report that it is getting offloaded to hardware but would actually be rejected by hardware. Fixes: b27d6a95a70d ("nfp: compile flower vxlan tunnel set actions") Signed-off-by: Louis Peens Reviewed-by: John Hurley Reviewed-by: Simon

[PATCH net 1/2] nfp: flower: fix vlan match by checking both vlan id and vlan pcp

2018-09-11 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Previously we only checked if the vlan id field is present when trying to match a vlan tag. The vlan id and vlan pcp field should be treated independently. Fixes: 5571e8c9f241 ("nfp: extend flower matching capabilities") Signed-off-by: Pieter Jansen van Vuuren

[PATCH net 0/2] nfp: flower: fixes for flower offload

2018-09-11 Thread Jakub Kicinski
Hi! Two fixes for flower matching and tunnel encap. Pieter fixes VLAN matching if the entire VLAN id is masked out and match is only performed on the PCP field. Louis adds validation of tunnel flags for encap, most importantly we should not offload actions on IPv6 tunnels if it's not supported.

Re: [PATCH v3 net-next 5/6] dt-bindings: net: dsa: Add lantiq,xrx200-gswip DT bindings

2018-09-11 Thread Rob Herring
On Mon, Sep 10, 2018 at 5:05 PM Andrew Lunn wrote: > > > > +See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of > > > +additional required and optional properties. > > > + > > > + > > snip > > > > + #address-cells = <1>; > > > + #size-cells = <0>; > > > + compatible =

Re: [PATCH v2 net-next 10/12] net: ethernet: Add helper for set_pauseparam for Asym Pause

2018-09-11 Thread kbuild test robot
Hi Andrew, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Andrew-Lunn/Preparing-for-phylib-limkmodes/20180911-204149 config: x86_64-randconfig-x011-201836 (attached as .config) compiler: gcc-7

Re: [PATCH net-next 0/8] bnxt_en: devlink param updates

2018-09-11 Thread Jiri Pirko
Tue, Sep 11, 2018 at 01:33:51PM CEST, jakub.kicin...@netronome.com wrote: >On Tue, 11 Sep 2018 14:14:57 +0530, Vasundhara Volam wrote: >> This patchset adds support for 4 generic and 1 driver-specific devlink >> parameters. >> >> Also, this patchset adds support to return proper error code if >>

Re: unexpected GRO/veth behavior

2018-09-11 Thread Paolo Abeni
On Tue, 2018-09-11 at 03:27 -0700, Eric Dumazet wrote: > On 09/10/2018 11:54 PM, Paolo Abeni wrote: > > I *think* we can hit a similar condition with a tun device in IFF_NAPI > > mode. > > Why ? > > tun_get_user() does not attach skb to a socket, that would be quite useless > since skb >

[PATCH net-next] qlcnic: Remove set but not used variables 'fw_mbx' and 'hdr_size'

2018-09-11 Thread YueHaibing
From: Yue Haibing Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c: In function 'qlcnic_sriov_pull_bc_msg': drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c:907:6: warning: variable 'fw_mbx' set but not used

Re: [PATCH net-next 0/8] bnxt_en: devlink param updates

2018-09-11 Thread Jakub Kicinski
On Tue, 11 Sep 2018 14:14:57 +0530, Vasundhara Volam wrote: > This patchset adds support for 4 generic and 1 driver-specific devlink > parameters. > > Also, this patchset adds support to return proper error code if > HWRM_NVM_GET/SET_VARIABLE commands return error code >

tools/bpf regression causing samples/bpf/ to hang

2018-09-11 Thread Björn Töpel
Hi Yonghong, I tried to run the XDP samples from the bpf-next tip today, and was hit by a regression. Commit f7010770fbac ("tools/bpf: move bpf/lib netlink related functions into a new file") adds a while(1) around the recv call in bpf_set_link_xdp_fd making that call getting stuck in an infinite

Re: unexpected GRO/veth behavior

2018-09-11 Thread Toshiaki Makita
On 2018/09/11 19:27, Eric Dumazet wrote: ... > Fix would probably be : > > diff --git a/drivers/net/veth.c b/drivers/net/veth.c > index > 8d679c8b7f25c753d77cfb8821d9d2528c9c9048..96bd94480942b469403abf017f9f9d5be1e23ef5 > 100644 > --- a/drivers/net/veth.c > +++ b/drivers/net/veth.c > @@ -602,9

Re: [PATCHv2 iproute2] bridge/mdb: fix missing new line when show bridge mdb

2018-09-11 Thread Phil Sutter
Hi Hangbin, On Tue, Sep 11, 2018 at 09:26:35AM +0800, Hangbin Liu wrote: [...] > + if (!is_json_context() && !show_stats) > + print_string(PRINT_FP, NULL, "\n", NULL); There is no need to check for !is_json_context() here. You give a type of PRINT_FP which won't lead to output if

Re: kernels > v4.12 oops/crash with ipsec-traffic: bisected to b838d5e1c5b6e57b10ec8af2268824041e3ea911: ipv4: mark DST_NOGC and remove the operation of dst_free()

2018-09-11 Thread Steffen Klassert
On Mon, Sep 10, 2018 at 10:18:47AM +0200, Kristian Evensen wrote: > Hi, > > Thanks everyone for all the effort in debugging this issue. > > On Mon, Sep 10, 2018 at 8:39 AM Steffen Klassert > wrote: > > The easy fix that could be backported to stable would be > > to check skb->dst for NULL and

Re: unexpected GRO/veth behavior

2018-09-11 Thread Eric Dumazet
On 09/10/2018 11:54 PM, Paolo Abeni wrote: > Hi, > > On Mon, 2018-09-10 at 16:44 +0200, Paolo Abeni wrote: >> while testing some local patches I observed that the TCP tput in the >> following scenario: >> >> # the following enable napi on veth0, so that we can trigger the >> # GRO path with

Re: [PATCH net-next 1/8] devlink: Add generic parameter hw_tc_offload

2018-09-11 Thread Jiri Pirko
Tue, Sep 11, 2018 at 10:44:58AM CEST, vasundhara-v.vo...@broadcom.com wrote: >hw_tc_offload - Enable/Disable TC flower offload in the device. > >Signed-off-by: Vasundhara Volam >--- > include/net/devlink.h | 4 > net/core/devlink.c| 5 + > 2 files changed, 9 insertions(+) > >diff --git

Re: [PATCH v2 net-next 05/12] net: ethernet: genet: Fix speed selection

2018-09-11 Thread Sergei Shtylyov
Hello! On 9/11/2018 12:52 AM, Andrew Lunn wrote: The phy supported speed is being used to determine if the MAC should be configured to 100 or 1G. The masking logic is broken. Instead, look Look at? 1G supported speeds to enable 1G MAC support. Signed-off-by: Andrew Lunn [...] MBR,

  1   2   >