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 5726CA0589; Fri, 27 Mar 2020 11:30:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 92B321C0D6; Fri, 27 Mar 2020 11:29:25 +0100 (CET) Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by dpdk.org (Postfix) with ESMTP id 916D21C08C for ; Fri, 27 Mar 2020 11:29:18 +0100 (CET) Received: by mail-lj1-f194.google.com with SMTP id q19so9582213ljp.9 for ; Fri, 27 Mar 2020 03:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OS8Wq+90JkQ6fUmpk+hKywyQCRi+8rx7LJ5V0ISP0lY=; b=wsz1AL6DrszEBoLX8gVBjTXgyoClOMVcpFXa45SFFjdqD2h7HjlUnMaVnaV5m64zEV 5ILrwliqlhIClHXKZ3O+jw4wemf7K1FGXhnm88xbCjLj6rxsGjYJIxn+F4KtiOPZfNAM OBXJ0l+wthWpA7mx1dKq/KnIVnrz1T0dsuXQ7mRV4F8nGwMgv3jl01EmVMrqHRo3ohn2 ObnOY6ucosL/qLI6McRIVaDfcR7HiKeAGT39l5hP+j4nR9J/u/mSitW0IKHX8NqgNa0x sgN7lmmm1bO8As9W0wBFZfjVLBx4ELlm1C/blJZPmqPxVVgLuwmcipSfUJV0fwcbWRja /IaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OS8Wq+90JkQ6fUmpk+hKywyQCRi+8rx7LJ5V0ISP0lY=; b=lwJoRdv6jwxWbsji9kE31w9FFe6HYbtqwHMALp47rUtsh6BLZlDEp7rpvAzmLAx5wO gHpCXgWYPmxCNl6LWbQ6gxe+Yl1Km7vX5rew5Q85WhAB455MaLUM/AWyFjFCBf/vLDvH 8WUhAQReAE7bwsBlL+v0xYm6vJLX0BwdBem1U5E9avHoqJJcipABkNd61EDEqPj5jo6i voXmyYGh56aVlvkpx/l5Xcmi2/szcy8QYpaw8cuqhWbksXKvKriBt7k0EFgz8ytGjqep M+1122jtCsDejnb4MD5MJq1Se2IsMup4NMYYRfypiIrWkeJ4/PO79pVKrH1bdBjNhgGQ Yl3A== X-Gm-Message-State: ANhLgQ339y7d1Tu6FVYouiCY5Dy5IzpK6og9AwX57P/lN+jprrmx88KA G5O6VEvD/STNTxctkCwHlkBPHej85rBJjg== X-Google-Smtp-Source: APiQypIr5a4VIGB4F0ox0DBK0wmQTvD8wUcmL0PsC+bcmdI9+srJcsfIMl+MlqL+/FqqHqUGeJG4bw== X-Received: by 2002:a2e:9284:: with SMTP id d4mr7655278ljh.226.1585304957892; Fri, 27 Mar 2020 03:29:17 -0700 (PDT) Received: from localhost.localdomain (193-106-246-138.noc.fibertech.net.pl. [193.106.246.138]) by smtp.gmail.com with ESMTPSA id i11sm2789587lfo.84.2020.03.27.03.29.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2020 03:29:16 -0700 (PDT) From: Michal Krawczyk To: dev@dpdk.org Cc: mw@semihalf.com, mba@semihalf.com, gtzalik@amazon.com, evgenys@amazon.com, igorch@amazon.com, Michal Krawczyk Date: Fri, 27 Mar 2020 11:18:00 +0100 Message-Id: <20200327101823.12646-7-mk@semihalf.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200327101823.12646-1-mk@semihalf.com> References: <20200327101823.12646-1-mk@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 06/29] net/ena/base: remove extra properties strings 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" This buffer was never used by the ENA PMD. It could be used for debugging, but it's presence is redundant now. Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Guy Tzalik --- drivers/net/ena/base/ena_com.c | 56 ---------------------------------- drivers/net/ena/base/ena_com.h | 33 -------------------- 2 files changed, 89 deletions(-) diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c index cb2114acb7..19815db9ad 100644 --- a/drivers/net/ena/base/ena_com.c +++ b/drivers/net/ena/base/ena_com.c @@ -1910,62 +1910,6 @@ int ena_com_get_link_params(struct ena_com_dev *ena_dev, return ena_com_get_feature(ena_dev, resp, ENA_ADMIN_LINK_CONFIG, 0); } -int ena_com_extra_properties_strings_init(struct ena_com_dev *ena_dev) -{ - struct ena_admin_get_feat_resp resp; - struct ena_extra_properties_strings *extra_properties_strings = - &ena_dev->extra_properties_strings; - u32 rc; - extra_properties_strings->size = ENA_ADMIN_EXTRA_PROPERTIES_COUNT * - ENA_ADMIN_EXTRA_PROPERTIES_STRING_LEN; - - ENA_MEM_ALLOC_COHERENT(ena_dev->dmadev, - extra_properties_strings->size, - extra_properties_strings->virt_addr, - extra_properties_strings->dma_addr, - extra_properties_strings->dma_handle); - if (unlikely(!extra_properties_strings->virt_addr)) { - ena_trc_err("Failed to allocate extra properties strings\n"); - return 0; - } - - rc = ena_com_get_feature_ex(ena_dev, &resp, - ENA_ADMIN_EXTRA_PROPERTIES_STRINGS, - extra_properties_strings->dma_addr, - extra_properties_strings->size, 0); - if (rc) { - ena_trc_dbg("Failed to get extra properties strings\n"); - goto err; - } - - return resp.u.extra_properties_strings.count; -err: - ena_com_delete_extra_properties_strings(ena_dev); - return 0; -} - -void ena_com_delete_extra_properties_strings(struct ena_com_dev *ena_dev) -{ - struct ena_extra_properties_strings *extra_properties_strings = - &ena_dev->extra_properties_strings; - - if (extra_properties_strings->virt_addr) { - ENA_MEM_FREE_COHERENT(ena_dev->dmadev, - extra_properties_strings->size, - extra_properties_strings->virt_addr, - extra_properties_strings->dma_addr, - extra_properties_strings->dma_handle); - extra_properties_strings->virt_addr = NULL; - } -} - -int ena_com_get_extra_properties_flags(struct ena_com_dev *ena_dev, - struct ena_admin_get_feat_resp *resp) -{ - return ena_com_get_feature(ena_dev, resp, - ENA_ADMIN_EXTRA_PROPERTIES_FLAGS, 0); -} - int ena_com_get_dev_attr_feat(struct ena_com_dev *ena_dev, struct ena_com_dev_get_features_ctx *get_feat_ctx) { diff --git a/drivers/net/ena/base/ena_com.h b/drivers/net/ena/base/ena_com.h index 5935d024dd..0e34a13fde 100644 --- a/drivers/net/ena/base/ena_com.h +++ b/drivers/net/ena/base/ena_com.h @@ -284,13 +284,6 @@ struct ena_host_attribute { ena_mem_handle_t host_info_dma_handle; }; -struct ena_extra_properties_strings { - u8 *virt_addr; - dma_addr_t dma_addr; - ena_mem_handle_t dma_handle; - u32 size; -}; - /* Each ena_dev is a PCI function. */ struct ena_com_dev { struct ena_com_admin_queue admin_queue; @@ -326,7 +319,6 @@ struct ena_com_dev { struct ena_intr_moder_entry *intr_moder_tbl; struct ena_com_llq_info llq_info; - struct ena_extra_properties_strings extra_properties_strings; }; struct ena_com_dev_get_features_ctx { @@ -564,31 +556,6 @@ int ena_com_validate_version(struct ena_com_dev *ena_dev); int ena_com_get_link_params(struct ena_com_dev *ena_dev, struct ena_admin_get_feat_resp *resp); -/* ena_com_extra_properties_strings_init - Initialize the extra properties strings buffer. - * @ena_dev: ENA communication layer struct - * - * Initialize the extra properties strings buffer. - */ -int ena_com_extra_properties_strings_init(struct ena_com_dev *ena_dev); - -/* ena_com_delete_extra_properties_strings - Free the extra properties strings buffer. - * @ena_dev: ENA communication layer struct - * - * Free the allocated extra properties strings buffer. - */ -void ena_com_delete_extra_properties_strings(struct ena_com_dev *ena_dev); - -/* ena_com_get_extra_properties_flags - Retrieve extra properties flags. - * @ena_dev: ENA communication layer struct - * @resp: Extra properties flags. - * - * Retrieve the extra properties flags. - * - * @return - 0 on Success negative value otherwise. - */ -int ena_com_get_extra_properties_flags(struct ena_com_dev *ena_dev, - struct ena_admin_get_feat_resp *resp); - /* ena_com_get_dma_width - Retrieve physical dma address width the device * supports. * @ena_dev: ENA communication layer struct -- 2.20.1