# Re: \[PATCH v2 7/7\] tools/testing/selftests/bpf: replace open-coded 16 with TASK\_COMM\_LEN

- From: Mathieu Desnoyers \<mathieu.desnoyers@efficios.com\>
- Date: 2023-02-13 17:46:15 
- List: netdev
- Page: https://ratatoskr.run/netdev/2023/02/243487
- Thread: https://ratatoskr.run/netdev/2021/11/218444/t.md

```text
On 2023-02-13 12:43, Namhyung Kim wrote:
> Hi Steve,
>
> On Sat, Feb 11, 2023 at 8:07 PM Steven Rostedt [ref] wrote:
>>
>> On Sun, 12 Feb 2023 11:38:52 +0800
>> Yafang Shao [ref] wrote:
>>
>>>> Actually, there are cases that this needs to be a number, as b3bc8547d3be6
>>>> ("tracing: Have TRACE_DEFINE_ENUM affect trace event types as well") made
>>>> it update fields as well as the printk fmt.
>>>>
>>>
>>> It seems that TRACE_DEFINE_ENUM(TASK_COMM_LEN) in the trace events
>>> header files would be a better fix.
>>
>> NACK! I much prefer the proper fix that adds the length.
>
> Can we just have both enum and macro at the same time?
> I guess the enum would fill the BTF and the macro would provide
> backward compatibility.

This is no need to keep the define. The root cause of the issue is addressed by this fix:

https://lore.kernel.org/lkml/20230212154620.4d8fe033@gandalf.local.home/

Thanks,

Mathieu

>
> Thanks,
> Namhyung

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

```
