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 924D243BE5; Mon, 26 Feb 2024 09:34:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7AF03402BF; Mon, 26 Feb 2024 09:34:32 +0100 (CET) Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) by mails.dpdk.org (Postfix) with ESMTP id E854640144 for ; Mon, 26 Feb 2024 09:34:30 +0100 (CET) Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-42e5e16559cso19652141cf.0 for ; Mon, 26 Feb 2024 00:34:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708936470; x=1709541270; 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=rPkyUS38mhTxUHtY3Tqr6JkgUVIAOb5swETk+vibX+Q=; b=fih2VgZLAvYdi50Uc5802hgJAHDAmh6oPuqEeg8Vo14/Ubd78Dz5jVOTGa5wiSopt4 b6oYC1IRuiCIG3G9VYrdxhZKRxVpan74fn+yoO0UUBhhbAKQaMbGBa7vjdpLsOzAYb8j q5HkwbfyJIuh6DvKb+3oU3EEMkEf5ML8OSfOO2FmJ5Ff6aSTXb4pc5bCJEK1X7yBhKBP pqrwOU4IS0un5MU4RVdint4JbX/6Xdglxt+LXXlBXepb3jTFrvanpDGI3j6oJtDP/vAU HIm2/oUjf82iTvfA1CZiGMYoaftPe0l7yPaZ5+ztWbHNY36H3SdGNRskS0vdDx8IEjbC zvGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708936470; x=1709541270; 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=rPkyUS38mhTxUHtY3Tqr6JkgUVIAOb5swETk+vibX+Q=; b=CUbmEwu+iFGNa84CKubBPSquoanph3skOqnhv+4lgre9fjsamCha5c8T+mwi1yBB71 VQU/9xXLGAZfz9yGXXNuJ/CM19agVZBsq8FFI1k2C7Hj8nekqDZzq5qAag7cQOauBomG +b/RHqGqv5ReIOSJZSLwzt/ylNOvzAUi410S7eW2TnEfcnNothTVnAJVycqzFn65TDuV j63VVl5LID2Zt6cI4WpUQSkSsZU/t9qlfdyIepSqBxV+646Z8/lhOZDO6N1fDf2mYSMA 7pgcogUcPSaAEaphXfP+C3/o6Aumif+gnR+VhC0x7TDp0fEvTD5OTp70r1ZSBRVXx42A bzFQ== X-Forwarded-Encrypted: i=1; AJvYcCUBV0k3eH+kfsMFxABvkKg7EinOQBTK6bVbyoN0QZ6shEle+hqxS9/NYYYgZem6boAde6DG43p3qtyFhAA= X-Gm-Message-State: AOJu0Yy5h9X6k6J1D/vynQeyumz1sU8mtAklIG3pcA/CMH1rvidOijwA XrQw2r4Q7nVJ1TAD4VfIAzUzD158SnPp1QVaBEyx2na0kmiK/onP1QBaTfnGCKzbgpO5O9hK1jC OR2bfzy6mkuTIQ6pqMJeKT+BdE2E4iJie/ys= X-Google-Smtp-Source: AGHT+IGnWIvTrJPzbOrrHYznUtbbDGDwxQf43+mT8Ay3/0h11aWPKbBb0X4kA+a8qUCbceQeTjH43W07espTDB+lZi8= X-Received: by 2002:a05:622a:20c:b0:42e:694d:9acd with SMTP id b12-20020a05622a020c00b0042e694d9acdmr7611353qtx.41.1708936470213; Mon, 26 Feb 2024 00:34:30 -0800 (PST) MIME-Version: 1.0 References: <20240223140056.130844-1-mb@smartsharesystems.com> In-Reply-To: <20240223140056.130844-1-mb@smartsharesystems.com> From: Jerin Jacob Date: Mon, 26 Feb 2024 14:04:04 +0530 Message-ID: Subject: Re: [PATCH v9] net/bnx2x: fix warnings about rte_memcpy lengths To: =?UTF-8?Q?Morten_Br=C3=B8rup?= Cc: julien_dpdk@jaube.fr, dev@dpdk.org, stephen@networkplumber.org, rmody@marvell.com, shshaikh@marvell.com, palok@marvell.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 On Fri, Feb 23, 2024 at 7:30=E2=80=AFPM Morten Br=C3=B8rup wrote: > > Bugfix: The vlan in the bulletin does not contain a VLAN header, only the > VLAN ID, so only copy 2 byte, not 4. The target structure has padding > after the field, so copying 2 byte too many is effectively harmless. > There is no need to backport this patch. > > Use RTE_PTR_ADD where copying arrays to the offset of a first field in a > structure holding multiple fields, to avoid compiler warnings with > decorated rte_memcpy. > > Bugzilla ID: 1146 > > Fixes: 540a211084a7695a1c7bc43068934c140d6989be ("bnx2x: driver core") > Cc: stephen@networkplumber.org > Cc: rmody@marvell.com > Cc: shshaikh@marvell.com > Cc: palok@marvell.com > > Signed-off-by: Morten Br=C3=B8rup > Acked-by: Devendra Singh Rawat > --- > v9: > * Fix checkpatch warning about spaces. Fixed the following issues[1] and updated the git commit as follows and applied to dpdk-next-net-mrvl/for-main. Thanks net/bnx2x: fix warnings about memcpy lengths The vlan in the bulletin does not contain a VLAN header, only the VLAN ID, so only copy 2 byte, not 4. The target structure has padding after the field, so copying 2 byte too many is effectively harmless. Fix it by using generic memcpy version instead of specialized rte version as it not used in fast path. Also, Use RTE_PTR_ADD where copying arrays to the offset of a first fie= ld in a structure holding multiple fields, to avoid compiler warnings with decorated memcpy. Bugzilla ID: 1146 Fixes: 540a211084a7 ("bnx2x: driver core") Cc: stable@dpdk.org Signed-off-by: Morten Br=C3=B8rup Acked-by: Devendra Singh Rawat [1] Wrong headline format: net/bnx2x: fix warnings about rte_memcpy lengths Wrong tag: Bugfix: The vlan in the bulletin does not contain a VLAN header, only the Is it candidate for Cc: stable@dpdk.org backport? net/bnx2x: fix warnings about rte_memcpy lengths Invalid patch(es) found - checked 1 patch check-git-log failed ### [PATCH] net/bnx2x: fix warnings about rte_memcpy lengths WARNING:BAD_FIXES_TAG: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("")' - ie: 'Fixes: 540a211084a7 ("bnx2x: driver core")' #20: Fixes: 540a211084a7695a1c7bc43068934c140d6989be ("bnx2x: driver core") total: 0 errors, 1 warnings, 0 checks, 76 lines checked 0/1 valid patch checkpatch failed