mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 10:32:47 +08:00
mm/iob: revert "modify iob to support header padding and alignment features"
we don't need to implement l2 isolation through io_head, iob offload will use io_offset
-------------------------------------------------------------
Layout of different NICs implementation:
iob_data (aligned by CONFIG_IOB_ALIGNMENT)
|
| io_offset(CONFIG_NET_LL_GUARDSIZE)
| |
-------------------------------------------------
Ethernet | Reserved | ETH_HDRLEN | io_len |
---------------------------------|---------------
8021Q | Reserved | ETH_8021Q_HDRLEN | io_len |
---------------------------------|---------------
ipforward | Reserved | io_len |
-------------------------------------------------
--------------------------------------------------------------------
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
+1
-14
@@ -76,16 +76,6 @@
|
||||
# define CONFIG_IOB_ALIGNMENT 1
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_IOB_HEADSIZE)
|
||||
# define CONFIG_IOB_HEADSIZE 0
|
||||
#endif
|
||||
|
||||
/* For backward compatibility when not using iob header padding */
|
||||
|
||||
#if CONFIG_IOB_HEADSIZE == 0
|
||||
# define io_head io_data
|
||||
#endif
|
||||
|
||||
/* IOB helpers */
|
||||
|
||||
#define IOB_DATA(p) (&(p)->io_data[(p)->io_offset])
|
||||
@@ -124,10 +114,7 @@ struct iob_s
|
||||
#endif
|
||||
unsigned int io_pktlen; /* Total length of the packet */
|
||||
|
||||
#if CONFIG_IOB_HEADSIZE > 0
|
||||
uint8_t io_head[CONFIG_IOB_HEADSIZE];
|
||||
#endif
|
||||
uint8_t io_data[CONFIG_IOB_BUFSIZE] aligned_data(CONFIG_IOB_ALIGNMENT);
|
||||
uint8_t io_data[CONFIG_IOB_BUFSIZE];
|
||||
};
|
||||
|
||||
#if CONFIG_IOB_NCHAINS > 0
|
||||
|
||||
Reference in New Issue
Block a user