diff --git a/examples/kitty/src/config/ethernet_config.h b/examples/kitty/src/config/ethernet_config.h index 122714db..3b6be461 100644 --- a/examples/kitty/src/config/ethernet_config.h +++ b/examples/kitty/src/config/ethernet_config.h @@ -74,7 +74,7 @@ _Static_assert(NET_RX_DATA_REGION_SIZE_CLI1 >= #define MAX(a,b) (((a) > (b)) ? (a) : (b)) #endif -#define ETH_MAX_QUEUE_CAPACITY MAX(NET_TX_QUEUE_CAPACITY_DRIV, \ +#define NET_MAX_QUEUE_CAPACITY MAX(NET_TX_QUEUE_CAPACITY_DRIV, \ MAX(NET_RX_QUEUE_CAPACITY_DRIV, \ MAX(NET_RX_QUEUE_CAPACITY_CLI0, \ NET_RX_QUEUE_CAPACITY_CLI1))) @@ -86,8 +86,8 @@ _Static_assert(NET_RX_QUEUE_CAPACITY_COPY0 >= NET_RX_QUEUE_CAPACITY_DRIV, "Network Copy0 queue must have capacity to fit all RX buffers."); _Static_assert(NET_RX_QUEUE_CAPACITY_COPY1 >= NET_RX_QUEUE_CAPACITY_DRIV, "Network Copy1 queue must have capacity to fit all RX buffers."); -_Static_assert(sizeof(net_queue_t) <= NET_DATA_REGION_CAPACITY, - "Netowkr Queue must fit into a single data region."); +_Static_assert(sizeof(net_queue_t) + NET_MAX_QUEUE_CAPACITY * sizeof(net_buff_desc_t) <= NET_DATA_REGION_SIZE, + "net_queue_t must fit into a single data region."); static inline uint64_t net_cli_mac_addr(char *pd_name) { diff --git a/examples/webserver/config/ethernet_config.h b/examples/webserver/config/ethernet_config.h index 8b81e556..7c3b070e 100644 --- a/examples/webserver/config/ethernet_config.h +++ b/examples/webserver/config/ethernet_config.h @@ -74,7 +74,7 @@ _Static_assert(NET_RX_DATA_REGION_SIZE_CLI1 >= #define MAX(a,b) (((a) > (b)) ? (a) : (b)) #endif -#define ETH_MAX_QUEUE_CAPACITY MAX(NET_TX_QUEUE_CAPACITY_DRIV, \ +#define NET_MAX_QUEUE_CAPACITY MAX(NET_TX_QUEUE_CAPACITY_DRIV, \ MAX(NET_RX_QUEUE_CAPACITY_DRIV, \ MAX(NET_RX_QUEUE_CAPACITY_CLI0, \ NET_RX_QUEUE_CAPACITY_CLI1))) @@ -86,8 +86,8 @@ _Static_assert(NET_RX_QUEUE_CAPACITY_COPY0 >= NET_RX_QUEUE_CAPACITY_DRIV, "Network Copy0 queue must have capacity to fit all RX buffers."); _Static_assert(NET_RX_QUEUE_CAPACITY_COPY1 >= NET_RX_QUEUE_CAPACITY_DRIV, "Network Copy1 queue must have capacity to fit all RX buffers."); -_Static_assert(sizeof(net_queue_t) <= NET_DATA_REGION_CAPACITY, - "Netowkr Queue must fit into a single data region."); +_Static_assert(sizeof(net_queue_t) + NET_MAX_QUEUE_CAPACITY * sizeof(net_buff_desc_t) <= NET_DATA_REGION_SIZE, + "net_queue_t must fit into a single data region."); static inline uint64_t net_cli_mac_addr(char *pd_name) {