Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1308250pxy; Fri, 23 Apr 2021 05:21:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwc+jFidNSQGeM8WXQY/GytW0hLrmtoknEwsk/MfaLcuu3LiEgT0fKhIMNzffbSKoDz8MIm X-Received: by 2002:a17:907:118c:: with SMTP id uz12mr3879390ejb.308.1619180475171; Fri, 23 Apr 2021 05:21:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619180475; cv=none; d=google.com; s=arc-20160816; b=F+Z7VJ+58sh/79qH10SLeRdJ01w1nQfolNspAta45MaTBheNMD07Z1cNoytiaqkrTZ oxekofYEvxUbSAJ7RhCDpv0WRK9DXmYR/zuPqtZ2XrERnyRniV0GyBKLbTQHe/tjFoD5 Yv7GVR7uoydimjsfp/hhmfVihMkTRwgbJlw0xDFy3t/MJGAntRrzORuNKvWIdpxGnAzn 9Nm0cYp1/Js5/jWalVyg0II6qEWDiJz9T5RN5iADUgPEkBwCk3Sz5LVPrXeXUCKaYGE2 mEg8DkYvIdA+2mHe/8MeBBHy66VdZ/lHH96F0YSBJ0WPg9jLcW1u2apRuUPqx+PwywBT WDxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=wdYQVpMBACRIiaUCwabTjCGS/CzHerHID9/WHv7gDGc=; b=aTiKQSNftZWJzvca3apBULX5TF9VZiqBFMTeNL7K33YsgJBqPIcuMBgC3G7iTpXi3D YBZz4cIIWv++LZSPqbNyMULWcjAqMOUN9TkZwt9k8lMimHLbRnJfa5BZSFqeoLz3lC9f KQAWA8M+GfLgdKaPeVFalp6Z30dw1auOp+fHT+vuG/OfShwm+4TEXe+yQx9c67Cv0HMI QxXjU+M88xeNBYeRIGxYJdcmFnMSCA9pes3c48sn8ZW45iMKiixSzRfvlNSQ1v4LJXsS cXJLnun7020hS1h2hUcIOHpmejzPoDTPcRskC8yVKzmlwGtKuLIkRuArFCyem3jL4dFs PANg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=m1AzqhYW; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hc43si5798315ejc.529.2021.04.23.05.20.51; Fri, 23 Apr 2021 05:21:15 -0700 (PDT) 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=@mg.codeaurora.org header.s=smtp header.b=m1AzqhYW; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242378AbhDWMU2 (ORCPT + 99 others); Fri, 23 Apr 2021 08:20:28 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:19982 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242273AbhDWMU1 (ORCPT ); Fri, 23 Apr 2021 08:20:27 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1619180391; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=wdYQVpMBACRIiaUCwabTjCGS/CzHerHID9/WHv7gDGc=; b=m1AzqhYWEfByY8oZmG371fyC/dqiAzmPVF/wnwuklITHsWXGWHIrg9ipcOxkgA4WzZ5jr3x+ dkEp4dj64f0pAqhjNRltBX4AK+Vp9nvYPxibUp8BvIbOSoCSXIw93ygKlgrZivDaHheR5k4s umLjUyc98IprVygbxhf8nFa494I= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-east-1.postgun.com with SMTP id 6082bb4ea817abd39a2d64e6 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 23 Apr 2021 12:19:26 GMT Sender: sharathv=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 44844C433D3; Fri, 23 Apr 2021 12:19:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from svurukal-linux.qualcomm.com (unknown [202.46.22.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sharathv) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5D896C4338A; Fri, 23 Apr 2021 12:19:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5D896C4338A Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=sharathv@codeaurora.org From: Sharath Chandra Vurukala To: davem@davemloft.net, kuba@kernel.org, elder@kernel.org, cpratapa@codeaurora.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sharath Chandra Vurukala Subject: [PATCH net-next v5 1/3] docs: networking: Add documentation for MAPv5 Date: Fri, 23 Apr 2021 17:49:01 +0530 Message-Id: <1619180343-3943-2-git-send-email-sharathv@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1619180343-3943-1-git-send-email-sharathv@codeaurora.org> References: <1619180343-3943-1-git-send-email-sharathv@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding documentation explaining the new MAPv4/v5 packet formats and the corresponding checksum offload headers. Acked-by: Subash Abhinov Kasiviswanathan Acked-by: Alex Elder Signed-off-by: Sharath Chandra Vurukala --- .../device_drivers/cellular/qualcomm/rmnet.rst | 126 +++++++++++++++++++-- 1 file changed, 114 insertions(+), 12 deletions(-) diff --git a/Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst b/Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst index 70643b5..4118384 100644 --- a/Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst +++ b/Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst @@ -27,34 +27,136 @@ these MAP frames and send them to appropriate PDN's. 2. Packet format ================ -a. MAP packet (data / control) +a. MAP packet v1 (data / control) -MAP header has the same endianness of the IP packet. +MAP header fields are in big endian format. Packet format:: - Bit 0 1 2-7 8 - 15 16 - 31 + Bit 0 1 2-7 8-15 16-31 Function Command / Data Reserved Pad Multiplexer ID Payload length - Bit 32 - x - Function Raw Bytes + + Bit 32-x + Function Raw bytes Command (1)/ Data (0) bit value is to indicate if the packet is a MAP command -or data packet. Control packet is used for transport level flow control. Data +or data packet. Command packet is used for transport level flow control. Data packets are standard IP packets. -Reserved bits are usually zeroed out and to be ignored by receiver. +Reserved bits must be zero when sent and ignored when received. -Padding is number of bytes to be added for 4 byte alignment if required by -hardware. +Padding is the number of bytes to be appended to the payload to +ensure 4 byte alignment. Multiplexer ID is to indicate the PDN on which data has to be sent. Payload length includes the padding length but does not include MAP header length. -b. MAP packet (command specific):: +b. Map packet v4 (data / control) + +MAP header fields are in big endian format. + +Packet format:: + + Bit 0 1 2-7 8-15 16-31 + Function Command / Data Reserved Pad Multiplexer ID Payload length + + Bit 32-(x-33) (x-32)-x + Function Raw bytes Checksum offload header + +Command (1)/ Data (0) bit value is to indicate if the packet is a MAP command +or data packet. Command packet is used for transport level flow control. Data +packets are standard IP packets. + +Reserved bits must be zero when sent and ignored when received. + +Padding is the number of bytes to be appended to the payload to +ensure 4 byte alignment. + +Multiplexer ID is to indicate the PDN on which data has to be sent. + +Payload length includes the padding length but does not include MAP header +length. + +Checksum offload header, has the information about the checksum processing done +by the hardware.Checksum offload header fields are in big endian format. + +Packet format:: + + Bit 0-14 15 16-31 + Function Reserved Valid Checksum start offset + + Bit 31-47 48-64 + Function Checksum length Checksum value + +Reserved bits must be zero when sent and ignored when received. + +Valid bit indicates whether the partial checksum is calculated and is valid. +Set to 1, if its is valid. Set to 0 otherwise. + +Padding is the number of bytes to be appended to the payload to +ensure 4 byte alignment. + +Checksum start offset, Indicates the offset in bytes from the beginning of the +IP header, from which modem computed checksum. + +Checksum length is the Length in bytes starting from CKSUM_START_OFFSET, +over which checksum is computed. + +Checksum value, indicates the checksum computed. + +c. MAP packet v5 (data / control) + +MAP header fields are in big endian format. + +Packet format:: + + Bit 0 1 2-7 8-15 16-31 + Function Command / Data Next header Pad Multiplexer ID Payload length + + Bit 32-x + Function Raw bytes + +Command (1)/ Data (0) bit value is to indicate if the packet is a MAP command +or data packet. Command packet is used for transport level flow control. Data +packets are standard IP packets. + +Next header is used to indicate the presence of another header, currently is +limited to checksum header. + +Padding is the number of bytes to be appended to the payload to +ensure 4 byte alignment. + +Multiplexer ID is to indicate the PDN on which data has to be sent. + +Payload length includes the padding length but does not include MAP header +length. + +d. Checksum offload header v5 + +Checksum offload header fields are in big endian format. + + Bit 0 - 6 7 8-15 16-31 + Function Header Type Next Header Checksum Valid Reserved + +Header Type is to indicate the type of header, this usually is set to CHECKSUM + +Header types += ========================================== +0 Reserved +1 Reserved +2 checksum header + +Checksum Valid is to indicate whether the header checksum is valid. Value of 1 +implies that checksum is calculated on this packet and is valid, value of 0 +indicates that the calculated packet checksum is invalid. + +Reserved bits must be zero when sent and ignored when received. + +e. MAP packet v1/v5 (command specific):: - Bit 0 1 2-7 8 - 15 16 - 31 + Bit 0 1 2-7 8 - 15 16 - 31 Function Command Reserved Pad Multiplexer ID Payload length Bit 32 - 39 40 - 45 46 - 47 48 - 63 Function Command name Reserved Command Type Reserved @@ -74,7 +176,7 @@ Command types 3 is for error during processing of commands = ========================================== -c. Aggregation +f. Aggregation Aggregation is multiple MAP packets (can be data or command) delivered to rmnet in a single linear skb. rmnet will process the individual -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project