get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 40833,
    "url": "http://patchwork.dpdk.org/api/patches/40833/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20180608124155.140663-8-jasvinder.singh@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20180608124155.140663-8-jasvinder.singh@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180608124155.140663-8-jasvinder.singh@intel.com",
    "date": "2018-06-08T12:41:41",
    "name": "[dpdk-dev,07/21] net/softnic: add port action profile",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b061ffb1ddb46e73cd02fd99d86690dbab4ae5f7",
    "submitter": {
        "id": 285,
        "url": "http://patchwork.dpdk.org/api/people/285/?format=api",
        "name": "Jasvinder Singh",
        "email": "jasvinder.singh@intel.com"
    },
    "delegate": {
        "id": 10018,
        "url": "http://patchwork.dpdk.org/api/users/10018/?format=api",
        "username": "cristian_dumitrescu",
        "first_name": "Cristian",
        "last_name": "Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20180608124155.140663-8-jasvinder.singh@intel.com/mbox/",
    "series": [
        {
            "id": 52,
            "url": "http://patchwork.dpdk.org/api/series/52/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=52",
            "date": "2018-06-08T12:41:35",
            "name": "[dpdk-dev,01/21] net/softnic: restructuring",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/52/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/40833/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/40833/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5DCFE7288;\n\tFri,  8 Jun 2018 14:42:22 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id B51B15F72\n\tfor <dev@dpdk.org>; Fri,  8 Jun 2018 14:42:04 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Jun 2018 05:42:03 -0700",
            "from silpixa00381635.ir.intel.com (HELO\n\tsilpixa00381635.ger.corp.intel.com) ([10.237.222.149])\n\tby fmsmga005.fm.intel.com with ESMTP; 08 Jun 2018 05:42:02 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.49,490,1520924400\"; d=\"scan'208\";a=\"235505340\"",
        "From": "Jasvinder Singh <jasvinder.singh@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "cristian.dumitrescu@intel.com",
        "Date": "Fri,  8 Jun 2018 13:41:41 +0100",
        "Message-Id": "<20180608124155.140663-8-jasvinder.singh@intel.com>",
        "X-Mailer": "git-send-email 2.9.3",
        "In-Reply-To": "<20180608124155.140663-1-jasvinder.singh@intel.com>",
        "References": "<20180608124155.140663-1-jasvinder.singh@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 07/21] net/softnic: add port action profile",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add pipeline's port action profile implementation to the softnic.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nSigned-off-by: Jasvinder Singh <jasvinder.singh@intel.com>\n---\n drivers/net/softnic/Makefile                    |   3 +\n drivers/net/softnic/hash_func.h                 | 359 ++++++++++++++++++++++++\n drivers/net/softnic/hash_func_arm64.h           | 261 +++++++++++++++++\n drivers/net/softnic/rte_eth_softnic.c           |   2 +\n drivers/net/softnic/rte_eth_softnic_action.c    | 162 +++++++++++\n drivers/net/softnic/rte_eth_softnic_internals.h |  38 +++\n mk/rte.app.mk                                   |   2 +\n 7 files changed, 827 insertions(+)\n create mode 100644 drivers/net/softnic/hash_func.h\n create mode 100644 drivers/net/softnic/hash_func_arm64.h\n create mode 100644 drivers/net/softnic/rte_eth_softnic_action.c",
    "diff": "diff --git a/drivers/net/softnic/Makefile b/drivers/net/softnic/Makefile\nindex 82a2b72..5387616 100644\n--- a/drivers/net/softnic/Makefile\n+++ b/drivers/net/softnic/Makefile\n@@ -8,8 +8,10 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_pmd_softnic.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\n+LDLIBS += -lrte_pipeline\n LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring\n LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_sched\n LDLIBS += -lrte_bus_vdev\n@@ -27,6 +29,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += rte_eth_softnic_swq.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += rte_eth_softnic_link.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += rte_eth_softnic_tm.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += rte_eth_softnic_tap.c\n+SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += rte_eth_softnic_action.c\n \n #\n # Export include files\ndiff --git a/drivers/net/softnic/hash_func.h b/drivers/net/softnic/hash_func.h\nnew file mode 100644\nindex 0000000..198d2b2\n--- /dev/null\n+++ b/drivers/net/softnic/hash_func.h\n@@ -0,0 +1,359 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2010-2018 Intel Corporation\n+ */\n+\n+#ifndef __INCLUDE_HASH_FUNC_H__\n+#define __INCLUDE_HASH_FUNC_H__\n+\n+#include <rte_common.h>\n+\n+static inline uint64_t\n+hash_xor_key8(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t xor0;\n+\n+\txor0 = seed ^ (k[0] & m[0]);\n+\n+\treturn (xor0 >> 32) ^ xor0;\n+}\n+\n+static inline uint64_t\n+hash_xor_key16(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t xor0;\n+\n+\txor0 = ((k[0] & m[0]) ^ seed) ^ (k[1] & m[1]);\n+\n+\treturn (xor0 >> 32) ^ xor0;\n+}\n+\n+static inline uint64_t\n+hash_xor_key24(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t xor0;\n+\n+\txor0 = ((k[0] & m[0]) ^ seed) ^ (k[1] & m[1]);\n+\n+\txor0 ^= k[2] & m[2];\n+\n+\treturn (xor0 >> 32) ^ xor0;\n+}\n+\n+static inline uint64_t\n+hash_xor_key32(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t xor0, xor1;\n+\n+\txor0 = ((k[0] & m[0]) ^ seed) ^ (k[1] & m[1]);\n+\txor1 = (k[2] & m[2]) ^ (k[3] & m[3]);\n+\n+\txor0 ^= xor1;\n+\n+\treturn (xor0 >> 32) ^ xor0;\n+}\n+\n+static inline uint64_t\n+hash_xor_key40(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t xor0, xor1;\n+\n+\txor0 = ((k[0] & m[0]) ^ seed) ^ (k[1] & m[1]);\n+\txor1 = (k[2] & m[2]) ^ (k[3] & m[3]);\n+\n+\txor0 ^= xor1;\n+\n+\txor0 ^= k[4] & m[4];\n+\n+\treturn (xor0 >> 32) ^ xor0;\n+}\n+\n+static inline uint64_t\n+hash_xor_key48(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t xor0, xor1, xor2;\n+\n+\txor0 = ((k[0] & m[0]) ^ seed) ^ (k[1] & m[1]);\n+\txor1 = (k[2] & m[2]) ^ (k[3] & m[3]);\n+\txor2 = (k[4] & m[4]) ^ (k[5] & m[5]);\n+\n+\txor0 ^= xor1;\n+\n+\txor0 ^= xor2;\n+\n+\treturn (xor0 >> 32) ^ xor0;\n+}\n+\n+static inline uint64_t\n+hash_xor_key56(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t xor0, xor1, xor2;\n+\n+\txor0 = ((k[0] & m[0]) ^ seed) ^ (k[1] & m[1]);\n+\txor1 = (k[2] & m[2]) ^ (k[3] & m[3]);\n+\txor2 = (k[4] & m[4]) ^ (k[5] & m[5]);\n+\n+\txor0 ^= xor1;\n+\txor2 ^= k[6] & m[6];\n+\n+\txor0 ^= xor2;\n+\n+\treturn (xor0 >> 32) ^ xor0;\n+}\n+\n+static inline uint64_t\n+hash_xor_key64(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t xor0, xor1, xor2, xor3;\n+\n+\txor0 = ((k[0] & m[0]) ^ seed) ^ (k[1] & m[1]);\n+\txor1 = (k[2] & m[2]) ^ (k[3] & m[3]);\n+\txor2 = (k[4] & m[4]) ^ (k[5] & m[5]);\n+\txor3 = (k[6] & m[6]) ^ (k[7] & m[7]);\n+\n+\txor0 ^= xor1;\n+\txor2 ^= xor3;\n+\n+\txor0 ^= xor2;\n+\n+\treturn (xor0 >> 32) ^ xor0;\n+}\n+\n+#if defined(RTE_ARCH_X86_64)\n+\n+#include <x86intrin.h>\n+\n+static inline uint64_t\n+hash_crc_key8(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t crc0;\n+\n+\tcrc0 = _mm_crc32_u64(seed, k[0] & m[0]);\n+\n+\treturn crc0;\n+}\n+\n+static inline uint64_t\n+hash_crc_key16(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t k0, crc0, crc1;\n+\n+\tk0 = k[0] & m[0];\n+\n+\tcrc0 = _mm_crc32_u64(k0, seed);\n+\tcrc1 = _mm_crc32_u64(k0 >> 32, k[1] & m[1]);\n+\n+\tcrc0 ^= crc1;\n+\n+\treturn crc0;\n+}\n+\n+static inline uint64_t\n+hash_crc_key24(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t k0, k2, crc0, crc1;\n+\n+\tk0 = k[0] & m[0];\n+\tk2 = k[2] & m[2];\n+\n+\tcrc0 = _mm_crc32_u64(k0, seed);\n+\tcrc1 = _mm_crc32_u64(k0 >> 32, k[1] & m[1]);\n+\n+\tcrc0 = _mm_crc32_u64(crc0, k2);\n+\n+\tcrc0 ^= crc1;\n+\n+\treturn crc0;\n+}\n+\n+static inline uint64_t\n+hash_crc_key32(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t k0, k2, crc0, crc1, crc2, crc3;\n+\n+\tk0 = k[0] & m[0];\n+\tk2 = k[2] & m[2];\n+\n+\tcrc0 = _mm_crc32_u64(k0, seed);\n+\tcrc1 = _mm_crc32_u64(k0 >> 32, k[1] & m[1]);\n+\n+\tcrc2 = _mm_crc32_u64(k2, k[3] & m[3]);\n+\tcrc3 = k2 >> 32;\n+\n+\tcrc0 = _mm_crc32_u64(crc0, crc1);\n+\tcrc1 = _mm_crc32_u64(crc2, crc3);\n+\n+\tcrc0 ^= crc1;\n+\n+\treturn crc0;\n+}\n+\n+static inline uint64_t\n+hash_crc_key40(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t k0, k2, crc0, crc1, crc2, crc3;\n+\n+\tk0 = k[0] & m[0];\n+\tk2 = k[2] & m[2];\n+\n+\tcrc0 = _mm_crc32_u64(k0, seed);\n+\tcrc1 = _mm_crc32_u64(k0 >> 32, k[1] & m[1]);\n+\n+\tcrc2 = _mm_crc32_u64(k2, k[3] & m[3]);\n+\tcrc3 = _mm_crc32_u64(k2 >> 32, k[4] & m[4]);\n+\n+\tcrc0 = _mm_crc32_u64(crc0, crc1);\n+\tcrc1 = _mm_crc32_u64(crc2, crc3);\n+\n+\tcrc0 ^= crc1;\n+\n+\treturn crc0;\n+}\n+\n+static inline uint64_t\n+hash_crc_key48(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t k0, k2, k5, crc0, crc1, crc2, crc3;\n+\n+\tk0 = k[0] & m[0];\n+\tk2 = k[2] & m[2];\n+\tk5 = k[5] & m[5];\n+\n+\tcrc0 = _mm_crc32_u64(k0, seed);\n+\tcrc1 = _mm_crc32_u64(k0 >> 32, k[1] & m[1]);\n+\n+\tcrc2 = _mm_crc32_u64(k2, k[3] & m[3]);\n+\tcrc3 = _mm_crc32_u64(k2 >> 32, k[4] & m[4]);\n+\n+\tcrc0 = _mm_crc32_u64(crc0, (crc1 << 32) ^ crc2);\n+\tcrc1 = _mm_crc32_u64(crc3, k5);\n+\n+\tcrc0 ^= crc1;\n+\n+\treturn crc0;\n+}\n+\n+static inline uint64_t\n+hash_crc_key56(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t k0, k2, k5, crc0, crc1, crc2, crc3, crc4, crc5;\n+\n+\tk0 = k[0] & m[0];\n+\tk2 = k[2] & m[2];\n+\tk5 = k[5] & m[5];\n+\n+\tcrc0 = _mm_crc32_u64(k0, seed);\n+\tcrc1 = _mm_crc32_u64(k0 >> 32, k[1] & m[1]);\n+\n+\tcrc2 = _mm_crc32_u64(k2, k[3] & m[3]);\n+\tcrc3 = _mm_crc32_u64(k2 >> 32, k[4] & m[4]);\n+\n+\tcrc4 = _mm_crc32_u64(k5, k[6] & m[6]);\n+\tcrc5 = k5 >> 32;\n+\n+\tcrc0 = _mm_crc32_u64(crc0, (crc1 << 32) ^ crc2);\n+\tcrc1 = _mm_crc32_u64(crc3, (crc4 << 32) ^ crc5);\n+\n+\tcrc0 ^= crc1;\n+\n+\treturn crc0;\n+}\n+\n+static inline uint64_t\n+hash_crc_key64(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint64_t k0, k2, k5, crc0, crc1, crc2, crc3, crc4, crc5;\n+\n+\tk0 = k[0] & m[0];\n+\tk2 = k[2] & m[2];\n+\tk5 = k[5] & m[5];\n+\n+\tcrc0 = _mm_crc32_u64(k0, seed);\n+\tcrc1 = _mm_crc32_u64(k0 >> 32, k[1] & m[1]);\n+\n+\tcrc2 = _mm_crc32_u64(k2, k[3] & m[3]);\n+\tcrc3 = _mm_crc32_u64(k2 >> 32, k[4] & m[4]);\n+\n+\tcrc4 = _mm_crc32_u64(k5, k[6] & m[6]);\n+\tcrc5 = _mm_crc32_u64(k5 >> 32, k[7] & m[7]);\n+\n+\tcrc0 = _mm_crc32_u64(crc0, (crc1 << 32) ^ crc2);\n+\tcrc1 = _mm_crc32_u64(crc3, (crc4 << 32) ^ crc5);\n+\n+\tcrc0 ^= crc1;\n+\n+\treturn crc0;\n+}\n+\n+#define hash_default_key8\t\t\thash_crc_key8\n+#define hash_default_key16\t\t\thash_crc_key16\n+#define hash_default_key24\t\t\thash_crc_key24\n+#define hash_default_key32\t\t\thash_crc_key32\n+#define hash_default_key40\t\t\thash_crc_key40\n+#define hash_default_key48\t\t\thash_crc_key48\n+#define hash_default_key56\t\t\thash_crc_key56\n+#define hash_default_key64\t\t\thash_crc_key64\n+\n+#elif defined(RTE_ARCH_ARM64)\n+#include \"hash_func_arm64.h\"\n+#else\n+\n+#define hash_default_key8\t\t\thash_xor_key8\n+#define hash_default_key16\t\t\thash_xor_key16\n+#define hash_default_key24\t\t\thash_xor_key24\n+#define hash_default_key32\t\t\thash_xor_key32\n+#define hash_default_key40\t\t\thash_xor_key40\n+#define hash_default_key48\t\t\thash_xor_key48\n+#define hash_default_key56\t\t\thash_xor_key56\n+#define hash_default_key64\t\t\thash_xor_key64\n+\n+#endif\n+\n+#endif\ndiff --git a/drivers/net/softnic/hash_func_arm64.h b/drivers/net/softnic/hash_func_arm64.h\nnew file mode 100644\nindex 0000000..ae6c0f4\n--- /dev/null\n+++ b/drivers/net/softnic/hash_func_arm64.h\n@@ -0,0 +1,261 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2017 Linaro Limited. All rights reserved.\n+ *   All rights reserved.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of Intel Corporation nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+#ifndef __HASH_FUNC_ARM64_H__\n+#define __HASH_FUNC_ARM64_H__\n+\n+#define _CRC32CX(crc, val)\t\\\n+\t__asm__(\"crc32cx %w[c], %w[c], %x[v]\":[c] \"+r\" (crc):[v] \"r\" (val))\n+\n+static inline uint64_t\n+hash_crc_key8(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key;\n+\tuint64_t *m = mask;\n+\tuint32_t crc0;\n+\n+\tcrc0 = seed;\n+\t_CRC32CX(crc0, k[0] & m[0]);\n+\n+\treturn crc0;\n+}\n+\n+static inline uint64_t\n+hash_crc_key16(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key, k0;\n+\tuint64_t *m = mask;\n+\tuint32_t crc0, crc1;\n+\n+\tk0 = k[0] & m[0];\n+\n+\tcrc0 = k0;\n+\t_CRC32CX(crc0, seed);\n+\tcrc1 = k0 >> 32;\n+\t_CRC32CX(crc1, k[1] & m[1]);\n+\n+\tcrc0 ^= crc1;\n+\n+\treturn crc0;\n+}\n+\n+static inline uint64_t\n+hash_crc_key24(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key, k0, k2;\n+\tuint64_t *m = mask;\n+\tuint32_t crc0, crc1;\n+\n+\tk0 = k[0] & m[0];\n+\tk2 = k[2] & m[2];\n+\n+\tcrc0 = k0;\n+\t_CRC32CX(crc0, seed);\n+\tcrc1 = k0 >> 32;\n+\t_CRC32CX(crc1, k[1] & m[1]);\n+\n+\t_CRC32CX(crc0, k2);\n+\n+\tcrc0 ^= crc1;\n+\n+\treturn crc0;\n+}\n+\n+static inline uint64_t\n+hash_crc_key32(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key, k0, k2;\n+\tuint64_t *m = mask;\n+\tuint32_t crc0, crc1, crc2, crc3;\n+\n+\tk0 = k[0] & m[0];\n+\tk2 = k[2] & m[2];\n+\n+\tcrc0 = k0;\n+\t_CRC32CX(crc0, seed);\n+\tcrc1 = k0 >> 32;\n+\t_CRC32CX(crc1, k[1] & m[1]);\n+\n+\tcrc2 = k2;\n+\t_CRC32CX(crc2, k[3] & m[3]);\n+\tcrc3 = k2 >> 32;\n+\n+\t_CRC32CX(crc0, crc1);\n+\t_CRC32CX(crc2, crc3);\n+\n+\tcrc0 ^= crc2;\n+\n+\treturn crc0;\n+}\n+\n+static inline uint64_t\n+hash_crc_key40(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key, k0, k2;\n+\tuint64_t *m = mask;\n+\tuint32_t crc0, crc1, crc2, crc3;\n+\n+\tk0 = k[0] & m[0];\n+\tk2 = k[2] & m[2];\n+\n+\tcrc0 = k0;\n+\t_CRC32CX(crc0, seed);\n+\tcrc1 = k0 >> 32;\n+\t_CRC32CX(crc1, k[1] & m[1]);\n+\n+\tcrc2 = k2;\n+\t_CRC32CX(crc2, k[3] & m[3]);\n+\tcrc3 = k2 >> 32;\n+\t_CRC32CX(crc3, k[4] & m[4]);\n+\n+\t_CRC32CX(crc0, crc1);\n+\t_CRC32CX(crc2, crc3);\n+\n+\tcrc0 ^= crc2;\n+\n+\treturn crc0;\n+}\n+\n+static inline uint64_t\n+hash_crc_key48(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key, k0, k2, k5;\n+\tuint64_t *m = mask;\n+\tuint32_t crc0, crc1, crc2, crc3;\n+\n+\tk0 = k[0] & m[0];\n+\tk2 = k[2] & m[2];\n+\tk5 = k[5] & m[5];\n+\n+\tcrc0 = k0;\n+\t_CRC32CX(crc0, seed);\n+\tcrc1 = k0 >> 32;\n+\t_CRC32CX(crc1, k[1] & m[1]);\n+\n+\tcrc2 = k2;\n+\t_CRC32CX(crc2, k[3] & m[3]);\n+\tcrc3 = k2 >> 32;\n+\t_CRC32CX(crc3, k[4] & m[4]);\n+\n+\t_CRC32CX(crc0, ((uint64_t)crc1 << 32) ^ crc2);\n+\t_CRC32CX(crc3, k5);\n+\n+\tcrc0 ^= crc3;\n+\n+\treturn crc0;\n+}\n+\n+static inline uint64_t\n+hash_crc_key56(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key, k0, k2, k5;\n+\tuint64_t *m = mask;\n+\tuint32_t crc0, crc1, crc2, crc3, crc4, crc5;\n+\n+\tk0 = k[0] & m[0];\n+\tk2 = k[2] & m[2];\n+\tk5 = k[5] & m[5];\n+\n+\tcrc0 = k0;\n+\t_CRC32CX(crc0, seed);\n+\tcrc1 = k0 >> 32;\n+\t_CRC32CX(crc1, k[1] & m[1]);\n+\n+\tcrc2 = k2;\n+\t_CRC32CX(crc2, k[3] & m[3]);\n+\tcrc3 = k2 >> 32;\n+\t_CRC32CX(crc3, k[4] & m[4]);\n+\n+\tcrc4 = k5;\n+\t _CRC32CX(crc4, k[6] & m[6]);\n+\tcrc5 = k5 >> 32;\n+\n+\t_CRC32CX(crc0, ((uint64_t)crc1 << 32) ^ crc2);\n+\t_CRC32CX(crc3, ((uint64_t)crc4 << 32) ^ crc5);\n+\n+\tcrc0 ^= crc3;\n+\n+\treturn crc0;\n+}\n+\n+static inline uint64_t\n+hash_crc_key64(void *key, void *mask, __rte_unused uint32_t key_size,\n+\tuint64_t seed)\n+{\n+\tuint64_t *k = key, k0, k2, k5;\n+\tuint64_t *m = mask;\n+\tuint32_t crc0, crc1, crc2, crc3, crc4, crc5;\n+\n+\tk0 = k[0] & m[0];\n+\tk2 = k[2] & m[2];\n+\tk5 = k[5] & m[5];\n+\n+\tcrc0 = k0;\n+\t_CRC32CX(crc0, seed);\n+\tcrc1 = k0 >> 32;\n+\t_CRC32CX(crc1, k[1] & m[1]);\n+\n+\tcrc2 = k2;\n+\t_CRC32CX(crc2, k[3] & m[3]);\n+\tcrc3 = k2 >> 32;\n+\t_CRC32CX(crc3, k[4] & m[4]);\n+\n+\tcrc4 = k5;\n+\t _CRC32CX(crc4, k[6] & m[6]);\n+\tcrc5 = k5 >> 32;\n+\t_CRC32CX(crc5, k[7] & m[7]);\n+\n+\t_CRC32CX(crc0, ((uint64_t)crc1 << 32) ^ crc2);\n+\t_CRC32CX(crc3, ((uint64_t)crc4 << 32) ^ crc5);\n+\n+\tcrc0 ^= crc3;\n+\n+\treturn crc0;\n+}\n+\n+#define hash_default_key8\t\t\thash_crc_key8\n+#define hash_default_key16\t\t\thash_crc_key16\n+#define hash_default_key24\t\t\thash_crc_key24\n+#define hash_default_key32\t\t\thash_crc_key32\n+#define hash_default_key40\t\t\thash_crc_key40\n+#define hash_default_key48\t\t\thash_crc_key48\n+#define hash_default_key56\t\t\thash_crc_key56\n+#define hash_default_key64\t\t\thash_crc_key64\n+\n+#endif\ndiff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c\nindex 51148de..a979f55 100644\n--- a/drivers/net/softnic/rte_eth_softnic.c\n+++ b/drivers/net/softnic/rte_eth_softnic.c\n@@ -227,6 +227,7 @@ pmd_init(struct pmd_params *params)\n \tlink_init(p);\n \ttmgr_init(p);\n \ttap_init(p);\n+\tport_in_action_profile_init(p);\n \n \treturn p;\n }\n@@ -237,6 +238,7 @@ pmd_free(struct pmd_internals *p)\n \tif (p == NULL)\n \t\treturn;\n \n+\tport_in_action_profile_free(p);\n \ttap_free(p);\n \ttmgr_free(p);\n \tlink_free(p);\ndiff --git a/drivers/net/softnic/rte_eth_softnic_action.c b/drivers/net/softnic/rte_eth_softnic_action.c\nnew file mode 100644\nindex 0000000..8e3f2d1\n--- /dev/null\n+++ b/drivers/net/softnic/rte_eth_softnic_action.c\n@@ -0,0 +1,162 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2010-2018 Intel Corporation\n+ */\n+\n+#include <stdint.h>\n+#include <stdlib.h>\n+#include <string.h>\n+\n+#include <rte_string_fns.h>\n+\n+#include \"hash_func.h\"\n+#include \"rte_eth_softnic_internals.h\"\n+\n+/**\n+ * Input port\n+ */\n+int\n+port_in_action_profile_init(struct pmd_internals *p)\n+{\n+\tTAILQ_INIT(&p->port_in_action_profile_list);\n+\n+\treturn 0;\n+}\n+\n+void\n+port_in_action_profile_free(struct pmd_internals *p)\n+{\n+\tfor ( ; ; ) {\n+\t\tstruct port_in_action_profile *profile;\n+\n+\t\tprofile = TAILQ_FIRST(&p->port_in_action_profile_list);\n+\t\tif (profile == NULL)\n+\t\t\tbreak;\n+\n+\t\tTAILQ_REMOVE(&p->port_in_action_profile_list, profile, node);\n+\t\tfree(profile);\n+\t}\n+}\n+\n+struct port_in_action_profile *\n+port_in_action_profile_find(struct pmd_internals *p,\n+\tconst char *name)\n+{\n+\tstruct port_in_action_profile *profile;\n+\n+\tif (name == NULL)\n+\t\treturn NULL;\n+\n+\tTAILQ_FOREACH(profile, &p->port_in_action_profile_list, node)\n+\t\tif (strcmp(profile->name, name) == 0)\n+\t\t\treturn profile;\n+\n+\treturn NULL;\n+}\n+\n+struct port_in_action_profile *\n+port_in_action_profile_create(struct pmd_internals *p,\n+\tconst char *name,\n+\tstruct port_in_action_profile_params *params)\n+{\n+\tstruct port_in_action_profile *profile;\n+\tstruct rte_port_in_action_profile *ap;\n+\tint status;\n+\n+\t/* Check input params */\n+\tif ((name == NULL) ||\n+\t\tport_in_action_profile_find(p, name) ||\n+\t\t(params == NULL))\n+\t\treturn NULL;\n+\n+\tif ((params->action_mask & (1LLU << RTE_PORT_IN_ACTION_LB)) &&\n+\t\t(params->lb.f_hash == NULL)) {\n+\t\tswitch (params->lb.key_size) {\n+\t\tcase  8:\n+\t\t\tparams->lb.f_hash = hash_default_key8;\n+\t\t\tbreak;\n+\n+\t\tcase 16:\n+\t\t\tparams->lb.f_hash = hash_default_key16;\n+\t\t\tbreak;\n+\n+\t\tcase 24:\n+\t\t\tparams->lb.f_hash = hash_default_key24;\n+\t\t\tbreak;\n+\n+\t\tcase 32:\n+\t\t\tparams->lb.f_hash = hash_default_key32;\n+\t\t\tbreak;\n+\n+\t\tcase 40:\n+\t\t\tparams->lb.f_hash = hash_default_key40;\n+\t\t\tbreak;\n+\n+\t\tcase 48:\n+\t\t\tparams->lb.f_hash = hash_default_key48;\n+\t\t\tbreak;\n+\n+\t\tcase 56:\n+\t\t\tparams->lb.f_hash = hash_default_key56;\n+\t\t\tbreak;\n+\n+\t\tcase 64:\n+\t\t\tparams->lb.f_hash = hash_default_key64;\n+\t\t\tbreak;\n+\n+\t\tdefault:\n+\t\t\treturn NULL;\n+\t\t}\n+\n+\t\tparams->lb.seed = 0;\n+\t}\n+\n+\t/* Resource */\n+\tap = rte_port_in_action_profile_create(0);\n+\tif (ap == NULL)\n+\t\treturn NULL;\n+\n+\tif (params->action_mask & (1LLU << RTE_PORT_IN_ACTION_FLTR)) {\n+\t\tstatus = rte_port_in_action_profile_action_register(ap,\n+\t\t\tRTE_PORT_IN_ACTION_FLTR,\n+\t\t\t&params->fltr);\n+\n+\t\tif (status) {\n+\t\t\trte_port_in_action_profile_free(ap);\n+\t\t\treturn NULL;\n+\t\t}\n+\t}\n+\n+\tif (params->action_mask & (1LLU << RTE_PORT_IN_ACTION_LB)) {\n+\t\tstatus = rte_port_in_action_profile_action_register(ap,\n+\t\t\tRTE_PORT_IN_ACTION_LB,\n+\t\t\t&params->lb);\n+\n+\t\tif (status) {\n+\t\t\trte_port_in_action_profile_free(ap);\n+\t\t\treturn NULL;\n+\t\t}\n+\t}\n+\n+\tstatus = rte_port_in_action_profile_freeze(ap);\n+\tif (status) {\n+\t\trte_port_in_action_profile_free(ap);\n+\t\treturn NULL;\n+\t}\n+\n+\t/* Node allocation */\n+\tprofile = calloc(1, sizeof(struct port_in_action_profile));\n+\tif (profile == NULL) {\n+\t\trte_port_in_action_profile_free(ap);\n+\t\treturn NULL;\n+\t}\n+\n+\t/* Node fill in */\n+\tstrlcpy(profile->name, name, sizeof(profile->name));\n+\tmemcpy(&profile->params, params, sizeof(*params));\n+\tprofile->ap = ap;\n+\n+\t/* Node add to list */\n+\tTAILQ_INSERT_TAIL(&p->port_in_action_profile_list, profile, node);\n+\n+\treturn profile;\n+}\ndiff --git a/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h\nindex 5aa17b9..77c29a3 100644\n--- a/drivers/net/softnic/rte_eth_softnic_internals.h\n+++ b/drivers/net/softnic/rte_eth_softnic_internals.h\n@@ -14,6 +14,7 @@\n #include <rte_ring.h>\n #include <rte_ethdev.h>\n #include <rte_sched.h>\n+#include <rte_port_in_action.h>\n #include <rte_ethdev_driver.h>\n #include <rte_tm_driver.h>\n \n@@ -239,6 +240,24 @@ struct tap {\n TAILQ_HEAD(tap_list, tap);\n \n /**\n+ * Input port action\n+ */\n+struct port_in_action_profile_params {\n+\tuint64_t action_mask;\n+\tstruct rte_port_in_action_fltr_config fltr;\n+\tstruct rte_port_in_action_lb_config lb;\n+};\n+\n+struct port_in_action_profile {\n+\tTAILQ_ENTRY(port_in_action_profile) node;\n+\tchar name[NAME_SIZE];\n+\tstruct port_in_action_profile_params params;\n+\tstruct rte_port_in_action_profile *ap;\n+};\n+\n+TAILQ_HEAD(port_in_action_profile_list, port_in_action_profile);\n+\n+/**\n  * PMD Internals\n  */\n struct pmd_internals {\n@@ -255,6 +274,7 @@ struct pmd_internals {\n \tstruct link_list link_list;\n \tstruct tmgr_port_list tmgr_port_list;\n \tstruct tap_list tap_list;\n+\tstruct port_in_action_profile_list port_in_action_profile_list;\n };\n \n /**\n@@ -361,4 +381,22 @@ struct tap *\n tap_create(struct pmd_internals *p,\n \tconst char *name);\n \n+/**\n+ * Input port action\n+ */\n+int\n+port_in_action_profile_init(struct pmd_internals *p);\n+\n+void\n+port_in_action_profile_free(struct pmd_internals *p);\n+\n+struct port_in_action_profile *\n+port_in_action_profile_find(struct pmd_internals *p,\n+\tconst char *name);\n+\n+struct port_in_action_profile *\n+port_in_action_profile_create(struct pmd_internals *p,\n+\tconst char *name,\n+\tstruct port_in_action_profile_params *params);\n+\n #endif /* __INCLUDE_RTE_ETH_SOFTNIC_INTERNALS_H__ */\ndiff --git a/mk/rte.app.mk b/mk/rte.app.mk\nindex 1e32c83..7b2899e 100644\n--- a/mk/rte.app.mk\n+++ b/mk/rte.app.mk\n@@ -31,7 +31,9 @@ _LDLIBS-y += -L$(RTE_SDK_BIN)/lib\n # Order is important: from higher level to lower level\n #\n _LDLIBS-$(CONFIG_RTE_LIBRTE_FLOW_CLASSIFY)  += -lrte_flow_classify\n+_LDLIBS-$(CONFIG_RTE_LIBRTE_PIPELINE)       += --whole-archive\n _LDLIBS-$(CONFIG_RTE_LIBRTE_PIPELINE)       += -lrte_pipeline\n+_LDLIBS-$(CONFIG_RTE_LIBRTE_PIPELINE)       += --no-whole-archive\n _LDLIBS-$(CONFIG_RTE_LIBRTE_TABLE)          += -lrte_table\n _LDLIBS-$(CONFIG_RTE_LIBRTE_PORT)           += -lrte_port\n \n",
    "prefixes": [
        "dpdk-dev",
        "07/21"
    ]
}