From patchwork Tue Dec 1 00:41:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 335104 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp3991952ejs; Mon, 30 Nov 2020 16:42:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQjCx2xvMCLWGVwzR/Nh8AinzqBCidGWQ34/Zw7xtKiLVe04H7ZpQKs8CDaUwIhn4jivGI X-Received: by 2002:a17:906:c24b:: with SMTP id bl11mr481619ejb.3.1606783349903; Mon, 30 Nov 2020 16:42:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606783349; cv=none; d=google.com; s=arc-20160816; b=fe6G10BC7/bdVZQHIq79nHk3/lvIv4iP+COcqLPIb0DwZRhuWjST1b+OsZG2DfvGbx eZ/6C1fuzc/CgGhcdUWnNIcJLL2KI1YlbdhS0DzXkxwyE0JO99jQu9E3eyb4Lvyfdneg rw224EUhlbaNIwRDi8i6QGtRrV+U95XlhvlCnXMn3MHPEwsYhFZNuqZuGMIWHY2Jmmbm N9ysq7YzQFQTv0hp1UT6Fblb4V7ePgcHj2rTBM9u8qUqmOUycYpQM/cmf1nHCUmfRbbG maj37X4ylw83NzuONDxB8HP52H4hSumDyTFjed7jYPHvyocpMrDSCKyWZqjz3JPU1mVe BbUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HnzEbVx2smAAOoGAKmXe1MxzApt3PoExhyWVjcN51Tc=; b=Pe6lmOMv3O7lQ9Sm5WlDfXOSPT/+nLAdUKJzrHtQjr8TZsN+DgHvlH15OjzFEStyd/ EdQRAuY9kOuRCNfJJUcWU+/DeXnsQWAYfsHVnjsXw4her05li8dE/6TWu5bR1EOFBA4D kS53B1uoQJlAt6Rbp9lQ0qyhViezKInVp0eHZuXW4EBtBtVbW4QP4w4S6Pzk/N0dbBEH NouYdD7VPH29YJmsQvkrTKTBnCUxiKHKaVsMgBQ3/C7htoHjlyNPtRKvSGPDbyB+YaPU b/fagguz99yGtfG0sbR/iwTOQ1TG+RtmV4+oh7sf4y3rCugUfzI1JJjE6dl5eB6+czge uD8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Z/9eOuHn"; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dc22si7899869ejb.568.2020.11.30.16.42.29; Mon, 30 Nov 2020 16:42:29 -0800 (PST) Received-SPF: pass (google.com: domain of netdev-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=@linaro.org header.s=google header.b="Z/9eOuHn"; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388472AbgLAAm3 (ORCPT + 8 others); Mon, 30 Nov 2020 19:42:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728564AbgLAAm2 (ORCPT ); Mon, 30 Nov 2020 19:42:28 -0500 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A8A6C0613D3 for ; Mon, 30 Nov 2020 16:41:48 -0800 (PST) Received: by mail-io1-xd41.google.com with SMTP id n14so9015292iom.10 for ; Mon, 30 Nov 2020 16:41:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HnzEbVx2smAAOoGAKmXe1MxzApt3PoExhyWVjcN51Tc=; b=Z/9eOuHn68lFWpsnehSX4d4rv62zcE5cHMVXkAPLCRmhv6xQta7Je7+Ntz3L7+mxcb 2xzFWxgWPzHV1Xg+0IKUsZOjxL42D6x/BFvyIQM4rMriee7MvBAC2QjaMaMmjqA6R7U8 31yb3jGAFfRcnjaR00m0wcy65SVAIg1uI0iIMgPebz4H6H6svOoiQHBxwgxGiBBbJf6v 3q3MNHNBcwCo3uCNA/wlAurZjw/Fc65Tyq0dZeTsHUp3SPGL8Y8AqWqOq9nMew0EC9+3 zcewf6QrnN+mj43enRjUY6zON1NPCrXqKv6n7BM7XB77LrIglhKHAxKNaCn5+EzfDF8g 0vjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HnzEbVx2smAAOoGAKmXe1MxzApt3PoExhyWVjcN51Tc=; b=W32SzdTAZ4Lmx6x5/neez86IR7B1uZVZb4IJ9Gih9tJxlb/kGxL90IBTQz3s/Oyj0a u6bZZj0heFXGT1/yh9atHL8eTk1e+pzu8vEa6UlI9tfR41xjW9gs/ugsBx7EkykE9Wz9 CfYU+wI4Q5hpmJQ1biTcJcTeDnl8DDrDVsVH/5lHipiOST7nCUL6v8ca2izowWOTJWTu WbV6vc0yeihc/jgNQziRry4LWlMpZnJvpSEE/5jqF5ZjmUEhtAfxju0O8W4zKssyh9E8 ayt9K7PsPY4/nirlQO8jTOEhzNhkmJqLAqX5+BiHtYYXk3LQUU5n3UOUEQwSDmCeSHT2 NtEg== X-Gm-Message-State: AOAM532srn0neuTxjc8kbWx6jUBMQxTy4MZwNWbsGLtAPRR2d1U7+XtT K+Oi79W5lxiAMoyIXO7ZToksEg== X-Received: by 2002:a02:b68e:: with SMTP id i14mr423070jam.36.1606783307827; Mon, 30 Nov 2020 16:41:47 -0800 (PST) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id p7sm138561iln.11.2020.11.30.16.41.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2020 16:41:47 -0800 (PST) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org, subashab@codeaurora.org Cc: evgreen@chromium.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 1/2] if_rmnet.h: define struct rmnet_map_v5_csum_header Date: Mon, 30 Nov 2020 18:41:42 -0600 Message-Id: <20201201004143.27569-2-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201201004143.27569-1-elder@linaro.org> References: <20201201004143.27569-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Define a new rmnet_map_v5_csum_header structure type. It will be used for inline checksum offload, supported with version 5 of the QMAP protocol. Signed-off-by: Alex Elder --- include/linux/if_rmnet.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) -- 2.20.1 diff --git a/include/linux/if_rmnet.h b/include/linux/if_rmnet.h index 9661416a9bb47..0fdda0e6e9963 100644 --- a/include/linux/if_rmnet.h +++ b/include/linux/if_rmnet.h @@ -52,4 +52,34 @@ struct rmnet_map_ul_csum_header { #endif } __aligned(1); + +/* Values for the header_type field of struct rmnet_map_v5_csum_header */ +enum rmnet_map_v5_header_type { + RMNET_MAP_HEADER_TYPE_UNKNOWN = 0x0, + RMNET_MAP_HEADER_TYPE_COALESCING = 0x1, + RMNET_MAP_HEADER_TYPE_CSUM_OFFLOAD = 0x2, +}; + +/* QMAP v5 checksum offload header */ +struct rmnet_map_v5_csum_header { +#if defined(__LITTLE_ENDIAN_BITFIELD) + 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; +#elif defined(__BIG_ENDIAN_BITFIELD) + u8 header_type:7; + u8 next_hdr:1; + + u8 csum_valid_required:1; + u8 hw_reserved_bit:1; + u8 priority:1; + u8 hw_reserved:5; +#endif + __be16 reserved; +}; + #endif /* !(_LINUX_IF_RMNET_H_) */