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 BFBB745AFB; Thu, 10 Oct 2024 00:01:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 83B9040156; Thu, 10 Oct 2024 00:01:27 +0200 (CEST) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id D9802400D6 for ; Thu, 10 Oct 2024 00:01:26 +0200 (CEST) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-71df4620966so269782b3a.0 for ; Wed, 09 Oct 2024 15:01:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728511286; x=1729116086; 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=FT8x2h8u/5wyrYtpX3FPeKf1aeT9wNcLS+gAKpNC51M=; b=KlUOdSW37GXXoMV7eAEIHLyANp98WvzGlh1fAszYCbEoYhTrwChW+0ZLt6TGaGTprh N8g/panSnkcbfIbkG+dg7jwaiHZzGRpM75/h5czizAJE66XOE7NXYDeIVuMqSwFNLB37 17YUdezFl0LjopppQ1LHCuyr/czQCkKvt0cJnhN+/8XlyBSUkeGA0CiKbAjhsqyeEnIs ST1KbfXZPSZ9k0/KZkyZBj28TDcCk/1438efas02pll54wMejfS4q5rB55s6V2S2hmRY ScyK2uxov8qClloJYT7YkvjOl0aPPyKb2BqPGRTxchr7b3VHLzA8Lnn2JVVmqbIb5jo8 lQXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728511286; x=1729116086; 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=FT8x2h8u/5wyrYtpX3FPeKf1aeT9wNcLS+gAKpNC51M=; b=StoxSwB7iZZhN0c9MCCoTpzRKC0cRhi84hnjaUxCOeDtzKmvZjACsw9H66itgiGGf0 Jy2jSDXyWyq2Kpds35/+7VnNZhK9TCNFcxOdI+4d85UlFCiN+fytkm+ZUTOo4i6+7A0S yFdzrLZkDfhy+QNp4EZcOsAMf4nhQ3oNI38trMQzkMdGwywsddH3TVhL/vZU3n6JNcyZ GnEKIIAvWb4SMUEb6u0qthBZZc7SPlSkg4tBkXXTAxYmdMDy2tHNe9rZRGRhlFHk/SWF PpjQw86fdTr4iJLUiAt6s4RkfiKcjDtjsGTHDZr6mic7wN9A2cer2B+SP3jyVnyJtLXA +83g== X-Gm-Message-State: AOJu0YwZW6ENrIqZSqrsApEuoFboX1XMfM/yKmCbd/XJ0erxKT+oN4sZ Wyk3Z5mab1NMZd7QM+ltRvPGUttiAEQqg4eAIVjsXB1Rt+ev0inVFXyAkq9pOEA= X-Google-Smtp-Source: AGHT+IGyRQDAo5TtEBCV64CmqB27D6J0jy2tdG5HeLxrLcXPfJcG8T8IvEZJxDNPhzw+E4P451Odaw== X-Received: by 2002:a05:6a00:1408:b0:714:2198:26bd with SMTP id d2e1a72fcca58-71e1db7ab37mr6751515b3a.11.1728511285691; Wed, 09 Oct 2024 15:01:25 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71df0d4533csm8236601b3a.129.2024.10.09.15.01.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 15:01:25 -0700 (PDT) Date: Wed, 9 Oct 2024 15:01:23 -0700 From: Stephen Hemminger To: Mattias =?UTF-8?B?UsO2bm5ibG9t?= Cc: , Mattias =?UTF-8?B?UsO2bm5ibG9t?= , Morten =?UTF-8?B?QnLDuHJ1cA==?= , David Marchand , Pavan Nikhilesh , Bruce Richardson Subject: Re: [PATCH v6 1/7] event/dlb2: include headers for vector and memory copy APIs Message-ID: <20241009150123.5a2918ca@hermes.local> In-Reply-To: <20240920102716.738940-2-mattias.ronnblom@ericsson.com> References: <20240724075357.546248-2-mattias.ronnblom@ericsson.com> <20240920102716.738940-1-mattias.ronnblom@ericsson.com> <20240920102716.738940-2-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 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 On Fri, 20 Sep 2024 12:27:10 +0200 Mattias R=C3=B6nnblom wrote: > The DLB2 PMD depended on being included as a side-effect > of being included. >=20 > In addition, DLB2 used rte_memcpy() but did not include , > but rather depended on other include files to do so. >=20 > This patch addresses both of those issues. >=20 > Signed-off-by: Mattias R=C3=B6nnblom > Acked-by: Bruce Richardson Have to ask, why is it using rte_memcpy when it could just assignment. Assignment is better since it keeps type safety. diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c index c43ab864ca..51870486ed 100644 --- a/drivers/event/dlb2/dlb2.c +++ b/drivers/event/dlb2/dlb2.c @@ -1668,7 +1668,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2, qm_port->issued_releases =3D 0; =20 /* Save config message too. */ - rte_memcpy(&qm_port->cfg.ldb, &cfg, sizeof(qm_port->cfg.ldb)); + qm_port->cfg.ldb =3D cfg; =20 /* update state */ qm_port->state =3D PORT_STARTED; /* enabled at create time */ @@ -1869,7 +1869,7 @@ dlb2_hw_create_dir_port(struct dlb2_eventdev *dlb2, qm_port->issued_releases =3D 0; =20 /* Save config message too. */ - rte_memcpy(&qm_port->cfg.dir, &cfg, sizeof(qm_port->cfg.dir)); + qm_port->cfg.dir =3D cfg; =20 /* update state */ qm_port->state =3D PORT_STARTED; /* enabled at create time */