On Fri, 23 Sep 2022 14:57:59 +1000 David Gibson <david(a)gibson.dropbear.id.au> wrote:[...] --- /dev/null +++ b/port_fwd.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: AGPL-3.0-or-later + * Copyright Red Hat + * Author: Stefano Brivio <sbrivio(a)redhat.com> + * Author: David Gibson <david(a)gibson.dropbear.id.au> + */ + +#ifndef PORT_FWD_H +#define PORT_FWD_H + +enum port_fwd_mode { + FWD_SPEC = 1, + FWD_NONE, + FWD_AUTO, + FWD_ALL, +}; + +typedef uint8_t port_fwd_map[DIV_ROUND_UP(USHRT_MAX, 8)];Given that this gets conveniently embedded in a struct in 2/8, could we avoid the typedef (or perhaps drop it after 2/8)? It makes the actual type less obvious to figure out, and in general I agree with most points from this slide deck: http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/mgp0… :) ...well, unless there's some resulting complexity I'm missing. I reviewed the rest of the series, it all makes sense to me, thanks. -- Stefano