Skip to content

Consider using a single value to represent an invalid ID #4098

@lmb

Description

@lmb

The runtime currently reserves two values to mean "invalid ID": 0 and EBPF_ID_NONE (which is the same as MAX_UINT32). This leads to duplicate checks / inconsistencies in code checking IDs for validity.

For reference, Linux uses 0 as the invalid ID. MAX_UINT32 is a valid ID, afaik.

@dthaler suggested that it might make sense to define EBPF_ID_NONE to be 0.

Metadata

Metadata

Assignees

Labels

P2cleanupAffects API usability or code maintainability but not correctness or applicabilitytriagedDiscussed in a triage meeting

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions