Would someone please explain the reason for the following:
#define ipSIZE_OF_ETH_CRC_BYTES ( 4UL ) #define ipSIZE_OF_ETH_OPTIONAL_802_1Q_TAG_BYTES ( 4UL ) #define ipTOTAL_ETHERNET_FRAME_SIZE ( ( ( uint32_t ) ipconfigNETWORK_MTU ) + ( ( uint32_t ) ipSIZE_OF_ETH_HEADER ) + ipSIZE_OF_ETH_CRC_BYTES + ipSIZE_OF_ETH_OPTIONAL_802_1Q_TAG_BYTES )
Both ipSIZE_OF_ETH_CRC_BYTES and ipSIZE_OF_ETH_OPTIONAL_802_1Q_TAG_BYTES are only found in ipTOTAL_ETHERNET_FRAME_SIZE. I think I understand the intent of this as leaving space for data that different hardware might pass into the stack, but the stack generally doesn’t care about. If this is truly the case, shouldn’t those two be defined in FreeRTOSIPConfig.h? Are these historical leftovers?
I’m also not exactly sure of the reason for ipSIZE_OF_ETH_OPTIONAL_802_1Q_TAG_BYTES. The stack does not support 802.1q tags, so… was this put there to add space for future support of 801.2q tags or is it there for special tags that some ethernet chips can optionally add?
My specific hardware (lan9354) is configurable to add/parse a special tag that is used for ingress/egress port information. Is this the type of tag that this define is accounting for?
As far as I can see, removing the first two defines doesn’t brake anything, but that might be due to my specific setup where I don’t get the FCS and I’m accounting for the special tags in a different way. Thoughts?
Any insight is greatly appreciated. Thanks in advance.