Re: [PATCH net-next 3/6] cls_api: add flow_indr_block_call function

2019-08-04 Thread wenxu
v5 contain this patch but with non-version tag, I used --subject-prefix in git-format-patch. I am sorry to  make a mistake when modify the commit log. So should I repost the v6? On 8/5/2019 2:02 PM, Jiri Pirko wrote: > Re subject. You don't have "v5" in this patch. I don't understand how > tha

Re: [PATCH net-next 3/6] cls_api: add flow_indr_block_call function

2019-08-04 Thread Jiri Pirko
Re subject. You don't have "v5" in this patch. I don't understand how that happened. Do you use --subject-prefix in git-format-patch?

Re: [patch net-next v2 1/3] net: devlink: allow to change namespaces

2019-08-04 Thread Jiri Pirko
Fri, Aug 02, 2019 at 05:45:36PM CEST, dsah...@gmail.com wrote: >On 8/2/19 1:48 AM, Jiri Pirko wrote: >> Wed, Jul 31, 2019 at 09:58:10PM CEST, dsah...@gmail.com wrote: >>> On 7/31/19 1:46 PM, David Ahern wrote: On 7/31/19 1:45 PM, Jiri Pirko wrote: >> check. e.g., what happens if a resource

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-08-04 Thread Andy Lutomirski
On Sun, Aug 4, 2019 at 5:08 PM Andy Lutomirski wrote: > > On Sun, Aug 4, 2019 at 3:16 PM Andy Lutomirski wrote: > > > > On Fri, Aug 2, 2019 at 12:22 AM Song Liu wrote: > > > > > > Hi Andy, > > > > > >> I actually agree CAP_BPF_ADMIN makes sense. The hard part is to make > > > >> existing tools

Re: BPF: ETLS: RECV FLOW

2019-08-04 Thread John Fastabend
Shridhar Venkatraman wrote: > Hi, > > The eTLS work has BPF integration which is great. > However there is one spot where access to the clear text is not available. Guessing eTLS is a typo for KTLS. > > From kernel 4.20 - receiver BPF support added for KTLS. > > a. receiver BPF is applied on e

[PATCH net-next v2] openvswitch: Print error when ovs_execute_actions() fails

2019-08-04 Thread Yifeng Sun
Currently in function ovs_dp_process_packet(), return values of ovs_execute_actions() are silently discarded. This patch prints out an debug message when error happens so as to provide helpful hints for debugging. --- v1->v2: Fixed according to Pravin's review. net/openvswitch/datapath.c | 7

Re: [PATCH net-next] openvswitch: Print error when ovs_execute_actions() fails

2019-08-04 Thread Yifeng Sun
Yes, this fix is mainly for debugging purposes. If packets are blackholed because of errors from ovs_execute_actions(), we can got more helpful information. Thanks Pravin for the review, I will come up with a new version. Yifeng On Sat, Aug 3, 2019 at 4:00 PM Pravin Shelar wrote: > > On Thu, Aug

[PATCH] tools: bpftool: fix reading from /proc/config.gz

2019-08-04 Thread Peter Wu
/proc/config has never existed as far as I can see, but /proc/config.gz is present on Arch Linux. Execute an external gunzip program to avoid linking to zlib and rework the option scanning code since a pipe is not seekable. This also fixes a file handle leak on some error paths. Fixes: 4567b983f78

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-08-04 Thread Andy Lutomirski
On Sun, Aug 4, 2019 at 3:16 PM Andy Lutomirski wrote: > > On Fri, Aug 2, 2019 at 12:22 AM Song Liu wrote: > > > > Hi Andy, > > > >> I actually agree CAP_BPF_ADMIN makes sense. The hard part is to make > > >> existing tools (setcap, getcap, etc.) and libraries aware of the new CAP. > > > > > > It

Re: [PATCH 1/1] bpf: introduce new helper udp_flow_src_port

2019-08-04 Thread Y Song
On Sun, Aug 4, 2019 at 1:43 PM Farid Zakaria wrote: > > * re-sending as I've sent previously as HTML ... sorry * > > First off, thank you for taking the time to review this patch. You are welcome. Also, just let you know typically people do interleaved reply instead of top reply. > > It's not cl

[PATCH net 0/5] Fixes for SJA1105 DSA: FDBs, Learning and PTP

