9 #include <satcat5/cfgbus_interrupt.h>
10 #include <satcat5/router2_dispatch.h>
17 RULE_ALL = (0xFFFF0000u),
18 RULE_LCL_BCAST = (1u << 21),
19 RULE_NOIP_ALL = (1u << 20),
20 RULE_NOIP_BCAST = (1u << 19),
21 RULE_IPV4_MCAST = (1u << 18),
22 RULE_IPV4_BCAST = (1u << 17),
23 RULE_BAD_DMAC = (1u << 16);
41 ~
Offload() SATCAT5_OPTIONAL_DTOR;
49 { m_zero_pad = enable; }
66 {
return m_ctrl->port_shdn; }
73 {
return m_port_index + hw_idx; }
76 {
return satcat5::eth::idx2mask(
port_index(hw_idx)); }
79 {
return m_port_mask; }
91 volatile u32 vlan_vid;
92 volatile u32 vlan_mask;
93 volatile u32 vlan_rate;
94 volatile u32 pkt_count;
95 volatile u32 port_shdn;
98 volatile u32 nat_ctrl;
100 volatile u32 tx_mask;
101 volatile u32 tx_ctrl;
102 volatile u32 ptp_2step;
103 volatile u32 port_count;
104 volatile u32 data_width;
105 volatile u32 core_clock;
106 volatile u32 table_size;
107 volatile u32 noip_data;
108 volatile u32 noip_ctrl;
109 volatile u32 cidr_data;
110 volatile u32 cidr_ctrl;
112 volatile u32 rx_ctrl;
120 const unsigned m_port_index;
Memory-mapped local ConfigBus.
Event-handler for individual ConfigBus interrupts.
Pointer-like wrapper for one or more ConfigBus registers.
A port for writing to a MultiBuffer object.
Packet-processing pipeline for the IPv4 router.
Offload port for gateware-accelerated IPv4 routers.
void rule_allow(u32 mask)
Set specific router policy flags.
void rule_zpad(bool enable)
Enable or disable zero-padding.
u32 reconfigure()
Reload router IP address and MAC address.
unsigned port_index(unsigned hw_idx) const
Convert hardware port index to a software port-index.
Offload(satcat5::cfg::ConfigBusMmap *cfg, unsigned devaddr, satcat5::router2::Dispatch *router, unsigned hw_ports)
Constructor sets the number of associated hardware ports.
SATCAT5_PMASK_TYPE port_mask(unsigned hw_idx) const
Convert hardware port index to a software port-mask.
SATCAT5_PMASK_TYPE port_mask_all() const
Return a port-mask containing all connected ports.
void rule_block(u32 mask)
Clear specific router policy flags.
satcat5::cfg::Register get_log_register() const
Get packet-logging register.
u32 link_shdn_hw()
Mask indicating hardware-defined ports in the shutdown state.
void deliver(const satcat5::eth::PluginPacket &meta)
Deliver a given packet to the hardware queue.
void irq_event() override
Interrupt service routine.
SATCAT5_PMASK_TYPE link_shdn_sw()
Mask indicating software-defined ports in the shutdown state.
#define SATCAT5_PMASK_TYPE
Set the integer type used to identify source and destination ports.
Ephemeral data structure provided to plugin callbacks.