Re: [PATCH net-next 0/3] cxgb4: add mirror action support for TC-MATCHALL

2020-06-26 Thread Rahul Lakkireddy
On Friday, June 06/26/20, 2020 at 21:17:50 -0700, Jakub Kicinski wrote: > On Sat, 27 Jun 2020 02:20:12 +0530 Rahul Lakkireddy wrote: > > On Friday, June 06/26/20, 2020 at 09:55:49 -0700, Jakub Kicinski wrote: > > > On Fri, 26 Jun 2020 15:36:15 +0530 Rahul Lakkireddy wrote: > > > > On Thursday, Ju

[PATCH net-next v3 2/5] hinic: add support to set and get irq coalesce

2020-06-26 Thread Luo bin
add support to set TX/RX irq coalesce params with ethtool -C and get these params with ethtool -c. Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 8 + .../net/ethernet/huawei/hinic/hinic_ethtool.c | 294 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.

[PATCH net-next v3 0/5] hinic: add some ethtool ops support

2020-06-26 Thread Luo bin
patch #1: support to set and get pause params with "ethtool -A/a" cmd patch #2: support to set and get irq coalesce params with "ethtool -C/c" cmd patch #3: support to do self test with "ethtool -t" cmd patch #4: support to identify physical device with "ethtool -p" cmd patch #5

[PATCH net-next v3 1/5] hinic: add support to set and get pause params

2020-06-26 Thread Luo bin
add support to set pause params with ethtool -A and get pause params with ethtool -a. Also remove set_link_ksettings ops for VF and enable pause by default. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 96 ++- .../net/ethernet/huawei/hinic/hinic_hw_d

[PATCH net-next v3 4/5] hinic: add support to identify physical device

2020-06-26 Thread Luo bin
add support to identify physical device by flashing an LED attached to it with ethtool -p cmd. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 41 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 2 + .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 1 +

[PATCH net-next v3 5/5] hinic: add support to get eeprom information

2020-06-26 Thread Luo bin
add support to get eeprom information from the plug-in module with ethtool -m cmd. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 69 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 4 ++ .../net/ethernet/huawei/hinic/hinic_port.c| 72 +

[PATCH net-next v3 3/5] hinic: add self test support

2020-06-26 Thread Luo bin
add support to excute internal and external loopback test with ethtool -t cmd. Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 6 + .../net/ethernet/huawei/hinic/hinic_ethtool.c | 178 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 3 + .../net/

[PATCH] qlge.h: Adding the missing blank line after declarations

2020-06-26 Thread B K Karthik
Signed-off-by: B K Karthik --- drivers/staging/qlge/qlge.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/qlge/qlge.h b/drivers/staging/qlge/qlge.h index fc8c5ca8935d..0b971a633001 100644 --- a/drivers/staging/qlge/qlge.h +++ b/drivers/staging/qlge/qlge.h @@ -2224,6 +2224,7 @

Re: wireguard: problem sending via libpcap's packet socket

2020-06-26 Thread Jason A. Donenfeld
Hi again Hans, A few remarks: although gre implements header_ops, it looks like various parts of the networking stack change behavior based on it. I'm still analyzing that to understand the extent of the effects. Something like

Re: [PATCH v1] bnx2x: use generic power management

2020-06-26 Thread Vaibhav Gupta
On Sat, 27 Jun 2020 at 00:44, David Miller wrote: > > From: Vaibhav Gupta > Date: Wed, 24 Jun 2020 23:21:17 +0530 > > > With legacy PM, drivers themselves were responsible for managing the > > device's power states and takes care of register states. > > > > After upgrading to the generic structur

Re: KASAN: use-after-free Read in tipc_nl_node_dump_monitor_peer (2)

2020-06-26 Thread syzbot
Hello, syzbot has tested the proposed patch and the reproducer did not trigger crash: Reported-and-tested-by: syzbot+c96e4dfb32f8987fd...@syzkaller.appspotmail.com Tested on: commit: 152c6a4d genetlink: get rid of family->attrbuf git tree: https://github.com/congwang/linux.git net

Re: [net-next 05/13] igc: Check __IGC_PTP_TX_IN_PROGRESS instead of ptp_tx_skb

2020-06-26 Thread Jakub Kicinski
On Fri, 26 Jun 2020 18:54:23 -0700 Jeff Kirsher wrote: > From: Andre Guedes > > The __IGC_PTP_TX_IN_PROGRESS flag indicates we have a pending Tx > timestamp. In some places, instead of checking that flag, we check > adapter->ptp_tx_skb. This patch fixes those places to use the flag. > > Quick no

Re: [PATCH net-next 1/3] cxgb4: add mirror action to TC-MATCHALL offload

2020-06-26 Thread Jakub Kicinski
On Thu, 25 Jun 2020 17:28:41 +0530 Rahul Lakkireddy wrote: > + if (refcount_read(&pi->vi_mirror_refcnt) > 1) { > + refcount_dec(&pi->vi_mirror_refcnt); > + return; > + } FWIW this looks very dodgy. If you know nothing changes the count between the read and the dec h

Re: [PATCH net-next 0/3] cxgb4: add mirror action support for TC-MATCHALL

2020-06-26 Thread Jakub Kicinski
On Sat, 27 Jun 2020 02:20:12 +0530 Rahul Lakkireddy wrote: > On Friday, June 06/26/20, 2020 at 09:55:49 -0700, Jakub Kicinski wrote: > > On Fri, 26 Jun 2020 15:36:15 +0530 Rahul Lakkireddy wrote: > > > On Thursday, June 06/25/20, 2020 at 15:55:10 -0700, Jakub Kicinski wrote: > > > > > > > On T