2019-08-04 Thread Vladimir Oltean
This is an assortment of functional fixes for the sja1105 switch driver targeted for the "net" tree (although they apply on net-next just as well). Patch 1/5 ("net: dsa: sja1105: Fix broken learning with vlan_filtering disabled") repairs a breakage introduced in the early development stages of the

[PATCH net 4/5] net: dsa: sja1105: Fix memory leak on meta state machine normal path

2019-08-04 Thread Vladimir Oltean
After a meta frame is received, it is associated with the cached sp->data->stampable_skb from the DSA tagger private structure. Cached means its refcount is incremented with skb_get() in order for dsa_switch_rcv() to not free it when the tagger .rcv returns NULL. The mistake is that skb_unref() i

[PATCH net 5/5] net: dsa: sja1105: Fix memory leak on meta state machine error path

2019-08-04 Thread Vladimir Oltean
When RX timestamping is enabled and two link-local (non-meta) frames are received in a row, this constitutes an error. The tagger is always caching the last link-local frame, in an attempt to merge it with the meta follow-up frame when that arrives. To recover from the above error condition, the i

[PATCH net 2/5] net: dsa: sja1105: Use the LOCKEDS bit for SJA1105 E/T as well

2019-08-04 Thread Vladimir Oltean
It looks like the FDB dump taken from first-generation switches also contains information on whether entries are static or not. So use that instead of searching through the driver's tables. Fixes: d763778224ea ("net: dsa: sja1105: Implement is_static for FDB entries on E/T") Signed-off-by: Vladim

[PATCH net 1/5] net: dsa: sja1105: Fix broken learning with vlan_filtering disabled

2019-08-04 Thread Vladimir Oltean
When put under a bridge with vlan_filtering 0, the SJA1105 ports will flood all traffic as if learning was broken. This is because learning interferes with the rx_vid's configured by dsa_8021q as unique pvid's. So learning technically still *does* work, it's just that the learnt entries never get

[PATCH net 3/5] net: dsa: sja1105: Really fix panic on unregistering PTP clock

2019-08-04 Thread Vladimir Oltean
The IS_ERR_OR_NULL(priv->clock) check inside sja1105_ptp_clock_unregister() is preventing cancel_delayed_work_sync from actually being run. Additionally, sja1105_ptp_clock_unregister() does not actually get run, when placed in sja1105_remove(). The DSA switch gets torn down, but the sja1105 module

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-08-04 Thread Andy Lutomirski
On Fri, Aug 2, 2019 at 12:22 AM Song Liu wrote: > > Hi Andy, > >> I actually agree CAP_BPF_ADMIN makes sense. The hard part is to make > >> existing tools (setcap, getcap, etc.) and libraries aware of the new CAP. > > > > It's been done before -- it's not that hard. IMO the main tricky bit > > w

Re: [PATCH 1/1] bpf: introduce new helper udp_flow_src_port

2019-08-04 Thread Farid Zakaria
* re-sending as I've sent previously as HTML ... sorry * First off, thank you for taking the time to review this patch. It's not clear to me the backport you'd like for libbpf, I have been following the documentation outlined in https://www.kernel.org/doc/html/latest/bpf/index.html I will hold of

[PATCH] net: dsa: qca8k: Add of_node_put() in qca8k_setup_mdio_bus()

2019-08-04 Thread Nishka Dasgupta
Each iteration of for_each_available_child_of_node() puts the previous node, but in the case of a return from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put() before the return. Additionally, the local variable ports in the function qca8k_setup_mdio_b

[PATCH net-next 03/10] net: tc_act: add helpers to detect ingress mirred actions

2019-08-04 Thread John Hurley
TC mirred actions can send to egress or ingress on a given netdev. Helpers exist to detect actions that are mirred to egress. Extend the header file to include helpers to detect ingress mirred actions. Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski --- include

[PATCH net-next 05/10] nfp: flower: push vlan after tunnel in merge

2019-08-04 Thread John Hurley
NFP allows the merging of 2 flows together into a single offloaded flow. In the kernel datapath the packet must match 1 flow, impliment its actions, recirculate, match the 2nd flow and also impliment its actions. Merging creates a single flow with all actions from the 2 original flows. Firmware im

[PATCH net-next 09/10] nfp: flower: remove offloaded MACs when reprs are applied to OvS bridges

2019-08-04 Thread John Hurley
MAC addresses along with an identifying index are offloaded to firmware to allow tunnel decapsulation. If a tunnel packet arrives with a matching destination MAC address and a verified index, it can continue on the decapsulation process. This replicates the MAC verifications carried out in the kern

