Re: skbuff headroom guarantee in the driver?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Have you considered whether you can use skb->cb[]? This can be used as a
scratch area to pass information with the skb. But be aware that its
contents isn't guaranteed to be preserved as the skb passes through the
kernel since it may be used by other kernel subsystems. Take a look at how
it's used by the TCP code via the macro TCP_SKB_CB().

-Jed

> Is there a way to guarantee headroom for the Tx packets to be used in
> the Mac driver. Increasing the hard_header_len doesn't seem to be the
> way to go because in the TCP processing skbuffs are allocated with
> MAX_HEADER_LEN and it doesn't seem appropriate to bank on this
> macro. If I want to pass some extra information (say, some descriptor
> realted) to the MAC by prepending the packet, what is the best way to
> do it? I guess, one could argue that it is no longer a true ethernet
> header and hence a new header should be introduced. However, the extra
> information is not any mutated mac header but is some descriptor
> information that needs to be passed with packet for performance
> reasons. Needless to say, I'm hoping to avoid using skb_realloc_header
> in the driver.


-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux