lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZHWt0geuzEfIU3Ck@DEN-LT-70577>
Date: Tue, 30 May 2023 08:03:30 +0000
From: Daniel Machon <daniel.machon@...rochip.com>
To: Petr Machata <petrm@...dia.com>
CC: <netdev@...r.kernel.org>, <dsahern@...nel.org>,
	<stephen@...workplumber.org>, <UNGLinuxDriver@...rochip.com>
Subject: Re: [PATCH iproute2-next v2 3/8] dcb: app: modify
 dcb_app_table_remove_replaced() for dcb-rewr reuse

> > When doing a replace command, entries are checked against selector and
> > protocol. Rewrite requires the check to be against selector and
> > priority.
> >
> > Adapt the existing dcb_app_table_remove_replace function for this, by
> > using callback functions for selector, pid and prio checks.
> >
> > Signed-off-by: Daniel Machon <daniel.machon@...rochip.com>
> > ---
> >  dcb/dcb.h     | 14 ++++++++++++++
> >  dcb/dcb_app.c | 32 ++++++++++++++++++++------------
> >  2 files changed, 34 insertions(+), 12 deletions(-)
> >
> > diff --git a/dcb/dcb.h b/dcb/dcb.h
> > index d40664f29dad..84ce95d5c1b2 100644
> > --- a/dcb/dcb.h
> > +++ b/dcb/dcb.h
> > @@ -56,11 +56,25 @@ void dcb_print_array_kw(const __u8 *array, size_t array_size,
> >
> >  /* dcb_app.c */
> >
> > +struct dcb_app_table {
> > +     struct dcb_app *apps;
> > +     size_t n_apps;
> > +     int attr;
> > +};
> > +
> >  int dcb_cmd_app(struct dcb *dcb, int argc, char **argv);
> >  enum ieee_attrs_app dcb_app_attr_type_get(__u8 selector);
> >  bool dcb_app_attr_type_validate(enum ieee_attrs_app type);
> >  bool dcb_app_selector_validate(enum ieee_attrs_app type, __u8 selector);
> >
> > +bool dcb_app_pid_eq(const struct dcb_app *aa, const struct dcb_app *ab);
> > +bool dcb_app_prio_eq(const struct dcb_app *aa, const struct dcb_app *ab);
> 
> This function isn't necessary until 5/8, that's when it should be added.
> 
> > +
> > +void dcb_app_table_remove_replaced(struct dcb_app_table *a,
> > +                                const struct dcb_app_table *b,
> > +                                bool (*key_eq)(const struct dcb_app *aa,
> > +                                               const struct dcb_app *ab));
> > +
> 
> This is conflating publication with prototype change. It would be best
> to separate. I think the publication could be done at the point when you
> actually need the function, i.e. 5/8 as well. I would keep here just the
> prototype change.
> 

Sounds OK to me. Will change in next v.
 

Powered by blists - more mailing lists