From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 67DCBA04B0; Mon, 19 Oct 2020 00:14:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4086EBAC8; Mon, 19 Oct 2020 00:14:20 +0200 (CEST) Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by dpdk.org (Postfix) with ESMTP id 044B8BAD2 for ; Mon, 19 Oct 2020 00:14:18 +0200 (CEST) Received: by mail-oi1-f194.google.com with SMTP id m128so10329451oig.7 for ; Sun, 18 Oct 2020 15:14:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ct27Ls9NCOXzoDizdRwLbgNyJaqnG6y1xOQQSRK05H8=; b=WxmQc4lfhAII8g1VaGmAA3wS4NrbQeXztGDzbZcnWNadPyZuSSt16iNhAJ1lAO1pSu 3RhQ9HNsLnXM4qwIFbXTTKHtAvQcjxIwwBXV/nao4sqml6GTVTJTVFthVIdf40MO2nve fBo5Mo1PASAaRSiJxDpV7yX1WpOsDfoN6dZPw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ct27Ls9NCOXzoDizdRwLbgNyJaqnG6y1xOQQSRK05H8=; b=YJZrEXrUTaeFQQVfIBT7c6wF7JqcvQ1ciM4raQqpMP1Rgm1LDeOncYuMO5czkjXqu4 2KhYoQBZ5qVsUj5pdU66g2iEy+Sc3Q8rajZjqVxiPz1xxS2dOTvNVm1oW7LBSpcYfMfq XMs6bWaQCI+DjLkkHIIZeg3ggKuVjR/Ljf6/rA8UiSeH6VdBqJ845qJju00IYquRLqLj J4qRp1+80Hc1E0MmugovoQGylPE/0lwpSpmuhvssWoqf5uiJK6VbSbdPvNwnDfsjAZZi EMycRJ5j0c4Z5nGXT6P2/sIXAVd6OU2d/zLfV1RgnNLQdHBmA6nriiYnbMeQ7PStWTex Zt2g== X-Gm-Message-State: AOAM531bx+jj3EauS/ZfPiPSoVTVrgdXbyR66D7bejinvoCPEDX8Ww5y jHguGwjtYEzgzlmTUomjb4gPSIi5CkKzG6cXqpbNpQ== X-Google-Smtp-Source: ABdhPJz7VjIrTqBzqNZAXMTkCw2A7Po2WxYeTFJWGMlprzr6sdf2w/VHGacdsXzANMjGd+O7eopT0w1qgqEoKW/FZcA= X-Received: by 2002:aca:4bc2:: with SMTP id y185mr863280oia.168.1603059255919; Sun, 18 Oct 2020 15:14:15 -0700 (PDT) MIME-Version: 1.0 References: <1603030152-13451-1-git-send-email-arybchenko@solarflare.com> <1603030152-13451-8-git-send-email-arybchenko@solarflare.com> In-Reply-To: <1603030152-13451-8-git-send-email-arybchenko@solarflare.com> From: Ajit Khaparde Date: Sun, 18 Oct 2020 15:13:59 -0700 Message-ID: To: Andrew Rybchenko Cc: Wenzhuo Lu , Beilei Xing , Bernard Iremonger , Ray Kinsella , Neil Horman , Somnath Kotur , Jeff Guo , Haiyue Wang , Rasesh Mody , Shahed Shaikh , Andrew Rybchenko , Thomas Monjalon , Ferruh Yigit , dpdk-dev Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 07/14] ethdev: remove legacy N-tuple filter type support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Sun, Oct 18, 2020 at 7:09 AM Andrew Rybchenko wrote: > > RTE flow API should be used for filtering. > > Preserve struct rte_eth_ntuple_filter in ethdev API since > the structure and related defines are used in flow classify > library and a number of drivers. > > Preserve RTE_ETH_FILTER_NTUPLE because of usage in drivers. > > Signed-off-by: Andrew Rybchenko For bnxt PMD Acked-by: Ajit Khaparde > --- > app/test-pmd/cmdline.c | 369 --------------------------- > doc/guides/rel_notes/deprecation.rst | 2 +- > drivers/net/bnxt/bnxt_ethdev.c | 245 ------------------ > drivers/net/e1000/igb_ethdev.c | 130 +--------- > drivers/net/ixgbe/ixgbe_ethdev.c | 101 -------- > drivers/net/qede/qede_filter.c | 63 ----- > drivers/net/sfc/sfc_ethdev.c | 3 - > lib/librte_ethdev/rte_eth_ctrl.h | 3 +- > 8 files changed, 3 insertions(+), 913 deletions(-) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index bf3fdd8609..1fdab5f026 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -976,20 +976,6 @@ static void cmd_help_long_parsed(void *parsed_result, > "filters:\n" > "--------\n\n" > > - "2tuple_filter (port_id) (add|del)" > - " dst_port (dst_port_value) protocol (protocol_value)" > - " mask (mask_value) tcp_flags (tcp_flags_value)" > - " priority (prio_value) queue (queue_id)\n" > - " Add/Del a 2tuple filter.\n\n" > - > - "5tuple_filter (port_id) (add|del)" > - " dst_ip (dst_address) src_ip (src_address)" > - " dst_port (dst_port_value) src_port (src_port_value)" > - " protocol (protocol_value)" > - " mask (mask_value) tcp_flags (tcp_flags_value)" > - " priority (prio_value) queue (queue_id)\n" > - " Add/Del a 5tuple filter.\n\n" > - > "flow_director_filter (port_id) mode IP (add|del|update)" > " flow (ipv4-other|ipv4-frag|ipv6-other|ipv6-frag)" > " src (src_ip_address) dst (dst_ip_address)" > @@ -10421,359 +10407,6 @@ cmdline_parse_inst_t cmd_show_queue_region_info_all = { > }, > }; > > -/* *** ADD/REMOVE A 2tuple FILTER *** */ > -struct cmd_2tuple_filter_result { > - cmdline_fixed_string_t filter; > - portid_t port_id; > - cmdline_fixed_string_t ops; > - cmdline_fixed_string_t dst_port; > - uint16_t dst_port_value; > - cmdline_fixed_string_t protocol; > - uint8_t protocol_value; > - cmdline_fixed_string_t mask; > - uint8_t mask_value; > - cmdline_fixed_string_t tcp_flags; > - uint8_t tcp_flags_value; > - cmdline_fixed_string_t priority; > - uint8_t priority_value; > - cmdline_fixed_string_t queue; > - uint16_t queue_id; > -}; > - > -static void > -cmd_2tuple_filter_parsed(void *parsed_result, > - __rte_unused struct cmdline *cl, > - __rte_unused void *data) > -{ > - struct rte_eth_ntuple_filter filter; > - struct cmd_2tuple_filter_result *res = parsed_result; > - int ret = 0; > - > - ret = rte_eth_dev_filter_supported(res->port_id, RTE_ETH_FILTER_NTUPLE); > - if (ret < 0) { > - printf("ntuple filter is not supported on port %u.\n", > - res->port_id); > - return; > - } > - > - memset(&filter, 0, sizeof(struct rte_eth_ntuple_filter)); > - > - filter.flags = RTE_2TUPLE_FLAGS; > - filter.dst_port_mask = (res->mask_value & 0x02) ? UINT16_MAX : 0; > - filter.proto_mask = (res->mask_value & 0x01) ? UINT8_MAX : 0; > - filter.proto = res->protocol_value; > - filter.priority = res->priority_value; > - if (res->tcp_flags_value != 0 && filter.proto != IPPROTO_TCP) { > - printf("nonzero tcp_flags is only meaningful" > - " when protocol is TCP.\n"); > - return; > - } > - if (res->tcp_flags_value > RTE_NTUPLE_TCP_FLAGS_MASK) { > - printf("invalid TCP flags.\n"); > - return; > - } > - > - if (res->tcp_flags_value != 0) { > - filter.flags |= RTE_NTUPLE_FLAGS_TCP_FLAG; > - filter.tcp_flags = res->tcp_flags_value; > - } > - > - /* need convert to big endian. */ > - filter.dst_port = rte_cpu_to_be_16(res->dst_port_value); > - filter.queue = res->queue_id; > - > - if (!strcmp(res->ops, "add")) > - ret = rte_eth_dev_filter_ctrl(res->port_id, > - RTE_ETH_FILTER_NTUPLE, > - RTE_ETH_FILTER_ADD, > - &filter); > - else > - ret = rte_eth_dev_filter_ctrl(res->port_id, > - RTE_ETH_FILTER_NTUPLE, > - RTE_ETH_FILTER_DELETE, > - &filter); > - if (ret < 0) > - printf("2tuple filter programming error: (%s)\n", > - strerror(-ret)); > - > -} > - > -cmdline_parse_token_string_t cmd_2tuple_filter_filter = > - TOKEN_STRING_INITIALIZER(struct cmd_2tuple_filter_result, > - filter, "2tuple_filter"); > -cmdline_parse_token_num_t cmd_2tuple_filter_port_id = > - TOKEN_NUM_INITIALIZER(struct cmd_2tuple_filter_result, > - port_id, UINT16); > -cmdline_parse_token_string_t cmd_2tuple_filter_ops = > - TOKEN_STRING_INITIALIZER(struct cmd_2tuple_filter_result, > - ops, "add#del"); > -cmdline_parse_token_string_t cmd_2tuple_filter_dst_port = > - TOKEN_STRING_INITIALIZER(struct cmd_2tuple_filter_result, > - dst_port, "dst_port"); > -cmdline_parse_token_num_t cmd_2tuple_filter_dst_port_value = > - TOKEN_NUM_INITIALIZER(struct cmd_2tuple_filter_result, > - dst_port_value, UINT16); > -cmdline_parse_token_string_t cmd_2tuple_filter_protocol = > - TOKEN_STRING_INITIALIZER(struct cmd_2tuple_filter_result, > - protocol, "protocol"); > -cmdline_parse_token_num_t cmd_2tuple_filter_protocol_value = > - TOKEN_NUM_INITIALIZER(struct cmd_2tuple_filter_result, > - protocol_value, UINT8); > -cmdline_parse_token_string_t cmd_2tuple_filter_mask = > - TOKEN_STRING_INITIALIZER(struct cmd_2tuple_filter_result, > - mask, "mask"); > -cmdline_parse_token_num_t cmd_2tuple_filter_mask_value = > - TOKEN_NUM_INITIALIZER(struct cmd_2tuple_filter_result, > - mask_value, INT8); > -cmdline_parse_token_string_t cmd_2tuple_filter_tcp_flags = > - TOKEN_STRING_INITIALIZER(struct cmd_2tuple_filter_result, > - tcp_flags, "tcp_flags"); > -cmdline_parse_token_num_t cmd_2tuple_filter_tcp_flags_value = > - TOKEN_NUM_INITIALIZER(struct cmd_2tuple_filter_result, > - tcp_flags_value, UINT8); > -cmdline_parse_token_string_t cmd_2tuple_filter_priority = > - TOKEN_STRING_INITIALIZER(struct cmd_2tuple_filter_result, > - priority, "priority"); > -cmdline_parse_token_num_t cmd_2tuple_filter_priority_value = > - TOKEN_NUM_INITIALIZER(struct cmd_2tuple_filter_result, > - priority_value, UINT8); > -cmdline_parse_token_string_t cmd_2tuple_filter_queue = > - TOKEN_STRING_INITIALIZER(struct cmd_2tuple_filter_result, > - queue, "queue"); > -cmdline_parse_token_num_t cmd_2tuple_filter_queue_id = > - TOKEN_NUM_INITIALIZER(struct cmd_2tuple_filter_result, > - queue_id, UINT16); > - > -cmdline_parse_inst_t cmd_2tuple_filter = { > - .f = cmd_2tuple_filter_parsed, > - .data = NULL, > - .help_str = "2tuple_filter add|del dst_port protocol " > - " mask tcp_flags priority queue " > - ": Add a 2tuple filter", > - .tokens = { > - (void *)&cmd_2tuple_filter_filter, > - (void *)&cmd_2tuple_filter_port_id, > - (void *)&cmd_2tuple_filter_ops, > - (void *)&cmd_2tuple_filter_dst_port, > - (void *)&cmd_2tuple_filter_dst_port_value, > - (void *)&cmd_2tuple_filter_protocol, > - (void *)&cmd_2tuple_filter_protocol_value, > - (void *)&cmd_2tuple_filter_mask, > - (void *)&cmd_2tuple_filter_mask_value, > - (void *)&cmd_2tuple_filter_tcp_flags, > - (void *)&cmd_2tuple_filter_tcp_flags_value, > - (void *)&cmd_2tuple_filter_priority, > - (void *)&cmd_2tuple_filter_priority_value, > - (void *)&cmd_2tuple_filter_queue, > - (void *)&cmd_2tuple_filter_queue_id, > - NULL, > - }, > -}; > - > -/* *** ADD/REMOVE A 5tuple FILTER *** */ > -struct cmd_5tuple_filter_result { > - cmdline_fixed_string_t filter; > - portid_t port_id; > - cmdline_fixed_string_t ops; > - cmdline_fixed_string_t dst_ip; > - cmdline_ipaddr_t dst_ip_value; > - cmdline_fixed_string_t src_ip; > - cmdline_ipaddr_t src_ip_value; > - cmdline_fixed_string_t dst_port; > - uint16_t dst_port_value; > - cmdline_fixed_string_t src_port; > - uint16_t src_port_value; > - cmdline_fixed_string_t protocol; > - uint8_t protocol_value; > - cmdline_fixed_string_t mask; > - uint8_t mask_value; > - cmdline_fixed_string_t tcp_flags; > - uint8_t tcp_flags_value; > - cmdline_fixed_string_t priority; > - uint8_t priority_value; > - cmdline_fixed_string_t queue; > - uint16_t queue_id; > -}; > - > -static void > -cmd_5tuple_filter_parsed(void *parsed_result, > - __rte_unused struct cmdline *cl, > - __rte_unused void *data) > -{ > - struct rte_eth_ntuple_filter filter; > - struct cmd_5tuple_filter_result *res = parsed_result; > - int ret = 0; > - > - ret = rte_eth_dev_filter_supported(res->port_id, RTE_ETH_FILTER_NTUPLE); > - if (ret < 0) { > - printf("ntuple filter is not supported on port %u.\n", > - res->port_id); > - return; > - } > - > - memset(&filter, 0, sizeof(struct rte_eth_ntuple_filter)); > - > - filter.flags = RTE_5TUPLE_FLAGS; > - filter.dst_ip_mask = (res->mask_value & 0x10) ? UINT32_MAX : 0; > - filter.src_ip_mask = (res->mask_value & 0x08) ? UINT32_MAX : 0; > - filter.dst_port_mask = (res->mask_value & 0x04) ? UINT16_MAX : 0; > - filter.src_port_mask = (res->mask_value & 0x02) ? UINT16_MAX : 0; > - filter.proto_mask = (res->mask_value & 0x01) ? UINT8_MAX : 0; > - filter.proto = res->protocol_value; > - filter.priority = res->priority_value; > - if (res->tcp_flags_value != 0 && filter.proto != IPPROTO_TCP) { > - printf("nonzero tcp_flags is only meaningful" > - " when protocol is TCP.\n"); > - return; > - } > - if (res->tcp_flags_value > RTE_NTUPLE_TCP_FLAGS_MASK) { > - printf("invalid TCP flags.\n"); > - return; > - } > - > - if (res->tcp_flags_value != 0) { > - filter.flags |= RTE_NTUPLE_FLAGS_TCP_FLAG; > - filter.tcp_flags = res->tcp_flags_value; > - } > - > - if (res->dst_ip_value.family == AF_INET) > - /* no need to convert, already big endian. */ > - filter.dst_ip = res->dst_ip_value.addr.ipv4.s_addr; > - else { > - if (filter.dst_ip_mask == 0) { > - printf("can not support ipv6 involved compare.\n"); > - return; > - } > - filter.dst_ip = 0; > - } > - > - if (res->src_ip_value.family == AF_INET) > - /* no need to convert, already big endian. */ > - filter.src_ip = res->src_ip_value.addr.ipv4.s_addr; > - else { > - if (filter.src_ip_mask == 0) { > - printf("can not support ipv6 involved compare.\n"); > - return; > - } > - filter.src_ip = 0; > - } > - /* need convert to big endian. */ > - filter.dst_port = rte_cpu_to_be_16(res->dst_port_value); > - filter.src_port = rte_cpu_to_be_16(res->src_port_value); > - filter.queue = res->queue_id; > - > - if (!strcmp(res->ops, "add")) > - ret = rte_eth_dev_filter_ctrl(res->port_id, > - RTE_ETH_FILTER_NTUPLE, > - RTE_ETH_FILTER_ADD, > - &filter); > - else > - ret = rte_eth_dev_filter_ctrl(res->port_id, > - RTE_ETH_FILTER_NTUPLE, > - RTE_ETH_FILTER_DELETE, > - &filter); > - if (ret < 0) > - printf("5tuple filter programming error: (%s)\n", > - strerror(-ret)); > -} > - > -cmdline_parse_token_string_t cmd_5tuple_filter_filter = > - TOKEN_STRING_INITIALIZER(struct cmd_5tuple_filter_result, > - filter, "5tuple_filter"); > -cmdline_parse_token_num_t cmd_5tuple_filter_port_id = > - TOKEN_NUM_INITIALIZER(struct cmd_5tuple_filter_result, > - port_id, UINT16); > -cmdline_parse_token_string_t cmd_5tuple_filter_ops = > - TOKEN_STRING_INITIALIZER(struct cmd_5tuple_filter_result, > - ops, "add#del"); > -cmdline_parse_token_string_t cmd_5tuple_filter_dst_ip = > - TOKEN_STRING_INITIALIZER(struct cmd_5tuple_filter_result, > - dst_ip, "dst_ip"); > -cmdline_parse_token_ipaddr_t cmd_5tuple_filter_dst_ip_value = > - TOKEN_IPADDR_INITIALIZER(struct cmd_5tuple_filter_result, > - dst_ip_value); > -cmdline_parse_token_string_t cmd_5tuple_filter_src_ip = > - TOKEN_STRING_INITIALIZER(struct cmd_5tuple_filter_result, > - src_ip, "src_ip"); > -cmdline_parse_token_ipaddr_t cmd_5tuple_filter_src_ip_value = > - TOKEN_IPADDR_INITIALIZER(struct cmd_5tuple_filter_result, > - src_ip_value); > -cmdline_parse_token_string_t cmd_5tuple_filter_dst_port = > - TOKEN_STRING_INITIALIZER(struct cmd_5tuple_filter_result, > - dst_port, "dst_port"); > -cmdline_parse_token_num_t cmd_5tuple_filter_dst_port_value = > - TOKEN_NUM_INITIALIZER(struct cmd_5tuple_filter_result, > - dst_port_value, UINT16); > -cmdline_parse_token_string_t cmd_5tuple_filter_src_port = > - TOKEN_STRING_INITIALIZER(struct cmd_5tuple_filter_result, > - src_port, "src_port"); > -cmdline_parse_token_num_t cmd_5tuple_filter_src_port_value = > - TOKEN_NUM_INITIALIZER(struct cmd_5tuple_filter_result, > - src_port_value, UINT16); > -cmdline_parse_token_string_t cmd_5tuple_filter_protocol = > - TOKEN_STRING_INITIALIZER(struct cmd_5tuple_filter_result, > - protocol, "protocol"); > -cmdline_parse_token_num_t cmd_5tuple_filter_protocol_value = > - TOKEN_NUM_INITIALIZER(struct cmd_5tuple_filter_result, > - protocol_value, UINT8); > -cmdline_parse_token_string_t cmd_5tuple_filter_mask = > - TOKEN_STRING_INITIALIZER(struct cmd_5tuple_filter_result, > - mask, "mask"); > -cmdline_parse_token_num_t cmd_5tuple_filter_mask_value = > - TOKEN_NUM_INITIALIZER(struct cmd_5tuple_filter_result, > - mask_value, INT8); > -cmdline_parse_token_string_t cmd_5tuple_filter_tcp_flags = > - TOKEN_STRING_INITIALIZER(struct cmd_5tuple_filter_result, > - tcp_flags, "tcp_flags"); > -cmdline_parse_token_num_t cmd_5tuple_filter_tcp_flags_value = > - TOKEN_NUM_INITIALIZER(struct cmd_5tuple_filter_result, > - tcp_flags_value, UINT8); > -cmdline_parse_token_string_t cmd_5tuple_filter_priority = > - TOKEN_STRING_INITIALIZER(struct cmd_5tuple_filter_result, > - priority, "priority"); > -cmdline_parse_token_num_t cmd_5tuple_filter_priority_value = > - TOKEN_NUM_INITIALIZER(struct cmd_5tuple_filter_result, > - priority_value, UINT8); > -cmdline_parse_token_string_t cmd_5tuple_filter_queue = > - TOKEN_STRING_INITIALIZER(struct cmd_5tuple_filter_result, > - queue, "queue"); > -cmdline_parse_token_num_t cmd_5tuple_filter_queue_id = > - TOKEN_NUM_INITIALIZER(struct cmd_5tuple_filter_result, > - queue_id, UINT16); > - > -cmdline_parse_inst_t cmd_5tuple_filter = { > - .f = cmd_5tuple_filter_parsed, > - .data = NULL, > - .help_str = "5tuple_filter add|del dst_ip " > - "src_ip dst_port src_port " > - "protocol mask tcp_flags " > - "priority queue : Add/Del a 5tuple filter", > - .tokens = { > - (void *)&cmd_5tuple_filter_filter, > - (void *)&cmd_5tuple_filter_port_id, > - (void *)&cmd_5tuple_filter_ops, > - (void *)&cmd_5tuple_filter_dst_ip, > - (void *)&cmd_5tuple_filter_dst_ip_value, > - (void *)&cmd_5tuple_filter_src_ip, > - (void *)&cmd_5tuple_filter_src_ip_value, > - (void *)&cmd_5tuple_filter_dst_port, > - (void *)&cmd_5tuple_filter_dst_port_value, > - (void *)&cmd_5tuple_filter_src_port, > - (void *)&cmd_5tuple_filter_src_port_value, > - (void *)&cmd_5tuple_filter_protocol, > - (void *)&cmd_5tuple_filter_protocol_value, > - (void *)&cmd_5tuple_filter_mask, > - (void *)&cmd_5tuple_filter_mask_value, > - (void *)&cmd_5tuple_filter_tcp_flags, > - (void *)&cmd_5tuple_filter_tcp_flags_value, > - (void *)&cmd_5tuple_filter_priority, > - (void *)&cmd_5tuple_filter_priority_value, > - (void *)&cmd_5tuple_filter_queue, > - (void *)&cmd_5tuple_filter_queue_id, > - NULL, > - }, > -}; > - > /* *** Filters Control *** */ > > /* *** deal with flow director filter *** */ > @@ -19542,8 +19175,6 @@ cmdline_parse_ctx_t main_ctx[] = { > (cmdline_parse_inst_t *)&cmd_config_rss_hash_key, > (cmdline_parse_inst_t *)&cmd_dump, > (cmdline_parse_inst_t *)&cmd_dump_one, > - (cmdline_parse_inst_t *)&cmd_2tuple_filter, > - (cmdline_parse_inst_t *)&cmd_5tuple_filter, > (cmdline_parse_inst_t *)&cmd_add_del_ip_flow_director, > (cmdline_parse_inst_t *)&cmd_add_del_udp_flow_director, > (cmdline_parse_inst_t *)&cmd_add_del_sctp_flow_director, > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst > index 8a7839152e..a531edc88c 100644 > --- a/doc/guides/rel_notes/deprecation.rst > +++ b/doc/guides/rel_notes/deprecation.rst > @@ -108,7 +108,7 @@ Deprecation Notices > > * ethdev: the legacy filter API, including > ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well > - as filter types NTUPLE, TUNNEL, FDIR, > + as filter types TUNNEL, FDIR, > HASH and L2_TUNNEL, is superseded by the generic flow API (rte_flow) in > PMDs that implement the latter. > The legacy API will be removed in DPDK 20.11. > diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c > index 12bc3288e5..2de8d003d2 100644 > --- a/drivers/net/bnxt/bnxt_ethdev.c > +++ b/drivers/net/bnxt/bnxt_ethdev.c > @@ -2987,248 +2987,6 @@ bnxt_tx_descriptor_status_op(void *tx_queue, uint16_t offset) > return RTE_ETH_TX_DESC_FULL; > } > > -static inline int > -parse_ntuple_filter(struct bnxt *bp, > - struct rte_eth_ntuple_filter *nfilter, > - struct bnxt_filter_info *bfilter) > -{ > - uint32_t en = 0; > - > - if (nfilter->queue >= bp->rx_nr_rings) { > - PMD_DRV_LOG(ERR, "Invalid queue %d\n", nfilter->queue); > - return -EINVAL; > - } > - > - switch (nfilter->dst_port_mask) { > - case UINT16_MAX: > - bfilter->dst_port_mask = -1; > - bfilter->dst_port = nfilter->dst_port; > - en |= NTUPLE_FLTR_ALLOC_INPUT_EN_DST_PORT | > - NTUPLE_FLTR_ALLOC_INPUT_EN_DST_PORT_MASK; > - break; > - default: > - PMD_DRV_LOG(ERR, "invalid dst_port mask."); > - return -EINVAL; > - } > - > - bfilter->ip_addr_type = NTUPLE_FLTR_ALLOC_INPUT_IP_ADDR_TYPE_IPV4; > - en |= NTUPLE_FLTR_ALLOC_IN_EN_IP_PROTO; > - > - switch (nfilter->proto_mask) { > - case UINT8_MAX: > - if (nfilter->proto == 17) /* IPPROTO_UDP */ > - bfilter->ip_protocol = 17; > - else if (nfilter->proto == 6) /* IPPROTO_TCP */ > - bfilter->ip_protocol = 6; > - else > - return -EINVAL; > - en |= NTUPLE_FLTR_ALLOC_IN_EN_IP_PROTO; > - break; > - default: > - PMD_DRV_LOG(ERR, "invalid protocol mask."); > - return -EINVAL; > - } > - > - switch (nfilter->dst_ip_mask) { > - case UINT32_MAX: > - bfilter->dst_ipaddr_mask[0] = -1; > - bfilter->dst_ipaddr[0] = nfilter->dst_ip; > - en |= NTUPLE_FLTR_ALLOC_INPUT_EN_DST_IPADDR | > - NTUPLE_FLTR_ALLOC_INPUT_EN_DST_IPADDR_MASK; > - break; > - default: > - PMD_DRV_LOG(ERR, "invalid dst_ip mask."); > - return -EINVAL; > - } > - > - switch (nfilter->src_ip_mask) { > - case UINT32_MAX: > - bfilter->src_ipaddr_mask[0] = -1; > - bfilter->src_ipaddr[0] = nfilter->src_ip; > - en |= NTUPLE_FLTR_ALLOC_INPUT_EN_SRC_IPADDR | > - NTUPLE_FLTR_ALLOC_INPUT_EN_SRC_IPADDR_MASK; > - break; > - default: > - PMD_DRV_LOG(ERR, "invalid src_ip mask."); > - return -EINVAL; > - } > - > - switch (nfilter->src_port_mask) { > - case UINT16_MAX: > - bfilter->src_port_mask = -1; > - bfilter->src_port = nfilter->src_port; > - en |= NTUPLE_FLTR_ALLOC_INPUT_EN_SRC_PORT | > - NTUPLE_FLTR_ALLOC_INPUT_EN_SRC_PORT_MASK; > - break; > - default: > - PMD_DRV_LOG(ERR, "invalid src_port mask."); > - return -EINVAL; > - } > - > - bfilter->enables = en; > - return 0; > -} > - > -static struct bnxt_filter_info* > -bnxt_match_ntuple_filter(struct bnxt *bp, > - struct bnxt_filter_info *bfilter, > - struct bnxt_vnic_info **mvnic) > -{ > - struct bnxt_filter_info *mfilter = NULL; > - int i; > - > - for (i = bp->nr_vnics - 1; i >= 0; i--) { > - struct bnxt_vnic_info *vnic = &bp->vnic_info[i]; > - STAILQ_FOREACH(mfilter, &vnic->filter, next) { > - if (bfilter->src_ipaddr[0] == mfilter->src_ipaddr[0] && > - bfilter->src_ipaddr_mask[0] == > - mfilter->src_ipaddr_mask[0] && > - bfilter->src_port == mfilter->src_port && > - bfilter->src_port_mask == mfilter->src_port_mask && > - bfilter->dst_ipaddr[0] == mfilter->dst_ipaddr[0] && > - bfilter->dst_ipaddr_mask[0] == > - mfilter->dst_ipaddr_mask[0] && > - bfilter->dst_port == mfilter->dst_port && > - bfilter->dst_port_mask == mfilter->dst_port_mask && > - bfilter->flags == mfilter->flags && > - bfilter->enables == mfilter->enables) { > - if (mvnic) > - *mvnic = vnic; > - return mfilter; > - } > - } > - } > - return NULL; > -} > - > -static int > -bnxt_cfg_ntuple_filter(struct bnxt *bp, > - struct rte_eth_ntuple_filter *nfilter, > - enum rte_filter_op filter_op) > -{ > - struct bnxt_filter_info *bfilter, *mfilter, *filter1; > - struct bnxt_vnic_info *vnic, *vnic0, *mvnic; > - int ret; > - > - if (nfilter->flags != RTE_5TUPLE_FLAGS) { > - PMD_DRV_LOG(ERR, "only 5tuple is supported."); > - return -EINVAL; > - } > - > - if (nfilter->flags & RTE_NTUPLE_FLAGS_TCP_FLAG) { > - PMD_DRV_LOG(ERR, "Ntuple filter: TCP flags not supported\n"); > - return -EINVAL; > - } > - > - bfilter = bnxt_get_unused_filter(bp); > - if (bfilter == NULL) { > - PMD_DRV_LOG(ERR, > - "Not enough resources for a new filter.\n"); > - return -ENOMEM; > - } > - ret = parse_ntuple_filter(bp, nfilter, bfilter); > - if (ret < 0) > - goto free_filter; > - > - vnic = &bp->vnic_info[nfilter->queue]; > - vnic0 = BNXT_GET_DEFAULT_VNIC(bp); > - filter1 = STAILQ_FIRST(&vnic0->filter); > - if (filter1 == NULL) { > - ret = -EINVAL; > - goto free_filter; > - } > - > - bfilter->dst_id = vnic->fw_vnic_id; > - bfilter->fw_l2_filter_id = filter1->fw_l2_filter_id; > - bfilter->enables |= > - HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_L2_FILTER_ID; > - bfilter->ethertype = 0x800; > - bfilter->enables |= NTUPLE_FLTR_ALLOC_INPUT_EN_ETHERTYPE; > - > - mfilter = bnxt_match_ntuple_filter(bp, bfilter, &mvnic); > - > - if (mfilter != NULL && filter_op == RTE_ETH_FILTER_ADD && > - bfilter->dst_id == mfilter->dst_id) { > - PMD_DRV_LOG(ERR, "filter exists.\n"); > - ret = -EEXIST; > - goto free_filter; > - } else if (mfilter != NULL && filter_op == RTE_ETH_FILTER_ADD && > - bfilter->dst_id != mfilter->dst_id) { > - mfilter->dst_id = vnic->fw_vnic_id; > - ret = bnxt_hwrm_set_ntuple_filter(bp, mfilter->dst_id, mfilter); > - STAILQ_REMOVE(&mvnic->filter, mfilter, bnxt_filter_info, next); > - STAILQ_INSERT_TAIL(&vnic->filter, mfilter, next); > - PMD_DRV_LOG(ERR, "filter with matching pattern exists.\n"); > - PMD_DRV_LOG(ERR, " Updated it to the new destination queue\n"); > - goto free_filter; > - } > - if (mfilter == NULL && filter_op == RTE_ETH_FILTER_DELETE) { > - PMD_DRV_LOG(ERR, "filter doesn't exist."); > - ret = -ENOENT; > - goto free_filter; > - } > - > - if (filter_op == RTE_ETH_FILTER_ADD) { > - bfilter->filter_type = HWRM_CFA_NTUPLE_FILTER; > - ret = bnxt_hwrm_set_ntuple_filter(bp, bfilter->dst_id, bfilter); > - if (ret) > - goto free_filter; > - STAILQ_INSERT_TAIL(&vnic->filter, bfilter, next); > - } else { > - if (mfilter == NULL) { > - /* This should not happen. But for Coverity! */ > - ret = -ENOENT; > - goto free_filter; > - } > - ret = bnxt_hwrm_clear_ntuple_filter(bp, mfilter); > - > - STAILQ_REMOVE(&vnic->filter, mfilter, bnxt_filter_info, next); > - bnxt_free_filter(bp, mfilter); > - bnxt_free_filter(bp, bfilter); > - } > - > - return 0; > -free_filter: > - bnxt_free_filter(bp, bfilter); > - return ret; > -} > - > -static int > -bnxt_ntuple_filter(struct rte_eth_dev *dev, > - enum rte_filter_op filter_op, > - void *arg) > -{ > - struct bnxt *bp = dev->data->dev_private; > - int ret; > - > - if (filter_op == RTE_ETH_FILTER_NOP) > - return 0; > - > - if (arg == NULL) { > - PMD_DRV_LOG(ERR, "arg shouldn't be NULL for operation %u.", > - filter_op); > - return -EINVAL; > - } > - > - switch (filter_op) { > - case RTE_ETH_FILTER_ADD: > - ret = bnxt_cfg_ntuple_filter(bp, > - (struct rte_eth_ntuple_filter *)arg, > - filter_op); > - break; > - case RTE_ETH_FILTER_DELETE: > - ret = bnxt_cfg_ntuple_filter(bp, > - (struct rte_eth_ntuple_filter *)arg, > - filter_op); > - break; > - default: > - PMD_DRV_LOG(ERR, "unsupported operation %u.", filter_op); > - ret = -EINVAL; > - break; > - } > - return ret; > -} > - > static int > bnxt_parse_fdir_filter(struct bnxt *bp, > struct rte_eth_fdir_filter *fdir, > @@ -3658,9 +3416,6 @@ bnxt_filter_ctrl_op(struct rte_eth_dev *dev, > case RTE_ETH_FILTER_FDIR: > ret = bnxt_fdir_filter(dev, filter_op, arg); > break; > - case RTE_ETH_FILTER_NTUPLE: > - ret = bnxt_ntuple_filter(dev, filter_op, arg); > - break; > case RTE_ETH_FILTER_GENERIC: > if (filter_op != RTE_ETH_FILTER_GET) > return -EINVAL; > diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c > index 7e2c77d356..647aa8d995 100644 > --- a/drivers/net/e1000/igb_ethdev.c > +++ b/drivers/net/e1000/igb_ethdev.c > @@ -194,11 +194,6 @@ static int igb_add_5tuple_filter_82576(struct rte_eth_dev *dev, > struct rte_eth_ntuple_filter *ntuple_filter); > static int igb_remove_5tuple_filter_82576(struct rte_eth_dev *dev, > struct rte_eth_ntuple_filter *ntuple_filter); > -static int igb_get_ntuple_filter(struct rte_eth_dev *dev, > - struct rte_eth_ntuple_filter *filter); > -static int igb_ntuple_filter_handle(struct rte_eth_dev *dev, > - enum rte_filter_op filter_op, > - void *arg); > static int eth_igb_filter_ctrl(struct rte_eth_dev *dev, > enum rte_filter_type filter_type, > enum rte_filter_op filter_op, > @@ -4445,126 +4440,6 @@ igb_add_del_ntuple_filter(struct rte_eth_dev *dev, > return ret; > } > > -/* > - * igb_get_ntuple_filter - get a ntuple filter > - * > - * @param > - * dev: Pointer to struct rte_eth_dev. > - * ntuple_filter: Pointer to struct rte_eth_ntuple_filter > - * > - * @return > - * - On success, zero. > - * - On failure, a negative value. > - */ > -static int > -igb_get_ntuple_filter(struct rte_eth_dev *dev, > - struct rte_eth_ntuple_filter *ntuple_filter) > -{ > - struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private); > - struct e1000_filter_info *filter_info = > - E1000_DEV_PRIVATE_TO_FILTER_INFO(dev->data->dev_private); > - struct e1000_5tuple_filter_info filter_5tuple; > - struct e1000_2tuple_filter_info filter_2tuple; > - struct e1000_5tuple_filter *p_5tuple_filter; > - struct e1000_2tuple_filter *p_2tuple_filter; > - int ret; > - > - switch (ntuple_filter->flags) { > - case RTE_5TUPLE_FLAGS: > - case (RTE_5TUPLE_FLAGS | RTE_NTUPLE_FLAGS_TCP_FLAG): > - if (hw->mac.type != e1000_82576) > - return -ENOTSUP; > - memset(&filter_5tuple, > - 0, > - sizeof(struct e1000_5tuple_filter_info)); > - ret = ntuple_filter_to_5tuple_82576(ntuple_filter, > - &filter_5tuple); > - if (ret < 0) > - return ret; > - p_5tuple_filter = igb_5tuple_filter_lookup_82576( > - &filter_info->fivetuple_list, > - &filter_5tuple); > - if (p_5tuple_filter == NULL) { > - PMD_DRV_LOG(ERR, "filter doesn't exist."); > - return -ENOENT; > - } > - ntuple_filter->queue = p_5tuple_filter->queue; > - break; > - case RTE_2TUPLE_FLAGS: > - case (RTE_2TUPLE_FLAGS | RTE_NTUPLE_FLAGS_TCP_FLAG): > - if (hw->mac.type != e1000_82580 && hw->mac.type != e1000_i350) > - return -ENOTSUP; > - memset(&filter_2tuple, > - 0, > - sizeof(struct e1000_2tuple_filter_info)); > - ret = ntuple_filter_to_2tuple(ntuple_filter, &filter_2tuple); > - if (ret < 0) > - return ret; > - p_2tuple_filter = igb_2tuple_filter_lookup( > - &filter_info->twotuple_list, > - &filter_2tuple); > - if (p_2tuple_filter == NULL) { > - PMD_DRV_LOG(ERR, "filter doesn't exist."); > - return -ENOENT; > - } > - ntuple_filter->queue = p_2tuple_filter->queue; > - break; > - default: > - ret = -EINVAL; > - break; > - } > - > - return 0; > -} > - > -/* > - * igb_ntuple_filter_handle - Handle operations for ntuple filter. > - * @dev: pointer to rte_eth_dev structure > - * @filter_op:operation will be taken. > - * @arg: a pointer to specific structure corresponding to the filter_op > - */ > -static int > -igb_ntuple_filter_handle(struct rte_eth_dev *dev, > - enum rte_filter_op filter_op, > - void *arg) > -{ > - struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private); > - int ret; > - > - MAC_TYPE_FILTER_SUP(hw->mac.type); > - > - if (filter_op == RTE_ETH_FILTER_NOP) > - return 0; > - > - if (arg == NULL) { > - PMD_DRV_LOG(ERR, "arg shouldn't be NULL for operation %u.", > - filter_op); > - return -EINVAL; > - } > - > - switch (filter_op) { > - case RTE_ETH_FILTER_ADD: > - ret = igb_add_del_ntuple_filter(dev, > - (struct rte_eth_ntuple_filter *)arg, > - TRUE); > - break; > - case RTE_ETH_FILTER_DELETE: > - ret = igb_add_del_ntuple_filter(dev, > - (struct rte_eth_ntuple_filter *)arg, > - FALSE); > - break; > - case RTE_ETH_FILTER_GET: > - ret = igb_get_ntuple_filter(dev, > - (struct rte_eth_ntuple_filter *)arg); > - break; > - default: > - PMD_DRV_LOG(ERR, "unsupported operation %u.", filter_op); > - ret = -EINVAL; > - break; > - } > - return ret; > -} > - > static inline int > igb_ethertype_filter_lookup(struct e1000_filter_info *filter_info, > uint16_t ethertype) > @@ -4670,7 +4545,7 @@ igb_add_del_ethertype_filter(struct rte_eth_dev *dev, > } > > static int > -eth_igb_filter_ctrl(struct rte_eth_dev *dev, > +eth_igb_filter_ctrl(struct rte_eth_dev *dev __rte_unused, > enum rte_filter_type filter_type, > enum rte_filter_op filter_op, > void *arg) > @@ -4678,9 +4553,6 @@ eth_igb_filter_ctrl(struct rte_eth_dev *dev, > int ret = 0; > > switch (filter_type) { > - case RTE_ETH_FILTER_NTUPLE: > - ret = igb_ntuple_filter_handle(dev, filter_op, arg); > - break; > case RTE_ETH_FILTER_GENERIC: > if (filter_op != RTE_ETH_FILTER_GET) > return -EINVAL; > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c > index f75725b433..8c02c0c859 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -304,11 +304,6 @@ static int ixgbe_add_5tuple_filter(struct rte_eth_dev *dev, > struct ixgbe_5tuple_filter *filter); > static void ixgbe_remove_5tuple_filter(struct rte_eth_dev *dev, > struct ixgbe_5tuple_filter *filter); > -static int ixgbe_ntuple_filter_handle(struct rte_eth_dev *dev, > - enum rte_filter_op filter_op, > - void *arg); > -static int ixgbe_get_ntuple_filter(struct rte_eth_dev *dev, > - struct rte_eth_ntuple_filter *filter); > static int ixgbe_dev_filter_ctrl(struct rte_eth_dev *dev, > enum rte_filter_type filter_type, > enum rte_filter_op filter_op, > @@ -6732,99 +6727,6 @@ ixgbe_add_del_ntuple_filter(struct rte_eth_dev *dev, > return 0; > } > > -/* > - * get a ntuple filter > - * > - * @param > - * dev: Pointer to struct rte_eth_dev. > - * ntuple_filter: Pointer to struct rte_eth_ntuple_filter > - * > - * @return > - * - On success, zero. > - * - On failure, a negative value. > - */ > -static int > -ixgbe_get_ntuple_filter(struct rte_eth_dev *dev, > - struct rte_eth_ntuple_filter *ntuple_filter) > -{ > - struct ixgbe_filter_info *filter_info = > - IXGBE_DEV_PRIVATE_TO_FILTER_INFO(dev->data->dev_private); > - struct ixgbe_5tuple_filter_info filter_5tuple; > - struct ixgbe_5tuple_filter *filter; > - int ret; > - > - if (ntuple_filter->flags != RTE_5TUPLE_FLAGS) { > - PMD_DRV_LOG(ERR, "only 5tuple is supported."); > - return -EINVAL; > - } > - > - memset(&filter_5tuple, 0, sizeof(struct ixgbe_5tuple_filter_info)); > - ret = ntuple_filter_to_5tuple(ntuple_filter, &filter_5tuple); > - if (ret < 0) > - return ret; > - > - filter = ixgbe_5tuple_filter_lookup(&filter_info->fivetuple_list, > - &filter_5tuple); > - if (filter == NULL) { > - PMD_DRV_LOG(ERR, "filter doesn't exist."); > - return -ENOENT; > - } > - ntuple_filter->queue = filter->queue; > - return 0; > -} > - > -/* > - * ixgbe_ntuple_filter_handle - Handle operations for ntuple filter. > - * @dev: pointer to rte_eth_dev structure > - * @filter_op:operation will be taken. > - * @arg: a pointer to specific structure corresponding to the filter_op > - * > - * @return > - * - On success, zero. > - * - On failure, a negative value. > - */ > -static int > -ixgbe_ntuple_filter_handle(struct rte_eth_dev *dev, > - enum rte_filter_op filter_op, > - void *arg) > -{ > - struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > - int ret; > - > - MAC_TYPE_FILTER_SUP_EXT(hw->mac.type); > - > - if (filter_op == RTE_ETH_FILTER_NOP) > - return 0; > - > - if (arg == NULL) { > - PMD_DRV_LOG(ERR, "arg shouldn't be NULL for operation %u.", > - filter_op); > - return -EINVAL; > - } > - > - switch (filter_op) { > - case RTE_ETH_FILTER_ADD: > - ret = ixgbe_add_del_ntuple_filter(dev, > - (struct rte_eth_ntuple_filter *)arg, > - TRUE); > - break; > - case RTE_ETH_FILTER_DELETE: > - ret = ixgbe_add_del_ntuple_filter(dev, > - (struct rte_eth_ntuple_filter *)arg, > - FALSE); > - break; > - case RTE_ETH_FILTER_GET: > - ret = ixgbe_get_ntuple_filter(dev, > - (struct rte_eth_ntuple_filter *)arg); > - break; > - default: > - PMD_DRV_LOG(ERR, "unsupported operation %u.", filter_op); > - ret = -EINVAL; > - break; > - } > - return ret; > -} > - > int > ixgbe_add_del_ethertype_filter(struct rte_eth_dev *dev, > struct rte_eth_ethertype_filter *filter, > @@ -6908,9 +6810,6 @@ ixgbe_dev_filter_ctrl(struct rte_eth_dev *dev, > int ret = 0; > > switch (filter_type) { > - case RTE_ETH_FILTER_NTUPLE: > - ret = ixgbe_ntuple_filter_handle(dev, filter_op, arg); > - break; > case RTE_ETH_FILTER_FDIR: > ret = ixgbe_fdir_ctrl_func(dev, filter_op, arg); > break; > diff --git a/drivers/net/qede/qede_filter.c b/drivers/net/qede/qede_filter.c > index f3da5ecd92..0c47407edd 100644 > --- a/drivers/net/qede/qede_filter.c > +++ b/drivers/net/qede/qede_filter.c > @@ -590,67 +590,6 @@ qede_fdir_filter_conf(struct rte_eth_dev *eth_dev, > return ret; > } > > -int qede_ntuple_filter_conf(struct rte_eth_dev *eth_dev, > - enum rte_filter_op filter_op, > - void *arg) > -{ > - struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev); > - struct ecore_dev *edev = QEDE_INIT_EDEV(qdev); > - struct rte_eth_ntuple_filter *ntuple; > - struct rte_eth_fdir_filter fdir_entry; > - struct rte_eth_tcpv4_flow *tcpv4_flow; > - struct rte_eth_udpv4_flow *udpv4_flow; > - bool add = false; > - > - switch (filter_op) { > - case RTE_ETH_FILTER_NOP: > - /* Typically used to query fdir support */ > - if (ECORE_IS_CMT(edev)) { > - DP_ERR(edev, "flowdir is not supported in 100G mode\n"); > - return -ENOTSUP; > - } > - return 0; /* means supported */ > - case RTE_ETH_FILTER_ADD: > - add = true; > - break; > - case RTE_ETH_FILTER_DELETE: > - break; > - case RTE_ETH_FILTER_INFO: > - case RTE_ETH_FILTER_GET: > - case RTE_ETH_FILTER_UPDATE: > - case RTE_ETH_FILTER_FLUSH: > - case RTE_ETH_FILTER_SET: > - case RTE_ETH_FILTER_STATS: > - case RTE_ETH_FILTER_OP_MAX: > - DP_ERR(edev, "Unsupported filter_op %d\n", filter_op); > - return -ENOTSUP; > - } > - ntuple = (struct rte_eth_ntuple_filter *)arg; > - /* Internally convert ntuple to fdir entry */ > - memset(&fdir_entry, 0, sizeof(fdir_entry)); > - if (ntuple->proto == IPPROTO_TCP) { > - fdir_entry.input.flow_type = RTE_ETH_FLOW_NONFRAG_IPV4_TCP; > - tcpv4_flow = &fdir_entry.input.flow.tcp4_flow; > - tcpv4_flow->ip.src_ip = ntuple->src_ip; > - tcpv4_flow->ip.dst_ip = ntuple->dst_ip; > - tcpv4_flow->ip.proto = IPPROTO_TCP; > - tcpv4_flow->src_port = ntuple->src_port; > - tcpv4_flow->dst_port = ntuple->dst_port; > - } else { > - fdir_entry.input.flow_type = RTE_ETH_FLOW_NONFRAG_IPV4_UDP; > - udpv4_flow = &fdir_entry.input.flow.udp4_flow; > - udpv4_flow->ip.src_ip = ntuple->src_ip; > - udpv4_flow->ip.dst_ip = ntuple->dst_ip; > - udpv4_flow->ip.proto = IPPROTO_TCP; > - udpv4_flow->src_port = ntuple->src_port; > - udpv4_flow->dst_port = ntuple->dst_port; > - } > - > - fdir_entry.action.rx_queue = ntuple->queue; > - > - return qede_config_cmn_fdir_filter(eth_dev, &fdir_entry, add); > -} > - > static int > qede_tunnel_update(struct qede_dev *qdev, > struct ecore_tunnel_info *tunn_info) > @@ -1548,8 +1487,6 @@ int qede_dev_filter_ctrl(struct rte_eth_dev *eth_dev, > break; > case RTE_ETH_FILTER_FDIR: > return qede_fdir_filter_conf(eth_dev, filter_op, arg); > - case RTE_ETH_FILTER_NTUPLE: > - return qede_ntuple_filter_conf(eth_dev, filter_op, arg); > case RTE_ETH_FILTER_GENERIC: > if (ECORE_IS_CMT(edev)) { > DP_ERR(edev, "flowdir is not supported in 100G mode\n"); > diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c > index 13f4355cf1..4291a932e8 100644 > --- a/drivers/net/sfc/sfc_ethdev.c > +++ b/drivers/net/sfc/sfc_ethdev.c > @@ -1748,9 +1748,6 @@ sfc_dev_filter_ctrl(struct rte_eth_dev *dev, enum rte_filter_type filter_type, > case RTE_ETH_FILTER_NONE: > sfc_err(sa, "Global filters configuration not supported"); > break; > - case RTE_ETH_FILTER_NTUPLE: > - sfc_err(sa, "NTUPLE filters not supported"); > - break; > case RTE_ETH_FILTER_TUNNEL: > sfc_err(sa, "Tunnel filters not supported"); > break; > diff --git a/lib/librte_ethdev/rte_eth_ctrl.h b/lib/librte_ethdev/rte_eth_ctrl.h > index 48515818dd..b4cc163e3e 100644 > --- a/lib/librte_ethdev/rte_eth_ctrl.h > +++ b/lib/librte_ethdev/rte_eth_ctrl.h > @@ -82,8 +82,7 @@ enum rte_filter_op { > > /** > * A structure used to define the ntuple filter entry > - * to support RTE_ETH_FILTER_NTUPLE with RTE_ETH_FILTER_ADD, > - * RTE_ETH_FILTER_DELETE and RTE_ETH_FILTER_GET operations. > + * to support RTE_ETH_FILTER_NTUPLE data representation. > */ > struct rte_eth_ntuple_filter { > uint16_t flags; /**< Flags from RTE_NTUPLE_FLAGS_* */ > -- > 2.17.1 > >