[PATCH net-next 06/10] nfp: flower: detect potential pre-tunnel rules

2019-08-04 Thread John Hurley
Pre-tunnel rules are used when the tunnel end-point is on an 'internal port'. These rules are used to direct the tunnelled packets (based on outer header fields) to the internal port where they can be detunnelled. The rule must send the packet to ingress the internal port at the TC layer. Currentl

[PATCH net-next 10/10] nfp: flower: encode mac indexes with pre-tunnel rule check

2019-08-04 Thread John Hurley
When a tunnel packet arrives on the NFP card, its destination MAC is looked up and MAC index returned for it. This index can help verify the tunnel by, for example, ensuring that the packet arrived on the expected port. If the packet is destined for a known MAC that is not connected to a given phys

[PATCH net-next 08/10] nfp: flower: offload pre-tunnel rules

2019-08-04 Thread John Hurley
Pre-tunnel rules are TC flower and OvS rules that forward a packet to the tunnel end point where it can then pass through the network stack and be decapsulated. These are required if the tunnel end point is, say, an OvS internal port. Currently, firmware determines that a packet is in a tunnel and

[PATCH net-next 07/10] nfp: flower: verify pre-tunnel rules

2019-08-04 Thread John Hurley
Pre-tunnel rules must direct packets to an internal port based on L2 information. Rules that egress to an internal port are already indicated by a non-NULL device in its nfp_fl_payload struct. Verfiy the rest of the match fields indicate that the rule is a pre-tunnel rule. This requires a full matc

[PATCH net-next 01/10] net: tc_act: add skbedit_ptype helper functions

2019-08-04 Thread John Hurley
The tc_act header file contains an inline function that checks if an action is changing the skb mark of a packet and a further function to extract the mark. Add similar functions to check for and get skbedit actions that modify the packet type of the skb. Signed-off-by: John Hurley Reviewed-by:

[PATCH net-next 00/10] Support tunnels over VLAN in NFP

2019-08-04 Thread John Hurley
This patchset deals with tunnel encap and decap when the end-point IP address is on an internal port (for example and OvS VLAN port). Tunnel encap without VLAN is already supported in the NFP driver. This patchset extends that to include a push VLAN along with tunnel header push. Patches 1-4 exten

[PATCH net-next 04/10] net: sched: add ingress mirred action to hardware IR

2019-08-04 Thread John Hurley
TC mirred actions (redirect and mirred) can send to egress or ingress of a device. Currently only egress is used for hw offload rules. Modify the intermediate representation for hw offload to include mirred actions that go to ingress. This gives drivers access to such rules and can decide whether

[PATCH net-next 02/10] net: sched: add skbedit of ptype action to hardware IR

2019-08-04 Thread John Hurley
TC rules can impliment skbedit actions. Currently actions that modify the skb mark are passed to offloading drivers via the hardware intermediate representation in the flow_offload API. Extend this to include skbedit actions that modify the packet type of the skb. Such actions may be used to set t

[PATCH net-next v6 6/6] netfilter: nf_tables_offload: support indr block call

2019-08-04 Thread wenxu
From: wenxu nftable support indr-block call. It makes nftable an offload vlan and tunnel device. nft add table netdev firewall nft add chain netdev firewall aclout { type filter hook ingress offload device mlx_pf0vf0 priority - 300 \; } nft add rule netdev firewall aclout ip daddr 10.0.0.1 fwd

[PATCH net-next v6 4/6] flow_offload: move tc indirect block to flow offload

2019-08-04 Thread wenxu
From: wenxu move tc indirect block to flow_offload and rename it to flow indirect block.The nf_tables can use the indr block architecture. Signed-off-by: wenxu --- v6: add a block_get_and_ing_cmd callback drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 10 +- .../net/ethernet/netronome/

[PATCH net-next v6 0/6] flow_offload: add indr-block in nf_table_offload

2019-08-04 Thread wenxu
From: wenxu This series patch make nftables offload support the vlan and tunnel device offload through indr-block architecture. The first four patches mv tc indr block to flow offload and rename to flow-indr-block. Because the new flow-indr-block can't get the tcf_block directly. The fifth patch

[PATCH net-next v6 3/6] cls_api: add flow_indr_block_call function

