From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0F87343B0C; Tue, 13 Feb 2024 17:59:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A0B842E31; Tue, 13 Feb 2024 17:58:52 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by mails.dpdk.org (Postfix) with ESMTP id BC5C342E0C for ; Tue, 13 Feb 2024 17:58:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707843528; x=1739379528; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=Fe/maaQjEtvk+0CpIen+yzo9YRZKeGy3PtmIZkzrgKg=; b=Qb7LpNzI28HnSnfeejPKDgdjYKLw5+Zr5uprQ5ri5ANoveqvvfvgRsR+ ZymHcABu2CK8DIdG86oVPQWg9wc2b+et5jnYhe6o5JeMqge4VULweQux8 HxeBzNg+mwd/rIcxEZ5zvrhzGvSe7xR1ZfjRAxqdjCbod2n6A3MgVsgU2 N42/TSL3oNrIoy6qjK/MWbq7fVcqRn5htoEFhOlb1Bnl0PBA5i6r60Q1g duo75iMK+21ST5RF+09p43o3SOBOBgZbNfkYkSVwoZGnv1DiSNMfl+8zr i86hxyvO1NTTpHFisz9IpMcuC6pGgErWvqGZE3GN6Kzp2C2X7No+6uWKl g==; X-IronPort-AV: E=McAfee;i="6600,9927,10982"; a="2000497" X-IronPort-AV: E=Sophos;i="6.06,157,1705392000"; d="scan'208";a="2000497" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2024 08:57:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,157,1705392000"; d="scan'208";a="2855751" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com) ([10.237.223.184]) by fmviesa007.fm.intel.com with ESMTP; 13 Feb 2024 08:57:38 -0800 From: Cristian Dumitrescu To: dev@dpdk.org Subject: [PATCH 0/3] pipeline: extend the IPv6 support Date: Tue, 13 Feb 2024 16:57:34 +0000 Message-Id: <20240213165737.1534180-1-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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