This commit is contained in:
parent
2f6ac72484
commit
1771d0d3ae
1 changed files with 15 additions and 2 deletions
|
@ -111,10 +111,18 @@ typedef struct mm_rx_buffer
|
|||
/* memory rx buffer build
|
||||
* - queued : how many packets are in the queue
|
||||
* - pos : which is the next packet to be worked on
|
||||
* - data is following this header
|
||||
*
|
||||
* Note: this section will soon be complexer.
|
||||
* I won't use a single buffer the whole time. I think i will use an descripor table
|
||||
* and a table which descriptor is in use and use the buffer space dynamically with
|
||||
* descriptors
|
||||
*
|
||||
* And this buffer needs a lock as soon as more as cores are availible =/
|
||||
*/
|
||||
uint8_t queued;
|
||||
uint8_t pos;
|
||||
// void* rx_desc[MMNIF_CORES * MMNIF_RX_QUEUELEN];
|
||||
// uint8_t rx_inuse[MMNIF_CORES * MMNIF_RX_QUEUELEN]; /* bits 1: pending 2: finished 3: free ...*/
|
||||
// uint8_t fin;
|
||||
// uint8_t* data[MMNIF_RX_QUEUELEN];
|
||||
} mm_rx_buffer_t;
|
||||
|
@ -378,7 +386,7 @@ uint8_t mmnif_get_destination(struct netif* netif, struct pbuf* p)
|
|||
core = addr[0];
|
||||
|
||||
/* check if the address is legitimata else return router core again */
|
||||
if ((core) < 1 || (core > 48))
|
||||
if ((core) < 1 || (core > MMNIF_CORES))
|
||||
core = 1;
|
||||
|
||||
return core;
|
||||
|
@ -842,6 +850,11 @@ int mmnif_close()
|
|||
/* indicate that the driver is not active anymore
|
||||
* - this will stop the polling thread i.e.
|
||||
*/
|
||||
|
||||
/* resources has to be freed here
|
||||
* will be added soon ;)
|
||||
*/
|
||||
|
||||
active = FALSE;
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue