From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 70689A034C;
	Fri,  1 Jul 2022 19:04:36 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 21AD440A7D;
	Fri,  1 Jul 2022 19:04:36 +0200 (CEST)
Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com
 [209.85.215.174])
 by mails.dpdk.org (Postfix) with ESMTP id 1BC9140A7B
 for <dev@dpdk.org>; Fri,  1 Jul 2022 19:04:35 +0200 (CEST)
Received: by mail-pg1-f174.google.com with SMTP id s206so2933855pgs.3
 for <dev@dpdk.org>; Fri, 01 Jul 2022 10:04:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20210112.gappssmtp.com; s=20210112;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=Lfq++rI49+SOOmjlXUT2DhM+QpnmlZM7pehvH7oGZuo=;
 b=I+HEcLE/rYoIqxg6yzDPKSUIF+Y4lZcVEzIzNZN6IZIuhszX8BhRWalsyG3FIdfbbt
 2pxjigJAlYokVqJmuKaMNJgtP7LvPeAAkxEBNp2SNEgs2t6Rm8K5UzgtwlGvrclZkg2E
 EEQeljT9mZhsRvKDXSxjHCY7rDD6Wo/Fy8oKeOd6T2Bdwk1qTghOrAXAiDHL8kVqrYma
 AwyjPJR5IZ1F3UwEz1YoF+zYaBYyGwctyjL2Ew0BSPceKe9WkKZYXBMq2+XBwKvVf7lV
 5Azf9yV0B+XghRYqlwiDAjpRN8dB3/1uI/ELYdtWN+vIFvn/bYUK3naFbomQrx7zDi/+
 vh7w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=Lfq++rI49+SOOmjlXUT2DhM+QpnmlZM7pehvH7oGZuo=;
 b=dT/yGN3ss9Mc4HAAfE1Mp9XRS6Ys8C4L2Hv9x1EdZee/zY1jTy8sOS7++ARHfpS8FX
 M2IhQrx9IwGVh+geCkHrYJeKzCcYUqcGiosrg8Ddn8jbS/uIiO5v6g+OaDg5mPlkbAGp
 msfBxy9+dWn83JigYX/V4AGsYKcAz6sclI1+d/v3CZ6OOxEvW9dTMd/ZxJuiNv9dHu3k
 nrWQ7IqHTDhOEAm49U1GfMkmV3O48KIdzDubrkAHqRq5yIFm/oYtkAm3QpWb0CkLXZRD
 jndc8d8TkpPZmFGyLUZC8F4k8vd6VtjLFQR0s41VMfjVvW851wQrKqFvBoBJB6NxvsTd
 5JUQ==
X-Gm-Message-State: AJIora+7ZqI1WWaVozVSqgfhh5fYxMDLh4ZsmdRYtv1PaSdyiHKHzhqq
 T1NJS5FvimJjtH/nTegyq2yekA==
X-Google-Smtp-Source: AGRyM1te3ykfdcJDAfLgGF9OgBOCBozK0nnngmCeC545eODgTGM3cAFDfGvs4iyZQHtsJmRPosWSSg==
X-Received: by 2002:a63:7145:0:b0:40c:aac7:41de with SMTP id
 b5-20020a637145000000b0040caac741demr13204070pgn.490.1656695074221; 
 Fri, 01 Jul 2022 10:04:34 -0700 (PDT)
Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199])
 by smtp.gmail.com with ESMTPSA id
 w10-20020a17090a1b8a00b001ec7c8919f0sm4371081pjc.23.2022.07.01.10.04.33
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 01 Jul 2022 10:04:33 -0700 (PDT)
Date: Fri, 1 Jul 2022 10:04:30 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: Morten =?UTF-8?B?QnLDuHJ1cA==?= <mb@smartsharesystems.com>
Cc: "Emil Berg" <emil.berg@ericsson.com>, <bruce.richardson@intel.com>,
 <dev@dpdk.org>, <stable@dpdk.org>, <bugzilla@dpdk.org>,
 <hofors@lysator.liu.se>, <olivier.matz@6wind.com>
Subject: Re: [PATCH v4] net: fix checksum with unaligned buffer
Message-ID: <20220701100430.1f94306b@hermes.local>
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D8719E@smartserver.smartshare.dk>
References: <98CBD80474FA8B44BF855DF32C47DC35D87139@smartserver.smartshare.dk>
 <20220623123900.38283-1-mb@smartsharesystems.com>
 <20220630104545.55d4e870@hermes.local>
 <AM8PR07MB7666AD7BF7B780CC5062C14598BD9@AM8PR07MB7666.eurprd07.prod.outlook.com>
 <98CBD80474FA8B44BF855DF32C47DC35D8719E@smartserver.smartshare.dk>
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Fri, 1 Jul 2022 18:50:34 +0200
Morten Br=C3=B8rup <mb@smartsharesystems.com> wrote:

> But I guess it is something else.
>=20
> Anyway, this function has ugly alignment problems (also before the patch)=
, and has gone through a couple of iterations to silence warnings from the =
compiler. These warnings should have been addressed instead of silenced. Ma=
ttias has suggested a far better solution [2] than mine, which also correct=
ly addresses the compiler alignment warnings, so we will probably end up wi=
th his solution instead.
>=20
> [2] http://inbox.dpdk.org/dev/AM8PR07MB7666AD7BF7B780CC5062C14598BD9@AM8P=
R07MB7666.eurprd07.prod.outlook.com/T/#m1a76490541fce4a85b12d9390f2f4fac5a9=
f4660
>=20


Maybe some mix of the memcpy for unaligned and odd length and faster (unrol=
led?) version for the case of aligned and exact multiple?
Or just take code from FreeBSD?