[PATCH bpf] tools/bpftool: Add/Fix support for modules btf dump

2020-12-06 Thread saeed
From: Saeed Mahameed While playing with BTF for modules, i noticed that executing the command: $ bpftool btf dump id Fails due to lack of information in the BTF data. Maybe I am missing a step but actually adding the support for this is very simple. To completely parse modules BTF data, we

[pull request][for-next V2] mlx5-next auxbus support

2020-12-06 Thread saeed
re.kernel.org/alsa-devel/20201026111849.1035786-1-l...@kernel.org/ Thanks to everyone for the joint effort ! Please pull and let me know if there's any problem. Thanks, Saeed. --- The following changes since commit b65054597872ce3aefbc6a666385eabdf9e288da: Linux 5.10-rc6 (2020-11-29 15

[pull request][net-next V3 00/15] mlx5 updates 2020-12-01

2020-12-08 Thread saeed
From: Saeed Mahameed Hi Jakub, v1->v2: Removed merge commit of mlx5-next. v2->v3: - Add accuracy improvement measurements. - Apply the accurate stamping only on PTP port and not all UDP. This series adds port tx timestamping support and some misc updates. For more information plea

[net-next V3 08/15] net/mlx5e: Add TX PTP port object support

2020-12-08 Thread saeed
ts to a ptpsq, but it does not open the port timestamp support for it. The support will be added in the following patch. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mel

[net-next V3 07/15] net/mlx5e: Move MLX5E_RX_ERR_CQE macro

2020-12-08 Thread saeed
From: Eran Ben Elisha MLX5E_RX_ERR_CQE Macro is used only in data-path, move it to the appropriate header file. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/health.h | 2 -- drivers/net/ethernet

[net-next V3 04/15] net/mlx5e: Allow SQ outside of channel context

2020-12-08 Thread saeed
CQ. Signed-off-by: Eran Ben Elisha Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 +++- .../ethernet/mellanox/mlx5/core/en/health.c | 4 +--- .../ethernet/mellanox/mlx5/core/en/health.h |

[net-next V3 09/15] net/mlx5e: Add TX port timestamp support

2020-12-08 Thread saeed
must. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + .../ethernet/mellanox/mlx5/core/en/params.h | 1 + .../net/ethernet/mellanox/mlx5/core/en/ptp.c | 173 +- .../net/eth

[net-next V3 06/15] net/mlx5e: Split SW group counters update function

2020-12-08 Thread saeed
inside mlx5e_channel_stats. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/en_stats.c| 288 ++ 1 file changed, 161 insertions(+), 127 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core

[net-next V3 13/15] net/mlx5: Fix passing zero to 'PTR_ERR'

2020-12-08 Thread saeed
sw_acl_table_create() never returns NULL, so NULL test should be removed. Signed-off-by: YueHaibing Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/esw/acl/egress_lgcy.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/esw/acl/egress_ofld.c | 2 +- drivers/net/ethernet/m

[net-next V3 05/15] net/mlx5e: Change skb fifo push/pop API to be used without SQ

2020-12-08 Thread saeed
-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 10 -- drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 15 +-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 13 - drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 6

[net-next V3 11/15] net/mlx5e: Remove duplicated include

2020-12-08 Thread saeed
From: YueHaibing Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5

[net-next V3 01/15] net/mlx5e: Free drop RQ in a dedicated function

2020-12-08 Thread saeed
: Aya Levin Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_main.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox

[net-next V3 03/15] net/mlx5e: Allow RQ outside of channel context

2020-12-08 Thread saeed
Aya Levin Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 +- .../ethernet/mellanox/mlx5/core/en/health.c | 9 ++-- .../ethernet/mellanox/mlx5/core/en/health.h | 3 +- .../mellanox/mlx5/core

[net-next V3 12/15] net/mlx5: Arm only EQs with EQEs

2020-12-08 Thread saeed
Drory Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c index 4ea5d6ddf56a

[net-next V3 02/15] net/mlx5e: Allow CQ outside of channel context