2019-08-04 Thread wenxu
From: wenxu This patch make indr_block_call don't access struct tc_indr_block_cb and tc_indr_block_dev directly Signed-off-by: wenxu --- v6: no change net/sched/cls_api.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/net/sched/cls_api.c b/ne

[PATCH net-next v6 5/6] flow_offload: support get multi-subsystem block

2019-08-04 Thread wenxu
From: wenxu It provide a callback list to find the blocks of tc and nft subsystems Signed-off-by: wenxu --- v6: new patch include/net/flow_offload.h | 10 +- net/core/flow_offload.c| 47 +- net/sched/cls_api.c| 9 - 3 fi

[PATCH net-next v6 1/6] cls_api: modify the tc_indr_block_ing_cmd parameters.

2019-08-04 Thread wenxu
From: wenxu This patch make tc_indr_block_ing_cmd can't access struct tc_indr_block_dev and tc_indr_block_cb. Signed-off-by: wenxu --- v6: no change net/sched/cls_api.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/net/sched/cls_api.c b/net/s

[PATCH net-next v6 2/6] cls_api: remove the tcf_block cache

2019-08-04 Thread wenxu
From: wenxu Remove the tcf_block in the tc_indr_block_dev for muti-subsystem support. Signed-off-by: wenxu --- v6: new patch net/sched/cls_api.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 2e3b58d..654da8

[net-next 6/8] fm10k: mark unused parameters with __always_unused

2019-08-04 Thread Jeff Kirsher
From: Jacob Keller Several functions in the fm10k driver have specific function templates, as they are used as function pointers. The parameters in these functions are not always used. Explicitly mark unused parameters with the __always_unused macro, so that the compiler will not warn about them

[net-next 5/8] fm10k: cast page_addr to u8 * when incrementing it

2019-08-04 Thread Jeff Kirsher
From: Jacob Keller The page_addr variable is a void pointer. Incrementing it before calling prefetch is technically undefined. Fix this by casting it to a u8* pointer before incrementing it. This ensures that we increment the pointer value in byte units, instead of relying on this undefined behav

[net-next 8/8] fm10k: fix fm10k_get_fault_pf to read correct address

2019-08-04 Thread Jeff Kirsher
From: Jacob Keller Fix assignment of the FM10K_FAULT_ADDR_LO register into fault->address by using a bit-wise |= operation. Without this, the low address is completely overwriting the high potion of the address. This caused the fault to incorrectly return only the lower 32 bits of the fault addre

[net-next 3/8] fm10k: remove needless initialization of size local variable

2019-08-04 Thread Jeff Kirsher
From: Jacob Keller The local variable 'size' in fm10k_dfwd_add_station is initialized, but is always re-assigned immediately before use. Remove this unnecessary initialization. This was detected by cppcheck and resolves the following warning produced by that tool: [fm10k_netdev.c:1466]: (style)

[net-next 0/8][pull request] 100GbE Intel Wired LAN Driver Updates 2019-08-04

2019-08-04 Thread Jeff Kirsher
This series contains more updates to fm10k from Jake Keller. Jake removes the unnecessary initialization of some variables to help resolve static code checker warnings. Explicitly return success during resume, since the value of 'err' is always success. Fixed a issue with incrementing a void poi

[net-next 2/8] fm10k: remove needless assignment of err local variable

2019-08-04 Thread Jeff Kirsher
From: Jacob Keller The local variable err in several functions in the fm10k_netdev.c file is initialized with a value that is never used. The err value is immediately re-assigned in all cases where it will be checked. Remove the unnecessary initializers. This was detected by cppcheck and resolve

[net-next 7/8] fm10k: convert NON_Q_VECTORS(hw) into NON_Q_VECTORS

2019-08-04 Thread Jeff Kirsher
From: Jacob Keller The driver currently uses a macro to decide whether we should use NON_Q_VECTORS_PF or NON_Q_VECTORS_VF. However, we also define NON_Q_VECTORS_VF to the same value as NON_Q_VECTORS_PF. This means that the macro NON_Q_VECTORS(hw) will always return the same value. Let's just re

[net-next 4/8] fm10k: explicitly return 0 on success path in function

2019-08-04 Thread Jeff Kirsher
From: Jacob Keller In the fm10k_handle_resume function, return 0 explicitly at the end of the function instead of returning the err value. This was detected by cppcheck and resolves the following style warning produced by that tool: [fm10k_pci.c:2768] -> [fm10k_pci.c:2787]: (warning) Identical

