Skip to content

Counters in the ‎abf_input_inline function #3644

@sanosco

Description

@sanosco

Hi,

There is a question concerning counters in the ‎abf_input_inline function.

Ternary operator looks odd.
https://github.com/FDio/vpp/blob/9370dde53acb0324a6b91cd3d6928273a83ef228/src/plugins/abf/abf_itf_attach.c#L607C1-L616C37

Is it intended to do the following assignments?
fproto = FIB_PROTOCOL_IP6
It looks like abf_ip4_node.index will be always selected.

It is more ordinary for me to encounter something like following.
(fproto == FIB_PROTOCOL_IP6 ? abf_ip6_node.index : abf_ip4_node.index)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions