anchao commented on code in PR #7616: URL: https://github.com/apache/nuttx/pull/7616#discussion_r1037774072
########## mm/iob/Kconfig: ########## @@ -41,7 +41,7 @@ config IOB_HEADSIZE config IOB_ALIGNMENT int "Alignment size of each I/O buffer" - default 1 + default 4 Review Comment: Because many fields in the l3 protocol are defined by 4 bytes, in order to avoid unaligned access, the default value is changed to 4 bytes ``` struct ipv4_hdr_s { uint8_t vhl; /* 8-bit Version (4) and header length (5 or 6) */ uint8_t tos; /* 8-bit Type of service (e.g., 6=TCP) */ uint8_t len[2]; /* 16-bit Total length */ uint8_t ipid[2]; /* 16-bit Identification */ uint8_t ipoffset[2]; /* 16-bit IP flags + fragment offset */ uint8_t ttl; /* 8-bit Time to Live */ uint8_t proto; /* 8-bit Protocol */ uint16_t ipchksum; /* 16-bit Header checksum */ uint16_t srcipaddr[2]; /* 32-bit Source IP address */ uint16_t destipaddr[2]; /* 32-bit Destination IP address */ }; typedef uint16_t net_ipv6addr_t[8]; struct ipv6_hdr_s { uint8_t vtc; /* Bits 0-3: version, bits 4-7: traffic class (MS) */ uint8_t tcf; /* Bits 0-3: traffic class (LS), 4-bits: flow label (MS) */ uint16_t flow; /* 16-bit flow label (LS) */ uint8_t len[2]; /* 16-bit Payload length */ uint8_t proto; /* 8-bit Next header (same as IPv4 protocol field) */ uint8_t ttl; /* 8-bit Hop limit (like IPv4 TTL field) */ net_ipv6addr_t srcipaddr; /* 128-bit Source address */ net_ipv6addr_t destipaddr; /* 128-bit Destination address */ }; ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org