yanet-platform / yanet

A high performance framework for forwarding traffic based on DPDK
Other
165 stars 17 forks source link

Distinct logical and dpdk port ids #149

Open TheRandomCharacter opened 3 months ago

TheRandomCharacter commented 3 months ago

Right now it is possible to use logical port id is in instead of dpdk port id, this is error prone. It would be nice to define define distinct types for these ids and move to using them instead:

struct DPDKPort {
    uint16_t id_;
};

struct LogicalPort {
    tPortId id_;
};

This will prevent using one in lieu of another by accident.