Replacing alloc_pages(gfp,0) with alloc_page(gfp) in net/core/pktgen.c
Subsystems (3)
PATCH 1/1 Replacing alloc_pages(gfp,0) with alloc_page(gfp) in net/core/pktgen.c
Replacing alloc_pages(gfp,0) with alloc_page(gfp)
in net/core/pktgen.c
----
net/core/pktgen.c +2 -2
@@ -2414,7 +2414,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev, i =0 ;while (datalen >0 ) { -struct page *page =alloc_pages (GFP_KERNEL ,0 ); +struct page *page =alloc_page (GFP_KERNEL );skb_shinfo (skb)->frags[i].page = page;skb_shinfo (skb)->frags[i].page_offset =0 ; skb_shinfo(skb)->frags[i].size =
@@ -2762,7 +2762,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev, i =0 ;while (datalen >0 ) { -struct page *page =alloc_pages (GFP_KERNEL ,0 ); +struct page *page =alloc_page (GFP_KERNEL );skb_shinfo (skb)->frags[i].page = page;skb_shinfo (skb)->frags[i].page_offset =0 ; skb_shinfo(skb)->frags[i].size =
Signature · 1 line
Shani
Re: [KJ] [KJ PATCH] Replacing alloc_pages(gfp, 0) with alloc_page(gfp) in net/core/pktgen.c
Quoted 12 lines · Shani Moideen
Replacing
alloc_pages(gfp,0)withalloc_page(gfp)
innet/core/pktgen.cSigned-off-by Shani Moideen <[email protected]>----
net/core/pktgen.c +0
-0
net/core/pktgen.c static struct sk_buff *fill_packet_ipv4(struct net_device *odev, · line 2417
Quoted 5 lines
net/core/pktgen.c +1
-1@@ -2414,7 +2414,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev, i =0 ;while (datalen >0 ) { -struct page *page =alloc_pages (GFP_KERNEL ,0 ); +struct page *page =alloc_page (GFP_KERNEL );
Does this makes any difference anyway? Both are same eventually? What is the rational behind this? Can you please help me understanding this?
thanks
--pradeep
Quoted 20 lines
net/core/pktgen.c +1
-2skb_shinfo (skb)->frags[i].page = page;skb_shinfo (skb)->frags[i].page_offset =0 ; skb_shinfo(skb)->frags[i].size =@@ -2762,7 +2762,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev, i =0 ;while (datalen >0 ) { -struct page *page =alloc_pages (GFP_KERNEL ,0 ); +struct page *page =alloc_page (GFP_KERNEL );skb_shinfo (skb)->frags[i].page = page;skb_shinfo (skb)->frags[i].page_offset =0 ; skb_shinfo(skb)->frags[i].size = --Shani
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
Re: [KJ] [KJ PATCH] Replacing alloc_pages(gfp, 0) with alloc_page(gfp) in net/core/pktgen.c
Quoted 15 lines · psr
Quoted 14 lines · Shani Moideen
Replacing
alloc_pages(gfp,0)withalloc_page(gfp)
innet/core/pktgen.cSigned-off-by Shani Moideen <[email protected]>----
net/core/pktgen.c +0
-0@@ -2414,7 +2414,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev,
Quoted 8 lines
net/core/pktgen.c static struct sk_buff *fill_packet_ipv4(struct net_device *odev, · line 2417
Quoted 4 lines
net/core/pktgen.c +1
-1i =0 ;while (datalen >0 ) { -struct page *page =alloc_pages (GFP_KERNEL ,0 ); +struct page *page =alloc_page (GFP_KERNEL );Does this makes any difference anyway? Both are same eventually? What is the rational behind this? Can you please help me understanding this?
since this is one of the TO DO items i added to the list of things at the wiki:
http://fsdev.net/wiki/index.php?title=Memory_allocation_cleanup
i'll just toss in my $0.02. if a short (more convenient) form of a routine has been defined, it should be used. if you have no plans to use it, it shouldn't have been defined in the first place.
in short, make a consistent decision and go with it.
rday
Signature · 11 lines
==================================== Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA http://fsdev.net/wiki/index.php?title=Main_Page ==================================== _______________________________________________ Kernel-janitors mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
Re: [KJ] [KJ PATCH] Replacing alloc_pages(gfp, 0) with alloc_page(gfp) in net/core/pktgen.c
On 6/13/07, Robert P. J. Day <[email protected]> wrote:
[snip]
Quoted 5 lines
Quoted 4 lines
Does this makes any difference anyway? Both are same eventually? What is the rational behind this? Can you please help me understanding this?
Quoted 8 lines
since this is one of the TO DO items i added to the list of things at the wiki:
http://fsdev.net/wiki/index.php?title=Memory_allocation_cleanup
i'll just toss in my $0.02. if a short (more convenient) form of a routine has been defined, it should be used. if you have no plans to use it, it shouldn't have been defined in the first place.
Oh... agreed
Thanks
--pradeep
Quoted 13 lines
in short, make a consistent decision and go with it.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADAhttp://fsdev.net/wiki/index.php?title=Main_Page
========================================================================