mapping address pointer to page structure

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

 



Hi All,

      Is it possible to map a address like skb->data in to struct page. My requirement is to convert multiple skb
to a single master skb, having all the data of other skb. i.e, i want add skb->data of multiple skb to a single skb
as the fragments. So instead of making a memcpy every time, i just call skb_add_rx_frag

my requirement is some thing like this

.
.
struct page *page = virt_to_page(skb->data);

skb_add_rx_frag(master_skb, skb_shinfo(master_skb)->nr_frags, page, off, skb->len)
.
.

And can some one please tell what is the use of the functions like virt_to_page and kmap_atomic_to_page,
i tried calling virt_to_page(skb->data), but when i print the data in the page address ( page_address(page) ) and
the data in pointed by skb->data, i came to know its mapping to a wrong page. so can some one please explain
me what is correct way to do this.


Thanks in advance.
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux