Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1751136pxb; Mon, 22 Feb 2021 09:57:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJyM7+apZ0yJCIKOm4UVuV8fZ+EVRUEKh1G3zcN+WymlcxDtFhS5l7KxNv4DTcWqN9atEifu X-Received: by 2002:a17:907:4cf:: with SMTP id vz15mr11523744ejb.39.1614016625536; Mon, 22 Feb 2021 09:57:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614016625; cv=none; d=google.com; s=arc-20160816; b=CDfhd2FSgJrA9pjWHxQSTUq+z6iGlY4FCva260NrXVFZM6M6wzsVgXB/t2vLYRtGs6 hYIA5CXnGrKjc2in+eBULyzxtQcdXZEcycJgM8/Sc6iMPCMBZW0rXc1baLyOFm3ekqwL 0gwCt9TOmcQMem8LubAjqLZyfj3HEsiSWt9LyI8UsQLwoPrmdrl7qipqy/smarfjFYOg yciqeJ0J6IE4wTURRuU7sst/df127zJc2oOX/o4avsL5kbY+bdBEhvzuKwUmMQR4Q7dL +f/vRY+PARh3PUDCqMBtwyg2dHpfp7z/mwHctPl+EqqsP4eqhN5MfDJpwjG+iMpNfP3m 4rkw== 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 :to:subject:dkim-signature; bh=4iQ/6A1pHeGyjMlUbh4JKbPflnnpW7pvKy+xN/oRk5Y=; b=GKjwSn6I4BEhKRQMhzPfsNzvf2IKNrAYCpNlmnVgnq/v53W63WszUMqadbUiZLZOVZ yC1UynrfDuddb1iNoAYYY3f0rQDHNeWyDZtIti7619USy4n30OdpIbhr9Rz6lKek93Dg L75jncpFdKoeNxluM69BZU1KgoTlYZyrqlrCdLxRLncDrBHslVpAJcGq54+sh2e0ZTLY Bz+QOzVB0Ncxp8OHTe+cx+nmW+RKaTGNDnbAQSopE4L3rZ8Apu7b4R14y2kS3CJRhMKG e9Z9obNGRMNar5rPeIzosqypKkxDWPOQdVyblrTjmJR5hbdwlcMpV9oQii09EDJ+St45 SszQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=Ctq58+IK; 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 a24si10877356ejy.54.2021.02.22.09.56.41; Mon, 22 Feb 2021 09:57:05 -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=Ctq58+IK; 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 S231812AbhBVRzp (ORCPT + 99 others); Mon, 22 Feb 2021 12:55:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231800AbhBVRzl (ORCPT ); Mon, 22 Feb 2021 12:55:41 -0500 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D82F1C061797 for ; Mon, 22 Feb 2021 09:55:11 -0800 (PST) Received: by mail-io1-xd30.google.com with SMTP id q7so14225334iob.0 for ; Mon, 22 Feb 2021 09:55:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=4iQ/6A1pHeGyjMlUbh4JKbPflnnpW7pvKy+xN/oRk5Y=; b=Ctq58+IKe14DzaazBQFfQpQop6MG4aYU6Z5+wu/jIdnqat1f5A2aZPnQgtLwjx7HDD IfaxJO4Mn6OpnH5bljeYxw6T+sbJh1L7obl05QFMtBwmz/NXJS9Tsvt+xLTU7DUIbLtJ 7Tcd7hWJ3W9wDPP1rd/xiD4ch7FZQLJCHun4o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4iQ/6A1pHeGyjMlUbh4JKbPflnnpW7pvKy+xN/oRk5Y=; b=dqK+RhcrjV5VSqER36OOBPhdHZsLave6b6e9VqEYFQVIDXLILjKQ5tDwJC36GTyLsN DzfF2e5kn+1ki6t5E3EMQd/Y8HzEhlsGEfJAbtRck4uOLWh9PxVmvsFwP11BvVzZvDlM idM8cQAxrrjyjGqgx7Ic7W8aOnqqzLRf92pC8UIRJcfFxCrYONEezTkI146APptq/z05 pFoutQzr/0XzwrmN/aicHhA3Ebl1IXXX5H7OOhCpVEd3ijn+m1J6oJ9LONMud/1cpbnI MN1v33dql7zhn/w3McyreLlHfAROYyOPJZhCx/5okLqtW0dIxF4fX3Y9ZNTgIzWGSQov eF5g== X-Gm-Message-State: AOAM532sGi6CUCn/h1cU4wVPKQWXHRlJ1aj+uecJ9JmhQ7nBAGhhju5P kYDkgAmZJc/7+f8/61FhHO5AuL0awZDFKA== X-Received: by 2002:a6b:b2c2:: with SMTP id b185mr16611880iof.104.1614016511045; Mon, 22 Feb 2021 09:55:11 -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 j25sm13656433iog.27.2021.02.22.09.55.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Feb 2021 09:55:10 -0800 (PST) Subject: Re: [PATCH net-next v2 2/3] net: ethernet: rmnet: Support for downlink MAPv5 checksum offload To: Sharath Chandra Vurukala , davem@davemloft.net, kuba@kernel.org, elder@kernel.org, cpratapa@codeaurora.org, subashab@codeaurora.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1614012946-23506-1-git-send-email-sharathv@codeaurora.org> <1614012946-23506-3-git-send-email-sharathv@codeaurora.org> From: Alex Elder Message-ID: Date: Mon, 22 Feb 2021 11:55:09 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <1614012946-23506-3-git-send-email-sharathv@codeaurora.org> 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/22/21 10:55 AM, Sharath Chandra Vurukala wrote: > Adding support for processing of Mapv5 downlink packets. > It involves parsing the Mapv5 packet and checking the csum header > to know whether the hardware has validated the checksum and is > valid or not. > > Based on the checksum valid bit the corresponding stats are > incremented and skb->ip_summed is marked either CHECKSUM_UNNECESSARY > or left as CHEKSUM_NONE to let network stack revalidated the checksum > and update the respective snmp stats. > > Current MapV1 header has been modified, the reserved field in the > Mapv1 header is now used for next header indication. > > Signed-off-by: Sharath Chandra Vurukala > --- . . . > diff --git a/include/linux/if_rmnet.h b/include/linux/if_rmnet.h > index 9661416..a6de521 100644 > --- a/include/linux/if_rmnet.h > +++ b/include/linux/if_rmnet.h > @@ -1,5 +1,5 @@ > /* SPDX-License-Identifier: GPL-2.0-only > - * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. > + * Copyright (c) 2013-2019, 2021 The Linux Foundation. All rights reserved. > */ > > #ifndef _LINUX_IF_RMNET_H_ > @@ -8,11 +8,11 @@ > struct rmnet_map_header { > #if defined(__LITTLE_ENDIAN_BITFIELD) > u8 pad_len:6; > - u8 reserved_bit:1; > + u8 next_hdr:1; > u8 cd_bit:1; > #elif defined (__BIG_ENDIAN_BITFIELD) > u8 cd_bit:1; > - u8 reserved_bit:1; > + u8 next_hdr:1; > u8 pad_len:6; > #else > #error "Please fix " . . . I know that KS said he is "not convinced that it is helping improve anything" and that it "just adds a big overhead of testing everything again without any improvement of performance or readability of code." But I will ask again that these structures be redefined to use host byte-order masks and structure fields with clearly defined endianness. I strongly disagree with the statement from KS. Specifically I feel the whole notion of "bit field endianness" is not obvious, and makes it harder than necessary to understand how the bits are laid out in memory. It also obscures in code that bit fields have certain properties that are different from other "normal" struct field types (such as alignment, size, or atomicity of the field). And I say this despite knowing this pattern is used elsewhere in the networking code. In the first version of the series, Jakub asked that the conversion be done. I offered to implement the change to the existing code, and that offer stands. I can do so fairly quickly if you would like to have it soon to build upon. Either way, I would like a chance to review the rest of this series, but I'd like to get this issue resolved (either decide it must be done or not) before I spend more time on that. Thanks. -Alex