From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wj0-f182.google.com (mail-wj0-f182.google.com [209.85.210.182]) by dpdk.org (Postfix) with ESMTP id F1B6E1E2F for ; Tue, 10 Jan 2017 14:09:01 +0100 (CET) Received: by mail-wj0-f182.google.com with SMTP id i20so82055009wjn.2 for ; Tue, 10 Jan 2017 05:09:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Y3ell5eM8+oIVGWl9GH9DZWkYJtPVfZxTiu9qE2oMIA=; b=mXDcO4ZAGLV9N3+wWBSdJnY9cqjIjy4J+SdnnQY5COVxr6jKvWfURNCK4TLFTOOwWT ymKs0flJcnktuplbB9rmPtrG2B4+ohK8pR4YQvvmLq1sRRXN0FS0hGKJUMrHHUhdfWul BU9P+0YdA4WYOowpFpydMBpKsp3olFe1BLAEYwcE4sclTLU5Qv84I5CcvfVbKpo3xRU5 jdmtD6aAuc6DZrGe5QK6CtxlEQ+nfm7qy4eN0/Qd4Q/cZN9n1Z8X/bvC106JqGcEPgVl nEIuy8Qw/95QxuJMmtsumIJtbJ52n6zHc57z8Ka4rLDsT/SfxUyaO7B9c0YcQjlFbNDu gs2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Y3ell5eM8+oIVGWl9GH9DZWkYJtPVfZxTiu9qE2oMIA=; b=Z5MLm9IydAMpaXzZ2csJT/mitHIX3plmuqgVkSEQmipAL75dVG/RrsN+hBG5PSQoY3 p3/+/seQwbicjIImHI2evgSUmN6aJxNxUy4PJaQ1KAy3j+M0lJRCIgT/M5GT2qxnZzbo uv0WLscuD2YB8FRsBYQCNE4XZiyS6Eb7gHsEBcV6sm/v0aENhZQgWsq8h7mPiIIDsC4r bX9FputnamRAh10NzCUPk6iquPwWZh1n45NqdoDsC30V6c1BasqFNU8CXhrD29TQHe58 IcXANnFySuT0s1Uqsu8eEsXD3Ad51VmqrLn4Ums5BW2KXRipiTxqvzGAQFnHqGtls5y3 jIvA== X-Gm-Message-State: AIkVDXLbxx3diIX7IHp2+n1QQWZCJ02pgxVyzOAb3w7wT8nb81M86Pw90tGohTQVZ/rxh/Rp X-Received: by 10.194.175.69 with SMTP id by5mr2035760wjc.201.1484053741519; Tue, 10 Jan 2017 05:09:01 -0800 (PST) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id r129sm15033068wmd.8.2017.01.10.05.09.00 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 10 Jan 2017 05:09:00 -0800 (PST) From: Adrien Mazarguil To: dev@dpdk.org Cc: John McNamara Date: Tue, 10 Jan 2017 14:08:28 +0100 Message-Id: <603311a3e4fb0e0d86939a0e3a5db4386b259445.1484046037.git.adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Subject: [dpdk-dev] [PATCH 3/5] ethdev: clarify MARK and FLAG actions in flow API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 13:09:02 -0000 Both actions share the PKT_RX_FDIR mbuf flag, as a result there is no way to tell them apart. Moreover, the maximum allowed value for the MARK action may not necessarily cover the entire 32-bit space. Signed-off-by: Adrien Mazarguil Cc: John McNamara --- doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++------------ lib/librte_ether/rte_flow.h | 19 ++++++++++--------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index f415a73..a6acbbf 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -1049,31 +1049,31 @@ flow rules: Action: ``MARK`` ^^^^^^^^^^^^^^^^ -Attaches a 32 bit value to packets. +Attaches an integer value to packets and sets ``PKT_RX_FDIR`` and +``PKT_RX_FDIR_ID`` mbuf flags. -This value is arbitrary and application-defined. For compatibility with FDIR -it is returned in the ``hash.fdir.hi`` mbuf field. ``PKT_RX_FDIR_ID`` is -also set in ``ol_flags``. +This value is arbitrary and application-defined. Maximum allowed value +depends on the underlying implementation. It is returned in the +``hash.fdir.hi`` mbuf field. .. _table_rte_flow_action_mark: .. table:: MARK - +--------+-------------------------------------+ - | Field | Value | - +========+=====================================+ - | ``id`` | 32 bit value to return with packets | - +--------+-------------------------------------+ + +--------+--------------------------------------+ + | Field | Value | + +========+======================================+ + | ``id`` | integer value to return with packets | + +--------+--------------------------------------+ Action: ``FLAG`` ^^^^^^^^^^^^^^^^ -Flag packets. Similar to `Action: MARK`_ but only affects ``ol_flags``. +Flags packets. Similar to `Action: MARK`_ without a specific value; only +sets the ``PKT_RX_FDIR`` mbuf flag. - No configurable properties. -Note: a distinctive flag must be defined for it. - .. _table_rte_flow_action_flag: .. table:: FLAG diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h index 98084ac..c2b9fc5 100644 --- a/lib/librte_ether/rte_flow.h +++ b/lib/librte_ether/rte_flow.h @@ -556,7 +556,8 @@ enum rte_flow_action_type { /** * [META] * - * Attaches a 32 bit value to packets. + * Attaches an integer value to packets and sets PKT_RX_FDIR and + * PKT_RX_FDIR_ID mbuf flags. * * See struct rte_flow_action_mark. */ @@ -565,9 +566,8 @@ enum rte_flow_action_type { /** * [META] * - * Flag packets. Similar to MARK but only affects ol_flags. - * - * Note: a distinctive flag must be defined for it. + * Flags packets. Similar to MARK without a specific value; only + * sets the PKT_RX_FDIR mbuf flag. * * No associated configuration structure. */ @@ -640,14 +640,15 @@ enum rte_flow_action_type { /** * RTE_FLOW_ACTION_TYPE_MARK * - * Attaches a 32 bit value to packets. + * Attaches an integer value to packets and sets PKT_RX_FDIR and + * PKT_RX_FDIR_ID mbuf flags. * - * This value is arbitrary and application-defined. For compatibility with - * FDIR it is returned in the hash.fdir.hi mbuf field. PKT_RX_FDIR_ID is - * also set in ol_flags. + * This value is arbitrary and application-defined. Maximum allowed value + * depends on the underlying implementation. It is returned in the + * hash.fdir.hi mbuf field. */ struct rte_flow_action_mark { - uint32_t id; /**< 32 bit value to return with packets. */ + uint32_t id; /**< Integer value to return with packets. */ }; /** -- 2.1.4