From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id 2B2767CFF for ; Mon, 29 May 2017 15:07:55 +0200 (CEST) Received: by mail-wm0-f45.google.com with SMTP id d127so58903415wmf.0 for ; Mon, 29 May 2017 06:07:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=2CsUKLE7Q2nIPtMd8WaufMINZRyTKk/CHZtW/W1c7o0=; b=rZ5HjEDdLD3B6XewNZ2+Yj0i647BhYv/2PxB6D8w6zxWA8S5M2TTnYNrHAGvKkftLu F0K9cTBi0NSUkK9ZYqGOfEnsSFUj46Kr5IfII3gjqdYwoD/UbpmFJa2//za7UjYIR9Cm Nc95tHmLlW6AUwocq3zP5Wa1OqtaB0mWbfejKL5Ta+dGLr6Yi/Z2nsfVMlThHhMxXicI uWQpI5me+6dzFsRzU6NkdFc+2XivPn4P+7YJpAthvegEB0Vbjv0iei52oAL7Wil4PZZ8 rPFMTYaaKV/nFZUHhq3037scodBgxeeBPqZZ9RsZ399tkwU9yRqH6OVW1Mhv4q71CVOI hXvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=2CsUKLE7Q2nIPtMd8WaufMINZRyTKk/CHZtW/W1c7o0=; b=cHeRZJDsFrpR7g4V3v03ZDXyzwcg13TNiTpNJBByDj7sMJPoIBV5ECXTDwr45Au6jk shjSB/QcvRM/NuSluMqqU7DumdEF1HaK1m24PRfePSO5ZaftXh6lgJSsNE5Agpoh4qwf chQQm66v5pUZ6evpaYBCsmjCCc8BQ0kQWlbKokQKHYvHawrT23mREfdvfLyeEoUb0TXR hIwjUuLVdNiNI21HHfxs5IkW81oPhUi9XYNCU0v8o1n3AaGSu1RIXAb/6XVrQJ5OfMR9 0ZJlFj7LSvSQJhvBqmTcMEDdSoJB7+HLHMdXtAj4jGxxTAC8UUd4MGEePYnbSacoB96x QKRg== X-Gm-Message-State: AODbwcCBycHQx+68MJOEDvg6tWtkLd3cFMknaji/N5uk9e8CtwdGHEul jjgl9M1d8gkhhleM X-Received: by 10.28.128.202 with SMTP id b193mr10981349wmd.53.1496063274252; Mon, 29 May 2017 06:07:54 -0700 (PDT) Received: from autoinstall.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id u141sm12723274wmd.28.2017.05.29.06.07.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 May 2017 06:07:53 -0700 (PDT) Date: Mon, 29 May 2017 15:07:46 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Shachar Beiser Cc: dev@dpdk.org, Adrien Mazarguil Message-ID: <20170529130746.GB31330@autoinstall.dev.6wind.com> References: <1495954160-983-1-git-send-email-shacharbe@mellanox.com> <1495954160-983-2-git-send-email-shacharbe@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1495954160-983-2-git-send-email-shacharbe@mellanox.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] net/mlx5: implement drop action in hardware classifier X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 13:07:56 -0000 On Sun, May 28, 2017 at 06:49:20AM +0000, Shachar Beiser wrote: > The current drop action is implemented as a queue tail drop, > requiring to instantiate multiple WQs to maintain high drop rate. > This commit, implements the drop action in hardware classifier. > This enables to reduce the amount of contexts needed for the drop, > without affecting the drop rate. > > Signed-off-by: Shachar Beiser > --- > drivers/net/mlx5/Makefile | 5 +++++ > drivers/net/mlx5/mlx5_flow.c | 43 +++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 48 insertions(+) > > diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile > index c079959..daf8013 100644 > --- a/drivers/net/mlx5/Makefile > +++ b/drivers/net/mlx5/Makefile > @@ -101,6 +101,11 @@ mlx5_autoconf.h.new: FORCE > mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh > $Q $(RM) -f -- '$@' > $Q sh -- '$<' '$@' \ > + HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP \ > + infiniband/verbs_exp.h \ > + enum IBV_EXP_FLOW_SPEC_ACTION_DROP \ > + $(AUTOCONF_OUTPUT) > + $Q sh -- '$<' '$@' \ > HAVE_VERBS_IBV_EXP_CQ_COMPRESSED_CQE \ > infiniband/verbs_exp.h \ > enum IBV_EXP_CQ_COMPRESSED_CQE \ > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index adcbe3f..e243d39 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -994,6 +994,11 @@ struct mlx5_flow_action { > { > struct rte_flow *rte_flow; > > +#ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP > + struct ibv_exp_flow_spec_action_drop *drop; > + unsigned int size = sizeof(struct ibv_exp_flow_spec_action_drop); > +#endif Extra empty line before the #ifdef > + > assert(priv->pd); > assert(priv->ctx); > rte_flow = rte_calloc(__func__, 1, sizeof(*rte_flow), 0); > @@ -1007,6 +1012,15 @@ struct mlx5_flow_action { > rte_flow->qp = priv->flow_drop_queue->qp; > if (!priv->started) > return rte_flow; > +#ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP > + drop = (void *)((uintptr_t)flow->ibv_attr + flow->offset); > + *drop = (struct ibv_exp_flow_spec_action_drop){ > + .type = IBV_EXP_FLOW_SPEC_ACTION_DROP, > + .size = size, > + }; > + ++flow->ibv_attr->num_of_specs; > + flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop); > +#endif > rte_flow->ibv_flow = ibv_exp_create_flow(rte_flow->qp, > rte_flow->ibv_attr); > if (!rte_flow->ibv_flow) { >[...] >>From what I see by just changing the value of MLX5_DROP_WQ_N when HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP (in the same source file) limits the patch to this point. Am I missing something? Regards, -- Nélio Laranjeiro 6WIND