Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3181158pxb; Fri, 12 Feb 2021 11:12:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwyaO7ieaE72zFiGgAJbCXKJCucqy891nHdg2axGkFiAHBJFkCcdgXHr577Y6bTu0JxO7dC X-Received: by 2002:a17:906:22c9:: with SMTP id q9mr2480526eja.93.1613157130837; Fri, 12 Feb 2021 11:12:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613157130; cv=none; d=google.com; s=arc-20160816; b=r2oy2c1qWF91fPpSUA+8ZGYFQjdVRiKDmxNcm41kerLebPpSn2BgUYy674hC+noOsP jOdsC6AdTXERyt+CXDsutvowxLXU2IhK7eXDPv34JKqyfuEOJdH+yo8w1vgWUuIjnBYj nJQZ3fswpZEfJjZe0YQVxK7gN0PyePIiAlsiTAYj4JBvqeniVPWCWaxgz/o5Xjgm7A9Q e0BD3ejJMXa3v0JaiSA7rNd232ExFcJ2FmhmNN3LvBzs90nxIqYPWB/vCTOjGe09SNE/ CKBkf8EsUnzj/RFaXgsrGD+shxyWCgLBgy/zSrXX6ypZ8ag9F5ZSf8xy1swbk1noDTdO HA2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=41R6qCDY/8NfbYuCG9FTh5tckGwo/C1ROCg7V+WW60I=; b=IPTTlWk7gmHoF+uFxU0ORokyructTxFRNBNMpgza/2H+nxle9XPNOCg5U4ljXuE+Z2 V3va2zG/tgLvTR/OpxOapLthfxtietrWfeo1rjDjSVkyN/z57WqkjT84mAw5xZOawflz 6YMSY7KZvt2X2nw9VZwmuZ1m6QcwDweudJAWNJEni88IRifrgG4Hqdwym05Rs9J2WOtS pecGWD+Sh6K1B7KWZQPnbl4q/3r8LGMvkwleG0drz2nXC2EcIeeUs4JJHnNt89ArRchM /jODT6hl8uUBhpq/ZkkTvWSttDUbi/gevQoPNIvdQ7fUSXXwnNCJd9deaZie4S7EehQB u14w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=OaT7xFwB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu13si6597577ejb.588.2021.02.12.11.11.47; Fri, 12 Feb 2021 11:12:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=OaT7xFwB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231513AbhBLTIg (ORCPT + 99 others); Fri, 12 Feb 2021 14:08:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231290AbhBLTId (ORCPT ); Fri, 12 Feb 2021 14:08:33 -0500 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91ECBC0613D6 for ; Fri, 12 Feb 2021 11:06:58 -0800 (PST) Received: by mail-il1-x136.google.com with SMTP id z18so142746ile.9 for ; Fri, 12 Feb 2021 11:06:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=41R6qCDY/8NfbYuCG9FTh5tckGwo/C1ROCg7V+WW60I=; b=OaT7xFwBOZ0+5R5EzoiY52m0tMQujyW6KpViVkm/xpfriImjxyevrCWMW60cglSXgx Sw2R9nNDnUMALq9grjb6+lviTsauWlQa+PgW5PGMpnFB6wHKq02Dh+uB1CHUYjKfJypV qwJpTcmdeP+hJ8m2VrybqYdmnzrVbhW5hxhrc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=41R6qCDY/8NfbYuCG9FTh5tckGwo/C1ROCg7V+WW60I=; b=qUrdxwgwpX/QP9A/J9ym560/ohFa2oGLTKIJVPVW9yVqdVqAfW4Zg7GzU5afaWV4NZ UQe/eUzeXW5wBx+Zm0djH/f2/Dev4xGLfnnfj2TEn4FtoBtxhg7YDD5ump0/vOKiA2+o WI8fioVhyqlBy0oZ860YBe153SVM843nsqHIeFLqyurr5HTRz+pRhUJo8++mc37W6JWu GEhRtzKVodwzADhbKSE8m/nzf4+wG8Er7+buk19TJ46LWI69zX9JITywg7aPPJijcPdh gnifiCXsFU1KIc8G4nL1vL+KSyeHwRC0F1naEzjeb7zgPHUTEyOBTD7iQdbOa6UpE1Y0 qalw== X-Gm-Message-State: AOAM531tsSh6ukQOOElZQru3CvGCGYtOP67pJex+dxpv0UXNfZzjj3pN xdx8PYP2w6aTiJesANrlspPvFHbLSqoVkg== X-Received: by 2002:a92:d351:: with SMTP id a17mr3455278ilh.59.1613156817784; Fri, 12 Feb 2021 11:06:57 -0800 (PST) Received: from [172.22.22.4] (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.googlemail.com with ESMTPSA id e9sm4470134iob.43.2021.02.12.11.06.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Feb 2021 11:06:57 -0800 (PST) Subject: Re: [PATCH 2/3] net:ethernet:rmnet:Support for downlink MAPv5 csum offload To: Jakub Kicinski Cc: Sharath Chandra Vurukala , davem@davemloft.net, elder@kernel.org, cpratapa@codeaurora.org, subashab@codeaurora.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1613079324-20166-1-git-send-email-sharathv@codeaurora.org> <1613079324-20166-3-git-send-email-sharathv@codeaurora.org> <20210211180459.500654b4@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <1c4e21bf-5903-bc45-6d6e-64b68e494542@ieee.org> <20210212105120.01b04172@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: Alex Elder Message-ID: Date: Fri, 12 Feb 2021 13:06:56 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <20210212105120.01b04172@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/12/21 12:51 PM, Jakub Kicinski wrote: > On Fri, 12 Feb 2021 08:01:15 -0600 Alex Elder wrote: >> On 2/11/21 8:04 PM, Jakub Kicinski wrote: >>> On Fri, 12 Feb 2021 03:05:23 +0530 Sharath Chandra Vurukala wrote: >>>> +/* MAP CSUM headers */ >>>> +struct rmnet_map_v5_csum_header { >>>> + u8 next_hdr:1; >>>> + u8 header_type:7; >>>> + u8 hw_reserved:5; >>>> + u8 priority:1; >>>> + u8 hw_reserved_bit:1; >>>> + u8 csum_valid_required:1; >>>> + __be16 reserved; >>>> +} __aligned(1); >>> >>> Will this work on big endian? >> >> Sort of related to this point... >> >> I'm sure the response to this will be to add two versions >> of the definition, surrounded __LITTLE_ENDIAN_BITFIELD >> and __BIG_ENDIAN_BITFIELD tests. >> >> I really find this non-intuitive, and every time I >> look at it I have to think about it a bit to figure >> out where the bits actually lie in the word. >> >> I know this pattern is used elsewhere in the networking >> code, but that doesn't make it any easier for me to >> understand... >> >> Can we used mask, defined in host byte order, to >> specify the positions of these fields? >> >> I proposed a change at one time that did this and >> this *_ENDIAN_BITFIELD thing was used instead. >> >> I will gladly implement this change (completely >> separate from what's being done here), but thought >> it might be best to see what people think about it >> before doing that work. > > Most definitely agree, please convert. KS, would you like me to do this to the existing code first? I don't think it will take me very long. If it were a priority I could probably get it done by the end of today, but I'd want to ensure the result worked for the testing you do. -Alex