diff mbox

[net-next,0/9] mlx4: order-0 allocations and page recycling

Message ID 1486569156.7793.79.camel@edumazet-glaptop3.roam.corp.google.com
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet Feb. 8, 2017, 3:52 p.m. UTC
On Wed, 2017-02-08 at 11:02 +0200, Tariq Toukan wrote:
> 
> On 07/02/2017 5:50 PM, Tariq Toukan wrote:
> > Hi Eric,
> >
> > Thanks for your series.
> >
> > On 07/02/2017 5:02 AM, Eric Dumazet wrote:
> >> As mentioned half a year ago, we better switch mlx4 driver to order-0
> >> allocations and page recycling.
> >>
> >> This reduces vulnerability surface thanks to better skb->truesize 
> >> tracking
> >> and provides better performance in most cases.
> > The series makes significant change in the RX data-path, that requires 
> > deeper checks, in addition to code review.
> > We applied your series and started running both our functional and 
> > performance regression.
> > We will have results by tomorrow morning, and will analyze them during 
> > the day. I'll update about that.
> We hit a kernel panic when running traffic after configuring a large MTU 
> (9000).
> I will take deeper look into this soon and will keep you updated.

Hmm... I saw a typo for XDP, but not for the non XDP path...
diff mbox

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index 8f16ec8dfadd0f95646c498c14d53f7266a0..e572e175edfe0f7392b9833b5b3f867fd6db 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -132,7 +132,7 @@  static int mlx4_en_prepare_rx_desc(const struct mlx4_en_priv *priv,
                                        (index << priv->log_rx_info);
 
        if (ring->page_cache.index > 0) {
-               if (frags[0].page) {
+               if (!frags[0].page) {
                        ring->page_cache.index--;
                        frags[0].page = ring->page_cache.buf[ring->page_cache.index].page;
                        frags[0].dma  = ring->page_cache.buf[ring->page_cache.index].dma;