DPDK patches and discussions
 help / color / mirror / Atom feed
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Subject: [PATCH 0/3] pipeline: extend the IPv6 support
Date: Tue, 13 Feb 2024 16:57:34 +0000	[thread overview]
Message-ID: <20240213165737.1534180-1-cristian.dumitrescu@intel.com> (raw)

So far, the pipeline supports the following operations on IPv6 addresses:
-using an IPv6 address as a table match field of exact/ternary/LPM match type
-assignment of IPv6 address to another IPv6 address
-conversion between an IPv4 address and an IPv6 address

The reason for this limited support is the fact that CPUs have 64-bit registers,
so supporting operations on 128-bit variables requires additional logic.

We are now adding support for the following operations involving IPv6 addresses:
-logic operations: AND, OR, XOR
-shift left/right
-equality/inequality tests

The way we do this is by introducing a new instruction (called "movh") to read
and write the upper half of a 128-bit operand and optimizing the existing
instruction (called "mov"). This way, we can split an IPv6 address into its
upper half and lower half and use the existing 64-bit instructions to handle the
required operations.

We are still not supporting the following operations on IPv6 addresses, as they
seem of very little practical use: addition, subtraction, multiplication and
division.

Cristian Dumitrescu (3):
  pipeline: add new instruction for upper half of IPv6 address
  pipeline: optimize conversion between IPv4 and IPv6 addresses
  examples/pipeline: add example for IPv6 address swap

 examples/pipeline/examples/ipv6_addr_swap.cli |  35 ++++
 .../pipeline/examples/ipv6_addr_swap.spec     |  83 ++++++++++
 lib/pipeline/rte_swx_pipeline.c               | 155 ++++++++++++++++++
 lib/pipeline/rte_swx_pipeline_internal.h      | 104 +++++++++++-
 4 files changed, 373 insertions(+), 4 deletions(-)
 create mode 100644 examples/pipeline/examples/ipv6_addr_swap.cli
 create mode 100644 examples/pipeline/examples/ipv6_addr_swap.spec

-- 
2.34.1


             reply	other threads:[~2024-02-13 16:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-13 16:57 Cristian Dumitrescu [this message]
2024-02-13 16:57 ` [PATCH 1/3] pipeline: add new instruction for upper half of IPv6 address Cristian Dumitrescu
2024-02-13 16:57 ` [PATCH 2/3] pipeline: optimize conversion between IPv4 and IPv6 addresses Cristian Dumitrescu
2024-02-13 16:57 ` [PATCH 3/3] examples/pipeline: add example for IPv6 address swap Cristian Dumitrescu
2024-02-19  0:46 ` [PATCH 0/3] pipeline: extend the IPv6 support Thomas Monjalon

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=20240213165737.1534180-1-cristian.dumitrescu@intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    /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).