From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f68.google.com (mail-pa0-f68.google.com [209.85.220.68]) by dpdk.org (Postfix) with ESMTP id 64CFFB446 for ; Tue, 21 Jun 2016 12:58:50 +0200 (CEST) Received: by mail-pa0-f68.google.com with SMTP id hf6so1130077pac.2 for ; Tue, 21 Jun 2016 03:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YmBMYug+DbAfl1yvztzwXEKhnplVAtzPuGi8nbN8wts=; b=ZGL2GqJlHouAB4Lpiskxc6XRmSZAO5w44phQ4Tx/Sii8zLEaUM0SY7S5HvJl6+FRLF 8Kmi5urU843ppR1V6liz+E9BdO4bWxCUtX0SZRq9bNen2f01sD37hEFjxKjBgemVARID psMqb7oj9tXYqT0jJf2lx77LfCuUr2vPpgqghkAZKAT8tM1a+fIUTGh77L98TLEojP0o XMimDMpwhNbPgs0mI4fRo8NTjNZmem7O82EeTC0XmhJlQ7P4SSvN9rZbLiaVea4ZifHx TJ7KTgvtc56G7og1jZa30rNvFowC5+FoWd4Lx8Xt69WmeEmvQrMWMX9BTNmHzlLohz2u 8lzA== 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:in-reply-to :references; bh=YmBMYug+DbAfl1yvztzwXEKhnplVAtzPuGi8nbN8wts=; b=KJ8KFA1ENi9Eb2f1vtSrJe6+UNWz+QJyn3xK3p60m9UUSw17dS9kjK07RApzhVavW5 exCh6dQFn07qUIc080bUk40qo+dyIkRl5qLip8rrOEAmmfiRd1cwOUKWlx8iItQJuggP MLqiRS/WYEesfxeJbSbCJJw9CedcPvDh/R9y+n5rr6JtY1FDBCtz+jyzLb1GW+T8hm2P 7nfY8bd4qPeKuqMNplPFW7nbrxyacgojBS57kA13vI5lArQEv1DTOghGb6L8kSCqZuWd xarDHcuyzdkqUn2lZxJvJlFvbSvUTvJJYtXjPwMFULztvnKvgW9aXUd8UOA467z1XXcX QPtA== X-Gm-Message-State: ALyK8tK/+SkdUD8oB2xqWGsljkPqjjEJsXcv2q4IkN2xPQtd6j+YijG7WiifkbkXAJaASQ== X-Received: by 10.66.234.65 with SMTP id uc1mr27806794pac.81.1466506729514; Tue, 21 Jun 2016 03:58:49 -0700 (PDT) Received: from localhost.localdomain ([103.17.196.228]) by smtp.gmail.com with ESMTPSA id g189sm24175083pfc.46.2016.06.21.03.58.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Jun 2016 03:58:49 -0700 (PDT) From: Ethan Zhuang To: cristian.dumitrescu@intel.com Cc: dev@dpdk.org, jasvinder.singh@intel.com, ferruh.yigit@intel.com, WeiJie Zhuang Date: Tue, 21 Jun 2016 18:55:55 +0800 Message-Id: <1466506555-4236-4-git-send-email-zhuangwj@gmail.com> X-Mailer: git-send-email 2.6.4.windows.1 In-Reply-To: <1466506555-4236-1-git-send-email-zhuangwj@gmail.com> References: <1464434757-10860-1-git-send-email-zhuangwj@gmail.com> <1466506555-4236-1-git-send-email-zhuangwj@gmail.com> Subject: [dpdk-dev] [PATCH v4 4/4] doc: kni port support in the packet framework X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2016 10:58:50 -0000 From: WeiJie Zhuang add some descriptions for the kni port in the packet framework Signed-off-by: WeiJie Zhuang --- doc/api/doxy-api-index.md | 1 + doc/guides/sample_app_ug/ip_pipeline.rst | 112 +++++++++++++++++++++++-------- 2 files changed, 84 insertions(+), 29 deletions(-) diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md index f626386..5e7f024 100644 --- a/doc/api/doxy-api-index.md +++ b/doc/api/doxy-api-index.md @@ -118,6 +118,7 @@ There are many libraries, so their headers may be grouped by topics: [frag] (@ref rte_port_frag.h), [reass] (@ref rte_port_ras.h), [sched] (@ref rte_port_sched.h), + [kni] (@ref rte_port_kni.h), [src/sink] (@ref rte_port_source_sink.h) * [table] (@ref rte_table.h): [lpm IPv4] (@ref rte_table_lpm.h), diff --git a/doc/guides/sample_app_ug/ip_pipeline.rst b/doc/guides/sample_app_ug/ip_pipeline.rst index 899fd4a..09cbc17 100644 --- a/doc/guides/sample_app_ug/ip_pipeline.rst +++ b/doc/guides/sample_app_ug/ip_pipeline.rst @@ -1,5 +1,5 @@ .. BSD LICENSE - Copyright(c) 2015 Intel Corporation. All rights reserved. + Copyright(c) 2015-2016 Intel Corporation. All rights reserved. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -351,33 +351,35 @@ Application resources present in the configuration file .. table:: Application resource names in the configuration file - +--------------------------+-----------------------------+-------------------------------------------------+ - | Resource type | Format | Examples | - +==========================+=============================+=================================================+ - | Pipeline | ``PIPELINE`` | ``PIPELINE0``, ``PIPELINE1`` | - +--------------------------+-----------------------------+-------------------------------------------------+ - | Mempool | ``MEMPOOL`` | ``MEMPOOL0``, ``MEMPOOL1`` | - +--------------------------+-----------------------------+-------------------------------------------------+ - | Link (network interface) | ``LINK`` | ``LINK0``, ``LINK1`` | - +--------------------------+-----------------------------+-------------------------------------------------+ - | Link RX queue | ``RXQ.`` | ``RXQ0.0``, ``RXQ1.5`` | - +--------------------------+-----------------------------+-------------------------------------------------+ - | Link TX queue | ``TXQ.`` | ``TXQ0.0``, ``TXQ1.5`` | - +--------------------------+-----------------------------+-------------------------------------------------+ - | Software queue | ``SWQ`` | ``SWQ0``, ``SWQ1`` | - +--------------------------+-----------------------------+-------------------------------------------------+ - | Traffic Manager | ``TM`` | ``TM0``, ``TM1`` | - +--------------------------+-----------------------------+-------------------------------------------------+ - | Source | ``SOURCE`` | ``SOURCE0``, ``SOURCE1`` | - +--------------------------+-----------------------------+-------------------------------------------------+ - | Sink | ``SINK`` | ``SINK0``, ``SINK1`` | - +--------------------------+-----------------------------+-------------------------------------------------+ - | Message queue | ``MSGQ`` | ``MSGQ0``, ``MSGQ1``, | - | | ``MSGQ-REQ-PIPELINE`` | ``MSGQ-REQ-PIPELINE2``, ``MSGQ-RSP-PIPELINE2,`` | - | | ``MSGQ-RSP-PIPELINE`` | ``MSGQ-REQ-CORE-s0c1``, ``MSGQ-RSP-CORE-s0c1`` | - | | ``MSGQ-REQ-CORE-`` | | - | | ``MSGQ-RSP-CORE-`` | | - +--------------------------+-----------------------------+-------------------------------------------------+ + +----------------------------+-----------------------------+-------------------------------------------------+ + | Resource type | Format | Examples | + +============================+=============================+=================================================+ + | Pipeline | ``PIPELINE`` | ``PIPELINE0``, ``PIPELINE1`` | + +----------------------------+-----------------------------+-------------------------------------------------+ + | Mempool | ``MEMPOOL`` | ``MEMPOOL0``, ``MEMPOOL1`` | + +----------------------------+-----------------------------+-------------------------------------------------+ + | Link (network interface) | ``LINK`` | ``LINK0``, ``LINK1`` | + +----------------------------+-----------------------------+-------------------------------------------------+ + | Link RX queue | ``RXQ.`` | ``RXQ0.0``, ``RXQ1.5`` | + +----------------------------+-----------------------------+-------------------------------------------------+ + | Link TX queue | ``TXQ.`` | ``TXQ0.0``, ``TXQ1.5`` | + +----------------------------+-----------------------------+-------------------------------------------------+ + | Software queue | ``SWQ`` | ``SWQ0``, ``SWQ1`` | + +----------------------------+-----------------------------+-------------------------------------------------+ + | Traffic Manager | ``TM`` | ``TM0``, ``TM1`` | + +----------------------------+-----------------------------+-------------------------------------------------+ + | KNI (kernel NIC interface) | ``KNI`` | ``KNI0``, ``KNI1`` | + +----------------------------+-----------------------------+-------------------------------------------------+ + | Source | ``SOURCE`` | ``SOURCE0``, ``SOURCE1`` | + +----------------------------+-----------------------------+-------------------------------------------------+ + | Sink | ``SINK`` | ``SINK0``, ``SINK1`` | + +----------------------------+-----------------------------+-------------------------------------------------+ + | Message queue | ``MSGQ`` | ``MSGQ0``, ``MSGQ1``, | + | | ``MSGQ-REQ-PIPELINE`` | ``MSGQ-REQ-PIPELINE2``, ``MSGQ-RSP-PIPELINE2,`` | + | | ``MSGQ-RSP-PIPELINE`` | ``MSGQ-REQ-CORE-s0c1``, ``MSGQ-RSP-CORE-s0c1`` | + | | ``MSGQ-REQ-CORE-`` | | + | | ``MSGQ-RSP-CORE-`` | | + +----------------------------+-----------------------------+-------------------------------------------------+ ``LINK`` instances are created implicitly based on the ``PORT_MASK`` application startup argument. ``LINK0`` is the first port enabled in the ``PORT_MASK``, port 1 is the next one, etc. @@ -386,7 +388,7 @@ For example, if bit 5 is the first bit set in the bitmask, then ``LINK0`` is hav This mechanism creates a contiguous LINK ID space and isolates the configuration file against changes in the board PCIe slots where NICs are plugged in. -``RXQ``, ``TXQ`` and ``TM`` instances have the LINK ID as part of their name. +``RXQ``, ``TXQ``, ``TM`` and ``KNI`` instances have the LINK ID as part of their name. For example, ``RXQ2.1``, ``TXQ2.1`` and ``TM2`` are all associated with ``LINK2``. @@ -707,6 +709,58 @@ TM section +---------------+---------------------------------------------+----------+----------+---------------+ +KNI section +~~~~~~~~~~~ + +.. _table_ip_pipelines_kni_section: + +.. tabularcolumns:: |p{2.5cm}|p{7cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}| + +.. table:: Configuration file KNI section + + +---------------+----------------------------------------------+----------+------------------+---------------+ + | Section | Description | Optional | Type | Default value | + +===============+==============================================+==========+==================+===============+ + | core | CPU core to run the KNI kernel thread. | YES | See "CPU Core | Not set | + | | When core config is set, the KNI kernel | | notation" | | + | | thread will be bound to the particular core. | | | | + | | When core config is not set, the KNI kernel | | | | + | | thread will be scheduled by the OS. | | | | + +---------------+----------------------------------------------+----------+------------------+---------------+ + | mempool | Mempool to use for buffer allocation for | YES | uint32_t | MEMPOOL0 | + | | current KNI port. The mempool ID has | | | | + | | to be associated with a valid instance | | | | + | | defined in the mempool entry of the global | | | | + | | section. | | | | + +---------------+----------------------------------------------+----------+------------------+---------------+ + | burst_read | Read burst size (number of packets) | YES | uint32_t | 32 | + | | | | power of 2 | | + | | | | 0 < burst < size | | + +---------------+----------------------------------------------+----------+------------------+---------------+ + | burst_write | Write burst size (number of packets) | YES | uint32_t | 32 | + | | | | power of 2 | | + | | | | 0 < burst < size | | + +---------------+----------------------------------------------+----------+------------------+---------------+ + | dropless | When dropless is set to NO, packets can be | YES | YES/NO | NO | + | | dropped if not enough free slots are | | | | + | | currently available in the queue, so the | | | | + | | write operation to the queue is non- | | | | + | | blocking. | | | | + | | When dropless is set to YES, packets cannot | | | | + | | be dropped if not enough free slots are | | | | + | | currently available in the queue, so the | | | | + | | write operation to the queue is blocking, as | | | | + | | the write operation is retried until enough | | | | + | | free slots become available and all the | | | | + | | packets are successfully written to the | | | | + | | queue. | | | | + +---------------+----------------------------------------------+----------+------------------+---------------+ + | n_retries | Number of retries. Valid only when dropless | YES | uint64_t | 0 | + | | is set to YES. When set to 0, it indicates | | | | + | | unlimited number of retries. | | | | + +---------------+----------------------------------------------+----------+------------------+---------------+ + + SOURCE section ~~~~~~~~~~~~~~ -- 2.7.4