[net-next 06/17] ice: only drop link once when setting pauseparams

2020-05-21 Thread Jeff Kirsher
From: Dave Ertman Currently, the ice driver is setting a PHY configuration, which causes a link drop, and then additionally it calls for a nway_reset, which restarts auto-negotiation on the link, which also causes a link drop. These two link events in such close timing is causing the FW to not b

[net-next 10/17] ice: cleanup vf_id signedness

2020-05-21 Thread Jeff Kirsher
From: Jesse Brandeburg The vf_id variable is dealt with in the code in inconsistent ways of sign usage, preventing compilation with -Werror=sign-compare. Fix this problem in the code by always treating vf_id as unsigned, since there are no valid values of vf_id that are negative. Signed-off-by:

[net-next 04/17] ice: Don't reset and rebuild for Tx timeout on PFC enabled queue

2020-05-21 Thread Jeff Kirsher
From: Avinash JD When there's a Tx timeout for a queue which belongs to a PFC enabled TC, then it's not because the queue is hung but because PFC is in action. In PFC, peer sends a pause frame for a specified period of time when its buffer threshold is exceeded (due to congestion). Netdev on the

[net-next 08/17] ice: Provide more meaningful error message

2020-05-21 Thread Jeff Kirsher
From: Lihong Yang When printing the ice status or AQ error codes, instead of printing out the numerical value, provide the description of the error code. This provides more info about the issue than a number. Signed-off-by: Lihong Yang Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signe

[net-next 11/17] ice: Fix resource leak on early exit from function

2020-05-21 Thread Jeff Kirsher
From: Eric Joyner Memory allocated in the ice_add_prof_id_vsig() function wasn't being properly freed if an error occurred inside the for-loop in the function. In particular, 'p' wasn't being freed if an error occurred before it was added to the resource list at the end of the for-loop. CC: sta

[net-next 14/17] ice: remove unnecessary expression that is always true

2020-05-21 Thread Jeff Kirsher
From: Bruce Allan The else conditional expression is always true due to the if conditional expression; remove it and add a comment to make it obvious still. Signed-off-by: Bruce Allan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_main.c | 3 ++-

[net-next 03/17] ice: Add VF promiscuous support

2020-05-21 Thread Jeff Kirsher
From: Brett Creeley Implement promiscuous support for VF VSIs. Behaviour of promiscuous support is based on VF trust as well as the, introduced, vf-true-promisc flag. A trusted VF with vf-true-promisc disabled will be the default VSI, which means that all traffic without a matching destination M

[net-next 16/17] ice: remove unnecessary backslash

2020-05-21 Thread Jeff Kirsher
From: Bruce Allan Self-explanatory. Signed-off-by: Bruce Allan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drive

[net-next 13/17] ice: Fix check for removing/adding mac filters

2020-05-21 Thread Jeff Kirsher
From: Lihong Yang In function ice_set_mac_address, we will remove old dev_addr before adding the new MAC. In the removing and adding process of the MAC, there is no need to return error if the check finds the to-be-removed dev_addr does not exist in the MAC filter list or the to-be-added mac alre

[net-next 17/17] ice: Rename build_ctob to ice_build_ctob

2020-05-21 Thread Jeff Kirsher
From: Tony Nguyen To make the function easier to identify as being part of the ice driver, prepend ice to the function name. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_txrx.c | 11 ++- drivers/net/etherne

[net-next 12/17] ice: refactor filter functions

2020-05-21 Thread Jeff Kirsher
From: Michal Swiatkowski Move filter functions to separate file. Add functions that prepare suitable ice_fltr_info struct depending on the filter type and add this struct to earlier created list: - ice_fltr_add_mac_to_list - ice_fltr_add_vlan_to_list - ice_fltr_add_eth_to_list This functions are

[net-next 15/17] ice: remove unnecessary check

2020-05-21 Thread Jeff Kirsher
From: Bruce Allan The variable status cannot be zero due to a prior check of it; remove this check. Signed-off-by: Bruce Allan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[net-next 07/17] ice: Fix probe/open race condition

2020-05-21 Thread Jeff Kirsher
From: Anirudh Venkataramanan As soon as the driver registers the PF netdev, userspace utilities like NetworkManager try to bring up the associated interface. When this happens, the driver may not have finished initializing fully, resulting in a bunch of errors in the interface up flow. The drive

[net-next 00/17][pull request] 100GbE Intel Wired LAN Driver Updates 2020-05-21

2020-05-21 Thread Jeff Kirsher
This series contains updates to ice driver only. Several of the changes are fixes, which could be backported to stable, of which, only one was marked for stable because of the memory leak potential. Jake exposes the information in the flash memory used for link management, which is called the net

[net-next 05/17] ice: Fix check for contiguous TCs

2020-05-21 Thread Jeff Kirsher
From: Dave Ertman The current implementation for contiguous TC check is assuming that the UPs will be mapped to TCs in a linear progressing fashion. This is obviously not always true. Change the check to allow for various UP2TC mapping configurations. Signed-off-by: Dave Ertman Tested-by: And

[net-next 01/17] ice: report netlist version in .info_get

