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

Dmitry Kozlyuk dkozlyuk at nvidia.com
Wed Jul 28 13:18:44 CEST 2021


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.


More information about the dev mailing list