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 E783345BA3; Tue, 22 Oct 2024 19:21:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A64F340298; Tue, 22 Oct 2024 19:21:04 +0200 (CEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id 7B82A40272 for ; Tue, 22 Oct 2024 19:21:02 +0200 (CEST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-20cbcd71012so53308965ad.3 for ; Tue, 22 Oct 2024 10:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729617661; x=1730222461; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=fmaSvw7IjqefDbAAuPnC5BClOduGBFmzbDUeySjkgLE=; b=YCL5aXs9qH2We+ktQo0zcoMe+sD1GfEn2Pb61Tca93f2pSebiCnvNy0xZ4YUJF7Vsc v16DNXDqCixBFWEWEvxt8rpui4ysH3Ysuy43kHZFhxC4deWtcePUg1xa9lVbkBTzjJ8z 0+RiaGeVOx6KIsDBIvgZZ4rPh2FtR0l7eoZrdlf/mg2i5QQ2g5NyjmyquzgZRUET2lx6 HX7ANr2EUPithw+bNkWwlN7atqBMDzNKvzJtW9uZyIdilRyJ/jwNe+W/j07Jgyf0O/nV TY6RjRR7cVbE+koM9vZJIE9VXEMJ72dmqf5BPzmggkePlXArXv4QSgzhA7ABMl9JBJS1 R2rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729617661; x=1730222461; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fmaSvw7IjqefDbAAuPnC5BClOduGBFmzbDUeySjkgLE=; b=F9LHnIGm2WetNZ8O9uDlKZszoOpXa9CDdQfY2Ce4ns6AJ95UNB9eU74W85E1YIOVP3 Wiu2zI7wmJNhk7l2/a8OIcZNWCXk+UxGEc+MyYH98dGgL087r6TVNX9bZAv6PJs9Ivpm iwQUEP0h4LevEPcTX260RgZpNe6chSaTNCs0+2bRAM2+/BjmVTwVYwAs+rRz8qOBICCP j3mQyIE+ugNkW5EQl6cqDRerVA81suUoKRve1SX87Uwue1fi4+8YjwTHqP8U6tU2PiSb 4i9PNCgy1hU2ic8i2q5+S4jSUw4tx8iyEJ5Ug7BemcIKdR4j5RNDvGZeJes9KuCcjZWs Xcbg== X-Gm-Message-State: AOJu0YzosNPS99GK0zpd/JxYbrFjh/S3OUJi9ThNqOh3zTGITi21H4f1 R7NyFUtY6xPx4wZCFhTA4zQrlh/gsRLG2xzGsTK6klNmqPXw4q1D5nEm1ZvQhwA= X-Google-Smtp-Source: AGHT+IF0AOtQ+jQxzw9ie3DNKSyry7vqvjTwwRnRcsXc1cBg4nDRoIXME6hxNMMTylL+qxRT356Qsg== X-Received: by 2002:a17:903:2306:b0:20b:6918:30b5 with SMTP id d9443c01a7336-20f543aa6a1mr2015345ad.41.1729617661577; Tue, 22 Oct 2024 10:21:01 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20e7f0c0e4fsm45079655ad.174.2024.10.22.10.21.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 10:21:01 -0700 (PDT) Date: Tue, 22 Oct 2024 10:20:59 -0700 From: Stephen Hemminger To: Serhii Iliushyk Cc: dev@dpdk.org, mko-plv@napatech.com, ckm@napatech.com, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@amd.com Subject: Re: [PATCH v2 08/73] net/ntnic: add create/destroy implementation for NT flows Message-ID: <20241022102059.40059fbb@hermes.local> In-Reply-To: <20241022165541.3186140-9-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241022165541.3186140-1-sil-plv@napatech.com> <20241022165541.3186140-9-sil-plv@napatech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Tue, 22 Oct 2024 18:54:25 +0200 Serhii Iliushyk wrote: > diff --git a/drivers/net/ntnic/include/flow_api.h b/drivers/net/ntnic/include/flow_api.h > index 748da89262..667dad6d5f 100644 > --- a/drivers/net/ntnic/include/flow_api.h > +++ b/drivers/net/ntnic/include/flow_api.h > @@ -68,6 +68,9 @@ struct flow_nic_dev { > uint32_t flow_unique_id_counter; > /* linked list of all flows created on this NIC */ > struct flow_handle *flow_base; > + /* linked list of all FLM flows created on this NIC */ > + struct flow_handle *flow_base_flm; > + pthread_mutex_t flow_mtx; Use of pthread_mutex makes the driver unportable to Windows, and will block the the thread in case of contention. And it will not handle the case of primary/secondary process. Prefer use of DPDK spinlock if possible.