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 2132A4649F for ; Fri, 28 Mar 2025 09:20:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1973A4021E; Fri, 28 Mar 2025 09:20:33 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 4C4DF4021E for ; Fri, 28 Mar 2025 09:20:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743150031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lv6SbAQ/nXTdDonyk3oo1CA+sO/+CTB3OQsBJZXD9/M=; b=X6NR5Dv5URPckt5V+8A4JqqlgMnMIa54GG/ww0KQJjH8Y5eWDsHX6Hsbaq5a6I4IhjRahF nkg0BmUn+Q33h1ZPzgpA6yjHu1RtwJwmnm+Js9F7Uzsd/xA2XXQSMl8dm/K8sh0vMh71Wj ypUTt7Kgsd3AdCRwwdGw/c5eAyazNY8= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-627-bxKhnfBpNhuUbBUUEbFpkA-1; Fri, 28 Mar 2025 04:20:30 -0400 X-MC-Unique: bxKhnfBpNhuUbBUUEbFpkA-1 X-Mimecast-MFC-AGG-ID: bxKhnfBpNhuUbBUUEbFpkA_1743150029 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-54ac9c33f74so904664e87.1 for ; Fri, 28 Mar 2025 01:20:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743150029; x=1743754829; 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=lv6SbAQ/nXTdDonyk3oo1CA+sO/+CTB3OQsBJZXD9/M=; b=YckND8uv4UZYYjM1VAvzq2BLbchcCl3RlUwwgK5SHLRpXCNMRvbomVrBgu03le8nyl UI8vtwN7i7ztgDOkSSM0x033sBtvCySQ8+IUoUavOhtmLALGVowY3gA2siO6xTYLL6fk xv8mI2Vg4+SkxJJwqcycghT1Ph8QE1TcYt3R8CLnRELj29ENMRdzYbGP2l4BG3ap3i3p uI+FHS2wsQkxsVI9r3UBW2y9XRno850c3lzII3rf0GNBOs1+3fWTA5+h30slpfZU19xE gw/67b8Zy/IQ8DC5JQyLn2hlpPRZ5yJfGZjEGHlGNp3lsdBKlM5tXCIM8K3HsJJz4JSi Fgkg== X-Forwarded-Encrypted: i=1; AJvYcCXLmLn9mpChXf/xU1LcwpU3WSgo20kD1AxW4JZGDsK0swwL7Jt6whzhva3YHP3lIuXPgmGJjj8=@dpdk.org X-Gm-Message-State: AOJu0YzUowGlE0Y+3FPyPoqXxQFksEP/c3/JuNLtxqk+lDDcxbtwErp0 EnKdo6fmVwE7wsObDuHCl/uCMPaIK+fl12Tmv4jehUXUXz0d7VXdNRW2xhP6nJk6uVfVQ18I7Mx H/c0OfiaO9PmUuUq9kU8ooerizi9agFWTRcOWlONqIcMVagHmcoMeCMQjen6sYHUexSo2gv5/UX Fsug48wfVz+MIagJXI0LU= X-Gm-Gg: ASbGncsZ1Ue+Ge58Pl8iIBfZCW8Z7Rmy7m84OCRnqRM3icrqnMnyNBNHygjnnxxnMpR ZyOy7eCfM6gyRsNPdhCyh8oR6Y++8g7sPQva6ctrS6sAn2A2vasBEMJmQjSxplXWRR7reDonwhM 0= X-Received: by 2002:a05:6512:5c2:b0:549:9606:adc0 with SMTP id 2adb3069b0e04-54b0acfa2a1mr447285e87.25.1743150028732; Fri, 28 Mar 2025 01:20:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFtW+tUozX3YAJ9Q0yTMshMTGXvETpCLoVtwINYD7VcylTI6tpy9cLhDndw4+cy/MwPase8yfszLjyfiP0RXdY= X-Received: by 2002:a05:6512:5c2:b0:549:9606:adc0 with SMTP id 2adb3069b0e04-54b0acfa2a1mr447270e87.25.1743150027988; Fri, 28 Mar 2025 01:20:27 -0700 (PDT) MIME-Version: 1.0 References: <20250326155230.1315056-1-bruce.richardson@intel.com> <20250327145202.2220153-1-bruce.richardson@intel.com> <20250327145202.2220153-6-bruce.richardson@intel.com> In-Reply-To: <20250327145202.2220153-6-bruce.richardson@intel.com> From: David Marchand Date: Fri, 28 Mar 2025 09:20:16 +0100 X-Gm-Features: AQ5f1Jrp6IH07xg5mOmUKWmQY5cx82Mao0p2i2zRRdBJy3s33y2WyK9HAqgZz88 Message-ID: Subject: Re: [PATCH v3 5/9] net/ixgbe/base: fix lock checker errors To: Bruce Richardson Cc: dev@dpdk.org, stable@dpdk.org, Anatoly Burakov , Vladimir Medvedkin , Jedrzej Jagielski , Stefan Wegrzyn , Piotr Kwapulinski X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: V5uXmCHh-PIhzciADo4fU9c4V5asHDtEnB7Zf28C-ow_1743150029 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Thu, Mar 27, 2025 at 3:53=E2=80=AFPM Bruce Richardson wrote: > > When building on FreeBSD, errors are reported in the base code by the > lock checker (-Wthread-safety). For example: > > ../drivers/net/intel/ixgbe/base/ixgbe_osdep.c:42:1: error: mutex 'lock->m= utex' is still held at the end of function [-Werror,-Wthread-safety-analysi= s] > 42 | } > | ^ > > These errors are due to the checker not recognising the lock wrapper > functions. We can avoid these errors by converting these functions into > macros. > > Fixes: 30b19d1b5c43 ("net/ixgbe/base: add definitions for E610") > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson This is the best solution, given that FreeBSD pthread is instrumented with clang thread safety annotations. As a sidenote, I don't see much value with the remaining malloc/calloc/free wrappers in this osdep.c file. I suspect this makes some other annotations non working. --=20 David Marchand