2020-12-08 Thread saeed
in following patches in the patch-set. Signed-off-by: Aya Levin Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 16 - .../ethernet/mellanox/mlx5/core/en/health.c | 3 +- .../net/ethernet/mellanox/m

[net-next V3 10/15] net/mlx5e: remove unnecessary memset

2020-12-08 Thread saeed
From: Zhu Yanjun Since kvzalloc will initialize the allocated memory, it is not necessary to initialize it once again. Fixes: 11b717d61526 ("net/mlx5: E-Switch, Get reg_c0 value on CQE") Signed-off-by: Zhu Yanjun Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox

[net-next V3 15/15] net/mlx5e: Fill mlx5e_create_cq_param in a function

2020-12-08 Thread saeed
-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en/params.h | 1 + .../ethernet/mellanox/mlx5/core/en/xsk/setup.c | 7 ++- .../net/ethernet/mellanox/mlx5/core/en_main.c | 17 - 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/net

[net-next V3 14/15] net/mlx5e: Split between RX/TX tunnel FW support indication

2020-12-08 Thread saeed
From: Aya Levin Use the new FW caps to advertise for ip-in-ip tunnel support separately for RX and TX. Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en/fs.h | 3 +- .../net/ethernet/mellanox/mlx5/core/en_fs.c

[PATCH net-next v2 01/14] devlink: Prepare code to fill multiple port function attributes

2020-12-08 Thread saeed
From: Parav Pandit Prepare code to fill zero or more port function optional attributes. Subsequent patch makes use of this to fill more port function attributes. Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed --- net/core/devlink.c

[PATCH net-next v2 02/14] devlink: Introduce PCI SF port flavour and port attribute

2020-12-08 Thread saeed
ot;function": { "hw_addr": "00:00:00:00:88:88", "state": "active", "opstate": "attached" } } } } Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Reviewed-by: Vu Pham Sign

[PATCH net-next v2 03/14] devlink: Support add and delete devlink port

2020-12-08 Thread saeed
wed-by: Vu Pham Signed-off-by: Saeed Mahameed --- include/net/devlink.h | 39 net/core/devlink.c| 71 +++ 2 files changed, 110 insertions(+) diff --git a/include/net/devlink.h b/include/net/devlink.h index 5bd43f0a79a8..f8cff3e40

[PATCH net-next v2 04/14] devlink: Support get and set state of port function

2020-12-08 Thread saeed
"sfnum": 88, "external": false, "splittable": false, "function": { "hw_addr": "00:00:00:00:88:88", "state": "active", "opst

[PATCH net-next v2 06/14] net/mlx5: SF, Add auxiliary device support

2020-12-08 Thread saeed
/ mlx5_core.sf.4 -> ../../../devices/pci:00/:00:03.0/:06:00.0/mlx5_core.sf.4 $ cat /sys/bus/auxiliary/devices/mlx5_core.sf.4/sfnum 88 Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed --- Changelog: v1->v2: - uses vhca event to add/remove sf

[PATCH net-next v2 13/14] devlink: Extend devlink port documentation for subfunctions

2020-12-08 Thread saeed
From: Parav Pandit Add devlink port documentation for subfunction management. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed --- Changelog: v1->v2: - new patch --- Documentation/driver-api/auxiliary_bus.rst| 2 + .../networking/devlink/devlink-port.rst |

[PATCH net-next v2 00/14] Add mlx5 subfunction support

2020-12-08 Thread saeed
From: Parav Pandit Hi Dave, Jakub, Jason, This series form Parav was the theme of this mlx5 release cycle, we've been waiting anxiously for the auxbus infrastructure to make it into the kernel, and now as the auxbus is in and all the stars are aligned, I can finally submit this V2 of the devlink

[PATCH net-next v2 12/14] devlink: Add devlink port documentation

2020-12-08 Thread saeed
From: Parav Pandit Added documentation for devlink port and port function related commands. Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Saeed Mahameed --- Changelog: v5->v6: - added label for devlink port to refer in other documentat

[PATCH net-next v2 05/14] net/mlx5: Introduce vhca state event notifier

2020-12-08 Thread saeed
patches to act on the event. This enables single entity to subscribe, query and rearm the event for a function. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed --- Changelog: v1->v2: - new patch --- .../net/ethernet/mellanox/mlx5/core/Kconfig | 9 + .../

[PATCH net-next v2 11/14] net/mlx5: SF, Port function state change support

2020-12-08 Thread saeed
"opstate": "attached" } } } } On port function activation, an auxiliary device is created in below example. $ devlink dev show devlink dev show auxiliary/mlx5_core.sf.4 $ devlink port show auxiliary/mlx5_core.sf.4/1 auxiliary/mlx5_core.sf.4/1: type

