[PATCH 0/3] pipeline: extend the IPv6 support
Cristian Dumitrescu
cristian.dumitrescu at intel.com
Tue Feb 13 17:57:34 CET 2024
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
More information about the dev
mailing list