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:
chao an
2022-12-14 15:25:05 +08:00
committed by Xiang Xiao
parent 6e380c0978
commit e6b37f2b2d
3 changed files with 7 additions and 27 deletions
+1 -14
View File
@@ -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