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 6523A46B7E for ; Tue, 15 Jul 2025 13:57:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 325324021E; Tue, 15 Jul 2025 13:57:45 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 898884021E for ; Tue, 15 Jul 2025 13:57:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752580663; 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=XcK/mgZtID6CAfrmSyCEJJwclrJdkC/OmPjWs8KbwWs=; b=i/+R7S4TzWdmk9/z+GpDLW5TfRO6AtG32stvsy8TGQ+413hpkKokp2UMLODfVElmp8WzTI Xuv5JR1aLXQn4moQ7noiwG+ESF2pDa5v44nb1W9LMgojlxXcoEXCbnm0kbRvxXWxK8gkXT sFtqBGDYNd44oQE737roGrN6W6QQEtA= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-60--NdjF9SLNRWcgbSyfh9LUg-1; Tue, 15 Jul 2025 07:57:41 -0400 X-MC-Unique: -NdjF9SLNRWcgbSyfh9LUg-1 X-Mimecast-MFC-AGG-ID: -NdjF9SLNRWcgbSyfh9LUg_1752580660 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-32b30ead2fbso23543561fa.3 for ; Tue, 15 Jul 2025 04:57:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752580660; x=1753185460; 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=XcK/mgZtID6CAfrmSyCEJJwclrJdkC/OmPjWs8KbwWs=; b=Ee1IwjC7DmEigIERqkehdviPK4LU5By77bnJEGEE8dWMsIyYdrj7t29/g6e0iP7hQt OiBN4dh7byHsRAv6LOuj+ZZXROt+Jlj3Oovud+FsRbSLy8IpNRfKGXEIHGLg0gc8+pw5 0c+jhfBwhdFOsQDKrZkVHIrs/S3qVN1dQL03B3IHndLzfCEP5ytu7f/K/4mlrmsiBXJa to+7hQaHhwGHkd0AfP/bkQXJ8/bcljAWSB95Pr01fo1R/qctDyS0vzqxHvnIvTCQoIaN iG8o4do0Gf3Wey/rPBK6z2vZD79f+YM601UDYdtzcAe5nyxqtT4ea/dkeGUNrfZV8q4j Zhdg== X-Forwarded-Encrypted: i=1; AJvYcCUCeA83rko0WwtbOAeofygwX2ohKQP1dI3HXNxAdef5t9THw94ofmgPG28i4DM1v6JyXxf3d/Q=@dpdk.org X-Gm-Message-State: AOJu0YwR7yZzFK0go3xQGKGP7MvAcgCa9KcDwZKEse/HOiTPIE54+bzZ LluNFzIXztWnMarKij4b+BGUxKwD7srnHlCVcIV57RwSN/HnfXCaaBhwXTh/6/Ls7+WuS9sDwv/ UxEFfcXUVnQXrXHSkfqowX/5opfdG6aLEDXaY2dK9fp5aEufKVRnhSXsIzLCk7LGsfWnAM1PsKH UCTbO25aDUFTkrKZp9E0pNVks= X-Gm-Gg: ASbGncuSCK7vreeJTAv6UUw7GY96roR7hAKEkRovyHSdWUcKIz2XUR846zr59SavUou 8rcTbhkxe4L+qozw+xd+BqtA8LCtia9AsgO/WdA6AAY+6Kzgpj5byF5rKlNY/pj8/V6AhtGl8Bp DoI/Lcwp1SmEN0Sf8aHz0g6dg= X-Received: by 2002:a05:651c:111b:b0:32a:6b23:d3cc with SMTP id 38308e7fff4ca-3305341163emr53823841fa.25.1752580659957; Tue, 15 Jul 2025 04:57:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFvCfoDtZ3+cCMd9yF0ifL10ggMZ9lg0A1wwT8pZwWauIr0sjQDnQiTvwLga0S10joicvLHKg+92bhkzCV/gBQ= X-Received: by 2002:a05:651c:111b:b0:32a:6b23:d3cc with SMTP id 38308e7fff4ca-3305341163emr53823701fa.25.1752580659525; Tue, 15 Jul 2025 04:57:39 -0700 (PDT) MIME-Version: 1.0 References: <20250619071037.37325-1-david.marchand@redhat.com> <20250623135242.461965-1-david.marchand@redhat.com> <20250623135242.461965-9-david.marchand@redhat.com> <70c7ba78c4324495bfd317e38e926958@huawei.com> In-Reply-To: From: David Marchand Date: Tue, 15 Jul 2025 13:57:28 +0200 X-Gm-Features: Ac12FXzmxcgHNE4eHQYotW579qIEuQd0up0PNJQiMQtUEzN4WaRukDw_6Yfo-Dg Message-ID: Subject: Re: [PATCH v2 08/10] hash: fix unaligned access in predictable RSS To: Konstantin Ananyev Cc: "dev@dpdk.org" , "stable@dpdk.org" , Yipeng Wang , Sameh Gobriel , Bruce Richardson , Vladimir Medvedkin , John McNamara X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Y0SEIsSc-M_Nir2ZZVGDc2TrP28qTMVUPCOMy9SdDLc_1752580660 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 Tue, Jul 8, 2025 at 7:58=E2=80=AFPM Konstantin Ananyev wrote: > > > Just wonder do you guys consider it as a real one? > > > AFAIK, all architectures that we care about do support unaligned load= for 32-bit integers. > > > > Well this is undefined behavior, regardless of what the architecture su= pport. > > And the compiler may end up generating wrong code. > > Probably, though AFAIK, we do have a lot of code that load 32-bit values = from possibly > non-aligned addresses (nearly all packet parsing does that). > I wonder why it only complained only about that one? Probably because unit tests coverage is (too) small. > BTW, would our 'unaligned_uint32_t' type help here? Since most DPDK code rely on aligned types, using an unaligned type can work if we have a function that serves as a conversion from unaligned to aligned types. In this code, since the next operation is a byte swap operation on 32bits, I don't think we have many option but to memcpy(). --=20 David Marchand