From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A545FA034F; Mon, 22 Feb 2021 19:21:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8490522A291; Mon, 22 Feb 2021 19:21:23 +0100 (CET) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mails.dpdk.org (Postfix) with ESMTP id F34C94003C for ; Mon, 22 Feb 2021 19:21:21 +0100 (CET) Received: by mail-wr1-f43.google.com with SMTP id h98so15284716wrh.11 for ; Mon, 22 Feb 2021 10:21:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mayadata-io.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=5vwMX6RR4aQWGmoUAILn1MlhjFbLt9i6GMLEGrbfm8I=; b=Rh0V93zD3unSA6l4sg91BDSRv7i8FKx5VAHk41FdLdLXo0V3qKkw2HpGKcf5qFUjOB o3bQdAawkJp0fU3EgZo/eIgLSIXDoHLs2ojA+X3G5Dmu+XqxsA3d19Rb6+Ze58LSOCkp 32f5j4hZM2sHzTPGhjvtKbCX1tWkDb0tGj090wzflxU6Agt67ft2/7bwpEnQXIsgQjWa 2/7cjnG7Yg8IBg0vSQ1++nDRKrUrtNpdm6wWlcRgddowr0VC0azLciD1Kl4VPf44SCWn OhhUt7JDn3Gr1dV9lWEYyDxIS8gp1lLf5YUTzn7I9J6ZHYDyxi6Jn8xEHlRy243HtLgB 5jJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=5vwMX6RR4aQWGmoUAILn1MlhjFbLt9i6GMLEGrbfm8I=; b=KleJAo0NUrqwTJ/w0kWpZlDlImjdvaveM49o4XlgWKCa1jFoAXAbwPqYj8/YKtrXQk V9YUqcqsx2NWDdESmpAnCC2bsYr6YKapic4dDNBDlB9BlMFPljzd7NY8prFz0ndurQ3h DpidtmBzL2UkUKXO35mWHJP7vQjFDu4/M3P9vJnS/AJkjr1eW8j7I5odK3XpLHDtUGsm LNHPf5/k6dBKjDhhofIKRMPXF+K5S4cyjoLv9O4rI21oW+1NVMYYXyPWLvxHqkJJPf9Z dFCEN06yK/EOIGR5r5/UyWF+jcE997WSCn8r1WWOA6FYmEaBrTotzfg2vDFLYxIld4LR CKlA== X-Gm-Message-State: AOAM533mGsfJxuoK6DYGcUbKjhtrc5I0/82+Z+jjGuik14BwwqsB4Z6F ujVyHQ2fA4oNzrMWrySJqHSMVw== X-Google-Smtp-Source: ABdhPJzKDtNXzKXSySiKaGo1AZYr0tTUNp8wZ9/KzF/9E/wSnabHM0PLVcR3Qwa4AFzjdMyR3iMThg== X-Received: by 2002:a5d:524b:: with SMTP id k11mr1720909wrc.122.1614018081730; Mon, 22 Feb 2021 10:21:21 -0800 (PST) Received: from [192.168.0.33] (cpc98320-croy25-2-0-cust77.19-2.cable.virginm.net. [80.235.134.78]) by smtp.gmail.com with ESMTPSA id f7sm29592146wre.78.2021.02.22.10.21.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Feb 2021 10:21:21 -0800 (PST) From: Nick Connolly X-Google-Original-From: Nick Connolly To: Bruce Richardson Cc: Dmitry Kozlyuk , dev@dpdk.org, Tyler Retzlaff , Jerin Jacob , Sunil Kumar Kori References: <20210220232910.772-1-dmitry.kozliuk@gmail.com> <20210221012831.14643-1-dmitry.kozliuk@gmail.com> <20210221012831.14643-2-dmitry.kozliuk@gmail.com> <20210222114743.GA1235@bricha3-MOBL.ger.corp.intel.com> <64c1e6c5-ce80-b550-b8ea-ad2a6bfe7505@mayadata.io> <20210222142625.GA704@bricha3-MOBL.ger.corp.intel.com> Message-ID: <521d8a5e-116e-9141-6e28-64a3212d8939@mayadata.io> Date: Mon, 22 Feb 2021 18:21:20 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210222142625.GA704@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [dpdk-dev] [PATCH v2 1/7] eal: add wrappers for POSIX string functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" > For any functions, such as strdup, which are not in a public header I would > suggest the following as a possible start point, based off what was done > for strlcpy. > > * In DPDK (probably EAL), define an rte_strdup function for use as a > fallback. > * Inside the meson build scripts, use "cc.has_function()" to check if the > regular strdup function is available. If not, then add "-DRTE_NO_STRDUP" > to the c_args for DPDK building > * Inside our DPDK header (rte_string_fns.h in the strdup case), we can add > a conditional define such as: > #ifdef RTE_NO_STRDUP > #define strdup(s) rte_strdup(s) > #endif > > Thoughts on this? Looks like an elegant approach to me. Nick