From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 79BC84303E for ; Sat, 12 Aug 2023 09:50:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5106740151; Sat, 12 Aug 2023 09:50:26 +0200 (CEST) Received: from mail-io1-f97.google.com (mail-io1-f97.google.com [209.85.166.97]) by mails.dpdk.org (Postfix) with ESMTP id 06D9C40151 for ; Sat, 12 Aug 2023 09:50:24 +0200 (CEST) Received: by mail-io1-f97.google.com with SMTP id ca18e2360f4ac-790f0276911so100984139f.2 for ; Sat, 12 Aug 2023 00:50:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1691826624; x=1692431424; h=cc:to:from:subject:message-id:date:from:to:cc:subject:date :message-id:reply-to; bh=Iv/+JYEkLcpFA1Z1V+2Goxo1zjDhe7Bp6MWv18/SBrU=; b=ZvcvtFMU12nAhy7cyNgUkS3EAGrn9yUot6NzKfS78ajxyOckkYQjmAZpz6b0urFhlG wlTJVFA9jRPddQRdHqpXZZkDWO/vmF5vM9LjZ360nL3MznY0H6TL1lEWtwurSE6qBCpC xkDhbS9se3j1qBriHJ/reYYGJmLOf0EfiT2N4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691826624; x=1692431424; h=cc:to:from:subject:message-id:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Iv/+JYEkLcpFA1Z1V+2Goxo1zjDhe7Bp6MWv18/SBrU=; b=fhLslu91Ae3zw6LoKUz6+2pjmJQPNuFgHXLaaeytWVx+2qidzinG6hRjq8K7MxTQhM gOUihlMkT8o4A3hjIr82rYcrXVwYZDvod9Vlo4+NuAz14rxd3Jy0tgLZa5XzTzciM1u8 MGaq4d+qSr9bAAUepZ5yEEKR7IE22f01QTNRRaHSKy9B8WSz1qL4VkszF2IJKIzWt93e R+Shw9UN4zSApxCFQxueHdRuYeSeZAE/E61VvD5x1FckrDJdKI3jCd9eLBQtF6ym5vJG DtNfQJ0lzoI+UXlGhNsI0tyT/qizUkY8cMuWKrLekNkJB6x0p7m1KaRIfznHIxYXYjaE 1wog== X-Gm-Message-State: AOJu0YxYTFvlroo9IyP/xzs+PSpboi1MQCadiuifdj7dpibMAaYHP7Bm dnXq/U1IbQuIx0C1F54t2sOwujXykAI6hr7IBsEblJNT4uj9DtAnokVhljLbXRcXdLPD5qYQ6Q= = X-Google-Smtp-Source: AGHT+IHSCHILPbufzuo5VsjPJ3FdFazhez9Tv1yvk6ERxci6zFLHLNI3xNC8FS/nKXHLn+lwR0LoBDFyq8b9 X-Received: by 2002:a05:6e02:1351:b0:33a:a6de:65be with SMTP id k17-20020a056e02135100b0033aa6de65bemr4960854ilr.21.1691826624400; Sat, 12 Aug 2023 00:50:24 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [2606:4100:3880:1234::84]) by smtp-relay.gmail.com with ESMTPS id c17-20020a92dc91000000b003493746ba09sm181740iln.8.2023.08.12.00.50.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Aug 2023 00:50:24 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Date: Sat, 12 Aug 2023 00:50:24 -0700 (PDT) Message-ID: <64d739c0.920a0220.7a6da.90f1SMTPIN_ADDED_MISSING@mx.google.com> Received: from [172.21.0.2] (unknown [172.18.0.240]) by postal.iol.unh.edu (Postfix) with ESMTP id D6F336052471; Sat, 12 Aug 2023 03:50:23 -0400 (EDT) Subject: |WARNING| pw130251-130255 [PATCH] [v1, 5/5] net/cpfl: add fxp flow engine From: dpdklab@iol.unh.edu To: test-report@dpdk.org Cc: dpdk-test-reports@iol.unh.edu Content-Type: text/plain X-BeenThere: test-report@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: automatic DPDK test reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: test-report-bounces@dpdk.org Test-Label: iol-testing Test-Status: WARNING http://dpdk.org/patch/130251 _apply patch failure_ Submitter: Yuying Zhang Date: Saturday, August 12 2023 07:55:06 Applied on: CommitID:70b6941e4e22d67bc10495d1638234a7e974f582 Apply patch set 130251-130255 failed: Checking patch drivers/net/cpfl/cpfl_ethdev.c... error: while searching for: #include "cpfl_ethdev.h" #include #include "cpfl_rxtx.h" #define CPFL_REPRESENTOR "representor" #define CPFL_TX_SINGLE_Q "tx_single" error: patch failed: drivers/net/cpfl/cpfl_ethdev.c:16 Hunk #2 succeeded at 1058 (offset -142 lines). error: while searching for: cpfl_p2p_queue_grps_del(vport); if (!cpfl_vport->exceptional) { adapter->cur_vports &= ~RTE_BIT32(vport->devarg_id); adapter->cur_vport_nb--; adapter->vports[vport->sw_idx] = NULL; error: patch failed: drivers/net/cpfl/cpfl_ethdev.c:1231 Hunk #4 succeeded at 1114 (offset -149 lines). Hunk #5 succeeded at 1338 (offset -149 lines). error: while searching for: goto err_create_ctrl_vport; } adapter->cur_vports = 0; adapter->cur_vport_nb = 0; error: patch failed: drivers/net/cpfl/cpfl_ethdev.c:2411 error: while searching for: return ret; err_create_ctrl_vport: rte_free(adapter->vports); err_vports_alloc: error: patch failed: drivers/net/cpfl/cpfl_ethdev.c:2418 error: while searching for: cpfl_vport->itf.type = CPFL_ITF_TYPE_VPORT; cpfl_vport->itf.adapter = adapter; cpfl_vport->itf.data = dev->data; adapter->vports[param->idx] = cpfl_vport; adapter->cur_vports |= RTE_BIT32(param->devarg_id); adapter->cur_vport_nb++; error: patch failed: drivers/net/cpfl/cpfl_ethdev.c:2574 error: while searching for: static void cpfl_adapter_ext_deinit(struct cpfl_adapter_ext *adapter) { cpfl_ctrl_path_close(adapter); rte_eal_alarm_cancel(cpfl_dev_alarm_handler, adapter); cpfl_vport_map_uninit(adapter); error: patch failed: drivers/net/cpfl/cpfl_ethdev.c:2713 Checking patch drivers/net/cpfl/cpfl_ethdev.h... error: while searching for: CPFL_ITF_TYPE_REPRESENTOR }; struct cpfl_itf { enum cpfl_itf_type type; struct cpfl_adapter_ext *adapter; void *data; }; error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:143 error: while searching for: rte_spinlock_t repr_lock; struct rte_hash *repr_whitelist_hash; /* ctrl vport and ctrl queues. */ struct cpfl_vport ctrl_vport; uint8_t ctrl_vport_recv_info[IDPF_DFLT_MBX_BUF_SIZE]; error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:222 Checking patch drivers/net/cpfl/cpfl_flow.c... Checking patch drivers/net/cpfl/cpfl_flow.h... Checking patch drivers/net/cpfl/meson.build... error: while searching for: js_dep = dependency('json-c', required: false, method : 'pkg-config') if js_dep.found() sources += files( 'cpfl_flow_parser.c', 'cpfl_rules.c', 'cpfl_controlq.c', ) dpdk_conf.set('CPFL_FLOW_JSON_SUPPORT', true) ext_deps += js_dep endif error: patch failed: drivers/net/cpfl/meson.build:42 Applying patch drivers/net/cpfl/cpfl_ethdev.c with 6 rejects... Rejected hunk #1. Hunk #2 applied cleanly. Rejected hunk #3. Hunk #4 applied cleanly. Hunk #5 applied cleanly. Rejected hunk #6. Rejected hunk #7. Rejected hunk #8. Rejected hunk #9. Applying patch drivers/net/cpfl/cpfl_ethdev.h with 2 rejects... Rejected hunk #1. Rejected hunk #2. Applied patch drivers/net/cpfl/cpfl_flow.c cleanly. Applied patch drivers/net/cpfl/cpfl_flow.h cleanly. Applying patch drivers/net/cpfl/meson.build with 1 reject... Rejected hunk #1. hint: Use 'git am --show-current-patch' to see the failed patch diff a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c (rejected hunks) @@ -16,6 +16,7 @@ #include "cpfl_ethdev.h" #include #include "cpfl_rxtx.h" +#include "cpfl_flow.h" #define CPFL_REPRESENTOR "representor" #define CPFL_TX_SINGLE_Q "tx_single" @@ -1231,6 +1245,7 @@ cpfl_dev_close(struct rte_eth_dev *dev) cpfl_p2p_queue_grps_del(vport); if (!cpfl_vport->exceptional) { + cpfl_flow_free(cpfl_vport); adapter->cur_vports &= ~RTE_BIT32(vport->devarg_id); adapter->cur_vport_nb--; adapter->vports[vport->sw_idx] = NULL; @@ -2411,6 +2450,13 @@ cpfl_adapter_ext_init(struct rte_pci_device *pci_dev, struct cpfl_adapter_ext *a goto err_create_ctrl_vport; } +#ifdef CPFL_FLOW_JSON_SUPPORT + ret = cpfl_flow_init(adapter); + if (ret) { + PMD_INIT_LOG(ERR, "Failed to init flow module"); + goto err_flow_init; + } +#endif adapter->cur_vports = 0; adapter->cur_vport_nb = 0; @@ -2418,6 +2464,10 @@ cpfl_adapter_ext_init(struct rte_pci_device *pci_dev, struct cpfl_adapter_ext *a return ret; +#ifdef CPFL_FLOW_JSON_SUPPORT +err_flow_init: + cpfl_ctrl_path_close(adapter); +#endif err_create_ctrl_vport: rte_free(adapter->vports); err_vports_alloc: @@ -2574,6 +2624,7 @@ cpfl_dev_vport_init(struct rte_eth_dev *dev, void *init_params) cpfl_vport->itf.type = CPFL_ITF_TYPE_VPORT; cpfl_vport->itf.adapter = adapter; cpfl_vport->itf.data = dev->data; + TAILQ_INIT(&cpfl_vport->itf.flow_list); adapter->vports[param->idx] = cpfl_vport; adapter->cur_vports |= RTE_BIT32(param->devarg_id); adapter->cur_vport_nb++; @@ -2713,6 +2764,9 @@ cpfl_find_adapter_ext(struct rte_pci_device *pci_dev) static void cpfl_adapter_ext_deinit(struct cpfl_adapter_ext *adapter) { +#ifdef CPFL_FLOW_JSON_SUPPORT + cpfl_flow_uninit(adapter); +#endif cpfl_ctrl_path_close(adapter); rte_eal_alarm_cancel(cpfl_dev_alarm_handler, adapter); cpfl_vport_map_uninit(adapter); diff a/drivers/net/cpfl/cpfl_ethdev.h b/drivers/net/cpfl/cpfl_ethdev.h (rejected hunks) @@ -143,9 +143,12 @@ enum cpfl_itf_type { CPFL_ITF_TYPE_REPRESENTOR }; +TAILQ_HEAD(cpfl_flow_list, rte_flow); + struct cpfl_itf { enum cpfl_itf_type type; struct cpfl_adapter_ext *adapter; + struct cpfl_flow_list flow_list; void *data; }; @@ -222,6 +225,8 @@ struct cpfl_adapter_ext { rte_spinlock_t repr_lock; struct rte_hash *repr_whitelist_hash; + struct cpfl_flow_js_parser *flow_parser; + /* ctrl vport and ctrl queues. */ struct cpfl_vport ctrl_vport; uint8_t ctrl_vport_recv_info[IDPF_DFLT_MBX_BUF_SIZE]; diff a/drivers/net/cpfl/meson.build b/drivers/net/cpfl/meson.build (rejected hunks) @@ -42,10 +42,11 @@ endif js_dep = dependency('json-c', required: false, method : 'pkg-config') if js_dep.found() sources += files( + 'cpfl_flow.c', 'cpfl_flow_parser.c', 'cpfl_rules.c', 'cpfl_controlq.c', ) dpdk_conf.set('CPFL_FLOW_JSON_SUPPORT', true) ext_deps += js_dep -endif \ No newline at end of file +endif Checking patch drivers/net/cpfl/cpfl_controlq.c... error: drivers/net/cpfl/cpfl_controlq.c: does not exist in index Checking patch drivers/net/cpfl/cpfl_controlq.h... error: drivers/net/cpfl/cpfl_controlq.h: does not exist in index hint: Use 'git am --show-current-patch' to see the failed patch Checking patch drivers/net/cpfl/cpfl_ethdev.h... error: while searching for: TAILQ_HEAD(cpfl_flow_list, rte_flow); struct cpfl_itf { enum cpfl_itf_type type; struct cpfl_adapter_ext *adapter; struct cpfl_flow_list flow_list; void *data; }; error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:145 Checking patch drivers/net/cpfl/cpfl_fxp_rule.c... Checking patch drivers/net/cpfl/cpfl_fxp_rule.h... Checking patch drivers/net/cpfl/meson.build... error: while searching for: 'cpfl_flow_parser.c', 'cpfl_rules.c', 'cpfl_controlq.c', ) dpdk_conf.set('CPFL_FLOW_JSON_SUPPORT', true) ext_deps += js_dep error: patch failed: drivers/net/cpfl/meson.build:46 Applying patch drivers/net/cpfl/cpfl_ethdev.h with 1 reject... Rejected hunk #1. Applied patch drivers/net/cpfl/cpfl_fxp_rule.c cleanly. Applied patch drivers/net/cpfl/cpfl_fxp_rule.h cleanly. Applying patch drivers/net/cpfl/meson.build with 1 reject... Rejected hunk #1. hint: Use 'git am --show-current-patch' to see the failed patch diff a/drivers/net/cpfl/cpfl_ethdev.h b/drivers/net/cpfl/cpfl_ethdev.h (rejected hunks) @@ -145,10 +145,14 @@ enum cpfl_itf_type { TAILQ_HEAD(cpfl_flow_list, rte_flow); +#define CPFL_FLOW_BATCH_SIZE 490 struct cpfl_itf { enum cpfl_itf_type type; struct cpfl_adapter_ext *adapter; struct cpfl_flow_list flow_list; + struct idpf_dma_mem flow_dma; + struct idpf_dma_mem dma[CPFL_FLOW_BATCH_SIZE]; + struct idpf_ctlq_msg msg[CPFL_FLOW_BATCH_SIZE]; void *data; }; diff a/drivers/net/cpfl/meson.build b/drivers/net/cpfl/meson.build (rejected hunks) @@ -46,6 +46,7 @@ if js_dep.found() 'cpfl_flow_parser.c', 'cpfl_rules.c', 'cpfl_controlq.c', + 'cpfl_fxp_rule.c', ) dpdk_conf.set('CPFL_FLOW_JSON_SUPPORT', true) ext_deps += js_dep Checking patch drivers/net/cpfl/cpfl_ethdev.h... error: while searching for: #define CPFL_RX_CFGQ_NUM 4 #define CPFL_TX_CFGQ_NUM 4 #define CPFL_CFGQ_NUM 8 struct cpfl_vport_param { error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:92 error: while searching for: struct rte_hash *repr_whitelist_hash; struct cpfl_flow_js_parser *flow_parser; /* ctrl vport and ctrl queues. */ struct cpfl_vport ctrl_vport; error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:230 error: while searching for: ((struct cpfl_repr *)((dev)->data->dev_private)) #define CPFL_DEV_TO_ITF(dev) \ ((struct cpfl_itf *)((dev)->data->dev_private)) #endif /* _CPFL_ETHDEV_H_ */ error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:265 Checking patch drivers/net/cpfl/cpfl_flow_engine_fxp.c... Checking patch drivers/net/cpfl/meson.build... error: while searching for: if js_dep.found() sources += files( 'cpfl_flow.c', 'cpfl_flow_parser.c', 'cpfl_rules.c', 'cpfl_controlq.c', error: patch failed: drivers/net/cpfl/meson.build:43 Applying patch drivers/net/cpfl/cpfl_ethdev.h with 3 rejects... Rejected hunk #1. Rejected hunk #2. Rejected hunk #3. Applied patch drivers/net/cpfl/cpfl_flow_engine_fxp.c cleanly. Applying patch drivers/net/cpfl/meson.build with 1 reject... Rejected hunk #1. hint: Use 'git am --show-current-patch' to see the failed patch diff a/drivers/net/cpfl/cpfl_ethdev.h b/drivers/net/cpfl/cpfl_ethdev.h (rejected hunks) @@ -92,6 +92,8 @@ #define CPFL_RX_CFGQ_NUM 4 #define CPFL_TX_CFGQ_NUM 4 +#define CPFL_FPCP_CFGQ_TX 0 +#define CPFL_FPCP_CFGQ_RX 1 #define CPFL_CFGQ_NUM 8 struct cpfl_vport_param { @@ -230,6 +232,8 @@ struct cpfl_adapter_ext { struct rte_hash *repr_whitelist_hash; struct cpfl_flow_js_parser *flow_parser; + struct rte_bitmap *mod_bm; + void *mod_bm_mem; /* ctrl vport and ctrl queues. */ struct cpfl_vport ctrl_vport; @@ -265,5 +269,86 @@ int cpfl_packets_dispatch(void *arg); ((struct cpfl_repr *)((dev)->data->dev_private)) #define CPFL_DEV_TO_ITF(dev) \ ((struct cpfl_itf *)((dev)->data->dev_private)) +#define CPFL_INVALID_HW_ID UINT16_MAX + +static inline uint16_t +cpfl_get_port_id(struct cpfl_itf *itf) +{ + if (!itf) + return CPFL_INVALID_HW_ID; + + if (itf->type == CPFL_ITF_TYPE_VPORT) { + struct cpfl_vport *vport = (void *)itf; + + return vport->base.devarg_id; + } + + return CPFL_INVALID_HW_ID; +} + +static inline uint16_t +cpfl_get_vsi_id(struct cpfl_itf *itf) +{ + struct cpfl_adapter_ext *adapter = itf->adapter; + struct cpfl_vport_info *info; + uint32_t vport_id; + int ret; + struct cpfl_vport_id vport_identity; + + if (!itf) + return CPFL_INVALID_HW_ID; + + if (itf->type == CPFL_ITF_TYPE_REPRESENTOR) { + struct cpfl_repr *repr = (void *)itf; + + return repr->vport_info->vport_info.vsi_id; + } else if (itf->type == CPFL_ITF_TYPE_VPORT) { + vport_id = ((struct cpfl_vport *)itf)->base.vport_id; + vport_identity.func_type = CPCHNL2_FUNC_TYPE_PF; + /* host: HOST0_CPF_ID, acc: ACC_CPF_ID */ + vport_identity.pf_id = ACC_CPF_ID; + vport_identity.vf_id = 0; + vport_identity.vport_id = vport_id; + + ret = rte_hash_lookup_data(adapter->vport_map_hash, &vport_identity, + (void **)&info); + if (ret < 0) { + PMD_DRV_LOG(ERR, "vport id not exist"); + goto err; + } + + /* rte_spinlock_unlock(&adapter->vport_map_lock); */ + return info->vport_info.vsi_id; + } + +err: + /* rte_spinlock_unlock(&adapter->vport_map_lock); */ + return CPFL_INVALID_HW_ID; +} + +static inline struct cpfl_itf * +cpfl_get_itf_by_port_id(uint16_t port_id) +{ + struct rte_eth_dev *dev; + + if (port_id >= RTE_MAX_ETHPORTS) { + PMD_DRV_LOG(ERR, "port_id should be < %d.", RTE_MAX_ETHPORTS); + return NULL; + } + + dev = &rte_eth_devices[port_id]; + + if (dev->state == RTE_ETH_DEV_UNUSED) { + PMD_DRV_LOG(ERR, "eth_dev[%d] is unused.", port_id); + return NULL; + } + + if (!dev->data) { + PMD_DRV_LOG(ERR, "eth_dev[%d] data not be allocated.", port_id); + return NULL; + } + + return CPFL_DEV_TO_ITF(dev); +} #endif /* _CPFL_ETHDEV_H_ */ diff a/drivers/net/cpfl/meson.build b/drivers/net/cpfl/meson.build (rejected hunks) @@ -43,6 +43,7 @@ js_dep = dependency('json-c', required: false, method : 'pkg-config') if js_dep.found() sources += files( 'cpfl_flow.c', + 'cpfl_flow_engine_fxp.c', 'cpfl_flow_parser.c', 'cpfl_rules.c', 'cpfl_controlq.c', https://lab.dpdk.org/results/dashboard/patchsets/27323/ UNH-IOL DPDK Community Lab