Struct SK_BUFF(Networking code)

Struct SK_BUFF(Networking code)

Post by Fernando Orteg » Sat, 28 Aug 1999 04:00:00



I need to know how the networking manages to get data  from a process
and passes it to the sk_buff struct , so that, this is the struct used to
pass the data to the devices(for example to Ethernet).

I know the last call made , before passing the data to the device is:

dev->hard_start_xmit(skb,dev)

but which is the way data get into skb?

I mean,

How many packets for each skb? ----> It depends? , What about?
How many priority queue buffers per device? ----> 3?

So, as you can see I am a bit lost.
If you know any thing, that helps, please let me know.

Any help will be wellcome.

Thanks in advance

--
Fernando Ortega Bellosta

 
 
 

Struct SK_BUFF(Networking code)

Post by Joy » Sun, 29 Aug 1999 04:00:00



> I need to know how the networking manages to get data  from a process
> and passes it to the sk_buff struct , so that, this is the struct used to
> pass the data to the devices(for example to Ethernet).

> I know the last call made , before passing the data to the device is:

> dev->hard_start_xmit(skb,dev)

> but which is the way data get into skb?

> I mean,

> How many packets for each skb? ----> It depends? , What about?
> How many priority queue buffers per device? ----> 3?

> So, as you can see I am a bit lost.
> If you know any thing, that helps, please let me know.

> Any help will be wellcome.

> Thanks in advance

> --
> Fernando Ortega Bellosta


the data is copied from user space to kernel space using memcpy_from_fs.
Actually fs is the segment reg pointing to user segment. After copying to
kernel space the data is packed in skbuffs( simplistic description ).

bye

Joy

------------------  Posted via CNET Linux Help  ------------------
                    http://www.searchlinux.com

 
 
 

1. question about struct sk_buff

Here's something I found in the include/linux/sk_buff.h header file?

struct sk_buff
{

 ... stuff removed ...

unsigned long padding[0];
unsigned char data[0];

what are those last two entries?
Are they actually used?
If not why are they there?
If they are what do they point to when you try to apply them?

cat
UNH InterOperability Lab
Network Management Consortium
(603)862-2060
-------------------------------------------------------------------------------
Sleep?  Isn't that a completely inadequate substitute for caffeine?

2. Advansys ADP940. Comments pls.

3. Sending sk_buffs without being tied to a struct sock

4. 62DA37D2 023 LinuxCAD v 1.55 plot & print !!! , Sun Sep 23 14:57:49 CDT 2001

5. chainge in struct sk_buff doesn't quite work

6. Solution for XF86Config problems

7. Getting "undefined struct/union member error" when trying to convert to 64bit code

8. MiroMagicPlus Accelerator Card (C&T 82C481 chipset)

9. [PATCH] struct kernel_stat -> struct cpu_stat[NR_CPUS]

10. converting 'struct stat' to 'struct __old_kernel_stat'?

11. structs declared inside structs in /usr/include

12. timer_create refers to struct sigevent; struct sigevent not availabe unders same conditions as timer_create

13. getting "struct pci_dev" from "struct netdevice"