[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D0F6D0284@AcuExch.aculab.com>
Date: Tue, 4 Mar 2014 14:35:54 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'hayeswang' <hayeswang@...ltek.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "nic_swsd@...ltek.com" <nic_swsd@...ltek.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: RE: [PATCH net-next 08/12] r8152: support TSO
From: hayeswang
> David Laight [mailto:David.Laight@...LAB.COM]
> > Sent: Tuesday, March 04, 2014 8:12 PM
> > To: 'Hayes Wang'; netdev@...r.kernel.org
> > Cc: nic_swsd@...ltek.com; linux-kernel@...r.kernel.org;
> > linux-usb@...r.kernel.org
> > Subject: RE: [PATCH net-next 08/12] r8152: support TSO
> >
> > From: Hayes Wang
> > > Support scatter gather and TSO.
> > >
> > > Adjust the tx checksum function and set the max gso size to fix the
> > > size of the tx aggregation buffer.
> >
> > There is little point supporting TSO unless the usb host controller
> > supports arbitrary aligned scatter-gather.
> > All you do is require that a large skb be allocated (that may well
> > fail), and add it another data copy.
>
> I think I have done it. For also working for EHCI usb host controller,
> I allocate 16 KB continuous buffer and copy the fragmented packets to
> it and bulk out the buffer.
Does that mean you are splitting the 64k 'ethernet packet' from TCP
is software? I've looked at the ax88179 where the hardware can do it.
Is there really a gain doing segmentation here if you have to do the
extra data copy?
It might be worth packing multiple short packets into a single USB bulk
data packet, but that might require a CBU (crystal ball unit).
I did measure a maximum transmit ethernet frame rate of (IIRC) 250000
frames/sec for the ax88179 - probably limited by the USB3 frame rate.
Exceeding that would probably require putting multiple tx packets into
a single URB. OTOH that limit probably doesn't matter
What might be more useful is to set the rx side up to receive into
page-aligned 2k (or 4k) buffers and then separate out the ethernet
frames into the required skb - probably as page list fragments
(I'm not entirely sure how such skb can be created).
I don't know what the r8152 does, but the usbnet code encourages it to
allocate long skb, pass them to the usb stack to fill, and then clone
them if they contain multiple frames.
This isn't really good use of memory or cpu cycles.
The ax88179 driver also lies badly about the skb's truesize.
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists