Re: [PATCH] net/mlx5e: allocate 'indirection_rqt' buffer dynamically

2021-03-08 Thread Tariq Toukan
free(in); return err; } Reviewed-by: Tariq Toukan Thanks for your patch. Tariq

Re: bug report: WARNING in bonding

2021-02-25 Thread Tariq Toukan
On 2/18/2021 7:10 PM, Tariq Toukan wrote: On 11/12/2020 6:33 PM, Ido Schimmel wrote: On Thu, Nov 12, 2020 at 05:54:30PM +0200, Tariq Toukan wrote: On 11/12/2020 5:46 PM, Ido Schimmel wrote: On Thu, Nov 12, 2020 at 05:38:44PM +0200, Tariq Toukan wrote: Hi all, In the past ~2-3 weeks

Re: [PATCH RFC net-next] mlx5: fix for crash on net-next

2021-02-23 Thread Tariq Toukan
On 2/22/2021 9:50 PM, Jesper Dangaard Brouer wrote: Net-next at commit d310ec03a34e ("Merge tag 'perf-core-2021-02-17') There is a divide error in drivers/net/ethernet/mellanox/mlx5/core/en_tx.c where it seems that num_tc_x_num_ch can become zero in a modulo operation: if (unlikely(t

Re: [PATCH] net/mlx4_core: Add missed mlx4_free_cmd_mailbox()

2021-02-21 Thread Tariq Toukan
rr(dev, "rule mirroring mailbox is null\n"); + mlx4_free_cmd_mailbox(dev, mailbox); return -EINVAL; } memcpy(mailbox->buf, fs_rule->mirr_mbox, fs_rule->mirr_mbox_size); Reviewed-by: Tariq Toukan Thanks for your patch. Tariq

Re: bug report: WARNING in bonding

2021-02-18 Thread Tariq Toukan
On 11/12/2020 6:33 PM, Ido Schimmel wrote: On Thu, Nov 12, 2020 at 05:54:30PM +0200, Tariq Toukan wrote: On 11/12/2020 5:46 PM, Ido Schimmel wrote: On Thu, Nov 12, 2020 at 05:38:44PM +0200, Tariq Toukan wrote: Hi all, In the past ~2-3 weeks, we started seeing the following WARNING and

[PATCH net-next 3/3] net/mlx5: Remove TLS dependencies on XPS

2021-02-11 Thread Tariq Toukan
No real dependency on XPS, but on RX queue mapping, which is being selected by TLS_DEVICE. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy --- drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5

[PATCH net-next 2/3] net/tls: Select SOCK_RX_QUEUE_MAPPING from TLS_DEVICE

2021-02-11 Thread Tariq Toukan
Compile-in the socket RX queue mapping field and logic when TLS_DEVICE is enabled. This allows device drivers to pick the recorded socket's RX queue and use it for streams distribution. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy --- net/tls/Kconfig | 1 + 1 file chang

[PATCH net-next 1/3] net/sock: Add kernel config SOCK_RX_QUEUE_MAPPING

2021-02-11 Thread Tariq Toukan
protect access to the sk_rx_queue_mapping field, while keeping the function exposed unconditionally, just like sk_rx_queue_set() and sk_rx_queue_clear(). Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy --- include/net/sock.h | 12 ++-- net/Kconfig| 4 net/core

[PATCH net-next 0/3] Compile-flag for sock RX queue mapping

2021-02-11 Thread Tariq Toukan
Hi, Socket's RX queue mapping logic is useful also for non-XPS use cases. This series breaks the dependency between the two, introducing a new kernel config flag SOCK_RX_QUEUE_MAPPING. Here we select this new kernel flag from TLS_DEVICE, as well as XPS. Regards, Tariq Tariq Toukan (3):

Re: [PATCH v4 net-next] net: Remove redundant calls of sk_tx_queue_clear().

2021-01-28 Thread Tariq Toukan
commit message. Other than that, I think now I'm fine with the patch. Acked-by: Tariq Toukan Thanks, Tariq CC: Tariq Toukan CC: Boris Pismenny Signed-off-by: Kuniyuki Iwashima --- net/core/sock.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/net/co

Re: [PATCH v3 net-next] net: Remove redundant calls of sk_tx_queue_clear().

2021-01-28 Thread Tariq Toukan
-kun...@amazon.co.jp/ CC: Tariq Toukan CC: Boris Pismenny Signed-off-by: Kuniyuki Iwashima --- net/core/sock.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/net/core/sock.c b/net/core/sock.c index bbcd4b97eddd..cfbd62a5e079 100644 --- a/net/core/sock.c +

[PATCH net] net: Disable NETIF_F_HW_TLS_RX when RXCSUM is disabled

2021-01-17 Thread Tariq Toukan
With NETIF_F_HW_TLS_RX packets are decrypted in HW. This cannot be logically done when RXCSUM offload is off. Fixes: 14136564c8ee ("net: Add TLS RX offload feature") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- Documentation/networking/tls-offload.rst | 3 +++ net/

[PATCH net-next V3 1/8] net: netdevice: Add operation ndo_sk_get_lower_dev

2021-01-17 Thread Tariq Toukan
ndo_sk_get_lower_dev returns the lower netdev that corresponds to a given socket. Additionally, we implement a helper netdev_sk_get_lowest_dev() to get the lowest one in chain. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- include/linux/netdevice.h | 4 net/core/dev.c

[PATCH net-next V3 0/8] TLS device offload for Bond

2021-01-17 Thread Tariq Toukan
v_ops calls, introduce and use ndo_sk_get_slave() to interact directly with the slave netdev. - Remove bond copy of tlsdev_ops callbacks. - In TLS module: Use netdev_sk_get_lowest_dev(), give exceptions to some checks to allow bond support. Tariq Toukan (8): net: netdevice: Add operation ndo_

[PATCH net-next V3 7/8] net/tls: Device offload to use lowest netdevice in chain

2021-01-17 Thread Tariq Toukan
Do not call the tls_dev_ops of upper devices. Instead, ask them for the proper lowest device and communicate with it directly. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- net/tls/tls_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tls

[PATCH net-next V3 6/8] net/bonding: Declare TLS RX device offload support

2021-01-17 Thread Tariq Toukan
feature flag is not directly controllable, but just reflects the offload status based on the logic under bond_sk_check(). Here we just declare RX device offload support, and expose it via the NETIF_F_HW_TLS_RX flag. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- include/net

[PATCH net-next V3 4/8] net/bonding: Take update_features call out of XFRM funciton

2021-01-17 Thread Tariq Toukan
In preparation for more cases that call netdev_update_features(). While here, move the features logic to the stage where struct bond is already updated, and pass it as the only parameter to function bond_set_xfrm_features(). Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- drivers

[PATCH net-next V3 2/8] net/bonding: Take IP hash logic into a helper

2021-01-17 Thread Tariq Toukan
Hash logic on L3 will be used in a downstream patch for one more use case. Take it to a function for a better code reuse. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- drivers/net/bonding/bond_main.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff

[PATCH net-next V3 3/8] net/bonding: Implement ndo_sk_get_lower_dev

2021-01-17 Thread Tariq Toukan
Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- drivers/net/bonding/bond_main.c | 93 + include/net/bonding.h | 2 + 2 files changed, 95 insertions(+) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 75

[PATCH net-next V3 5/8] net/bonding: Implement TLS TX device offload

2021-01-17 Thread Tariq Toukan
t the lower devs, there is no way for the bond interface to disable its device offload capabilities, as long as the mode/policy config allows it. Hence, the feature flag is not directly controllable, but just reflects the current offload status based on the logic under bond_sk_check(). Signed-off-by:

[PATCH net-next V3 8/8] net/tls: Except bond interface from some TLS checks

2021-01-17 Thread Tariq Toukan
In the tls_dev_event handler, ignore tlsdev_ops requirement for bond interfaces, they do not exist as the interaction is done directly with the lower device. Also, make the validate function pass when it's called with the upper bond interface. Signed-off-by: Tariq Toukan Reviewed-by:

Re: [PATCH net-next V2 5/8] net/bonding: Implement TLS TX device offload

2021-01-17 Thread Tariq Toukan
On 1/17/2021 4:54 AM, Jakub Kicinski wrote: On Thu, 14 Jan 2021 20:01:32 +0200 Tariq Toukan wrote: As the bond interface is being bypassed by the TLS module, interacting directly against the slaves, there is no way for the bond interface to disable its device offload capabilities, as long as

Re: [PATCH net-next V2 1/8] net: netdevice: Add operation ndo_sk_get_slave

2021-01-17 Thread Tariq Toukan
On 1/17/2021 4:51 AM, Jakub Kicinski wrote: On Thu, 14 Jan 2021 20:01:28 +0200 Tariq Toukan wrote: ndo_sk_get_slave returns the slave that corresponds to a given socket. Additionally, we implement a helper netdev_sk_get_lowest_dev() to get the lowest slave netdevice. Please don't ad

[PATCH net-next V2 3/8] net/bonding: Implement ndo_sk_get_slave

2021-01-14 Thread Tariq Toukan
ned-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- drivers/net/bonding/bond_main.c | 93 + include/net/bonding.h | 2 + 2 files changed, 95 insertions(+) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 8b

[PATCH net-next V2 1/8] net: netdevice: Add operation ndo_sk_get_slave

2021-01-14 Thread Tariq Toukan
ndo_sk_get_slave returns the slave that corresponds to a given socket. Additionally, we implement a helper netdev_sk_get_lowest_dev() to get the lowest slave netdevice. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- include/linux/netdevice.h | 4 net/core/dev.c

[PATCH net-next V2 0/8] TLS device offload for Bond

2021-01-14 Thread Tariq Toukan
odule: Use netdev_sk_get_lowest_dev(), give exceptions to some checks to allow bond support. Tariq Toukan (8): net: netdevice: Add operation ndo_sk_get_slave net/bonding: Take IP hash logic into a helper net/bonding: Implement ndo_sk_get_slave net/bonding: Take update_features call out of XFRM func

[PATCH net-next V2 2/8] net/bonding: Take IP hash logic into a helper

