mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
port, dhcp: drop the called/done traces from the console and syslog
rtl837x_port.c prints "called" and "done" around mirroring, PVID, VLAN and L2 setup, and dhcp.c around discover, request, start and stop. They land on the console on every boot and config replay, and in the log once syslog is running. The VLAN line keeps the VLAN, members and tagged values, only without the function name in front. On the KP_9000_6XHML_X2 this takes 359 bytes out of BANK1, 88 out of BANK2 and 24 out of BANK3. BANK1 goes from 431 to 790 bytes free.
This commit is contained in:
1 parent
770926abd1
commit
422dc3f24d
2 files changed
+1
-16
No files matched your search
@@ -157,7 +157,6 @@ void dhcp_addopt_server_id(void)
|
||||
|
||||
void dhcp_send_discover(void)
|
||||
{
|
||||
print_string("dhcp_send_discover called\n");
|
||||
dhcp_prepare_request();
|
||||
|
||||
dhcp_state.opt_ptr = 0;
|
||||
@@ -193,7 +192,6 @@ void dhcp_send_discover(void)
|
||||
|
||||
void dhcp_send_request(void)
|
||||
{
|
||||
print_string("dhcp_send_request called\n");
|
||||
dhcp_prepare_request();
|
||||
|
||||
dhcp_state.opt_ptr = 0;
|
||||
@@ -376,13 +374,11 @@ void dhcp_start(void) __banked
|
||||
*tid++ = SFR_DATA_8;
|
||||
*tid = SFR_DATA_0;
|
||||
dhcp_state.state = DHCP_START;
|
||||
print_string("dhcp_start done\n");
|
||||
}
|
||||
|
||||
|
||||
void dhcp_stop(void) __banked
|
||||
{
|
||||
print_string("dhcp_stop called\n");
|
||||
uip_udp_remove(dhcp_state.conn);
|
||||
dhcp_state.state = DHCP_OFF;
|
||||
}
|
||||
|
||||
+1
-12
@@ -40,7 +40,6 @@ static void wait_table_ready(void)
|
||||
|
||||
void port_mirror_set(uint8_t port, __xdata uint16_t rx_pmask, __xdata uint16_t tx_pmask) __banked
|
||||
{
|
||||
print_string("\nport_mirror_set called \n");
|
||||
print_string("Mirroring port: "); print_byte(port); print_string(" with rx-mask: ");
|
||||
print_short(rx_pmask); print_string(", tx mask: "); print_short(tx_pmask);
|
||||
write_char('\n');
|
||||
@@ -52,7 +51,6 @@ void port_mirror_set(uint8_t port, __xdata uint16_t rx_pmask, __xdata uint16_t t
|
||||
|
||||
void port_mirror_del(void) __banked
|
||||
{
|
||||
print_string("\nport_mirror_del called \n");
|
||||
REG_SET(RTL837x_MIRROR_CTRL, 0);
|
||||
}
|
||||
|
||||
@@ -112,7 +110,6 @@ void port_pvid_set(uint8_t port, __xdata uint16_t pvid) __banked
|
||||
{
|
||||
uint8_t lag = port_lag_of(port);
|
||||
|
||||
print_string("\nport_pvid_set called \n");
|
||||
if (lag == PORT_LAG_NONE) {
|
||||
port_pvid_write(port, pvid);
|
||||
return;
|
||||
@@ -141,7 +138,6 @@ void vlan_delete(uint16_t vlan) __banked
|
||||
if (!vlan || vlan >= 0xfff)
|
||||
return;
|
||||
|
||||
print_string("\nvlan_delete called \n"); print_short(vlan);
|
||||
vlan_name_remove(vlan);
|
||||
REG_WRITE(RTL837x_TBL_DATA_IN_A, 0, 0, 0, 0);
|
||||
REG_WRITE(RTL837X_TBL_CTRL, vlan >> 8, vlan, TBL_VLAN, TBL_WRITE | TBL_EXECUTE);
|
||||
@@ -232,7 +228,7 @@ void vlan_create(void) __banked
|
||||
vlan_settings.members |= 0x0200; // Set 10th bit
|
||||
vlan_settings.tagged |= 0x0200;
|
||||
|
||||
print_string("\nvlan_create called\nvlan: "); print_short(vlan_settings.vlan);
|
||||
print_string("vlan: "); print_short(vlan_settings.vlan);
|
||||
print_string(", members: "); print_short(vlan_settings.members);
|
||||
print_string(", tagged: "); print_short(vlan_settings.tagged); write_char('\n');
|
||||
|
||||
@@ -250,7 +246,6 @@ void vlan_create(void) __banked
|
||||
|
||||
wait_table_ready();
|
||||
|
||||
print_string("vlan_create done \n");
|
||||
}
|
||||
|
||||
|
||||
@@ -263,7 +258,6 @@ void vlan_create(void) __banked
|
||||
*/
|
||||
void vlan_setup(void) __banked
|
||||
{
|
||||
print_string("\nvlan_setup called \n");
|
||||
|
||||
// No VLAN names set up so far
|
||||
vlan_ptr = 0;
|
||||
@@ -331,7 +325,6 @@ void vlan_setup(void) __banked
|
||||
print_string("\nvlan_setup, REG 0x4f4c: "); print_reg(0x4f4c);
|
||||
#endif
|
||||
|
||||
print_string("vlan_setup done \n");
|
||||
}
|
||||
|
||||
|
||||
@@ -354,7 +347,6 @@ void port_l2_forget_port(uint8_t port) __banked
|
||||
*/
|
||||
uint8_t port_l2_forget(void) __banked
|
||||
{
|
||||
print_string("\nport_l2_forget called\n");
|
||||
// Configure the entries to be flushed:
|
||||
// port-based (bits 0-1 are 0 and dynamic entries, bit 2 specifies dynamic entries
|
||||
REG_SET(RTL837x_L2_TBL_FLUSH_CNF, 0x0);
|
||||
@@ -370,7 +362,6 @@ uint8_t port_l2_forget(void) __banked
|
||||
reg_read_m(RTL837x_L2_TBL_FLUSH_CTRL);
|
||||
} while (sfr_data[1]);
|
||||
|
||||
print_string("port_l2_forget done\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -465,7 +456,6 @@ void port_l2mc_set(uint8_t mac_last, __xdata uint16_t vid, __xdata uint16_t pmas
|
||||
*/
|
||||
void port_l2_setup(void) __banked
|
||||
{
|
||||
print_string("\nport_l2_setup called\n");
|
||||
|
||||
port_l2_forget();
|
||||
|
||||
@@ -483,7 +473,6 @@ void port_l2_setup(void) __banked
|
||||
// When maximim entries learned, then simply flood the packet
|
||||
reg_bit_set(RTL837X_L2_LRN_PORT_CONSTRT_ACT, 0);
|
||||
|
||||
print_string("\nport_l2_setup done\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user