Thread (27 messages) flat view 27 messages, 3 authors, 2021-06-03

Re: [PATCH net-next v4 2/5] ipv6: ioam: Data plane support for Pre-allocated Trace

From: Justin Iurman <hidden>
Date: 2021-05-30 14:50:35

quoted
quoted
A per-interface sysctl ioam6_enabled is provided to process/ignore IOAM
headers. Default is ignore (= disabled). Another per-interface sysctl
ioam6_id is provided to define the IOAM (unique) identifier of the
interface. Default is 0. A per-namespace sysctl ioam6_id is provided to
define the IOAM (unique) identifier of the node. Default is 0.
Last two sentences are repeated.
One describes net.ipv6.conf.XXX.ioam6_id (per interface) and the other describes
net.ipv6.ioam6_id (per namespace). It allows for defining an IOAM id to an
interface and, also, the node in general.
quoted
Is 0 a valid interface ID? If not why not use id != 0 instead of
having a separate enabled field?
Mainly for semantic reasons. Indeed, I'd prefer to keep a specific "enable" flag
per interface as it sounds more intuitive. But, also because 0 could very well
be a "valid" interface id (more like a default value).
Actually, it's more than for semantic reasons. Take the following topology:

 _____              _____              _____
|     | eth0  eth0 |     | eth1  eth0 |     |
|  A  |.----------.|  B  |.----------.|  C  |
|_____|            |_____|            |_____|

If I only want IOAM to be deployed from A to C but not from C to A, then I would need the following on B (let's just focus on B):

B.eth0.ioam6_enabled = 1 // enable IOAM *on input* for B.eth0
B.eth0.ioam6_id = B1
B.eth1.ioam6_id = B2

Back to your suggestion, if I only had one field (i.e., ioam6_id != 0 to enable IOAM), I would end up with:

B.eth0.ioam6_id = B1 // (!= 0)
B.eth1.ioam6_id = B2 // (!= 0)

Which means in this case that IOAM would also be enabled on B for the reverse path. So we definitely need two fields to distinguish both the status (enabled/disabled) and the IOAM ID of an interface.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help