2021-01-14 Thread Tariq Toukan
Hash logic on L3 will be used in a downstream patch for one more use case. Take it to a function for a better code reuse. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- drivers/net/bonding/bond_main.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff

[PATCH net-next V2 5/8] net/bonding: Implement TLS TX device offload

2021-01-14 Thread Tariq Toukan
re is no way for the bond interface to disable its device offload capabilities, as long as the mode/policy config allows it. Hence, the feature flag is not directly controllable, but just reflects the current offload status based on the logic under bond_sk_check(). Signed-off-by: Tariq Toukan Rev

[PATCH net-next V2 4/8] net/bonding: Take update_features call out of XFRM funciton

2021-01-14 Thread Tariq Toukan
In preparation for more cases that call netdev_update_features(). While here, move the features logic to the stage where struct bond is already updated, and pass it as the only parameter to function bond_set_xfrm_features(). Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- drivers

[PATCH net-next V2 6/8] net/bonding: Declare TLS RX device offload support

2021-01-14 Thread Tariq Toukan
feature flag is not directly controllable, but just reflects the offload status based on the logic under bond_sk_check(). Here we just declare RX device offload support, and expose it via the NETIF_F_HW_TLS_RX flag. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- include/net/bonding.h

[PATCH net-next V2 7/8] net/tls: Device offload to use lowest netdevice in chain

2021-01-14 Thread Tariq Toukan
Do not call the tls_dev_ops of upper devices. Instead, ask them for the proper slave and communicate with it directly. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- net/tls/tls_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tls/tls_device.c b/net

[PATCH net-next V2 8/8] net/tls: Except bond interface from some TLS checks

2021-01-14 Thread Tariq Toukan
In the tls_dev_event handler, ignore tlsdev_ops requirement for bond interfaces, they do not exist as the interaction is done directly with the slave. Also, make the validate function pass when it's called with the upper bond interface. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pis

[PATCH net] net: Allow NETIF_F_HW_TLS_TX if IP_CSUM && IPV6_CSUM

2021-01-14 Thread Tariq Toukan
CSUM) is set. Fixes: ae0b04b238e2 ("net: Disable NETIF_F_HW_TLS_TX when HW_CSUM is disabled") Signed-off-by: Tariq Toukan Reported-by: Rohit Maheshwari Reviewed-by: Maxim Mikityanskiy --- Documentation/networking/tls-offload.rst | 2 +- net/core/dev.c |

Re: [net] net: feature check mandating HW_CSUM is wrong

2021-01-13 Thread Tariq Toukan
On 1/13/2021 5:35 AM, Alexander Duyck wrote: On Tue, Jan 12, 2021 at 6:43 PM rohit maheshwari wrote: On 07/01/21 12:47 AM, Jakub Kicinski wrote: On Wed, 6 Jan 2021 23:23:27 +0530 Rohit Maheshwari wrote: Mandating NETIF_F_HW_CSUM to enable TLS offload feature is wrong. And it broke tls o

Re: [net] cxgb4: advertise NETIF_F_HW_CSUM

2021-01-05 Thread Tariq Toukan
On 1/5/2021 10:29 PM, Jakub Kicinski wrote: On Tue, 5 Jan 2021 22:27:49 +0530 Rohit Maheshwari wrote: advertise NETIF_F_HW_CSUM instead of protocol specific values of NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM. This change is added long back in other drivers. This issue is seen recently when TLS

Re: [PATCH] mlx4: style: replace zero-length array with flexible-array member.

2020-12-30 Thread Tariq Toukan
@@ -314,7 +314,7 @@ struct mlx4_en_tx_ring { struct mlx4_en_rx_desc { /* actual number of entries depends on rx ring stride */ - struct mlx4_wqe_data_seg data[0]; + struct mlx4_wqe_data_seg data[]; }; struct mlx4_en_rx_ring { Reviewed-by: Tariq Toukan Thanks.

[PATCH RFC net-next 1/6] net: netdevice: Add operation ndo_sk_get_slave

2020-12-29 Thread Tariq Toukan
ndo_sk_get_slave returns a slave given a socket. Additionally, we implement a helper netdev_sk_get_lowest_dev() to get the lowest slave netdevice. Signed-off-by: Tariq Toukan --- include/linux/netdevice.h | 4 net/core/dev.c| 32 2 files

[PATCH RFC net-next 3/6] net/tls: Except bond interface from some TLS checks

2020-12-29 Thread Tariq Toukan
In the tls_dev_event handler, ignore tls_dev_ops requirement for bond interfaces, they do not exist as the interaction is done directly with the slave. Also, make the validate function pass when it's called with the upper bond interface. Signed-off-by: Tariq Toukan --- net/tls/tls_dev

[PATCH RFC net-next 0/6] RFC: TLS TX HW offload for Bond

2020-12-29 Thread Tariq Toukan
its own, communication is done via the bond and not directly to the lowest device. Regards, Tariq Tariq Toukan (6): net: netdevice: Add operation ndo_sk_get_slave net/tls: Device offload to use lowest netdevice in chain net/tls: Except bond interface from some TLS checks net/bonding:

[PATCH RFC net-next 4/6] net/bonding: Take IP hash logic into a helper

2020-12-29 Thread Tariq Toukan
Hash logic on L3 will be used in a downstream patch for one more use case. Take it to a function for a better code reuse. Signed-off-by: Tariq Toukan --- drivers/net/bonding/bond_main.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/net/bonding

[PATCH RFC net-next 5/6] net/bonding: Implement ndo_sk_get_slave

2020-12-29 Thread Tariq Toukan
Support L3/4 sockets only, with xmit_hash_policy==LAYER34 and modes xor/802.3ad. Signed-off-by: Tariq Toukan --- drivers/net/bonding/bond_main.c | 90 + 1 file changed, 90 insertions(+) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding

[PATCH RFC net-next 2/6] net/tls: Device offload to use lowest netdevice in chain

2020-12-29 Thread Tariq Toukan
Do not call the tls_dev_ops of upper devices. Instead, ask them for the proper slave and communicate with it directly. Signed-off-by: Tariq Toukan --- net/tls/tls_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index

[PATCH RFC net-next 6/6] net/bonding: Support TLS TX device offload

2020-12-29 Thread Tariq Toukan
same exact slave for all the socket's SKBs. We keep the bond feature bit independent from the slaves bits. In case a non-capable slave is picked, the socket falls-back to SW kTLS. netdev_update_features() is taken out of the XFRM function so it is called only once (if needed). Signed-off-by: Ta

[PATCH net V3] net: Disable NETIF_F_HW_TLS_TX when HW_CSUM is disabled

2020-12-13 Thread Tariq Toukan
With NETIF_F_HW_TLS_TX packets are encrypted in HW. This cannot be logically done when HW_CSUM offload is off. Fixes: 2342a8512a1e ("net: Add TLS TX offload features") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- Documentation/networking/tls-offload.rst | 8 +++-

[PATCH ethtool] ethtool: do_sset return correct value on fail

2020-12-13 Thread Tariq Toukan
Roy Novich Signed-off-by: Tariq Toukan --- ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethtool.c b/ethtool.c index 1d9067e774af..5cc875c64591 100644 --- a/ethtool.c +++ b/ethtool.c @@ -3287,7 +3287,7 @@ static int do_sset(struct cmd_co

Re: [patch 23/30] net/mlx5: Use effective interrupt affinity

2020-12-13 Thread Tariq Toukan
c->lag_port = mlx5e_enumerate_lag_port(priv->mdev, ix); netif_napi_add(netdev, &c->napi, mlx5e_napi_poll, 64); Reviewed-by: Tariq Toukan Thanks.

Re: [patch 22/30] net/mlx5: Replace irq_to_desc() abuse

2020-12-13 Thread Tariq Toukan
lanox/mlx5/core/en.h |2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c |2 +- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c |6 +- 3 files changed, 3 insertions(+), 7 deletions(-) Reviewed-by: Tariq Toukan Thanks.

Re: [patch 21/30] net/mlx4: Use effective interrupt affinity

2020-12-13 Thread Tariq Toukan
must reduce the mask to the effective set, which means that checking the affinity mask itself does not really tell about the actual target CPUs. Signed-off-by: Thomas Gleixner Cc: Tariq Toukan Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: linux-r...@vger.

Re: [patch 20/30] net/mlx4: Replace irq_to_desc() abuse

2020-12-13 Thread Tariq Toukan
encapsulation does not mean that the kernel has no limits. Retrieve a pointer to the affinity mask itself and use that. It's still using an interface which is usually not for random drivers, but definitely less hideous than the previous hack. Signed-off-by: Thomas Gleixner Cc: Tariq Toukan Cc: &qu

[PATCH net 0/2] mlx4_en fixes

2020-12-09 Thread Tariq Toukan
Hi, This patchset by Moshe contains fixes to the mlx4 Eth driver, addressing issues in restart flow. Patch 1 protects the restart task from being rescheduled while active. Please queue for -stable >= v2.6. Patch 2 reconstructs SQs stuck in error state, and adds prints for improved debuggabili

[PATCH net 1/2] net/mlx4_en: Avoid scheduling restart task if it is already running

2020-12-09 Thread Tariq Toukan
he Shemesh Signed-off-by: Tariq Toukan --- .../net/ethernet/mellanox/mlx4/en_netdev.c| 20 --- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 7 ++- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/ne

[PATCH net 2/2] net/mlx4_en: Handle TX error CQE

2020-12-09 Thread Tariq Toukan
and WQE for debug. Fixes: bd2f631d7c60 ("net/mlx4_en: Notify user when TX ring in error state") Signed-off-by: Moshe Shemesh Signed-off-by: Tariq Toukan --- .../net/ethernet/mellanox/mlx4/en_netdev.c| 1 + drivers/net/ethernet/mellanox/mlx4/en_tx.c| 40 +++ d

[PATCH net-next] net/mlx4: Remove unused #define MAX_MSIX_P_PORT

2020-12-06 Thread Tariq Toukan
From: Tariq Toukan All usages of the definition MAX_MSIX_P_PORT were removed. It's not in use anymore. Remove it. Signed-off-by: Tariq Toukan Reviewed-by: Moshe Shemesh --- include/linux/mlx4/device.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/mlx4/device.h b/in

Re: [PATCH net] netdevice.h: Fix unintentional disable of ALL_FOR_ALL features on upper device

2020-11-26 Thread Tariq Toukan
On 11/25/2020 11:27 AM, Eric Dumazet wrote: On Wed, Nov 25, 2020 at 10:06 AM Tariq Toukan wrote: On 11/25/2020 5:25 AM, Herbert Xu wrote: On Tue, Nov 24, 2020 at 11:48:35AM +0100, Eric Dumazet wrote: Well, the 'increment' part was suggesting the function was adding flags, no

Re: [PATCH net] netdevice.h: Fix unintentional disable of ALL_FOR_ALL features on upper device

2020-11-25 Thread Tariq Toukan
On 11/25/2020 5:25 AM, Herbert Xu wrote: On Tue, Nov 24, 2020 at 11:48:35AM +0100, Eric Dumazet wrote: Well, the 'increment' part was suggesting the function was adding flags, not removing them. The idea of the increment part is that we're adding a constituent device, not that we're adding

Re: [PATCH net-next 0/2] TLS TX HW offload for Bond

2020-11-24 Thread Tariq Toukan
On 11/23/2020 8:20 PM, Jakub Kicinski wrote: On Sun, 22 Nov 2020 14:48:04 +0200 Tariq Toukan wrote: On 11/19/2020 6:38 PM, Jakub Kicinski wrote: On Thu, 19 Nov 2020 17:59:38 +0200 Tariq Toukan wrote: On 11/19/2020 2:02 AM, Jakub Kicinski wrote: On Sun, 15 Nov 2020 15:42:49 +0200 Tariq

Re: [PATCH net] netdevice.h: Fix unintentional disable of ALL_FOR_ALL features on upper device

2020-11-24 Thread Tariq Toukan
On 11/24/2020 12:48 PM, Eric Dumazet wrote: On Mon, Nov 23, 2020 at 5:15 PM Tariq Toukan wrote: On 11/23/2020 4:55 PM, Eric Dumazet wrote: On Mon, Nov 23, 2020 at 3:13 PM Tariq Toukan wrote: Calling netdev_increment_features() on upper/master device from netdev_add_tso_features

Re: [PATCH net] netdevice.h: Fix unintentional disable of ALL_FOR_ALL features on upper device

2020-11-23 Thread Tariq Toukan
On 11/23/2020 4:55 PM, Eric Dumazet wrote: On Mon, Nov 23, 2020 at 3:13 PM Tariq Toukan wrote: Calling netdev_increment_features() on upper/master device from netdev_add_tso_features() implies unintentional clearance of ALL_FOR_ALL features supported by all slaves. Fix it by passing

[PATCH net] netdevice.h: Fix unintentional disable of ALL_FOR_ALL features on upper device

2020-11-23 Thread Tariq Toukan
aster") Signed-off-by: Tariq Toukan --- include/linux/netdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Hi, I know that netdev_increment_features() does not set any feature that's unmasked in the mask argument. I wonder why it can clear them though, was it meant to be li

Re: [PATCH] net: mlx5e: fix fs_tcp.c build when IPV6 is not enabled

2020-11-23 Thread Tariq Toukan
#x27; defined but not used [-Wunused-function] 47 | static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct sock *sk) Fixes: 5229a96e59ec ("net/mlx5e: Accel, Expose flow steering API for rules add/del") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Saeed Mah

Re: [PATCH net-next 0/2] TLS TX HW offload for Bond

2020-11-22 Thread Tariq Toukan
On 11/19/2020 6:38 PM, Jakub Kicinski wrote: On Thu, 19 Nov 2020 17:59:38 +0200 Tariq Toukan wrote: On 11/19/2020 2:02 AM, Jakub Kicinski wrote: On Sun, 15 Nov 2020 15:42:49 +0200 Tariq Toukan wrote: This series opens TLS TX HW offload for bond interfaces. This allows bond interfaces to

Re: [PATCH 044/141] net/mlx4: Fix fall-through warnings for Clang

2020-11-22 Thread Tariq Toukan
lop, vhcr->in_param, &vhcr->out_param); + break; default: break; Reviewed-by: Tariq Toukan Thanks for your patch.

Re: [PATCH net-next 0/2] TLS TX HW offload for Bond

2020-11-19 Thread Tariq Toukan
On 11/19/2020 2:02 AM, Jakub Kicinski wrote: On Sun, 15 Nov 2020 15:42:49 +0200 Tariq Toukan wrote: This series opens TLS TX HW offload for bond interfaces. This allows bond interfaces to benefit from capable slave devices. The first patch adds real_dev field in TLS context structure, and

[PATCH net-next] net/mlx4_en: Remove unused performance counters

2020-11-18 Thread Tariq Toukan
Performance analysis counters are maintained under the MLX4_EN_PERF_STAT definition, which is never set. Clean them up, with all related structures and logic. Signed-off-by: Tariq Toukan Reviewed-by: Moshe Shemesh --- .../net/ethernet/mellanox/mlx4/en_netdev.c| 1 - drivers/net/ethernet

[PATCH net] net/mlx4_core: Fix init_hca fields offset

2020-11-18 Thread Tariq Toukan
value reported at max_mcast_qp_attach. 3. Driver to init FW with multicast hash size of zero. Fixes: a40ded604365 ("net/mlx4_core: Add masking for a few queries on HCA caps") Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Reviewed-by: Eran Ben Elisha Signed-off-by: Ta

Re: [PATCH bpf-next v2 06/10] xsk: propagate napi_id to XDP socket Rx path

2020-11-16 Thread Tariq Toukan
++- net/core/dev.c| 2 +- net/core/xdp.c| 3 ++- net/xdp/xsk.c | 1 + 29 files changed, 47 insertions(+), 33 deletions(-) Acked-by: Tariq Toukan For the mlx4/5 parts. Thanks, Tariq

[PATCH net-next 0/2] TLS TX HW offload for Bond

2020-11-15 Thread Tariq Toukan
, so we restrict the offload support to it: ((mode == balance-xor) or (mode == 802.3ad)) and xmit_hash_policy == layer3+4. Regards, Tariq Tariq Toukan (2): net/tls: Add real_dev field to TLS context bond: Add TLS TX offload support drivers/net/bonding/bond_main.c

[PATCH net-next 2/2] bond: Add TLS TX offload support

2020-11-15 Thread Tariq Toukan
m the slaves bits. In case a non-capable slave is picked, the socket falls-back to SW kTLS. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Reviewed-by: Boris Pismenny --- drivers/net/bonding/bond_main.c| 203 - drivers/net/bonding/bond_options.c

[PATCH net-next 1/2] net/tls: Add real_dev field to TLS context

2020-11-15 Thread Tariq Toukan
Save the real device for the TLS context. Upper devices that support TLS offload should init real_dev to point to the slave dev in tls_dev_add(). Lower device drivers should work only against real_dev. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Reviewed-by: Boris Pismenny

[PATCH net V2] net/tls: Fix wrong record sn in async mode of device resync

2020-11-15 Thread Tariq Toukan
instead. Fixes: ed9b7646b06a ("net/tls: Add asynchronous resync") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- include/net/tls.h| 16 +++- net/tls/tls_device.c | 37 +++-- 2 files changed, 42 insertions(+), 11 deletions(-) H

Re: bug report: WARNING in bonding

2020-11-12 Thread Tariq Toukan
On 11/12/2020 5:46 PM, Ido Schimmel wrote: On Thu, Nov 12, 2020 at 05:38:44PM +0200, Tariq Toukan wrote: Hi all, In the past ~2-3 weeks, we started seeing the following WARNING and traces in our regression testing systems, almost every day. Reproduction is not stable, and not isolated to a

bug report: WARNING in bonding

2020-11-12 Thread Tariq Toukan
Hi all, In the past ~2-3 weeks, we started seeing the following WARNING and traces in our regression testing systems, almost every day. Reproduction is not stable, and not isolated to a specific test, so it's hard to bisect. Any idea what could this be? Or what is the suspected offending pa

[PATCH net] net/tls: Fix wrong record sn in async mode of device resync

2020-11-11 Thread Tariq Toukan
instead. Fixes: ed9b7646b06a ("net/tls: Add asynchronous resync") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- include/net/tls.h| 19 ++- net/tls/tls_device.c | 35 +-- 2 files changed, 43 insertions(+), 11 deletions(-) H

Re: [PATCH net V2] net: Disable NETIF_F_HW_TLS_TX when HW_CSUM is disabled

2020-11-11 Thread Tariq Toukan
On 11/11/2020 1:44 AM, Jakub Kicinski wrote: On Sun, 8 Nov 2020 16:43:09 +0200 Tariq Toukan wrote: @@ -528,3 +528,7 @@ Drivers should ignore the changes to TLS the device feature flags. These flags will be acted upon accordingly by the core ``ktls`` code. TLS device feature flags only

Re: [PATCH] net/mlx4: Assign boolean values to a bool variable

2020-11-09 Thread Tariq Toukan
On 11/9/2020 9:07 AM, kaixuxia wrote: On 2020/11/8 16:20, Tariq Toukan wrote: On 11/7/2020 8:53 AM, xiakaixu1...@gmail.com wrote: From: Kaixu Xia Fix the following coccinelle warnings: Hi Kaixu, Which coccinelle version gave this warning? Hi Tariq, The version is coccinelle

Re: [PATCH net] net: Disable NETIF_F_HW_TLS_TX when HW_CSUM is disabled

2020-11-08 Thread Tariq Toukan
On 11/5/2020 6:00 PM, Jakub Kicinski wrote: On Thu, 5 Nov 2020 15:22:53 +0200 Tariq Toukan wrote: On 11/4/2020 11:25 PM, Jakub Kicinski wrote: On Wed, 4 Nov 2020 12:21:41 +0200 Tariq Toukan wrote: With NETIF_F_HW_TLS_TX packets are encrypted in HW. This cannot be logically done when

[PATCH net V2] net: Disable NETIF_F_HW_TLS_TX when HW_CSUM is disabled

2020-11-08 Thread Tariq Toukan
With NETIF_F_HW_TLS_TX packets are encrypted in HW. This cannot be logically done when HW_CSUM offload is off. Fixes: 2342a8512a1e ("net: Add TLS TX offload features") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- Documentation/networking/tls-offload.rst | 4 net/

Re: [PATCH] net/mlx4: Assign boolean values to a bool variable

2020-11-08 Thread Tariq Toukan
On 11/7/2020 8:53 AM, xiakaixu1...@gmail.com wrote: From: Kaixu Xia Fix the following coccinelle warnings: Hi Kaixu, Which coccinelle version gave this warning? ./drivers/net/ethernet/mellanox/mlx4/en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable Reported-by: Tosk Robot

Re: [PATCH net] net: Disable NETIF_F_HW_TLS_TX when HW_CSUM is disabled

2020-11-05 Thread Tariq Toukan
On 11/4/2020 11:25 PM, Jakub Kicinski wrote: On Wed, 4 Nov 2020 12:21:41 +0200 Tariq Toukan wrote: With NETIF_F_HW_TLS_TX packets are encrypted in HW. This cannot be logically done when HW_CSUM offload is off. Right. Do you expect drivers to nack clearing NETIF_F_HW_TLS_TX when there are

[PATCH net] net: Disable NETIF_F_HW_TLS_TX when HW_CSUM is disabled

2020-11-04 Thread Tariq Toukan
With NETIF_F_HW_TLS_TX packets are encrypted in HW. This cannot be logically done when HW_CSUM offload is off. Fixes: 2342a8512a1e ("net: Add TLS TX offload features") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- net/core/dev.c | 5 + 1 file changed, 5 inserti

Re: [PATCH] net/mlx4_core : remove unneeded semicolon

2020-11-02 Thread Tariq Toukan
(enum mlx4_resource rt) case RES_FS_RULE: return "RES_FS_RULE"; case RES_XRCD: return "RES_XRCD"; default: return "Unknown resource type !!!"; - }; + } } static void rem_slave_vlans(struct mlx4_dev *dev, int slave); Reviewed-by: Tariq Toukan Thanks, Tariq

