get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 6855,
    "url": "https://patches.dpdk.org/api/patches/6855/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1441143062-2557-7-git-send-email-thomas.monjalon@6wind.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1441143062-2557-7-git-send-email-thomas.monjalon@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1441143062-2557-7-git-send-email-thomas.monjalon@6wind.com",
    "date": "2015-09-01T21:31:00",
    "name": "[dpdk-dev,7/9] acl: remove old API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5d22baf14e83d96534eff3a363d5e4257dd7bb0f",
    "submitter": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/people/1/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas.monjalon@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1441143062-2557-7-git-send-email-thomas.monjalon@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/6855/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/6855/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 23E328E8A;\n\tTue,  1 Sep 2015 23:32:30 +0200 (CEST)",
            "from mail-wi0-f179.google.com (mail-wi0-f179.google.com\n\t[209.85.212.179]) by dpdk.org (Postfix) with ESMTP id AEB728E7A\n\tfor <dev@dpdk.org>; Tue,  1 Sep 2015 23:32:28 +0200 (CEST)",
            "by wicfx3 with SMTP id fx3so26121570wic.0\n\tfor <dev@dpdk.org>; Tue, 01 Sep 2015 14:32:28 -0700 (PDT)",
            "from localhost.localdomain (136-92-190-109.dsl.ovh.fr.\n\t[109.190.92.136]) by smtp.gmail.com with ESMTPSA id\n\tej5sm29085583wjd.22.2015.09.01.14.32.27\n\tfor <dev@dpdk.org> (version=TLSv1/SSLv3 cipher=OTHER);\n\tTue, 01 Sep 2015 14:32:28 -0700 (PDT)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=UucFgUiE3F7RxBTw7TnvkP02ab5kywEaT0V97httpaQ=;\n\tb=j4I5ySQEv39NEzSO4zzFEbVXEHkvuulzgtZd69A1MNK+7NaJc9AQdlKl0LRZ9W1GFQ\n\tBJYRmleMiQhscdqQdEpB2+J3W+mUpmzHlAd5KbmVFDo13VgPgxnMneGf66ZBJRhVYPF5\n\tMLOvRypg2H/6ewDXpnXnE7n9kIoJX8os6SnlSDZ4iGPi1sowgM93Fe2IpGfWDmMg634w\n\tBJaF8vZLnxyLSD79cj3wdalLKj0si1oVnanJMeqvvaNXBaSRd4VkcrEMMlBTy6kBy4Er\n\tr9lCBvNxdIt/JJxandvtRENBYRxMeNjpo5LTsszdryCfTFdxkBi2Ktr9VhvWWsXJjrh/\n\tu/mg==",
        "X-Gm-Message-State": "ALoCoQkKcjKrS2cRxiNtjZ0D4Ku3Aw+u22I2k4szEORpb6KSwzWr+YySddCvF6IJpFn16clQcG3H",
        "X-Received": "by 10.180.189.108 with SMTP id gh12mr268212wic.53.1441143148587; \n\tTue, 01 Sep 2015 14:32:28 -0700 (PDT)",
        "From": "Thomas Monjalon <thomas.monjalon@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue,  1 Sep 2015 23:31:00 +0200",
        "Message-Id": "<1441143062-2557-7-git-send-email-thomas.monjalon@6wind.com>",
        "X-Mailer": "git-send-email 2.5.1",
        "In-Reply-To": "<1441138697-25157-1-git-send-email-thomas.monjalon@6wind.com>",
        "References": "<1441138697-25157-1-git-send-email-thomas.monjalon@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH 7/9] acl: remove old API",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://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": "<http://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": "The functions and structures are moved to app/test in order to keep\nexisting unit tests. Some minor changes were done in these functions\nbecause of library scope restrictions.\nAn enum is also copied in two other applications to keep existing code.\n\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\n---\n app/test-acl/main.c                  |  17 +++\n app/test/test_acl.c                  | 194 +++++++++++++++++++++++++++++++++++\n app/test/test_acl.h                  |  59 +++++++++++\n doc/guides/rel_notes/deprecation.rst |   4 -\n examples/l3fwd-acl/main.c            |  17 +++\n lib/librte_acl/Makefile              |   2 +-\n lib/librte_acl/rte_acl.c             | 170 ------------------------------\n lib/librte_acl/rte_acl.h             | 104 -------------------\n lib/librte_acl/rte_acl_version.map   |   2 -\n 9 files changed, 288 insertions(+), 281 deletions(-)",
    "diff": "diff --git a/app/test-acl/main.c b/app/test-acl/main.c\nindex be3d773..72ce83c 100644\n--- a/app/test-acl/main.c\n+++ b/app/test-acl/main.c\n@@ -162,6 +162,23 @@ enum {\n \tNUM_FIELDS_IPV4\n };\n \n+/*\n+ * That effectively defines order of IPV4VLAN classifications:\n+ *  - PROTO\n+ *  - VLAN (TAG and DOMAIN)\n+ *  - SRC IP ADDRESS\n+ *  - DST IP ADDRESS\n+ *  - PORTS (SRC and DST)\n+ */\n+enum {\n+\tRTE_ACL_IPV4VLAN_PROTO,\n+\tRTE_ACL_IPV4VLAN_VLAN,\n+\tRTE_ACL_IPV4VLAN_SRC,\n+\tRTE_ACL_IPV4VLAN_DST,\n+\tRTE_ACL_IPV4VLAN_PORTS,\n+\tRTE_ACL_IPV4VLAN_NUM\n+};\n+\n struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {\n \t{\n \t\t.type = RTE_ACL_FIELD_TYPE_BITMASK,\ndiff --git a/app/test/test_acl.c b/app/test/test_acl.c\nindex b4a107d..2b82790 100644\n--- a/app/test/test_acl.c\n+++ b/app/test/test_acl.c\n@@ -45,6 +45,8 @@\n \n #include \"test_acl.h\"\n \n+#define\tBIT_SIZEOF(x) (sizeof(x) * CHAR_BIT)\n+\n #define LEN RTE_ACL_MAX_CATEGORIES\n \n RTE_ACL_RULE_DEF(acl_ipv4vlan_rule, RTE_ACL_IPV4VLAN_NUM_FIELDS);\n@@ -100,6 +102,198 @@ bswap_test_data(struct ipv4_7tuple *data, int len, int to_be)\n \t}\n }\n \n+static int\n+acl_ipv4vlan_check_rule(const struct rte_acl_ipv4vlan_rule *rule)\n+{\n+\tif (rule->src_port_low > rule->src_port_high ||\n+\t\t\trule->dst_port_low > rule->dst_port_high ||\n+\t\t\trule->src_mask_len > BIT_SIZEOF(rule->src_addr) ||\n+\t\t\trule->dst_mask_len > BIT_SIZEOF(rule->dst_addr))\n+\t\treturn -EINVAL;\n+\treturn 0;\n+}\n+\n+static void\n+acl_ipv4vlan_convert_rule(const struct rte_acl_ipv4vlan_rule *ri,\n+\tstruct acl_ipv4vlan_rule *ro)\n+{\n+\tro->data = ri->data;\n+\n+\tro->field[RTE_ACL_IPV4VLAN_PROTO_FIELD].value.u8 = ri->proto;\n+\tro->field[RTE_ACL_IPV4VLAN_VLAN1_FIELD].value.u16 = ri->vlan;\n+\tro->field[RTE_ACL_IPV4VLAN_VLAN2_FIELD].value.u16 = ri->domain;\n+\tro->field[RTE_ACL_IPV4VLAN_SRC_FIELD].value.u32 = ri->src_addr;\n+\tro->field[RTE_ACL_IPV4VLAN_DST_FIELD].value.u32 = ri->dst_addr;\n+\tro->field[RTE_ACL_IPV4VLAN_SRCP_FIELD].value.u16 = ri->src_port_low;\n+\tro->field[RTE_ACL_IPV4VLAN_DSTP_FIELD].value.u16 = ri->dst_port_low;\n+\n+\tro->field[RTE_ACL_IPV4VLAN_PROTO_FIELD].mask_range.u8 = ri->proto_mask;\n+\tro->field[RTE_ACL_IPV4VLAN_VLAN1_FIELD].mask_range.u16 = ri->vlan_mask;\n+\tro->field[RTE_ACL_IPV4VLAN_VLAN2_FIELD].mask_range.u16 =\n+\t\tri->domain_mask;\n+\tro->field[RTE_ACL_IPV4VLAN_SRC_FIELD].mask_range.u32 =\n+\t\tri->src_mask_len;\n+\tro->field[RTE_ACL_IPV4VLAN_DST_FIELD].mask_range.u32 = ri->dst_mask_len;\n+\tro->field[RTE_ACL_IPV4VLAN_SRCP_FIELD].mask_range.u16 =\n+\t\tri->src_port_high;\n+\tro->field[RTE_ACL_IPV4VLAN_DSTP_FIELD].mask_range.u16 =\n+\t\tri->dst_port_high;\n+}\n+\n+/*\n+ * Add ipv4vlan rules to an existing ACL context.\n+ * This function is not multi-thread safe.\n+ *\n+ * @param ctx\n+ *   ACL context to add patterns to.\n+ * @param rules\n+ *   Array of rules to add to the ACL context.\n+ *   Note that all fields in rte_acl_ipv4vlan_rule structures are expected\n+ *   to be in host byte order.\n+ * @param num\n+ *   Number of elements in the input array of rules.\n+ * @return\n+ *   - -ENOMEM if there is no space in the ACL context for these rules.\n+ *   - -EINVAL if the parameters are invalid.\n+ *   - Zero if operation completed successfully.\n+ */\n+static int\n+rte_acl_ipv4vlan_add_rules(struct rte_acl_ctx *ctx,\n+\tconst struct rte_acl_ipv4vlan_rule *rules,\n+\tuint32_t num)\n+{\n+\tint32_t rc;\n+\tuint32_t i;\n+\tstruct acl_ipv4vlan_rule rv;\n+\n+\tif (ctx == NULL || rules == NULL)\n+\t\treturn -EINVAL;\n+\n+\t/* check input rules. */\n+\tfor (i = 0; i != num; i++) {\n+\t\trc = acl_ipv4vlan_check_rule(rules + i);\n+\t\tif (rc != 0) {\n+\t\t\tRTE_LOG(ERR, ACL, \"%s: rule #%u is invalid\\n\",\n+\t\t\t\t__func__, i + 1);\n+\t\t\treturn rc;\n+\t\t}\n+\t}\n+\n+\t/* perform conversion to the internal format and add to the context. */\n+\tfor (i = 0, rc = 0; i != num && rc == 0; i++) {\n+\t\tacl_ipv4vlan_convert_rule(rules + i, &rv);\n+\t\trc = rte_acl_add_rules(ctx, (struct rte_acl_rule *)&rv, 1);\n+\t}\n+\n+\treturn rc;\n+}\n+\n+static void\n+acl_ipv4vlan_config(struct rte_acl_config *cfg,\n+\tconst uint32_t layout[RTE_ACL_IPV4VLAN_NUM],\n+\tuint32_t num_categories)\n+{\n+\tstatic const struct rte_acl_field_def\n+\t\tipv4_defs[RTE_ACL_IPV4VLAN_NUM_FIELDS] = {\n+\t\t{\n+\t\t\t.type = RTE_ACL_FIELD_TYPE_BITMASK,\n+\t\t\t.size = sizeof(uint8_t),\n+\t\t\t.field_index = RTE_ACL_IPV4VLAN_PROTO_FIELD,\n+\t\t\t.input_index = RTE_ACL_IPV4VLAN_PROTO,\n+\t\t},\n+\t\t{\n+\t\t\t.type = RTE_ACL_FIELD_TYPE_BITMASK,\n+\t\t\t.size = sizeof(uint16_t),\n+\t\t\t.field_index = RTE_ACL_IPV4VLAN_VLAN1_FIELD,\n+\t\t\t.input_index = RTE_ACL_IPV4VLAN_VLAN,\n+\t\t},\n+\t\t{\n+\t\t\t.type = RTE_ACL_FIELD_TYPE_BITMASK,\n+\t\t\t.size = sizeof(uint16_t),\n+\t\t\t.field_index = RTE_ACL_IPV4VLAN_VLAN2_FIELD,\n+\t\t\t.input_index = RTE_ACL_IPV4VLAN_VLAN,\n+\t\t},\n+\t\t{\n+\t\t\t.type = RTE_ACL_FIELD_TYPE_MASK,\n+\t\t\t.size = sizeof(uint32_t),\n+\t\t\t.field_index = RTE_ACL_IPV4VLAN_SRC_FIELD,\n+\t\t\t.input_index = RTE_ACL_IPV4VLAN_SRC,\n+\t\t},\n+\t\t{\n+\t\t\t.type = RTE_ACL_FIELD_TYPE_MASK,\n+\t\t\t.size = sizeof(uint32_t),\n+\t\t\t.field_index = RTE_ACL_IPV4VLAN_DST_FIELD,\n+\t\t\t.input_index = RTE_ACL_IPV4VLAN_DST,\n+\t\t},\n+\t\t{\n+\t\t\t.type = RTE_ACL_FIELD_TYPE_RANGE,\n+\t\t\t.size = sizeof(uint16_t),\n+\t\t\t.field_index = RTE_ACL_IPV4VLAN_SRCP_FIELD,\n+\t\t\t.input_index = RTE_ACL_IPV4VLAN_PORTS,\n+\t\t},\n+\t\t{\n+\t\t\t.type = RTE_ACL_FIELD_TYPE_RANGE,\n+\t\t\t.size = sizeof(uint16_t),\n+\t\t\t.field_index = RTE_ACL_IPV4VLAN_DSTP_FIELD,\n+\t\t\t.input_index = RTE_ACL_IPV4VLAN_PORTS,\n+\t\t},\n+\t};\n+\n+\tmemcpy(&cfg->defs, ipv4_defs, sizeof(ipv4_defs));\n+\tcfg->num_fields = RTE_DIM(ipv4_defs);\n+\n+\tcfg->defs[RTE_ACL_IPV4VLAN_PROTO_FIELD].offset =\n+\t\tlayout[RTE_ACL_IPV4VLAN_PROTO];\n+\tcfg->defs[RTE_ACL_IPV4VLAN_VLAN1_FIELD].offset =\n+\t\tlayout[RTE_ACL_IPV4VLAN_VLAN];\n+\tcfg->defs[RTE_ACL_IPV4VLAN_VLAN2_FIELD].offset =\n+\t\tlayout[RTE_ACL_IPV4VLAN_VLAN] +\n+\t\tcfg->defs[RTE_ACL_IPV4VLAN_VLAN1_FIELD].size;\n+\tcfg->defs[RTE_ACL_IPV4VLAN_SRC_FIELD].offset =\n+\t\tlayout[RTE_ACL_IPV4VLAN_SRC];\n+\tcfg->defs[RTE_ACL_IPV4VLAN_DST_FIELD].offset =\n+\t\tlayout[RTE_ACL_IPV4VLAN_DST];\n+\tcfg->defs[RTE_ACL_IPV4VLAN_SRCP_FIELD].offset =\n+\t\tlayout[RTE_ACL_IPV4VLAN_PORTS];\n+\tcfg->defs[RTE_ACL_IPV4VLAN_DSTP_FIELD].offset =\n+\t\tlayout[RTE_ACL_IPV4VLAN_PORTS] +\n+\t\tcfg->defs[RTE_ACL_IPV4VLAN_SRCP_FIELD].size;\n+\n+\tcfg->num_categories = num_categories;\n+}\n+\n+/*\n+ * Analyze set of ipv4vlan rules and build required internal\n+ * run-time structures.\n+ * This function is not multi-thread safe.\n+ *\n+ * @param ctx\n+ *   ACL context to build.\n+ * @param layout\n+ *   Layout of input data to search through.\n+ * @param num_categories\n+ *   Maximum number of categories to use in that build.\n+ * @return\n+ *   - -ENOMEM if couldn't allocate enough memory.\n+ *   - -EINVAL if the parameters are invalid.\n+ *   - Negative error code if operation failed.\n+ *   - Zero if operation completed successfully.\n+ */\n+static int\n+rte_acl_ipv4vlan_build(struct rte_acl_ctx *ctx,\n+\tconst uint32_t layout[RTE_ACL_IPV4VLAN_NUM],\n+\tuint32_t num_categories)\n+{\n+\tstruct rte_acl_config cfg;\n+\n+\tif (ctx == NULL || layout == NULL)\n+\t\treturn -EINVAL;\n+\n+\tmemset(&cfg, 0, sizeof(cfg));\n+\tacl_ipv4vlan_config(&cfg, layout, num_categories);\n+\treturn rte_acl_build(ctx, &cfg);\n+}\n+\n /*\n  * Test scalar and SSE ACL lookup.\n  */\ndiff --git a/app/test/test_acl.h b/app/test/test_acl.h\nindex 9813569..421f310 100644\n--- a/app/test/test_acl.h\n+++ b/app/test/test_acl.h\n@@ -46,6 +46,65 @@ struct ipv4_7tuple {\n \tuint32_t deny;\n };\n \n+/**\n+ * Legacy support for 7-tuple IPv4 and VLAN rule.\n+ * This structure and corresponding API is deprecated.\n+ */\n+struct rte_acl_ipv4vlan_rule {\n+\tstruct rte_acl_rule_data data; /**< Miscellaneous data for the rule. */\n+\tuint8_t proto;                 /**< IPv4 protocol ID. */\n+\tuint8_t proto_mask;            /**< IPv4 protocol ID mask. */\n+\tuint16_t vlan;                 /**< VLAN ID. */\n+\tuint16_t vlan_mask;            /**< VLAN ID mask. */\n+\tuint16_t domain;               /**< VLAN domain. */\n+\tuint16_t domain_mask;          /**< VLAN domain mask. */\n+\tuint32_t src_addr;             /**< IPv4 source address. */\n+\tuint32_t src_mask_len;         /**< IPv4 source address mask. */\n+\tuint32_t dst_addr;             /**< IPv4 destination address. */\n+\tuint32_t dst_mask_len;         /**< IPv4 destination address mask. */\n+\tuint16_t src_port_low;         /**< L4 source port low. */\n+\tuint16_t src_port_high;        /**< L4 source port high. */\n+\tuint16_t dst_port_low;         /**< L4 destination port low. */\n+\tuint16_t dst_port_high;        /**< L4 destination port high. */\n+};\n+\n+/**\n+ * Specifies fields layout inside rte_acl_rule for rte_acl_ipv4vlan_rule.\n+ */\n+enum {\n+\tRTE_ACL_IPV4VLAN_PROTO_FIELD,\n+\tRTE_ACL_IPV4VLAN_VLAN1_FIELD,\n+\tRTE_ACL_IPV4VLAN_VLAN2_FIELD,\n+\tRTE_ACL_IPV4VLAN_SRC_FIELD,\n+\tRTE_ACL_IPV4VLAN_DST_FIELD,\n+\tRTE_ACL_IPV4VLAN_SRCP_FIELD,\n+\tRTE_ACL_IPV4VLAN_DSTP_FIELD,\n+\tRTE_ACL_IPV4VLAN_NUM_FIELDS\n+};\n+\n+/**\n+ * Macro to define rule size for rte_acl_ipv4vlan_rule.\n+ */\n+#define\tRTE_ACL_IPV4VLAN_RULE_SZ\t\\\n+\tRTE_ACL_RULE_SZ(RTE_ACL_IPV4VLAN_NUM_FIELDS)\n+\n+/*\n+ * That effectively defines order of IPV4VLAN classifications:\n+ *  - PROTO\n+ *  - VLAN (TAG and DOMAIN)\n+ *  - SRC IP ADDRESS\n+ *  - DST IP ADDRESS\n+ *  - PORTS (SRC and DST)\n+ */\n+enum {\n+\tRTE_ACL_IPV4VLAN_PROTO,\n+\tRTE_ACL_IPV4VLAN_VLAN,\n+\tRTE_ACL_IPV4VLAN_SRC,\n+\tRTE_ACL_IPV4VLAN_DST,\n+\tRTE_ACL_IPV4VLAN_PORTS,\n+\tRTE_ACL_IPV4VLAN_NUM\n+};\n+\n /* rules for invalid layout test */\n struct rte_acl_ipv4vlan_rule invalid_layout_rules[] = {\n \t\t/* test src and dst address */\ndiff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst\nindex c40764a..e7e213c 100644\n--- a/doc/guides/rel_notes/deprecation.rst\n+++ b/doc/guides/rel_notes/deprecation.rst\n@@ -59,10 +59,6 @@ Deprecation Notices\n * The scheduler statistics structure will change to allow keeping track of\n   RED actions.\n \n-* librte_acl: The structure rte_acl_ipv4vlan_rule is deprecated and should\n-  be removed as well as the associated functions rte_acl_ipv4vlan_add_rules\n-  and rte_acl_ipv4vlan_build.\n-\n * librte_cfgfile: In order to allow for longer names and values,\n   the value of macros CFG_NAME_LEN and CFG_NAME_VAL will be increased.\n   Most likely, the new values will be 64 and 256, respectively.\ndiff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c\nindex f612671..f676d14 100644\n--- a/examples/l3fwd-acl/main.c\n+++ b/examples/l3fwd-acl/main.c\n@@ -261,6 +261,23 @@ enum {\n \tNUM_FIELDS_IPV4\n };\n \n+/*\n+ * That effectively defines order of IPV4VLAN classifications:\n+ *  - PROTO\n+ *  - VLAN (TAG and DOMAIN)\n+ *  - SRC IP ADDRESS\n+ *  - DST IP ADDRESS\n+ *  - PORTS (SRC and DST)\n+ */\n+enum {\n+\tRTE_ACL_IPV4VLAN_PROTO,\n+\tRTE_ACL_IPV4VLAN_VLAN,\n+\tRTE_ACL_IPV4VLAN_SRC,\n+\tRTE_ACL_IPV4VLAN_DST,\n+\tRTE_ACL_IPV4VLAN_PORTS,\n+\tRTE_ACL_IPV4VLAN_NUM\n+};\n+\n struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {\n \t{\n \t\t.type = RTE_ACL_FIELD_TYPE_BITMASK,\ndiff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile\nindex 46acc2b..7a1cf8a 100644\n--- a/lib/librte_acl/Makefile\n+++ b/lib/librte_acl/Makefile\n@@ -39,7 +39,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)\n \n EXPORT_MAP := rte_acl_version.map\n \n-LIBABIVER := 1\n+LIBABIVER := 2\n \n # all source are stored in SRCS-y\n SRCS-$(CONFIG_RTE_LIBRTE_ACL) += tb_mem.c\ndiff --git a/lib/librte_acl/rte_acl.c b/lib/librte_acl/rte_acl.c\nindex a54d531..d60219f 100644\n--- a/lib/librte_acl/rte_acl.c\n+++ b/lib/librte_acl/rte_acl.c\n@@ -34,8 +34,6 @@\n #include <rte_acl.h>\n #include \"acl.h\"\n \n-#define\tBIT_SIZEOF(x)\t(sizeof(x) * CHAR_BIT)\n-\n TAILQ_HEAD(rte_acl_list, rte_tailq_entry);\n \n static struct rte_tailq_elem rte_acl_tailq = {\n@@ -365,171 +363,3 @@ rte_acl_list_dump(void)\n \t}\n \trte_rwlock_read_unlock(RTE_EAL_TAILQ_RWLOCK);\n }\n-\n-/*\n- * Support for legacy ipv4vlan rules.\n- */\n-\n-RTE_ACL_RULE_DEF(acl_ipv4vlan_rule, RTE_ACL_IPV4VLAN_NUM_FIELDS);\n-\n-static int\n-acl_ipv4vlan_check_rule(const struct rte_acl_ipv4vlan_rule *rule)\n-{\n-\tif (rule->src_port_low > rule->src_port_high ||\n-\t\t\trule->dst_port_low > rule->dst_port_high ||\n-\t\t\trule->src_mask_len > BIT_SIZEOF(rule->src_addr) ||\n-\t\t\trule->dst_mask_len > BIT_SIZEOF(rule->dst_addr))\n-\t\treturn -EINVAL;\n-\n-\treturn acl_check_rule(&rule->data);\n-}\n-\n-static void\n-acl_ipv4vlan_convert_rule(const struct rte_acl_ipv4vlan_rule *ri,\n-\tstruct acl_ipv4vlan_rule *ro)\n-{\n-\tro->data = ri->data;\n-\n-\tro->field[RTE_ACL_IPV4VLAN_PROTO_FIELD].value.u8 = ri->proto;\n-\tro->field[RTE_ACL_IPV4VLAN_VLAN1_FIELD].value.u16 = ri->vlan;\n-\tro->field[RTE_ACL_IPV4VLAN_VLAN2_FIELD].value.u16 = ri->domain;\n-\tro->field[RTE_ACL_IPV4VLAN_SRC_FIELD].value.u32 = ri->src_addr;\n-\tro->field[RTE_ACL_IPV4VLAN_DST_FIELD].value.u32 = ri->dst_addr;\n-\tro->field[RTE_ACL_IPV4VLAN_SRCP_FIELD].value.u16 = ri->src_port_low;\n-\tro->field[RTE_ACL_IPV4VLAN_DSTP_FIELD].value.u16 = ri->dst_port_low;\n-\n-\tro->field[RTE_ACL_IPV4VLAN_PROTO_FIELD].mask_range.u8 = ri->proto_mask;\n-\tro->field[RTE_ACL_IPV4VLAN_VLAN1_FIELD].mask_range.u16 = ri->vlan_mask;\n-\tro->field[RTE_ACL_IPV4VLAN_VLAN2_FIELD].mask_range.u16 =\n-\t\tri->domain_mask;\n-\tro->field[RTE_ACL_IPV4VLAN_SRC_FIELD].mask_range.u32 =\n-\t\tri->src_mask_len;\n-\tro->field[RTE_ACL_IPV4VLAN_DST_FIELD].mask_range.u32 = ri->dst_mask_len;\n-\tro->field[RTE_ACL_IPV4VLAN_SRCP_FIELD].mask_range.u16 =\n-\t\tri->src_port_high;\n-\tro->field[RTE_ACL_IPV4VLAN_DSTP_FIELD].mask_range.u16 =\n-\t\tri->dst_port_high;\n-}\n-\n-int\n-rte_acl_ipv4vlan_add_rules(struct rte_acl_ctx *ctx,\n-\tconst struct rte_acl_ipv4vlan_rule *rules,\n-\tuint32_t num)\n-{\n-\tint32_t rc;\n-\tuint32_t i;\n-\tstruct acl_ipv4vlan_rule rv;\n-\n-\tif (ctx == NULL || rules == NULL || ctx->rule_sz != sizeof(rv))\n-\t\treturn -EINVAL;\n-\n-\t/* check input rules. */\n-\tfor (i = 0; i != num; i++) {\n-\t\trc = acl_ipv4vlan_check_rule(rules + i);\n-\t\tif (rc != 0) {\n-\t\t\tRTE_LOG(ERR, ACL, \"%s(%s): rule #%u is invalid\\n\",\n-\t\t\t\t__func__, ctx->name, i + 1);\n-\t\t\treturn rc;\n-\t\t}\n-\t}\n-\n-\tif (num + ctx->num_rules > ctx->max_rules)\n-\t\treturn -ENOMEM;\n-\n-\t/* perform conversion to the internal format and add to the context. */\n-\tfor (i = 0, rc = 0; i != num && rc == 0; i++) {\n-\t\tacl_ipv4vlan_convert_rule(rules + i, &rv);\n-\t\trc = acl_add_rules(ctx, &rv, 1);\n-\t}\n-\n-\treturn rc;\n-}\n-\n-static void\n-acl_ipv4vlan_config(struct rte_acl_config *cfg,\n-\tconst uint32_t layout[RTE_ACL_IPV4VLAN_NUM],\n-\tuint32_t num_categories)\n-{\n-\tstatic const struct rte_acl_field_def\n-\t\tipv4_defs[RTE_ACL_IPV4VLAN_NUM_FIELDS] = {\n-\t\t{\n-\t\t\t.type = RTE_ACL_FIELD_TYPE_BITMASK,\n-\t\t\t.size = sizeof(uint8_t),\n-\t\t\t.field_index = RTE_ACL_IPV4VLAN_PROTO_FIELD,\n-\t\t\t.input_index = RTE_ACL_IPV4VLAN_PROTO,\n-\t\t},\n-\t\t{\n-\t\t\t.type = RTE_ACL_FIELD_TYPE_BITMASK,\n-\t\t\t.size = sizeof(uint16_t),\n-\t\t\t.field_index = RTE_ACL_IPV4VLAN_VLAN1_FIELD,\n-\t\t\t.input_index = RTE_ACL_IPV4VLAN_VLAN,\n-\t\t},\n-\t\t{\n-\t\t\t.type = RTE_ACL_FIELD_TYPE_BITMASK,\n-\t\t\t.size = sizeof(uint16_t),\n-\t\t\t.field_index = RTE_ACL_IPV4VLAN_VLAN2_FIELD,\n-\t\t\t.input_index = RTE_ACL_IPV4VLAN_VLAN,\n-\t\t},\n-\t\t{\n-\t\t\t.type = RTE_ACL_FIELD_TYPE_MASK,\n-\t\t\t.size = sizeof(uint32_t),\n-\t\t\t.field_index = RTE_ACL_IPV4VLAN_SRC_FIELD,\n-\t\t\t.input_index = RTE_ACL_IPV4VLAN_SRC,\n-\t\t},\n-\t\t{\n-\t\t\t.type = RTE_ACL_FIELD_TYPE_MASK,\n-\t\t\t.size = sizeof(uint32_t),\n-\t\t\t.field_index = RTE_ACL_IPV4VLAN_DST_FIELD,\n-\t\t\t.input_index = RTE_ACL_IPV4VLAN_DST,\n-\t\t},\n-\t\t{\n-\t\t\t.type = RTE_ACL_FIELD_TYPE_RANGE,\n-\t\t\t.size = sizeof(uint16_t),\n-\t\t\t.field_index = RTE_ACL_IPV4VLAN_SRCP_FIELD,\n-\t\t\t.input_index = RTE_ACL_IPV4VLAN_PORTS,\n-\t\t},\n-\t\t{\n-\t\t\t.type = RTE_ACL_FIELD_TYPE_RANGE,\n-\t\t\t.size = sizeof(uint16_t),\n-\t\t\t.field_index = RTE_ACL_IPV4VLAN_DSTP_FIELD,\n-\t\t\t.input_index = RTE_ACL_IPV4VLAN_PORTS,\n-\t\t},\n-\t};\n-\n-\tmemcpy(&cfg->defs, ipv4_defs, sizeof(ipv4_defs));\n-\tcfg->num_fields = RTE_DIM(ipv4_defs);\n-\n-\tcfg->defs[RTE_ACL_IPV4VLAN_PROTO_FIELD].offset =\n-\t\tlayout[RTE_ACL_IPV4VLAN_PROTO];\n-\tcfg->defs[RTE_ACL_IPV4VLAN_VLAN1_FIELD].offset =\n-\t\tlayout[RTE_ACL_IPV4VLAN_VLAN];\n-\tcfg->defs[RTE_ACL_IPV4VLAN_VLAN2_FIELD].offset =\n-\t\tlayout[RTE_ACL_IPV4VLAN_VLAN] +\n-\t\tcfg->defs[RTE_ACL_IPV4VLAN_VLAN1_FIELD].size;\n-\tcfg->defs[RTE_ACL_IPV4VLAN_SRC_FIELD].offset =\n-\t\tlayout[RTE_ACL_IPV4VLAN_SRC];\n-\tcfg->defs[RTE_ACL_IPV4VLAN_DST_FIELD].offset =\n-\t\tlayout[RTE_ACL_IPV4VLAN_DST];\n-\tcfg->defs[RTE_ACL_IPV4VLAN_SRCP_FIELD].offset =\n-\t\tlayout[RTE_ACL_IPV4VLAN_PORTS];\n-\tcfg->defs[RTE_ACL_IPV4VLAN_DSTP_FIELD].offset =\n-\t\tlayout[RTE_ACL_IPV4VLAN_PORTS] +\n-\t\tcfg->defs[RTE_ACL_IPV4VLAN_SRCP_FIELD].size;\n-\n-\tcfg->num_categories = num_categories;\n-}\n-\n-int\n-rte_acl_ipv4vlan_build(struct rte_acl_ctx *ctx,\n-\tconst uint32_t layout[RTE_ACL_IPV4VLAN_NUM],\n-\tuint32_t num_categories)\n-{\n-\tstruct rte_acl_config cfg;\n-\n-\tif (ctx == NULL || layout == NULL)\n-\t\treturn -EINVAL;\n-\n-\tmemset(&cfg, 0, sizeof(cfg));\n-\tacl_ipv4vlan_config(&cfg, layout, num_categories);\n-\treturn rte_acl_build(ctx, &cfg);\n-}\ndiff --git a/lib/librte_acl/rte_acl.h b/lib/librte_acl/rte_acl.h\nindex bd8f892..98ef2fc 100644\n--- a/lib/librte_acl/rte_acl.h\n+++ b/lib/librte_acl/rte_acl.h\n@@ -380,110 +380,6 @@ rte_acl_dump(const struct rte_acl_ctx *ctx);\n void\n rte_acl_list_dump(void);\n \n-/**\n- * Legacy support for 7-tuple IPv4 and VLAN rule.\n- * This structure and corresponding API is deprecated.\n- */\n-struct rte_acl_ipv4vlan_rule {\n-\tstruct rte_acl_rule_data data; /**< Miscellaneous data for the rule. */\n-\tuint8_t proto;                 /**< IPv4 protocol ID. */\n-\tuint8_t proto_mask;            /**< IPv4 protocol ID mask. */\n-\tuint16_t vlan;                 /**< VLAN ID. */\n-\tuint16_t vlan_mask;            /**< VLAN ID mask. */\n-\tuint16_t domain;               /**< VLAN domain. */\n-\tuint16_t domain_mask;          /**< VLAN domain mask. */\n-\tuint32_t src_addr;             /**< IPv4 source address. */\n-\tuint32_t src_mask_len;         /**< IPv4 source address mask. */\n-\tuint32_t dst_addr;             /**< IPv4 destination address. */\n-\tuint32_t dst_mask_len;         /**< IPv4 destination address mask. */\n-\tuint16_t src_port_low;         /**< L4 source port low. */\n-\tuint16_t src_port_high;        /**< L4 source port high. */\n-\tuint16_t dst_port_low;         /**< L4 destination port low. */\n-\tuint16_t dst_port_high;        /**< L4 destination port high. */\n-};\n-\n-/**\n- * Specifies fields layout inside rte_acl_rule for rte_acl_ipv4vlan_rule.\n- */\n-enum {\n-\tRTE_ACL_IPV4VLAN_PROTO_FIELD,\n-\tRTE_ACL_IPV4VLAN_VLAN1_FIELD,\n-\tRTE_ACL_IPV4VLAN_VLAN2_FIELD,\n-\tRTE_ACL_IPV4VLAN_SRC_FIELD,\n-\tRTE_ACL_IPV4VLAN_DST_FIELD,\n-\tRTE_ACL_IPV4VLAN_SRCP_FIELD,\n-\tRTE_ACL_IPV4VLAN_DSTP_FIELD,\n-\tRTE_ACL_IPV4VLAN_NUM_FIELDS\n-};\n-\n-/**\n- * Macro to define rule size for rte_acl_ipv4vlan_rule.\n- */\n-#define\tRTE_ACL_IPV4VLAN_RULE_SZ\t\\\n-\tRTE_ACL_RULE_SZ(RTE_ACL_IPV4VLAN_NUM_FIELDS)\n-\n-/*\n- * That effectively defines order of IPV4VLAN classifications:\n- *  - PROTO\n- *  - VLAN (TAG and DOMAIN)\n- *  - SRC IP ADDRESS\n- *  - DST IP ADDRESS\n- *  - PORTS (SRC and DST)\n- */\n-enum {\n-\tRTE_ACL_IPV4VLAN_PROTO,\n-\tRTE_ACL_IPV4VLAN_VLAN,\n-\tRTE_ACL_IPV4VLAN_SRC,\n-\tRTE_ACL_IPV4VLAN_DST,\n-\tRTE_ACL_IPV4VLAN_PORTS,\n-\tRTE_ACL_IPV4VLAN_NUM\n-};\n-\n-/**\n- * Add ipv4vlan rules to an existing ACL context.\n- * This function is not multi-thread safe.\n- *\n- * @param ctx\n- *   ACL context to add patterns to.\n- * @param rules\n- *   Array of rules to add to the ACL context.\n- *   Note that all fields in rte_acl_ipv4vlan_rule structures are expected\n- *   to be in host byte order.\n- * @param num\n- *   Number of elements in the input array of rules.\n- * @return\n- *   - -ENOMEM if there is no space in the ACL context for these rules.\n- *   - -EINVAL if the parameters are invalid.\n- *   - Zero if operation completed successfully.\n- */\n-int\n-rte_acl_ipv4vlan_add_rules(struct rte_acl_ctx *ctx,\n-\tconst struct rte_acl_ipv4vlan_rule *rules,\n-\tuint32_t num);\n-\n-/**\n- * Analyze set of ipv4vlan rules and build required internal\n- * run-time structures.\n- * This function is not multi-thread safe.\n- *\n- * @param ctx\n- *   ACL context to build.\n- * @param layout\n- *   Layout of input data to search through.\n- * @param num_categories\n- *   Maximum number of categories to use in that build.\n- * @return\n- *   - -ENOMEM if couldn't allocate enough memory.\n- *   - -EINVAL if the parameters are invalid.\n- *   - Negative error code if operation failed.\n- *   - Zero if operation completed successfully.\n- */\n-int\n-rte_acl_ipv4vlan_build(struct rte_acl_ctx *ctx,\n-\tconst uint32_t layout[RTE_ACL_IPV4VLAN_NUM],\n-\tuint32_t num_categories);\n-\n-\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/librte_acl/rte_acl_version.map b/lib/librte_acl/rte_acl_version.map\nindex 3f9c810..b09370a 100644\n--- a/lib/librte_acl/rte_acl_version.map\n+++ b/lib/librte_acl/rte_acl_version.map\n@@ -10,8 +10,6 @@ DPDK_2.0 {\n \trte_acl_dump;\n \trte_acl_find_existing;\n \trte_acl_free;\n-\trte_acl_ipv4vlan_add_rules;\n-\trte_acl_ipv4vlan_build;\n \trte_acl_list_dump;\n \trte_acl_reset;\n \trte_acl_reset_rules;\n",
    "prefixes": [
        "dpdk-dev",
        "7/9"
    ]
}