From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D9C96A04DB; Sat, 17 Oct 2020 20:27:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 150D6E22A; Sat, 17 Oct 2020 20:20:01 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id B088BCA68 for ; Sat, 17 Oct 2020 20:19:40 +0200 (CEST) IronPort-SDR: wyPYAQmvebYn17UEiiYnN8GktCGtQ2Z1VouDC36tpfdM9K1CmPR09zkp0l3bbWr/9vhlj4g4Px fMT6qXsTCpfg== X-IronPort-AV: E=McAfee;i="6000,8403,9777"; a="146122198" X-IronPort-AV: E=Sophos;i="5.77,387,1596524400"; d="scan'208";a="146122198" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2020 11:19:38 -0700 IronPort-SDR: Xj3uh+p+XG9RukUwXEILlfnTKGn4ra2ts3UQV5rK7Qpc1y1vKVRW7iCsjCeyJ6MehTzIt1NHv8 zR5bD+W/wYRg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,387,1596524400"; d="scan'208";a="532129717" Received: from txasoft-yocto.an.intel.com ([10.123.72.192]) by orsmga005.jf.intel.com with ESMTP; 17 Oct 2020 11:19:38 -0700 From: Timothy McDaniel To: Cc: dev@dpdk.org, erik.g.carrillo@intel.com, gage.eads@intel.com, harry.van.haaren@intel.com, jerinj@marvell.com Date: Sat, 17 Oct 2020 13:21:17 -0500 Message-Id: <1602958879-8558-21-git-send-email-timothy.mcdaniel@intel.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1602958879-8558-1-git-send-email-timothy.mcdaniel@intel.com> References: <1599855987-25976-2-git-send-email-timothy.mcdaniel@intel.com> <1602958879-8558-1-git-send-email-timothy.mcdaniel@intel.com> Subject: [dpdk-dev] [PATCH v2 20/22] event/dlb2: add queue and port release 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" DLB does not support reconfiguring individual queues or ports on the fly. The entire device must be reconfigured. Previously allocated port QE ond memzone memory is freed in this patch. Signed-off-by: Timothy McDaniel --- drivers/event/dlb2/dlb2.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c index 06a59a5..968923e 100644 --- a/drivers/event/dlb2/dlb2.c +++ b/drivers/event/dlb2/dlb2.c @@ -89,8 +89,8 @@ dlb2_free_qe_mem(struct dlb2_port *qm_port) rte_free(qm_port->consume_qe); qm_port->consume_qe = NULL; - rte_free(dlb2_port[qm_port->id][PORT_TYPE(qm_port)].cq_base); - rte_free(dlb2_port[qm_port->id][PORT_TYPE(qm_port)].pp_addr); + rte_memzone_free(dlb2_port[qm_port->id][PORT_TYPE(qm_port)].mz); + dlb2_port[qm_port->id][PORT_TYPE(qm_port)].mz = NULL; } /* override defaults with value(s) provided on command line */ @@ -3676,6 +3676,28 @@ dlb2_eventdev_close(struct rte_eventdev *dev) } static void +dlb2_eventdev_queue_release(struct rte_eventdev *dev, uint8_t id) +{ + RTE_SET_USED(dev); + RTE_SET_USED(id); + + /* This function intentionally left blank. */ +} + +static void +dlb2_eventdev_port_release(void *port) +{ + struct dlb2_eventdev_port *ev_port = port; + struct dlb2_port *qm_port; + + if (ev_port) { + qm_port = &ev_port->qm_port; + if (qm_port->config_state == DLB2_CONFIGURED) + dlb2_free_qe_mem(qm_port); + } +} + +static void dlb2_entry_points_init(struct rte_eventdev *dev) { struct dlb2_eventdev *dlb2; @@ -3689,8 +3711,10 @@ dlb2_entry_points_init(struct rte_eventdev *dev) .dev_close = dlb2_eventdev_close, .queue_def_conf = dlb2_eventdev_queue_default_conf_get, .queue_setup = dlb2_eventdev_queue_setup, + .queue_release = dlb2_eventdev_queue_release, .port_def_conf = dlb2_eventdev_port_default_conf_get, .port_setup = dlb2_eventdev_port_setup, + .port_release = dlb2_eventdev_port_release, .port_link = dlb2_eventdev_port_link, .port_unlink = dlb2_eventdev_port_unlink, .port_unlinks_in_progress = -- 2.6.4