[net-next 1/8] fm10k: remove unnecessary variable initializer

2019-08-04 Thread Jeff Kirsher
From: Jacob Keller The err variable in the fm10k_tlv_attr_parse function is initialized with zero. However, the function never reads err without first assigning it from a function call. Remove this unnecessary initialization. This was detected by cppcheck and resolves the following warning produ

Re: [PATCH] net/mlx5e: Allow removing representors netdev to other namespace

2019-08-04 Thread Or Gerlitz
On Thu, Aug 1, 2019 at 3:44 AM Tonghao Zhang wrote: > On Wed, May 22, 2019 at 12:49 PM Or Gerlitz wrote: > > On Wed, May 22, 2019 at 4:26 AM Tonghao Zhang > > wrote: > > > I review the reps of netronome nfp codes, nfp does't set the > > > NETIF_F_NETNS_LOCAL to netdev->features. > > > And I c

[PATCH mlx5-next v1 1/3] IB/mlx5: Query ODP capabilities for DC

2019-08-04 Thread Leon Romanovsky
From: Michael Guralnik Set current capabilities of ODP for DC to max capabilities and cache them in mlx5_ib. Signed-off-by: Michael Guralnik Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + drivers/infiniband/hw/mlx5/odp.c

[PATCH rdma-next v1 0/3] ODP support for mlx5 DC QPs

2019-08-04 Thread Leon Romanovsky
From: Leon Romanovsky Changelog v1: * Fixed alignment to u64 in mlx5-abi.h (Gal P.) v0: * https://lore.kernel.org/linux-rdma/20190801122139.25224-1-l...@kernel.org - >From Michael, The series adds support for on

[PATCH rdma-next v1 3/3] IB/mlx5: Add page fault handler for DC initiator WQE

2019-08-04 Thread Leon Romanovsky
From: Michael Guralnik Parsing DC initiator WQEs upon page fault requires skipping an address vector segment, as in UD WQEs. Signed-off-by: Michael Guralnik Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/odp.c | 9 - 1 file changed, 8 insertions

[PATCH rdma-next v1 2/3] IB/mlx5: Expose ODP for DC capabilities to user

2019-08-04 Thread Leon Romanovsky
From: Michael Guralnik Return ODP capabilities for DC to user in alloc_context. Signed-off-by: Michael Guralnik Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/main.c | 6 ++ include/uapi/rdma/mlx5-abi.h | 3 +++ 2 files changed, 9 insertions(+)

Re: [PATCH iproute2-next] rdma: Add driver QP type string

2019-08-04 Thread Leon Romanovsky
On Sun, Aug 04, 2019 at 11:07:56AM +0300, Gal Pressman wrote: > RDMA resource tracker now tracks driver QPs as well, add driver QP type > string to qp_types_to_str function. > > Signed-off-by: Gal Pressman > --- > rdma/res.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > Thanks,

Re: BPF: ETLS: RECV FLOW

2019-08-04 Thread Shridhar Venkatraman
Hi, The eTLS work has BPF integration which is great. However there is one spot where access to the clear text is not available. >From kernel 4.20 - receiver BPF support added for KTLS. a. receiver BPF is applied on encrypted message b. after applying BPF, message is decrypted c. BPF run logic o

[PATCH iproute2-next] rdma: Add driver QP type string

2019-08-04 Thread Gal Pressman
RDMA resource tracker now tracks driver QPs as well, add driver QP type string to qp_types_to_str function. Signed-off-by: Gal Pressman --- rdma/res.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rdma/res.c b/rdma/res.c index ef863f142eca..97a7b9640185 100644 --- a/r

[PATCH net-next] r8169: add helper r8168_mac_ocp_modify

2019-08-04 Thread Heiner Kallweit
Add a helper for MAC OCP read-modify-write operations. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 65 +++ 1 file changed, 19 insertions(+), 46 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/real

[PATCH net-next] r8169: remove access to legacy register MultiIntr

2019-08-04 Thread Heiner Kallweit
This code piece was inherited from RTL8139 code, the register at address 0x5c however has a different meaning on RTL8169 and is unused. So we can remove this. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 4 1 file changed, 4 deletions(-) diff --git a/drive

[PATCH net-next] r8169: sync PCIe PHY init with vendor driver 8.047.01

2019-08-04 Thread Heiner Kallweit
Synchronize PCIe PHY initialization with vendor driver version 8.047.01. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 60 ++- 1 file changed, 38 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers