Re: [PATCH RFC net-next v3 4/8] netconsole: Introduce configfs helpers for sysdata features

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 24, 2025 at 07:16:43AM -0800, Breno Leitao wrote:
> This patch introduces a bitfield to store sysdata features in the
> netconsole_target struct. It also adds configfs helpers to enable
> or disable the CPU_NR feature, which populates the CPU number in
> sysdata.
> 
> The patch provides the necessary infrastructure to set or unset the
> CPU_NR feature, but does not modify the message itself.
> 
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
> ---
>  drivers/net/netconsole.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 81 insertions(+)
> 
> diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c

...

> @@ -792,7 +817,62 @@ static ssize_t userdatum_value_store(struct config_item *item, const char *buf,
>  	return ret;
>  }
>  
> +/* disable_sysdata_feature - Disable sysdata feature and clean sysdata
> + * @nt: target that is diabling the feature

nit: disabling

> + * @feature: feature being disabled
> + */
> +static void disable_sysdata_feature(struct netconsole_target *nt,
> +				    enum sysdata_feature feature)
> +{
> +	nt->sysdata_fields &= ~feature;
> +	nt->extradata_complete[nt->userdata_length] = 0;
> +}

...




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux