[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180308083456.4169306b@redhat.com>
Date: Thu, 8 Mar 2018 08:34:56 +0100
From: Jesper Dangaard Brouer <brouer@...hat.com>
To: Tariq Toukan <tariqt@...lanox.com>
Cc: netdev@...r.kernel.org,
BjörnTöpel <bjorn.topel@...el.com>,
magnus.karlsson@...el.com, eugenia@...lanox.com,
Jason Wang <jasowang@...hat.com>,
John Fastabend <john.fastabend@...il.com>,
Eran Ben Elisha <eranbe@...lanox.com>,
Saeed Mahameed <saeedm@...lanox.com>, galp@...lanox.com,
Daniel Borkmann <borkmann@...earbox.net>,
Alexei Starovoitov <alexei.starovoitov@...il.com>,
brouer@...hat.com
Subject: Re: [bpf-next V1 PATCH 09/15] mlx5: register a memory model when
XDP is enabled
On Wed, 7 Mar 2018 13:50:19 +0200
Tariq Toukan <tariqt@...lanox.com> wrote:
> On 06/03/2018 11:48 PM, Jesper Dangaard Brouer wrote:
> > Now all the users of ndo_xdp_xmit have been converted to use xdp_return_frame.
> > This enable a different memory model, thus activating another code path
> > in the xdp_return_frame API.
> >
> > Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>
> > ---
> > drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> > index da94c8cba5ee..51482943c583 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> > @@ -506,6 +506,13 @@ static int mlx5e_alloc_rq(struct mlx5e_channel *c,
> > rq->mkey_be = c->mkey_be;
> > }
> >
> > + /* This must only be activate for order-0 pages */
> > + if (rq->xdp_prog)
> > + err = xdp_rxq_info_reg_mem_model(&rq->xdp_rxq,
> > + MEM_TYPE_PAGE_ORDER0, NULL);
> > + if (err < 0)
> > + goto err_rq_wq_destroy;
> > +
>
> Use "if (err)" here, instead of changing this in next patch.
> Also, get it into the "if (rq->xdp_prog)" block.
Good point, fixed!
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
Powered by blists - more mailing lists