> > On Tue, 4 Mar 2025 15:21:49 +0800 Wei Fang wrote: > > > +config NXP_NETC_LIB > > > + tristate "NETC Library" > > > > Remove the string after "tristate", the user should not be prompted > > to make a choice for this, since the consumers "select" this config > > directly. > > > > Okay, I will remove it. > > > > + help > > > + This module provides common functionalities for both ENETC and NETC > > > + Switch, such as NETC Table Management Protocol (NTMP) 2.0, > common > > tc > > > + flower and debugfs interfaces and so on. > > > + > > > + If compiled as module (M), the module name is nxp-netc-lib. > > > > Not sure if the help makes sense for an invisible symbol either. > > Yes, I think it can also be removed. Thanks. > > > > > config FSL_ENETC > > > tristate "ENETC PF driver" > > > depends on PCI_MSI > > > @@ -40,6 +50,7 @@ config NXP_ENETC4 > > > select FSL_ENETC_CORE > > > select FSL_ENETC_MDIO > > > select NXP_ENETC_PF_COMMON > > > + select NXP_NETC_LIB > > > select PHYLINK > > > select DIMLIB > > > help > > > > > +#pragma pack(1) > > > > please don't blindly pack all structs, only if they are misaligned > > or will otherwise have holes. > > Because these structures are in hardware buffer format and need > to be aligned, so for convenience, I simply used pack(1). You are right, > I should use pack() for structures with holes. Thanks. > > > > > +#if IS_ENABLED(CONFIG_NXP_NETC_LIB) > > > > why the ifdef, all callers select the config option > > hm..., there are some interfaces of netc-lib are used in common .c files > in downstream, so I used "ifdef" in downstream. Now for the upstream, > I'm going to separate them from the common .c files. So yes, we can > remove it now.
Sorry, I misread the header file. The ifdef in ntmp.h is needed because the interfaces in this header file will be used by the enetc-core and enetc-vf drivers. For the ENETC v1 (LS1028A platform), it will not select NXP_NETC_LIB.