mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-30 16:14:13 +00:00
nic_router: remove 'mac_first' attribute
Since the router MAC is allocated like the donwlink MACs it can't happen anymore that these MACs clash, for instance due to nested routers. Thus, the range of the MAC allocators of nested routers must not be exclusive anymore which deprecates the 'mac_first' configuration attribute. Issue #2795
This commit is contained in:
parent
e83f095fd2
commit
7085640f05
@ -121,7 +121,7 @@ Net::Root::Root(Entrypoint &ep,
|
|||||||
Region_map ®ion_map)
|
Region_map ®ion_map)
|
||||||
:
|
:
|
||||||
Root_component<Session_component>(&ep.rpc_ep(), &alloc), _timer(timer),
|
Root_component<Session_component>(&ep.rpc_ep(), &alloc), _timer(timer),
|
||||||
_mac_alloc(config.mac_first()), _ep(ep), _router_mac(_mac_alloc.alloc()),
|
_mac_alloc(MAC_ALLOC_BASE), _ep(ep), _router_mac(_mac_alloc.alloc()),
|
||||||
_config(config), _buf_ram(buf_ram), _region_map(region_map),
|
_config(config), _buf_ram(buf_ram), _region_map(region_map),
|
||||||
_interfaces(interfaces)
|
_interfaces(interfaces)
|
||||||
{ }
|
{ }
|
||||||
|
@ -136,6 +136,8 @@ class Net::Root : public Genode::Root_component<Session_component>
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
enum { MAC_ALLOC_BASE = 0x02 };
|
||||||
|
|
||||||
Timer::Connection &_timer;
|
Timer::Connection &_timer;
|
||||||
Mac_allocator _mac_alloc;
|
Mac_allocator _mac_alloc;
|
||||||
Genode::Entrypoint &_ep;
|
Genode::Entrypoint &_ep;
|
||||||
|
@ -40,13 +40,6 @@
|
|||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType><!-- Domain_name -->
|
</xs:simpleType><!-- Domain_name -->
|
||||||
|
|
||||||
<xs:simpleType name="Mac_address">
|
|
||||||
<xs:restriction base="xs:string">
|
|
||||||
<xs:minLength value="11"/>
|
|
||||||
<xs:maxLength value="17"/>
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType><!-- Mac_address -->
|
|
||||||
|
|
||||||
<xs:simpleType name="Session_label">
|
<xs:simpleType name="Session_label">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:string">
|
||||||
<xs:minLength value="1"/>
|
<xs:minLength value="1"/>
|
||||||
@ -158,7 +151,6 @@
|
|||||||
</xs:element><!-- domain -->
|
</xs:element><!-- domain -->
|
||||||
|
|
||||||
</xs:choice>
|
</xs:choice>
|
||||||
<xs:attribute name="mac_first" type="Mac_address" />
|
|
||||||
<xs:attribute name="verbose" type="Boolean" />
|
<xs:attribute name="verbose" type="Boolean" />
|
||||||
<xs:attribute name="verbose_packets" type="Boolean" />
|
<xs:attribute name="verbose_packets" type="Boolean" />
|
||||||
<xs:attribute name="verbose_domain_state" type="Boolean" />
|
<xs:attribute name="verbose_domain_state" type="Boolean" />
|
||||||
|
@ -52,7 +52,6 @@ Configuration::Configuration(Env &env,
|
|||||||
_udp_idle_timeout (read_sec_attr(node, "udp_idle_timeout_sec", DEFAULT_UDP_IDLE_TIMEOUT_SEC )),
|
_udp_idle_timeout (read_sec_attr(node, "udp_idle_timeout_sec", DEFAULT_UDP_IDLE_TIMEOUT_SEC )),
|
||||||
_tcp_idle_timeout (read_sec_attr(node, "tcp_idle_timeout_sec", DEFAULT_TCP_IDLE_TIMEOUT_SEC )),
|
_tcp_idle_timeout (read_sec_attr(node, "tcp_idle_timeout_sec", DEFAULT_TCP_IDLE_TIMEOUT_SEC )),
|
||||||
_tcp_max_segm_lifetime(read_sec_attr(node, "tcp_max_segm_lifetime_sec", DEFAULT_TCP_MAX_SEGM_LIFETIME_SEC)),
|
_tcp_max_segm_lifetime(read_sec_attr(node, "tcp_max_segm_lifetime_sec", DEFAULT_TCP_MAX_SEGM_LIFETIME_SEC)),
|
||||||
_mac_first (mac_from_string(node.attribute_value("mac_first", Mac_string("02:02:02:02:02:00")).string())),
|
|
||||||
_node(node)
|
_node(node)
|
||||||
{
|
{
|
||||||
/* read domains */
|
/* read domains */
|
||||||
|
@ -43,7 +43,6 @@ class Net::Configuration
|
|||||||
Genode::Microseconds const _udp_idle_timeout { DEFAULT_UDP_IDLE_TIMEOUT_SEC };
|
Genode::Microseconds const _udp_idle_timeout { DEFAULT_UDP_IDLE_TIMEOUT_SEC };
|
||||||
Genode::Microseconds const _tcp_idle_timeout { DEFAULT_TCP_IDLE_TIMEOUT_SEC };
|
Genode::Microseconds const _tcp_idle_timeout { DEFAULT_TCP_IDLE_TIMEOUT_SEC };
|
||||||
Genode::Microseconds const _tcp_max_segm_lifetime { DEFAULT_TCP_MAX_SEGM_LIFETIME_SEC };
|
Genode::Microseconds const _tcp_max_segm_lifetime { DEFAULT_TCP_MAX_SEGM_LIFETIME_SEC };
|
||||||
Mac_address const _mac_first { mac_from_string("02:02:02:02:02:00") };
|
|
||||||
Pointer<Report> _report { };
|
Pointer<Report> _report { };
|
||||||
Pointer<Genode::Reporter> _reporter { };
|
Pointer<Genode::Reporter> _reporter { };
|
||||||
Domain_tree _domains { };
|
Domain_tree _domains { };
|
||||||
@ -89,7 +88,6 @@ class Net::Configuration
|
|||||||
Domain_tree &domains() { return _domains; }
|
Domain_tree &domains() { return _domains; }
|
||||||
Report &report() { return _report(); }
|
Report &report() { return _report(); }
|
||||||
Genode::Xml_node node() const { return _node; }
|
Genode::Xml_node node() const { return _node; }
|
||||||
Mac_address const &mac_first() const { return _mac_first; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _CONFIGURATION_H_ */
|
#endif /* _CONFIGURATION_H_ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user