Re: [PATCH net-next] mlx4: handle non-napi callers to napi_poll

2020-10-11 Thread Tariq Toukan
sing > > - do not try to recycle TX packets to the RX cache > > > > Signed-off-by: Jonathan Lemon > > Tariq, Saeed - how does this look to you? Reviewed-by: Tariq Toukan Thanks, Tariq

[RFC PATCH] workqueue: Add support for exposing singlethread workqueues in sysfs

2020-10-06 Thread Tariq Toukan
Extend the workqueue API so that singlethread workqueues can be exposed in sysfs. Guarantee max_active is 1 by turning it read-only. This allows admins to control the cpumask of a workqueue, and apply the desired system cpu separation/isolation policy. Signed-off-by: Tariq Toukan --- drivers

Re: [PATCH net-next] net: ethernet: mlx4: Avoid assigning a value to ring_cons but not used it anymore in mlx4_en_xmit()

2020-09-15 Thread Tariq Toukan
On 9/14/2020 11:02 PM, Jakub Kicinski wrote: On Sun, 13 Sep 2020 13:12:05 +0300 Tariq Toukan wrote: 2. When MLX4_EN_PERF_STAT is not defined, we should totally remove the local variable declaration, not only its usage. I was actually wondering about this when working on the pause stat

Re: [PATCH net-next] net: ethernet: mlx4: Avoid assigning a value to ring_cons but not used it anymore in mlx4_en_xmit()

