Scatter Gather List Questions

From: Craig Rich (craig_rich@sundanceti.com)
Date: Thu Feb 07 2002 - 17:23:03 EST


Jeff:

        Hello. Saw this post on the Internet, and was hoping you are still open
to answering some questions about scatter/gather lists in Linux.

        I'm tyring to update the Linux driver for our triple speed Ethernet MAC
(we haven't formally given the driver to you yet; I guess we should soon.)

        Anyhow, I'm trying to find documentation, or examples of how to use the
scatter/gather capabilities of Linux, and not having much luck. So
basically, I'm not sure where to start. I tried grepping the source as
you say below, its not helping much.

        One question I can start with is, how do you use pci_dma_sg?

pci_map_sg(dev, sglist, nents, direction);

        I'm assuming I supply the dev and direction fields. How about the nents
field? Is that supposed to be the largest number of fragments I can
handle (that's what I assumed.) Finally, the sglist argument has me
really confused. Do I have to create this structure in advance (and if
so how) or is pci_map_sg supposed to simply give me a pointer back via
the sglist argument (that's what I assumed, but that doesn't seem to be
the case unless I'm doing something else wrong.)

        Also, were in the source code is pci_map_sg located? I'll admit I'm not
an expert at looking through the source code of an OS like Linux, but
I'm frustrated by the fact that a simple grep of /usr/src/linux-2.4.2
does not show where this function is coded.

        Any help would be greatly appreciated.

> Jeff Garzik linux-kernel@vger.kernel.org
> Wed, 14 Nov 2001 20:41:34 -0500
>
> * Previous message: [linux-kernel] Need Info on Checksum Offloading
> * Next message: [linux-kernel] tty stuff
> * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>
> harish.vasudeva@amd.com wrote:
>> > Hi All,
>> > Could any1 pls direct me wherein i could find some documentation about implementing checksum offloading for my ethernet LAN driver?
>
>
> There is not good documentation. Feel free to ask me questions, I am
> the Linux network driver maintainer.
>
> First, search the source code in linux/drivers/net/* for
> NETIF_F_IP_CSUM, NETIF_F_HW_CSUM, skb->csum, and nr_frags.
>
> Can I expect an ethernet driver submitted to me, soon?
>
> Jeff
>
> --
> Jeff Garzik | Only so many songs can be sung
> Building 1024 | with two lips, two lungs, and one tongue.
> MandrakeSoft | - nomeansno
>
>

-- 
Craig Rich
Senior Systems Engineer         mailto:craig_rich@sundanceti.com
Sundance Technology Inc.        http://www.sundanceti.com
1485 Saratoga Avenue            tel: 408 873 4117 x107
Suite 200                       fax: 408 996 7064
San Jose, CA, USA  95129

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Feb 07 2002 - 21:01:08 EST