Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1328980pxy; Fri, 23 Apr 2021 05:49:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3U8N/NMC3C7E2dC47pxTb1NoB83BQJ9t2DqQTVp4u5T6Q5Olqubbi/vvK8b6yI8KUNFGc X-Received: by 2002:a17:902:9002:b029:e6:c95f:2a1d with SMTP id a2-20020a1709029002b02900e6c95f2a1dmr3882374plp.79.1619182180756; Fri, 23 Apr 2021 05:49:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619182180; cv=none; d=google.com; s=arc-20160816; b=FwYPtW1qThTq+wzl4rjW6+B9FuUModjwWsanUAb7cwiuiohCoNyFyXIZoxAwSSZnKY hswXFMT+lbCzTZPPke0mAlk8X3OqfQz131f3xXn1wVThFcF45uHyVOlRLOGahQNiU+VT 9UScn1lWdAbRun4d/vFvHLwYuSX+qtp46gcr6VsX2tGbgrZ4urfNe7dkWtRhA/dIYiVo USE7mDq+5mdsMYA1cSc6GwLsBQ8jtR7rPYtAdoDRGhteJanccFKoXBgTW8YWRW02M63T BUg5W4Ry+fMSLUOZyc6n2GbiUoXlIMgNbPTSb8+yDRxRXzQVyQh1YZvagdoyUxuK7cKa B/Xg== 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=cQ+MBXE+++xp1zOWlTgF7TNTO8L2yA1pVovqRQEspeU=; b=0hjR/5Yf+UyCyb0W0NebZlDTPp1QJ1U0skfGyoBk12ULGc9bbaQo3gP50HRw3/oWQv Nd5Pbl7mOR58jNBhTDO47r2S9BqXxDbjfUZ/XXpQKcgt/055YEDSVwc2CFOLk5Z9SzgZ ryYNm5ZZpOP9pO17HkpKN8B4IyyLWNGB2DzgaVZEOymhFs9AVsakrK1R4WPb6mV+aU+4 5aVYBFNPRalAJScAiwfgYPJzp8bVQdvizIpwQgBgUNzSTWV0jYSPP1t5NGd3slRfNkx8 HuVY9a7dMx5Y3iQV0MwxRkib3bLC8ieuyZe+lVFIf6+X/8EpFvIDZAciWcv2Isf+zwi4 JnvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=G9D0VkOd; 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 mj9si6679284pjb.161.2021.04.23.05.49.27; Fri, 23 Apr 2021 05:49:40 -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=@ieee.org header.s=google header.b=G9D0VkOd; 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 S242542AbhDWMt0 (ORCPT + 99 others); Fri, 23 Apr 2021 08:49:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242513AbhDWMtZ (ORCPT ); Fri, 23 Apr 2021 08:49:25 -0400 Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81B45C06174A for ; Fri, 23 Apr 2021 05:48:49 -0700 (PDT) Received: by mail-io1-xd31.google.com with SMTP id b9so1322515iod.13 for ; Fri, 23 Apr 2021 05:48:49 -0700 (PDT) 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=cQ+MBXE+++xp1zOWlTgF7TNTO8L2yA1pVovqRQEspeU=; b=G9D0VkOd02dIR5UwpVtNRa+BD0De8I/lJwpxjwa3FTZqtD3miUu4AfhbDi7ZE2/UMQ eNzZc6a3weOdVNLOzHhQOXK4V2IX2ijHkd0ECewA2826vxlIjNj+1PFWwE8DvVeSyehR qNT1p5R/gd7ckG+6BPmC4U28svU7nF8z+lkQA= 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=cQ+MBXE+++xp1zOWlTgF7TNTO8L2yA1pVovqRQEspeU=; b=MxC5xpW0/guThMq+K4CKIkQ5MmC1ubY04GMM55aZj8YwQT4Zz+8eCrB3+Xi6n2Wglf bq6I5Vs94NbuN4HWySlMIoJFsz8hZ5LchB4dqQePREugopETZHQQWJhnBAR61c7QZr3F 9AFLWi8GluFO70yJ3GcOhUeWo0H70RoGGO337Y20+/lyFA5POwghGCbdbXkVUKUVSsUb eZ8nfRx/myHPjVObhqkhC4OKNon0bJhm3mNQqlHA6FALYXiO8NCo0VoM9RDD4vv+4iL4 DuLQiGBp6PvauwE34urfJwcInaGWTy/cmebQZKpBKZAaWB6k120pLESI8r7UsrdCYgg+ VEKQ== X-Gm-Message-State: AOAM5335nUsBTOn1GWa4oJHBilBmFMwpYWtUrEWO/MVo8YN/Xpu7IAz9 fx2ZYPm3/QnqL8eXBQSigw5RAbCvk5JP+A== X-Received: by 2002:a6b:fa14:: with SMTP id p20mr3053966ioh.168.1619182128721; Fri, 23 Apr 2021 05:48:48 -0700 (PDT) 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 f12sm2579599ils.50.2021.04.23.05.48.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Apr 2021 05:48:48 -0700 (PDT) Subject: Re: [PATCH net-next v5 1/3] docs: networking: Add documentation for MAPv5 To: Sharath Chandra Vurukala , davem@davemloft.net, kuba@kernel.org, elder@kernel.org, cpratapa@codeaurora.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1619180343-3943-1-git-send-email-sharathv@codeaurora.org> <1619180343-3943-2-git-send-email-sharathv@codeaurora.org> From: Alex Elder Message-ID: Date: Fri, 23 Apr 2021 07:48:47 -0500 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: <1619180343-3943-2-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 4/23/21 7:19 AM, Sharath Chandra Vurukala wrote: > 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 You indicated I acknowledged this, and I didn't have any other real input, so this looks good. -Alex > --- > .../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 >