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 E119C42220 for ; Fri, 1 Sep 2023 14:33:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E611B4014F; Fri, 1 Sep 2023 14:33:45 +0200 (CEST) Received: from mail-pl1-f227.google.com (mail-pl1-f227.google.com [209.85.214.227]) by mails.dpdk.org (Postfix) with ESMTP id D27C64014F for ; Fri, 1 Sep 2023 14:33:44 +0200 (CEST) Received: by mail-pl1-f227.google.com with SMTP id d9443c01a7336-1bdb7b0c8afso14384555ad.3 for ; Fri, 01 Sep 2023 05:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1693571624; x=1694176424; darn=dpdk.org; h=cc:to:from:subject:message-id:date:from:to:cc:subject:date :message-id:reply-to; bh=UgLumyubkueoZI/0au7U3U2yAnxJt7eKW0HMpSGM2UI=; b=TtMuwNzMyNXPF4k+pHmuniV3kMHpai9WMMoMwbJbYp8JZ/znscW2893DPx1nbMWtbE Pvub96dzcccwOWR/SwejdeiEDZhKfzScAOxp1GtsWM4YR3lSMdq6qWCiIOYeY6Hrc85U MPELlfA+6e19z2H8F/JA9vBUvi06gU42HO+qM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693571624; x=1694176424; h=cc:to:from:subject:message-id:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UgLumyubkueoZI/0au7U3U2yAnxJt7eKW0HMpSGM2UI=; b=DmJ8SLB9sQJFjFUFq0L9AUFkL17d1I9mIytADH2mXT7Pyykt/BdD0QTholBBipsmFP z/muqPrxbW6rAcZ+3gsVp+NEmn3XR7JEFB+lk0ZvC/UFJ/XyS0lNUBUN/pUOzPUTD5Q6 f6650Wc2P4bHlAWmXSHeZm/urGEW/x1hWPTuibkWvOLiQNMsQ4mdsKESWIswHSUgbhTC /jcMZrx2t3o/+PfXYBCUbbTiXPuIImASmiRXVmfzYEFzYgyKWyV31PmcnySzgh1feMAS W3bDcMrIZqM6LcFTFg+5Gpnv8zpnFhtnG+T1Ej+WBlkceDJtGc8hGczkJ3jhj4MOcJmn hZ+Q== X-Gm-Message-State: AOJu0YwxAqh60nNq8lj20qcC8zA/EhmpoSp6gdfrfRAYJI6842yp4+z+ VLx1/K0HQI2QHx3gc0jNhyESt9EFm1LAAg/IEEhKPfeOZDTWluv3YMfD/jNMciCX+1/UjIRcLg= = X-Google-Smtp-Source: AGHT+IEK6xlh4vFUHbu6zNraQHlIkZr3SM2wpIqWOboD1iH8XLaIsBai9kH3AJ40s7mQYQmsc6uysUEBNNVm X-Received: by 2002:a17:90b:1986:b0:268:314f:8f35 with SMTP id mv6-20020a17090b198600b00268314f8f35mr2048017pjb.6.1693571624091; Fri, 01 Sep 2023 05:33:44 -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 om7-20020a17090b3a8700b002717aea340fsm318543pjb.12.2023.09.01.05.33.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Sep 2023 05:33:44 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Date: Fri, 01 Sep 2023 05:33:44 -0700 (PDT) Message-ID: <64f1da28.170a0220.c56a9.6bd7SMTPIN_ADDED_MISSING@mx.google.com> Received: from [172.21.0.3] (unknown [172.18.0.240]) by postal.iol.unh.edu (Postfix) with ESMTP id 3F1406052471; Fri, 1 Sep 2023 08:33:43 -0400 (EDT) Subject: |WARNING| pw131078-131085 [PATCH] [v2, 8/8] net/cpfl: add flow support for representor 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/131078 _apply patch failure_ Submitter: Yuying Zhang Date: Friday, September 01 2023 11:31:58 Applied on: CommitID:495e2ca8968a8a5efb8fa74fab8aed190bf3a16b Apply patch set 131078-131085 failed: Checking patch doc/guides/nics/cpfl.rst... error: while searching for: -a BDF,representor=vf[0-3],representor=c1pf1 Driver compilation and testing ------------------------------ Refer to the document :doc:`build_and_test` for details. Features -------- error: patch failed: doc/guides/nics/cpfl.rst:128 Hunk #2 succeeded at 128 (offset -48 lines). Checking patch drivers/net/cpfl/cpfl_ethdev.c... Hunk #1 succeeded at 18 (offset -3 lines). Hunk #2 succeeded at 31 (offset -4 lines). error: while searching for: return 0; } static int cpfl_parse_devargs(struct rte_pci_device *pci_dev, struct cpfl_adapter_ext *adapter, bool first) { error: patch failed: drivers/net/cpfl/cpfl_ethdev.c:1537 error: while searching for: &adapter->base.is_rx_singleq); if (ret != 0) goto fail; fail: rte_kvargs_free(kvlist); return ret; error: patch failed: drivers/net/cpfl/cpfl_ethdev.c:1585 Checking patch drivers/net/cpfl/cpfl_ethdev.h... error: while searching for: #define ACC_LCE_ID 15 #define IMC_MBX_EFD_ID 0 struct cpfl_vport_param { struct cpfl_adapter_ext *adapter; uint16_t devarg_id; /* arg id from user */ error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:87 error: while searching for: uint16_t req_vport_nb; uint8_t repr_args_num; struct rte_eth_devargs repr_args[CPFL_REPR_ARG_NUM_MAX]; }; struct p2p_queue_chunks_info { error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:100 Checking patch drivers/net/cpfl/meson.build... Hunk #1 succeeded at 36 (offset -2 lines). Applying patch doc/guides/nics/cpfl.rst with 1 reject... Rejected hunk #1. Hunk #2 applied cleanly. Applying patch drivers/net/cpfl/cpfl_ethdev.c with 2 rejects... Hunk #1 applied cleanly. Hunk #2 applied cleanly. Rejected hunk #3. Rejected hunk #4. Applying patch drivers/net/cpfl/cpfl_ethdev.h with 2 rejects... Rejected hunk #1. Rejected hunk #2. Applied patch drivers/net/cpfl/meson.build cleanly. hint: Use 'git am --show-current-patch' to see the failed patch diff a/doc/guides/nics/cpfl.rst b/doc/guides/nics/cpfl.rst (rejected hunks) @@ -128,12 +128,24 @@ Runtime Configuration -a BDF,representor=vf[0-3],representor=c1pf1 +- ``flow_parser`` (default ``not enabled``) + + The PMD supports using a JSON file to parse rte_flow tokens into low level hardware + resources defined in a DDP package file. + + The user can specify the path of json file, for example:: + + -a ca:00.0,flow_parser="refpkg.json" + + Then the PMD will load json file for device ``ca:00.0``. + The parameter is optional. Driver compilation and testing ------------------------------ Refer to the document :doc:`build_and_test` for details. +Rte flow need to install json-c library. Features -------- diff a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c (rejected hunks) @@ -1537,6 +1544,24 @@ parse_repr(const char *key __rte_unused, const char *value, void *args) return 0; } +#ifdef CPFL_FLOW_JSON_SUPPORT +static int +parse_file(const char *key, const char *value, void *args) +{ + char *name = args; + + if (strlen(value) > CPFL_FLOW_FILE_LEN - 1) { + PMD_DRV_LOG(ERR, "file path(%s) is too long.", value); + return -1; + } + + PMD_DRV_LOG(DEBUG, "value:\"%s\" for key:\"%s\"", value, key); + strlcpy(name, value, CPFL_FLOW_FILE_LEN); + + return 0; +} +#endif + static int cpfl_parse_devargs(struct rte_pci_device *pci_dev, struct cpfl_adapter_ext *adapter, bool first) { @@ -1585,7 +1610,18 @@ cpfl_parse_devargs(struct rte_pci_device *pci_dev, struct cpfl_adapter_ext *adap &adapter->base.is_rx_singleq); if (ret != 0) goto fail; - +#ifdef CPFL_FLOW_JSON_SUPPORT + if (rte_kvargs_get(kvlist, CPFL_FLOW_PARSER)) { + ret = rte_kvargs_process(kvlist, CPFL_FLOW_PARSER, + &parse_file, cpfl_args->flow_parser); + if (ret) { + PMD_DRV_LOG(ERR, "Failed to parser flow_parser, ret: %d", ret); + goto fail; + } + } else { + cpfl_args->flow_parser[0] = '\0'; + } +#endif fail: rte_kvargs_free(kvlist); return ret; diff a/drivers/net/cpfl/cpfl_ethdev.h b/drivers/net/cpfl/cpfl_ethdev.h (rejected hunks) @@ -87,6 +87,8 @@ #define ACC_LCE_ID 15 #define IMC_MBX_EFD_ID 0 +#define CPFL_FLOW_FILE_LEN 100 + struct cpfl_vport_param { struct cpfl_adapter_ext *adapter; uint16_t devarg_id; /* arg id from user */ @@ -100,6 +102,7 @@ struct cpfl_devargs { uint16_t req_vport_nb; uint8_t repr_args_num; struct rte_eth_devargs repr_args[CPFL_REPR_ARG_NUM_MAX]; + char flow_parser[CPFL_FLOW_FILE_LEN]; }; struct p2p_queue_chunks_info { Checking patch drivers/net/cpfl/cpfl_flow_parser.c... Checking patch drivers/net/cpfl/cpfl_flow_parser.h... Checking patch drivers/net/cpfl/meson.build... error: drivers/net/cpfl/meson.build: does not match index Applied patch drivers/net/cpfl/cpfl_flow_parser.c cleanly. Applied patch drivers/net/cpfl/cpfl_flow_parser.h cleanly. hint: Use 'git am --show-current-patch' to see the failed patch Checking patch drivers/net/cpfl/cpfl_actions.h... Checking patch drivers/net/cpfl/cpfl_controlq.c... Checking patch drivers/net/cpfl/cpfl_controlq.h... Checking patch drivers/net/cpfl/cpfl_rules.c... Checking patch drivers/net/cpfl/cpfl_rules.h... Checking patch drivers/net/cpfl/meson.build... error: drivers/net/cpfl/meson.build: does not match index Applied patch drivers/net/cpfl/cpfl_actions.h cleanly. Applied patch drivers/net/cpfl/cpfl_controlq.c cleanly. Applied patch drivers/net/cpfl/cpfl_controlq.h cleanly. Applied patch drivers/net/cpfl/cpfl_rules.c cleanly. Applied patch drivers/net/cpfl/cpfl_rules.h cleanly. hint: Use 'git am --show-current-patch' to see the failed patch Checking patch drivers/net/cpfl/cpfl_ethdev.c... error: drivers/net/cpfl/cpfl_ethdev.c: does not match index Checking patch drivers/net/cpfl/cpfl_ethdev.h... error: while searching for: #include "cpfl_logs.h" #include "cpfl_cpchnl.h" #include "cpfl_representor.h" /* Currently, backend supports up to 8 vports */ #define CPFL_MAX_VPORT_NUM 8 error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:22 error: while searching for: #define CPFL_FLOW_FILE_LEN 100 struct cpfl_vport_param { struct cpfl_adapter_ext *adapter; uint16_t devarg_id; /* arg id from user */ error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:89 error: while searching for: rte_spinlock_t repr_lock; struct rte_hash *repr_whitelist_hash; }; TAILQ_HEAD(cpfl_adapter_list, cpfl_adapter_ext); int cpfl_vport_info_create(struct cpfl_adapter_ext *adapter, struct cpfl_vport_id *vport_identity, struct cpchnl2_vport_info *vport_info); error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:189 Checking patch drivers/net/cpfl/cpfl_vchnl.c... error: drivers/net/cpfl/cpfl_vchnl.c: does not exist in index Applying patch drivers/net/cpfl/cpfl_ethdev.h with 3 rejects... Rejected hunk #1. Rejected hunk #2. Rejected hunk #3. 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) @@ -22,6 +22,7 @@ #include "cpfl_logs.h" #include "cpfl_cpchnl.h" #include "cpfl_representor.h" +#include "cpfl_controlq.h" /* Currently, backend supports up to 8 vports */ #define CPFL_MAX_VPORT_NUM 8 @@ -89,6 +90,10 @@ #define CPFL_FLOW_FILE_LEN 100 +#define CPFL_RX_CFGQ_NUM 4 +#define CPFL_TX_CFGQ_NUM 4 +#define CPFL_CFGQ_NUM 8 + struct cpfl_vport_param { struct cpfl_adapter_ext *adapter; uint16_t devarg_id; /* arg id from user */ @@ -189,10 +194,19 @@ struct cpfl_adapter_ext { 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]; + struct idpf_ctlq_info *ctlqp[CPFL_CFGQ_NUM]; + struct cpfl_ctlq_create_info cfgq_info[CPFL_CFGQ_NUM]; }; TAILQ_HEAD(cpfl_adapter_list, cpfl_adapter_ext); +int cpfl_vc_create_ctrl_vport(struct cpfl_adapter_ext *adapter); +int cpfl_config_ctlq_rx(struct cpfl_adapter_ext *adapter); +int cpfl_config_ctlq_tx(struct cpfl_adapter_ext *adapter); int cpfl_vport_info_create(struct cpfl_adapter_ext *adapter, struct cpfl_vport_id *vport_identity, struct cpchnl2_vport_info *vport_info); Checking patch drivers/net/cpfl/cpfl_ethdev.c... error: drivers/net/cpfl/cpfl_ethdev.c: does not match index 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:195 Checking patch drivers/net/cpfl/cpfl_flow.c... Checking patch drivers/net/cpfl/cpfl_flow.h... Checking patch drivers/net/cpfl/meson.build... error: drivers/net/cpfl/meson.build: does not match index 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. 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) @@ -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; }; @@ -195,6 +198,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]; 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 Checking patch drivers/net/cpfl/cpfl_ethdev.c... error: drivers/net/cpfl/cpfl_ethdev.c: does not match index 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 error: while searching for: struct cpchnl2_vport_id *vport_id, struct cpfl_vport_id *vi, struct cpchnl2_get_vport_info_response *response); #define CPFL_DEV_TO_PCI(eth_dev) \ RTE_DEV_TO_PCI((eth_dev)->device) error: patch failed: drivers/net/cpfl/cpfl_ethdev.h:222 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: drivers/net/cpfl/meson.build: does not match index Applying patch drivers/net/cpfl/cpfl_ethdev.h with 2 rejects... Rejected hunk #1. Rejected hunk #2. Applied patch drivers/net/cpfl/cpfl_fxp_rule.c cleanly. Applied patch drivers/net/cpfl/cpfl_fxp_rule.h cleanly. 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; }; @@ -222,6 +226,8 @@ int cpfl_cc_vport_info_get(struct cpfl_adapter_ext *adapter, struct cpchnl2_vport_id *vport_id, struct cpfl_vport_id *vi, struct cpchnl2_get_vport_info_response *response); +int cpfl_alloc_dma_mem_batch(struct idpf_dma_mem *orig_dma, struct idpf_dma_mem *dma, + uint32_t size, int batch_size); #define CPFL_DEV_TO_PCI(eth_dev) \ RTE_DEV_TO_PCI((eth_dev)->device) 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:203 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:239 Checking patch drivers/net/cpfl/cpfl_flow_engine_fxp.c... Checking patch drivers/net/cpfl/meson.build... error: drivers/net/cpfl/meson.build: does not match index 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. 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 { @@ -203,6 +205,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; @@ -239,5 +243,82 @@ int cpfl_alloc_dma_mem_batch(struct idpf_dma_mem *orig_dma, struct idpf_dma_mem ((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; + } + + return info->vport_info.vsi_id; + } + +err: + 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_ */ Checking patch doc/guides/nics/cpfl.rst... error: doc/guides/nics/cpfl.rst: does not match index Checking patch doc/guides/rel_notes/release_23_11.rst... error: while searching for: * **Updated Intel cpfl driver.** * Added support for port representor. Removed Items ------------- error: patch failed: doc/guides/rel_notes/release_23_11.rst:58 Checking patch drivers/net/cpfl/cpfl_flow_engine_fxp.c... error: drivers/net/cpfl/cpfl_flow_engine_fxp.c: does not exist in index Checking patch drivers/net/cpfl/cpfl_representor.c... error: drivers/net/cpfl/cpfl_representor.c: does not exist in index Applying patch doc/guides/rel_notes/release_23_11.rst with 1 reject... Rejected hunk #1. hint: Use 'git am --show-current-patch' to see the failed patch diff a/doc/guides/rel_notes/release_23_11.rst b/doc/guides/rel_notes/release_23_11.rst (rejected hunks) @@ -58,6 +58,7 @@ New Features * **Updated Intel cpfl driver.** * Added support for port representor. + * Added support for rte_flow. Removed Items ------------- https://lab.dpdk.org/results/dashboard/patchsets/27503/ UNH-IOL DPDK Community Lab