2020-05-21 Thread Jeff Kirsher
From: Jacob Keller The flash memory for the ice hardware contains a block of information used for link management called the Netlist module. As this essentially represents another section of firmware, add its version information to the output of the driver's .info_get handler. This includes bot

[net-next 02/17] ice: Add support for tunnel offloads

2020-05-21 Thread Jeff Kirsher
From: Tony Nguyen Create a boost TCAM entry for each tunnel port in order to get a tunnel PTYPE. Update netdev feature flags and implement the appropriate logic to get and set values for hardware offloads. Signed-off-by: Tony Nguyen Signed-off-by: Henry Tieman Tested-by: Andrew Bowers Signed-

Re: [PATCH] rxrpc: Fix a memory leak in rxkad_verify_response()

2020-05-21 Thread Markus Elfring
> How do you think about a wording variant like the following? > >A ticket was not released after a call of the function “platform_get_irq” > failed. I should have specified an other function name here. A ticket was not released after a call of the function “rxkad_decrypt_ticket” failed.

Re: [PATCH] rxrpc: Fix a memory leak in rxkad_verify_response()

2020-05-21 Thread Markus Elfring
> In function rxkad_verify_response(), pointer "ticket" is not released, > when function rxkad_decrypt_ticket() returns an error, causing a > memory leak bug. I suggest to improve also this change description. How do you think about a wording variant like the following? A ticket was not releas

Re: [PATCH net] tipc: block BH before using dst_cache

2020-05-21 Thread Xin Long
On Fri, May 22, 2020 at 1:55 PM Eric Dumazet wrote: > > Resend to the list in non HTML form > > > On Thu, May 21, 2020 at 10:53 PM Eric Dumazet wrote: > > > > > > > > On Thu, May 21, 2020 at 10:50 PM Xin Long wrote: > >> > >> On Fri, May 22, 2020 at 2:30 AM Eric Dumazet wrote: > >> > > >> > dst

Re: [PATCH net] tipc: block BH before using dst_cache

2020-05-21 Thread Xin Long
On Fri, May 22, 2020 at 2:30 AM Eric Dumazet wrote: > > dst_cache_get() documents it must be used with BH disabled. Interesting, I thought under rcu_read_lock() is enough, which calls preempt_disable(). have you checked other places where dst_cache_get() are used? > > sysbot reported : > > BUG: u

Re: [PATCH v2] xfrm: policy: Fix xfrm policy match

2020-05-21 Thread Xin Long
On Fri, May 22, 2020 at 9:45 AM Yuehaibing wrote: > > On 2020/5/21 14:49, Xin Long wrote: > > On Tue, May 19, 2020 at 4:53 PM Steffen Klassert > > wrote: > >> > >> On Fri, May 15, 2020 at 04:39:57PM +0800, Yuehaibing wrote: > >>> > >>> Friendly ping... > >>> > >>> Any plan for this issue? > >> >

Re: [PATCH v2 10/15] soc: qcom: ipa: use new module_firmware_crashed()

2020-05-21 Thread Luis Chamberlain
On Tue, May 19, 2020 at 05:34:13PM -0500, Alex Elder wrote: > On 5/15/20 4:28 PM, Luis Chamberlain wrote: > > This makes use of the new module_firmware_crashed() to help > > annotate when firmware for device drivers crash. When firmware > > crashes devices can sometimes become unresponsive, and rec

[PATCH net-next v4 2/5] vxlan: ecmp support for mac fdb entries

