fixed some style issues, added tooling for docs
This commit is contained in:
19
docs/network/link.md
Normal file
19
docs/network/link.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# network/link.h
|
||||
|
||||
## class Link — public interface
|
||||
|
||||
### `void send_pkt(Packet &pkt, NodeId caller);`
|
||||
### `void schedule_delivery_after(Packet &pkt, NodeId caller, Time after);`
|
||||
### `Time next_available(NodeId sender) const noexcept;`
|
||||
### `std::optional<Reservation> reserve(Bytes bytes, NodeId sender) noexcept;`
|
||||
### `Time serialization_time(Bytes bytes) const noexcept { ... }`
|
||||
### `return serialization_time(bytes, _bandwidth_gbps_cur);`
|
||||
### `Time propagation_latency() const noexcept { ... }`
|
||||
### `LinkId id() const noexcept { ... }`
|
||||
### `LinkStatus status() const noexcept { ... }`
|
||||
### `double bandwidth_gbps() const noexcept { ... }`
|
||||
### `NodeId src_id() const noexcept { ... }`
|
||||
### `NodeId dst_id() const noexcept { ... }`
|
||||
### `PortId src_port() const noexcept { ... }`
|
||||
### `PortId dst_port() const noexcept { ... }`
|
||||
### `static Time serialization_time(Bytes bytes, double gbps) noexcept;`
|
||||
11
docs/network/network_nic.md
Normal file
11
docs/network/network_nic.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# network/network_nic.h
|
||||
|
||||
## class NetworkNic — public interface
|
||||
|
||||
### `virtual void recv_pkt(Packet &pkt, PortId ingress) override;`
|
||||
### `void attach_host(Host* host) noexcept;`
|
||||
### `void detach_host(Host* host) noexcept;`
|
||||
### `void set_status(NodeStatus s, Time new_latency = Time(0)) noexcept;`
|
||||
### `const NicTelemetry &telemetry() const noexcept { ... }`
|
||||
### `void set_port_blacklisted(PortId port, bool blacklisted) noexcept;`
|
||||
### `bool is_port_blacklisted(PortId port) const noexcept;`
|
||||
6
docs/network/network_node.md
Normal file
6
docs/network/network_node.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# network/network_node.h
|
||||
|
||||
## class NetworkNode — public interface
|
||||
|
||||
### `explicit NetworkNode(Simulator *const sim, NodeId id, NodeType type) noexcept;`
|
||||
### `virtual ~NetworkNode() = default;`
|
||||
9
docs/network/network_switch.md
Normal file
9
docs/network/network_switch.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# network/network_switch.h
|
||||
|
||||
## class NetworkSwitch — public interface
|
||||
|
||||
### `virtual void recv_pkt(Packet &pkt, PortId ingress) override;`
|
||||
### `void set_status(NodeStatus s, Time new_forward_latency = Time(0)) noexcept;`
|
||||
### `NodeStatus get_status() const noexcept { ... }`
|
||||
### `return status();`
|
||||
### `uint16_t port_cnt() const noexcept { ... }`
|
||||
18
docs/network/nic/congestion_control.md
Normal file
18
docs/network/nic/congestion_control.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# network/nic/congestion_control.h
|
||||
|
||||
## class CongestionControl — public interface
|
||||
|
||||
### `explicit CongestionControl(Bytes init_cwnd, Bytes max_cwnd) noexcept;`
|
||||
### `virtual ~CongestionControl() = default;`
|
||||
### `Bytes cwnd() const noexcept { ... }`
|
||||
### `Bytes cwnd_max() const noexcept { ... }`
|
||||
|
||||
## class DCQCN — public interface
|
||||
|
||||
### `explicit DCQCN(Bytes init_cwnd, Bytes max_cwnd) noexcept;`
|
||||
### `virtual void update(const Packet& pkt, Time rtt) noexcept override;`
|
||||
|
||||
## class NSCC — public interface
|
||||
|
||||
### `explicit NSCC(Bytes init_cwnd, Bytes max_cwnd) noexcept;`
|
||||
### `virtual void update(const Packet& pkt, Time rtt) noexcept override;`
|
||||
12
docs/network/nic/load_balance.md
Normal file
12
docs/network/nic/load_balance.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# network/nic/load_balance.h
|
||||
|
||||
## class LoadBalance — public interface
|
||||
|
||||
### `explicit LoadBalance(Rng *const rng) noexcept : _rng(rng) { ... }`
|
||||
### `virtual ~LoadBalance() = default;`
|
||||
|
||||
## class LBRandomPacketSpraying — public interface
|
||||
|
||||
### `explicit LBRandomPacketSpraying(Rng *const rng) noexcept : LoadBalance(rng) { ... }`
|
||||
### `virtual void update(const Packet& pkt) noexcept override;`
|
||||
### `virtual uint16_t get_entropy(const Packet& context) noexcept override;`
|
||||
35
docs/network/packet.md
Normal file
35
docs/network/packet.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# network/packet.h
|
||||
|
||||
## class Packet — public interface
|
||||
|
||||
### `NodeId src_node() const noexcept;`
|
||||
### `PortId src_port() const noexcept;`
|
||||
### `NodeId dst_node() const noexcept;`
|
||||
### `PortId dst_port() const noexcept;`
|
||||
### `PacketProtocol protocol() const noexcept;`
|
||||
### `PacketSeq seq() const noexcept;`
|
||||
### `FlowId flow_id() const noexcept;`
|
||||
### `uint32_t entropy() const noexcept;`
|
||||
### `void set_src_node(NodeId n) noexcept;`
|
||||
### `void set_src_port(PortId p) noexcept;`
|
||||
### `void set_dst_node(NodeId n) noexcept;`
|
||||
### `void set_dst_port(PortId p) noexcept;`
|
||||
### `void set_seq(PacketSeq s) noexcept;`
|
||||
### `void set_flow_id(FlowId f) noexcept;`
|
||||
### `void set_entropy(uint32_t e) noexcept;`
|
||||
### `void set_protocol(PacketProtocol p) noexcept;`
|
||||
### `void set_payload_size(Bytes size) noexcept;`
|
||||
### `void set_ecn_enabled(bool v) noexcept;`
|
||||
### `void set_ecn_marked(bool v) noexcept;`
|
||||
### `void set_eof(bool v) noexcept;`
|
||||
### `bool is_ecn_enabled() const noexcept;`
|
||||
### `bool is_ecn() const noexcept;`
|
||||
### `bool is_eof() const noexcept;`
|
||||
### `FlowPriority priority() const noexcept;`
|
||||
### `uint8_t priority_raw() const noexcept;`
|
||||
### `Bytes header_size() const noexcept;`
|
||||
### `Bytes payload_size() const noexcept;`
|
||||
### `Bytes total_size() const noexcept;`
|
||||
### `PacketGroups groups() const noexcept;`
|
||||
### `void set_groups(PacketGroups g) noexcept;`
|
||||
### `void add_groups(PacketGroups gmask) noexcept;`
|
||||
5
docs/network/switch/dedicated_buffer.md
Normal file
5
docs/network/switch/dedicated_buffer.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# network/switch/dedicated_buffer.h
|
||||
|
||||
## class DedicatedBuffer — public interface
|
||||
|
||||
### `bool drain_one(PortId port) override;`
|
||||
5
docs/network/switch/ecn_dedicated_red.md
Normal file
5
docs/network/switch/ecn_dedicated_red.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# network/switch/ecn_dedicated_red.h
|
||||
|
||||
## class DedicatedREDEngine — public interface
|
||||
|
||||
### `_rng(rng) { ... }`
|
||||
5
docs/network/switch/ecn_engine.md
Normal file
5
docs/network/switch/ecn_engine.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# network/switch/ecn_engine.h
|
||||
|
||||
## class SwitchBuffer — public interface
|
||||
|
||||
### `virtual ~ECNEngine() = default;`
|
||||
5
docs/network/switch/ecn_shared_red.md
Normal file
5
docs/network/switch/ecn_shared_red.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# network/switch/ecn_shared_red.h
|
||||
|
||||
## class SharedREDEngine — public interface
|
||||
|
||||
### `_avg_port_bytes() { ... }`
|
||||
15
docs/network/switch/multicast_table.md
Normal file
15
docs/network/switch/multicast_table.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# network/switch/multicast_table.h
|
||||
|
||||
## class MulticastTable — public interface
|
||||
|
||||
### `MulticastTable();`
|
||||
### `bool add_tree(std::size_t group_id, uint16_t tree_id);`
|
||||
### `bool delete_tree(std::size_t group_id, uint16_t tree_id);`
|
||||
### `bool add_child_port(std::size_t group_id, uint16_t tree_id, PortId out_port);`
|
||||
### `bool delete_child_port(std::size_t group_id, uint16_t tree_id, PortId out_port);`
|
||||
### `bool set_parent(std::size_t group_id, uint16_t tree_id, PortId parent);`
|
||||
### `bool set_weight(std::size_t group_id, uint16_t tree_id, uint8_t w);`
|
||||
### `bool set_epoch(std::size_t group_id, uint16_t tree_id, uint8_t epoch);`
|
||||
### `const std::vector<McTree> *trees_of(std::size_t group_id) const;`
|
||||
### `std::size_t group_count() const noexcept;`
|
||||
### `std::vector<PortId> get_port_list(PacketGroups groups) const;`
|
||||
5
docs/network/switch/shared_buffer.md
Normal file
5
docs/network/switch/shared_buffer.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# network/switch/shared_buffer.h
|
||||
|
||||
## class SharedBuffer — public interface
|
||||
|
||||
### `virtual bool drain_one(PortId port) override;`
|
||||
19
docs/network/switch/switch_buffer.md
Normal file
19
docs/network/switch/switch_buffer.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# network/switch/switch_buffer.h
|
||||
|
||||
## class NetworkSwitch — public interface
|
||||
|
||||
### `virtual ~SwitchBuffer() = default;`
|
||||
### `Bytes buffer_size() const noexcept;`
|
||||
### `SwitchBufferType type() const noexcept;`
|
||||
### `uint16_t port_cnt() const noexcept;`
|
||||
### `Bytes port_buffered(PortId p) const noexcept;`
|
||||
### `const std::vector<Bytes> &ports_buffered() const noexcept;`
|
||||
### `uint8_t share_ctrl() const noexcept;`
|
||||
### `uint8_t share_mice() const noexcept;`
|
||||
### `uint8_t share_elephant() const noexcept;`
|
||||
### `void set_share_ctrl(uint8_t pct) noexcept;`
|
||||
### `void set_share_mice(uint8_t pct) noexcept;`
|
||||
### `void set_share_elephant(uint8_t pct) noexcept;`
|
||||
### `const Simulator *simulator() const noexcept;`
|
||||
### `const NetworkSwitch *owner() const noexcept;`
|
||||
### `void set_egress_links(const std::vector<Link*> &links);`
|
||||
8
docs/network/switch/unicast_table.md
Normal file
8
docs/network/switch/unicast_table.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# network/switch/unicast_table.h
|
||||
|
||||
## class UnicastTable — public interface
|
||||
|
||||
### `UnicastTable() = default;`
|
||||
### `std::vector<PortId> get_port_list(NodeId dst_node, PortId dst_port) const;`
|
||||
### `bool add_entry(NodeId dst_node, PortId dst_port, PortId out_port);`
|
||||
### `bool delete_entry(NodeId dst_node, PortId dst_port, PortId out_port);`
|
||||
Reference in New Issue
Block a user