<?xml version="1.0" encoding="UTF-8"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
    which is available here: http://xml.resource.org. -->
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
    please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that
    most I-Ds might want to use.
    (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
    (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc submissionType="IETF" category="std" docName="draft-lin-opsawg-ipfix-rocev2-00"
ipr="trust200902" consensus="true" updates="" xmlns:xi="http://www.w3.org/2001/XInclude">
  <!-- category values: std, bcp, info, exp, and historic
    ipr values: full3667, noModification3667, noDerivatives3667
    you can add the attributes updates="NNNN" and obsoletes="NNNN"
    they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <title abbrev="Export of RoCEv2 BTH Using IPFIX">
    Export of RoCEv2 Base Transport Header (BTH) Information Using IP Flow Information Export (IPFIX)</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->
    <author fullname="Changwang Lin" initials="C." surname="Lin">
      <organization>New H3C Technologies</organization>
      <address>
        <postal>
          <!-- Reorder these if your country does things differently -->
          <city>Beijing</city>
          <country>China</country>
        </postal>
        <email>linchangwang.04414@h3c.com</email>
        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>
	
	<author fullname="Haiyang Zhang" initials="H." surname="Zhang">
      <organization>New H3C Technologies</organization>
      <address>
        <postal>
          <!-- Reorder these if your country does things differently -->
          <city>Beijing</city>
          <country>China</country>
        </postal>
        <email>zhang.haiyangA@h3c.com</email>
        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <date year="2026" />
    <!-- Meta-data Declarations -->
    <area>General</area>
    <workgroup>OPSAWG</workgroup>

    <keyword>IPFIX</keyword>
    <keyword>RDMA</keyword>
    <keyword>RoCEv2</keyword>
    <keyword>BTH</keyword>

<abstract>
<t>
	This document defines a new set of IP Flow Information Export (IPFIX) Information Elements (IEs)
  for exporting Base Transport Header (BTH) information for RDMA over Converged Ethernet version 2
  (RoCEv2) traffic. These extensions enable network monitoring systems to collect and analyze the
  characteristics of RDMA traffic widely used in high-performance computing, storage, and artificial
  intelligence applications.
</t>
</abstract>

  </front>

  <middle>

<section anchor="Introduction" title="Introduction">
<t>
  Remote Direct Memory Access (RDMA) <xref target="RFC5040"/> is a network technology that allows a computer to
  read from or write to the memory of another computer directly, without involving the operating system.
  This zero-copy and kernel-bypass feature greatly reduces CPU overhead and communication latency.
  InfiniBand <xref target="IBTA-SPEC" format="default"/> and RDMA over Converged Ethernet (RoCE) are two
  mainstream RDMA implementations that bypass the operating system kernel and achieve zero-copy data transfer.
</t>
<t>
	RoCE technology has become a key component of high-performance data center networks, especially in
  low-latency, high-throughput scenarios such as artificial intelligence training, distributed storage,
  and financial transactions. RDMA over Converged Ethernet version 2 (RoCEv2) runs on top of UDP (port 4791)
  and inherits the transport layer protocol of the InfiniBand Architecture (IBA).
</t>
<t>
  The existing IPFIX <xref target="RFC7011"/> standard lacks the ability to monitor specific fields of RoCEv2,
  which limits the ability of network operators to perform in-depth analysis, troubleshooting,
  and performance optimization of RDMA traffic. To close this gap, this document defines a new set of
  Information Elements (IEs) to carry RoCEv2 BTH key fields.
</t>
</section>
<section anchor="Terminology" title="Terminology">
  <t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
    "MAY", and "OPTIONAL" in this document are to be interpreted as
    described in BCP 14 <xref target="RFC2119"/> <xref
    target="RFC8174"/> when, and only when, they appear in all
    capitals, as shown here.
  </t>
  <t>
    The following terms are used as defined in <xref target="RFC7011"/>:
  </t>
  <ul>
    <li>IPFIX</li>
    <li>IPFIX Information Elements</li>
  </ul>
  <t>
    The following terms are used in this document:
  </t>
  <ul>
    <li>QP: Queue Pair, a communication endpoint in RDMA architecture.</li>
    <li>BTH: Base Transport Header, the RDMA transport header containing QP information.</li>
    <li>P_Key: Partition Key.</li>
    <li>PSN: Packet Sequence Number.</li>
  </ul>
</section>
<section anchor="IPFIX IEs for RoCEv2 BTH" title="New IPFIX Information Elements for RoCEv2 BTH">
<t>
  This section defines new IPFIX IEs for exporting RoCEv2 BTH key fields.
</t>
<t>
  <list style="hanging">
    <t hangText="rdmaOpCode"><vspace blankLines="0"/>
    The RoCEv2 BTH OpCode field, which indicates the type of the InfiniBand Architecture data packet.
    </t>
    <t hangText="rdmaPartitionKey"><vspace blankLines="0"/>
    The RoCEv2 BTH Partition Key field, which identifies the logical partition to which the data packet belongs. 
    </t>
    <t hangText="rdmaDestinationQP"><vspace blankLines="0"/>
    The RoCEv2 BTH Destination Queue Pair (QP) field, indicating the work QP number at the destination.
    </t>
    <t hangText="rdmaSourceQP"><vspace blankLines="0"/>
    The RoCEv2 BTH Source Queue Pair (QP) field (if present), indicating the work QP number at the Source.
    </t>
    <t hangText="rdmaPacketSequenceNumber"><vspace blankLines="0"/>
    The RoCEv2 BTH Packet Sequence Number (PSN) field, which is used to detect whether data packets are
    lost or duplicated, ensuring the reliability and orderliness of transmission.
    </t>
    <t hangText="rdmaBTHFlags1"><vspace blankLines="0"/>
    The SE, M, Pad, and TVer fields of The RoCEv2 BTH. The size of this Information Element is 1 octet.
    </t>
    <t hangText="rdmaBTHFlags2"><vspace blankLines="0"/>
    The F/R, and B/R fields of The RoCEv2 BTH. The size of this Information Element is 1 octet.
    </t>
    <t hangText="rdmaBTHFlags3"><vspace blankLines="0"/>
    The A field of The RoCEv2 BTH. The size of this Information Element is 1 octet.
    </t>
  </list>
</t>
</section>

<section anchor="Operational Considerations" title="Operational Considerations">
<t>
  The exporter needs to parse RoCEv2 BTH information, which may affect the exporter's performance.
  Implementers SHOULD consider measures to mitigate this impact, such as sampling rate limiting or hardware acceleration.
</t>
</section>

<section anchor="Security Considerations" title="Security Considerations">
<t>
	The Security Considerations for IPFIX <xref target="RFC7011"/> apply to this document as well.
</t>
<t>
  When exporting RDMA BTH information across security domains, to prevent information security risks
  caused by the leakage of sensitive network topology details such as QP numbers, it is recommended
  to implement comprehensive protection measures, such as using the encrypted transmission options of
  the IPFIX framework (such as DTLS <xref target="RFC9147"/>) to ensure the confidentiality and
  integrity of data during transmission.
</t>
<t>
  To defend against Denial-of-Service (DOS) attacks that may be caused by maliciously crafted RoCEv2
  packets and to prevent the exporter from being overloaded by processing a large amount of invalid traffic,
  it is recommended to adopt certain protection strategies, such as configuring reasonable rate limiting policies
  to prevent the monitoring system from being overwhelmed by massive data packets and to ensure its stable operation.
</t>
</section>

<section anchor="IANA Considerations" title="IANA Considerations">
  <section anchor="RoCEv2 BTH IPFIX IEs" title="New IPFIX IEs for RoCEv2 BTH">
    <t>
      This document specifies new IPFIX IEs to enable export of RoCEv2 BTH key fields along
      with other flow information. This document requests IANA to add these IPFIX IEs to
      the "IPFIX Information Elements" registry available at <xref target="IANA-IPFIX"/>.
    </t>
    <t>
      Table 1 lists the new IPFIX IEs for RoCEv2 BTH:
    </t>
    <t><figure>
      <artwork align="center" name="Table 1"><![CDATA[
   +============+==========================+===============+
   | Element ID | Name                     | Reference     |
   +============+======================--==+===============+
   | TBD1       | rdmaOpCode               | This document |
   +------------+--------------------------+---------------+
   | TBD2       | rdmaPartitionKey         | This document |
   +------------+--------------------------+---------------+
   | TBD3       | rdmaDestinationQP        | This document |
   +------------+--------------------------+---------------+
   | TBD4       | rdmaSourceQP             | This document |
   +------------+--------------------------+---------------+
   | TBD5       | rdmaPacketSequenceNumber | This document |
   +------------+--------------------------+---------------+
   | TBD6       | rdmaBTHFlags1            | This document |
   +------------+--------------------------+---------------+
   | TBD7       | rdmaBTHFlags2            | This document |
   +------------+--------------------------+---------------+
   | TBD8       | rdmaBTHFlags3            | This document |
   +------------+--------------------------+---------------+

Table 1: New IEs in the "IPFIX Information Elements" Registry]]></artwork>
    </figure></t>
    <section anchor="IANArdmaOpCode" title="rdmaOpCode">
      <dl>
        <dt>Name:</dt><dd>rdmaOpCode</dd>
      </dl>
      <dl>
        <dt>Element ID:</dt><dd>TBD1</dd>
      </dl>
      <dl>
        <dt>Description:</dt>
        <dd>The RoCEv2 BTH OpCode field, which indicates the type of the InfiniBand Architecture data packet.</dd>
      </dl>
      <dl>
        <dt>Abstract Data Type:</dt><dd>unsigned8</dd>
      </dl>
      <dl>
        <dt>Data Type Semantics:</dt><dd>identifier</dd>
      </dl>
      <dl>
        <dt>Status:</dt><dd>current</dd>
      </dl>
      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANArdmaPartitionKey" title="rdmaPartitionKey">
      <dl>
        <dt>Name:</dt><dd>rdmaPartitionKey</dd>
      </dl>
      <dl>
        <dt>Element ID:</dt><dd>TBD2</dd>
      </dl>
      <dl>
        <dt>Description:</dt>
        <dd>The RoCEv2 BTH Partition Key field, which identifies the logical partition to which the data packet belongs.</dd>
      </dl>
      <dl>
        <dt>Abstract Data Type:</dt><dd>unsigned16</dd>
      </dl>
      <dl>
        <dt>Data Type Semantics:</dt><dd>identifier</dd>
      </dl>
      <dl>
        <dt>Status:</dt><dd>current</dd>
      </dl>
      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANArdmaDestinationQP" title="rdmaDestinationQP">
      <dl>
        <dt>Name:</dt><dd>rdmaDestinationQP</dd>
      </dl>
      <dl>
        <dt>Element ID:</dt><dd>TBD3</dd>
      </dl>
      <dl>
        <dt>Description:</dt>
        <dd>The RoCEv2 BTH Destination Queue Pair (QP) field, indicating the work QP number at the destination.
            The actual effective bits are 24 bits, stored in the lower 24 bits of the 32-bit field, and the higher
            8 bits should be 0.</dd>
      </dl>
      <dl>
        <dt>Abstract Data Type:</dt><dd>unsigned32</dd>
      </dl>
      <dl>
        <dt>Data Type Semantics:</dt><dd>identifier</dd>
      </dl>
      <dl>
        <dt>Status:</dt><dd>current</dd>
      </dl>
      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANArdmaSourceQP" title="rdmaSourceQP">
      <dl>
        <dt>Name:</dt><dd>rdmaSourceQP</dd>
      </dl>
      <dl>
        <dt>Element ID:</dt><dd>TBD4</dd>
      </dl>
      <dl>
        <dt>Description:</dt>
        <dd>The RoCEv2 BTH Source Queue Pair (QP) field (if present), indicating the work QP number at the Source.
            The actual effective bits are 24 bits, stored in the lower 24 bits of the 32-bit field, and the higher
            8 bits should be 0.</dd>
      </dl>
      <dl>
        <dt>Abstract Data Type:</dt><dd>unsigned32</dd>
      </dl>
      <dl>
        <dt>Data Type Semantics:</dt><dd>identifier</dd>
      </dl>
      <dl>
        <dt>Status:</dt><dd>current</dd>
      </dl>
      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANArdmaPacketSequenceNumber" title="rdmaPacketSequenceNumber">
      <dl>
        <dt>Name:</dt><dd>rdmaPacketSequenceNumber</dd>
      </dl>
      <dl>
        <dt>Element ID:</dt><dd>TBD5</dd>
      </dl>
      <dl>
        <dt>Description:</dt>
        <dd>The RoCEv2 BTH Packet Sequence Number (PSN) field, which is used to detect whether data packets are
            lost or duplicated, ensuring the reliability and orderliness of transmission.
            The actual effective bits are 24 bits, stored in the lower 24 bits of the 32-bit field, and the higher
            8 bits should be 0.</dd>
      </dl>
      <dl>
        <dt>Abstract Data Type:</dt><dd>unsigned32</dd>
      </dl>
      <dl>
        <dt>Data Type Semantics:</dt><dd>default</dd>
      </dl>
      <dl>
        <dt>Status:</dt><dd>current</dd>
      </dl>
      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANArdmaBTHFlags1" title="rdmaBTHFlags1">
      <dl>
        <dt>Name:</dt><dd>rdmaBTHFlags1</dd>
      </dl>
      <dl>
        <dt>Element ID:</dt><dd>TBD6</dd>
      </dl>
      <dl>
        <dt>Description:</dt>
        <dd>
            <t indent="0">The SE, M, Pad, and TVer fields of The RoCEv2 BTH.</t>
            <t indent="0">The size of this Information Element is 1 octet.</t>
            <t indent="0"><artwork align="center">
  0 1 2 3 4 5 6 7
+--+-+-+-+-+-+-+-+
|SE|M|Pad|  TVer |
+--+-+-+-+-+-+-+-+

Bits   0: Solicited Event (SE) field.
Bits   1: Migration Request (M) field.
Bits 2-3: Pad Count (Pad) field.
Bits 4-7: Transport Header Version (TVer) field.
</artwork></t>
        </dd>
      </dl>
      <dl>
        <dt>Abstract Data Type:</dt><dd>unsigned8</dd>
      </dl>
      <dl>
        <dt>Data Type Semantics:</dt><dd>default</dd>
      </dl>
      <dl>
        <dt>Status:</dt><dd>current</dd>
      </dl>
      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANArdmaBTHFlags2" title="rdmaBTHFlags2">
      <dl>
        <dt>Name:</dt><dd>rdmaBTHFlags2</dd>
      </dl>
      <dl>
        <dt>Element ID:</dt><dd>TBD7</dd>
      </dl>
      <dl>
        <dt>Description:</dt>
        <dd>
            <t indent="0">The F/R, and B/R fields of The RoCEv2 BTH.</t>
            <t indent="0">The size of this Information Element is 1 octet.</t>
            <t indent="0"><artwork align="center">
  0   1   2   3   4   5   6   7
+---+---+---+---+---+---+---+---+
|F/R|B/R|           Resv        |
+---+---+---+---+---+---+---+---+

Bits   0: Forward Explicit Congestion Notification (FECN)/Res1
          (F/R) field.
Bits   1: Backward Explicit Congestion Notification (BECN)/Res1
          (B/R) field.
Bits 2-7: Reserved field.
</artwork></t>
        </dd>
      </dl>
      <dl>
        <dt>Abstract Data Type:</dt><dd>unsigned8</dd>
      </dl>
      <dl>
        <dt>Data Type Semantics:</dt><dd>flags</dd>
      </dl>
      <dl>
        <dt>Status:</dt><dd>current</dd>
      </dl>
      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANArdmaBTHFlags3" title="rdmaBTHFlags3">
      <dl>
        <dt>Name:</dt><dd>rdmaBTHFlags3</dd>
      </dl>
      <dl>
        <dt>Element ID:</dt><dd>TBD8</dd>
      </dl>
      <dl>
        <dt>Description:</dt>
        <dd>
            <t indent="0">The A field of The RoCEv2 BTH.</t>
            <t indent="0">The size of this Information Element is 1 octet.</t>
            <t indent="0"><artwork align="center">
 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|A|     Resv    |
+-+-+-+-+-+-+-+-+

Bits   0: Acknowledge Request (A) field.
Bits 1-7: Reserved field.
</artwork></t>
        </dd>
      </dl>
      <dl>
        <dt>Abstract Data Type:</dt><dd>unsigned8</dd>
      </dl>
      <dl>
        <dt>Data Type Semantics:</dt><dd>flags</dd>
      </dl>
      <dl>
        <dt>Status:</dt><dd>current</dd>
      </dl>
      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
  </section>
</section>

<!-- <section anchor="Acknowledgements" title="Acknowledgements">
<t>
	The author would like to thank xxx for his valuable input.
</t>
</section> -->

  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
  <references title="References">
    <references title="Normative References">
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5040.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7011.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <!--<?rfc include="reference.I-D.li-dmsc-architecture.xml"?>-->
    </references>
    <references title="Informative References">
        <reference anchor="IBTA-SPEC" target="https://www.infinibandta.org/ibta-specification/">
          <front>
            <title>InfiniBand Architecture Specification</title>
            <author>
              <organization>InfiniBand Trade Association</organization>
            </author>
            <date year="2023" month="December"/>
          </front>
          <seriesInfo name="InfiniBand Architecture Specification" value="Volume 1-2, Release 1.6"/>
        </reference>
        <reference anchor="IANA-IPFIX" target="https://www.iana.org/assignments/ipfix/ipfix.xhtml">
          <front>
            <title>IP Flow Information Export (IPFIX) Entities</title>
            <author/>
            <date>n.d.</date>
          </front>
        </reference>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9147.xml"/>
    </references>
  </references>
  </back>
</rfc>
