From patchwork Fri May 13 05:23:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 67720 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp87450qge; Thu, 12 May 2016 22:23:27 -0700 (PDT) X-Received: by 10.140.41.200 with SMTP id z66mr13466222qgz.20.1463117007632; Thu, 12 May 2016 22:23:27 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j60si11081275qge.116.2016.05.12.22.23.27; Thu, 12 May 2016 22:23:27 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 2C5FE6164F; Fri, 13 May 2016 05:23:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id B15AB615E0; Fri, 13 May 2016 05:23:21 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 540BC615F7; Fri, 13 May 2016 05:23:20 +0000 (UTC) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by lists.linaro.org (Postfix) with ESMTPS id 55FFD610AC for ; Fri, 13 May 2016 05:23:19 +0000 (UTC) Received: by mail-pa0-f46.google.com with SMTP id r5so38138299pag.1 for ; Thu, 12 May 2016 22:23:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VKKWA/ETmk3Zu9lfkpYdrL1+HPgNLzHB14SNqIfJvbk=; b=SVyI0P8BVbA4ffJSqoeNcbqAhVfC9Bc3b8yaI9p5OXdyzEuwHRs+OAJKfSSG3cPIRI Jl2B5IeXaHYrCTBDARNnOEZhJX5peFgwS09LhEU8W/jbwCle8NH7UxR087a53Ji7dYPZ m+OZkj7ZxzSqtFr0eT13TUexemtrJuecYRl0X4sn/rocwpsbDu5i9YtdpaRNWdsyBdNM tJnA7pMK+GBlEAuBuMMNZumYSqbSsbddmoT9roWOcII4/dpj12390Ac3rSLGmNX+P/SK +3zUiuWMsOYGDjX8LxYj1pvMpy++gamlJtowRx3NR4YsqIkD8afdE7U076Niy+EUTLWO EXKg== X-Gm-Message-State: AOPr4FXD42w+xfMyJIXQcxfJI0bTEdHLal+EngyBUctvrRnonziaMy2p6RNbaQe40vuApq6F4II= X-Received: by 10.66.153.105 with SMTP id vf9mr19755600pab.47.1463116998663; Thu, 12 May 2016 22:23:18 -0700 (PDT) Received: from localhost.localdomain ([122.166.219.57]) by smtp.gmail.com with ESMTPSA id f67sm23751538pff.62.2016.05.12.22.23.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 May 2016 22:23:18 -0700 (PDT) From: Balasubramanian Manoharan To: lng-odp@lists.linaro.org Date: Fri, 13 May 2016 10:53:03 +0530 Message-Id: <1463116983-26462-1-git-send-email-bala.manoharan@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH] doc: users-guide: add packet marking documentation X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Updates packet marking api documentation to traffic manager user guide Signed-off-by: Balasubramanian Manoharan --- doc/users-guide/users-guide-tm.adoc | 73 +++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/doc/users-guide/users-guide-tm.adoc b/doc/users-guide/users-guide-tm.adoc index 12685b2..0bbbb6c 100644 --- a/doc/users-guide/users-guide-tm.adoc +++ b/doc/users-guide/users-guide-tm.adoc @@ -263,6 +263,79 @@ settings for any TM system, though in most cases a TM system can (and should) be created/instantiated with smaller values, since lower values will often result in faster operation and/or less memory used. +==== Packet Marking + +Packet Marking API is used to mark the packet based upon the final packet color +assigned to the packet when it reaches the egress node. +This is an optional feature and if available on the platform is used to reflect +the packet color on IPv4/IPv6 DiffServ filed in accordance with RFC 2474. +There are three different packet marking fields supported they are, +1). Assured forwarding in accordance with RFC 2597, the DSCP is marked to +set the packet Drop precedence in accordance with the color, i.e High Drop +precedence for RED, Medium Drop precedence for YELLOW and leave the DSCP +unchangesd if the color is GREEN. +2). Explicit Congestion Notification protocol per RFC 3168, where a router +encountering congestion can notifiy it by setting the lower 2 bits in +DiffServ field to "11" Congestion Encountered code, which will ultimately +reduce the transmission rate of the packet sender. +3). In IEEE 802.1q VLAN tag header contains a DE - Drop Eligibility bit for +marking a packet for Downstream switches, and is valid for Ethernet packet +containing a VLAN tag. + +RFC 3168 is only valid for TCP packets whereas RFC 2597 is valid for IPv4/IPv6 +traffic. + +The values are set per color and hence the implementation may support these +parameters only for a specific colors. marking_colors_supported field in +capabilities structure can be used to check which colors are supported for +marking. + +Vlan Marking. + +This vlan marking is used to enable the drop eligibility on the packet +based on the packet color. If drop eligibility is enabled then the +implementation will set the one bit VLAN Drop Eligibility Indicator (DEI) +field (but only for pkts that already carry a VLAN tag) of a packet based +upon the final pkt color assigned to the pkt when it reaches the egress +node. When drop_eligible_enabled is false, then the given color has +no effect on the VLAN fields. See IEEE 802.1q for more details. +vlan_marking_supported boolean in capability structure indicates whether this +feature is supported by the implementation. + +Explicit Congestion Notification Marking. + +The odp_tm_ecn_marking() function allows one to configure the TM +egress so that the two bit ECN subfield of the eight bit TOS field of an +IPv4 pkt OR the eight bit Traffic Class (TC) field of an IPv6 pkt can be +selectively modified based upon the final color assigned to the pkt when it +reaches the egress. Note that the IPv4 header checksum will be updated - +but only if the IPv4 TOS field actually changes as a result of this +setting or the odp_tm_drop_prec_marking setting. For IPv6, since there is +no header checksum, nothing needs to be done. If ECN is enabled for a +particular color then ECN subfield will be set to ECN_CE ie congestion +experienced. +ecn_marking_supported boolean in capability structure indicates whether this +feature is supported by the implementation. + +Drop Precedence Marking. + +The Drop precedence marking allows one to configure the TM +egress to support Assured forwarding in accordance with RFC 2597. +The Drop Precedence bits are contained within the six bit Differentiated +Services Code Point subfield of the IPv4 TOS field or the IPv6 Traffic +Class (TC) field. Specifically the Drop Precedence sub-subfield can be +accessed with a DSCP bit mask of 0x06. When enabled for a given color, +these two bits will be set to Medium Drop Precedence (value 0x4) if the +color is ODP_PACKET_YELLOW, set to High Drop Precedence (value 0x6) if +the color is ODP_PACKET_RED. + +Note that the IPv4 header checksum will be updated - but only if the +IPv4 TOS field actually changes as a result of this setting or the +odp_tm_ecn_marking setting. For IPv6, since there is no header checksum, +nothing else needs to be done. +drop_prec_marking_supported boolean in capability structure indicates whether +this feature is supported by the implementation. + === Examples .Create a tm_node chain for two nodes and associate the scheduler