Re: About structure sk_buff

Corcodel Marian <[email protected]>
Newsgroups gmane.linux.debian.ports.mips
Message-ID <57554C26.6060806__20913.447548128$1465210668$gmane$org@marian1000.go.ro>

On 06.06.2016 12:59, Corcodel Marian wrote:
> Hi
> Why sk_buff  have memory allocated on hardware drivers on majority nic 
> drivers?
>  This is wrong on rx mode look like:
>
>     struct sk_buff *skb;
>     struct device *d = &tp->pci_dev->dev;
>
>     data = rtl8169_align(data);
>     dma_sync_single_for_cpu(d, addr, pkt_size, DMA_FROM_DEVICE);
>     prefetch(data);
>     skb = netdev_alloc_skb_ip_align(tp->dev, pkt_size);
>     if (skb)
>         memcpy(skb->data, data, pkt_size);
>     dma_sync_single_for_device(d, addr, pkt_size, DMA_FROM_DEVICE);
>
> sk_buff is allocated on place tx mode
> and on start_xmit  no need to keep sk_buff on hardware structure 
> because any info is extracted from
>  next level of driver.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.