Closed hugo0819 closed 1 month ago
Note that just about everywhere that a P4 field is used, it contains the name of the header variable that it is part of, and the header variables are typically named things like mac
or ethernet
or ipv4
, so the most common context where one would see an IPv4 address would be an expression like ipv4.srcAddr
.
Note also that a common consequence of such changes is that they can ripple into changes required in the control plane code that modifies table entries, if the field is used as a key in any of the tables.
I agree that names are important. I also believe that once a program is written, working, and stable, changes should meet a fairly high bar of justification, and I am not confident that such changes meet that.
I think it would be clearer to use the bit<48> srcAddr/dstAddr for ethernet and bit<32> srcIp/dstIp for IPv4.