2020-09-13 Thread Tariq Toukan
On 9/13/2020 4:22 AM, David Miller wrote: From: Luo Jiaxing Date: Sat, 12 Sep 2020 16:08:15 +0800 We found a set but not used variable 'ring_cons' in mlx4_en_xmit(), it will cause a warning when build the kernel. And after checking the commit record of this function, we found that it was in

Re: [PATCH net-next v2 2/2] mlx4: make sure to always set the port type

2020-09-09 Thread Tariq Toukan
rt, NULL); + else if (!IS_ENABLED(CONFIG_MLX4_INFINIBAND) && +dev->caps.port_type[port] == MLX4_PORT_TYPE_IB) + devlink_port_type_ib_set(&info->devlink_port, NULL); + info->dev = dev; info->port = port; if (!mlx4_is_slave(dev)) { Reviewed-by: Tariq Toukan

[PATCH net-next 1/3] net: Take common prefetch code structure into a function

2020-08-26 Thread Tariq Toukan
Many device drivers use the same prefetch code structure to deal with small L1 cacheline size. Take this code into a function and call it from the drivers. Suggested-by: Jakub Kicinski Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed --- drivers/net/ethernet/chelsio/cxgb3/sge.c

[PATCH net-next 2/3] net/mlx5e: RX, Add a prefetch command for small L1_CACHE_BYTES

2020-08-26 Thread Tariq Toukan
A single cacheline might not contain the packet header for small L1_CACHE_BYTES values. Use net_prefetch() as it issues an additional prefetch in this case. Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c| 4 ++-- drivers/net

[PATCH net-next 3/3] net/mlx4_en: RX, Add a prefetch command for small L1_CACHE_BYTES

2020-08-26 Thread Tariq Toukan
A single cacheline might not contain the packet header for small L1_CACHE_BYTES values. Use net_prefetch() as it issues an additional prefetch in this case. Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- 1 file changed, 1

[PATCH net-next 0/3] net_prefetch API

2020-08-26 Thread Tariq Toukan
t-for-davem-20200824' of git://git.open-mesh.org/linux-merge Thanks, Tariq. Tariq Toukan (3): net: Take common prefetch code structure into a function net/mlx5e: RX, Add a prefetch command for small L1_CACHE_BYTES net/mlx4_en: RX, Add a prefetch command for small L1_CACHE_BYTES d

Re: [PATCH net-next v2 10/10] mlx4: convert to new udp_tunnel_nic infra

2020-07-09 Thread Tariq Toukan
On 7/9/2020 4:58 PM, Tariq Toukan wrote: On 7/9/2020 4:18 AM, Jakub Kicinski wrote: Convert to new infra, make use of the ability to sleep in the callback. Signed-off-by: Jakub Kicinski ---   .../net/ethernet/mellanox/mlx4/en_netdev.c    | 107 --   drivers/net/ethernet

Re: [PATCH net-next v2 10/10] mlx4: convert to new udp_tunnel_nic infra

2020-07-09 Thread Tariq Toukan
On 7/9/2020 4:18 AM, Jakub Kicinski wrote: Convert to new infra, make use of the ability to sleep in the callback. Signed-off-by: Jakub Kicinski --- .../net/ethernet/mellanox/mlx4/en_netdev.c| 107 -- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 - 2 files chan

Re: [net-next 09/15] Revert "net/tls: Add force_resync for driver resync"

2020-07-07 Thread Tariq Toukan
On 6/28/2020 12:17 AM, Saeed Mahameed wrote: From: Boris Pismenny This reverts commit b3ae2459f89773adcbf16fef4b68deaaa3be1929. Revert the force resync API. Not in use. To be replaced by a better async resync API downstream. Signed-off-by: Boris Pismenny Signed-off-by: Tariq Toukan

Re: [PATCH][next] net/mlx5e: fix memory leak of tls

2020-06-30 Thread Tariq Toukan
return -ENOMEM; tls->rx_wq = create_singlethread_workqueue("mlx5e_tls_rx"); - if (!tls->rx_wq) + if (!tls->rx_wq) { + kfree(tls); return -ENOMEM; + } priv->tls = tls; return 0; Reviewed-by: Tariq Toukan Thanks.

Re: [PATCH][next] net/tls: fix sign extension issue when left shifting u16 value

2020-06-30 Thread Tariq Toukan
_set(&rx_ctx->resync_async->req, ((u64)ntohl(seq) << 32) | -(len << 16) | RESYNC_REQ | RESYNC_REQ_ASYNC); +((u64)len << 16) | RESYNC_REQ | RESYNC_REQ_ASYNC); rx_ctx->resync_async->loglen = 0; } Reviewed-by: Tariq Toukan Thanks!

