DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shachar Beiser <shacharbe@mellanox.com>
To: dev@dpdk.org
Cc: Shachar Beiser <shacharbe@mellanox.com>,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Subject: [dpdk-dev] [PATCH 1/2] lib/net: add IPv6 header fields macros
Date: Sun, 31 Dec 2017 07:34:29 +0000	[thread overview]
Message-ID: <07cfe9a606927b551c3530a2b910ef88547d9118.1514705637.git.shacharbe@mellanox.com> (raw)

Support IPv6 header vtc_flow fields : tc , flow_label

Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
---
 lib/librte_net/rte_ip.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index 73ec398..75b9cc3 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -406,6 +406,12 @@ struct ipv6_hdr {
 	uint8_t  dst_addr[16]; /**< IP address of destination host(s). */
 } __attribute__((__packed__));
 
+/* IPv6 vtc_flow: IPv / TC / flow_label */
+#define IPV6_HDR_FL_SHIFT (0)
+#define IPV6_HDR_TC_SHIFT (20)
+#define IPV6_HDR_FL_MASK ((1 << IPV6_HDR_TC_SHIFT) - 1)
+#define IPV6_HDR_TC_MASK (0xf << IPV6_HDR_TC_SHIFT)
+
 /**
  * Process the pseudo-header checksum of an IPv6 header.
  *
-- 
1.8.3.1

             reply	other threads:[~2017-12-31  7:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-31  7:34 Shachar Beiser [this message]
2017-12-31  7:34 ` [dpdk-dev] [PATCH 2/2] net/mlx5: fix IPv6 header fields Shachar Beiser
2018-01-02 19:56   ` Yongseok Koh
2017-12-31 17:37 ` [dpdk-dev] [PATCH 1/2] lib/net: add IPv6 header fields macros Stephen Hemminger
2018-01-16  9:17 ` [dpdk-dev] [PATCH v2 " Shahaf Shuler
2018-01-17 16:53   ` Ferruh Yigit
2018-01-18 13:57     ` Olivier Matz
2018-01-18 15:07       ` Ferruh Yigit
2018-01-16  9:17 ` [dpdk-dev] [PATCH v2 2/2] net/mlx5: fix IPv6 header fields Shahaf Shuler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=07cfe9a606927b551c3530a2b910ef88547d9118.1514705637.git.shacharbe@mellanox.com \
    --to=shacharbe@mellanox.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=nelio.laranjeiro@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).