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 5B43B45BA0; Tue, 22 Oct 2024 14:27:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C61E4029A; Tue, 22 Oct 2024 14:27:19 +0200 (CEST) Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) by mails.dpdk.org (Postfix) with ESMTP id 3018540273 for ; Tue, 22 Oct 2024 14:27:18 +0200 (CEST) Received: by mail-yb1-f175.google.com with SMTP id 3f1490d57ef6-e28fe07e97dso5397400276.3 for ; Tue, 22 Oct 2024 05:27:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729600037; x=1730204837; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3g4ZY1RcePcXBQmyro4Tdz4hwFrq6zbdfAStLUIQYoU=; b=LM5dHS5gtaR5oF6QqbfCddf4It8DPIc8gtXRAE3xZDMejbKsl8CU0aaQ4N/wbdM8zm qAWNinmP7vhrqrHHdpS38cqYonw+WkB23JE73C2yBhdKgRegU/UFV/pxEHysjlMwevyn gHtHZy73k4KotYNBzWfx3FB5srEwBbg9etxLnqfpasjqIAy3qJPZf+ETokovsZzPZw4s MFvlw1JoXba1ldw5Spbzbp7Bc5nJgNV0zkPwXiNLuumt+7mv/pu5o7iO1hcUDlIy9ENJ yhyyXd6vJD6/TkoKdaK1JtJtTMN/RYji1OrTh9sCWuCMo/jgdk6EvJSq2qjpeL7anAjt eA1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729600037; x=1730204837; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3g4ZY1RcePcXBQmyro4Tdz4hwFrq6zbdfAStLUIQYoU=; b=qmKlJbCTsEVJdTUGbhqsNdstNAMzYMBvS4Rao3fPPWNAnzWDzrHbj1Qr/FFvGEkmi0 oHu8Di+LgT53USbm16wT2Gb3O7sx9MENxD/uQoYacZeaUB7914ECVL87NrMdqdblnjT0 bbPUCZKeCfcDSdLptSyC2o85i43bCkKkRE6S050RkzkfTyGJeOF48nNqysBDja6o7vym am1yx111pTIznrl+N75y2khugspR6dgWxMLH2wEu1q73ynQAQrIxDnm7w3kUTLCfL4BU zLZVZ89ZYp6IWI1DQhdXhcxwkexyVM/hRKXwkQyHzjyGVwqkC1KgPOaiteY0f4v3y0TY +I6A== X-Forwarded-Encrypted: i=1; AJvYcCXwqHOmLdh+w6KopGNDgpa5BfqjkqDr+Gy+zRMQ7jIkjT4V3DX5qM1TejDDdKZKBrfZS4Y=@dpdk.org X-Gm-Message-State: AOJu0Yy1tJSSMx6aQQgWXnHl0Do0/kosaGsGxSkXrpiE44qPA9JkLLso Amkm4ORrcs9/S+zVyRZ8zmJBd7IDFK8wI6XwOOOE4DGUOWTXCZGr2OBJh9aSkB5cCsYRW+P1Wd8 YIzkvfi9pQwkKE7IJ8gQgmPv0lKU= X-Google-Smtp-Source: AGHT+IHk7apgOBEbpNDrQX+kIyNJw5Zn5ZedMFXm641PnrUGtrJsI06kSfqol/EVKw35daJOvaga7uwJItiMSiGfhTQ= X-Received: by 2002:a05:6902:1895:b0:e2b:dc5a:a409 with SMTP id 3f1490d57ef6-e2bdc5aa5eamr8056885276.41.1729600037469; Tue, 22 Oct 2024 05:27:17 -0700 (PDT) MIME-Version: 1.0 References: <20241021180820.48c7bffd@hermes.local> <282a31cf-7ccd-4de3-99b9-687287b20e24@huawei.com> In-Reply-To: <282a31cf-7ccd-4de3-99b9-687287b20e24@huawei.com> From: Isaac Boukris Date: Tue, 22 Oct 2024 15:27:05 +0300 Message-ID: Subject: Re: Use of strtok() in dpdk code To: fengchengwen Cc: Stephen Hemminger , Thomas Monjalon , dev@dpdk.org, "haijie1@huawei.com >> Jie Hai" , huangdengdui@huawei.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hi On Tue, Oct 22, 2024 at 9:51=E2=80=AFAM fengchengwen wrote: > > DPDK is just a SDK, it's not an application (although DPDK provided simpl= e examples). > Many code will developped based on DPDK, we can't predict how it was impl= emented. > So there maybe a DPDK thread and a application thread both invoke strtok(= ). I think even dpdk threads such as the telemetry ones might invoke (the same) strtok() at the same time. > From this point of view, I hope that DPDK solves some of the reentrant pr= oblems of > such C functions (e.g. strtok()\strerror()). > > Actually, we've try to solve before, but unfortunately it wasn't merged. > 1\ strtok(): https://inbox.dpdk.org/dev/20231114110006.91148-1-haijie1@= huawei.com/T/#u > 2\ strerror(): https://inbox.dpdk.org/dev/20231114123552.398072-1-huangde= ngdui@huawei.com/T/#u +1