RE: [RFC PATCH rdma-next 13/18] RDMA/mlx5: Enable decap and packet reformat on flow tables

2018-07-17 Thread Mark Bloch


> -Original Message-
> From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma-
> ow...@vger.kernel.org] On Behalf Of Or Gerlitz
> Sent: Tuesday, July 17, 2018 5:47 AM
> To: Mark Bloch 
> Cc: Doug Ledford ; Jason Gunthorpe
> ; Leon Romanovsky ; RDMA
> mailing list ; Saeed Mahameed
> ; linux-netdev 
> Subject: Re: [RFC PATCH rdma-next 13/18] RDMA/mlx5: Enable decap and
> packet reformat on flow tables
> 
> On Tue, Jul 17, 2018 at 12:46 AM, Mark Bloch  wrote:
> >> From: Or Gerlitz [mailto:gerlitz...@gmail.com]
> 
> >> > If NIC RX flow tables support decap opertion, enable it on creation.
> >> opertion --> operation
> 
> saw it?

yes, sorry I didn't say so 
> 
> >> > If NIC TX flow tables support reformat opertion, enable it on creation.
> 
> opertion --> operation
> 
> >> What is the trigger to use the decap flag on RX table or encap flag on
> >> TX table?
> 
> > It has no performance penalty to always enable that, so that's what I do if
> supported.
> 
> I was not referring to performance, see below
> 
> >> Please note that we have a short blanket w.r.t mutual usage by
> 
> > FDB and NIC steering tables have different limitations, so encap/decap on
> NIC steering
> > have nothing to do with the limitations the FDB has with those operations.
> 
> no! AFAIK it has to do, the FW maintains three states for encap(decap)
> NONE, FDB or NIC
> if the state is NIC, an FDB table can't be created with encap set, and
> the other way around, if the
> state is FDB, NIC TX table can't be created with encap set, etc. This
> is the short blanket I was
> referring too, you can check me.

Or I'm sorry, just realized you don't see the updated version of the patch set. 
(will be sent without RFC tag)
The updated one doesn't allow TX steering to be done when in switchdev mode as 
today
we lack the API (on the RDMA side) to specify to which rep the rules should be 
applied.

Also once in switchdev mode, the FW turns off the cap flag for encap, which 
means the VFs won't create
a flow table with the encap flag set, and because we require the VFs won't be 
binded when moving to switchdev
mode they will always see the updated caps.

Does that address your concerns?

Mark. 

> 
> >> NIC vs e-Switch  steering, did you consider to do that on demand?
> >
> > The flow table needs to be created with those flags set if we want to attach
> > decap/packet reformat action to it. BTW, there is no modify action for
> those bits
> > so that's why I'm doing it on creation.
> 
> The question was if you can let the application tell you that they want to use
> rules with encap/decap, as we did in the devlink switchdev API (encap
> enabled)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH rdma-next 13/18] RDMA/mlx5: Enable decap and packet reformat on flow tables

2018-07-17 Thread Or Gerlitz
On Tue, Jul 17, 2018 at 12:46 AM, Mark Bloch  wrote:
>> From: Or Gerlitz [mailto:gerlitz...@gmail.com]

>> > If NIC RX flow tables support decap opertion, enable it on creation.
>> opertion --> operation

saw it?

>> > If NIC TX flow tables support reformat opertion, enable it on creation.

opertion --> operation

>> What is the trigger to use the decap flag on RX table or encap flag on
>> TX table?

> It has no performance penalty to always enable that, so that's what I do if 
> supported.

I was not referring to performance, see below

>> Please note that we have a short blanket w.r.t mutual usage by

> FDB and NIC steering tables have different limitations, so encap/decap on NIC 
> steering
> have nothing to do with the limitations the FDB has with those operations.

no! AFAIK it has to do, the FW maintains three states for encap(decap)
NONE, FDB or NIC
if the state is NIC, an FDB table can't be created with encap set, and
the other way around, if the
state is FDB, NIC TX table can't be created with encap set, etc. This
is the short blanket I was
referring too, you can check me.

>> NIC vs e-Switch  steering, did you consider to do that on demand?
>
> The flow table needs to be created with those flags set if we want to attach
> decap/packet reformat action to it. BTW, there is no modify action for those 
> bits
> so that's why I'm doing it on creation.

The question was if you can let the application tell you that they want to use
rules with encap/decap, as we did in the devlink switchdev API (encap enabled)


RE: [RFC PATCH rdma-next 13/18] RDMA/mlx5: Enable decap and packet reformat on flow tables

2018-07-16 Thread Mark Bloch

> -Original Message-
> From: Or Gerlitz [mailto:gerlitz...@gmail.com]
> Sent: Monday, July 16, 2018 2:24 PM
> To: Mark Bloch 
> Cc: Doug Ledford ; Jason Gunthorpe
> ; Leon Romanovsky ; RDMA
> mailing list ; Saeed Mahameed
> ; linux-netdev 
> Subject: Re: [RFC PATCH rdma-next 13/18] RDMA/mlx5: Enable decap and
> packet reformat on flow tables
> 
> On Mon, Jul 16, 2018 at 11:23 AM, Leon Romanovsky 
> wrote:
> > From: Mark Bloch 
> >
> > If NIC RX flow tables support decap opertion, enable it on creation.
> 
> opertion --> operation
> 
> > If NIC TX flow tables support reformat opertion, enable it on creation.
> 
> What is the trigger to use the decap flag on RX table or encap flag on
> TX table?
> 

It has no performance penalty to always enable that, so that's what I do if 
supported.
 
> Please note that we have a short blanket w.r.t mutual usage by

FDB and NIC steering tables have different limitations, so encap/decap on NIC 
steering
have nothing to do with the limitations the FDB has with those operations.

> NIC vs e-Switch  steering, did you consider to do that on demand?

The flow table needs to be created with those flags set if we want to attach
decap/packet reformat action to it. BTW, there is no modify action for those 
bits
so that's why I'm doing it on creation.

Mark


Re: [RFC PATCH rdma-next 13/18] RDMA/mlx5: Enable decap and packet reformat on flow tables

2018-07-16 Thread Or Gerlitz
On Mon, Jul 16, 2018 at 11:23 AM, Leon Romanovsky  wrote:
> From: Mark Bloch 
>
> If NIC RX flow tables support decap opertion, enable it on creation.

opertion --> operation

> If NIC TX flow tables support reformat opertion, enable it on creation.

What is the trigger to use the decap flag on RX table or encap flag on
TX table?

Please note that we have a short blanket w.r.t mutual usage by
NIC vs e-Switch  steering, did you consider to do that on demand?