From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id E292B16E for ; Thu, 15 Mar 2018 16:45:46 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Mar 2018 08:45:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,311,1517904000"; d="scan'208";a="211623793" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.62]) ([10.237.221.62]) by fmsmga006.fm.intel.com with ESMTP; 15 Mar 2018 08:45:33 -0700 To: Andrew Rybchenko , dev@dpdk.org Cc: Ivan Malov References: <1516899647-8541-1-git-send-email-arybchenko@solarflare.com> <1516899647-8541-4-git-send-email-arybchenko@solarflare.com> From: Ferruh Yigit Message-ID: <520f5814-3d2d-1de1-52e2-ff2483288b27@intel.com> Date: Thu, 15 Mar 2018 15:45:33 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1516899647-8541-4-git-send-email-arybchenko@solarflare.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 3/6] net/sfc: add support for per-port dynamic logging 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: Thu, 15 Mar 2018 15:45:47 -0000 On 1/25/2018 5:00 PM, Andrew Rybchenko wrote: > From: Ivan Malov > > Signed-off-by: Ivan Malov > Signed-off-by: Andrew Rybchenko > Reviewed-by: Andy Moreton <...> > +uint32_t > +sfc_register_logtype(struct sfc_adapter *sa, const char *lt_prefix_str, > + uint32_t ll_default) > +{ > + size_t lt_prefix_str_size = strlen(lt_prefix_str); > + size_t lt_str_size_max; > + char *lt_str = NULL; > + int ret; > + > + if (SIZE_MAX - PCI_PRI_STR_SIZE - 1 > lt_prefix_str_size) { > + ++lt_prefix_str_size; /* Reserve space for prefix separator */ > + lt_str_size_max = lt_prefix_str_size + PCI_PRI_STR_SIZE + 1; > + } else { > + return RTE_LOGTYPE_PMD; > + } > + > + lt_str = rte_zmalloc("logtype_str", lt_str_size_max, 0); > + if (lt_str == NULL) > + return RTE_LOGTYPE_PMD; > + > + strncpy(lt_str, lt_prefix_str, lt_prefix_str_size); > + lt_str[lt_prefix_str_size - 1] = '.'; > + rte_pci_device_name(&sa->pci_addr, lt_str + lt_prefix_str_size, > + lt_str_size_max - lt_prefix_str_size); Not able to find "rte_pci_device_name()" in shared library build [1]. Need to link with rte_pci library [2]. [1] sfc.o: In function `sfc_register_logtype': .../dpdk/drivers/net/sfc/sfc.c:(.text+0x1a52): undefined reference to `rte_pci_device_name' clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation) [2] --- a/drivers/net/sfc/Makefile +++ b/drivers/net/sfc/Makefile @@ -52,3 +52,3 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -LDLIBS += -lrte_bus_pci +LDLIBS += -lrte_bus_pci -lrte_pci <...>