On 1/16/2020 12:53 PM, Ori Kam wrote: > DPDK now supports registration of dynamic flags (dynf) to the mbuf. > dynf can be given any name, and can be used with a supporting PMD or > supporting application. > > Due to the generic concept of the dynf, it is impossible and meaningless, > to define register set/get function for each flag. > This commit introduce a generic way to register and set/clear such flags. > > The basic syntax: > port config <port id> dynf <name> <set|clear> > > The first step the new flag is registered. Regardless if the action is > set or clear. > There is no way to unregister the flag, after registring it. > > The second step, if the action is set then we set the requested flag. > If this is the first flag that is enabled we also register a call back > for the Tx. In this call back we set the flag. > If the action is clear the requested flag is cleared, and if there > are no more flags that are set, the call back is removed. > > The reason that the set is only applied in Tx is that in case of Rx > it is assumed that the value comes from the PMD. > > If log is enabled the name of the flag, and value will be printed > in the packet info. > In order for the log to work correcly the registration of the flag > must be done before setting verbose. > > Signed-off-by: Ori Kam <or...@mellanox.com> > Acked-by: Viacheslav Ovsiienko <viachesl...@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yi...@intel.com> Applied to dpdk-next-net/master, thanks.