netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* small packets sent through ne2k-pci delayed
@ 2010-04-04 14:18 Florian Zumbiehl
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Zumbiehl @ 2010-04-04 14:18 UTC (permalink / raw)
  To: p_gortmaker, netdev

Hi,

I noticed today that a 2.6.33 kernel with an ne2k-pci card of mine
transmits small packets (those that result in frames < 61 bytes)
only with some major delay - or more exactly, it seems that they are
being transmitted only when the next packet to be transmitted comes along.

Now, this patch seems to fix it for me, but I am not that sure that that's
how it should be fixed:

diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index 57f2584..ccef77c 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -306,13 +306,13 @@ static netdev_tx_t __ei_start_xmit(struct sk_buff *skb,
 	struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
 	int send_length = skb->len, output_page;
 	unsigned long flags;
-	char buf[ETH_ZLEN];
+	char buf[ETH_ZLEN+1];
 	char *data = skb->data;
 
-	if (skb->len < ETH_ZLEN) {
-		memset(buf, 0, ETH_ZLEN);	/* more efficient than doing just the needed bits */
+	if (skb->len < ETH_ZLEN+1) {
+		memset(buf, 0, ETH_ZLEN+1);	/* more efficient than doing just the needed bits */
 		memcpy(buf, data, skb->len);
-		send_length = ETH_ZLEN;
+		send_length = ETH_ZLEN+1;
 		data = buf;
 	}

I _think_ that this problem did not exist with 2.6.22-rc4 - but I didn't
have a chance to (re-)test that yet, I just think that I did things in the
past (when that kernel was still running on that machine) that would imply
that the problem did not exist at the time ...

So, any suggestions what I should try, other than re-testing with
2.6.22-rc4 (some time soon, I can do that, too, just not now)?

What might be interesting to know: those 61-byte frames do actually arrive
at the recipient as 61-byte frames ...

Florian

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: small packets sent through ne2k-pci delayed
       [not found] <27697562.59751270401801591.JavaMail.root@tahiti.vyatta.com>
@ 2010-04-04 17:23 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2010-04-04 17:23 UTC (permalink / raw)
  To: Florian Zumbiehl; +Cc: p gortmaker, netdev


----- "Florian Zumbiehl" <florz@florz.de> wrote:

> Hi,
> 
> I noticed today that a 2.6.33 kernel with an ne2k-pci card of mine
> transmits small packets (those that result in frames < 61 bytes)
> only with some major delay - or more exactly, it seems that they are
> being transmitted only when the next packet to be transmitted comes
> along.
> 
> Now, this patch seems to fix it for me, but I am not that sure that
> that's
> how it should be fixed:
> 
> di

> I _think_ that this problem did not exist with 2.6.22-rc4 - but I
> didn't
> have a chance to (re-)test that yet, I just think that I did things in
> the
> past (when that kernel was still running on that machine) that would
> imply
> that the problem did not exist at the time ...
> 
> So, any suggestions what I should try, other than re-testing with
> 2.6.22-rc4 (some time soon, I can do that, too, just not now)?
> 
> What might be interesting to know: those 61-byte frames do actually
> arrive
> at the recipient as 61-byte frames ...
> 
> Florian
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

The standard correct way to do this is skb_padto()

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-04 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <27697562.59751270401801591.JavaMail.root@tahiti.vyatta.com>
2010-04-04 17:23 ` small packets sent through ne2k-pci delayed Stephen Hemminger
2010-04-04 14:18 Florian Zumbiehl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).