click and todevice packet lengths

Eddie Kohler kohler at icir.org
Tue Jun 10 01:00:03 EDT 2003


> Hi Eddie and everyone,
> 
> I've encountered this situation where I get
> "ToDevice: too small: len %d tailroom %d\n" (queue_packet()) in dmesg.
> This results from the following situation:

You know, John, I'm not sure that warning matters. In particular I'm not
sure that Linux device drivers actually break when passed packets too small
for Ethernet.

Would you mind terribly applying this patch and seeing if anything breaks?

Eddie


Index: elements/linuxmodule/todevice.cc
===================================================================
RCS file: /home/am0/click/cvsroot/release/one/elements/linuxmodule/todevice.cc,v
retrieving revision 1.133
diff -u -u -r1.133 todevice.cc
--- elements/linuxmodule/todevice.cc	10 Jun 2003 04:53:35 -0000	1.133
+++ elements/linuxmodule/todevice.cc	10 Jun 2003 06:59:11 -0000
@@ -296,21 +296,6 @@
 {
     struct sk_buff *skb1 = p->skb();
   
-    /*
-     * Ensure minimum ethernet packet size (14 hdr + 46 data).
-     * I can't figure out where Linux does this, so I don't
-     * know the correct procedure.
-     */
-    if (skb1->len < 60) {
-	if (skb_tailroom(skb1) < 60 - skb1->len) {
-	    printk("ToDevice: too small: len %d tailroom %d\n",
-		   skb1->len, skb_tailroom(skb1));
-	    kfree_skb(skb1);
-	    return -1;
-	}
-	skb_put(skb1, 60 - skb1->len);
-    }
-
     int ret;
 #if HAVE_LINUX_POLLING
     if (_dev->polling > 0)




More information about the click mailing list