Re: [PATCH net-next] Fix unchecked dereference

2020-06-26 Thread Jakub Kicinski
On Fri, 26 Jun 2020 19:23:21 +0200 (CEST) Justin Iurman wrote: > Hi Jakub, > > It is an inline modification of the patch 4 of this series. The > modification in itself cannot be a problem. Maybe I did send it the > wrong way? Ah, sorry I didn't notice the threading. Please don't tag fixups like t

Re: KASAN: use-after-free Read in tipc_nl_node_dump_monitor_peer (2)

2020-06-26 Thread Cong Wang
#syz test: https://github.com/congwang/linux.git net

KASAN: use-after-free Read in tipc_nl_node_dump_monitor_peer (2)

2020-06-26 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:4a21185c Merge git://git.kernel.org/pub/scm/linux/kernel/g.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1364f2e510 kernel config: https://syzkaller.appspot.com/x/.config?x=20c907630cbdbe5 dash

Re: [PATCH net-next v13 2/3] xen networking: add basic XDP support for xen-netfront

2020-06-26 Thread kernel test robot
Hi Denis, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Denis-Kirjanov/xen-networking-add-XDP-support-to-xen-netfront/20200626-194340 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem

Re: [PATCH net-next v2 5/5] hinic: add support to get eeprom information

