[dpdk-dev] [PATCH 0/4] net/mlx5: keep indirect actions across port restart

Ori Kam orika at nvidia.com
Wed Jul 28 14:07:30 CEST 2021


Hi Dmitry and Andrew,

> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Dmitry Kozlyuk
> Sent: Wednesday, July 28, 2021 2:19 PM
> 
> Hi Andrew,
> 
> > From: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru> On 7/27/21
> > 10:31 AM, Dmitry Kozlyuk wrote:
> > > It was unspecified what happens to indirect actions when a port is
> > > stopped, possibly reconfigured, and started again. MLX5 PMD, the
> > > first one to use indirect actions, intended to keep them across such
> > > a sequence, but the implementation was buggy. Patches 1-3 fix the
> > > PMD behavior, patch 4 adds common specification with rationale.
> >
> > I'm sorry, but it looks very inconsistent. If flow rules are not
> > preserved across restart, indirect actions should not be preserved as
> > well. We need very strong reasons to introduce the inconsistency.
> 
> Indirect actions really don't need to behave like flow rules. They are just
> objects owned by the port and they can exist while it exists. Consider a
> counter: stopping and starting the port doesn't logically affect its state. MLX5
> PMD destroys flow rules on port stop for internal reasons and documents
> this behavior, but ethdev API doesn't require it either.
> 
> > If we finally accept it, I think it would be very useful to care about
> > PMDs which cannot preserve it in HW across restart from the very
> > beginning and save it in ethdev layer and restore on start
> > automatically (i.e. do not force all such PMDs to care about the restore
> internally and basically duplicate the code).
> 
> Or keeping indirect actions can be an advertised PMD capability.
> Given Ori's comments to patch 4, I think the common spec needs more work.
> For this patchset that fixes MLX5 we can have the behavior documented for
> PMD and not require it from all the drivers.

This also effects if flows can be stored or not, (there was other thread about it)
I think we should have device cap that says if flows are preserved,
if they can be created before start, the same goes to actions, but
what if some actions can be preserved and some not? For example RSS
can't in some HW (or due to configuration change) while other can? For example
counter?
I don't want to have cap for each action, I think this info is based explained in each
driver documentation.
Maybe we can have some general flag one for flows and one for actions, and each PMD will have
detail doc.


Best,
Ori



More information about the dev mailing list