[dpdk-dev] [PATCH 9/9] ring: remove deprecated functions
From: Stephen Hemminger These were deprecated in 2.0 so remove them from 2.2 Signed-off-by: Stephen Hemminger Signed-off-by: Thomas Monjalon --- doc/guides/rel_notes/deprecation.rst | 3 -- drivers/net/ring/rte_eth_ring.c | 56 --- drivers/net/ring/rte_eth_ring.h | 3 -- drivers/net/ring/rte_eth_ring_version.map | 2 -- 4 files changed, 64 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 04819fa..5f6079b 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -40,9 +40,6 @@ Deprecation Notices the tunnel type, TNI/VNI, inner MAC and inner VLAN are monitored. The release 2.2 will contain these changes without backwards compatibility. -* librte_pmd_ring: The deprecated functions rte_eth_ring_pair_create and - rte_eth_ring_pair_attach should be removed. - * ABI changes are planned for struct virtio_net in order to support vhost-user multiple queues feature. It should be integrated in release 2.2 without backward compatibility. diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 6fd3d0a..0ba36d5 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -391,62 +391,6 @@ eth_dev_ring_create(const char *name, const unsigned numa_node, return 0; } - -static int -eth_dev_ring_pair_create(const char *name, const unsigned numa_node, - enum dev_action action) -{ - /* rx and tx are so-called from point of view of first port. -* They are inverted from the point of view of second port -*/ - struct rte_ring *rx[RTE_PMD_RING_MAX_RX_RINGS]; - struct rte_ring *tx[RTE_PMD_RING_MAX_TX_RINGS]; - unsigned i; - char rx_rng_name[RTE_RING_NAMESIZE]; - char tx_rng_name[RTE_RING_NAMESIZE]; - unsigned num_rings = RTE_MIN(RTE_PMD_RING_MAX_RX_RINGS, - RTE_PMD_RING_MAX_TX_RINGS); - - for (i = 0; i < num_rings; i++) { - snprintf(rx_rng_name, sizeof(rx_rng_name), "ETH_RX%u_%s", i, name); - rx[i] = (action == DEV_CREATE) ? - rte_ring_create(rx_rng_name, 1024, numa_node, - RING_F_SP_ENQ|RING_F_SC_DEQ) : - rte_ring_lookup(rx_rng_name); - if (rx[i] == NULL) - return -1; - snprintf(tx_rng_name, sizeof(tx_rng_name), "ETH_TX%u_%s", i, name); - tx[i] = (action == DEV_CREATE) ? - rte_ring_create(tx_rng_name, 1024, numa_node, - RING_F_SP_ENQ|RING_F_SC_DEQ): - rte_ring_lookup(tx_rng_name); - if (tx[i] == NULL) - return -1; - } - - if (rte_eth_from_rings(rx_rng_name, rx, num_rings, tx, num_rings, - numa_node) < 0 || - rte_eth_from_rings(tx_rng_name, tx, num_rings, rx, - num_rings, numa_node) < 0) - return -1; - - return 0; -} - -int -rte_eth_ring_pair_create(const char *name, const unsigned numa_node) -{ - RTE_LOG(WARNING, PMD, "rte_eth_ring_pair_create is deprecated\n"); - return eth_dev_ring_pair_create(name, numa_node, DEV_CREATE); -} - -int -rte_eth_ring_pair_attach(const char *name, const unsigned numa_node) -{ - RTE_LOG(WARNING, PMD, "rte_eth_ring_pair_attach is deprecated\n"); - return eth_dev_ring_pair_create(name, numa_node, DEV_ATTACH); -} - struct node_action_pair { char name[PATH_MAX]; unsigned node; diff --git a/drivers/net/ring/rte_eth_ring.h b/drivers/net/ring/rte_eth_ring.h index 2262249..5a69bff 100644 --- a/drivers/net/ring/rte_eth_ring.h +++ b/drivers/net/ring/rte_eth_ring.h @@ -65,9 +65,6 @@ int rte_eth_from_rings(const char *name, const unsigned nb_tx_queues, const unsigned numa_node); -int rte_eth_ring_pair_create(const char *name, const unsigned numa_node); -int rte_eth_ring_pair_attach(const char *name, const unsigned numa_node); - #ifdef __cplusplus } #endif diff --git a/drivers/net/ring/rte_eth_ring_version.map b/drivers/net/ring/rte_eth_ring_version.map index 8ad107d..0875e25 100644 --- a/drivers/net/ring/rte_eth_ring_version.map +++ b/drivers/net/ring/rte_eth_ring_version.map @@ -2,8 +2,6 @@ DPDK_2.0 { global: rte_eth_from_rings; - rte_eth_ring_pair_attach; - rte_eth_ring_pair_create; local: *; }; -- 2.5.1
[dpdk-dev] [PATCH 8/9] kni: remove deprecated functions
From: Stephen Hemminger These functions were tagged as deprecated in 2.0 so they can be removed in 2.2 Signed-off-by: Stephen Hemminger Acked-by: Helin Zhang [Thomas: update doc] Signed-off-by: Thomas Monjalon --- app/test/Makefile | 6 --- app/test/test_kni.c | 36 --- doc/guides/prog_guide/kernel_nic_interface.rst| 2 - doc/guides/rel_notes/deprecation.rst | 3 -- doc/guides/sample_app_ug/kernel_nic_interface.rst | 9 lib/librte_kni/rte_kni.c | 51 - lib/librte_kni/rte_kni.h | 54 --- lib/librte_kni/rte_kni_version.map| 3 -- 8 files changed, 164 deletions(-) diff --git a/app/test/Makefile b/app/test/Makefile index e7f148f..7778e1c 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -146,12 +146,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) += test_kvargs.c CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -# Disable warnings of deprecated-declarations in test_kni.c -ifeq ($(CC), icc) -CFLAGS_test_kni.o += -wd1478 -else -CFLAGS_test_kni.o += -Wno-deprecated-declarations -endif CFLAGS += -D_GNU_SOURCE # Disable VTA for memcpy test diff --git a/app/test/test_kni.c b/app/test/test_kni.c index 506b543..9dad988 100644 --- a/app/test/test_kni.c +++ b/app/test/test_kni.c @@ -398,17 +398,6 @@ test_kni_processing(uint8_t port_id, struct rte_mempool *mp) printf("fail to create kni\n"); return -1; } - if (rte_kni_get_port_id(kni) != port_id) { - printf("fail to get port id\n"); - ret = -1; - goto fail_kni; - } - - if (rte_kni_info_get(RTE_MAX_ETHPORTS)) { - printf("Unexpectedly get a KNI successfully\n"); - ret = -1; - goto fail_kni; - } test_kni_ctx = kni; test_kni_processing_flag = 0; @@ -591,14 +580,6 @@ test_kni(void) goto fail; } - /* test of getting port id according to NULL kni context */ - if (rte_kni_get_port_id(NULL) < RTE_MAX_ETHPORTS) { - ret = -1; - printf("unexpectedly get port id successfully by NULL kni " - "pointer\n"); - goto fail; - } - /* test of releasing NULL kni context */ ret = rte_kni_release(NULL); if (ret == 0) { @@ -645,23 +626,6 @@ test_kni(void) goto fail; } - /* test the interface of creating a KNI, for backward compatibility */ - memset(&ops, 0, sizeof(ops)); - ops = kni_ops; - kni = rte_kni_create(port_id, MAX_PACKET_SZ, mp, &ops); - if (!kni) { - ret = -1; - printf("Fail to create a KNI device for port %d\n", port_id); - goto fail; - } - - ret = rte_kni_release(kni); - if (ret < 0) { - printf("Fail to release a KNI device\n"); - goto fail; - } - - ret = 0; fail: rte_eth_dev_stop(port_id); diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst index 713d30b..0d91476 100644 --- a/doc/guides/prog_guide/kernel_nic_interface.rst +++ b/doc/guides/prog_guide/kernel_nic_interface.rst @@ -100,8 +100,6 @@ Refer to rte_kni_common.h in the DPDK source code for more details. The physical addresses will be re-mapped into the kernel address space and stored in separate KNI contexts. -Once KNI interfaces are created, the KNI context information can be queried by calling the rte_kni_info_get() function. - The KNI interfaces can be deleted by a DPDK application dynamically after being created. Furthermore, all those KNI interfaces not deleted will be deleted on the release operation of the miscellaneous device (when the DPDK application is closed). diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index e7e213c..04819fa 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -40,9 +40,6 @@ Deprecation Notices the tunnel type, TNI/VNI, inner MAC and inner VLAN are monitored. The release 2.2 will contain these changes without backwards compatibility. -* librte_kni: Functions based on port id are deprecated for a long time and - should be removed (rte_kni_create, rte_kni_get_port_id and rte_kni_info_get). - * librte_pmd_ring: The deprecated functions rte_eth_ring_pair_create and rte_eth_ring_pair_attach should be removed. diff --git a/doc/guides/sample_app_ug/kernel_nic_interface.rst b/doc/guides/sample_app_ug/kernel_nic_interface.rst index 02dde59..f1deca9 100644 --- a/doc/guides/sample_app_ug/kernel_nic_interface.rst +++ b/doc/guides/sample_app_ug/kernel_nic_interface.rst @@ -242,15 +242,6 @@ Setup of mbuf pool, driver and queues is similar to th
[dpdk-dev] [PATCH 7/9] acl: remove old API
The functions and structures are moved to app/test in order to keep existing unit tests. Some minor changes were done in these functions because of library scope restrictions. An enum is also copied in two other applications to keep existing code. Signed-off-by: Thomas Monjalon --- app/test-acl/main.c | 17 +++ app/test/test_acl.c | 194 +++ app/test/test_acl.h | 59 +++ doc/guides/rel_notes/deprecation.rst | 4 - examples/l3fwd-acl/main.c| 17 +++ lib/librte_acl/Makefile | 2 +- lib/librte_acl/rte_acl.c | 170 -- lib/librte_acl/rte_acl.h | 104 --- lib/librte_acl/rte_acl_version.map | 2 - 9 files changed, 288 insertions(+), 281 deletions(-) diff --git a/app/test-acl/main.c b/app/test-acl/main.c index be3d773..72ce83c 100644 --- a/app/test-acl/main.c +++ b/app/test-acl/main.c @@ -162,6 +162,23 @@ enum { NUM_FIELDS_IPV4 }; +/* + * That effectively defines order of IPV4VLAN classifications: + * - PROTO + * - VLAN (TAG and DOMAIN) + * - SRC IP ADDRESS + * - DST IP ADDRESS + * - PORTS (SRC and DST) + */ +enum { + RTE_ACL_IPV4VLAN_PROTO, + RTE_ACL_IPV4VLAN_VLAN, + RTE_ACL_IPV4VLAN_SRC, + RTE_ACL_IPV4VLAN_DST, + RTE_ACL_IPV4VLAN_PORTS, + RTE_ACL_IPV4VLAN_NUM +}; + struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = { { .type = RTE_ACL_FIELD_TYPE_BITMASK, diff --git a/app/test/test_acl.c b/app/test/test_acl.c index b4a107d..2b82790 100644 --- a/app/test/test_acl.c +++ b/app/test/test_acl.c @@ -45,6 +45,8 @@ #include "test_acl.h" +#defineBIT_SIZEOF(x) (sizeof(x) * CHAR_BIT) + #define LEN RTE_ACL_MAX_CATEGORIES RTE_ACL_RULE_DEF(acl_ipv4vlan_rule, RTE_ACL_IPV4VLAN_NUM_FIELDS); @@ -100,6 +102,198 @@ bswap_test_data(struct ipv4_7tuple *data, int len, int to_be) } } +static int +acl_ipv4vlan_check_rule(const struct rte_acl_ipv4vlan_rule *rule) +{ + if (rule->src_port_low > rule->src_port_high || + rule->dst_port_low > rule->dst_port_high || + rule->src_mask_len > BIT_SIZEOF(rule->src_addr) || + rule->dst_mask_len > BIT_SIZEOF(rule->dst_addr)) + return -EINVAL; + return 0; +} + +static void +acl_ipv4vlan_convert_rule(const struct rte_acl_ipv4vlan_rule *ri, + struct acl_ipv4vlan_rule *ro) +{ + ro->data = ri->data; + + ro->field[RTE_ACL_IPV4VLAN_PROTO_FIELD].value.u8 = ri->proto; + ro->field[RTE_ACL_IPV4VLAN_VLAN1_FIELD].value.u16 = ri->vlan; + ro->field[RTE_ACL_IPV4VLAN_VLAN2_FIELD].value.u16 = ri->domain; + ro->field[RTE_ACL_IPV4VLAN_SRC_FIELD].value.u32 = ri->src_addr; + ro->field[RTE_ACL_IPV4VLAN_DST_FIELD].value.u32 = ri->dst_addr; + ro->field[RTE_ACL_IPV4VLAN_SRCP_FIELD].value.u16 = ri->src_port_low; + ro->field[RTE_ACL_IPV4VLAN_DSTP_FIELD].value.u16 = ri->dst_port_low; + + ro->field[RTE_ACL_IPV4VLAN_PROTO_FIELD].mask_range.u8 = ri->proto_mask; + ro->field[RTE_ACL_IPV4VLAN_VLAN1_FIELD].mask_range.u16 = ri->vlan_mask; + ro->field[RTE_ACL_IPV4VLAN_VLAN2_FIELD].mask_range.u16 = + ri->domain_mask; + ro->field[RTE_ACL_IPV4VLAN_SRC_FIELD].mask_range.u32 = + ri->src_mask_len; + ro->field[RTE_ACL_IPV4VLAN_DST_FIELD].mask_range.u32 = ri->dst_mask_len; + ro->field[RTE_ACL_IPV4VLAN_SRCP_FIELD].mask_range.u16 = + ri->src_port_high; + ro->field[RTE_ACL_IPV4VLAN_DSTP_FIELD].mask_range.u16 = + ri->dst_port_high; +} + +/* + * Add ipv4vlan rules to an existing ACL context. + * This function is not multi-thread safe. + * + * @param ctx + * ACL context to add patterns to. + * @param rules + * Array of rules to add to the ACL context. + * Note that all fields in rte_acl_ipv4vlan_rule structures are expected + * to be in host byte order. + * @param num + * Number of elements in the input array of rules. + * @return + * - -ENOMEM if there is no space in the ACL context for these rules. + * - -EINVAL if the parameters are invalid. + * - Zero if operation completed successfully. + */ +static int +rte_acl_ipv4vlan_add_rules(struct rte_acl_ctx *ctx, + const struct rte_acl_ipv4vlan_rule *rules, + uint32_t num) +{ + int32_t rc; + uint32_t i; + struct acl_ipv4vlan_rule rv; + + if (ctx == NULL || rules == NULL) + return -EINVAL; + + /* check input rules. */ + for (i = 0; i != num; i++) { + rc = acl_ipv4vlan_check_rule(rules + i); + if (rc != 0) { + RTE_LOG(ERR, ACL, "%s: rule #%u is invalid\n", + __func__, i + 1); + return rc; + } + } + + /* perform conversion to the internal format and add to the context.
[dpdk-dev] [PATCH 6/9] lpm: remove deprecated field
Signed-off-by: Thomas Monjalon --- app/test/test_func_reentrancy.c | 4 ++-- app/test/test_lpm.c | 4 ++-- doc/guides/rel_notes/deprecation.rst | 3 --- lib/librte_lpm/Makefile | 2 +- lib/librte_lpm/rte_lpm.h | 11 --- 5 files changed, 5 insertions(+), 19 deletions(-) diff --git a/app/test/test_func_reentrancy.c b/app/test/test_func_reentrancy.c index be61773..dbecc52 100644 --- a/app/test/test_func_reentrancy.c +++ b/app/test/test_func_reentrancy.c @@ -366,7 +366,7 @@ lpm_create_free(__attribute__((unused)) void *arg) /* create the same lpm simultaneously on all threads */ for (i = 0; i < MAX_ITER_TIMES; i++) { - lpm = rte_lpm_create("fr_test_once", SOCKET_ID_ANY, 4, RTE_LPM_HEAP); + lpm = rte_lpm_create("fr_test_once", SOCKET_ID_ANY, 4, 0); if ((NULL == lpm) && (rte_lpm_find_existing("fr_test_once") == NULL)) return -1; } @@ -374,7 +374,7 @@ lpm_create_free(__attribute__((unused)) void *arg) /* create mutiple fbk tables simultaneously */ for (i = 0; i < MAX_LPM_ITER_TIMES; i++) { snprintf(lpm_name, sizeof(lpm_name), "fr_test_%d_%d", lcore_self, i); - lpm = rte_lpm_create(lpm_name, SOCKET_ID_ANY, 4, RTE_LPM_HEAP); + lpm = rte_lpm_create(lpm_name, SOCKET_ID_ANY, 4, 0); if (NULL == lpm) return -1; diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c index 6d8823e..8b4ded9 100644 --- a/app/test/test_lpm.c +++ b/app/test/test_lpm.c @@ -165,7 +165,7 @@ test2(void) { struct rte_lpm *lpm = NULL; - lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, RTE_LPM_HEAP); + lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, 0); TEST_LPM_ASSERT(lpm != NULL); rte_lpm_free(lpm); @@ -607,7 +607,7 @@ test10(void) /* Add rule that covers a TBL24 range previously invalid & lookup * (& delete & lookup) */ - lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, RTE_LPM_HEAP); + lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, 0); TEST_LPM_ASSERT(lpm != NULL); ip = IPv4(128, 0, 0, 0); diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 3fa4c90..c40764a 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -18,9 +18,6 @@ Deprecation Notices * The function rte_jhash2 is deprecated and should be removed. -* The field mem_location of the rte_lpm structure is deprecated and should be - removed as well as the macros RTE_LPM_HEAP and RTE_LPM_MEMZONE. - * The following fields have been deprecated in rte_eth_stats: imissed, ibadcrc, ibadlen, imcasts, fdirmatch, fdirmiss, tx_pause_xon, rx_pause_xon, tx_pause_xoff, rx_pause_xoff diff --git a/lib/librte_lpm/Makefile b/lib/librte_lpm/Makefile index 0a7a888..688cfc9 100644 --- a/lib/librte_lpm/Makefile +++ b/lib/librte_lpm/Makefile @@ -39,7 +39,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) EXPORT_MAP := rte_lpm_version.map -LIBABIVER := 1 +LIBABIVER := 2 # all source are stored in SRCS-y SRCS-$(CONFIG_RTE_LIBRTE_LPM) := rte_lpm.c rte_lpm6.c diff --git a/lib/librte_lpm/rte_lpm.h b/lib/librte_lpm/rte_lpm.h index 11f0c04..c299ce2 100644 --- a/lib/librte_lpm/rte_lpm.h +++ b/lib/librte_lpm/rte_lpm.h @@ -56,16 +56,6 @@ extern "C" { /** Max number of characters in LPM name. */ #define RTE_LPM_NAMESIZE32 -/** @deprecated Possible location to allocate memory. This was for last - * parameter of rte_lpm_create(), but is now redundant. The LPM table is always - * allocated in memory using librte_malloc which uses a memzone. */ -#define RTE_LPM_HEAP0 - -/** @deprecated Possible location to allocate memory. This was for last - * parameter of rte_lpm_create(), but is now redundant. The LPM table is always - * allocated in memory using librte_malloc which uses a memzone. */ -#define RTE_LPM_MEMZONE 1 - /** Maximum depth value possible for IPv4 LPM. */ #define RTE_LPM_MAX_DEPTH 32 @@ -154,7 +144,6 @@ struct rte_lpm_rule_info { struct rte_lpm { /* LPM metadata. */ char name[RTE_LPM_NAMESIZE];/**< Name of the lpm. */ - int mem_location; /**< @deprecated @see RTE_LPM_HEAP and RTE_LPM_MEMZONE. */ uint32_t max_rules; /**< Max. balanced rules per lpm. */ struct rte_lpm_rule_info rule_info[RTE_LPM_MAX_DEPTH]; /**< Rule info table. */ -- 2.5.1
[dpdk-dev] [PATCH 5/9] mem: remove dummy malloc library
The malloc library is now part of the EAL. Signed-off-by: Thomas Monjalon --- MAINTAINERS| 1 - doc/guides/prog_guide/dev_kit_build_system.rst | 2 +- doc/guides/prog_guide/env_abstraction_layer.rst| 2 +- doc/guides/prog_guide/source_org.rst | 1 - .../thread_safety_intel_dpdk_functions.rst | 2 +- doc/guides/rel_notes/deprecation.rst | 5 --- lib/Makefile | 1 - lib/librte_malloc/Makefile | 48 -- lib/librte_malloc/rte_malloc_empty.c | 34 --- lib/librte_malloc/rte_malloc_version.map | 3 -- mk/rte.app.mk | 1 - 11 files changed, 3 insertions(+), 97 deletions(-) delete mode 100644 lib/librte_malloc/Makefile delete mode 100644 lib/librte_malloc/rte_malloc_empty.c delete mode 100644 lib/librte_malloc/rte_malloc_version.map diff --git a/MAINTAINERS b/MAINTAINERS index 17d4265..080a8e8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -102,7 +102,6 @@ F: lib/librte_eal/common/include/rte_malloc.h F: lib/librte_eal/common/*malloc* F: lib/librte_eal/common/eal_common_mem* F: lib/librte_eal/common/eal_hugepages.h -F: lib/librte_malloc/ F: doc/guides/prog_guide/env_abstraction_layer.rst F: app/test/test_func_reentrancy.c F: app/test/test_malloc.c diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst index 7dc2de6..dd3e3d0 100644 --- a/doc/guides/prog_guide/dev_kit_build_system.rst +++ b/doc/guides/prog_guide/dev_kit_build_system.rst @@ -85,7 +85,7 @@ Each build directory contains include files, libraries, and applications: librte_cmdline.a librte_lpm.a librte_mempool.a librte_ring.a -librte_eal.a librte_malloc.a librte_pmd_e1000.a librte_timer.a +librte_eal.a librte_pmd_e1000.a librte_timer.a ~/DEV/DPDK$ ls i686-native-linuxapp-gcc/include/ diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst index f1b3ff1..a03e40d 100644 --- a/doc/guides/prog_guide/env_abstraction_layer.rst +++ b/doc/guides/prog_guide/env_abstraction_layer.rst @@ -115,7 +115,7 @@ The physical address of the reserved memory for that memory zone is also returne .. note:: -Memory reservations done using the APIs provided by the rte_malloc library are also backed by pages from the hugetlbfs filesystem. +Memory reservations done using the APIs provided by rte_malloc are also backed by pages from the hugetlbfs filesystem. Xen Dom0 support without hugetbls ~ diff --git a/doc/guides/prog_guide/source_org.rst b/doc/guides/prog_guide/source_org.rst index b81e965..ae11b3b 100644 --- a/doc/guides/prog_guide/source_org.rst +++ b/doc/guides/prog_guide/source_org.rst @@ -74,7 +74,6 @@ The lib directory contains:: +-- librte_kni # Kernel NIC interface +-- librte_kvargs # Argument parsing library +-- librte_lpm # Longest prefix match library -+-- librte_malloc # Malloc-like functions +-- librte_mbuf # Packet and control mbuf manipulation +-- librte_mempool # Memory pool manager (fixed sized objects) +-- librte_meter# QoS metering library diff --git a/doc/guides/prog_guide/thread_safety_intel_dpdk_functions.rst b/doc/guides/prog_guide/thread_safety_intel_dpdk_functions.rst index 0034bf4..403e5fc 100644 --- a/doc/guides/prog_guide/thread_safety_intel_dpdk_functions.rst +++ b/doc/guides/prog_guide/thread_safety_intel_dpdk_functions.rst @@ -73,7 +73,7 @@ Performance Insensitive API Outside of the performance sensitive areas described in Section 25.1, the DPDK provides a thread-safe API for most other libraries. -For example, malloc(librte_malloc) and memzone functions are safe for use in multi-threaded and multi-process environments. +For example, malloc and memzone functions are safe for use in multi-threaded and multi-process environments. The setup and configuration of the PMD is not performance sensitive, but is not thread safe either. It is possible that the multiple read/writes during PMD setup and configuration could be corrupted in a multi-thread environment. diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 604a899..3fa4c90 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -21,11 +21,6 @@ Deprecation Notices * The field mem_location of the rte_lpm structure is deprecated and should be removed as well as the macros RTE_LPM_HEAP and RTE_LPM_MEMZONE. -* librte_malloc library has been integrated into librte_eal. The 2.1 release - creates a dummy/empty malloc library to fulfill binaries with dynamic linking - dependencies on librte_malloc.so. Such dummy library will not be created from - release 2.2 so binaries will need to be rebui
[dpdk-dev] [PATCH 4/9] eal: remove deprecated function
The function rte_eal_pci_close_one() was renamed rte_eal_pci_detach(). Signed-off-by: Thomas Monjalon --- doc/guides/rel_notes/deprecation.rst| 3 --- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 - lib/librte_eal/common/eal_common_pci.c | 6 -- lib/librte_eal/common/include/rte_pci.h | 2 -- lib/librte_eal/linuxapp/eal/rte_eal_version.map | 1 - 5 files changed, 13 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index cf5cd17..604a899 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -13,9 +13,6 @@ Deprecation Notices There is no backward compatibility planned from release 2.2. All binaries will need to be rebuilt from release 2.2. -* The EAL function rte_eal_pci_close_one is deprecated because renamed to - rte_eal_pci_detach. - * The Macros RTE_HASH_BUCKET_ENTRIES_MAX and RTE_HASH_KEY_LENGTH_MAX are deprecated and will be removed with version 2.2. diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map index 2758848..64fdfb1 100644 --- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map @@ -40,7 +40,6 @@ DPDK_2.0 { rte_eal_mp_remote_launch; rte_eal_mp_wait_lcore; rte_eal_parse_devargs_str; - rte_eal_pci_close_one; rte_eal_pci_dump; rte_eal_pci_probe; rte_eal_pci_probe_one; diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 16e8629..dcfe947 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -348,12 +348,6 @@ err_return: return -1; } -int __attribute__ ((deprecated)) -rte_eal_pci_close_one(const struct rte_pci_addr *addr) -{ - return rte_eal_pci_detach(addr); -} - /* * Detach device specified by its pci address. */ diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index 3fb2d3a..83e3c28 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -426,8 +426,6 @@ int rte_eal_pci_probe_one(const struct rte_pci_addr *addr); * - Negative on error. */ int rte_eal_pci_detach(const struct rte_pci_addr *addr); -int __attribute__ ((deprecated)) -rte_eal_pci_close_one(const struct rte_pci_addr *addr); /** * Dump the content of the PCI bus. diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map index 59b1717..dbb8fa1 100644 --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map @@ -40,7 +40,6 @@ DPDK_2.0 { rte_eal_mp_remote_launch; rte_eal_mp_wait_lcore; rte_eal_parse_devargs_str; - rte_eal_pci_close_one; rte_eal_pci_dump; rte_eal_pci_probe; rte_eal_pci_probe_one; -- 2.5.1
[dpdk-dev] [PATCH 3/9] ethdev: remove SCTP flow entries switch
The extended SCTP flow entries are now part of the standard API. Signed-off-by: Thomas Monjalon --- app/test-pmd/cmdline.c | 4 doc/guides/rel_notes/deprecation.rst | 3 --- drivers/net/i40e/i40e_fdir.c | 4 lib/librte_ether/rte_eth_ctrl.h | 4 4 files changed, 15 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 5799c9c..0f8f48f 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -7888,12 +7888,10 @@ cmd_flow_director_filter_parsed(void *parsed_result, IPV4_ADDR_TO_UINT(res->ip_src, entry.input.flow.sctp4_flow.ip.src_ip); /* need convert to big endian. */ -#ifdef RTE_NEXT_ABI entry.input.flow.sctp4_flow.dst_port = rte_cpu_to_be_16(res->port_dst); entry.input.flow.sctp4_flow.src_port = rte_cpu_to_be_16(res->port_src); -#endif entry.input.flow.sctp4_flow.verify_tag = rte_cpu_to_be_32(res->verify_tag_value); break; @@ -7917,12 +7915,10 @@ cmd_flow_director_filter_parsed(void *parsed_result, IPV6_ADDR_TO_ARRAY(res->ip_src, entry.input.flow.sctp6_flow.ip.src_ip); /* need convert to big endian. */ -#ifdef RTE_NEXT_ABI entry.input.flow.sctp6_flow.dst_port = rte_cpu_to_be_16(res->port_dst); entry.input.flow.sctp6_flow.src_port = rte_cpu_to_be_16(res->port_src); -#endif entry.input.flow.sctp6_flow.verify_tag = rte_cpu_to_be_32(res->verify_tag_value); break; diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 639ab18..cf5cd17 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -44,9 +44,6 @@ Deprecation Notices flow director filtering in VF. The release 2.1 does not contain these ABI changes, but release 2.2 will, and no backwards compatibility is planned. -* ABI change is planned to extend the SCTP flow's key input from release 2.1. - The change may be enabled in the release 2.1 with CONFIG_RTE_NEXT_ABI. - * ABI changes are planned for struct rte_eth_fdir_filter and rte_eth_fdir_masks in order to support new flow director modes, MAC VLAN and Cloud, on x550. The MAC VLAN mode means the MAC and diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index 8208273..c9ce98f 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -822,7 +822,6 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, sctp = (struct sctp_hdr *)(raw_pkt + sizeof(struct ether_hdr) + sizeof(struct ipv4_hdr)); payload = (unsigned char *)sctp + sizeof(struct sctp_hdr); -#ifdef RTE_NEXT_ABI /* * The source and destination fields in the transmitted packet * need to be presented in a reversed order with respect @@ -830,7 +829,6 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, */ sctp->src_port = fdir_input->flow.sctp4_flow.dst_port; sctp->dst_port = fdir_input->flow.sctp4_flow.src_port; -#endif sctp->tag = fdir_input->flow.sctp4_flow.verify_tag; break; @@ -873,7 +871,6 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, sctp = (struct sctp_hdr *)(raw_pkt + sizeof(struct ether_hdr) + sizeof(struct ipv6_hdr)); payload = (unsigned char *)sctp + sizeof(struct sctp_hdr); -#ifdef RTE_NEXT_ABI /* * The source and destination fields in the transmitted packet * need to be presented in a reversed order with respect @@ -881,7 +878,6 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, */ sctp->src_port = fdir_input->flow.sctp6_flow.dst_port; sctp->dst_port = fdir_input->flow.sctp6_flow.src_port; -#endif sctp->tag = fdir_input->flow.sctp6_flow.verify_tag; break; diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index 4beb981..26b7b33 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -335,10 +335,8 @@ struct rte_eth_tcpv4_flow { */ struct rte_eth_sctpv4_flow { struct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */ -#ifdef RTE_NEXT_ABI uint16_t src_port; /**< SCTP source port to match. */ uint16_t dst_port; /**< SCTP destination port to match. */ -#endif uint32_t verify_tag; /**< Verify tag to match */ }; @@ -373,10 +371,8 @@ struct rte_eth_tcpv6_flow { */ struct rte_eth_sctpv6_flow {
[dpdk-dev] [PATCH 2/9] mbuf: remove packet type from offload flags
The extended unified packet type is now part of the standard ABI. As mbuf struct is changed, the mbuf library version is bumped. Signed-off-by: Thomas Monjalon --- app/test-pipeline/pipeline_hash.c | 12 - app/test-pmd/csumonly.c| 14 - app/test-pmd/rxonly.c | 16 -- app/test/packet_burst_generator.c | 12 - doc/guides/rel_notes/deprecation.rst | 5 - drivers/net/cxgbe/sge.c| 16 -- drivers/net/e1000/igb_rxtx.c | 34 --- drivers/net/enic/enic_main.c | 25 -- drivers/net/fm10k/fm10k_rxtx.c | 15 -- drivers/net/i40e/i40e_rxtx.c | 293 - drivers/net/ixgbe/ixgbe_rxtx.c | 87 -- drivers/net/ixgbe/ixgbe_rxtx_vec.c | 111 drivers/net/mlx4/mlx4.c| 29 -- drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 - examples/ip_fragmentation/main.c | 10 - examples/ip_reassembly/main.c | 10 - examples/l3fwd-acl/main.c | 27 -- examples/l3fwd-power/main.c| 9 - examples/l3fwd/main.c | 114 examples/tep_termination/vxlan.c | 5 - .../linuxapp/eal/include/exec-env/rte_kni_common.h | 6 - lib/librte_mbuf/Makefile | 2 +- lib/librte_mbuf/rte_mbuf.c | 10 - lib/librte_mbuf/rte_mbuf.h | 28 +- 24 files changed, 2 insertions(+), 896 deletions(-) diff --git a/app/test-pipeline/pipeline_hash.c b/app/test-pipeline/pipeline_hash.c index aa3f9e5..548615f 100644 --- a/app/test-pipeline/pipeline_hash.c +++ b/app/test-pipeline/pipeline_hash.c @@ -459,33 +459,21 @@ app_main_loop_rx_metadata(void) { signature = RTE_MBUF_METADATA_UINT32_PTR(m, 0); key = RTE_MBUF_METADATA_UINT8_PTR(m, 32); -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) { -#else - if (m->ol_flags & PKT_RX_IPV4_HDR) { -#endif ip_hdr = (struct ipv4_hdr *) &m_data[sizeof(struct ether_hdr)]; ip_dst = ip_hdr->dst_addr; k32 = (uint32_t *) key; k32[0] = ip_dst & 0xFF00; -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) { -#else - } else { -#endif ipv6_hdr = (struct ipv6_hdr *) &m_data[sizeof(struct ether_hdr)]; ipv6_dst = ipv6_hdr->dst_addr; memcpy(key, ipv6_dst, 16); -#ifdef RTE_NEXT_ABI } else continue; -#else - } -#endif *signature = test_hash(key, 0, 0); } diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 1bf3485..e561dde 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -202,14 +202,9 @@ parse_ethernet(struct ether_hdr *eth_hdr, struct testpmd_offload_info *info) /* Parse a vxlan header */ static void -#ifdef RTE_NEXT_ABI parse_vxlan(struct udp_hdr *udp_hdr, struct testpmd_offload_info *info, uint32_t pkt_type) -#else -parse_vxlan(struct udp_hdr *udp_hdr, struct testpmd_offload_info *info, - uint64_t mbuf_olflags) -#endif { struct ether_hdr *eth_hdr; @@ -217,12 +212,7 @@ parse_vxlan(struct udp_hdr *udp_hdr, struct testpmd_offload_info *info, * (rfc7348) or that the rx offload flag is set (i40e only * currently) */ if (udp_hdr->dst_port != _htons(4789) && -#ifdef RTE_NEXT_ABI RTE_ETH_IS_TUNNEL_PKT(pkt_type) == 0) -#else - (mbuf_olflags & (PKT_RX_TUNNEL_IPV4_HDR | - PKT_RX_TUNNEL_IPV6_HDR)) == 0) -#endif return; info->is_tunnel = 1; @@ -559,11 +549,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) struct udp_hdr *udp_hdr; udp_hdr = (struct udp_hdr *)((char *)l3_hdr + info.l3_len); -#ifdef RTE_NEXT_ABI parse_vxlan(udp_hdr, &info, m->packet_type); -#else - parse_vxlan(udp_hdr, &info, m->ol_flags); -#endif } else if (info.l4_proto == IPPROTO_GRE) { struct simple_gre_hdr *gre_hdr; gre_hdr = (struct simple_gre_hdr *) diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c index ee7fd8d..14555
[dpdk-dev] [PATCH 1/9] ethdev: remove Rx interrupt switch
The Rx interrupt feature is now part of the standard ABI. Because of changes in rte_intr_handle and struct rte_eth_conf, the eal and ethdev library versions are bumped. Signed-off-by: Thomas Monjalon --- doc/guides/rel_notes/deprecation.rst | 4 -- drivers/net/e1000/igb_ethdev.c | 26 --- drivers/net/ixgbe/ixgbe_ethdev.c | 40 examples/l3fwd-power/main.c| 2 - lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_interrupts.h | 2 - lib/librte_eal/linuxapp/eal/Makefile | 2 +- lib/librte_eal/linuxapp/eal/eal_interrupts.c | 53 -- .../linuxapp/eal/include/exec-env/rte_interrupts.h | 2 - lib/librte_ether/Makefile | 2 +- lib/librte_ether/rte_ethdev.c | 40 lib/librte_ether/rte_ethdev.h | 4 -- 12 files changed, 3 insertions(+), 176 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index da17880..991a777 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -13,10 +13,6 @@ Deprecation Notices There is no backward compatibility planned from release 2.2. All binaries will need to be rebuilt from release 2.2. -* ABI changes are planned for struct rte_intr_handle, struct rte_eth_conf - and struct eth_dev_ops to support interrupt mode feature from release 2.1. - Those changes may be enabled in the release 2.1 with CONFIG_RTE_NEXT_ABI. - * The EAL function rte_eal_pci_close_one is deprecated because renamed to rte_eal_pci_detach. diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index c7e6d55..848ef6e 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -106,9 +106,7 @@ static int eth_igb_flow_ctrl_get(struct rte_eth_dev *dev, static int eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf); static int eth_igb_lsc_interrupt_setup(struct rte_eth_dev *dev); -#ifdef RTE_NEXT_ABI static int eth_igb_rxq_interrupt_setup(struct rte_eth_dev *dev); -#endif static int eth_igb_interrupt_get_status(struct rte_eth_dev *dev); static int eth_igb_interrupt_action(struct rte_eth_dev *dev); static void eth_igb_interrupt_handler(struct rte_intr_handle *handle, @@ -232,7 +230,6 @@ static int igb_timesync_read_rx_timestamp(struct rte_eth_dev *dev, uint32_t flags); static int igb_timesync_read_tx_timestamp(struct rte_eth_dev *dev, struct timespec *timestamp); -#ifdef RTE_NEXT_ABI static int eth_igb_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id); static int eth_igb_rx_queue_intr_disable(struct rte_eth_dev *dev, @@ -241,7 +238,6 @@ static void eth_igb_assign_msix_vector(struct e1000_hw *hw, int8_t direction, uint8_t queue, uint8_t msix_vector); static void eth_igb_write_ivar(struct e1000_hw *hw, uint8_t msix_vector, uint8_t index, uint8_t offset); -#endif static void eth_igb_configure_msix_intr(struct rte_eth_dev *dev); /* @@ -303,10 +299,8 @@ static const struct eth_dev_ops eth_igb_ops = { .vlan_tpid_set= eth_igb_vlan_tpid_set, .vlan_offload_set = eth_igb_vlan_offload_set, .rx_queue_setup = eth_igb_rx_queue_setup, -#ifdef RTE_NEXT_ABI .rx_queue_intr_enable = eth_igb_rx_queue_intr_enable, .rx_queue_intr_disable = eth_igb_rx_queue_intr_disable, -#endif .rx_queue_release = eth_igb_rx_queue_release, .rx_queue_count = eth_igb_rx_queue_count, .rx_descriptor_done = eth_igb_rx_descriptor_done, @@ -893,9 +887,7 @@ eth_igb_start(struct rte_eth_dev *dev) E1000_DEV_PRIVATE(dev->data->dev_private); struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle; int ret, mask; -#ifdef RTE_NEXT_ABI uint32_t intr_vector = 0; -#endif uint32_t ctrl_ext; PMD_INIT_FUNC_TRACE(); @@ -936,7 +928,6 @@ eth_igb_start(struct rte_eth_dev *dev) /* configure PF module if SRIOV enabled */ igb_pf_host_configure(dev); -#ifdef RTE_NEXT_ABI /* check and configure queue intr-vector mapping */ if (dev->data->dev_conf.intr_conf.rxq != 0) intr_vector = dev->data->nb_rx_queues; @@ -954,7 +945,6 @@ eth_igb_start(struct rte_eth_dev *dev) return -ENOMEM; } } -#endif /* confiugre msix for rx interrupt */ eth_igb_configure_msix_intr(dev); @@ -1050,11 +1040,9 @@ eth_igb_start(struct rte_eth_dev *dev) " no intr multiplex\n"); } -#ifdef RTE_NEXT_ABI
[dpdk-dev] [PATCH 0/9] clean deprecated code
Before starting a new integration cycle (2.2.0-rc0), the deprecated code is removed. The hash library is not cleaned in this patchset and would be better done by its maintainers. Bruce, Pablo, please check the file doc/guides/rel_notes/deprecation.rst. Stephen Hemminger (2): kni: remove deprecated functions ring: remove deprecated functions Thomas Monjalon (7): ethdev: remove Rx interrupt switch mbuf: remove packet type from offload flags ethdev: remove SCTP flow entries switch eal: remove deprecated function mem: remove dummy malloc library lpm: remove deprecated field acl: remove old API MAINTAINERS| 1 - app/test-acl/main.c| 17 ++ app/test-pipeline/pipeline_hash.c | 12 - app/test-pmd/cmdline.c | 4 - app/test-pmd/csumonly.c| 14 - app/test-pmd/rxonly.c | 16 -- app/test/Makefile | 6 - app/test/packet_burst_generator.c | 12 - app/test/test_acl.c| 194 ++ app/test/test_acl.h| 59 + app/test/test_func_reentrancy.c| 4 +- app/test/test_kni.c| 36 --- app/test/test_lpm.c| 4 +- doc/guides/prog_guide/dev_kit_build_system.rst | 2 +- doc/guides/prog_guide/env_abstraction_layer.rst| 2 +- doc/guides/prog_guide/kernel_nic_interface.rst | 2 - doc/guides/prog_guide/source_org.rst | 1 - .../thread_safety_intel_dpdk_functions.rst | 2 +- doc/guides/rel_notes/deprecation.rst | 33 --- doc/guides/sample_app_ug/kernel_nic_interface.rst | 9 - drivers/net/cxgbe/sge.c| 16 -- drivers/net/e1000/igb_ethdev.c | 26 -- drivers/net/e1000/igb_rxtx.c | 34 --- drivers/net/enic/enic_main.c | 25 -- drivers/net/fm10k/fm10k_rxtx.c | 15 -- drivers/net/i40e/i40e_fdir.c | 4 - drivers/net/i40e/i40e_rxtx.c | 293 - drivers/net/ixgbe/ixgbe_ethdev.c | 40 --- drivers/net/ixgbe/ixgbe_rxtx.c | 87 -- drivers/net/ixgbe/ixgbe_rxtx_vec.c | 111 drivers/net/mlx4/mlx4.c| 29 -- drivers/net/ring/rte_eth_ring.c| 56 drivers/net/ring/rte_eth_ring.h| 3 - drivers/net/ring/rte_eth_ring_version.map | 2 - drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 - examples/ip_fragmentation/main.c | 10 - examples/ip_reassembly/main.c | 10 - examples/l3fwd-acl/main.c | 44 ++-- examples/l3fwd-power/main.c| 11 - examples/l3fwd/main.c | 114 examples/tep_termination/vxlan.c | 5 - lib/Makefile | 1 - lib/librte_acl/Makefile| 2 +- lib/librte_acl/rte_acl.c | 170 lib/librte_acl/rte_acl.h | 104 lib/librte_acl/rte_acl_version.map | 2 - lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_interrupts.h | 2 - lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 - lib/librte_eal/common/eal_common_pci.c | 6 - lib/librte_eal/common/include/rte_pci.h| 2 - lib/librte_eal/linuxapp/eal/Makefile | 2 +- lib/librte_eal/linuxapp/eal/eal_interrupts.c | 53 .../linuxapp/eal/include/exec-env/rte_interrupts.h | 2 - .../linuxapp/eal/include/exec-env/rte_kni_common.h | 6 - lib/librte_eal/linuxapp/eal/rte_eal_version.map| 1 - lib/librte_ether/Makefile | 2 +- lib/librte_ether/rte_eth_ctrl.h| 4 - lib/librte_ether/rte_ethdev.c | 40 --- lib/librte_ether/rte_ethdev.h | 4 - lib/librte_kni/rte_kni.c | 51 lib/librte_kni/rte_kni.h | 54 lib/librte_kni/rte_kni_version.map | 3 - lib/librte_lpm/Makefile| 2 +- lib/librte_lpm/rte_lpm.h | 11 - lib/librte_malloc/Makefile | 48 lib/librte_malloc/rte_malloc_empty.c | 34 --- lib/librte_malloc/rte_malloc_version.map | 3 - lib/librte_mbuf/Makefile | 2 +- lib/librte_mbuf/rte_mbuf.c | 10 - lib/librte_mbuf/rte_mbuf.h | 28
[dpdk-dev] ixgbe: prefetch packet headers in vector PMD receive function
The lack of this prefetch causes a significant performance drop in OVS-DPDK: 13.3 Mpps instead of 14 when forwarding 64 byte packets. Even though OVS prefetches the next packet's header before it starts processing the current one, it doesn't get there fast enough. This aligns with the behaviour of other receive functions. Signed-off-by: Zoltan Kiss --- diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec.c b/drivers/net/ixgbe/ixgbe_rxtx_vec.c index cf25a53..51299fa 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec.c @@ -502,6 +502,15 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, _mm_storeu_si128((void *)&rx_pkts[pos]->rx_descriptor_fields1, pkt_mb1); + rte_packet_prefetch((char*)(rx_pkts[pos]->buf_addr) + + RTE_PKTMBUF_HEADROOM); + rte_packet_prefetch((char*)(rx_pkts[pos + 1]->buf_addr) + + RTE_PKTMBUF_HEADROOM); + rte_packet_prefetch((char*)(rx_pkts[pos + 2]->buf_addr) + + RTE_PKTMBUF_HEADROOM); + rte_packet_prefetch((char*)(rx_pkts[pos + 3]->buf_addr) + + RTE_PKTMBUF_HEADROOM); + /* C.4 calc avaialbe number of desc */ var = __builtin_popcountll(_mm_cvtsi128_si64(staterr)); nb_pkts_recd += var;
[dpdk-dev] Broken RSS hash computation on Intel 82574L
On 09/01/2015 05:47 PM, Matthew Hall wrote: > On Tue, Sep 01, 2015 at 04:37:18PM +0200, Martin Dra?ar wrote: >> Dne 1.9.2015 v 15:45 De Lara Guarch, Pablo napsal(a): >>> 82574L NIC uses em PMD, which does not support more than 1 queue. >>> Therefore RSS is disabled in the NIC and then you cannot have RSS hashes. >>> >>> Thanks, >>> Pablo >> Hi Pablo, >> >> that is an interesting information. I read the rationale in em_ethdev.c >> and I was wondering, what would have to be done to enable RSS hash >> computation on that card. I can live with just one RX queue, but hashes >> would help me a lot. The computer which is using those NICs is not that >> powerful and every bit of offloaded computation counts... >> >> Thanks, >> Martin > RSS calculations are used to direct packets across multiple RX queues. With > only one RX queue it cannot possibly increase performance by enabling it. > As an example, seastar uses the RSS hash computed by the NIC to select a core to process on, if the number of hardware queues is smaller than the number of cores.
[dpdk-dev] flow_director_filter error!!
Thanks John, I figured that out since I was seeing the MODE: DISABLE all the time Now I am able to set the flow-director-filter correctly...but need to play with the settings to get it right!!! Will ping this group if I am still stuck end of the week. Thanks -Navneet -Original Message- From: Mcnamara, John [mailto:john.mcnam...@intel.com] Sent: Monday, August 31, 2015 4:07 AM To: Navneet Rao; De Lara Guarch, Pablo; Wu, Jingjing; dev at dpdk.org Subject: RE: [dpdk-dev] flow_director_filter error!! > From: Navneet Rao [mailto:navneet.rao at oracle.com] > Sent: Friday, August 28, 2015 11:11 PM > To: De Lara Guarch, Pablo; Wu, Jingjing; Mcnamara, John; dev at dpdk.org > Subject: RE: [dpdk-dev] flow_director_filter error!! > > Hi John et al: > I am using the X540, and setting it up to receive UDP traffic. > Want to use the flow-director filter, to steer packets to different receive > queues. > Using the testpmd app, I am running into the following error -- > testpmd> flow_director_filter 0 add flow ipv4-udp src 192.168.10.100 ... > flow director programming error: (Operation not supported) Hi, You need to pass --pkt-filter-mode=perfect or --pkt-filter-mode=signature on the commandline to enable flow director. If it isn't enabled you will see something like the following and you will get the "Operation not supported" message in several places: testpmd> show port fdir all FDIR infos for port 0 MODE: DISABLE SUPPORTED FLOW TYPE: ipv4-tcp ipv4-udp ipv4-sctp ipv4-other ipv6-tcp ipv6-udp ipv6-sctp ipv6-other FLEX PAYLOAD INFO: ... John. --
[dpdk-dev] Fast Failover Test Results
On 01/09/15 14:31, Stefan Binna wrote: > Hi @all, > > I've conducted some fast failover tests on a SDN infrastructure, whereby > following three configurations were used for the device under test (DUT): > > - Intel 82574L with default driver e1000e > - Intel 82574L with DPDK > - Realtek RTL8111/8168/8411 PCI Express with default driver r8169 > > There were two paths connected to the DUT, e.g. Path 1 and Path 2. > So by default Path 1 had been used. When Path 1 was disconnected, the > time it took to switch to Path 2 had been measured by counting the lost > packets. > Several tests have been conducted and the median calculated. > > Terminology: > > Median FF: Median fast failover time / ms > Median LP: Median lost packets / packet(s) > > Median FF Median LP > > DPDK17003363 > Intel 350 690 > Realtek 350 695 > > Anyone an idea why DPDK is so "slow"? > > Best regards, > Stefan. Hey Stefan, A couple of questions regarding your setup which will hopefully help me figure out what the issue is. - Are you just running in active backup mode or are you using one of the other bonding modes. - What is down stream of the DUT, is it a switch or are you just directly connected to another system? I'm not sure if the 82574L has LSC interrupt support in DPDK, I'll check that out, but if it doesn't the PMD need will be polling the link status which could be slowing down detection of the link going down and the fail over to the over port. Declan
[dpdk-dev] Broken RSS hash computation on Intel 82574L
Dne 1.9.2015 v 16:50 Avi Kivity napsal(a): > On 09/01/2015 05:47 PM, Matthew Hall wrote: >> RSS calculations are used to direct packets across multiple RX queues. >> With >> only one RX queue it cannot possibly increase performance by enabling it. >> > > As an example, seastar uses the RSS hash computed by the NIC to select a > core to process on, if the number of hardware queues is smaller than the > number of cores. Yep, we use the hash for pairing of flows and other more complicated packet processing.
[dpdk-dev] [PATCH] ixgbe: fix LSC callback
Hi Wenzhuo, I just noticed _rte_eth_dev_callback_process called by ixgbe_dev_interrupt_delayed_handler. This patch was incorrect, please ignore it. On 09/01/2015 04:09 PM, ??? wrote: > Hi Wenzhuo, > I bond 82599 ports with mode 802.3ad, the bonding port can't work > properly. But bonding with i350 ports works properly. I found the > registered callback function bond_ethdev_lsc_event_callback by > __eth_bond_slave_add_lock_free was not executed when link status > changed. I compared ixgbe driver with igb driver, ixgbe's LSC > interrupt action without _rte_eth_dev_callback_process. > On 09/01/2015 03:42 PM, Lu, Wenzhuo wrote: >> Hi Shelton, >> >>> -Original Message- >>> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Shelton Chia >>> Sent: Tuesday, September 1, 2015 2:22 PM >>> To: dev at dpdk.org >>> Cc: letaotor at gmail.com >>> Subject: [dpdk-dev] [PATCH] ixgbe: fix LSC callback >>> >>> add _rte_eth_dev_callback_process to call callback func >> Would you like to give more details about why we need this patch? >> Thanks. >>> Signed-off-by: Shelton Chia >>> --- >>> drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c >>> b/drivers/net/ixgbe/ixgbe_ethdev.c >>> index b8ee1e9..4e4c118 100644 >>> --- a/drivers/net/ixgbe/ixgbe_ethdev.c >>> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c >>> @@ -2775,6 +2775,8 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev >>> *dev) >>> >>> ixgbe_dev_link_status_print(dev); >>> >>> +__rte_eth_dev_callback_process(dev, >>> RTE_ETH_EVENT_INTR_LSC); >>> + >>> intr_enable_delay = true; >>> } >>> >>> -- >>> 2.5.0 > -- ??? ??
[dpdk-dev] Broken RSS hash computation on Intel 82574L
Dne 1.9.2015 v 15:45 De Lara Guarch, Pablo napsal(a): > 82574L NIC uses em PMD, which does not support more than 1 queue. > Therefore RSS is disabled in the NIC and then you cannot have RSS hashes. > > Thanks, > Pablo Hi Pablo, that is an interesting information. I read the rationale in em_ethdev.c and I was wondering, what would have to be done to enable RSS hash computation on that card. I can live with just one RX queue, but hashes would help me a lot. The computer which is using those NICs is not that powerful and every bit of offloaded computation counts... Thanks, Martin
[dpdk-dev] [PATCH] ixgbe: fix LSC callback
Hi Wenzhuo, I bond 82599 ports with mode 802.3ad, the bonding port can't work properly. But bonding with i350 ports works properly. I found the registered callback function bond_ethdev_lsc_event_callback by __eth_bond_slave_add_lock_free was not executed when link status changed. I compared ixgbe driver with igb driver, ixgbe's LSC interrupt action without _rte_eth_dev_callback_process. On 09/01/2015 03:42 PM, Lu, Wenzhuo wrote: > Hi Shelton, > >> -Original Message- >> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Shelton Chia >> Sent: Tuesday, September 1, 2015 2:22 PM >> To: dev at dpdk.org >> Cc: letaotor at gmail.com >> Subject: [dpdk-dev] [PATCH] ixgbe: fix LSC callback >> >> add _rte_eth_dev_callback_process to call callback func > Would you like to give more details about why we need this patch? Thanks. >> Signed-off-by: Shelton Chia >> --- >> drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c >> b/drivers/net/ixgbe/ixgbe_ethdev.c >> index b8ee1e9..4e4c118 100644 >> --- a/drivers/net/ixgbe/ixgbe_ethdev.c >> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c >> @@ -2775,6 +2775,8 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev) >> >> ixgbe_dev_link_status_print(dev); >> >> +__rte_eth_dev_callback_process(dev, >> RTE_ETH_EVENT_INTR_LSC); >> + >> intr_enable_delay = true; >> } >> >> -- >> 2.5.0 -- ??? ??
[dpdk-dev] Fast Failover Test Results
Hi @all, I've conducted some fast failover tests on a SDN infrastructure, whereby following three configurations were used for the device under test (DUT): - Intel 82574L with default driver e1000e - Intel 82574L with DPDK - Realtek RTL8111/8168/8411 PCI Express with default driver r8169 There were two paths connected to the DUT, e.g. Path 1 and Path 2. So by default Path 1 had been used. When Path 1 was disconnected, the time it took to switch to Path 2 had been measured by counting the lost packets. Several tests have been conducted and the median calculated. Terminology: Median FF: Median fast failover time / ms Median LP: Median lost packets / packet(s) Median FF Median LP DPDK17003363 Intel 350 690 Realtek 350 695 Anyone an idea why DPDK is so "slow"? Best regards, Stefan.
[dpdk-dev] [RFC PATCH 0/6] remove pci driver from vdevs
On Tue, Sep 01, 2015 at 01:38:02PM +, Iremonger, Bernard wrote: > Hi Neil, Thomas, > > > > > > You didn't remove the relationship of the ethdev to the pci driver > > > though, which is really the problem, An ethdev may reside on any > > > number of bus types (pci/usb/vmbus/virt/none). > > > > > > Whats really needed is a way to associate an ethdev with an arbitrary bus > > > > > > > Please see email below from 6Wind > > > > > > > > http://dpdk.org/ml/archives/dev/2015-July/022107.html > > > > > > > I think you misread that. I think all Thomas is asking for (correct > > > me if I'm wrong Thomas), is for someone to start refactoring the > > > ethdev registration code so that we can have a single init path > > > without the need for wierd typing and differentiation at init time. > > > > > > We just need to > > > start thinking about how to make bus registration independent of > > > ethernet device registration, and while your patch series sort of > > > eliminates some of that, its really not a proper refactoring of the > > > sort I think Thomas is asking for. > > I am just trying to distill what the actual requirement is from the above > discussion. > > (1) Remove relationship of the ethdev to the pci driver. Correct > (2) Refactor ethdev registration code so that there is a single init path. Correct (or mostly correct, in rereading my initial post, there may be some ambiguitiy here) > (3) Make bus registration independent of ethdev registration. Correct > (4) Change all (17) PMD's to use the modified structures. > Correct (I assume the 17 number is accurate here) > The rte_eal_driver_registration() code is in librte_eal, untouched as yet > by this patch set. > Correct, the code that registers an init function is a single path, which is great. However, that path requires that you specify a device type (in this case PMD_PDEV or PMD_VDEV to differentiate pci vs virtual devices (it uses this for ordering of initalization in rte_eal_dev_init, which is a hack). What would be preferred would be if the structure that was registered via that macro only held a name and an init routine to initalize the driver itself. Inside that init routine, the driver would then be responsible for registering with the appropriate bus type (virtual/pci/usb/whatever). A secondary function would be registered as part of that process (akin to the linux/bsd probe() method) which was called once for each instance of the device found on that bus. > The rte_eth_driver_registration() code is in librte_ether. > Should the pci fields be removed from the struct rte_eth_dev{} and struct > eth_driver{}, IMO, yes, they should, as the driver can store pointers to those devices in their private per-device data area. That said, there may be value in including a union of all bus types in the ethdev itself, if there are higher layer functions that need to be aware of a given ethdevs bus type > and put somewhere else or replaced with a union of bus types and drivers? > > Regards, > > Bernard. > > >
[dpdk-dev] [PATCH 0/9] clean deprecated code
On Tue, 1 Sep 2015 22:18:08 +0200 Thomas Monjalon wrote: > Before starting a new integration cycle (2.2.0-rc0), > the deprecated code is removed. > > The hash library is not cleaned in this patchset and would be > better done by its maintainers. Bruce, Pablo, please check the > file doc/guides/rel_notes/deprecation.rst. > > Stephen Hemminger (2): > kni: remove deprecated functions > ring: remove deprecated functions > > Thomas Monjalon (7): > ethdev: remove Rx interrupt switch > mbuf: remove packet type from offload flags > ethdev: remove SCTP flow entries switch > eal: remove deprecated function > mem: remove dummy malloc library > lpm: remove deprecated field > acl: remove old API > > MAINTAINERS| 1 - > app/test-acl/main.c| 17 ++ > app/test-pipeline/pipeline_hash.c | 12 - > app/test-pmd/cmdline.c | 4 - > app/test-pmd/csumonly.c| 14 - > app/test-pmd/rxonly.c | 16 -- > app/test/Makefile | 6 - > app/test/packet_burst_generator.c | 12 - > app/test/test_acl.c| 194 ++ > app/test/test_acl.h| 59 + > app/test/test_func_reentrancy.c| 4 +- > app/test/test_kni.c| 36 --- > app/test/test_lpm.c| 4 +- > doc/guides/prog_guide/dev_kit_build_system.rst | 2 +- > doc/guides/prog_guide/env_abstraction_layer.rst| 2 +- > doc/guides/prog_guide/kernel_nic_interface.rst | 2 - > doc/guides/prog_guide/source_org.rst | 1 - > .../thread_safety_intel_dpdk_functions.rst | 2 +- > doc/guides/rel_notes/deprecation.rst | 33 --- > doc/guides/sample_app_ug/kernel_nic_interface.rst | 9 - > drivers/net/cxgbe/sge.c| 16 -- > drivers/net/e1000/igb_ethdev.c | 26 -- > drivers/net/e1000/igb_rxtx.c | 34 --- > drivers/net/enic/enic_main.c | 25 -- > drivers/net/fm10k/fm10k_rxtx.c | 15 -- > drivers/net/i40e/i40e_fdir.c | 4 - > drivers/net/i40e/i40e_rxtx.c | 293 > - > drivers/net/ixgbe/ixgbe_ethdev.c | 40 --- > drivers/net/ixgbe/ixgbe_rxtx.c | 87 -- > drivers/net/ixgbe/ixgbe_rxtx_vec.c | 111 > drivers/net/mlx4/mlx4.c| 29 -- > drivers/net/ring/rte_eth_ring.c| 56 > drivers/net/ring/rte_eth_ring.h| 3 - > drivers/net/ring/rte_eth_ring_version.map | 2 - > drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 - > examples/ip_fragmentation/main.c | 10 - > examples/ip_reassembly/main.c | 10 - > examples/l3fwd-acl/main.c | 44 ++-- > examples/l3fwd-power/main.c| 11 - > examples/l3fwd/main.c | 114 > examples/tep_termination/vxlan.c | 5 - > lib/Makefile | 1 - > lib/librte_acl/Makefile| 2 +- > lib/librte_acl/rte_acl.c | 170 > lib/librte_acl/rte_acl.h | 104 > lib/librte_acl/rte_acl_version.map | 2 - > lib/librte_eal/bsdapp/eal/Makefile | 2 +- > .../bsdapp/eal/include/exec-env/rte_interrupts.h | 2 - > lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 - > lib/librte_eal/common/eal_common_pci.c | 6 - > lib/librte_eal/common/include/rte_pci.h| 2 - > lib/librte_eal/linuxapp/eal/Makefile | 2 +- > lib/librte_eal/linuxapp/eal/eal_interrupts.c | 53 > .../linuxapp/eal/include/exec-env/rte_interrupts.h | 2 - > .../linuxapp/eal/include/exec-env/rte_kni_common.h | 6 - > lib/librte_eal/linuxapp/eal/rte_eal_version.map| 1 - > lib/librte_ether/Makefile | 2 +- > lib/librte_ether/rte_eth_ctrl.h| 4 - > lib/librte_ether/rte_ethdev.c | 40 --- > lib/librte_ether/rte_ethdev.h | 4 - > lib/librte_kni/rte_kni.c | 51 > lib/librte_kni/rte_kni.h | 54 > lib/librte_kni/rte_kni_version.map | 3 - > lib/librte_lpm/Makefile| 2 +- > lib/librte_lpm/rte_lpm.h | 11 - > lib/librte_malloc/Makefile | 48 > lib/librte_malloc/rte_malloc_empty.c | 34 --- >
[dpdk-dev] [PATCH] ixgbe: fix LSC callback
add _rte_eth_dev_callback_process to call callback func Signed-off-by: Shelton Chia --- drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index b8ee1e9..4e4c118 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2775,6 +2775,8 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev) ixgbe_dev_link_status_print(dev); + __rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC); + intr_enable_delay = true; } -- 2.5.0
[dpdk-dev] Broken RSS hash computation on Intel 82574L
Hi Martin, > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Martin Dra?ar > Sent: Monday, August 31, 2015 1:16 PM > To: dev at dpdk.org > Subject: [dpdk-dev] Broken RSS hash computation on Intel 82574L > > Hi, > > I am using RSS to get identical hash for both directions of a flow. > Everything is working as it should with the Intel 82599ES, but when I > run the same code with the Intel 82574L, then the hash is not calculated > correctly and returns 0 as a hash value for all flows. > > I could use the Toeplitz hash implementation from 2.1.0, but I would > rather do it in hardware, because according to specification, 82574L can > do RSS in hardware. > > Any ideas what might be wrong? > > Thanks in advance, > Martin > > conf: > #define RSS_HASH_KEY_LENGTH 40 > static uint8_t hash_key[RSS_HASH_KEY_LENGTH] = { > 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, > 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, > 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, > 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, > 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A }; > > static const struct rte_eth_conf port_conf = { > .link_speed = 0, > .link_duplex = 0, > .rxmode = { > .mq_mode= ETH_RSS, > .max_rx_pkt_len = 0, > .split_hdr_size = 0, > .header_split = 0, > .hw_ip_checksum = 0, > .hw_vlan_filter = 0, > .hw_vlan_strip = 0, > .hw_vlan_extend = 0, > .jumbo_frame= 0, > .hw_strip_crc = 0, > }, > .txmode = { > .mq_mode = ETH_DCB_NONE, > }, > .lpbk_mode = 0, > .rx_adv_conf = { > .rss_conf = { > .rss_key = hash_key, > .rss_key_len = RSS_HASH_KEY_LENGTH, > .rss_hf = ETH_RSS_PROTO_MASK, > }, > }, > }; 82574L NIC uses em PMD, which does not support more than 1 queue. Therefore RSS is disabled in the NIC and then you cannot have RSS hashes. Thanks, Pablo
[dpdk-dev] [RFC PATCH 0/6] remove pci driver from vdevs
Hi Neil, Thomas, > > You didn't remove the relationship of the ethdev to the pci driver > > though, which is really the problem, An ethdev may reside on any > > number of bus types (pci/usb/vmbus/virt/none). > > Whats really needed is a way to associate an ethdev with an arbitrary bus > > > Please see email below from 6Wind > > > > > > http://dpdk.org/ml/archives/dev/2015-July/022107.html > > > > > I think you misread that. I think all Thomas is asking for (correct > > me if I'm wrong Thomas), is for someone to start refactoring the > > ethdev registration code so that we can have a single init path > > without the need for wierd typing and differentiation at init time. > > We just need to > > start thinking about how to make bus registration independent of > > ethernet device registration, and while your patch series sort of > > eliminates some of that, its really not a proper refactoring of the > > sort I think Thomas is asking for. I am just trying to distill what the actual requirement is from the above discussion. (1) Remove relationship of the ethdev to the pci driver. (2) Refactor ethdev registration code so that there is a single init path. (3) Make bus registration independent of ethdev registration. (4) Change all (17) PMD's to use the modified structures. The rte_eal_driver_registration() code is in librte_eal, untouched as yet by this patch set. The rte_eth_driver_registration() code is in librte_ether. Should the pci fields be removed from the struct rte_eth_dev{} and struct eth_driver{}, and put somewhere else or replaced with a union of bus types and drivers? Regards, Bernard.
[dpdk-dev] [RFC PATCH 1/6] librte_ether: add fields from rte_pci_driver to rte_eth_dev and rte_eth_dev_data.
On Tue, Sep 01, 2015 at 11:38:31AM +, Iremonger, Bernard wrote: > Hi THomas, > > > > > > @@ -424,7 +425,10 @@ rte_eth_dev_socket_id(uint8_t port_id) { > > > if (!rte_eth_dev_is_valid_port(port_id)) > > > return -1; > > > - return rte_eth_devices[port_id].pci_dev->numa_node; > > > + if (rte_eth_devices[port_id].dev_type == RTE_ETH_DEV_PCI) > > > + return rte_eth_devices[port_id].pci_dev->numa_node; > > > + else > > > + return rte_eth_devices[port_id].data->numa_node; > > > > Clearly not the way to go. > > We should remove the special cases (PCI, PDEV, VDEV) instead of adding > > more checks. > > The dev_type field is not new, just using it now to distinguish between PCI > and non PCI devices. > > I have moved some of the RTE_PCI_DRV flags to a new dev_flags field in struct > rte_eth_dev{}, > These flags are independent of the driver type (PCI or non PCI). > Do you have view on this new dev_flags field and macros? > > Regards, > > Bernard. > Just to give my 2c. The branch in the snippet above should not exist. Each PMD should set the data numa_node and the flags fields appropriately at initialization, either directly or by copying in the relevant data from the interface specific structure e.g. pci. The ethdev should never need to check the device type here, it should always just read data->numa_node. /Bruce
[dpdk-dev] [RFC PATCH 1/6] librte_ether: add fields from rte_pci_driver to rte_eth_dev and rte_eth_dev_data.
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Ananyev, Konstantin > Sent: Tuesday, September 1, 2015 1:37 PM > To: Iremonger, Bernard; Thomas Monjalon > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [RFC PATCH 1/6] librte_ether: add fields from > rte_pci_driver to rte_eth_dev and rte_eth_dev_data. > > > > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Iremonger, > > Bernard > > Sent: Tuesday, September 01, 2015 12:39 PM > > To: Thomas Monjalon > > Cc: dev at dpdk.org > > Subject: Re: [dpdk-dev] [RFC PATCH 1/6] librte_ether: add fields from > rte_pci_driver to rte_eth_dev and rte_eth_dev_data. > > > > Hi THomas, > > > > > > > > > > @@ -424,7 +425,10 @@ rte_eth_dev_socket_id(uint8_t port_id) { > > > > if (!rte_eth_dev_is_valid_port(port_id)) > > > > return -1; > > > > - return rte_eth_devices[port_id].pci_dev->numa_node; > > > > + if (rte_eth_devices[port_id].dev_type == RTE_ETH_DEV_PCI) > > > > + return rte_eth_devices[port_id].pci_dev->numa_node; > > > > + else > > > > + return rte_eth_devices[port_id].data->numa_node; > > > > > > Clearly not the way to go. > > > We should remove the special cases (PCI, PDEV, VDEV) instead of > > > adding more checks. > > > > The dev_type field is not new, just using it now to distinguish between > PCI and non PCI devices. > > > > I have moved some of the RTE_PCI_DRV flags to a new dev_flags field in > > struct rte_eth_dev{}, These flags are independent of the driver type > (PCI or non PCI). > > Do you have view on this new dev_flags field and macros? > > What looks strange here to me, I that we now we duplicate some fields > here? > Let say for PCI devices numa_node would be precent in pci_dev and in data, > right? > If there are some fields that are common for all device types (PCI, VDEV, > etc) why not to create some unified structure for them that would be used > by all device types and remove subsequent fields from pci_dev? > Or alternatively create a union of structs (one struct per device type)? > Then, as was pointed before, we wouldn't these branches by device_type at > all. > Konstantin > I wouldn't worry so much about the duplicated data, so long as the ethdev APIs only have to look for the data in a single place when necessary. [Some data may be naturally present in the pci_dev structure, for instance, and then be copied by the driver into the common ethdev structure. If however, that copy and duplication can be avoided, great!] /Bruce
[dpdk-dev] [RFC PATCH 1/6] librte_ether: add fields from rte_pci_driver to rte_eth_dev and rte_eth_dev_data.
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Iremonger, Bernard > Sent: Tuesday, September 01, 2015 12:39 PM > To: Thomas Monjalon > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [RFC PATCH 1/6] librte_ether: add fields from > rte_pci_driver to rte_eth_dev and rte_eth_dev_data. > > Hi THomas, > > > > > > @@ -424,7 +425,10 @@ rte_eth_dev_socket_id(uint8_t port_id) { > > > if (!rte_eth_dev_is_valid_port(port_id)) > > > return -1; > > > - return rte_eth_devices[port_id].pci_dev->numa_node; > > > + if (rte_eth_devices[port_id].dev_type == RTE_ETH_DEV_PCI) > > > + return rte_eth_devices[port_id].pci_dev->numa_node; > > > + else > > > + return rte_eth_devices[port_id].data->numa_node; > > > > Clearly not the way to go. > > We should remove the special cases (PCI, PDEV, VDEV) instead of adding > > more checks. > > The dev_type field is not new, just using it now to distinguish between PCI > and non PCI devices. > > I have moved some of the RTE_PCI_DRV flags to a new dev_flags field in struct > rte_eth_dev{}, > These flags are independent of the driver type (PCI or non PCI). > Do you have view on this new dev_flags field and macros? What looks strange here to me, I that we now we duplicate some fields here? Let say for PCI devices numa_node would be precent in pci_dev and in data, right? If there are some fields that are common for all device types (PCI, VDEV, etc) why not to create some unified structure for them that would be used by all device types and remove subsequent fields from pci_dev? Or alternatively create a union of structs (one struct per device type)? Then, as was pointed before, we wouldn't these branches by device_type at all. Konstantin > > Regards, > > Bernard. > >
[dpdk-dev] [RFC PATCH 1/6] librte_ether: add fields from rte_pci_driver to rte_eth_dev and rte_eth_dev_data.
Hi THomas, > > @@ -424,7 +425,10 @@ rte_eth_dev_socket_id(uint8_t port_id) { > > if (!rte_eth_dev_is_valid_port(port_id)) > > return -1; > > - return rte_eth_devices[port_id].pci_dev->numa_node; > > + if (rte_eth_devices[port_id].dev_type == RTE_ETH_DEV_PCI) > > + return rte_eth_devices[port_id].pci_dev->numa_node; > > + else > > + return rte_eth_devices[port_id].data->numa_node; > > Clearly not the way to go. > We should remove the special cases (PCI, PDEV, VDEV) instead of adding > more checks. The dev_type field is not new, just using it now to distinguish between PCI and non PCI devices. I have moved some of the RTE_PCI_DRV flags to a new dev_flags field in struct rte_eth_dev{}, These flags are independent of the driver type (PCI or non PCI). Do you have view on this new dev_flags field and macros? Regards, Bernard.
[dpdk-dev] [PATCH] e1000: implemented igb xstats
This patch implements the extended statistics API for the e1000 igb, adding xstats_get() and xstats_reset() functions. The implementation is similar to that of the ixgbe driver as merged in dpdk 2.1. Signed-off-by: Harry van Haaren --- drivers/net/e1000/igb_ethdev.c | 140 ++--- 1 file changed, 132 insertions(+), 8 deletions(-) diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index c7e6d55..cb71b29 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -96,9 +96,12 @@ static int eth_igb_link_update(struct rte_eth_dev *dev, int wait_to_complete); static void eth_igb_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats); +static int eth_igb_xstats_get(struct rte_eth_dev *dev, + struct rte_eth_xstats *xstats, unsigned n); static void eth_igb_stats_reset(struct rte_eth_dev *dev); +static void eth_igb_xstats_reset(struct rte_eth_dev *dev); static void eth_igb_infos_get(struct rte_eth_dev *dev, - struct rte_eth_dev_info *dev_info); + struct rte_eth_dev_info *dev_info); static void eth_igbvf_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info); static int eth_igb_flow_ctrl_get(struct rte_eth_dev *dev, @@ -296,7 +299,9 @@ static const struct eth_dev_ops eth_igb_ops = { .allmulticast_disable = eth_igb_allmulticast_disable, .link_update = eth_igb_link_update, .stats_get= eth_igb_stats_get, + .xstats_get = eth_igb_xstats_get, .stats_reset = eth_igb_stats_reset, + .xstats_reset = eth_igb_xstats_reset, .dev_infos_get= eth_igb_infos_get, .mtu_set = eth_igb_mtu_set, .vlan_filter_set = eth_igb_vlan_filter_set, @@ -360,6 +365,72 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = { .get_reg = igbvf_get_regs, }; +/* store statistics names and its offset in stats structure */ +struct rte_igb_xstats_name_off { + char name[RTE_ETH_XSTATS_NAME_SIZE]; + unsigned offset; +}; + +static const struct rte_igb_xstats_name_off rte_igb_stats_strings[] = { + {"rx_crc_errors", offsetof(struct e1000_hw_stats, crcerrs)}, + {"rx_align_errors", offsetof(struct e1000_hw_stats, algnerrc)}, + {"rx_symbol_errors", offsetof(struct e1000_hw_stats, symerrs)}, + {"rx_errors", offsetof(struct e1000_hw_stats, rxerrc)}, + {"rx_missed_packets", offsetof(struct e1000_hw_stats, mpc)}, + {"tx_single_collisions", offsetof(struct e1000_hw_stats, scc)}, + {"tx_excessive_collisions", offsetof(struct e1000_hw_stats, ecol)}, + {"tx_multiple_collisions", offsetof(struct e1000_hw_stats, mcc)}, + {"tx_late_collisions", offsetof(struct e1000_hw_stats, latecol)}, + {"tx_total_collisions", offsetof(struct e1000_hw_stats, colc)}, + {"tx_defers", offsetof(struct e1000_hw_stats, dc)}, + {"tx_with_no_carrier_sense", offsetof(struct e1000_hw_stats, tncrs)}, + {"rx_carrier_ext_errors", offsetof(struct e1000_hw_stats, cexterr)}, + {"rx_length_errors", offsetof(struct e1000_hw_stats, rlec)}, + {"rx_xon_packets", offsetof(struct e1000_hw_stats, xonrxc)}, + {"tx_xon_packets", offsetof(struct e1000_hw_stats, xontxc)}, + {"rx_xoff_packets", offsetof(struct e1000_hw_stats, xoffrxc)}, + {"tx_xoff_packets", offsetof(struct e1000_hw_stats, xofftxc)}, + {"rx_flow_control_unsupported", offsetof(struct e1000_hw_stats, fcruc)}, + {"rx_size_64", offsetof(struct e1000_hw_stats, prc64)}, + {"rx_size_65_to_127", offsetof(struct e1000_hw_stats, prc127)}, + {"rx_size_128_to_255", offsetof(struct e1000_hw_stats, prc255)}, + {"rx_size_256_to_511", offsetof(struct e1000_hw_stats, prc511)}, + {"rx_size_512_to_1023", offsetof(struct e1000_hw_stats, prc1023)}, + {"rx_size_1023_to_max", offsetof(struct e1000_hw_stats, prc1522)}, + {"rx_broadcast_packets", offsetof(struct e1000_hw_stats, bprc)}, + {"rx_multicast_packets", offsetof(struct e1000_hw_stats, mprc)}, + {"rx_good_packets", offsetof(struct e1000_hw_stats, gprc)}, + {"tx_good_packets", offsetof(struct e1000_hw_stats, gptc)}, + {"rx_good_bytes", offsetof(struct e1000_hw_stats, gorc)}, + {"tx_good_bytes", offsetof(struct e1000_hw_stats, gotc)}, + {"rx_no_buffer_errors", offsetof(struct e1000_hw_stats, rnbc)}, + {"rx_undersize_packets", offsetof(struct e1000_hw_stats, ruc)}, + {"rx_fragment_packets", offsetof(struct e1000_hw_stats, rfc)}, + {"rx_oversize_packets", offsetof(struct e1000_hw_stats, roc)}, + {"rx_jabber_packets", offsetof(struct e1000_hw_stats, rjc)}, + {"rx_management_packets", offsetof(struct e1000_hw_stats, mgprc)}, + {"
[dpdk-dev] Broken RSS hash computation on Intel 82574L
> On Sep 1, 2015, at 9:47 AM, Matthew Hall wrote: > > On Tue, Sep 01, 2015 at 04:37:18PM +0200, Martin Dra?ar wrote: >> Dne 1.9.2015 v 15:45 De Lara Guarch, Pablo napsal(a): >>> 82574L NIC uses em PMD, which does not support more than 1 queue. >>> Therefore RSS is disabled in the NIC and then you cannot have RSS hashes. >>> >>> Thanks, >>> Pablo >> >> Hi Pablo, >> >> that is an interesting information. I read the rationale in em_ethdev.c >> and I was wondering, what would have to be done to enable RSS hash >> computation on that card. I can live with just one RX queue, but hashes >> would help me a lot. The computer which is using those NICs is not that >> powerful and every bit of offloaded computation counts... >> >> Thanks, >> Martin > > RSS calculations are used to direct packets across multiple RX queues. With > only one RX queue it cannot possibly increase performance by enabling it. Well, there are other things you could use that hw-provided hash for? (but point-taken)
[dpdk-dev] Broken RSS hash computation on Intel 82574L
On Tue, Sep 01, 2015 at 04:37:18PM +0200, Martin Dra?ar wrote: > Dne 1.9.2015 v 15:45 De Lara Guarch, Pablo napsal(a): > > 82574L NIC uses em PMD, which does not support more than 1 queue. > > Therefore RSS is disabled in the NIC and then you cannot have RSS hashes. > > > > Thanks, > > Pablo > > Hi Pablo, > > that is an interesting information. I read the rationale in em_ethdev.c > and I was wondering, what would have to be done to enable RSS hash > computation on that card. I can live with just one RX queue, but hashes > would help me a lot. The computer which is using those NICs is not that > powerful and every bit of offloaded computation counts... > > Thanks, > Martin RSS calculations are used to direct packets across multiple RX queues. With only one RX queue it cannot possibly increase performance by enabling it. Matthew.
[dpdk-dev] [PATCH] ixgbe: fix LSC callback
Hi Shelton, > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Shelton Chia > Sent: Tuesday, September 1, 2015 2:22 PM > To: dev at dpdk.org > Cc: letaotor at gmail.com > Subject: [dpdk-dev] [PATCH] ixgbe: fix LSC callback > > add _rte_eth_dev_callback_process to call callback func Would you like to give more details about why we need this patch? Thanks. > > Signed-off-by: Shelton Chia > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index b8ee1e9..4e4c118 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -2775,6 +2775,8 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev) > > ixgbe_dev_link_status_print(dev); > > + __rte_eth_dev_callback_process(dev, > RTE_ETH_EVENT_INTR_LSC); > + > intr_enable_delay = true; > } > > -- > 2.5.0
[dpdk-dev] [PATCH v1] net: i40e: add VLAN tag size to RXMAX
> -Original Message- > From: Vlad Zolotarov [mailto:vladz at cloudius-systems.com] > Sent: Monday, August 31, 2015 2:42 PM > To: dev at dpdk.org > Cc: Zhang, Helin; Ananyev, Konstantin; avi at cloudius-systems.com; Vlad > Zolotarov > Subject: [dpdk-dev] [PATCH v1] net: i40e: add VLAN tag size to RXMAX > > HW requires it regardless the presence of the VLAN tag in the received frame. > Otherwise Rx frames are being filtered out on the MTU-4 boundary. Maximum packet length could have different meanings from MTU. I agree with you to have it be regardless of vlan tag length. > > Signed-off-by: Vlad Zolotarov > --- > drivers/net/i40e/i40e_rxtx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index > eae4ab0..22aaeb1 100644 > --- a/drivers/net/i40e/i40e_rxtx.c > +++ b/drivers/net/i40e/i40e_rxtx.c > @@ -3156,7 +3156,7 @@ i40e_rx_queue_init(struct i40e_rx_queue *rxq) > rx_ctx.hsplit_0 = I40E_HEADER_SPLIT_ALL; > else > rx_ctx.hsplit_0 = I40E_HEADER_SPLIT_NONE; > - rx_ctx.rxmax = rxq->max_pkt_len; > + rx_ctx.rxmax = rxq->max_pkt_len + I40E_VLAN_TAG_SIZE; It needs to take into account the double vlan case, and also VF case. It seems it needs more code changes. Thank you for the contribution! Regards, Helin > rx_ctx.tphrdesc_ena = 1; > rx_ctx.tphwdesc_ena = 1; > rx_ctx.tphdata_ena = 1; > -- > 2.1.0
[dpdk-dev] [RFC PATCH 5/8] lib/librte_vhost:dequeue vhost TSO offload
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Jijiang Liu > Sent: Monday, August 31, 2015 5:42 PM > To: dev at dpdk.org > Subject: [dpdk-dev] [RFC PATCH 5/8] lib/librte_vhost:dequeue vhost TSO > offload > > Dequeue vhost TSO offload > > Signed-off-by: Jijiang Liu > --- > lib/librte_vhost/vhost_rxtx.c | 29 - > 1 files changed, 28 insertions(+), 1 deletions(-) > > diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c > index 0d07338..9adfdb1 100644 > --- a/lib/librte_vhost/vhost_rxtx.c > +++ b/lib/librte_vhost/vhost_rxtx.c > @@ -545,6 +545,30 @@ rte_vhost_enqueue_burst(struct virtio_net *dev, > uint16_t queue_id, > return virtio_dev_rx(dev, queue_id, pkts, count); } > > +static inline void __attribute__((always_inline)) > +vhost_dequeue_offload(uint64_t addr, struct rte_mbuf *m) { > + struct virtio_net_hdr *hdr = > + (struct virtio_net_hdr *)((uintptr_t)addr); > + > + if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { > + switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) { > + case VIRTIO_NET_HDR_GSO_TCPV4: > + m->ol_flags |= (PKT_TX_IPV4 | PKT_TX_TCP_SEG); > + m->tso_segsz = hdr->gso_size; > + break; > + case VIRTIO_NET_HDR_GSO_TCPV6: > + m->ol_flags |= (PKT_TX_IPV6 | PKT_TX_TCP_SEG); > + m->tso_segsz = hdr->gso_size; > + break; > + default: > + RTE_LOG(ERR, VHOST_DATA, > + "bad gso type %u.\n", hdr->gso_type); > + break; Do we need special handling for the bad gso type? > + } > + } > +} > + > uint16_t > rte_vhost_dequeue_burst(struct virtio_net *dev, uint16_t queue_id, > struct rte_mempool *mbuf_pool, struct rte_mbuf **pkts, uint16_t > count) @@ -553,6 +577,7 @@ rte_vhost_dequeue_burst(struct virtio_net > *dev, uint16_t queue_id, > struct vhost_virtqueue *vq; > struct vring_desc *desc; > uint64_t vb_addr = 0; > + uint64_t vb_net_hdr_addr = 0; > uint32_t head[MAX_PKT_BURST]; > uint32_t used_idx; > uint32_t i; > @@ -604,6 +629,8 @@ rte_vhost_dequeue_burst(struct virtio_net *dev, > uint16_t queue_id, > > desc = &vq->desc[head[entry_success]]; > > + vb_net_hdr_addr = gpa_to_vva(dev, desc->addr); > + > /* Discard first buffer as it is the virtio header */ > if (desc->flags & VRING_DESC_F_NEXT) { > desc = &vq->desc[desc->next]; > @@ -742,7 +769,7 @@ rte_vhost_dequeue_burst(struct virtio_net *dev, > uint16_t queue_id, > break; > > m->nb_segs = seg_num; > - > + vhost_dequeue_offload(vb_net_hdr_addr, m); > pkts[entry_success] = m; > vq->last_used_idx++; > entry_success++; > -- > 1.7.7.6
[dpdk-dev] [RFC PATCH 4/8] driver/virtio:enqueue TSO offload
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Jijiang Liu > Sent: Monday, August 31, 2015 5:42 PM > To: dev at dpdk.org > Subject: [dpdk-dev] [RFC PATCH 4/8] driver/virtio:enqueue TSO offload > > Enqueue TSO4/6 offload. > > Signed-off-by: Jijiang Liu > --- > drivers/net/virtio/virtio_rxtx.c | 23 +++ > 1 files changed, 23 insertions(+), 0 deletions(-) > > diff --git a/drivers/net/virtio/virtio_rxtx.c > b/drivers/net/virtio/virtio_rxtx.c > index c5b53bb..4c2d838 100644 > --- a/drivers/net/virtio/virtio_rxtx.c > +++ b/drivers/net/virtio/virtio_rxtx.c > @@ -198,6 +198,28 @@ virtqueue_enqueue_recv_refill(struct virtqueue *vq, > struct rte_mbuf *cookie) > return 0; > } > > +static void > +virtqueue_enqueue_offload(struct virtqueue *txvq, struct rte_mbuf *m, > + uint16_t idx, uint16_t hdr_sz) > +{ > + struct virtio_net_hdr *hdr = (struct virtio_net_hdr *)(uintptr_t) > + (txvq->virtio_net_hdr_addr + idx * hdr_sz); > + > + if (m->tso_segsz != 0 && m->ol_flags & PKT_TX_TCP_SEG) { > + if (m->ol_flags & PKT_TX_IPV4) { > + if (!vtpci_with_feature(txvq->hw, > VIRTIO_NET_F_HOST_TSO4)) > + return; Do we need return error if host can't handle tso for the packet? > + hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV4; > + } else if (m->ol_flags & PKT_TX_IPV6) { > + if (!vtpci_with_feature(txvq->hw, > VIRTIO_NET_F_HOST_TSO6)) > + return; Same as above > + hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV6; > + } Do we need else branch for the case of neither tcpv4 nor tcpv6? > + hdr->gso_size = m->tso_segsz; > + hdr->hdr_len = m->l2_len + m->l3_len + m->l4_len; > + } > +} > + > static int > virtqueue_enqueue_xmit(struct virtqueue *txvq, struct rte_mbuf *cookie) > { @@ -221,6 +243,7 @@ virtqueue_enqueue_xmit(struct virtqueue *txvq, > struct rte_mbuf *cookie) > dxp->cookie = (void *)cookie; > dxp->ndescs = needed; > > + virtqueue_enqueue_offload(txvq, cookie, idx, head_size); If TSO is not enabled in the feature bit, how to resolve here? > start_dp = txvq->vq_ring.desc; > start_dp[idx].addr = > txvq->virtio_net_hdr_mem + idx * head_size; > -- > 1.7.7.6