diff mbox series

[mlx5-next,09/16] net/mlx5: Expose IP-in-IP TX and RX capability bits

Message ID 20201120230339.651609-10-saeedm@nvidia.com
State Superseded
Headers show
Series mlx5 next updates 2020-11-20 | expand

Commit Message

Saeed Mahameed Nov. 20, 2020, 11:03 p.m. UTC
From: Aya Levin <ayal@nvidia.com>

Expose FW indication that it supports stateless offloads for IP over IP
tunneled packets per direction. In some HW like ConnectX-4 IP-in-IP
support is not symmetric, it supports steering on the inner header but
it doesn't TX-Checksum and TSO. Add IP-in-IP capability per direction to
cover this case as well.

Note: only if both indications are turned on, the global
tunnel_stateless_ip_over_ip is on too.

Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 include/linux/mlx5/mlx5_ifc.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Jakub Kicinski Nov. 21, 2020, 11:58 p.m. UTC | #1
On Fri, 20 Nov 2020 15:03:32 -0800 Saeed Mahameed wrote:
> From: Aya Levin <ayal@nvidia.com>
> 
> Expose FW indication that it supports stateless offloads for IP over IP
> tunneled packets per direction. In some HW like ConnectX-4 IP-in-IP
> support is not symmetric, it supports steering on the inner header but
> it doesn't TX-Checksum and TSO. Add IP-in-IP capability per direction to
> cover this case as well.

What's the use for the rx capability in Linux? We don't have an API to
configure that AFAIK.
Aya Levin Nov. 22, 2020, 3:17 p.m. UTC | #2
On 11/22/2020 1:58 AM, Jakub Kicinski wrote:
> On Fri, 20 Nov 2020 15:03:32 -0800 Saeed Mahameed wrote:
>> From: Aya Levin <ayal@nvidia.com>
>>
>> Expose FW indication that it supports stateless offloads for IP over IP
>> tunneled packets per direction. In some HW like ConnectX-4 IP-in-IP
>> support is not symmetric, it supports steering on the inner header but
>> it doesn't TX-Checksum and TSO. Add IP-in-IP capability per direction to
>> cover this case as well.
> 
> What's the use for the rx capability in Linux? We don't have an API to
> configure that AFAIK.
> 
Correct, the rx capability bit is used by the driver to allow flow 
steering on the inner header.
Saeed Mahameed Nov. 23, 2020, 9:15 p.m. UTC | #3
On Sun, 2020-11-22 at 17:17 +0200, Aya Levin wrote:
> 
> On 11/22/2020 1:58 AM, Jakub Kicinski wrote:
> > On Fri, 20 Nov 2020 15:03:32 -0800 Saeed Mahameed wrote:
> > > From: Aya Levin <ayal@nvidia.com>
> > > 
> > > Expose FW indication that it supports stateless offloads for IP
> > > over IP
> > > tunneled packets per direction. In some HW like ConnectX-4 IP-in-
> > > IP
> > > support is not symmetric, it supports steering on the inner
> > > header but
> > > it doesn't TX-Checksum and TSO. Add IP-in-IP capability per
> > > direction to
> > > cover this case as well.
> > 
> > What's the use for the rx capability in Linux? We don't have an API
> > to
> > configure that AFAIK.
> > 
> Correct, the rx capability bit is used by the driver to allow flow 
> steering on the inner header.

Currently we use the global HW capability to enable flow steering on
inner header for RSS. in upcoming patch to net-next we will relax the
dependency on the global capability and will use the dedicated rx cap
instead.
diff mbox series

Patch

diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index 3ace1976514c..96888f9f822d 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -913,7 +913,10 @@  struct mlx5_ifc_per_protocol_networking_offload_caps_bits {
 	u8         tunnel_stateless_ipv4_over_vxlan[0x1];
 	u8         tunnel_stateless_ip_over_ip[0x1];
 	u8         insert_trailer[0x1];
-	u8         reserved_at_2b[0x5];
+	u8         reserved_at_2b[0x1];
+	u8         tunnel_stateless_ip_over_ip_rx[0x1];
+	u8         tunnel_stateless_ip_over_ip_tx[0x1];
+	u8         reserved_at_2e[0x2];
 	u8         max_vxlan_udp_ports[0x8];
 	u8         reserved_at_38[0x6];
 	u8         max_geneve_opt_len[0x1];