From: Ferruh Yigit Subject: Re: [PATCH v4 7/7] net/ark: Arkville PMD component integration Date: Thu, 23 Mar 2017 12:13:00 +0000 Message-ID: References: <1490231015-31748-1-git-send-email-ed.czeck@atomicrules.com> <1490231015-31748-7-git-send-email-ed.czeck@atomicrules.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: Shepard Siegel , John Miller To: Ed Czeck , dev@dpdk.org, Thomas Monjalon Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 4CC49695D for ; Thu, 23 Mar 2017 13:13:05 +0100 (CET) In-Reply-To: <1490231015-31748-7-git-send-email-ed.czeck@atomicrules.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 3/23/2017 1:03 AM, Ed Czeck wrote: > * Flesh out device configuration > * Add links dev_ops > * allow dynamic extension loading > > Signed-off-by: Shepard Siegel > Signed-off-by: John Miller > Signed-off-by: Ed Czeck <...> > > int > @@ -129,8 +182,86 @@ static void eth_ark_dev_info_get(struct rte_eth_dev *dev, > return -1; > } > > +static > +int Can be in same line. > +check_for_ext(struct rte_eth_dev *dev __rte_unused, > + struct ark_adapter *ark __rte_unused) __rte_unused can go away > +{ > + int found = 0; > + > + /* Get the env */ > + const char *dllpath = getenv("ARK_EXT_PATH"); > + > + if (dllpath == NULL) { > + ARK_DEBUG_TRACE("ARK EXT NO dll path specified\n"); > + return 0; > + } > + ARK_DEBUG_TRACE("ARK EXT found dll path at %s\n", dllpath); > + > + /* Open and load the .so */ > + ark->d_handle = dlopen(dllpath, RTLD_LOCAL | RTLD_LAZY); > + if (ark->d_handle == NULL) > + PMD_DRV_LOG(ERR, "Could not load user extension %s\n", dllpath); > + else > + ARK_DEBUG_TRACE("SUCCESS: loaded user extension %s\n", dllpath); Hi Ed, Can you give some more details on "user extension" that loaded dynamically? How much the driver depends on it, what happens if the library is missing? And how do you deliver that shared library? > + > + /* Get the entry points */ > + ark->user_ext.dev_init = > + (void *(*)(struct rte_eth_dev *, void *, int)) > + dlsym(ark->d_handle, "dev_init"); > + ARK_DEBUG_TRACE("device ext init pointer = %p\n", > + ark->user_ext.dev_init); > + ark->user_ext.dev_get_port_count = > + (int (*)(struct rte_eth_dev *, void *)) > + dlsym(ark->d_handle, "dev_get_port_count"); <...>