2020-06-26 Thread luobin (L)
On 2020/6/24 6:02, Jakub Kicinski wrote: > On Tue, 23 Jun 2020 22:24:09 +0800 Luo bin wrote: >> +int hinic_get_sfp_type(struct hinic_hwdev *hwdev, u8 *data0, u8 *data1) >> +{ >> +u8 sfp_data[STD_SFP_INFO_MAX_SIZE]; >> +u16 len; >> +int err; >> + >> +if (!hwdev || !data0 || !data1) >

[net-next 00/13][pull request] 1GbE Intel Wired LAN Driver Updates 2020-06-26

2020-06-26 Thread Jeff Kirsher
This series contains updates to only the igc driver. Sasha added Energy Efficient Ethernet (EEE) support and Latency Tolerance Reporting (LTR) support for the igc driver. Added Low Power Idle (LPI) counters and cleaned up unused TCP segmentation counters. Removed igc_power_down_link() and call igc

[net-next 06/13] igc: Remove UDP filter setup in PTP code

2020-06-26 Thread Jeff Kirsher
From: Andre Guedes As implemented in igc_ethtool_get_ts_info(), igc only supports HWTSTAMP_ FILTER_ALL so any HWTSTAMP_FILTER_* option the user may set falls back to HWTSTAMP_FILTER_ALL. HWTSTAMP_FILTER_ALL is implemented via Rx Time Sync Control (TSYNCRXCTL) configuration which timestamps all i

[net-next 09/13] igc: Add LPI counters

2020-06-26 Thread Jeff Kirsher
From: Sasha Neftin Add EEE TX LPI and EEE RX LPI counters. A EEE TX LPI event occurs when the transmitter enters EEE (IEEE 802.3az) LPI state. A EEE RX LPI event occurs when the receiver detect link partner entry into EEE(IEEE 802.3az) LPI state. Signed-off-by: Sasha Neftin Tested-by: Aaron Bro

[net-next 01/13] igc: Add initial EEE support

2020-06-26 Thread Jeff Kirsher
From: Sasha Neftin IEEE802.3az-2010 Energy Efficient Ethernet has been approved as standard (September 2010) and the driver can enable and disable it via ethtool. Disable the feature by default on parts which support it. Add enable/disable eee options. tx-lpi, tx-timer and advertise not supported

[net-next 04/13] igc: Remove duplicate code in Tx timestamp handling

2020-06-26 Thread Jeff Kirsher
From: Andre Guedes The functions igc_ptp_tx_hang() and igc_ptp_tx_work() have duplicate code which handles Tx timestamp timeouts. This patch does a trivial refactoring by moving that code to its own function and reusing it. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Jeff

[net-next 02/13] igc: Add initial LTR support

2020-06-26 Thread Jeff Kirsher
From: Sasha Neftin The LTR message on the PCIe inform the requested latency on which the PCIe must become active to the downstream PCIe port of the system. This patch provide recommended LTR parameters by i225 specification. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jef

[net-next 13/13] igc: Remove checking media type during MAC initialization

2020-06-26 Thread Jeff Kirsher
From: Sasha Neftin i225 device support only copper mode. There is no point to check media type in the igc_config_fc_after_link_up() method. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_mac.c | 8 +++- 1 file changed

[net-next 08/13] igc: Fix Rx timestamp disabling

2020-06-26 Thread Jeff Kirsher
From: Andre Guedes When Rx timestamping is enabled, we set the timestamp bit in SRRCTL register for each queue, but we don't clear it when disabling. This patch fixes igc_ptp_disable_rx_timestamp() accordingly. Also, this patch gets rid of igc_ptp_enable_tstamp_rxqueue() and igc_ptp_enable_tstam

[net-next 10/13] igc: Remove TCP segmentation TX fail counter

2020-06-26 Thread Jeff Kirsher
From: Sasha Neftin TCP segmentation TX context fail counter is not applicable for i225 devices. This patch comes to clean up this counter. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_mac.c | 1 - drivers/net/ethernet/i

[net-next 12/13] igc: Remove unneeded check for copper media type

2020-06-26 Thread Jeff Kirsher
From: Sasha Neftin PHY of the i225 device support only copper mode. There is no point to check media type in the igc_power_up_link() method. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_main.c | 3 +-- 1 file changed, 1

[net-next 03/13] igc: Clean up Rx timestamping logic

2020-06-26 Thread Jeff Kirsher
From: Andre Guedes Differently from I210, I225 doesn't report Rx timestamps via the TS bit Rx descriptor + RXSTMPL/RXSTMPH registers mechanism. Rx timestamps are reported in the packet buffer only, which is implemented by igc_ptp_rx_ pktstamp(). So this patch removes igc_ptp_rx_rgtstamp() and all

[net-next 07/13] igc: Refactor igc_ptp_set_timestamp_mode()

2020-06-26 Thread Jeff Kirsher
From: Andre Guedes Current igc_ptp_set_timestamp_mode() logic is a bit tangled since it handles many different hardware configurations in one single place, making it harder to follow. This patch untangles that code by breaking it into helper functions. Quick note about the hw->mac.type check whi

[net-next 11/13] igc: Refactor the igc_power_down_link()

2020-06-26 Thread Jeff Kirsher
From: Sasha Neftin Currently the implementation of igc_power_down_link() method was just calling igc_power_down_phy_copper_base() method. We can just call igc_power_down_phy_copper_base() method directly. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- driv

[net-next 05/13] igc: Check __IGC_PTP_TX_IN_PROGRESS instead of ptp_tx_skb

2020-06-26 Thread Jeff Kirsher
From: Andre Guedes The __IGC_PTP_TX_IN_PROGRESS flag indicates we have a pending Tx timestamp. In some places, instead of checking that flag, we check adapter->ptp_tx_skb. This patch fixes those places to use the flag. Quick note about igc_ptp_tx_hwtstamp() change: when that function is called,

Re: [PATCH net-next v2 1/5] hinic: add support to set and get pause params

2020-06-26 Thread luobin (L)
On 2020/6/24 5:54, Jakub Kicinski wrote: > On Tue, 23 Jun 2020 22:24:05 +0800 Luo bin wrote: >> diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c >> b/drivers/net/ethernet/huawei/hinic/hinic_main.c >> index e9e6f4c9309a..e69edb01fd9b 100644 >> --- a/drivers/net/ethernet/huawei/hinic/hini

Re: [net-next v3 11/15] iecm: Add splitq TX/RX

2020-06-26 Thread Joe Perches
On Fri, 2020-06-26 at 12:58 -0700, Jakub Kicinski wrote: > On Thu, 25 Jun 2020 19:07:33 -0700 Jeff Kirsher wrote: > > @@ -1315,7 +1489,18 @@ iecm_tx_splitq_clean(struct iecm_queue *tx_q, u16 > > end, int napi_budget, > > */ > > static inline void iecm_tx_hw_tstamp(struct sk_buff *skb, u8 *desc_

RE: Re: [v1,net-next 3/4] net: qos: police action add index for tc flower offloading

2020-06-26 Thread Po Liu
Hi Jamal, > -Original Message- > From: Jamal Hadi Salim > Sent: 2020年6月26日 21:28 > To: Po Liu ; da...@davemloft.net; linux- > ker...@vger.kernel.org; netdev@vger.kernel.org; ido...@idosch.org > Cc: j...@resnulli.us; vinicius.go...@intel.com; v...@buslov.dev; Claudiu > Manoil ; Vladimir O

Re: [PATCH bpf-next v2 2/4] libbpf: add support for BPF_CGROUP_INET_SOCK_RELEASE

2020-06-26 Thread Andrii Nakryiko
On Fri, Jun 26, 2020 at 4:52 PM Stanislav Fomichev wrote: > > On Fri, Jun 26, 2020 at 3:08 PM Andrii Nakryiko > wrote: > > > > On Fri, Jun 26, 2020 at 10:22 AM Stanislav Fomichev wrote: > > > > > > Add auto-detection for the cgroup/sock_release programs. > > > > > > Signed-off-by: Stanislav Fomi

Re: [PATCH bpf-next 4/4] selftests/bpf: test BPF_CGROUP_INET_SOCK_RELEASE

2020-06-26 Thread Andrii Nakryiko
On Fri, Jun 26, 2020 at 4:52 PM Stanislav Fomichev wrote: > > On Fri, Jun 26, 2020 at 3:06 PM Andrii Nakryiko > wrote: > > > > On Thu, Jun 25, 2020 at 5:13 PM Stanislav Fomichev wrote: > > > > > > Simple test that enforces a single SOCK_DGRAM socker per cgroup. > > > > > > Signed-off-by: Stanisl

Re: [PATCH v3 bpf-next 4/4] selftests/bpf: add bpf_iter test with bpf_get_task_stack()

2020-06-26 Thread Yonghong Song
On 6/26/20 5:26 PM, Song Liu wrote: The new test is similar to other bpf_iter tests. It would be great if you can show some results from bpf_iter_task_stack.c dump. Signed-off-by: Song Liu --- .../selftests/bpf/prog_tests/bpf_iter.c | 17 ++ .../selftests/bpf/progs/bpf_ite

[PATCH net] genetlink: take netlink table lock when (un)registering

2020-06-26 Thread Sean Tranchetti
A potential deadlock can occur during registering or unregistering a new generic netlink family between the main nl_table_lock and the cb_lock where each thread wants the lock held by the other, as demonstrated below. 1) Thread 1 is performing a netlink_bind() operation on a socket. As part of

[PATCH v3 bpf-next 1/4] perf: expose get/put_chain_entry()

2020-06-26 Thread Song Liu
Sanitize and expose get/put_chain_entry(). This would be used by bpf stack map. Suggested-by: Peter Zijlstra Signed-off-by: Song Liu --- include/linux/perf_event.h | 2 ++ kernel/events/callchain.c | 13 ++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/linu

[PATCH v3 bpf-next 4/4] selftests/bpf: add bpf_iter test with bpf_get_task_stack()

2020-06-26 Thread Song Liu
The new test is similar to other bpf_iter tests. Signed-off-by: Song Liu --- .../selftests/bpf/prog_tests/bpf_iter.c | 17 ++ .../selftests/bpf/progs/bpf_iter_task_stack.c | 53 +++ 2 files changed, 70 insertions(+) create mode 100644 tools/testing/selftests/bpf/progs/

[PATCH v3 bpf-next 1/4] perf: expose get/put_callchain_entry()

2020-06-26 Thread Song Liu
Sanitize and expose get/put_callchain_entry(). This would be used by bpf stack map. Suggested-by: Peter Zijlstra Signed-off-by: Song Liu --- include/linux/perf_event.h | 2 ++ kernel/events/callchain.c | 13 ++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/

[PATCH v3 bpf-next 0/4] bpf: introduce bpf_get_task_stack()

2020-06-26 Thread Song Liu
This set introduces a new helper bpf_get_task_stack(). The primary use case is to dump all /proc/*/stack to seq_file via bpf_iter__task. A few different approaches have been explored and compared: 1. A simple wrapper around stack_trace_save_tsk(), as v1 [1]. This approach introduces new s

Re: wireguard: problem sending via libpcap's packet socket

2020-06-26 Thread Jason A. Donenfeld
Hi Hans, Your test program appears to be doing: socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)) = 3 sendto(3, "E\0\0+\0\0@\0@\21\267o\300\250\1\1\300\250\1\1\4\322\4\322\0\0272\221\1\2\3\4"..., 43, 0, NULL, 0) = 43 This means we're calling into af_packet's packet_sendmsg->packet_snd, which appear

Re: [PATCH bpf-next 07/10] bpf: selftests: Restore netns after each test

2020-06-26 Thread Martin KaFai Lau
On Fri, Jun 26, 2020 at 03:45:04PM -0700, Andrii Nakryiko wrote: > On Fri, Jun 26, 2020 at 10:56 AM Martin KaFai Lau wrote: > > > > It is common for networking tests creating its netns and making its own > > setting under this new netns (e.g. changing tcp sysctl). If the test > > forgot to restor

Re: [PATCH v2 bpf-next 2/4] bpf: introduce helper bpf_get_task_stak()

2020-06-26 Thread Andrii Nakryiko
On Fri, Jun 26, 2020 at 4:47 PM Song Liu wrote: > > > > > On Jun 26, 2020, at 3:51 PM, Andrii Nakryiko > > wrote: > > > > On Fri, Jun 26, 2020 at 3:45 PM Song Liu wrote: > >> > >> > >> > >>> On Jun 26, 2020, at 1:17 PM, Andrii Nakryiko > >>> wrote: > >>> > >>> On Thu, Jun 25, 2020 at 5:14 PM

Re: [PATCH 2/2] staging: qlge: fix else after return or break

2020-06-26 Thread Joe Perches
On Sat, 2020-06-27 at 07:57 +0800, Coiby Xu wrote: > On Thu, Jun 25, 2020 at 03:13:14PM -0700, Joe Perches wrote: > > On Fri, 2020-06-26 at 05:57 +0800, Coiby Xu wrote: > > > Remove unnecessary elses after return or break. > > > > unrelated trivia: [] > > looks like all of these could use netdev_e

Re: [PATCH 2/2] staging: qlge: fix else after return or break

2020-06-26 Thread Coiby Xu
On Thu, Jun 25, 2020 at 03:13:14PM -0700, Joe Perches wrote: On Fri, 2020-06-26 at 05:57 +0800, Coiby Xu wrote: Remove unnecessary elses after return or break. unrelated trivia: diff --git a/drivers/staging/qlge/qlge_dbg.c b/drivers/staging/qlge/qlge_dbg.c [] @@ -1391,12 +1391,11 @@ static

Re: [PATCH v2 bpf-next 2/4] bpf: introduce helper bpf_get_task_stak()

2020-06-26 Thread Song Liu
> On Jun 26, 2020, at 3:51 PM, Andrii Nakryiko > wrote: > > On Fri, Jun 26, 2020 at 3:45 PM Song Liu wrote: >> >> >> >>> On Jun 26, 2020, at 1:17 PM, Andrii Nakryiko >>> wrote: >>> >>> On Thu, Jun 25, 2020 at 5:14 PM Song Liu wrote: Introduce helper bpf_get_task_stack(), wh

Re: [PATCH v2 bpf-next 4/4] selftests/bpf: add bpf_iter test with bpf_get_task_stack()

2020-06-26 Thread Song Liu
> On Jun 26, 2020, at 4:11 PM, Andrii Nakryiko > wrote: > > On Fri, Jun 26, 2020 at 4:05 PM Song Liu wrote: >> >> >> >>> On Jun 26, 2020, at 1:21 PM, Andrii Nakryiko >>> wrote: >>> >>> On Thu, Jun 25, 2020 at 5:15 PM Song Liu wrote: The new test is similar to other bpf_iter

Re: [PATCH v5 06/11] thermal: Add mode helpers

2020-06-26 Thread kernel test robot
Hi Andrzej, I love your patch! Perhaps something to improve: [auto build test WARNING on 48778464bb7d346b47157d21ffde2af6b2d39110] url: https://github.com/0day-ci/linux/commits/Andrzej-Pietrasiewicz/Stop-monitoring-disabled-devices/20200627-013944 base:48778464bb7d346b47157d21ffde2af6b2d

Re: [PATCH net-next 0/8] net: atlantic: various non-functional changes

2020-06-26 Thread David Miller
From: Igor Russkikh Date: Fri, 26 Jun 2020 21:40:30 +0300 > This patchset contains several non-functional changes, which were made in > out of tree driver over the time. > Mostly typos, checkpatch findings and comment fixes. Series applied, thank you.

Re: [PATCH v1] rds: If one path needs re-connection, check all and re-connect

2020-06-26 Thread David Miller
From: rao.sho...@oracle.com Date: Fri, 26 Jun 2020 11:34:38 -0700 > +/* Check connectivity of all paths > + */ > +void rds_check_all_paths(struct rds_connection *conn) > +{ > + int i = 0; > + > + do { > + rds_conn_path_connect_if_down(&conn->c_path[i]); > + } while (++i < c

Re: [PATCH v4 bpf-next 05/14] bpf: Remove btf_id helpers resolving

2020-06-26 Thread Yonghong Song
On 6/26/20 2:40 PM, Andrii Nakryiko wrote: On Fri, Jun 26, 2020 at 2:37 PM Yonghong Song wrote: On 6/25/20 3:12 PM, Jiri Olsa wrote: Now when we moved the helpers btf_id arrays into .BTF_ids section, we can remove the code that resolve those IDs in runtime. Signed-off-by: Jiri Olsa ---

Re: [PATCH net-next v2 0/4] mptcp: refactor token container

2020-06-26 Thread David Miller
From: Paolo Abeni Date: Fri, 26 Jun 2020 19:29:58 +0200 > Currently the msk sockets are stored in a single radix tree, protected by a > global spin_lock. This series moves to an hash table, allocated at boot time, > with per bucker spin_lock - alike inet_hashtables, but using a different key: > t

Re: [PATCH v2 bpf-next 4/4] selftests/bpf: add bpf_iter test with bpf_get_task_stack()

2020-06-26 Thread Andrii Nakryiko
On Fri, Jun 26, 2020 at 4:05 PM Song Liu wrote: > > > > > On Jun 26, 2020, at 1:21 PM, Andrii Nakryiko > > wrote: > > > > On Thu, Jun 25, 2020 at 5:15 PM Song Liu wrote: > >> > >> The new test is similar to other bpf_iter tests. > >> > >> Signed-off-by: Song Liu > >> --- > >> .../selftests/bpf

Re: [net-next v3 06/15] iecm: Implement mailbox functionality

2020-06-26 Thread Joe Perches
On Fri, 2020-06-26 at 17:44 +, Brady, Alan wrote: > > -Original Message- > > From: Joe Perches > > Sent: Thursday, June 25, 2020 7:58 PM > > To: Kirsher, Jeffrey T ; da...@davemloft.net > > Cc: Michael, Alice ; netdev@vger.kernel.org; > > nhor...@redhat.com; sassm...@redhat.com; Brady,

Re: [PATCH net-next 0/8] net: organize driver docs by device type

2020-06-26 Thread David Miller
From: Jakub Kicinski Date: Fri, 26 Jun 2020 10:27:23 -0700 > This series finishes off what I started in > commit b255e500c8dc ("net: documentation: build a directory structure for > drivers"). > The objective is to de-clutter our documentation folder so folks > have a chance of finding relevant

Re: [PATCH bpf-next v2 3/4] bpftool: support BPF_CGROUP_INET_SOCK_RELEASE

2020-06-26 Thread Daniel Borkmann
On 6/26/20 6:52 PM, Stanislav Fomichev wrote: Support attaching to sock_release from the bpftool. Signed-off-by: Stanislav Fomichev --- tools/bpf/bpftool/main.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/bpf/bpftool/main.h b/tools/bpf/bpftool/main.h index 5cdf0bc049bd..0a281d3

Re: [PATCH v2 bpf-next 4/4] selftests/bpf: add bpf_iter test with bpf_get_task_stack()

2020-06-26 Thread Song Liu
> On Jun 26, 2020, at 1:21 PM, Andrii Nakryiko > wrote: > > On Thu, Jun 25, 2020 at 5:15 PM Song Liu wrote: >> >> The new test is similar to other bpf_iter tests. >> >> Signed-off-by: Song Liu >> --- >> .../selftests/bpf/prog_tests/bpf_iter.c | 17 ++ >> .../selftests/bpf/progs/b

Re: [PATCH net] xsk: remove cheap_dma optimization

2020-06-26 Thread Daniel Borkmann
On 6/26/20 3:43 PM, Björn Töpel wrote: From: Björn Töpel When the AF_XDP buffer allocation API was introduced it had an optimization, "cheap_dma". The idea was that when the umem was DMA mapped, the pool also checked whether the mapping required a synchronization (CPU to device, and vice versa)

Re: [PATCH net-next v1 0/5] TC: Introduce qevents

2020-06-26 Thread Stephen Hemminger
On Sat, 27 Jun 2020 01:45:24 +0300 Petr Machata wrote: > The Spectrum hardware allows execution of one of several actions as a > result of queue management decisions: tail-dropping, early-dropping, > marking a packet, or passing a configured latency threshold or buffer > size. Such packets can be

Re: [PATCH v2 bpf-next 2/4] bpf: introduce helper bpf_get_task_stak()

2020-06-26 Thread Andrii Nakryiko
On Fri, Jun 26, 2020 at 3:45 PM Song Liu wrote: > > > > > On Jun 26, 2020, at 1:17 PM, Andrii Nakryiko > > wrote: > > > > On Thu, Jun 25, 2020 at 5:14 PM Song Liu wrote: > >> > >> Introduce helper bpf_get_task_stack(), which dumps stack trace of given > >> task. This is different to bpf_get_sta

[PATCH iproute2-next v1 2/4] tc: Add helpers to support qevent handling

2020-06-26 Thread Petr Machata
Introduce a set of helpers to make it easy to add support for qevents into qdisc. The idea behind this is that qevent types will be generally reused between qdiscs, rather than each having a completely idiosyncratic set of qevents. The qevent module holds functions for parsing, dumping and formatt

[PATCH net-next v1 5/5] selftests: forwarding: Add a RED test for SW datapath

2020-06-26 Thread Petr Machata
This test is inspired by the mlxsw RED selftest. It is much simpler to set up (also because there is no point in testing PRIO / RED encapsulation). It tests bare RED, ECN and ECN+nodrop modes of operation. On top of that it tests RED early_drop and mark qevents. Signed-off-by: Petr Machata --- .

[PATCH iproute2-next v1 1/4] uapi: pkt_sched: Add two new RED attributes

2020-06-26 Thread Petr Machata
Signed-off-by: Petr Machata --- include/uapi/linux/pkt_sched.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h index a95f3ae7..9e7c2c60 100644 --- a/include/uapi/linux/pkt_sched.h +++ b/include/uapi/linux/pkt_sched.h @@ -257,6

[PATCH net-next v1 3/5] net: sched: sch_red: Split init and change callbacks

2020-06-26 Thread Petr Machata
In the following patches, RED will get two qevents. The implementation will be clearer if the callback for change is not a pure subset of the callback for init. Split the two and promote attribute parsing to the callbacks themselves from the common code, because it will be handy there. Signed-off-

[PATCH iproute2-next v1 3/4] man: tc: Describe qevents

2020-06-26 Thread Petr Machata
Add some general remarks about qevents. Signed-off-by: Petr Machata --- man/man8/tc.8 | 19 +++ 1 file changed, 19 insertions(+) diff --git a/man/man8/tc.8 b/man/man8/tc.8 index e8e0cd0f..970440f6 100644 --- a/man/man8/tc.8 +++ b/man/man8/tc.8 @@ -254,6 +254,25 @@ Traffic contro

[PATCH net-next v1 4/5] net: sched: sch_red: Add qevents "early_drop" and "mark"

2020-06-26 Thread Petr Machata
In order to allow acting on dropped and/or ECN-marked packets, add two new qevents to the RED qdisc: "early_drop" and "mark". Filters attached at "early_drop" block are executed as packets are early-dropped, those attached at the "mark" block are executed as packets are ECN-marked. Two new attribu

[PATCH net-next v1 1/5] net: sched: Pass root lock to Qdisc_ops.enqueue

2020-06-26 Thread Petr Machata
A following patch introduces qevents, points in qdisc algorithm where packet can be processed by user-defined filters. Should this processing lead to a situation where a new packet is to be enqueued on the same port, holding the root lock would lead to deadlocks. To solve the issue, qevent handler

[PATCH net-next v1 0/5] TC: Introduce qevents

2020-06-26 Thread Petr Machata
The Spectrum hardware allows execution of one of several actions as a result of queue management decisions: tail-dropping, early-dropping, marking a packet, or passing a configured latency threshold or buffer size. Such packets can be mirrored, trapped, or sampled. Modeling the action to be taken

[PATCH net-next v1 2/5] net: sched: Introduce helpers for qevent blocks

2020-06-26 Thread Petr Machata
Qevents are attach points for TC blocks, where filters can be put that are executed when "interesting events" take place in a qdisc. The data to keep and the functions to invoke to maintain a qevent will be largely the same between qevents. Therefore introduce sched-wide helpers for qevent manageme

[PATCH iproute2-next v1 4/4] tc: q_red: Add support for qevents "mark" and "early_drop"

2020-06-26 Thread Petr Machata
The "early_drop" qevent matches packets that have been early-dropped. The "mark" qevent matches packets that have been ECN-marked. Signed-off-by: Petr Machata --- man/man8/tc-red.8 | 18 +- tc/q_red.c| 30 +++--- 2 files changed, 44 insertions(+),

Re: [PATCH v2 bpf-next 2/4] bpf: introduce helper bpf_get_task_stak()

2020-06-26 Thread Song Liu
> On Jun 26, 2020, at 1:17 PM, Andrii Nakryiko > wrote: > > On Thu, Jun 25, 2020 at 5:14 PM Song Liu wrote: >> >> Introduce helper bpf_get_task_stack(), which dumps stack trace of given >> task. This is different to bpf_get_stack(), which gets stack track of >> current task. One potential u

Re: [PATCH bpf-next 07/10] bpf: selftests: Restore netns after each test

2020-06-26 Thread Andrii Nakryiko
On Fri, Jun 26, 2020 at 10:56 AM Martin KaFai Lau wrote: > > It is common for networking tests creating its netns and making its own > setting under this new netns (e.g. changing tcp sysctl). If the test > forgot to restore to the original netns, it would affect the > result of other tests. > > T

Re: [PATCH v2 bpf-next 2/4] bpf: introduce helper bpf_get_task_stak()

2020-06-26 Thread Song Liu
> On Jun 26, 2020, at 8:40 AM, Yonghong Song wrote: > > > > On 6/25/20 5:13 PM, Song Liu wrote: >> Introduce helper bpf_get_task_stack(), which dumps stack trace of given >> task. This is different to bpf_get_stack(), which gets stack track of >> current task. One potential use case of bpf_g

Re: [PATCH 3/3] samples: bpf: refactor BPF map in map test with libbpf

2020-06-26 Thread Daniel T. Lee
On Sat, Jun 27, 2020 at 7:19 AM Andrii Nakryiko wrote: > > On Fri, Jun 26, 2020 at 3:14 PM Daniel T. Lee wrote: > > > > On Sat, Jun 27, 2020 at 5:30 AM Andrii Nakryiko > > wrote: > > > > > > On Fri, Jun 26, 2020 at 1:18 AM Daniel T. Lee > > > wrote: > > > > > > > > From commit 646f02ffdd49 ("l

Re: [PATCH 3/3] samples: bpf: refactor BPF map in map test with libbpf

2020-06-26 Thread Andrii Nakryiko
On Fri, Jun 26, 2020 at 3:14 PM Daniel T. Lee wrote: > > On Sat, Jun 27, 2020 at 5:30 AM Andrii Nakryiko > wrote: > > > > On Fri, Jun 26, 2020 at 1:18 AM Daniel T. Lee > > wrote: > > > > > > From commit 646f02ffdd49 ("libbpf: Add BTF-defined map-in-map > > > support"), a way to define internal

Re: [PATCH bpf-next v3 2/4] bpf, netns: Keep attached programs in bpf_prog_array

2020-06-26 Thread Andrii Nakryiko
On Fri, Jun 26, 2020 at 3:13 PM Andrii Nakryiko wrote: > > On Fri, Jun 26, 2020 at 2:45 AM Jakub Sitnicki wrote: > > > > On Thu, Jun 25, 2020 at 10:50 PM CEST, Andrii Nakryiko wrote: > > > On Thu, Jun 25, 2020 at 7:17 AM Jakub Sitnicki > > > wrote: > > >> > > >> Prepare for having multi-prog at

Re: [PATCH 3/3] samples: bpf: refactor BPF map in map test with libbpf

2020-06-26 Thread Daniel T. Lee
On Sat, Jun 27, 2020 at 5:30 AM Andrii Nakryiko wrote: > > On Fri, Jun 26, 2020 at 1:18 AM Daniel T. Lee wrote: > > > > From commit 646f02ffdd49 ("libbpf: Add BTF-defined map-in-map > > support"), a way to define internal map in BTF-defined map has been > > added. > > > > Instead of using previou

Re: [PATCH net-next 1/2] mlxsw: core: Add ethtool support for QSFP-DD transceivers

2020-06-26 Thread Adrian Pop
> You are saying pages 00h, 01h and 02h are mandatory for QSPF-DD. Page > 03h is optional, but when present, it seems to contain what is page > 02h above. Since the QSPF KAPI has it, QSPF-DD KAPI should also have > it. So i would suggest that pages 10h and 11h come after that. > > If a driver want

Re: [PATCH bpf-next v3 2/4] bpf, netns: Keep attached programs in bpf_prog_array

2020-06-26 Thread Andrii Nakryiko
On Fri, Jun 26, 2020 at 2:45 AM Jakub Sitnicki wrote: > > On Thu, Jun 25, 2020 at 10:50 PM CEST, Andrii Nakryiko wrote: > > On Thu, Jun 25, 2020 at 7:17 AM Jakub Sitnicki wrote: > >> > >> Prepare for having multi-prog attachments for new netns attach types by > >> storing programs to run in a bpf

Re: [PATCH bpf-next v2 2/4] libbpf: add support for BPF_CGROUP_INET_SOCK_RELEASE

2020-06-26 Thread Andrii Nakryiko
On Fri, Jun 26, 2020 at 10:22 AM Stanislav Fomichev wrote: > > Add auto-detection for the cgroup/sock_release programs. > > Signed-off-by: Stanislav Fomichev > --- Left a bunch of comments on v1 of this series, oops. But where is the cover letter? Did I miss it? > tools/include/uapi/linux/bpf

Re: [PATCH bpf-next 4/4] selftests/bpf: test BPF_CGROUP_INET_SOCK_RELEASE

2020-06-26 Thread Andrii Nakryiko
On Thu, Jun 25, 2020 at 5:13 PM Stanislav Fomichev wrote: > > Simple test that enforces a single SOCK_DGRAM socker per cgroup. > > Signed-off-by: Stanislav Fomichev > --- > .../selftests/bpf/prog_tests/udp_limit.c | 71 +++ > tools/testing/selftests/bpf/progs/udp_limit.c | 4

Re: [Patch net] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-06-26 Thread Cameron Berkenpas
Box has been up for 25 minutes without issue. Probably the patch works, but I can further confirm by tomorrow. On 6/26/2020 10:58 AM, Cong Wang wrote: On Thu, Jun 25, 2020 at 10:23 PM Cameron Berkenpas wrote: Hello, Somewhere along the way I got the impression that it generally takes those a

Re: [PATCH net] enetc: Fix tx rings bitmap iteration range, irq handling

2020-06-26 Thread David Miller
From: Claudiu Manoil Date: Fri, 26 Jun 2020 19:17:29 +0300 > The rings bitmap of an interrupt vector encodes > which of the device's rings were assigned to that > interrupt vector. > Hence the iteration range of the tx rings bitmap > (for_each_set_bit()) should be the total number of > Tx rings o

Re: [PATCH bpf-next 2/4] libbpf: add support for BPF_CGROUP_INET_SOCK_RELEASE

2020-06-26 Thread Andrii Nakryiko
On Thu, Jun 25, 2020 at 5:13 PM Stanislav Fomichev wrote: > > Add auto-detection for the cgroup/sock_release programs. > > Signed-off-by: Stanislav Fomichev > --- Acked-by: Andrii Nakryiko > tools/include/uapi/linux/bpf.h | 1 + > tools/lib/bpf/libbpf.c | 2 ++ > 2 files changed, 3 i

Re: [Cake] [PATCH net-next 1/5] sch_cake: fix IP protocol handling in the presence of VLAN tags

2020-06-26 Thread Stephen Hemminger
On Fri, 26 Jun 2020 16:11:49 +0300 Jonathan Morton wrote: > Toke has already replied, but: > > > Sure, my proposal does not cover the problem of mangling the CE bit inside > > VLAN-tagged packets, i.e. if we should understand if qdiscs should allow > > it or not. > > This is clearly wrong-hea

Re: [PATCH v4 bpf-next 13/14] selftests/bpf: Add test for d_path helper

2020-06-26 Thread Andrii Nakryiko
On Thu, Jun 25, 2020 at 4:49 PM Jiri Olsa wrote: > > Adding test for d_path helper which is pretty much > copied from Wenbo Zhang's test for bpf_get_fd_path, > which never made it in. > > I've failed so far to compile the test with > kernel header, so for now adding 'struct file' with f_path > me

Re: [PATCH net-next 1/8] docs: networking: reorganize driver documentation again

2020-06-26 Thread Shannon Nelson
On 6/26/20 10:27 AM, Jakub Kicinski wrote: Organize driver documentation by device type. Most documents have fairly verbose yet uninformative names, so let users first select a well defined device type, and then search for a particular driver. While at it rename the section from Vendor drivers t

Re: [PATCH v4 bpf-next 11/14] tools headers: Adopt verbatim copy of btf_ids.h from kernel sources

2020-06-26 Thread Andrii Nakryiko
On Thu, Jun 25, 2020 at 4:48 PM Jiri Olsa wrote: > > It will be needed by bpf selftest for resolve_btfids tool. > > Also adding __PASTE macro as btf_ids.h dependency, which is > defined in: > > include/linux/compiler_types.h > > but because tools/include do not have this header, I'm putting > th

Re: [PATCH v4 bpf-next 08/14] bpf: Add BTF_SET_START/END macros

2020-06-26 Thread Andrii Nakryiko
On Thu, Jun 25, 2020 at 4:48 PM Jiri Olsa wrote: > > Adding support to define sorted set of BTF ID values. > > Following defines sorted set of BTF ID values: > > BTF_SET_START(btf_whitelist_d_path) > BTF_ID(func, vfs_truncate) > BTF_ID(func, vfs_fallocate) > BTF_ID(func, dentry_open) > B

Re: [PATCH v4 bpf-next 06/14] bpf: Use BTF_ID to resolve bpf_ctx_convert struct

2020-06-26 Thread Yonghong Song
On 6/25/20 3:12 PM, Jiri Olsa wrote: This way the ID is resolved during compile time, and we can remove the runtime name search. Signed-off-by: Jiri Olsa --- kernel/bpf/btf.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf

Re: [PATCH v4 bpf-next 06/14] bpf: Use BTF_ID to resolve bpf_ctx_convert struct

2020-06-26 Thread Andrii Nakryiko
On Thu, Jun 25, 2020 at 4:47 PM Jiri Olsa wrote: > > This way the ID is resolved during compile time, > and we can remove the runtime name search. > > Signed-off-by: Jiri Olsa > --- This is a good improvement, but I was thinking about actually simplifying btf_get_prog_ctx_type() logic itself (it

Re: [PATCH v4 bpf-next 05/14] bpf: Remove btf_id helpers resolving

2020-06-26 Thread Andrii Nakryiko
On Fri, Jun 26, 2020 at 2:37 PM Yonghong Song wrote: > > > > On 6/25/20 3:12 PM, Jiri Olsa wrote: > > Now when we moved the helpers btf_id arrays into .BTF_ids section, > > we can remove the code that resolve those IDs in runtime. > > > > Signed-off-by: Jiri Olsa > > --- > > kernel/bpf/btf.c |

Re: [PATCH v2 bpf-next 1/4] perf: export get/put_chain_entry()

2020-06-26 Thread Song Liu
> On Jun 26, 2020, at 1:06 PM, Andrii Nakryiko > wrote: > > On Fri, Jun 26, 2020 at 5:10 AM Peter Zijlstra wrote: >> >> On Thu, Jun 25, 2020 at 05:13:29PM -0700, Song Liu wrote: >>> This would be used by bpf stack mapo. >> >> Would it make sense to sanitize the API a little before exposing

Re: [PATCH v4 bpf-next 05/14] bpf: Remove btf_id helpers resolving

2020-06-26 Thread Yonghong Song
On 6/25/20 3:12 PM, Jiri Olsa wrote: Now when we moved the helpers btf_id arrays into .BTF_ids section, we can remove the code that resolve those IDs in runtime. Signed-off-by: Jiri Olsa --- kernel/bpf/btf.c | 90 +--- 1 file changed, 8 insertio

Re: [PATCH v4 bpf-next 04/14] bpf: Resolve BTF IDs in vmlinux image

2020-06-26 Thread Andrii Nakryiko
On Thu, Jun 25, 2020 at 4:48 PM Jiri Olsa wrote: > > Using BTF_ID_LIST macro to define lists for several helpers > using BTF arguments. > > And running resolve_btfids on vmlinux elf object during linking, > so the .BTF_ids section gets the IDs resolved. > > Signed-off-by: Jiri Olsa > --- Acked-b

Re: [PATCH v4 bpf-next 03/14] bpf: Add BTF_ID_LIST/BTF_ID macros

2020-06-26 Thread Andrii Nakryiko
On Thu, Jun 25, 2020 at 3:13 PM Jiri Olsa wrote: > > Adding support to generate .BTF_ids section that will hold BTF > ID lists for verifier. > > Adding macros that will help to define lists of BTF ID values > placed in .BTF_ids section. They are initially filled with zeros > (during compilation) a

  1   2   3   4   >