[PATCH net-next v2 10/14] net/mlx5: SF, Add port add delete functionality

2020-12-08 Thread saeed
;function": { "hw_addr": "00:00:00:00:88:88", "state": "inactive", "opstate": "detached" } } } } Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed

[PATCH net-next v2 09/14] net/mlx5: E-switch, Add eswitch helpers for SF vport

2020-12-08 Thread saeed
From: Parav Pandit Add helpers to enable/disable eswitch port, register its devlink port and load its representor. Signed-off-by: Vu Pham Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --- Changelog: v1->v2: - cut down extra api for vport enable/disa

[PATCH net-next v2 14/14] net/mlx5: Add devlink subfunction port documentation

2020-12-08 Thread saeed
From: Parav Pandit Add documentation for subfunction management using devlink port. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed --- Changelog: v1->v2: - new patch --- .../device_drivers/ethernet/mellanox/mlx5.rst | 204 ++ 1 file changed, 204 inserti

[PATCH net-next v2 07/14] net/mlx5: SF, Add auxiliary device driver

2020-12-08 Thread saeed
her an alias or as devlink instance name described in RFC [1]. [1] https://lore.kernel.org/netdev/20200519092258.GF4655@nanopsycho/ Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed --- Changelog: v1->v2: - auxiliary driver remove method return type changed from in

[PATCH net-next v2 08/14] net/mlx5: E-switch, Prepare eswitch to handle SF vport

2020-12-08 Thread saeed
below: [PF,VF0,...,VFn,SF0,...SFm,ECPF,UPLINK]. Change functions to map SF's vport numbers to indices when accessing the vports or representors arrays, and vice versa. Signed-off-by: Vu Pham Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --- .../net/eth

[pull request][net-next 00/16] mlx5 updates 2020-09-15

2020-09-15 Thread saeed
From: Saeed Mahameed Hi Dave & Jakub, This series adds some misc updates to mlx5 driver. For more information please see tag log below. Please pull and let me know if there is any problem. Thanks, Saeed. --- The following changes since commit ed6d9b0228132fee03314b276d946fc3f0cc

[net-next 15/16] net/mlx5e: Add IPv6 traffic class (DSCP) header rewrite support

2020-09-15 Thread saeed
dd dev REP ingress protocol ipv6 prio 1 flower skip_sw \ ip_proto tcp \ action pedit ex munge ip6 traffic_class set 68 retain 0xfc pipe \ action mirred egress redirect dev NIC Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --- drivers/ne

[net-next 03/16] net/mlx5: Always use container_of to find mdev pointer from clock struct

2020-09-15 Thread saeed
an Ben Elisha Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/lib/clock.c | 52 +++ include/linux/mlx5/driver.h | 1 - 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx

[net-next 16/16] net/mlx5e: Add CQE compression support for multi-strides packets

2020-09-15 Thread saeed
the feature, counters show ~20.7Mpps compressed CQEs in ~500K compression blocks. Signed-off-by: Ofer Levi Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 12

[net-next 14/16] net/mlx5e: Add support for tc trap

2020-09-15 Thread saeed
filter add dev eth1 protocol ip prio 1 root flower skip_sw \ src_ip 7.7.7.8 action trap Signed-off-by: Eli Cohen Reviewed-by: Roi Dayan Reviewed-by: Ariel Levkovich Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 10 ++ 1

[net-next 08/16] net/mlx5e: Add LAG warning for unsupported tx type

