Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Sep 2002 14:19:03 -0500 (CDT)
From:      Mike Silbersack <silby@silby.com>
To:        arch@freebsd.org
Subject:   Ethernet packet padding: How much is legal?
Message-ID:  <20020902140522.W281-100000@patrocles.silby.com>

next in thread | raw e-mail | index | archive | help
This may be offtopic for the list, but I know that some of you guys will
know the answer to this question. :)

Despite the overall success of the recent patches to the if_vr
driver, Thomas Nystrom and Jean Delvare have continued to search for the
root of the problems in the if_vr hardware.

In short, they've found that if a 1500 byte packet + a small fragment
adding up to approximately 2K are sent in quick succession, the small
fragment will be dropped.  This appears to be a bug in the Via Rhine
hardware, so we're brainstorming on ways to work around this problem.

One option we're seriously looking at is padding all ethernet packets
within a certain size (400 - 600 bytes in size) up to 600 bytes.  This
would be done in vr_encap just as padding to minimum packet size is done
currently:


                if (m_head->m_len < VR_MIN_FRAMELEN) {
                        m_new->m_pkthdr.len += VR_MIN_FRAMELEN - m_new->m_len;
                        m_new->m_len = m_new->m_pkthdr.len;
                }
+               if ((m_head->m_len > 400) && (m_head->m_len < 800)) {
+                       m_new->m_pkthdr.len = 800;
+                       m_new->m_len = m_new->m_pkthdr.len;
+               }

Thomas says that the above preliminary patch seems to solve the problem,
so it looks like a workable solution if we can more exactly determine the
range in which we need to pad.  (And perhaps only pad if the preceeding
packet is a full size frame, etc - this is still being researched.)

Anyway, now to the real question:  Is adding arbitrary padding like this
going to break anything?  IP seems content, but will other protocols be
broken by extra ethernet padding?  Although we don't support too many
protocols, the card could be passing all sorts of packets if it is used
for bridging.

Thanks,

Mike "Silby" Silbersack


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020902140522.W281-100000>