[PATCH net V2] net: Do not clear the sock TX queue in sk_set_socket()

2020-06-22 Thread Tariq Toukan
property guarantee for device-offloaded TLS sockets. Remove the call to sk_tx_queue_clear() in sk_set_socket(), and add it explicitly only where needed. Fixes: e022f0b4a03f ("net: Introduce sk_tx_queue_mapping") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- include/net/

Re: [PATCH net] net: Do not clear the socket TX queue in sock_orphan()

2020-06-22 Thread Tariq Toukan
On 6/22/2020 7:56 PM, Eric Dumazet wrote: On 6/22/20 9:24 AM, Tariq Toukan wrote: On 6/22/2020 6:53 PM, Eric Dumazet wrote: On 6/21/20 7:09 AM, Tariq Toukan wrote: sock_orphan() call to sk_set_socket() implies clearing the sock TX queue. This might cause unexpected out-of-order

Re: [PATCH net] net: Do not clear the socket TX queue in sock_orphan()

2020-06-22 Thread Tariq Toukan
On 6/22/2020 6:53 PM, Eric Dumazet wrote: On 6/21/20 7:09 AM, Tariq Toukan wrote: sock_orphan() call to sk_set_socket() implies clearing the sock TX queue. This might cause unexpected out-of-order transmit, as outstanding packets can pick a different TX queue and bypass the ones already

[PATCH net] net: Do not clear the socket TX queue in sock_orphan()

2020-06-21 Thread Tariq Toukan
t;net: Introduce sk_tx_queue_mapping") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- include/net/sock.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) Please queue for -stable. diff --git a/include/net/sock.h b/include/net/sock.h index c53cc42b5ab9..23e43f3d7

Re: [net-next 10/11] net/mlx5e: kTLS, Add kTLS RX resync support

2020-06-03 Thread Tariq Toukan
On 6/2/2020 9:31 PM, Jakub Kicinski wrote: On Tue, 2 Jun 2020 14:32:44 +0300 Tariq Toukan wrote: On 6/2/2020 1:12 AM, Jakub Kicinski wrote: This is a rare corner case anyway, where more than 1k tcp connections sharing the same RX ring will request resync at the same exact moment. IDK

  1   2   3   4   5   6   7   8   >