Re: [PATCH] bnx2x: Alloc 4k fragment for each rx ring buffer element

2015-06-01 Thread David Miller
From: Gabriel Krisman Bertazi Date: Wed, 27 May 2015 13:51:43 -0300 > Subject: [PATCH] bnx2x: Alloc 4k fragment for each rx ring buffer element > > The driver allocates one page for each buffer on the rx ring, which is > too much on architectures like ppc64 and can cause unexpecte

Re: [PATCH] bnx2x: Alloc 4k fragment for each rx ring buffer element

2015-05-27 Thread Gabriel Krisman Bertazi
imple linear relationship between the two. Yes, but I felt it would make the code more readable, even though it introduced sobre redundancy. Anyway, the new version below removes frag_count and fixes the overflow bug. Thanks for your review! -- >8 -- Subject: [PATCH] bnx2x: Alloc 4k fragment for

RE: [PATCH] bnx2x: Alloc 4k fragment for each rx ring buffer element

2015-04-19 Thread Ariel Elior
Hi Gabriel, Thanks for pointing out this shortcoming. However, I don't think that the solution you suggested would work as is. @@ -628,21 +644,30 @@ static int bnx2x_fill_frag_skb(struct bnx2x *bp, struct bnx2x_fastpath *fp, bnx2x_fp_qstats(bp, fp)->rx_skb_alloc_failed++;

[PATCH] bnx2x: Alloc 4k fragment for each rx ring buffer element

2015-04-17 Thread Gabriel Krisman Bertazi
The driver allocates one page for each buffer on the rx ring, which is too much on architectures like ppc64 and can cause unexpected allocation failures when the system is under stress. Now, if the architecture's PAGE_SIZE is greater than 4k, we fragment pages and assign each 4k segment to a ring