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 084C4A0548; Sun, 21 Feb 2021 18:05:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B2BE22A2E5; Sun, 21 Feb 2021 18:05:40 +0100 (CET) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by mails.dpdk.org (Postfix) with ESMTP id EA39C4003E for ; Sun, 21 Feb 2021 18:05:38 +0100 (CET) Received: by mail-lj1-f170.google.com with SMTP id c8so51308810ljd.12 for ; Sun, 21 Feb 2021 09:05:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vSHEB2JVQ6vDu5BXPLhum2+3z6WdYClvJLmQo9jWsZ4=; b=Q0YNY8Vt1rkDBau3c6hIf8f6PUolFV1VkjBu2mfaKg3YNRH27oQfydaer8twIwJZEt SeAjx1yUPV7WyqTsvj+vie6DrUPfr1MYTtzE91Y/oW/BJ8tn4NrU0mn/1qGB9FGZzuXB 4Gl2JEHn0R68gqnIJgvWK4FXSvkCkMLSGMI8T8q2LdRP7xzYXNjVGfCWkdAe0y3+OiwA p9PPeIMpWyKoYhoq2FBkLPxJBoQIfEI/VgNxRTGRvUqgpo1hbvymNyhMpkQYl16W8mUv UjdPEmiJRNRlmVuAi6wivG5bk44pNls/TRn6DQO/GqjsdSX5kWvvcF6BxqhRByH/m8d+ gyWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vSHEB2JVQ6vDu5BXPLhum2+3z6WdYClvJLmQo9jWsZ4=; b=oH9TBdfb4VGY4yuJV66OfzNGbG5p69T84VYSMl/v3BHc2iPmIyI1Llz+XWWTNNzzS/ A5gKxIB/Pmbmn8tCF7c+qROTwUbeuMs1T5pI3qNImI0yMagx2P8gNTGfVpCu1qKaNb10 PMvVewRK4ypYxOsT13B6GMwrFweWDK5S6SjcrYKkW9kOL1bgEh/TpE3/HZ+C7OVHeYTi NcjGpeTZ3nunuMvR9AJQ5JY0+9UlMr4P+Wri13+dqzqbllgrbDkmy6UdHqT16XF3DXyJ /adOJN5iYuSIDkPxVwRE7UdEyoZjPKShpdWGP6Of2WuH/wEZ6vzTrldxdBxqVogY2ixj ZKJw== X-Gm-Message-State: AOAM530O/eSxL1tMmg1jC+NMBsZs74BaTxJUIg0IllJ/cfH9o2XsPMQy 6Uuk9ZwCtzOBzINLTlJH758= X-Google-Smtp-Source: ABdhPJwl1AwgUha49fm+I4D4pLp7XXE1TabCcmkItjTnSFD+wM3kyBePdOrsCjNxtwNpKj2aqcRn2Q== X-Received: by 2002:a05:651c:399:: with SMTP id e25mr11749534ljp.87.1613927138495; Sun, 21 Feb 2021 09:05:38 -0800 (PST) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id 187sm716387lfh.116.2021.02.21.09.05.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Feb 2021 09:05:37 -0800 (PST) Date: Sun, 21 Feb 2021 20:05:36 +0300 From: Dmitry Kozlyuk To: Andrew Rybchenko Cc: Tal Shnaiderman , "dev@dpdk.org" , Tyler Retzlaff , Nick Connolly , Matan Azrad , Shahaf Shuler , Slava Ovsiienko , Beilei Xing , Jeff Guo Message-ID: <20210221200536.0821a1f4@sovereign> In-Reply-To: <779ae112-eb54-b6c4-22c3-ca9f30274f19@oktetlabs.ru> References: <20210220232910.772-1-dmitry.kozliuk@gmail.com> <20210221012831.14643-1-dmitry.kozliuk@gmail.com> <20210221012831.14643-7-dmitry.kozliuk@gmail.com> <779ae112-eb54-b6c4-22c3-ca9f30274f19@oktetlabs.ru> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 6/7] drivers: remove POSIX dependencies 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" On Sun, 21 Feb 2021 18:54:01 +0300, Andrew Rybchenko wrote: > On 2/21/21 11:59 AM, Tal Shnaiderman wrote: > >> Subject: [dpdk-dev] [PATCH v2 6/7] drivers: remove POSIX dependencies > >> > >> External email: Use caution opening links or attachments > >> > >> > >> Replace POSIX strncasecmp() with EAL rte_strncasecmp(). > >> Replace POSIX strtok_r() with EAL rte_strtok(). > >> Replace POSIX strdup() with EAL rte_strdup(). > >> > >> Signed-off-by: Dmitry Kozlyuk > >> --- > >> i40e: checkpatches.sh complains about long lines (it's ~85). > >> I doubt that mechanical fix would keep the code readable. > >> It's on 5th level of indentation, so I'd extract a function, > >> but would like to hear from maintainers first. > >> > >> drivers/bus/pci/private.h | 2 +- > >> drivers/bus/vdev/vdev.c | 4 +- > >> drivers/bus/vdev/vdev_params.c | 3 +- > >> drivers/common/mlx5/mlx5_common_pci.c | 4 +- > > > > bus_cmdline_options_handler in mlx5_common_pci.c has a call to strdup which needs to be renamed to rte_strdup > > (Also failed CI: https://lab.dpdk.org/results/dashboard/patchsets/15674/ ) > > > > > Frankly speaking I don't understand why such changes are useful/needed. > Patch description does not explain/prove it. Please see the cover letter (better to partially repeat in each patch?): https://mails.dpdk.org/archives/dev/2021-February/199981.html Driver code using POSIX functions is not really portable without a shim. Having a shim in public API is wrong, it makes DPDK expose non-DPDK symbols. An alternative approach would be to make the shim DPDK-internal. It would require just a change in #includes for drivers and libs. My doubt is whether EAL should emulate POSIX.