2020-09-15 Thread saeed
laved silently without LAG offload activated. Signed-off-by: Jianbo Liu Reviewed-by: Raed Salem Reviewed-by: Roi Dayan Reviewed-by: Jiri Pirko Reviewed-by: Raed Salem Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/lag.c | 17 +++

[net-next 07/16] net/mlx5e: Return a valid errno if can't get lag device index

2020-09-15 Thread saeed
From: Jianbo Liu Change the return value to -ENOENT, to make it more meaningful. Signed-off-by: Jianbo Liu Reviewed-by: Jiri Pirko Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/lag.c| 6 +++--- drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c | 7 ++- 2

[net-next 05/16] net/mlx5: Release clock lock before scheduling a PPS work

2020-09-15 Thread saeed
From: Eran Ben Elisha Holding the clock lock is not required when scheduling a PPS work. Signed-off-by: Eran Ben Elisha Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[net-next 13/16] net/mlx5: E-Switch, Use vport metadata matching by default

2020-09-15 Thread saeed
off-by: Vu Pham Reviewed-by: Bodong Wang Reviewed-by: Roi Dayan Reviewed-by: Parav Pandit Reviewed-by: Mark Bloch Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/eswitch_offloads.c| 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) di

[net-next 10/16] net/mlx5: E-Switch, Check and enable metadata support flag before using

2020-09-15 Thread saeed
From: Vu Pham Check E-Switch capabilities and enable metadata support flag before using it to setup other features that need metadata. Signed-off-by: Vu Pham Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/eswitch_offloads.c | 15 ++- 1

[net-next 06/16] net/mlx5: Don't call timecounter cyc2time directly from 1PPS flow

2020-09-15 Thread saeed
From: Eran Ben Elisha Before calling timecounter_cyc2time(), clock->lock must be taken. Use mlx5_timecounter_cyc2time instead which guarantees a safe access. Fixes: afc98a0b46d8 ("net/mlx5: Update ptp_clock_event foreach PPS event") Signed-off-by: Eran Ben Elisha Signed-off-by: S

[net-next 12/16] net/mlx5: E-Switch, Setup all vports' metadata to support peer miss rule

2020-09-15 Thread saeed
Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/eswitch_offloads.c | 51 +++ 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mel

[net-next 09/16] net/mlx5e: Add LAG warning if bond slave is not lag master

2020-09-15 Thread saeed
Raed Salem Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/lag.c | 43 ++- drivers/net/ethernet/mellanox/mlx5/core/lag.h | 7 +++ .../net/ethernet/mellanox/mlx5/core/lag_mp.c | 2 +- 3 files changed, 41 insertions(+), 11 deletions(-)

[net-next 11/16] net/mlx5: E-Switch, Dedicated metadata for uplink vport

2020-09-15 Thread saeed
From: Vu Pham Uplink vport must have a dedicated metadata with vhca_id being part of the metadata. Fixes: 133dcfc577ea ("net/mlx5: E-Switch, Alloc and free unique metadata for match") Signed-off-by: Vu Pham Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed --- drivers/ne

[net-next 01/16] net/mlx5: Fix uninitialized variable warning

2020-09-15 Thread saeed
From: Moshe Tal Add variable initialization to eliminate the warning "variable may be used uninitialized". Fixes: 5f29458b77d5 ("net/mlx5e: Support dump callback in TX reporter") Signed-off-by: Moshe Tal Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed --- drivers/n

[net-next 02/16] net/mlx5: remove erroneous fallthrough

2020-09-15 Thread saeed
: Dan Carpenter Reviewed-by: Gustavo A. R. Silva Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

[net-next 04/16] net/mlx5: Rename ptp clock info

2020-09-15 Thread saeed
From: Eran Ben Elisha Fix a typo in ptp_clock_info naming: mlx5_p2p -> mlx5_ptp. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ether

[net 02/15] net/mlx5e: Use RCU to protect rq->xdp_prog

