get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/138147/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 138147,
    "url": "http://patches.dpdk.org/api/patches/138147/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240311024939.2523778-3-chaoyong.he@corigine.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20240311024939.2523778-3-chaoyong.he@corigine.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240311024939.2523778-3-chaoyong.he@corigine.com",
    "date": "2024-03-11T02:49:39",
    "name": "[2/2] net/nfp: fix data endianness problem",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "61578e5a855bcdeef73aeb85b199277f45c3f099",
    "submitter": {
        "id": 2554,
        "url": "http://patches.dpdk.org/api/people/2554/?format=api",
        "name": "Chaoyong He",
        "email": "chaoyong.he@corigine.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240311024939.2523778-3-chaoyong.he@corigine.com/mbox/",
    "series": [
        {
            "id": 31455,
            "url": "http://patches.dpdk.org/api/series/31455/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31455",
            "date": "2024-03-11T02:49:37",
            "name": "fix IPSec endianness problem",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/31455/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/138147/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/138147/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id AEF2243C7F;\n\tMon, 11 Mar 2024 03:50:18 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A70A840685;\n\tMon, 11 Mar 2024 03:50:06 +0100 (CET)",
            "from NAM12-BN8-obe.outbound.protection.outlook.com\n (mail-bn8nam12on2100.outbound.protection.outlook.com [40.107.237.100])\n by mails.dpdk.org (Postfix) with ESMTP id CC12C402DF;\n Mon, 11 Mar 2024 03:50:03 +0100 (CET)",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5)\n by PH7PR13MB6244.namprd13.prod.outlook.com (2603:10b6:510:247::19)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.33; Mon, 11 Mar\n 2024 02:50:02 +0000",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::ec12:7411:559a:850e]) by SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::ec12:7411:559a:850e%5]) with mapi id 15.20.7339.035; Mon, 11 Mar 2024\n 02:50:02 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=c30ZFlp5dQ0PQC2Y928Tl/SAZhlESqX/I17KDw36hfVFIEi50L8+sVs935LgefrFO1ngHAPT+AgnJElCN/6NJaRenbUmNYrL0DbfcYFRgkAFF2VTTQhInRiH1sQX6+d0NZ7u7Qmi9e5NpYAx32s8h5uJFQO+b5Bc2Gu2XlaaD3R5UDIkd1GDf2UVDsL4CZ8Edj54X/QQh12AeBTajgAmJe48Tiyqm68DY4+crdpSMtZ7+vjmu7g4Yhwrb4spB4o4ue1vzYV1p8KwA+Dcl+1gPG4bu6rVVge4xJBprrIqG0eOz7lTniJVnfMKYwyybbluUpOZ4pdG8nCZymOSCOOtLA==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=UJKfLTxuE7TdJkGGWmJtyJjelDKXDbQAgwlspSYBgVk=;\n b=gzBvJISiZuk+nSPqh3kTUUOdy/4Xi7nVyNjbyQKWW6vPXdWVQWkwr04iDDe+5H1g2fqOjEziEuTYUlpTVlupFEOWzPJLUdg3rRJ0ianP66BARhG6BvS2MHNnE7OsC2oNflyaoCXsKsHmsh6rhPWQMkQ0UBEAMci4WSuhSEJzAic0hoa9WyeTTx6yxw3QUlyKghqOwAudLbP68lAaqeZysv2O/f8hPxshU+/X3mrJL3FKwPC3yJDtNfi8cTdhBpaCsljll9KC5LQt56wtYZvg/5GtNytVNmsi2Pck3fQkhldx079M8V5R9HAFg5nFseK18i2l2yziofA4IKZPul77qQ==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com;\n dkim=pass header.d=corigine.com; arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=UJKfLTxuE7TdJkGGWmJtyJjelDKXDbQAgwlspSYBgVk=;\n b=Ndw0widf4VB2iMf0fzQcf1Wf/E5/jkoLBb/wEw2QgqDYVBua2xzI+xjLx1JxCnJmexiHkUSrdM+V22ag0Qjoa3g5XkEpGerV0vLI48My1Tt9BPC1mjwU2mZ/KFXG3lcvDpo7Yo0Jj7Lqh/C0PCMAhcj3f9e84CE58T1CkrWnmxk=",
        "Authentication-Results": "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=corigine.com;",
        "From": "Chaoyong He <chaoyong.he@corigine.com>",
        "To": "dev@dpdk.org",
        "Cc": "oss-drivers@corigine.com, Shihong Wang <shihong.wang@corigine.com>,\n stable@dpdk.org, Chaoyong He <chaoyong.he@corigine.com>",
        "Subject": "[PATCH 2/2] net/nfp: fix data endianness problem",
        "Date": "Mon, 11 Mar 2024 10:49:39 +0800",
        "Message-Id": "<20240311024939.2523778-3-chaoyong.he@corigine.com>",
        "X-Mailer": "git-send-email 2.39.1",
        "In-Reply-To": "<20240311024939.2523778-1-chaoyong.he@corigine.com>",
        "References": "<20240311024939.2523778-1-chaoyong.he@corigine.com>",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "PH1PEPF000132E8.NAMP220.PROD.OUTLOOK.COM\n (2603:10b6:518:1::28) To SJ0PR13MB5545.namprd13.prod.outlook.com\n (2603:10b6:a03:424::5)",
        "MIME-Version": "1.0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "SJ0PR13MB5545:EE_|PH7PR13MB6244:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "1f922fbb-7e5d-4e24-fb48-08dc4175f2cc",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n YW0irBcJOa0fzCVeZASG14kEG2k39Cg59YBYqCEEQsDvNrwaBiF0IP7Zbgu2b6komQf5a7WaDmPdCx/nqNuWWGDR2f5qbckMLNBZpgxFSXNlonwCl/DqrFI/TaTdUK9XGfwelir/qHJC8vJvDDWgCDFc3BJXYURCiFoNnA5Skxx6ERSdLKQWlLQW/kJ1J4Eos0CxSQ0f3GnHJU3g0mSZS4ojg1bPcXDZmo4zCx7vl/hF2OXKlbDvavwMM+WkEW2LkWSndxenUBhHiELSGUKyKsXShw6L1cGU9JEIfjVgv5JlTnjF8XEjDyCVrVHoAP6SEQa2Bgy0b/LL5u+0/nJIuHWJPjm1Tjj5ILM8vseX+JjyZoMYu/HQ2ZVeldlzr6M8n9EX6fu/ruvQDI8OaMWvYpVxTSvX7dCDaEqvYX0CrEAWdUTEgFdVNi5JrxvB43CHLNP9rhKFzM0rOev00JKzr8HcDfpcWLDgYz22k66rBwvBp3uts+z8SkSkGKaMSGA5KNCwl6x54v0wGqP7KHmdJi/o+C3ICbTnrcQF2qhxNPqSOMzaDIIkYUcN1RUYeuOc6nVYmMeZcyOMMRWKpb8eNmGOG5V5oLc2N78jR8ADt0F8+KuZVi1gSe4T7cNtMPfU4sp1YecHuM7vGb10KBsIRyWM4INhCBfOuKj1VtBLMypeYdr3eLxnHvRwYB55S62dtitdY0vmUeEQYikc0x4jrAt8CHlAD2gaCDP/XaxOoB4=",
        "X-Forefront-Antispam-Report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE;\n SFS:(13230031)(376005)(1800799015)(52116005)(38350700005); DIR:OUT; SFP:1102;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n aNXItK8K/UvNVcKi7ga2N9XOLC0jMHsGvAJP4hWUkcdfAWc54zK0+MBJGTlXmCzgNznoN61OK083j+nARM0MsWjXp8XSGEHyj+aSqSBBfPsHA+5pbLSjDcnLMf3VlMHjISTkZ2qgiKieMTaNIRDaV47sMJrlLjn8bhEJSHoYsFpcOHgbjfr4Sd9SjaMiiXyvTCRoQxcWdlZuWoqxeAof/nHYFO8He/5tUzxrrjXHFeO/x5H8DjMwmfElCGnlohAQ0pcJC3zK39cc5nR9hiC7CeNjSz5CMt6uGtXDSngu7V8hOKAk3SXyHMYiVBRtGr58r4PvM5nUpn+aA4n6tZ+Gz65p5IJfLmRzmQo31aKzfSKCfa3W8d+aTZ0EzHAFroBJZ5oyxXiquIGb9FQZXUilqr3fHjxaXN30Lg68ddXgIZVU1DCq6//ooeM3UwJHxoasry5lu8qaAz04atQth4/H2ycfmH8k+gIVDUDe/+iSx3e7ddch0eIhm3aWomlaGWa4GMd5MQsD+NIfbUAQBxbT+zcZH2suCS3QYa2J+ADuzzaxPVGqnEP50M8MwAuhX9yh5M+4Wa13ANKzxlXy7pac4Ki6BbBDooI/SOono1+obG6yNVg7U+6a/8KrrGqZbRfXHs1M/sxy6DUSiJWWMvHfaoownLvnrK+UYln+LscEMXEuqK3/QIz2+U4CAMdgV9JVycWWWlMOYzVNq4Bmp+xFSOq80Iuhlg796jQz29S+2+KiLgq+850nfz+JPBgziNoT/mhFBJpxQlqs1jvu8zorCiypUwWhRgakgiswHBFSPieFnQRRRc7mwVW2ZW4D631/rqt+FZZDlEOrW5yxJfsPRxxpwRMNgIDxenhDXZKq1ZTBDcqI4+NbS1R6hqZLtT9s9rYvUVvcUyF942oX/o1a5NkVCZZBkIddEnaWSigcJYKZW1c8i/eGyJ/Au9EZwNx5dF9Cqwc45aA8iwu+/+HZipMaGJt3Fllw4+j5FaXAUkWVMW041XpjzuQg3vRfbxDDo1UxMo9qVee5JNsp2V/OO7JBayn0Oz84XSIrjDNkh1Zp+GimzhA6Xj8TbouYW/V62GJRSWyZ6fWpVkyVheYm4tM5xxyORsQFo2BhM4d+b3lUIP6c497KKTlIRwTbqsephm4iHFE3O0n7IlEIBdGohxFnXbrZy0jEKRlD9vqQGwZlOzw9c9SI8whGOLVDv6v+nZU0NAzbixU+qSRz+6aX7fIXragiIceE1hd+CMVcBjkV83hh63gEZJC0MNTwzkuLFsfuC0LmA9ilksNYb59BFICSbZMwN9VJkGgWTl6JLbWGdzXetacNbZ8/3h1jMd1OUwNwss5CZSDUmbelZOcHzuM3IBp7SsziGDDyUGennlsJa2oPV7h6u4JboBmTsYR+QW4yxrOrorBVp6cHvghArDk5JgfJ++DOhyBXCSLbzr9/j2Ffl2sFe8dz7h8PVKEoJEhOEP6tnaKDRY+dUaMEfz0erG7t+USKsXvi0sU4iDB4K3UIpwbzVzm/aLEZAZvWUArxr6cYy6bMXGNRVx/R1T77sG92fR8uJdKuZWHJhoObP+MuVKMr3j9lQ75HbTL9o/RxZfFLkMZpL2qySFXL/w==",
        "X-OriginatorOrg": "corigine.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 1f922fbb-7e5d-4e24-fb48-08dc4175f2cc",
        "X-MS-Exchange-CrossTenant-AuthSource": "SJ0PR13MB5545.namprd13.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "11 Mar 2024 02:50:02.3458 (UTC)",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "fe128f2c-073b-4c20-818e-7246a585940c",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n wxUwzDHkeMa2PDarLVk8+mFcF1qS1ciGpn5ZyIfmqt5VelS/zfisrS3+Nx5M6oEXYHfFs2wKxgAmQayRAcxvymE/fwEKeIM9xwD3jznqc9c=",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PH7PR13MB6244",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "From: Shihong Wang <shihong.wang@corigine.com>\n\nThe algorithm key of the security framework is stored in the u8\narray according to big-endian, and the driver algorithm key is\nCPU-endian of u32, so it maybe need to convert the endianness order\nto ensure that the value assigned to the driver is CPU-endian.\n\nThis patch removes the operation of converting IPsec Tx metadata\nto big-endian to ensure that IPsec Tx metadata is CPU-endian.\n\nFixes: 547137405be7 (\"net/nfp: initialize IPsec related content\")\nFixes: 3d21da66c06b (\"net/nfp: create security session\")\nFixes: 310a1780581e (\"net/nfp: support IPsec Rx and Tx offload\")\nCc: stable@dpdk.org\n\nSigned-off-by: Shihong Wang <shihong.wang@corigine.com>\nReviewed-by: Chaoyong He <chaoyong.he@corigine.com>\n---\n drivers/net/nfp/nfp_ipsec.c | 72 +++++++++++++++++++++++--------------\n drivers/net/nfp/nfp_ipsec.h |  9 ++---\n 2 files changed, 47 insertions(+), 34 deletions(-)",
    "diff": "diff --git a/drivers/net/nfp/nfp_ipsec.c b/drivers/net/nfp/nfp_ipsec.c\nindex 0b815fa983..8824533656 100644\n--- a/drivers/net/nfp/nfp_ipsec.c\n+++ b/drivers/net/nfp/nfp_ipsec.c\n@@ -20,6 +20,7 @@\n #include \"nfp_rxtx.h\"\n \n #define NFP_UDP_ESP_PORT            4500\n+#define NFP_ESP_IV_LENGTH           8\n \n static const struct rte_cryptodev_capabilities nfp_crypto_caps[] = {\n \t{\n@@ -523,7 +524,8 @@ nfp_aesgcm_iv_update(struct ipsec_add_sa *cfg,\n \tchar *save;\n \tchar *iv_b;\n \tchar *iv_str;\n-\tuint8_t *cfg_iv;\n+\tconst rte_be32_t *iv_value;\n+\tuint8_t cfg_iv[NFP_ESP_IV_LENGTH];\n \n \tiv_str = strdup(iv_string);\n \tif (iv_str == NULL) {\n@@ -531,8 +533,6 @@ nfp_aesgcm_iv_update(struct ipsec_add_sa *cfg,\n \t\treturn;\n \t}\n \n-\tcfg_iv = (uint8_t *)cfg->aesgcm_fields.iv;\n-\n \tfor (i = 0; i < iv_len; i++) {\n \t\tiv_b = strtok_r(i ? NULL : iv_str, \",\", &save);\n \t\tif (iv_b == NULL)\n@@ -541,8 +541,9 @@ nfp_aesgcm_iv_update(struct ipsec_add_sa *cfg,\n \t\tcfg_iv[i] = strtoul(iv_b, NULL, 0);\n \t}\n \n-\t*(uint32_t *)cfg_iv = rte_be_to_cpu_32(*(uint32_t *)cfg_iv);\n-\t*(uint32_t *)&cfg_iv[4] = rte_be_to_cpu_32(*(uint32_t *)&cfg_iv[4]);\n+\tiv_value = (const rte_be32_t *)(cfg_iv);\n+\tcfg->aesgcm_fields.iv[0] = rte_be_to_cpu_32(iv_value[0]);\n+\tcfg->aesgcm_fields.iv[1] = rte_be_to_cpu_32(iv_value[1]);\n \n \tfree(iv_str);\n }\n@@ -583,7 +584,7 @@ nfp_aead_map(struct rte_eth_dev *eth_dev,\n \tuint32_t offset;\n \tuint32_t device_id;\n \tconst char *iv_str;\n-\tconst uint32_t *key;\n+\tconst rte_be32_t *key;\n \tstruct nfp_net_hw *net_hw;\n \n \tnet_hw = eth_dev->data->dev_private;\n@@ -633,7 +634,7 @@ nfp_aead_map(struct rte_eth_dev *eth_dev,\n \t\treturn -EINVAL;\n \t}\n \n-\tkey = (const uint32_t *)(aead->key.data);\n+\tkey = (const rte_be32_t *)(aead->key.data);\n \n \t/*\n \t * The CHACHA20's key order needs to be adjusted based on hardware design.\n@@ -645,16 +646,22 @@ nfp_aead_map(struct rte_eth_dev *eth_dev,\n \n \tfor (i = 0; i < key_length / sizeof(cfg->cipher_key[0]); i++) {\n \t\tindex = (i + offset) % (key_length / sizeof(cfg->cipher_key[0]));\n-\t\tcfg->cipher_key[index] = rte_cpu_to_be_32(*key++);\n+\t\tcfg->cipher_key[index] = rte_be_to_cpu_32(key[i]);\n \t}\n \n \t/*\n-\t * The iv of the FW is equal to ESN by default. Reading the\n-\t * iv of the configuration information is not supported.\n+\t * The iv of the FW is equal to ESN by default. Only the\n+\t * aead algorithm can offload the iv of configuration and\n+\t * the length of iv cannot be greater than NFP_ESP_IV_LENGTH.\n \t */\n \tiv_str = getenv(\"ETH_SEC_IV_OVR\");\n \tif (iv_str != NULL) {\n \t\tiv_len = aead->iv.length;\n+\t\tif (iv_len > NFP_ESP_IV_LENGTH) {\n+\t\t\tPMD_DRV_LOG(ERR, \"Unsupported length of iv data\");\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n \t\tnfp_aesgcm_iv_update(cfg, iv_len, iv_str);\n \t}\n \n@@ -671,7 +678,7 @@ nfp_cipher_map(struct rte_eth_dev *eth_dev,\n \tint ret;\n \tuint32_t i;\n \tuint32_t device_id;\n-\tconst uint32_t *key;\n+\tconst rte_be32_t *key;\n \tstruct nfp_net_hw *net_hw;\n \n \tnet_hw = eth_dev->data->dev_private;\n@@ -705,14 +712,14 @@ nfp_cipher_map(struct rte_eth_dev *eth_dev,\n \t\treturn -EINVAL;\n \t}\n \n-\tkey = (const uint32_t  *)(cipher->key.data);\n+\tkey = (const rte_be32_t *)(cipher->key.data);\n \tif (key_length > sizeof(cfg->cipher_key)) {\n \t\tPMD_DRV_LOG(ERR, \"Insufficient space for offloaded key\");\n \t\treturn -EINVAL;\n \t}\n \n \tfor (i = 0; i < key_length / sizeof(cfg->cipher_key[0]); i++)\n-\t\tcfg->cipher_key[i] = rte_cpu_to_be_32(*key++);\n+\t\tcfg->cipher_key[i] = rte_be_to_cpu_32(key[i]);\n \n \treturn 0;\n }\n@@ -807,7 +814,7 @@ nfp_auth_map(struct rte_eth_dev *eth_dev,\n \tuint32_t i;\n \tuint8_t key_length;\n \tuint32_t device_id;\n-\tconst uint32_t *key;\n+\tconst rte_be32_t *key;\n \tstruct nfp_net_hw *net_hw;\n \n \tif (digest_length == 0) {\n@@ -854,7 +861,7 @@ nfp_auth_map(struct rte_eth_dev *eth_dev,\n \t\treturn -EINVAL;\n \t}\n \n-\tkey = (const uint32_t *)(auth->key.data);\n+\tkey = (const rte_be32_t *)(auth->key.data);\n \tkey_length = auth->key.length;\n \tif (key_length > sizeof(cfg->auth_key)) {\n \t\tPMD_DRV_LOG(ERR, \"Insufficient space for offloaded auth key!\");\n@@ -862,7 +869,7 @@ nfp_auth_map(struct rte_eth_dev *eth_dev,\n \t}\n \n \tfor (i = 0; i < key_length / sizeof(cfg->auth_key[0]); i++)\n-\t\tcfg->auth_key[i] = rte_cpu_to_be_32(*key++);\n+\t\tcfg->auth_key[i] = rte_be_to_cpu_32(key[i]);\n \n \treturn 0;\n }\n@@ -902,7 +909,7 @@ nfp_crypto_msg_build(struct rte_eth_dev *eth_dev,\n \t\t\treturn ret;\n \t\t}\n \n-\t\tcfg->aesgcm_fields.salt = rte_cpu_to_be_32(conf->ipsec.salt);\n+\t\tcfg->aesgcm_fields.salt = conf->ipsec.salt;\n \t\tbreak;\n \tcase RTE_CRYPTO_SYM_XFORM_AUTH:\n \t\t/* Only support Auth + Cipher for inbound */\n@@ -967,7 +974,10 @@ nfp_ipsec_msg_build(struct rte_eth_dev *eth_dev,\n \t\tstruct rte_security_session_conf *conf,\n \t\tstruct nfp_ipsec_msg *msg)\n {\n+\tint i;\n \tint ret;\n+\trte_be32_t *src_ip;\n+\trte_be32_t *dst_ip;\n \tstruct ipsec_add_sa *cfg;\n \tenum rte_security_ipsec_tunnel_type type;\n \n@@ -1025,12 +1035,18 @@ nfp_ipsec_msg_build(struct rte_eth_dev *eth_dev,\n \t\ttype = conf->ipsec.tunnel.type;\n \t\tcfg->ctrl_word.mode = NFP_IPSEC_MODE_TUNNEL;\n \t\tif (type == RTE_SECURITY_IPSEC_TUNNEL_IPV4) {\n-\t\t\tcfg->src_ip.v4 = conf->ipsec.tunnel.ipv4.src_ip;\n-\t\t\tcfg->dst_ip.v4 = conf->ipsec.tunnel.ipv4.dst_ip;\n+\t\t\tsrc_ip = (rte_be32_t *)&conf->ipsec.tunnel.ipv4.src_ip.s_addr;\n+\t\t\tdst_ip = (rte_be32_t *)&conf->ipsec.tunnel.ipv4.dst_ip.s_addr;\n+\t\t\tcfg->src_ip[0] = rte_be_to_cpu_32(src_ip[0]);\n+\t\t\tcfg->dst_ip[0] = rte_be_to_cpu_32(dst_ip[0]);\n \t\t\tcfg->ipv6 = 0;\n \t\t} else if (type == RTE_SECURITY_IPSEC_TUNNEL_IPV6) {\n-\t\t\tcfg->src_ip.v6 = conf->ipsec.tunnel.ipv6.src_addr;\n-\t\t\tcfg->dst_ip.v6 = conf->ipsec.tunnel.ipv6.dst_addr;\n+\t\t\tsrc_ip = (rte_be32_t *)conf->ipsec.tunnel.ipv6.src_addr.s6_addr;\n+\t\t\tdst_ip = (rte_be32_t *)conf->ipsec.tunnel.ipv6.dst_addr.s6_addr;\n+\t\t\tfor (i = 0; i < 4; i++) {\n+\t\t\t\tcfg->src_ip[i] = rte_be_to_cpu_32(src_ip[i]);\n+\t\t\t\tcfg->dst_ip[i] = rte_be_to_cpu_32(dst_ip[i]);\n+\t\t\t}\n \t\t\tcfg->ipv6 = 1;\n \t\t} else {\n \t\t\tPMD_DRV_LOG(ERR, \"Unsupported address family!\");\n@@ -1043,9 +1059,11 @@ nfp_ipsec_msg_build(struct rte_eth_dev *eth_dev,\n \t\tcfg->ctrl_word.mode = NFP_IPSEC_MODE_TRANSPORT;\n \t\tif (type == RTE_SECURITY_IPSEC_TUNNEL_IPV4) {\n \t\t\tmemset(&cfg->src_ip, 0, sizeof(cfg->src_ip));\n+\t\t\tmemset(&cfg->dst_ip, 0, sizeof(cfg->dst_ip));\n \t\t\tcfg->ipv6 = 0;\n \t\t} else if (type == RTE_SECURITY_IPSEC_TUNNEL_IPV6) {\n \t\t\tmemset(&cfg->src_ip, 0, sizeof(cfg->src_ip));\n+\t\t\tmemset(&cfg->dst_ip, 0, sizeof(cfg->dst_ip));\n \t\t\tcfg->ipv6 = 1;\n \t\t} else {\n \t\t\tPMD_DRV_LOG(ERR, \"Unsupported address family!\");\n@@ -1179,18 +1197,18 @@ nfp_security_set_pkt_metadata(void *device,\n \t\tdesc_md = RTE_MBUF_DYNFIELD(m, offset, struct nfp_tx_ipsec_desc_msg *);\n \n \t\tif (priv_session->msg.ctrl_word.ext_seq != 0 && sqn != NULL) {\n-\t\t\tdesc_md->esn.low = rte_cpu_to_be_32(*sqn);\n-\t\t\tdesc_md->esn.hi = rte_cpu_to_be_32(*sqn >> 32);\n+\t\t\tdesc_md->esn.low = (uint32_t)*sqn;\n+\t\t\tdesc_md->esn.hi = (uint32_t)(*sqn >> 32);\n \t\t} else if (priv_session->msg.ctrl_word.ext_seq != 0) {\n-\t\t\tdesc_md->esn.low = rte_cpu_to_be_32(priv_session->ipsec.esn.low);\n-\t\t\tdesc_md->esn.hi = rte_cpu_to_be_32(priv_session->ipsec.esn.hi);\n+\t\t\tdesc_md->esn.low = priv_session->ipsec.esn.low;\n+\t\t\tdesc_md->esn.hi = priv_session->ipsec.esn.hi;\n \t\t} else {\n-\t\t\tdesc_md->esn.low = rte_cpu_to_be_32(priv_session->ipsec.esn.value);\n+\t\t\tdesc_md->esn.low = priv_session->ipsec.esn.low;\n \t\t\tdesc_md->esn.hi = 0;\n \t\t}\n \n \t\tdesc_md->enc = 1;\n-\t\tdesc_md->sa_idx = rte_cpu_to_be_32(priv_session->sa_index);\n+\t\tdesc_md->sa_idx = priv_session->sa_index;\n \t}\n \n \treturn 0;\ndiff --git a/drivers/net/nfp/nfp_ipsec.h b/drivers/net/nfp/nfp_ipsec.h\nindex d7a729398a..f7c4f3f225 100644\n--- a/drivers/net/nfp/nfp_ipsec.h\n+++ b/drivers/net/nfp/nfp_ipsec.h\n@@ -36,11 +36,6 @@ struct sa_ctrl_word {\n \tuint32_t spare2 :1;      /**< Must be set to 0 */\n };\n \n-union nfp_ip_addr {\n-\tstruct in6_addr v6;\n-\tstruct in_addr v4;\n-};\n-\n struct ipsec_add_sa {\n \tuint32_t cipher_key[8];           /**< Cipher Key */\n \tunion {\n@@ -60,8 +55,8 @@ struct ipsec_add_sa {\n \tuint8_t spare1;\n \tuint32_t soft_byte_cnt;           /**< Soft lifetime byte count */\n \tuint32_t hard_byte_cnt;           /**< Hard lifetime byte count */\n-\tunion nfp_ip_addr src_ip;         /**< Src IP addr */\n-\tunion nfp_ip_addr dst_ip;         /**< Dst IP addr */\n+\tuint32_t src_ip[4];               /**< Src IP addr */\n+\tuint32_t dst_ip[4];               /**< Dst IP addr */\n \tuint16_t natt_dst_port;           /**< NAT-T UDP Header dst port */\n \tuint16_t natt_src_port;           /**< NAT-T UDP Header src port */\n \tuint32_t soft_lifetime_limit;     /**< Soft lifetime time limit */\n",
    "prefixes": [
        "2/2"
    ]
}