[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170217224353.GP6096@lunn.ch>
Date: Fri, 17 Feb 2017 23:43:53 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Pavel Belous <Pavel.Belous@...antia.com>
Cc: "David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Simon Edelhaus <Simon.Edelhaus@...antia.com>,
Alexey Andriyanov <Alexey.Andriyanov@...antia.com>,
Lino Sanfilippo <LinoSanfilippo@....de>
Subject: Re: [PATCH net-next v2 11/12] net: ethernet: aquantia: Fixed memory
allocation if AQ_CFG_RX_FRAME_MAX > 1 page.
> diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c b/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
> index 4c40644..0877625 100644
> --- a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
> +++ b/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
> @@ -278,6 +278,8 @@ int aq_ring_rx_fill(struct aq_ring_s *self)
> struct aq_ring_buff_s *buff = NULL;
> int err = 0;
> int i = 0;
> + unsigned int pages_order = fls(AQ_CFG_RX_FRAME_MAX / PAGE_SIZE +
> + (AQ_CFG_RX_FRAME_MAX % PAGE_SIZE ? 1 : 0)) - 1;
Reverse Christmas tree?
Andrew
Powered by blists - more mailing lists