2020-05-21 Thread Roopa Prabhu
From: Roopa Prabhu Todays vxlan mac fdb entries can point to multiple remote ips (rdsts) with the sole purpose of replicating broadcast-multicast and unknown unicast packets to those remote ips. E-VPN multihoming [1,2,3] requires bridged vxlan traffic to be load balanced to remote switches (vtep

[PATCH net-next v4 4/5] vxlan: support for nexthop notifiers

2020-05-21 Thread Roopa Prabhu
From: Roopa Prabhu vxlan driver registers for nexthop add/del notifiers to cleanup fdb entries pointing to such nexthops. Signed-off-by: Roopa Prabhu --- drivers/net/vxlan.c | 33 + 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/drivers/net/vxlan

[PATCH net-next v4 1/5] nexthop: support for fdb ecmp nexthops

2020-05-21 Thread Roopa Prabhu
From: Roopa Prabhu This patch introduces ecmp nexthops and nexthop groups for mac fdb entries. In subsequent patches this is used by the vxlan driver fdb entries. The use case is E-VPN multihoming [1,2,3] which requires bridged vxlan traffic to be load balanced to remote switches (vteps) belongin

[PATCH net-next v4 5/5] selftests: net: add fdb nexthop tests

2020-05-21 Thread Roopa Prabhu
From: Roopa Prabhu This commit adds ipv4 and ipv6 fdb nexthop api tests to fib_nexthops.sh. Signed-off-by: Roopa Prabhu Reviewed-by: David Ahern --- tools/testing/selftests/net/fib_nexthops.sh | 160 +++- 1 file changed, 158 insertions(+), 2 deletions(-) diff --git a/

[PATCH net-next v4 3/5] nexthop: add support for notifiers

2020-05-21 Thread Roopa Prabhu
From: Roopa Prabhu This patch adds nexthop add/del notifiers. To be used by vxlan driver in a later patch. Could possibly be used by switchdev drivers in the future. Signed-off-by: Roopa Prabhu --- include/net/netns/nexthop.h | 1 + include/net/nexthop.h | 12 net/ipv4/next

[PATCH net-next v4 0/5] Support for fdb ECMP nexthop groups

2020-05-21 Thread Roopa Prabhu
From: Roopa Prabhu This series introduces ecmp nexthops and nexthop groups for mac fdb entries. In subsequent patches this is used by the vxlan driver fdb entries. The use case is E-VPN multihoming [1,2,3] which requires bridged vxlan traffic to be load balanced to remote switches (vteps) belongi

[PATCH] net/mlx4_core: fix a memory leak bug.

2020-05-21 Thread wu000273
From: Qiushi Wu In function mlx4_opreq_action(), pointer "mailbox" is not released, when mlx4_cmd_box() return and error, causing a memory leak bug. Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can free this pointer. Fixes: fe6f700d6cbb7 ("Respond to operation request by firmw

Re: [PATCH v2 12/15] ath10k: use new module_firmware_crashed()

2020-05-21 Thread Luis Chamberlain
On Fri, May 22, 2020 at 08:12:59AM +0300, Emmanuel Grumbach wrote: > > > > On Tue, May 19, 2020 at 10:37 PM Emmanuel Grumbach > > wrote: > > > So I believe we already have this uevent, it is the devcoredump. All > > > we need is to add the unique id. > > > > I think there are a few reasons that d

Re: [RFC 1/2] devlink: add simple fw crash helpers

2020-05-21 Thread Luis Chamberlain
On Tue, May 19, 2020 at 02:15:30PM -0700, Jakub Kicinski wrote: > Add infra for creating devlink instances for a device to report Thanks for doing this series as a PoC, counter to the module_firmware_crash() which I proposed to taint the kernel with a firmware crash flag to the kernel and module.

Re: [PATCH v2 01/15] taint: add module firmware crash taint support

2020-05-21 Thread Luis Chamberlain
On Tue, May 19, 2020 at 06:42:31PM +0200, Jessica Yu wrote: > +++ Luis Chamberlain [15/05/20 21:28 +]: > > Device driver firmware can crash, and sometimes, this can leave your > > system in a state which makes the device or subsystem completely > > useless. Detecting this by inspecting /proc/sy

Re: [PATCH v2 12/15] ath10k: use new module_firmware_crashed()

2020-05-21 Thread Emmanuel Grumbach
> > On Tue, May 19, 2020 at 10:37 PM Emmanuel Grumbach > wrote: > > So I believe we already have this uevent, it is the devcoredump. All > > we need is to add the unique id. > > I think there are a few reasons that devcoredump doesn't satisfy what > either Luis or I want. > > 1) it can be disable

[PATCH] rxrpc: fix a memory leak bug.

2020-05-21 Thread wu000273
From: Qiushi Wu In function rxkad_verify_response(), pointer "ticket" is not released, when function rxkad_decrypt_ticket() returns an error, causing a memory leak bug. Fixes: 8c2f826dc3631 ("rxrpc: Don't put crypto buffers on the stack") Signed-off-by: Qiushi Wu --- net/rxrpc/rxkad.c | 3 +--

[PATCH] wlcore: fix runtime pm imbalance in wlcore_irq_locked

2020-05-21 Thread Dinghao Liu
When wlcore_fw_status() returns an error code, a pairing runtime PM usage counter decrement is needed to keep the counter balanced. It's the same for all error paths after wlcore_fw_status(). Signed-off-by: Dinghao Liu --- drivers/net/wireless/ti/wlcore/main.c | 17 + 1 file chan

[bpf-next PATCH v4 4/5] bpf: selftests, add sk_msg helpers load and attach test

2020-05-21 Thread John Fastabend
The test itself is not particularly useful but it encodes a common pattern we have. Namely do a sk storage lookup then depending on data here decide if we need to do more work or alternatively allow packet to PASS. Then if we need to do more work consult task_struct for more information about the

[bpf-next PATCH v4 5/5] bpf: selftests, test probe_* helpers from SCHED_CLS

2020-05-21 Thread John Fastabend
Lets test using probe* in SCHED_CLS network programs as well just to be sure these keep working. Its cheap to add the extra test and provides a second context to test outside of sk_msg after we generalized probe* helpers to all networking types. Acked-by: Yonghong Song Signed-off-by: John Fastabe

[bpf-next PATCH v4 2/5] bpf: extend bpf_base_func_proto helpers with probe_* and *current_task*

2020-05-21 Thread John Fastabend
Often it is useful when applying policy to know something about the task. If the administrator has CAP_SYS_ADMIN rights then they can use kprobe + networking hook and link the two programs together to accomplish this. However, this is a bit clunky and also means we have to call both the network pro

[bpf-next PATCH v4 3/5] bpf: sk_msg add get socket storage helpers

2020-05-21 Thread John Fastabend
Add helpers to use local socket storage. Signed-off-by: John Fastabend Acked-by: Yonghong Song --- 0 files changed diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index b9b8a0f..d394b09 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -3641,6 +3641,8 @@

[bpf-next PATCH v4 1/5] bpf: sk_msg add some generic helpers that may be useful from sk_msg

2020-05-21 Thread John Fastabend
Add these generic helpers that may be useful to use from sk_msg programs. The helpers do not depend on ctx so we can simply add them here, BPF_FUNC_perf_event_output BPF_FUNC_get_current_uid_gid BPF_FUNC_get_current_pid_tgid BPF_FUNC_get_current_comm BPF_FUNC_get_current_cgroup_id BPF_FUNC_g

[bpf-next PATCH v4 0/5] bpf: Add sk_msg and networking helpers

2020-05-21 Thread John Fastabend
This series adds helpers for sk_msg program type and based on feedback from v1 adds *_task_* helpers and probe_* helpers to all networking programs with perfmon_capable() capabilities. The list of helpers breaks down as follows, Networking with perfmon_capable() guard (patch2): BPF_FUNC_get_cur

[PATCH -next] mt76: mt7915: Fix build error

2020-05-21 Thread YueHaibing
In file included from ./include/linux/firmware.h:6:0, from drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:4: In function ‘__mt7915_mcu_msg_send’, inlined from ‘mt7915_mcu_send_message’ at drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:370:6: ./include/linux/compiler.h:396:38

RE: [PATCH bpf-next v5 00/15] Introduce AF_XDP buffer allocation API

2020-05-21 Thread Kirsher, Jeffrey T
> -Original Message- > From: Björn Töpel > Sent: Wednesday, May 20, 2020 12:21 > To: a...@kernel.org; dan...@iogearbox.net; da...@davemloft.net; > k...@kernel.org; h...@kernel.org; john.fastab...@gmail.com; > netdev@vger.kernel.org; b...@vger.kernel.org; Karlsson, Magnus > ; jonathan.le...

Re: [PATCH v2] netprio_cgroup: Fix unlimited memory leak of v2 cgroups

2020-05-21 Thread Zefan Li
On 2020/5/22 5:14, John Fastabend wrote: > Jakub Kicinski wrote: >> On Fri, 8 May 2020 22:58:29 -0700 Jakub Kicinski wrote: >>> On Sat, 9 May 2020 11:32:10 +0800 Zefan Li wrote: If systemd is configured to use hybrid mode which enables the use of both cgroup v1 and v2, systemd will create

Re: [PATCH] e1000e: Relax condition to trigger reset for ME workaround

2020-05-21 Thread Punit Agrawal
Hi Aaron, "Brown, Aaron F" writes: >> From: netdev-ow...@vger.kernel.org On >> Behalf Of Punit Agrawal >> Sent: Thursday, May 14, 2020 9:31 PM >> To: Kirsher, Jeffrey T >> Cc: daniel.sangor...@toshiba.co.jp; Punit Agrawal >> ; Alexander Duyck >> ; David S. Miller ; >> intel-wired-...@lists.osu

[PATCH net-next 0/5] net: hns3: misc updates for -next

2020-05-21 Thread Huazhong Tan
This patchset includes some misc updates for the HNS3 ethernet driver. #1 adds support for dump VF's mapping of ring and vector, this is needed by the hns3 DPDK VF PMD driver. #2 adds a resetting check in hclgevf_init_nic_client_instance(). #3 adds a preparatory work for RMDA VF's driver. #4 re

[PATCH net-next 5/5] net: hns3: add a print for initializing CMDQ when reset pending

2020-05-21 Thread Huazhong Tan
When initializing CMDQ fails because of reset pending, there is no hint for debugging, so adds a log for it. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hc

[PATCH net-next 2/5] net: hns3: add a resetting check in hclgevf_init_nic_client_instance()

2020-05-21 Thread Huazhong Tan
From: Guangbin Huang To prevent from initializing VF NIC client in reset handling state, this patch adds resetting check in hclgevf_init_nic_client_instance(). Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 9 +

[PATCH net-next 4/5] net: hns3: remove unnecessary MAC enable in app loopback

2020-05-21 Thread Huazhong Tan
From: Yufeng Mo Packets will not pass through MAC during app loopback. Therefore, it is meaningless to enable MAC while doing app loopback. This patch removes this unnecessary action. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mai

[PATCH net-next 1/5] net: hns3: add support for VF to query ring and vector mapping

2020-05-21 Thread Huazhong Tan
From: Guangbin Huang This patch adds support for VF to query the mapping of ring and vector. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h| 1 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 91 ++

[PATCH net-next 3/5] net: hns3: change the order of reinitializing RoCE and NIC client during reset

2020-05-21 Thread Huazhong Tan
From: Yufeng Mo The HNS RDMA driver will support VF device later, whose re-initialization should be done after PF's. This patch changes the order of hclge_reset_prepare_up() and hclge_notify_roce_client(), so that PF's RoCE client will be reinitialized before VF's. Signed-off-by: Yufeng Mo Sign

[PATCH v2 bpf-next 1/3] bpf: Consolidate inner-map-compatible properties into bpf_types.h

2020-05-21 Thread Martin KaFai Lau
This patch adds a "properties" member to "struct bpf_map". The properties of individual map-type is tagged in the "BPF_MAP_TYPE_FL" in bpf_types.h. The original "BPF_MAP_TYPE" is defined to "BPF_MAP_TYPE_FL(..., 0)". It will be less error prone when a map's properties is decided at the same place

[PATCH v2 bpf-next 2/3] bpf: Relax the max_entries check for inner map

2020-05-21 Thread Martin KaFai Lau
This patch relaxes the max_entries check for most of the inner map types during an update to the outer map. The max_entries of those map types are only used in runtime. By doing this, an inner map with different size can be updated to the outer map in runtime. People has a use case that starts w

[PATCH v2 bpf-next 0/3] bpf: Allow inner map with different max_entries

2020-05-21 Thread Martin KaFai Lau
People has a use case that starts with a smaller inner map first and then replaces it with a larger inner map later when it is needed. This series allows the outer map to be updated with inner map in different size as long as it is safe (meaning the max_entries is not used in the verification time

[PATCH v2 bpf-next 3/3] bpf: selftests: Add test for different inner map size

2020-05-21 Thread Martin KaFai Lau
This patch tests the inner map size can be different for reuseport_sockarray but has to be the same for arraymap. Cc: Andrey Ignatov Signed-off-by: Martin KaFai Lau --- .../selftests/bpf/prog_tests/btf_map_in_map.c | 12 +++ .../selftests/bpf/progs/test_btf_map_in_map.c | 31 +++

[PATCH net] mptcp: use untruncated hash in ADD_ADDR HMAC

2020-05-21 Thread Todd Malsbary
There is some ambiguity in the RFC as to whether the ADD_ADDR HMAC is the rightmost 64 bits of the entire hash or of the leftmost 160 bits of the hash. The intention, as clarified with the author of the RFC, is the entire hash. This change returns the entire hash from mptcp_crypto_hmac_sha (inste

Re: [PATCH v2] xfrm: policy: Fix xfrm policy match

2020-05-21 Thread Yuehaibing
On 2020/5/21 14:49, Xin Long wrote: > On Tue, May 19, 2020 at 4:53 PM Steffen Klassert > wrote: >> >> On Fri, May 15, 2020 at 04:39:57PM +0800, Yuehaibing wrote: >>> >>> Friendly ping... >>> >>> Any plan for this issue? >> >> There was still no consensus between you and Xin on how >> to fix this i

Re: [PATCH 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2020-05-21 Thread Singh, Balbir
> @@ -1057,7 +1063,7 @@ static int xen_translate_vdev(int vdevice, int *minor, > unsigned int *offset) > case XEN_SCSI_DISK5_MAJOR: > case XEN_SCSI_DISK6_MAJOR: > case XEN_SCSI_DISK7_MAJOR: > - *offset = (*minor / PARTS_PER_DISK) + > +

Re: [PATCH v2 bpf-next 7/7] docs/bpf: add BPF ring buffer design notes

2020-05-21 Thread Alexei Starovoitov
On Sun, May 17, 2020 at 12:57:27PM -0700, Andrii Nakryiko wrote: > Add commit description from patch #1 as a stand-alone documentation under > Documentation/bpf, as it might be more convenient format, in long term > perspective. > > Suggested-by: Stanislav Fomichev > Signed-off-by: Andrii Nakryik

Re: [PATCH v2 bpf-next 6/7] bpf: add BPF ringbuf and perf buffer benchmarks

2020-05-21 Thread Alexei Starovoitov
On Sun, May 17, 2020 at 12:57:26PM -0700, Andrii Nakryiko wrote: > + > +static inline int roundup_len(__u32 len) > +{ > + /* clear out top 2 bits */ > + len <<= 2; > + len >>= 2; > + /* add length prefix */ > + len += RINGBUF_META_LEN; > + /* round up to 8 byte alignment */

Re: [PATCH v2 bpf-next 5/7] selftests/bpf: add BPF ringbuf selftests

2020-05-21 Thread Alexei Starovoitov
On Sun, May 17, 2020 at 12:57:25PM -0700, Andrii Nakryiko wrote: > diff --git a/tools/testing/selftests/bpf/progs/test_ringbuf_multi.c > b/tools/testing/selftests/bpf/progs/test_ringbuf_multi.c > new file mode 100644 > index ..7eb85dd9cd66 > --- /dev/null > +++ b/tools/testing/selftest

DRINGENDES DARLEHENANGEBOT JETZT GELTEN

2020-05-21 Thread Emmanuel Richard
-- Suchen Sie ein Darlehen? Wir bieten Privatkredite, Geschäftskredite, Studentenkredite, Autokredite und Kredite an Um Rechnungen von 1 EURO bis 18.000.000,00 Euro, Dollar und Pfund mit 3% Zinsen abzuzahlen Wenn Sie einen Kredit benötigen, kontaktieren Sie uns jetzt nur über diese E-Mai

Re: [PATCH v2 bpf-next 4/7] libbpf: add BPF ring buffer support

2020-05-21 Thread Alexei Starovoitov
On Sun, May 17, 2020 at 12:57:24PM -0700, Andrii Nakryiko wrote: > + > +static inline int roundup_len(__u32 len) > +{ > + /* clear out top 2 bits */ > + len <<= 2; > + len >>= 2; what this is for? Overflow prevention? but kernel checked the size already? > + /* add length prefix *

[PATCH RFC] net: Avoid spurious rx_dropped increases with tap and rx_handler

2020-05-21 Thread Benjamin Poirier
Consider an skb which doesn't match a ptype_base/ptype_specific handler. If this skb is delivered to a ptype_all handler, it does not count as a drop. However, if the skb is also processed by an rx_handler which returns RX_HANDLER_PASS, the frame is now counted as a drop because pt_prev was reset.

Re: [PATCH v2 bpf-next 3/7] bpf: track reference type in verifier

2020-05-21 Thread Alexei Starovoitov
On Sun, May 17, 2020 at 12:57:23PM -0700, Andrii Nakryiko wrote: > > +static enum bpf_ref_type get_release_ref_type(enum bpf_func_id func_id) > +{ > + switch (func_id) { > + case BPF_FUNC_sk_release: > + return BPF_REF_SOCKET; > + case BPF_FUNC_ringbuf_submit: > + case

Re: [PATCH v2 bpf-next 1/7] bpf: implement BPF ring buffer and verifier support for it

2020-05-21 Thread Alexei Starovoitov
On Sun, May 17, 2020 at 12:57:21PM -0700, Andrii Nakryiko wrote: > - if (off < 0 || size < 0 || (size == 0 && !zero_size_allowed) || > - off + size > map->value_size) { > - verbose(env, "invalid access to map value, value_size=%d off=%d > size=%d\n", > -

[PATCH RFC bpf-next 3/4] xdp: Add xdp_txq_info to xdp_buff

2020-05-21 Thread David Ahern
Add xdp_txq_info as the Tx counterpart to xdp_rxq_info. At the moment only the device is added. Other fields (queue_index) can be added as use cases arise. >From a UAPI perspective, add egress_ifindex to xdp context. Update the verifier to only allow accesses to egress_ifindex by XDP programs wit

[PATCH RFC bpf-next 4/4] bpftool: Add SEC name for xdp programs attached to device map

2020-05-21 Thread David Ahern
Support SEC("xdp_dm*") as a short cut for loading the program with type BPF_PROG_TYPE_XDP and expected attach type BPF_XDP_DEVMAP. Signed-off-by: David Ahern --- tools/lib/bpf/libbpf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index fa0

[PATCH RFC bpf-next 2/4] bpf: Add support to attach bpf program to a devmap

2020-05-21 Thread David Ahern
Add BPF_XDP_DEVMAP attach type for use with programs associated with a DEVMAP. DEVMAPs can associate a program with a device entry by setting the value to pair. The program associated with the id must have type XDP with expected attach type BPF_XDP_DEVMAP. When a program is associated with a devi

[PATCH RFC bpf-next 0/4] bpf: Add support for XDP programs in DEVMAPs

2020-05-21 Thread David Ahern
Implementation of Daniel's proposal for allowing DEVMAP entries to be a device index, program id pair. Daniel suggested an fd to specify the program, but that seems odd to me that you insert the value as an fd, but read it back as an id since the fd can be closed. David Ahern (4): bpf: Handle 8-

[PATCH RFC bpf-next 1/4] bpf: Handle 8-byte values in DEVMAP and DEVMAP_HASH

2020-05-21 Thread David Ahern
Add support to DEVMAP and DEVMAP_HASH to support 8-byte values as a pair. To do this, a new struct is needed in bpf_dtab_netdev to hold the values to return on lookup. Signed-off-by: David Ahern --- kernel/bpf/devmap.c | 53 ++--- 1 file changed, 40 inser

RE: [EXT] Re: [PATCH net 3/4] ARM: dts: imx6: update fec gpr property to match new format

2020-05-21 Thread Andy Duan
From: Andrew Lunn Sent: Thursday, May 21, 2020 9:07 PM > > Andrew, patch#1 in the series will parse the property to get register offset > and bit. > > Patch#2 describes the property format as below: > ><&gpr req_gpr req_bit>. > > gpr is the phandle to general purpose register node.

Re: [PATCH bpf] flow_dissector: Drop BPF flow dissector prog ref on netns cleanup

2020-05-21 Thread Alexei Starovoitov
On Thu, May 21, 2020 at 12:09 PM Andrii Nakryiko wrote: > > On Wed, May 20, 2020 at 10:24 AM Jakub Sitnicki wrote: > > > > When attaching a flow dissector program to a network namespace with > > bpf(BPF_PROG_ATTACH, ...) we grab a reference to bpf_prog. > > > > If netns gets destroyed while a flo

Re: [bpf-next PATCH v2 0/4] ] verifier, improve ptr is_branch_taken logic

2020-05-21 Thread Alexei Starovoitov
On Thu, May 21, 2020 at 3:21 PM Andrii Nakryiko wrote: > > On Thu, May 21, 2020 at 1:07 PM John Fastabend > wrote: > > > > This series adds logic to the verifier to handle the case where a > > pointer is known to be non-null but then the verifier encountesr a > > instruction, such as 'if ptr ==

Re: [PATCH bpf-next v5 00/15] Introduce AF_XDP buffer allocation API

2020-05-21 Thread Alexei Starovoitov
On Wed, May 20, 2020 at 12:21 PM Björn Töpel wrote: > > Overview > > > Driver adoption for AF_XDP has been slow. The amount of code required > to proper support AF_XDP is substantial and the driver/core APIs are > vague or even non-existing. Drivers have to manually adjust data > offsets,

Re: [PATCH v2 bpf-next 2/7] tools/memory-model: add BPF ringbuf MPSC litmus tests

2020-05-21 Thread Paul E. McKenney
On Sun, May 17, 2020 at 12:57:22PM -0700, Andrii Nakryiko wrote: > Add 4 litmus tests for BPF ringbuf implementation, divided into two different > use cases. > > First, two unbounded case, one with 1 producer and another with > 2 producers, single consumer. All reservations are supposed to succeed

Re: [PATCH net-next] net: phy: mscc: fix initialization of the MACsec protocol mode

2020-05-21 Thread David Miller
From: Antoine Tenart Date: Wed, 20 May 2020 12:03:55 +0200 > What's the best way to handle this? I can provide all the patches. Resubmit this against 'net' please, then I'll deal with the fallout when I merge net into net-next.

Re: [PATCH] net: sgi: ioc3-eth: Fix return value check in ioc3eth_probe()

2020-05-21 Thread David Miller
From: Tang Bin Date: Wed, 20 May 2020 17:55:32 +0800 > In the function devm_platform_ioremap_resource(), if get resource > failed, the return value is ERR_PTR() not NULL. Thus it must be > replaced by IS_ERR(), or else it may result in crashes if a critical > error path is encountered. > > Fixes

Re: [PATCH net] net: don't return invalid table id error when we fall back to PF_UNSPEC

2020-05-21 Thread David Miller
From: Sabrina Dubroca Date: Wed, 20 May 2020 11:15:46 +0200 > In case we can't find a ->dumpit callback for the requested > (family,type) pair, we fall back to (PF_UNSPEC,type). In effect, we're > in the same situation as if userspace had requested a PF_UNSPEC > dump. For RTM_GETROUTE, that handl

Re: [PATCH v2 bpf-next 1/7] bpf: implement BPF ring buffer and verifier support for it

2020-05-21 Thread Paul E. McKenney
On Sun, May 17, 2020 at 12:57:21PM -0700, Andrii Nakryiko wrote: > This commits adds a new MPSC ring buffer implementation into BPF ecosystem, > which allows multiple CPUs to submit data to a single shared ring buffer. On > the consumption side, only single consumer is assumed. [ . . . ] Focusing

Re: [net] net: ipip: fix wrong address family in init error path

2020-05-21 Thread David Miller
From: Vadim Fedorenko Date: Wed, 20 May 2020 11:50:48 +0300 > In case of error with MPLS support the code is misusing AF_INET > instead of AF_MPLS. > > Fixes: 1b69e7e6c4da ("ipip: support MPLS over IPv4") > Signed-off-by: Vadim Fedorenko Applied and queued up for -stable, thanks.

Re: clean up and streamline probe_kernel_* and friends v4

2020-05-21 Thread Masami Hiramatsu
On Thu, 21 May 2020 17:22:38 +0200 Christoph Hellwig wrote: > Hi all, > > this series start cleaning up the safe kernel and user memory probing > helpers in mm/maccess.c, and then allows architectures to implement > the kernel probing without overriding the address space limit and > temporarily

Re: [net v3 0/2] net/tls: fix encryption error path

2020-05-21 Thread David Miller
From: Vadim Fedorenko Date: Wed, 20 May 2020 11:41:42 +0300 > The problem with data stream corruption was found in KTLS > transmit path with small socket send buffers and large > amount of data. bpf_exec_tx_verdict() frees open record > on any type of error including EAGAIN, ENOMEM and ENOSPC >

Re: [PATCH net-next v3 0/2] provide KAPI for SQI

2020-05-21 Thread David Miller
From: Oleksij Rempel Date: Wed, 20 May 2020 08:29:13 +0200 > This patches are extending ethtool netlink interface to export Signal > Quality Index (SQI). SQI provided by 100Base-T1 PHYs and can be used for > cable diagnostic. Compared to a typical cable tests, this value can be > only used after

Re: [PATCH 0/2 v3] net: ethernet: ti: fix some return value check

2020-05-21 Thread David Miller
From: Wei Yongjun Date: Wed, 20 May 2020 11:41:14 +0800 > This patchset convert cpsw_ale_create() to return PTR_ERR() only, and > changed all the caller to check IS_ERR() instead of NULL. > > Since v2: > 1) rebased on net.git, as Jakub's suggest > 2) split am65-cpsw-nuss.c changes, as Grygorii's

[net-next v2 07/15] igc: Remove header redirection register

2020-05-21 Thread Jeff Kirsher
From: Sasha Neftin Header redirection missed packet counter not applicable for i225 device. This patch comes to clean up this register. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_regs.h | 1 - 1 file changed, 1 deleti

[net-next v2 14/15] igc: Align terms used in NFC support code

2020-05-21 Thread Jeff Kirsher
From: Andre Guedes The Network Flow Classification (NFC) support code from IGC driver uses terms such as 'rule', 'filter', 'entry', 'input' interchangeably when referring to NFC rules, making it harder to follow the code. This patch renames IGC's internal APIs, structs, and variables so we stick

[net-next v2 03/15] igc: Add support for source address filters in core

2020-05-21 Thread Jeff Kirsher
From: Andre Guedes This patch extends MAC address filter internal APIs igc_add_mac_filter() and igc_del_mac_filter(), as well as local helpers, to support filters based on source address. A new parameters 'type' is added to the APIs to indicate if the filter type is source or destination. In cas

[net-next v2 09/15] igc: Remove unused field from igc_nfc_filter

2020-05-21 Thread Jeff Kirsher
From: Andre Guedes The 'cookie' field is not used anywhere in the code so this patch removes it from struct igc_nfc_filter. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc.h | 1 - 1 file changed, 1 deletion(-) diff --git

[net-next v2 05/15] e1000: Do not perform reset in reset_task if we are already down

2020-05-21 Thread Jeff Kirsher
From: Alexander Duyck We are seeing a deadlock in e1000 down when NAPI is being disabled. Looking over the kernel function trace of the system it appears that the interface is being closed and then a reset is hitting which deadlocks the interface as the NAPI interface is already disabled. To pre

[net-next v2 15/15] igc: Change byte order in struct igc_nfc_filter

2020-05-21 Thread Jeff Kirsher
From: Andre Guedes Every time we access the 'etype' and 'vlan_tci' fields from struct igc_nfc_filter to enable or disable filters in hardware we have to convert them from big endian to host order so it makes more sense to simply have these fields in host order. The byte order conversion should t

[net-next v2 11/15] igc: Cleanup _get|set_rxnfc ethtool ops

2020-05-21 Thread Jeff Kirsher
From: Andre Guedes This patch does a trivial change in igc_ethtool_get_rxnfc() and igc_ethtool_set_rxnfc() to simplify their logic. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_ethtool.c | 33 ++-- 1 fil

[net-next v2 06/15] igc: Remove obsolete circuit breaker registers

2020-05-21 Thread Jeff Kirsher
From: Sasha Neftin Part of circuit breaker registers is obsolete and not applicable for i225 device. This patch comes to clean up these registers. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_mac.c | 4 drivers/ne

[net-next v2 08/15] igc: Remove per queue good transmited counter register

2020-05-21 Thread Jeff Kirsher
From: Sasha Neftin Per queue good transmitted packet counter not applicable for i225 device. This patch comes to clean up this register. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_regs.h | 3 --- 1 file changed, 3 del

[net-next v2 12/15] igc: Early return in igc_get_ethtool_nfc_entry()

2020-05-21 Thread Jeff Kirsher
From: Andre Guedes This patch re-writes the second half of igc_ethtool_get_nfc_entry() to follow the 'return early' pattern seen in other parts of the driver and removes some duplicate comments. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/et

[net-next v2 13/15] igc: Add 'igc_ethtool_' prefix to functions in igc_ethtool.c

2020-05-21 Thread Jeff Kirsher
From: Andre Guedes This patch adds the prefix 'igc_ethtool_' to all functions defined in igc_ethtool.c so they align with the name convention already followed by other parts of the driver (e.g. igc_tsn, igc_ptp). Also, this avoids some name clashing with functions added to igc_main.c by upcoming

[net-next v2 02/15] igc: Remove mac_table from igc_adapter

2020-05-21 Thread Jeff Kirsher
From: Andre Guedes In igc_adapter we keep a sort of shadow copy of RAL and RAH registers. There is not much benefit in keeping it, at the cost of maintainability, since adding/removing MAC address filters is not hot path, and we already keep filters information in adapter->nfc_filter_list for cle

[net-next v2 04/15] igc: Enable NFC rules based source MAC address

2020-05-21 Thread Jeff Kirsher
From: Andre Guedes This patch adds support for Network Flow Classification (NFC) rules based on source MAC address. Note that the controller doesn't support rules with both source and destination addresses set, so this special case is checked in igc_add_ethtool_nfc_entry(). Signed-off-by: Andre

[net-next v2 10/15] igc: Get rid of igc_max_channels()

2020-05-21 Thread Jeff Kirsher
From: Andre Guedes The local function igc_max_channels() is a pointless wrapper around igc_get_max_rss_queues(). This patch removes it and updates the callers accordingly. It also does some cleanup on igc_get_max_rss_queues(). Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: J

  1   2   3   4   5   >