* pointers in the sk_buff structure. @ 2005-02-03 22:45 sudeep list 2005-02-04 0:42 ` [PATCH 4 2.4.27] pcnet32: Add HomePNA parameter for 79C978 Richard Hobbs 2005-02-04 12:06 ` pointers in the sk_buff structure Lennert Buytenhek 0 siblings, 2 replies; 4+ messages in thread From: sudeep list @ 2005-02-03 22:45 UTC (permalink / raw) To: netdev hello, I figured that the pointer sk_buff->tail points to the end of data in the buffer attached to the sk_buff. What does the pointer sk_buff->end point to ? Is there any data that lies between the two pointers, or they are two pointers to the same address (end of data in the buffer area) ? Sudeep ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 4 2.4.27] pcnet32: Add HomePNA parameter for 79C978. 2005-02-03 22:45 pointers in the sk_buff structure sudeep list @ 2005-02-04 0:42 ` Richard Hobbs 2005-02-04 18:45 ` Don Fry 2005-02-04 12:06 ` pointers in the sk_buff structure Lennert Buytenhek 1 sibling, 1 reply; 4+ messages in thread From: Richard Hobbs @ 2005-02-04 0:42 UTC (permalink / raw) To: netdev I am trying to set up a hybrid network, part wired, part wireless and part homePNA (the building has some very thick walls and remote computers that can be reached by existing telephone wires). I am using Fedora core 3 with the 2.6.10 kernel. I have checked the pcnet32.c code and the patch 4 2.4.27 appears to be there. I load the pcnet32 module using: modprobe -v pcnet32 homepna=1 I get reply: insmod /lib/modules/2.6.10-1.741_FC3/kernel/drivers/net/pcnet32.ko homepna=1 Looks good. I then try to configure the network through the systems settings interface: eth0 is a e100 ethernet to my router/modem that is OK. Disconnecting eth0 to avoid any conflicts. eth1 should be the AMD79c978 card. Connecting with the telephone wire I set eth1 as an ethernet (I don't see an option for phoneline network) I have tried DHCP get the response on activating the network: Determining IP information for eth1 failed; no link present. Check cable. I have tried a static IP address, card activates but no device is detected at the modem/router. If I unload the module and reload without the homepna option, the card works fine with a standard ethernet cable. Any suggestions please. Thanks Richard Hobbs ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 4 2.4.27] pcnet32: Add HomePNA parameter for 79C978. 2005-02-04 0:42 ` [PATCH 4 2.4.27] pcnet32: Add HomePNA parameter for 79C978 Richard Hobbs @ 2005-02-04 18:45 ` Don Fry 0 siblings, 0 replies; 4+ messages in thread From: Don Fry @ 2005-02-04 18:45 UTC (permalink / raw) To: Richard Hobbs; +Cc: netdev Richard, 2.6.10 has the driver to support the 79c978 card in homepna mode. I have only used the card in a point-to-point configuration when in homepna mode, because all I have is two cards (no modem/router). When you bring up the card with homepna=1, if you look in /var/log/messages it should indicate the speed at which the card is operating. In my system I see: pcnet32: media set to 1Mbit mode. pcnet32: PCnet/Home 79C978 at 0x252c00, 00 90 00 05 dd 27 assigned IRQ 201. eth8: registered as PCnet/Home 79C978 pcnet32: 8 cards_found. With the cards cabled together I see link detected using ethtool. # ethtool eth8 Settings for eth8: Current message level: 0x00000007 (7) Link detected: yes On Fri, Feb 04, 2005 at 12:42:07AM +0000, Richard Hobbs wrote: > > I am trying to set up a hybrid network, part wired, part wireless and part > homePNA (the building has some very thick walls and remote computers that can be > reached by existing telephone wires). I am using Fedora core 3 with the 2.6.10 > kernel. I have checked the pcnet32.c code and the patch 4 2.4.27 appears to be > there. > > I load the pcnet32 module using: > modprobe -v pcnet32 homepna=1 > > I get reply: > insmod /lib/modules/2.6.10-1.741_FC3/kernel/drivers/net/pcnet32.ko homepna=1 > > Looks good. > > I then try to configure the network through the systems settings interface: > eth0 is a e100 ethernet to my router/modem that is OK. > Disconnecting eth0 to avoid any conflicts. > > eth1 should be the AMD79c978 card. Connecting with the telephone wire > > I set eth1 as an ethernet (I don't see an option for phoneline network) > I have tried DHCP get the response on activating the network: > Determining IP information for eth1 failed; no link present. Check cable. > > I have tried a static IP address, card activates but no device is detected at > the modem/router. > > If I unload the module and reload without the homepna option, the card works > fine with a standard ethernet cable. > > Any suggestions please. > > Thanks > Richard Hobbs -- Don Fry brazilnut@us.ibm.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pointers in the sk_buff structure. 2005-02-03 22:45 pointers in the sk_buff structure sudeep list 2005-02-04 0:42 ` [PATCH 4 2.4.27] pcnet32: Add HomePNA parameter for 79C978 Richard Hobbs @ 2005-02-04 12:06 ` Lennert Buytenhek 1 sibling, 0 replies; 4+ messages in thread From: Lennert Buytenhek @ 2005-02-04 12:06 UTC (permalink / raw) To: sudeep list; +Cc: netdev On Thu, Feb 03, 2005 at 03:45:15PM -0700, sudeep list wrote: > hello, Hi, > I figured that the pointer sk_buff->tail points to the end of data in > the buffer attached to the sk_buff. What does the pointer sk_buff->end > point to ? > > Is there any data that lies between the two pointers, or they are two > pointers to the same address (end of data in the buffer area) ? This is a snippet from some docs on the subject I wrote a while ago, hope it helps. I should polish it up and submit it for inclusion. 2. The sk_buff structure. The sk_buff structure ('skb') is actually only used for storing the metadata corresponding to a packet. The packet's data is not stored inside the sk_buff structure itself, but in a separate buffer that is pointed to by skb->head. The skb->end member points one byte past the end of this data buffer. An important design requirement for sk_buffs is being able to add data at the end as well as at the front of the packet. As a packet travels downwards through the network stack, each layer will usually want to add its own header in front of the packet, and it would be nice if we could avoid reallocating and/or copying the entire data portion of the packet around to make more space at the front of the buffer every time we want to do this. To achieve this goal, the packet data is not necessarily stored at the front of the data buffer, but some space between the front of the buffer and the front of the packet is left unused. skb->data and skb->tail are two extra pointers that point to the beginning and one byte past the end of the currently used portion of the data buffer, respectively. Both are guaranteed to point somewhere within the data buffer. ('skb->head <= skb->data <= skb->tail <= skb->end') +----------+-------------------------------------+--------------+ | headroom | packet data | tailroom | +----------+-------------------------------------+--------------+ ^ ^ skb->data ^ skb->end ^ | | + skb->head + skb->tail The function skb_headroom(skb) calculates 'skb->data - skb->head', and indicates how many bytes we can add to the front of the packet without having to reallocate the buffer. Similarly, skb_tailroom(skb) calculates 'skb->end - skb->tail' and indicates how many bytes we can add to the end of the packet before having to reallocate. Adding data to and removing data from the front of the buffer is done with skb_push and skb_pull, respectively. These wrappers do some sanity checks to make sure the relevant constraints on the four pointers are maintained. When an sk_buff is allocated by alloc_skb, skb->{head,data,tail} are all initialised to point to the start of the data buffer. Depending on what the skb will be used for, the caller will usually want to reserve some headroom in anticipation of expansion of the data buffer towards the front. This is done by calling skb_reserve(). ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-02-04 18:45 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-02-03 22:45 pointers in the sk_buff structure sudeep list 2005-02-04 0:42 ` [PATCH 4 2.4.27] pcnet32: Add HomePNA parameter for 79C978 Richard Hobbs 2005-02-04 18:45 ` Don Fry 2005-02-04 12:06 ` pointers in the sk_buff structure Lennert Buytenhek
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).