added networking components, hosts are next
This commit is contained in:
26
src/network/switch/routing_alg.h
Normal file
26
src/network/switch/routing_alg.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user