Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp306673pxp; Wed, 9 Mar 2022 03:27:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7w92jq0TrFDyl6ryy+OkCIn83c2SJgI1fSz3WhkbKkCsxpTHXq8yaqjh7s9+31S0vJ46X X-Received: by 2002:a17:907:629a:b0:6d7:b33e:43f4 with SMTP id nd26-20020a170907629a00b006d7b33e43f4mr17522801ejc.149.1646825243608; Wed, 09 Mar 2022 03:27:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646825243; cv=none; d=google.com; s=arc-20160816; b=BYov2QZaolrjDgRJ2YncXcgYhC/JXc0FCuQFS0t3IksRL53Ud4kqEwZWWJOVCpeS78 MW8ZGpCt7Spli1J+CE+bPtQlG/C/sWTKnJbPlXxVb9C0jN1GXRjNP1YF5VjToM0I+6/k LCwmcXY0XHOLe3TLPRUE1bXySr5ovzpEE+KPd6cS3EaAiqb2EgoB8WLMTgShryHi6FFS dkKJyfUrwtLu5iQyKqy2fsbvGHjmPMRo6RHgsKwvIhlyYT/3ANeIB3DXwV+kNhqReJVn KF/k4YarN2vUp9U3MiHrLF0bTUADC+EbtCbSrXF8AumDDY44lgpDlFl3OFNI2JWV2NoR tSqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=DWve8mUzjjNi/DaGPnOk7W3TtiB3wUxX/ugKfBnsP20=; b=SMS0XKdz6bx9fNqP+jwmwhe/qp9hNF50L0aQXbaRIlvVEgZMYTlRZAiMbsCPpTmlB+ KEvF8DlnadIixVwkqMbviM1rrYjMI4bSFSAYrqv38In2b0GqW4MIk9FIqmUCe3u4pWve t1/Mmfl9nV1nePZ0cNkbEDy64a7nTHZYmXB58cWG4TvHTDuAblOGEsanclHOylAOUzLh fbX1rOGJuWZKAbFg6I39dj7KtBdZGz3uZwDkCyjj0YFblcjUVkSbtOJkyWO5szZ/fpq7 rvLWreQ5hU8aAviQN4SmZcHhC+eEwg28+y6JnX3Fi+R4nLYBerHKQIrvzk1eA8llPeJP IsDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=gPQuIz9S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p22-20020a056402045600b00412982a1c2csi1010746edw.481.2022.03.09.03.27.00; Wed, 09 Mar 2022 03:27:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=gPQuIz9S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231889AbiCIJOg (ORCPT + 99 others); Wed, 9 Mar 2022 04:14:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231425AbiCIJOf (ORCPT ); Wed, 9 Mar 2022 04:14:35 -0500 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAC70D54 for ; Wed, 9 Mar 2022 01:13:35 -0800 (PST) Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 819E03F4C2 for ; Wed, 9 Mar 2022 09:13:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1646817214; bh=DWve8mUzjjNi/DaGPnOk7W3TtiB3wUxX/ugKfBnsP20=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gPQuIz9S15FrfE4hSaPrPJ7ItBAJ2RWh5SR6aH79lK4NBe5WsLG9yJTDzltEa76B6 +pT2NImiu8nv6da4yL3rWaQRz0BAAx541W1YJ0afdbnGraBIEulxs94FKyRBDlXMN3 VZG9XgzXTJ+zg67yANpDvP2ivjQQ68rX+nV+9S1C9mcE4IkggPN8LGkR58tTd7NGSl FKNOOglFSheu20xek9NIUGTBcFoZnp/iDgmuwEAvssJqoRAXMYeKUmCnfcu9ku4Dkf bH7cNdcgy/oBWNM9SjL4msOJKBl/AByoNmIOrmoIhTUP5cQdC/Ui6dXUSBmT5HItn5 USEqszgErdZ0A== Received: by mail-ej1-f69.google.com with SMTP id k21-20020a1709063e1500b006d0777c06d6so975408eji.1 for ; Wed, 09 Mar 2022 01:13:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=DWve8mUzjjNi/DaGPnOk7W3TtiB3wUxX/ugKfBnsP20=; b=5T5GNoejQMbrGtnuexqdcFfGnogW+mn+qZ4Vn0/772O3h7QDCD1mU8TyjtgnTbr0Dg QOYzMe2MNSCKdRPny6wG17uPixFmzlN+ucI2m4zGALXe/He/vSxV3x/k2fA2Shcki4/0 rXTWdIECIU4AAAagBL51gY2uIFWJfWfwZ+S/x9RPlE7tikfU+901LS8jecUL4ro9iAW7 iDad6q4Gi7uayj6WrNsRolVpb9QKfvUfI464MD0AqBN/NhUnh08mirSdKsBf78jSM6FJ xxP2/hUmj8TDcW4Ps5PiSd9thDacph9x5bj6BedXW6yUWrFwZh+mJkXGMd81RukMlhf3 GiMA== X-Gm-Message-State: AOAM532YVQgpg6C7nVqnRCfX09JxcBChAPmS5xKAuVSfCg+ErdDBdmb/ 1znieNXSofm9DIOfc9Kx7qRFomSH/xs+8NNZB79is3NDEpTTuUU8/2RE5ZethkEx4Y44+Qzb3Uq 34RmRcmIv/I3wZEbe25oURozoRFpw2PXKaafX2ThbBg== X-Received: by 2002:a17:907:7849:b0:6d5:87bd:5602 with SMTP id lb9-20020a170907784900b006d587bd5602mr16471507ejc.349.1646817214166; Wed, 09 Mar 2022 01:13:34 -0800 (PST) X-Received: by 2002:a17:907:7849:b0:6d5:87bd:5602 with SMTP id lb9-20020a170907784900b006d587bd5602mr16471490ejc.349.1646817213950; Wed, 09 Mar 2022 01:13:33 -0800 (PST) Received: from [192.168.68.108] (p5087f509.dip0.t-ipconnect.de. [80.135.245.9]) by smtp.gmail.com with ESMTPSA id k3-20020a05640212c300b0041605b2d9c1sm513258edx.58.2022.03.09.01.13.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Mar 2022 01:13:33 -0800 (PST) Message-ID: <8e6684df-7b6e-ccb5-b123-2dc8337442bd@canonical.com> Date: Wed, 9 Mar 2022 10:13:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] net: netdevsim: fix byte order on ipsec debugfs file Content-Language: en-US To: Jakub Kicinski Cc: davem@davemloft.net, shuah@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20220308135106.890270-1-kleber.souza@canonical.com> <20220308215851.397817bd@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: Kleber Souza In-Reply-To: <20220308215851.397817bd@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.03.22 06:58, Jakub Kicinski wrote: > On Tue, 8 Mar 2022 14:51:06 +0100 Kleber Sacilotto de Souza wrote: >> When adding a new xfrm state, the data provided via struct xfrm_state >> is stored in network byte order. This needs to be taken into >> consideration when exporting the SAs data to userspace via debugfs, >> otherwise the content will depend on the system endianness. Fix this by >> converting all multi-byte fields from network to host order. >> >> Also fix the selftest script which was expecting the data as exported by >> a little-endian system, which was inverted. >> >> Fixes: 7699353da875 ("netdevsim: add ipsec offload testing") >> Fixes: 2766a11161cc ("selftests: rtnetlink: add ipsec offload API test") >> Signed-off-by: Kleber Sacilotto de Souza > > Then the struct members need to have the correct types, > as is this patch adds sparse warnings (build with C=1). Hi Jakub, Thank you for the review. I'll fix it and send a v2 shortly. Kleber