05/11/2025 20:20, Stephen Hemminger:
> Looks good as is, a couple of minor observations.
> 
> > +   /* pfX... or (pfX)... */
> > +   if ((str[0] == 'p' && str[1] == 'f') ||
> > +       (str[0] == '(' && str[1] == 'p' && str[2] == 'f')) {
> 
> This is correct but seem like it is getting verbose.
> If there are more cases than this looking for prefix, might be
> useful to have helper function.
> 
> Looks like devargs could use some better pattern matching,
> lots of string handling already in this code.
> String processing in C is often an error trap.
> 
> > +           if (str != NULL && str[0] == ')') {
> > +                   str++; /* advance past ")" */
> > +                   eth_da->flags =
> > +                           RTE_ETH_DEVARG_IGNORE_PF_REPRESENTOR;
> 
> Can't that go on one line, max line length in DPDK is 100.
> Is there a case where there could be multiple devargs flags?

It is the first flag.
I would prefer this flag to be named RTE_ETH_DEVARG_REPRESENTOR_IGNORE_PF.


Reply via email to