DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] pipeline: extend the IPv6 support
@ 2024-02-13 16:57 Cristian Dumitrescu
  2024-02-13 16:57 ` [PATCH 1/3] pipeline: add new instruction for upper half of IPv6 address Cristian Dumitrescu
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Cristian Dumitrescu @ 2024-02-13 16:57 UTC (permalink / raw)
  To: dev

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-19  0:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 16:57 [PATCH 0/3] pipeline: extend the IPv6 support Cristian Dumitrescu
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

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).