27 lines
776 B
C++
27 lines
776 B
C++
#ifndef NETWORK_SWITCH_ROUTING_ALG_H
|
|
#define NETWORK_SWITCH_ROUTING_ALG_H
|
|
|
|
#include <cstdint>
|
|
#include "core/types.h"
|
|
#include "core/error.h"
|
|
|
|
namespace dofs {
|
|
|
|
PortId hash_ecmp(NodeId src_node, PortId src_port,
|
|
NodeId dst_node, PortId dst_port,
|
|
uint32_t differentiator,
|
|
uint16_t port_count) noexcept;
|
|
|
|
inline PortId hash_ecmp(NodeId src_node,
|
|
NodeId dst_node,
|
|
uint32_t differentiator,
|
|
uint16_t port_count) noexcept {
|
|
return hash_ecmp(src_node, static_cast<PortId>(0),
|
|
dst_node, static_cast<PortId>(0),
|
|
differentiator, port_count);
|
|
}
|
|
|
|
} // namespace dofs
|
|
|
|
#endif // NETWORK_SWITCH_ROUTING_ALG_H
|