On Mon, Jun 6, 2016 at 3:10 AM, Corcodel Marian <a...@marian1000.go.ro> wrote:
> > > On 06.06.2016 12:59, Corcodel Marian wrote: > >> Hi >> Why sk_buff have memory allocated on hardware drivers on majority nic >> drivers? >> > This seems like an appropriate question for netdev mailing list: http://vger.kernel.org/vger-lists.html#netdev (Tip: explain in more detail what you think is wrong with "rx mode" and someone should be polite enough to point out why it works. Offhand, I don't quite understand what you are trying to point out.) cheers, grant 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. >> >> > -- > Visit my project > https://sourceforge.net/projects/network-card-driver/?source=navbar > >