From: Feyd <[EMAIL PROTECTED]> Date: Mon, 11 Jul 2005 07:43:10 +0200 > can I assume that hard_start_xmit will always get skbs with hard_header_len > reserved? I need two more bytes at the start of the packet and I'm getting > spurious panics in skb_push.
Typically, no. ->hard_start_xmit() has a fully built packet, hardware headers and all. Protocols push the hardware header and copy it into the packet long before you get called. For example, look at net/ipv4/ip_output.c:ip_finish_output2(), it takes the cached ARP response hardware header and copies it into the packet like so: read_lock_bh(&hh->hh_lock); hh_alen = HH_DATA_ALIGN(hh->hh_len); memcpy(skb->data - hh_alen, hh->hh_data, hh_alen); read_unlock_bh(&hh->hh_lock); skb_push(skb, hh->hh_len); return hh->hh_output(skb); Your driver's ->hard_start_xmit() gets the packet after this has occured. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html