2020-09-18 Thread saeed
s patch converts all accesses to rq->xdp_prog to use RCU functions. Fixes: 86994156c736 ("net/mlx5e: XDP fast RX drop bpf programs support") Fixes: db05815b36cb ("net/mlx5e: Add XSK zero-copy support") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-b

[net 05/15] net/mlx5e: CT: Fix freeing ct_label mapping

2020-09-18 Thread saeed
ff-by: Roi Dayan Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed Signed-off-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/en/tc_ct.c| 21 +++ .../ethernet/mellanox/mlx5/core/en/tc_ct.h| 26 --- .../net/ethernet/mellanox/mlx5/core/en_tc.c |

[net 01/15] net/mlx5: Fix FTE cleanup

2020-09-18 Thread saeed
upport multiple updates of steering rules in parallel") Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/etherne

[net 03/15] net/mlx5e: Use synchronize_rcu to sync with NAPI

2020-09-18 Thread saeed
in a kernel panic. To fix the issue, use synchronize_rcu to wait for NAPI to quit, and wrap the whole NAPI in rcu_read_lock. Fixes: acc6c5953af1 ("net/mlx5e: Split open/close channels to stages") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed

[pull request][net 00/15] mlx5 Fixes 2020-09-18

2020-09-18 Thread saeed
From: Saeed Mahameed Hi Dave, This series introduces some fixes to mlx5 driver. For more information please see tag log below. Please pull and let me know if there is any problem. For -stable v5.1 ('net/mlx5: Fix FTE cleanup') For -stable v5.3 ('net/mlx5e: TLS, Do not

[net 11/15] net/mlx5e: kTLS, Fix napi sync and possible use-after-free

2020-09-18 Thread saeed
ed at this stage. Fixes: 0419d8c9d8f8 ("net/mlx5e: kTLS, Add kTLS RX resync support") Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c | 2 +- 1 file

[net 14/15] net/mlx5e: kTLS, Avoid kzalloc(GFP_KERNEL) under spinlock

2020-09-18 Thread saeed
From: Saeed Mahameed The spinlock only needed when accessing the channel's icosq, grab the lock after the buf allocation in resync_post_get_progress_params() to avoid kzalloc(GFP_KERNEL) in atomic context. Fixes: 0419d8c9d8f8 ("net/mlx5e: kTLS, Add kTLS RX resync support&quo

[net 09/15] net/mlx5e: Fix using wrong stats_grps in mlx5e_update_ndo_stats()

2020-09-18 Thread saeed
y: Alaa Hleihel Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 - .../ethernet/mellanox/mlx5/core/en/monitor_stats.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c| 12 +

[net 10/15] net/mlx5e: TLS, Do not expose FPGA TLS counter if not supported

2020-09-18 Thread saeed
use case, as this would cause counter duplication. For example, tx_tls_drop_no_sync_data would appear twice in the ethtool stats. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Tariq Toukan Reviewed-by: Moshe Shemesh Signed-off-by: Saee

[net 06/15] net/mlx5e: Enable adding peer miss rules only if merged eswitch is supported

2020-09-18 Thread saeed
check before creating peer groups/rule. Fixes: ac004b832128 ("net/mlx5e: E-Switch, Add peer miss rules") Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Reviewed-by: Raed Salem Signed-off-by: Saeed Mahameed Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/eswitch_offloads.

[net 13/15] net/mlx5e: kTLS, Fix leak on resync error flow

2020-09-18 Thread saeed
From: Saeed Mahameed Resync progress params buffer and dma weren't released on error, Add missing error unwinding for resync_post_get_progress_params(). Fixes: 0419d8c9d8f8 ("net/mlx5e: kTLS, Add kTLS RX resync support") Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Touka

[net 08/15] net/mlx5e: Fix multicast counter not up-to-date in "ip -s"

2020-09-18 Thread saeed
ot;ifconfig". Fixes: f62b8bb8f2d3 ("net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality") Signed-off-by: Ron Diskin Reviewed-by: Tariq Toukan Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed Signed-off-by: Saeed Mahameed --- V2: Remove mcast stats from e

[net 12/15] net/mlx5e: kTLS, Add missing dma_unmap in RX resync

2020-09-18 Thread saeed
From: Saeed Mahameed Progress params dma address is never unmapped, unmap it when completion handling is over. Fixes: 0419d8c9d8f8 ("net/mlx5e: kTLS, Add kTLS RX resync support") Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan --- .../net/ethernet/mellanox/mlx5/cor

[net 15/15] net/mlx5e: mlx5e_fec_in_caps() returns a boolean

2020-09-18 Thread saeed
From: Saeed Mahameed Returning errno is a bug, fix that. Also fixes smatch warnings: drivers/net/ethernet/mellanox/mlx5/core/en/port.c:453 mlx5e_fec_in_caps() warn: signedness bug returning '(-95)' Fixes: 2132b71f78d2 ("net/mlx5e: Advertise globaly supported FEC modes")

[net 04/15] net/mlx5e: Fix memory leak of tunnel info when rule under multipath not ready

2020-09-18 Thread saeed
ned-off-by: Saeed Mahameed Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index fd

[net 07/15] net/mlx5e: Fix endianness when calculating pedit mask first bit

2020-09-18 Thread saeed
ned-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_tc.c | 34 --- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index bf0c6f063941..1c93f92d9210 10

[net V2 01/15] net/mlx5: Fix FTE cleanup

2020-09-21 Thread saeed
upport multiple updates of steering rules in parallel") Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/etherne

[net V2 05/15] net/mlx5e: CT: Fix freeing ct_label mapping

2020-09-21 Thread saeed
ff-by: Roi Dayan Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed Signed-off-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/en/tc_ct.c| 21 +++ .../ethernet/mellanox/mlx5/core/en/tc_ct.h| 26 --- .../net/ethernet/mellanox/mlx5/core/en_tc.c |

[net V2 06/15] net/mlx5e: Enable adding peer miss rules only if merged eswitch is supported

2020-09-21 Thread saeed
check before creating peer groups/rule. Fixes: ac004b832128 ("net/mlx5e: E-Switch, Add peer miss rules") Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Reviewed-by: Raed Salem Signed-off-by: Saeed Mahameed Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/eswitch_offloads.

[pull request][net V2 00/15] mlx5 fixes-2020-09-18

2020-09-21 Thread saeed
From: Saeed Mahameed Hi Dave, This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. v1->v2: Remove missing patch from -stable list. For -stable v5.1 ('net/mlx5: Fix FTE cleanup') For -stable v5.3 ('net/mlx5e: TLS, Do n

[net V2 03/15] net/mlx5e: Use synchronize_rcu to sync with NAPI

2020-09-21 Thread saeed
in a kernel panic. To fix the issue, use synchronize_rcu to wait for NAPI to quit, and wrap the whole NAPI in rcu_read_lock. Fixes: acc6c5953af1 ("net/mlx5e: Split open/close channels to stages") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed

[net V2 10/15] net/mlx5e: TLS, Do not expose FPGA TLS counter if not supported

2020-09-21 Thread saeed
use case, as this would cause counter duplication. For example, tx_tls_drop_no_sync_data would appear twice in the ethtool stats. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Tariq Toukan Reviewed-by: Moshe Shemesh Signed-off-by: Saee

[net V2 02/15] net/mlx5e: Use RCU to protect rq->xdp_prog

2020-09-21 Thread saeed
s patch converts all accesses to rq->xdp_prog to use RCU functions. Fixes: 86994156c736 ("net/mlx5e: XDP fast RX drop bpf programs support") Fixes: db05815b36cb ("net/mlx5e: Add XSK zero-copy support") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-b

[net V2 15/15] net/mlx5e: mlx5e_fec_in_caps() returns a boolean

2020-09-21 Thread saeed
From: Saeed Mahameed Returning errno is a bug, fix that. Also fixes smatch warnings: drivers/net/ethernet/mellanox/mlx5/core/en/port.c:453 mlx5e_fec_in_caps() warn: signedness bug returning '(-95)' Fixes: 2132b71f78d2 ("net/mlx5e: Advertise globaly supported FEC modes")

[net V2 08/15] net/mlx5e: Fix multicast counter not up-to-date in "ip -s"

2020-09-21 Thread saeed
ot;ifconfig". Fixes: f62b8bb8f2d3 ("net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality") Signed-off-by: Ron Diskin Reviewed-by: Tariq Toukan Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/m

[net V2 13/15] net/mlx5e: kTLS, Fix leak on resync error flow

2020-09-21 Thread saeed
From: Saeed Mahameed Resync progress params buffer and dma weren't released on error, Add missing error unwinding for resync_post_get_progress_params(). Fixes: 0419d8c9d8f8 ("net/mlx5e: kTLS, Add kTLS RX resync support") Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Touka

[net V2 09/15] net/mlx5e: Fix using wrong stats_grps in mlx5e_update_ndo_stats()

2020-09-21 Thread saeed
y: Alaa Hleihel Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 - .../ethernet/mellanox/mlx5/core/en/monitor_stats.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c| 12 +

[net V2 04/15] net/mlx5e: Fix memory leak of tunnel info when rule under multipath not ready

2020-09-21 Thread saeed
ned-off-by: Saeed Mahameed Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index fd

[net V2 14/15] net/mlx5e: kTLS, Avoid kzalloc(GFP_KERNEL) under spinlock

2020-09-21 Thread saeed
From: Saeed Mahameed The spinlock only needed when accessing the channel's icosq, grab the lock after the buf allocation in resync_post_get_progress_params() to avoid kzalloc(GFP_KERNEL) in atomic context. Fixes: 0419d8c9d8f8 ("net/mlx5e: kTLS, Add kTLS RX resync support&quo

[net V2 11/15] net/mlx5e: kTLS, Fix napi sync and possible use-after-free

2020-09-21 Thread saeed
ed at this stage. Fixes: 0419d8c9d8f8 ("net/mlx5e: kTLS, Add kTLS RX resync support") Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c | 2 +- 1 file

[net V2 07/15] net/mlx5e: Fix endianness when calculating pedit mask first bit

2020-09-21 Thread saeed
ned-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_tc.c | 34 --- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index bf0c6f063941..1c93f92d9210 10

[net V2 12/15] net/mlx5e: kTLS, Add missing dma_unmap in RX resync

2020-09-21 Thread saeed
From: Saeed Mahameed Progress params dma address is never unmapped, unmap it when completion handling is over. Fixes: 0419d8c9d8f8 ("net/mlx5e: kTLS, Add kTLS RX resync support") Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan --- .../net/ethernet/mellanox/mlx5/cor

[net-next V3 01/12] net/mlx5e: Refactor inline header size calculation in the TX path

2020-09-21 Thread saeed
ll be performed in the next patch. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en

[pull request][net-next V3 00/12] mlx5 Multi packet tx descriptors for SKBs

2020-09-21 Thread saeed
From: Saeed Mahameed Hi Dave & Jakub This series adds support for Multi packet tx descriptors for SKBs. For more information please see tag log below. v1->v2: - Move small irrelevant changes from the refactoring patch to separate patches. - Don't touch mlx5e_txwqe_build_eseg_

[net-next V3 05/12] net/mlx5e: Small improvements for XDP TX MPWQE logic

2020-09-21 Thread saeed
oukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 5 ++--- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h | 16 +--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c b/drivers/n

[net-next V3 03/12] net/mlx5e: Move mlx5e_tx_wqe_inline_mode to en_tx.c

2020-09-21 Thread saeed
From: Maxim Mikityanskiy Move mlx5e_tx_wqe_inline_mode from en/txrx.h to en_tx.c as it's only used there. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en/txrx.h | 23 --- .../net/eth

[net-next V3 06/12] net/mlx5e: Unify constants for WQE_EMPTY_DS_COUNT

2020-09-21 Thread saeed
. Additionally, mlx5e_xdp_mpwqe_session_start is converted to use struct assignment, because the code nearby is touched. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en/txrx.h | 2 ++ .../net/ethernet/mellanox/mlx5

[net-next V3 02/12] net/mlx5e: Use struct assignment to initialize mlx5e_tx_wqe_info

2020-09-21 Thread saeed
iterations of using the structure. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core

[net-next V3 07/12] net/mlx5e: Move the TLS resync check out of the function

2020-09-21 Thread saeed
the function and put it to an inline function to save a call on all padding WQEs. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 3 --- .../mellanox/mlx5/core/en_accel/ktls_txrx.h| 14

[net-next V3 08/12] net/mlx5e: Support multiple SKBs in a TX WQE

2020-09-21 Thread saeed
Cycles per packet: 160 -> 156 Instructions per cycle: 2.69 -> 2.70 CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz (x86_64) NIC: Mellanox ConnectX-6 Dx GCC 10.2.0 Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox

[net-next V3 09/12] net/mlx5e: Generalize TX MPWQE checks for full session

2020-09-21 Thread saeed
-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en/txrx.h | 18 ++ .../net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 +- .../net/ethernet/mellanox/mlx5/core/en/xdp.h | 18 ++ 3 files

[net-next V3 10/12] net/mlx5e: Rename xmit-related structs to generalize them

2020-09-21 Thread saeed
mlx5e_xmit_data - it will be used in the upcoming TX MPWQE flow. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 22 +-- .../net/ethernet/mellanox/mlx5/core/en/txrx.h | 2 +- .../net/ethernet

[net-next V3 04/12] net/mlx5e: Refactor xmit functions

2020-09-21 Thread saeed
0 v3 @ 2.50GHz (x86_64) NIC: Mellanox ConnectX-6 Dx GCC 10.2.0 Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en/txrx.h | 21 +- .../mellanox/mlx5/core/en_accel/en_accel.h| 5 + .../mellanox/mlx5/core/e

[net-next V3 11/12] net/mlx5e: Move TX code into functions to be used by MPWQE

2020-09-21 Thread saeed
owing commit and to maintain clear responsibilities of functions. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_tx.c | 23 ++- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/dr

[net-next V3 12/12] net/mlx5e: Enhanced TX MPWQE for SKBs

2020-09-21 Thread saeed
WQE on: 66.8 Mpps Burst size in all pktgen tests is 32. CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz (x86_64) NIC: Mellanox ConnectX-6 Dx GCC 10.2.0 Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h |

[net-next 12/15] net/mlx5e: IPsec: Use kvfree() for memory allocated with kvzalloc()

2020-09-22 Thread saeed
From: Denis Efremov Variables flow_group_in, spec in rx_fs_create() are allocated with kvzalloc(). It's incorrect to free them with kfree(). Use kvfree() instead. Fixes: 5e466345291a ("net/mlx5e: IPsec: Add IPsec steering in local NIC RX") Signed-off-by: Denis Efremov Signe

[net-next 14/15] net/mlx5: simplify the return expression of mlx5_ec_init()

2020-09-22 Thread saeed
From: Qinglang Miao Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/ecpf.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ecpf.c b

[net-next 13/15] net/mlx5e: Use kfree() to free fd->g in accel_fs_tcp_create_groups()

2020-09-22 Thread saeed
From: Denis Efremov Memory ft->g in accel_fs_tcp_create_groups() is allocaed with kcalloc(). It's excessive to free ft->g with kvfree(). Use kfree() instead. Signed-off-by: Denis Efremov Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.

[net-next 03/15] net/mlx5e: Tc nic flows to use mlx5_chains flow tables

2020-09-22 Thread saeed
the same. Signed-off-by: Ariel Levkovich Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en/fs.h | 5 +- .../net/ethernet/mellanox/mlx5/core/en_tc.c | 86 --- 2 files changed, 60 insertions(+), 31

[net-next 15/15] net/mlx5: remove unreachable return

2020-09-22 Thread saeed
From: "Pavel Machek (CIP)" The last return statement is unreachable code. I'm not sure if it will provoke any warnings, but it looks ugly. Signed-off-by: Pavel Machek (CIP) Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c | 2 -- 1

  1   2   3   4   5   6   7   8   9   10   >