X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=inline;f=app%2Ftest-pmd%2Fconfig.c;h=593677e568e59b440461ce9a1bf575c27f3c5aa1;hb=8adf48c796d3d561db056b065dfc13815305029f;hp=3cd4f319907cb51d5143c1efbf2653abf1fa28a0;hpb=323f811a4ac841f07c733b98717e670a0c140135;p=dpdk.git diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 3cd4f31990..593677e568 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -946,6 +946,7 @@ static const struct { MK_FLOW_ITEM(NVGRE, sizeof(struct rte_flow_item_nvgre)), MK_FLOW_ITEM(MPLS, sizeof(struct rte_flow_item_mpls)), MK_FLOW_ITEM(GRE, sizeof(struct rte_flow_item_gre)), + MK_FLOW_ITEM(FUZZY, sizeof(struct rte_flow_item_fuzzy)), }; /** Compute storage space needed by item specification. */ @@ -3000,10 +3001,10 @@ fdir_set_flex_payload(portid_t port_id, struct rte_eth_flex_payload_cfg *cfg) } -#ifdef RTE_LIBRTE_IXGBE_PMD void set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on) { +#ifdef RTE_LIBRTE_IXGBE_PMD int diag; if (is_rx) @@ -3013,15 +3014,15 @@ set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on) if (diag == 0) return; - if(is_rx) - printf("rte_pmd_ixgbe_set_vf_rx for port_id=%d failed " - "diag=%d\n", port_id, diag); - else - printf("rte_pmd_ixgbe_set_vf_tx for port_id=%d failed " - "diag=%d\n", port_id, diag); - -} + printf("rte_pmd_ixgbe_set_vf_%s for port_id=%d failed diag=%d\n", + is_rx ? "rx" : "tx", port_id, diag); + return; #endif + printf("VF %s setting not supported for port %d\n", + is_rx ? "Rx" : "Tx", port_id); + RTE_SET_USED(vf); + RTE_SET_USED(on); +} int set_queue_rate_limit(portid_t port_id, uint16_t queue_idx, uint16_t rate) @@ -3308,6 +3309,27 @@ open_ddp_package_file(const char *file_path, uint32_t *size) return buf; } +int +save_ddp_package_file(const char *file_path, uint8_t *buf, uint32_t size) +{ + FILE *fh = fopen(file_path, "wb"); + + if (fh == NULL) { + printf("%s: Failed to open %s\n", __func__, file_path); + return -1; + } + + if (fwrite(buf, 1, size, fh) != size) { + fclose(fh); + printf("%s: File write operation failed\n", __func__); + return -1; + } + + fclose(fh); + + return 0; +} + int close_ddp_package_file(uint8_t *buf) {