[Prism54-devel] Fragments for transmit; copy skbuf on receive?

Jens Maurer Jens.Maurer@gmx.net
Wed, 31 Dec 2003 15:13:07 +0100


Herbert Valerio Riedel wrote:
> btw, the fragmentation support in the tx code path looks unnecessary
> to me too on first sight, although I'm wondering too, why it was
> written in the first place... but on the other hand, there was other
> stuff from ISL which didn't make much sense wrt the linux kernel;

Do we have a contact for the original driver authors so we can
find out?

Even if the chipset can do frames larger than 1500 bytes, it still
wouldn't make much sense to use fragmentation:  Just pass the full
8KB or so skbuff to the device and be done.  Unless the device
is limited to 1500 bytes fragments in its DMA engine, which would
seem very odd.

I'm reading net/core/dev.c:dev_queue_xmit(), where it appears
to be possible to tell the upper layers that our device does
scatter/gather DMA, so fragmented skbuff's are ok, and if not,
the skbuff gets linearized:

         if (skb_shinfo(skb)->nr_frags &&
             (!(dev->features&NETIF_F_SG) || illegal_highdma(dev, skb)) &&
             skb_linearize(skb, GFP_ATOMIC) != 0) {
                 kfree_skb(skb);
                 return -ENOMEM;
         }

If we wish to support that interface, that appears reasonable.


Is there any chance to increase the size of the RX queue?
#define ISL38XX_CB_RX_QSIZE                     8
#define ISL38XX_CB_TX_QSIZE                     32

I guess not, because we never pass the value to the device, so
it seems fixed.  (A receive queue of length 8 is a little small
for 54 Mbps on slow machines, I'd fathom.)


Is there some specification of the firmware interface available
in text form?  Yes, I'm reading the IEEE MIBs, and that helps
a little, but there's certainly more to it.

Btw, does anyone know what rx_data_high and tx_data_high from
struct isl38xx_cb are supposed to be used for? They are not used
in the driver, but their structure looks suspiciously similar
to rx_data_low and tx_data_low, which is the main receive/transmit
ring buffer.

Jens Maurer