* [dpdk-dev] [RFC] ethdev: remove all offload API
@ 2018-06-08 22:41 Ferruh Yigit
2018-06-08 21:52 ` Ferruh Yigit
` (2 more replies)
0 siblings, 3 replies; 25+ messages in thread
From: Ferruh Yigit @ 2018-06-08 22:41 UTC (permalink / raw)
To: Jerin Jacob, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger,
John McNamara, Marko Kovacevic, Neil Horman, Remy Horton,
Ori Kam, Bruce Richardson, Pablo de Lara, Radu Nicolau,
Akhil Goyal, Tomasz Kantecki, Harry van Haaren, Jijiang Liu,
Ravi Kumar, Konstantin Ananyev, Andrew Rybchenko,
Maxime Coquelin, Tiwei Bie, Yong Wang, Amr Mokhtar,
Declan Doherty, Chas Williams, David Hunt, Cristian Dumitrescu,
Anatoly Burakov, Reshma Pattan, Byron Marohn, Thomas Monjalon
Cc: dev, Ferruh Yigit, Shahaf Shuler
Cc: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-eventdev/test_perf_common.c | 6 --
app/test-eventdev/test_pipeline_common.c | 1 -
app/test-pmd/testpmd.c | 3 -
doc/guides/nics/features.rst | 1 -
doc/guides/prog_guide/poll_mode_drv.rst | 5 -
doc/guides/rel_notes/deprecation.rst | 9 --
doc/guides/sample_app_ug/flow_filtering.rst | 2 -
doc/guides/sample_app_ug/l2_forward_job_stats.rst | 4 -
.../sample_app_ug/l2_forward_real_virtual.rst | 4 -
doc/guides/sample_app_ug/link_status_intr.rst | 4 -
doc/guides/sample_app_ug/vmdq_dcb_forwarding.rst | 3 -
drivers/net/axgbe/axgbe_ethdev.c | 2 -
drivers/net/axgbe/axgbe_rxtx.c | 4 +-
drivers/net/ixgbe/ixgbe_rxtx.c | 2 +-
drivers/net/sfc/sfc_ethdev.c | 1 -
drivers/net/sfc/sfc_rx.c | 1 -
drivers/net/sfc/sfc_tx.c | 25 +----
drivers/net/virtio/virtio_ethdev.c | 3 -
drivers/net/vmxnet3/vmxnet3_ethdev.c | 1 -
examples/bbdev_app/main.c | 4 -
examples/bond/main.c | 3 -
examples/distributor/main.c | 2 -
examples/ethtool/ethtool-app/main.c | 2 -
examples/eventdev_pipeline/main.c | 2 -
examples/exception_path/main.c | 2 -
examples/flow_classify/flow_classify.c | 2 -
examples/flow_filtering/main.c | 1 -
examples/ip_fragmentation/main.c | 2 -
examples/ip_pipeline/link.c | 9 --
examples/ip_reassembly/main.c | 2 -
examples/ipsec-secgw/ipsec-secgw.c | 2 -
examples/ipv4_multicast/main.c | 2 -
examples/kni/main.c | 2 -
examples/l2fwd-crypto/main.c | 2 -
examples/l2fwd-jobstats/main.c | 2 -
examples/l2fwd-keepalive/main.c | 2 -
examples/l2fwd/main.c | 2 -
examples/l3fwd-acl/main.c | 2 -
examples/l3fwd-power/main.c | 2 -
examples/l3fwd-vf/main.c | 2 -
examples/l3fwd/main.c | 2 -
examples/link_status_interrupt/main.c | 2 -
examples/load_balancer/init.c | 2 -
examples/multi_process/l2fwd_fork/main.c | 2 -
examples/multi_process/symmetric_mp/main.c | 2 -
examples/netmap_compat/bridge/bridge.c | 1 -
examples/netmap_compat/lib/compat_netmap.c | 1 -
examples/packet_ordering/main.c | 7 +-
examples/performance-thread/l3fwd-thread/main.c | 2 -
examples/ptpclient/ptpclient.c | 2 -
examples/qos_meter/main.c | 3 -
examples/qos_sched/init.c | 2 -
examples/quota_watermark/qw/init.c | 2 -
examples/rxtx_callbacks/main.c | 2 -
examples/server_node_efd/server/init.c | 2 -
examples/skeleton/basicfwd.c | 2 -
examples/tep_termination/vxlan_setup.c | 2 -
examples/vhost/main.c | 2 -
examples/vm_power_manager/main.c | 2 -
examples/vmdq/main.c | 2 -
examples/vmdq_dcb/main.c | 2 -
lib/librte_ethdev/rte_ethdev.c | 115 ---------------------
lib/librte_ethdev/rte_ethdev.h | 59 +----------
test/test-pipeline/init.c | 4 -
test/test/test_kni.c | 4 -
test/test/test_link_bonding.c | 17 +--
test/test/test_link_bonding_mode4.c | 4 -
| 8 --
test/test/test_pmd_perf.c | 24 -----
69 files changed, 9 insertions(+), 404 deletions(-)
diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index d00f91802..9fe042ffe 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -680,13 +680,7 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt)
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.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 = 1,
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c
index 719518ff3..3bc9d513d 100644
--- a/app/test-eventdev/test_pipeline_common.c
+++ b/app/test-eventdev/test_pipeline_common.c
@@ -223,7 +223,6 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt)
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
- .ignore_offload_bitfield = 1,
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 35cf26674..cbf728fba 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -334,7 +334,6 @@ lcoreid_t latencystats_lcore_id = -1;
struct rte_eth_rxmode rx_mode = {
.max_rx_pkt_len = ETHER_MAX_LEN, /**< Default maximum frame length. */
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
- .ignore_offload_bitfield = 1,
};
struct rte_eth_txmode tx_mode = {
@@ -1645,8 +1644,6 @@ start_port(portid_t pid)
port->need_reconfig_queues = 0;
/* setup tx queues */
for (qi = 0; qi < nb_txq; qi++) {
- port->tx_conf[qi].txq_flags =
- ETH_TXQ_FLAGS_IGNORE;
if ((numa_support) &&
(txring_numa[pi] != NUMA_NO_CONFIG))
diag = rte_eth_tx_queue_setup(pi, qi,
diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index ee89d6bfa..902ac160d 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -577,7 +577,6 @@ Supports L4 checksum offload.
* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_UDP_CKSUM,DEV_RX_OFFLOAD_TCP_CKSUM``.
* **[uses] rte_eth_txconf,rte_eth_txmode**: ``offloads:DEV_TX_OFFLOAD_UDP_CKSUM,DEV_TX_OFFLOAD_TCP_CKSUM,DEV_TX_OFFLOAD_SCTP_CKSUM``.
-* **[uses] user config**: ``dev_conf.rxmode.hw_ip_checksum``.
* **[uses] mbuf**: ``mbuf.ol_flags:PKT_TX_IPV4`` | ``PKT_TX_IPV6``,
``mbuf.ol_flags:PKT_TX_L4_NO_CKSUM`` | ``PKT_TX_TCP_CKSUM`` |
``PKT_TX_SCTP_CKSUM`` | ``PKT_TX_UDP_CKSUM``.
diff --git a/doc/guides/prog_guide/poll_mode_drv.rst b/doc/guides/prog_guide/poll_mode_drv.rst
index af82352a0..4b69f6cbe 100644
--- a/doc/guides/prog_guide/poll_mode_drv.rst
+++ b/doc/guides/prog_guide/poll_mode_drv.rst
@@ -328,11 +328,6 @@ A newly added offloads in ``[rt]x_conf->offloads`` to ``rte_eth_[rt]x_queue_setu
is the one which hasn't been enabled in ``rte_eth_dev_configure()`` and is requested to be enabled
in ``rte_eth_[rt]x_queue_setup()``. It must be per-queue type, otherwise trigger an error log.
-For an application to use the Tx offloads API it should set the ``ETH_TXQ_FLAGS_IGNORE`` flag in the ``txq_flags`` field located in ``rte_eth_txconf`` struct.
-In such cases it is not required to set other flags in ``txq_flags``.
-For an application to use the Rx offloads API it should set the ``ignore_offload_bitfield`` bit in the ``rte_eth_rxmode`` struct.
-In such cases it is not required to set other bitfield offloads in the ``rxmode`` struct.
-
Poll Mode Driver API
--------------------
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692eac..bc2cc2756 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -58,15 +58,6 @@ Deprecation Notices
experimental API ``rte_pktmbuf_attach_extbuf()`` is used. Removal of the macro
is to fix this semantic inconsistency.
-* ethdev: a new Tx and Rx offload API was introduced on 17.11.
- In the new API, offloads are divided into per-port and per-queue offloads.
- Offloads are disabled by default and enabled per application request.
-
- In later releases the old offloading API will be deprecated, which will include:
- - removal of ``ETH_TXQ_FLAGS_NO*`` flags.
- - removal of ``txq_flags`` field from ``rte_eth_txconf`` struct.
- - removal of the offloads bit-field from ``rte_eth_rxmode`` struct.
-
* ethdev: A new offloading flag ``DEV_RX_OFFLOAD_KEEP_CRC`` will be added in v18.08,
This will replace the usage of not setting ``DEV_RX_OFFLOAD_CRC_STRIP`` flag
and will be implemented in PMDs accordingly.
diff --git a/doc/guides/sample_app_ug/flow_filtering.rst b/doc/guides/sample_app_ug/flow_filtering.rst
index bbf8af0e6..bd0ae1e2f 100644
--- a/doc/guides/sample_app_ug/flow_filtering.rst
+++ b/doc/guides/sample_app_ug/flow_filtering.rst
@@ -139,7 +139,6 @@ application is shown below:
struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -216,7 +215,6 @@ The Ethernet port is configured with default settings using the
struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
diff --git a/doc/guides/sample_app_ug/l2_forward_job_stats.rst b/doc/guides/sample_app_ug/l2_forward_job_stats.rst
index d7219a293..f65e93450 100644
--- a/doc/guides/sample_app_ug/l2_forward_job_stats.rst
+++ b/doc/guides/sample_app_ug/l2_forward_job_stats.rst
@@ -225,11 +225,7 @@ The global configuration is stored in a static structure:
static const struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload disabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc= 0, /**< CRC stripped by hardware */
},
.txmode = {
diff --git a/doc/guides/sample_app_ug/l2_forward_real_virtual.rst b/doc/guides/sample_app_ug/l2_forward_real_virtual.rst
index b459d4efe..ea548ca29 100644
--- a/doc/guides/sample_app_ug/l2_forward_real_virtual.rst
+++ b/doc/guides/sample_app_ug/l2_forward_real_virtual.rst
@@ -252,11 +252,7 @@ The global configuration is stored in a static structure:
static const struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload disabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc= 0, /**< CRC stripped by hardware */
},
.txmode = {
diff --git a/doc/guides/sample_app_ug/link_status_intr.rst b/doc/guides/sample_app_ug/link_status_intr.rst
index 8c11ba4ae..695c088e8 100644
--- a/doc/guides/sample_app_ug/link_status_intr.rst
+++ b/doc/guides/sample_app_ug/link_status_intr.rst
@@ -137,10 +137,6 @@ The global configuration is stored in a static structure:
static const struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload disabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
- .hw_strip_crc= 0, /**< CRC stripped by hardware */
},
.txmode = {},
.intr_conf = {
diff --git a/doc/guides/sample_app_ug/vmdq_dcb_forwarding.rst b/doc/guides/sample_app_ug/vmdq_dcb_forwarding.rst
index 83fcdf637..1cd7c837f 100644
--- a/doc/guides/sample_app_ug/vmdq_dcb_forwarding.rst
+++ b/doc/guides/sample_app_ug/vmdq_dcb_forwarding.rst
@@ -102,9 +102,6 @@ a default structure is provided for VMDQ and DCB configuration to be filled in l
.rxmode = {
.mq_mode = ETH_MQ_RX_VMDQ_DCB,
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload disabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
},
.txmode = {
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 7a3ba2e7b..49bc6b1ac 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -385,8 +385,6 @@ axgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->default_txconf = (struct rte_eth_txconf) {
.tx_free_thresh = AXGBE_TX_FREE_THRESH,
- .txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS |
- ETH_TXQ_FLAGS_NOOFFLOADS,
};
}
diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index b302bdd1f..0876299e6 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -369,10 +369,8 @@ int axgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
if (txq->nb_desc % txq->free_thresh != 0)
txq->vector_disable = 1;
- if ((tx_conf->txq_flags & (uint32_t)ETH_TXQ_FLAGS_NOOFFLOADS) !=
- ETH_TXQ_FLAGS_NOOFFLOADS) {
+ if (tx_conf->offloads != 0)
txq->vector_disable = 1;
- }
/* Allocate TX ring hardware descriptors */
tsize = txq->nb_desc * sizeof(struct axgbe_tx_desc);
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 3e13d26ae..f058b880a 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -1420,7 +1420,7 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status, uint64_t vlan_flags)
/*
* Check if VLAN present only.
* Do not check whether L3/L4 rx checksum done by NIC or not,
- * That can be found from rte_eth_rxmode.hw_ip_checksum flag
+ * That can be found from rte_eth_rxmode.offloads flag
*/
pkt_flags = (rx_status & IXGBE_RXD_STAT_VP) ? vlan_flags : 0;
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 1b6499f85..ee8ae5b9f 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -1089,7 +1089,6 @@ sfc_tx_queue_info_get(struct rte_eth_dev *dev, uint16_t tx_queue_id,
memset(qinfo, 0, sizeof(*qinfo));
- qinfo->conf.txq_flags = txq_info->txq->flags;
qinfo->conf.offloads = txq_info->txq->offloads;
qinfo->conf.tx_free_thresh = txq_info->txq->free_thresh;
qinfo->conf.tx_deferred_start = txq_info->deferred_start;
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index cc76a5b15..58a0df583 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -1446,7 +1446,6 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode)
if (~rxmode->offloads & DEV_RX_OFFLOAD_CRC_STRIP) {
sfc_warn(sa, "FCS stripping cannot be disabled - always on");
rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
- rxmode->hw_strip_crc = 1;
}
return rc;
diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
index 1bcc2c697..6d42a1a65 100644
--- a/drivers/net/sfc/sfc_tx.c
+++ b/drivers/net/sfc/sfc_tx.c
@@ -171,7 +171,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
txq->free_thresh =
(tx_conf->tx_free_thresh) ? tx_conf->tx_free_thresh :
SFC_TX_DEFAULT_FREE_THRESH;
- txq->flags = tx_conf->txq_flags;
txq->offloads = offloads;
rc = sfc_dma_alloc(sa, "txq", sw_index, EFX_TXQ_SIZE(txq_info->entries),
@@ -182,7 +181,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
memset(&info, 0, sizeof(info));
info.max_fill_level = txq_max_fill_level;
info.free_thresh = txq->free_thresh;
- info.flags = tx_conf->txq_flags;
info.offloads = offloads;
info.txq_entries = txq_info->entries;
info.dma_desc_size_max = encp->enc_tx_dma_desc_size_max;
@@ -431,18 +429,10 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
if (rc != 0)
goto fail_ev_qstart;
- /*
- * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a legacy
- * application which expects that IPv4 checksum offload is enabled
- * all the time as there is no legacy flag to turn off the offload.
- */
- if ((txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) ||
- (~txq->flags & ETH_TXQ_FLAGS_IGNORE))
+ if (txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)
flags |= EFX_TXQ_CKSUM_IPV4;
- if ((txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
- ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
- (offloads_supported & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)))
+ if (txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
flags |= EFX_TXQ_CKSUM_INNER_IPV4;
if ((txq->offloads & DEV_TX_OFFLOAD_TCP_CKSUM) ||
@@ -453,16 +443,7 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
flags |= EFX_TXQ_CKSUM_INNER_TCPUDP;
}
- /*
- * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a legacy
- * application. In turn, the absence of ETH_TXQ_FLAGS_NOXSUMTCP is
- * associated specifically with a legacy application which expects
- * both TCP checksum offload and TSO to be enabled because the legacy
- * API does not provide a dedicated mechanism to control TSO.
- */
- if ((txq->offloads & DEV_TX_OFFLOAD_TCP_TSO) ||
- ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
- (~txq->flags & ETH_TXQ_FLAGS_NOXSUMTCP)))
+ if (txq->offloads & DEV_TX_OFFLOAD_TCP_TSO)
flags |= EFX_TXQ_FATSOV2;
rc = efx_tx_qcreate(sa->nic, sw_index, 0, &txq->mem,
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index df50a571a..f9eb88c17 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2122,9 +2122,6 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->min_rx_bufsize = VIRTIO_MIN_RX_BUFSIZE;
dev_info->max_rx_pktlen = VIRTIO_MAX_RX_PKTLEN;
dev_info->max_mac_addrs = VIRTIO_MAX_MAC_ADDRS;
- dev_info->default_txconf = (struct rte_eth_txconf) {
- .txq_flags = ETH_TXQ_FLAGS_NOOFFLOADS
- };
host_features = VTPCI_OPS(hw)->get_features(hw);
dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index ba932ff27..efe070ff6 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1053,7 +1053,6 @@ vmxnet3_dev_info_get(struct rte_eth_dev *dev __rte_unused,
dev_info->speed_capa = ETH_LINK_SPEED_10G;
dev_info->max_mac_addrs = VMXNET3_MAX_MAC_ADDRS;
- dev_info->default_txconf.txq_flags = ETH_TXQ_FLAGS_NOXSUMSCTP;
dev_info->flow_type_rss_offloads = VMXNET3_RSS_OFFLOAD_ALL;
dev_info->rx_desc_lim = (struct rte_eth_desc_lim) {
diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index 254cc0676..bc7430e95 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -64,11 +64,7 @@ static const struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_NONE,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload disabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 0, /**< CRC stripped by hardware */
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 65e0edd25..98415d66d 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -122,7 +122,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_NONE,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.rx_adv_conf = {
@@ -177,7 +176,6 @@ slave_port_init(uint16_t portid, struct rte_mempool *mbuf_pool)
/* TX setup */
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
retval = rte_eth_tx_queue_setup(portid, 0, nb_txd,
rte_eth_dev_socket_id(portid), &txq_conf);
@@ -246,7 +244,6 @@ bond_port_init(struct rte_mempool *mbuf_pool)
/* TX setup */
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
retval = rte_eth_tx_queue_setup(BOND_PORT, 0, nb_txd,
rte_eth_dev_socket_id(BOND_PORT), &txq_conf);
diff --git a/examples/distributor/main.c b/examples/distributor/main.c
index 2c5936489..85881a2e8 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -80,7 +80,6 @@ static const struct rte_eth_conf port_conf_default = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
- .ignore_offload_bitfield = 1,
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
@@ -141,7 +140,6 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
}
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf.offloads = port_conf.txmode.offloads;
for (q = 0; q < txRings; q++) {
retval = rte_eth_tx_queue_setup(port, q, nb_txd,
diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c
index c1815bb94..dc93adfe3 100644
--- a/examples/ethtool/ethtool-app/main.c
+++ b/examples/ethtool/ethtool-app/main.c
@@ -99,7 +99,6 @@ static void setup_ports(struct app_config *app_cfg, int cnt_ports)
memset(&cfg_port, 0, sizeof(cfg_port));
cfg_port.txmode.mq_mode = ETH_MQ_TX_NONE;
- cfg_port.rxmode.ignore_offload_bitfield = 1;
for (idx_port = 0; idx_port < cnt_ports; idx_port++) {
struct app_port *ptr_port = &app_cfg->ports[idx_port];
@@ -142,7 +141,6 @@ static void setup_ports(struct app_config *app_cfg, int cnt_ports)
"rte_eth_rx_queue_setup failed"
);
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
if (rte_eth_tx_queue_setup(
idx_port, 0, nb_txd,
rte_eth_dev_socket_id(idx_port), &txconf) < 0)
diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index b698e4ca2..7bc294946 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -267,7 +267,6 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
- .ignore_offload_bitfield = 1,
},
.rx_adv_conf = {
.rss_conf = {
@@ -307,7 +306,6 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
}
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf.offloads = port_conf_default.txmode.offloads;
/* Allocate and set up 1 TX queue per Ethernet port. */
for (q = 0; q < tx_rings; q++) {
diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index 2b381a5d8..0b59f6b3f 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -88,7 +88,6 @@
/* Options for configuring ethernet port */
static struct rte_eth_conf port_conf = {
.rxmode = {
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -457,7 +456,6 @@ init_port(uint16_t port)
port, ret);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(port, 0, nb_txd,
rte_eth_dev_socket_id(port),
diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c
index 6412fe440..199612926 100644
--- a/examples/flow_classify/flow_classify.c
+++ b/examples/flow_classify/flow_classify.c
@@ -62,7 +62,6 @@ const char cb_port_delim[] = ":";
static const struct rte_eth_conf port_conf_default = {
.rxmode = {
.max_rx_pkt_len = ETHER_MAX_LEN,
- .ignore_offload_bitfield = 1,
},
};
@@ -222,7 +221,6 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
}
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf.offloads = port_conf.txmode.offloads;
/* Allocate and set up 1 TX queue per Ethernet port. */
for (q = 0; q < tx_rings; q++) {
diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index e0ee51679..f59503439 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -121,7 +121,6 @@ init_port(void)
struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 8952ea456..5306d7672 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -140,7 +140,6 @@ static struct rte_eth_conf port_conf = {
.rxmode = {
.max_rx_pkt_len = JUMBO_FRAME_MAX_SIZE,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
DEV_RX_OFFLOAD_JUMBO_FRAME |
DEV_RX_OFFLOAD_CRC_STRIP),
@@ -973,7 +972,6 @@ main(int argc, char **argv)
fflush(stdout);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd,
socket, txconf);
diff --git a/examples/ip_pipeline/link.c b/examples/ip_pipeline/link.c
index b8a431f3e..4fb156a48 100644
--- a/examples/ip_pipeline/link.c
+++ b/examples/ip_pipeline/link.c
@@ -40,16 +40,7 @@ static struct rte_eth_conf port_conf_default = {
.link_speeds = 0,
.rxmode = {
.mq_mode = ETH_MQ_RX_NONE,
-
- .header_split = 0, /* Header split */
- .hw_ip_checksum = 0, /* IP checksum offload */
- .hw_vlan_filter = 0, /* VLAN filtering */
- .hw_vlan_strip = 0, /* VLAN strip */
- .hw_vlan_extend = 0, /* Extended VLAN */
.jumbo_frame = 0, /* Jumbo frame support */
- .hw_strip_crc = 1, /* CRC strip by HW */
- .enable_scatter = 0, /* Scattered packets RX handler */
-
.max_rx_pkt_len = 9000, /* Jumbo frame max packet len */
.split_hdr_size = 0, /* Header split buffer size */
},
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 3e8e79c21..94e63fc6a 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -164,7 +164,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = JUMBO_FRAME_MAX_SIZE,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
DEV_RX_OFFLOAD_JUMBO_FRAME |
DEV_RX_OFFLOAD_CRC_STRIP),
@@ -1121,7 +1120,6 @@ main(int argc, char **argv)
fflush(stdout);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd,
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index a5da8b280..199bae51b 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -199,7 +199,6 @@ static struct rte_eth_conf port_conf = {
.split_hdr_size = 0,
.offloads = DEV_RX_OFFLOAD_CHECKSUM |
DEV_RX_OFFLOAD_CRC_STRIP,
- .ignore_offload_bitfield = 1,
},
.rx_adv_conf = {
.rss_conf = {
@@ -1592,7 +1591,6 @@ port_init(uint16_t portid)
printf("Setup txq=%u,%d,%d\n", lcore_id, tx_queueid, socket_id);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, tx_queueid, nb_txd,
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index ad2072f41..331c32e71 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -109,7 +109,6 @@ static struct rte_eth_conf port_conf = {
.rxmode = {
.max_rx_pkt_len = JUMBO_FRAME_MAX_SIZE,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_JUMBO_FRAME |
DEV_RX_OFFLOAD_CRC_STRIP),
},
@@ -764,7 +763,6 @@ main(int argc, char **argv)
fflush(stdout);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd,
rte_lcore_to_socket_id(lcore_id), txconf);
diff --git a/examples/kni/main.c b/examples/kni/main.c
index 4b162debb..81336087d 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -95,7 +95,6 @@ static struct kni_port_params *kni_port_params_array[RTE_MAX_ETHPORTS];
/* Options for configuring ethernet port */
static struct rte_eth_conf port_conf = {
.rxmode = {
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -607,7 +606,6 @@ init_port(uint16_t port)
"port%u (%d)\n", (unsigned)port, ret);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(port, 0, nb_txd,
rte_eth_dev_socket_id(port), &txq_conf);
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 4bca87b19..1b5587968 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -211,7 +211,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_NONE,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -2371,7 +2370,6 @@ initialize_ports(struct l2fwd_crypto_options *options)
/* init one TX queue on each port */
fflush(stdout);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
retval = rte_eth_tx_queue_setup(portid, 0, nb_txd,
rte_eth_dev_socket_id(portid),
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index 34553faa2..af5423382 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -90,7 +90,6 @@ struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -876,7 +875,6 @@ main(int argc, char **argv)
/* init one TX queue on each port */
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
fflush(stdout);
ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index a18b707cd..2d8b4d1c6 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -81,7 +81,6 @@ struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -671,7 +670,6 @@ main(int argc, char **argv)
/* init one TX queue on each port */
fflush(stdout);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
rte_eth_dev_socket_id(portid),
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 690843578..9bb4c5bc4 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -82,7 +82,6 @@ static struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -670,7 +669,6 @@ main(int argc, char **argv)
/* init one TX queue on each port */
fflush(stdout);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
rte_eth_dev_socket_id(portid),
diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index 33ad467d3..55a5a69e5 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -127,7 +127,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
DEV_RX_OFFLOAD_CHECKSUM),
},
@@ -1982,7 +1981,6 @@ main(int argc, char **argv)
rte_eth_dev_info_get(portid, &dev_info);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd,
socketid, txconf);
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 596d64548..710b76d12 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -184,7 +184,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
DEV_RX_OFFLOAD_CHECKSUM),
},
@@ -1750,7 +1749,6 @@ main(int argc, char **argv)
fflush(stdout);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd,
socketid, txconf);
diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c
index aaafb7bc2..43e629828 100644
--- a/examples/l3fwd-vf/main.c
+++ b/examples/l3fwd-vf/main.c
@@ -161,7 +161,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
DEV_RX_OFFLOAD_CHECKSUM),
},
@@ -1009,7 +1008,6 @@ main(int argc, char **argv)
fflush(stdout);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
socketid, txconf);
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index bf7dbd814..faef9f1ac 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -120,7 +120,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
DEV_RX_OFFLOAD_CHECKSUM),
},
@@ -909,7 +908,6 @@ main(int argc, char **argv)
fflush(stdout);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd,
socketid, txconf);
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index f56895680..3b732076b 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -79,7 +79,6 @@ struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -653,7 +652,6 @@ main(int argc, char **argv)
/* init one TX queue logical core on each port */
fflush(stdout);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
rte_eth_dev_socket_id(portid),
diff --git a/examples/load_balancer/init.c b/examples/load_balancer/init.c
index 8d8dbe61e..6aa079c69 100644
--- a/examples/load_balancer/init.c
+++ b/examples/load_balancer/init.c
@@ -45,7 +45,6 @@ static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
DEV_RX_OFFLOAD_CRC_STRIP),
},
@@ -466,7 +465,6 @@ app_init_nics(void)
}
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
/* Init TX queues */
if (app.nic_tx_port_mask[port] == 1) {
diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c
index 94318ab61..20a6a3d87 100644
--- a/examples/multi_process/l2fwd_fork/main.c
+++ b/examples/multi_process/l2fwd_fork/main.c
@@ -127,7 +127,6 @@ struct cpu_aff_arg{
static const struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -1073,7 +1072,6 @@ main(int argc, char **argv)
/* init one TX queue on each port */
fflush(stdout);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.tx_offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
rte_eth_dev_socket_id(portid),
diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c
index 16f21a187..c36326917 100644
--- a/examples/multi_process/symmetric_mp/main.c
+++ b/examples/multi_process/symmetric_mp/main.c
@@ -178,7 +178,6 @@ smp_port_init(uint16_t port, struct rte_mempool *mbuf_pool,
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
DEV_RX_OFFLOAD_CRC_STRIP),
},
@@ -236,7 +235,6 @@ smp_port_init(uint16_t port, struct rte_mempool *mbuf_pool,
}
txq_conf = info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = port_conf.txmode.offloads;
for (q = 0; q < tx_rings; q ++) {
retval = rte_eth_tx_queue_setup(port, q, nb_txd,
diff --git a/examples/netmap_compat/bridge/bridge.c b/examples/netmap_compat/bridge/bridge.c
index cb1882e65..7afca28cd 100644
--- a/examples/netmap_compat/bridge/bridge.c
+++ b/examples/netmap_compat/bridge/bridge.c
@@ -26,7 +26,6 @@
struct rte_eth_conf eth_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
diff --git a/examples/netmap_compat/lib/compat_netmap.c b/examples/netmap_compat/lib/compat_netmap.c
index af3dd223f..0be0663ed 100644
--- a/examples/netmap_compat/lib/compat_netmap.c
+++ b/examples/netmap_compat/lib/compat_netmap.c
@@ -708,7 +708,6 @@ rte_netmap_init_port(uint16_t portid, const struct rte_netmap_port_conf *conf)
rxq_conf = dev_info.default_rxconf;
rxq_conf.offloads = conf->eth_conf->rxmode.offloads;
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = conf->eth_conf->txmode.offloads;
for (i = 0; i < conf->nr_tx_rings; i++) {
ret = rte_eth_tx_queue_setup(portid, i, tx_slots,
diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index 7ace7d10e..149bfdd02 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -35,11 +35,7 @@ volatile uint8_t quit_signal;
static struct rte_mempool *mbuf_pool;
-static struct rte_eth_conf port_conf_default = {
- .rxmode = {
- .ignore_offload_bitfield = 1,
- },
-};
+static struct rte_eth_conf port_conf_default;
struct worker_thread_args {
struct rte_ring *ring_in;
@@ -293,7 +289,6 @@ configure_eth_port(uint16_t port_id)
}
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf.offloads = port_conf.txmode.offloads;
for (q = 0; q < txRings; q++) {
ret = rte_eth_tx_queue_setup(port_id, q, nb_txd,
diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 40d807239..d1e4a1880 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -306,7 +306,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
DEV_RX_OFFLOAD_CRC_STRIP),
},
@@ -3597,7 +3596,6 @@ main(int argc, char **argv)
fflush(stdout);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd,
socketid, txconf);
diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index c44013bc1..775a280a7 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -50,7 +50,6 @@ static uint8_t ptp_enabled_ports[RTE_MAX_ETHPORTS];
static const struct rte_eth_conf port_conf_default = {
.rxmode = {
.max_rx_pkt_len = ETHER_MAX_LEN,
- .ignore_offload_bitfield = 1,
},
};
@@ -221,7 +220,6 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
struct rte_eth_txconf *txconf;
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = port_conf.txmode.offloads;
retval = rte_eth_tx_queue_setup(port, q, nb_txd,
diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c
index 42cf4b29f..ca0e9e863 100644
--- a/examples/qos_meter/main.c
+++ b/examples/qos_meter/main.c
@@ -56,7 +56,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
DEV_RX_OFFLOAD_CRC_STRIP),
},
@@ -351,7 +350,6 @@ main(int argc, char **argv)
rte_exit(EXIT_FAILURE, "Port %d RX queue setup error (%d)\n", port_rx, ret);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(port_rx, NIC_TX_QUEUE, nb_txd,
rte_eth_dev_socket_id(port_rx),
@@ -383,7 +381,6 @@ main(int argc, char **argv)
rte_exit(EXIT_FAILURE, "Port %d RX queue setup error (%d)\n", port_tx, ret);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(port_tx, NIC_TX_QUEUE, nb_txd,
rte_eth_dev_socket_id(port_tx),
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index c9e487975..94cbb26f8 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -59,7 +59,6 @@ static struct rte_eth_conf port_conf = {
.rxmode = {
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -96,7 +95,6 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
tx_conf.tx_free_thresh = 0;
tx_conf.tx_rs_thresh = 0;
tx_conf.tx_deferred_start = 0;
- tx_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
/* init port */
RTE_LOG(INFO, APP, "Initializing port %"PRIu16"... ", portid);
diff --git a/examples/quota_watermark/qw/init.c b/examples/quota_watermark/qw/init.c
index 00725bc95..19164385a 100644
--- a/examples/quota_watermark/qw/init.c
+++ b/examples/quota_watermark/qw/init.c
@@ -24,7 +24,6 @@
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -82,7 +81,6 @@ void configure_eth_port(uint16_t port_id)
/* Initialize the port's TX queue */
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(port_id, 0, nb_txd,
rte_eth_dev_socket_id(port_id),
diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
index e63ea288f..2058be627 100644
--- a/examples/rxtx_callbacks/main.c
+++ b/examples/rxtx_callbacks/main.c
@@ -20,7 +20,6 @@
static const struct rte_eth_conf port_conf_default = {
.rxmode = {
.max_rx_pkt_len = ETHER_MAX_LEN,
- .ignore_offload_bitfield = 1,
},
};
@@ -104,7 +103,6 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
}
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf.offloads = port_conf.txmode.offloads;
for (q = 0; q < tx_rings; q++) {
retval = rte_eth_tx_queue_setup(port, q, nb_txd,
diff --git a/examples/server_node_efd/server/init.c b/examples/server_node_efd/server/init.c
index 7dfe2fa23..af5a18e28 100644
--- a/examples/server_node_efd/server/init.c
+++ b/examples/server_node_efd/server/init.c
@@ -97,7 +97,6 @@ init_port(uint16_t port_num)
struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
- .ignore_offload_bitfield = 1,
},
};
const uint16_t rx_rings = 1, tx_rings = num_nodes;
@@ -139,7 +138,6 @@ init_port(uint16_t port_num)
}
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf.offloads = port_conf.txmode.offloads;
for (q = 0; q < tx_rings; q++) {
retval = rte_eth_tx_queue_setup(port_num, q, tx_ring_size,
diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c
index 03bc35856..4aba1dc38 100644
--- a/examples/skeleton/basicfwd.c
+++ b/examples/skeleton/basicfwd.c
@@ -20,7 +20,6 @@
static const struct rte_eth_conf port_conf_default = {
.rxmode = {
.max_rx_pkt_len = ETHER_MAX_LEN,
- .ignore_offload_bitfield = 1,
},
};
@@ -68,7 +67,6 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
}
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf.offloads = port_conf.txmode.offloads;
/* Allocate and set up 1 TX queue per Ethernet port. */
for (q = 0; q < tx_rings; q++) {
diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c
index 299c29d27..b99ab97d3 100644
--- a/examples/tep_termination/vxlan_setup.c
+++ b/examples/tep_termination/vxlan_setup.c
@@ -69,7 +69,6 @@ uint8_t tep_filter_type[] = {RTE_TUNNEL_FILTER_IMAC_TENID,
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -131,7 +130,6 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool)
rxconf = &dev_info.default_rxconf;
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
if (!rte_eth_dev_is_valid_port(port))
return -1;
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 1659ef315..2175c1186 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -116,7 +116,6 @@ static struct rte_eth_conf vmdq_conf_default = {
.rxmode = {
.mq_mode = ETH_MQ_RX_VMDQ_ONLY,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
/*
* VLAN strip is necessary for 1G NIC such as I350,
* this fixes bug of ipv4 forwarding in guest can't
@@ -256,7 +255,6 @@ port_init(uint16_t port)
rxconf = &dev_info.default_rxconf;
txconf = &dev_info.default_txconf;
rxconf->rx_drop_en = 1;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
/*configure the number of supported virtio devices based on VMDQ limits */
num_devices = dev_info.max_vmdq_pools;
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index c9805a461..8911f2659 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -47,7 +47,6 @@ static volatile bool force_quit;
static const struct rte_eth_conf port_conf_default = {
.rxmode = {
.max_rx_pkt_len = ETHER_MAX_LEN,
- .ignore_offload_bitfield = 1,
},
};
@@ -83,7 +82,6 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
}
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = port_conf.txmode.offloads;
/* Allocate and set up 1 TX queue per Ethernet port. */
for (q = 0; q < tx_rings; q++) {
diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 52596dd5e..627a5da48 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -65,7 +65,6 @@ static const struct rte_eth_conf vmdq_conf_default = {
.rxmode = {
.mq_mode = ETH_MQ_RX_VMDQ_ONLY,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
},
.txmode = {
@@ -237,7 +236,6 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
rxconf = &dev_info.default_rxconf;
rxconf->rx_drop_en = 1;
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = port_conf.txmode.offloads;
for (q = 0; q < rxRings; q++) {
retval = rte_eth_rx_queue_setup(port, q, rxRingSize,
diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c
index 2626a2f19..5a0463c58 100644
--- a/examples/vmdq_dcb/main.c
+++ b/examples/vmdq_dcb/main.c
@@ -71,7 +71,6 @@ static const struct rte_eth_conf vmdq_dcb_conf_default = {
.rxmode = {
.mq_mode = ETH_MQ_RX_VMDQ_DCB,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
},
.txmode = {
.mq_mode = ETH_MQ_TX_VMDQ_DCB,
@@ -290,7 +289,6 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
}
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = port_conf.txmode.offloads;
for (q = 0; q < num_queues; q++) {
retval = rte_eth_tx_queue_setup(port, q, txRingSize,
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index cd4bfd3c6..0c38b23e1 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -970,41 +970,6 @@ rte_eth_speed_bitflag(uint32_t speed, int duplex)
}
}
-/**
- * A conversion function from rxmode bitfield API.
- */
-static void
-rte_eth_convert_rx_offload_bitfield(const struct rte_eth_rxmode *rxmode,
- uint64_t *rx_offloads)
-{
- uint64_t offloads = 0;
-
- if (rxmode->header_split == 1)
- offloads |= DEV_RX_OFFLOAD_HEADER_SPLIT;
- if (rxmode->hw_ip_checksum == 1)
- offloads |= DEV_RX_OFFLOAD_CHECKSUM;
- if (rxmode->hw_vlan_filter == 1)
- offloads |= DEV_RX_OFFLOAD_VLAN_FILTER;
- if (rxmode->hw_vlan_strip == 1)
- offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
- if (rxmode->hw_vlan_extend == 1)
- offloads |= DEV_RX_OFFLOAD_VLAN_EXTEND;
- if (rxmode->jumbo_frame == 1)
- offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
- if (rxmode->hw_strip_crc == 1)
- offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
- if (rxmode->enable_scatter == 1)
- offloads |= DEV_RX_OFFLOAD_SCATTER;
- if (rxmode->enable_lro == 1)
- offloads |= DEV_RX_OFFLOAD_TCP_LRO;
- if (rxmode->hw_timestamp == 1)
- offloads |= DEV_RX_OFFLOAD_TIMESTAMP;
- if (rxmode->security == 1)
- offloads |= DEV_RX_OFFLOAD_SECURITY;
-
- *rx_offloads = offloads;
-}
-
const char * __rte_experimental
rte_eth_dev_rx_offload_name(uint64_t offload)
{
@@ -1090,14 +1055,6 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
return -EBUSY;
}
- /*
- * Convert between the offloads API to enable PMDs to support
- * only one of them.
- */
- if (dev_conf->rxmode.ignore_offload_bitfield == 0)
- rte_eth_convert_rx_offload_bitfield(
- &dev_conf->rxmode, &local_conf.rxmode.offloads);
-
/* Copy the dev_conf parameter into the dev structure */
memcpy(&dev->data->dev_conf, &local_conf, sizeof(dev->data->dev_conf));
@@ -1542,14 +1499,6 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
rx_conf = &dev_info.default_rxconf;
local_conf = *rx_conf;
- if (dev->data->dev_conf.rxmode.ignore_offload_bitfield == 0) {
- /**
- * Reflect port offloads to queue offloads in order for
- * offloads to not be discarded.
- */
- rte_eth_convert_rx_offload_bitfield(&dev->data->dev_conf.rxmode,
- &local_conf.offloads);
- }
/*
* If an offloading has already been enabled in
@@ -1594,55 +1543,6 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
return eth_err(port_id, ret);
}
-/**
- * Convert from tx offloads to txq_flags.
- */
-static void
-rte_eth_convert_tx_offload(const uint64_t tx_offloads, uint32_t *txq_flags)
-{
- uint32_t flags = 0;
-
- if (!(tx_offloads & DEV_TX_OFFLOAD_MULTI_SEGS))
- flags |= ETH_TXQ_FLAGS_NOMULTSEGS;
- if (!(tx_offloads & DEV_TX_OFFLOAD_VLAN_INSERT))
- flags |= ETH_TXQ_FLAGS_NOVLANOFFL;
- if (!(tx_offloads & DEV_TX_OFFLOAD_SCTP_CKSUM))
- flags |= ETH_TXQ_FLAGS_NOXSUMSCTP;
- if (!(tx_offloads & DEV_TX_OFFLOAD_UDP_CKSUM))
- flags |= ETH_TXQ_FLAGS_NOXSUMUDP;
- if (!(tx_offloads & DEV_TX_OFFLOAD_TCP_CKSUM))
- flags |= ETH_TXQ_FLAGS_NOXSUMTCP;
- if (tx_offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
- flags |= ETH_TXQ_FLAGS_NOREFCOUNT | ETH_TXQ_FLAGS_NOMULTMEMP;
-
- *txq_flags = flags;
-}
-
-/**
- * A conversion function from txq_flags API.
- */
-static void
-rte_eth_convert_txq_flags(const uint32_t txq_flags, uint64_t *tx_offloads)
-{
- uint64_t offloads = 0;
-
- if (!(txq_flags & ETH_TXQ_FLAGS_NOMULTSEGS))
- offloads |= DEV_TX_OFFLOAD_MULTI_SEGS;
- if (!(txq_flags & ETH_TXQ_FLAGS_NOVLANOFFL))
- offloads |= DEV_TX_OFFLOAD_VLAN_INSERT;
- if (!(txq_flags & ETH_TXQ_FLAGS_NOXSUMSCTP))
- offloads |= DEV_TX_OFFLOAD_SCTP_CKSUM;
- if (!(txq_flags & ETH_TXQ_FLAGS_NOXSUMUDP))
- offloads |= DEV_TX_OFFLOAD_UDP_CKSUM;
- if (!(txq_flags & ETH_TXQ_FLAGS_NOXSUMTCP))
- offloads |= DEV_TX_OFFLOAD_TCP_CKSUM;
- if ((txq_flags & ETH_TXQ_FLAGS_NOREFCOUNT) &&
- (txq_flags & ETH_TXQ_FLAGS_NOMULTMEMP))
- offloads |= DEV_TX_OFFLOAD_MBUF_FAST_FREE;
-
- *tx_offloads = offloads;
-}
-
int
rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
uint16_t nb_tx_desc, unsigned int socket_id,
@@ -1706,15 +1606,7 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
if (tx_conf == NULL)
tx_conf = &dev_info.default_txconf;
- /*
- * Convert between the offloads API to enable PMDs to support
- * only one of them.
- */
local_conf = *tx_conf;
- if (!(tx_conf->txq_flags & ETH_TXQ_FLAGS_IGNORE)) {
- rte_eth_convert_txq_flags(tx_conf->txq_flags,
- &local_conf.offloads);
- }
/*
* If an offloading has already been enabled in
@@ -2495,7 +2387,6 @@ void
rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
{
struct rte_eth_dev *dev;
- struct rte_eth_txconf *txconf;
const struct rte_eth_desc_lim lim = {
.nb_max = UINT16_MAX,
.nb_min = 0,
@@ -2517,9 +2408,6 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
dev_info->nb_tx_queues = dev->data->nb_tx_queues;
dev_info->dev_flags = &dev->data->dev_flags;
- txconf = &dev_info->default_txconf;
- /* convert offload to txq_flags to support legacy app */
- rte_eth_convert_tx_offload(txconf->offloads, &txconf->txq_flags);
}
int
@@ -3952,7 +3840,6 @@ rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
struct rte_eth_txq_info *qinfo)
{
struct rte_eth_dev *dev;
- struct rte_eth_txconf *txconf = &qinfo->conf;
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
@@ -3969,8 +3856,6 @@ rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
memset(qinfo, 0, sizeof(*qinfo));
dev->dev_ops->txq_info_get(dev, queue_id, qinfo);
- /* convert offload to txq_flags to support legacy app */
- rte_eth_convert_tx_offload(txconf->offloads, &txconf->txq_flags);
return 0;
}
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 36e3984ea..9e976089b 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -329,33 +329,7 @@ struct rte_eth_rxmode {
* structure are allowed to be set.
*/
uint64_t offloads;
- __extension__
- /**
- * Below bitfield API is obsolete. Application should
- * enable per-port offloads using the offload field
- * above.
- */
- uint16_t header_split : 1, /**< Header Split enable. */
- hw_ip_checksum : 1, /**< IP/UDP/TCP checksum offload enable. */
- hw_vlan_filter : 1, /**< VLAN filter enable. */
- hw_vlan_strip : 1, /**< VLAN strip enable. */
- hw_vlan_extend : 1, /**< Extended VLAN enable. */
- jumbo_frame : 1, /**< Jumbo Frame Receipt enable. */
- hw_strip_crc : 1, /**< Enable CRC stripping by hardware. */
- enable_scatter : 1, /**< Enable scatter packets rx handler */
- enable_lro : 1, /**< Enable LRO */
- hw_timestamp : 1, /**< Enable HW timestamp */
- security : 1, /**< Enable rte_security offloads */
- /**
- * When set the offload bitfield should be ignored.
- * Instead per-port Rx offloads should be set on offloads
- * field above.
- * Per-queue offloads shuold be set on rte_eth_rxq_conf
- * structure.
- * This bit is temporary till rxmode bitfield offloads API will
- * be deprecated.
- */
- ignore_offload_bitfield : 1;
+ uint16_t jumbo_frame;
};
/**
@@ -702,28 +676,6 @@ struct rte_eth_rxconf {
uint64_t offloads;
};
-#define ETH_TXQ_FLAGS_NOMULTSEGS 0x0001 /**< nb_segs=1 for all mbufs */
-#define ETH_TXQ_FLAGS_NOREFCOUNT 0x0002 /**< refcnt can be ignored */
-#define ETH_TXQ_FLAGS_NOMULTMEMP 0x0004 /**< all bufs come from same mempool */
-#define ETH_TXQ_FLAGS_NOVLANOFFL 0x0100 /**< disable VLAN offload */
-#define ETH_TXQ_FLAGS_NOXSUMSCTP 0x0200 /**< disable SCTP checksum offload */
-#define ETH_TXQ_FLAGS_NOXSUMUDP 0x0400 /**< disable UDP checksum offload */
-#define ETH_TXQ_FLAGS_NOXSUMTCP 0x0800 /**< disable TCP checksum offload */
-#define ETH_TXQ_FLAGS_NOOFFLOADS \
- (ETH_TXQ_FLAGS_NOVLANOFFL | ETH_TXQ_FLAGS_NOXSUMSCTP | \
- ETH_TXQ_FLAGS_NOXSUMUDP | ETH_TXQ_FLAGS_NOXSUMTCP)
-#define ETH_TXQ_FLAGS_NOXSUMS \
- (ETH_TXQ_FLAGS_NOXSUMSCTP | ETH_TXQ_FLAGS_NOXSUMUDP | \
- ETH_TXQ_FLAGS_NOXSUMTCP)
-/**
- * When set the txq_flags should be ignored,
- * instead per-queue Tx offloads will be set on offloads field
- * located on rte_eth_txq_conf struct.
- * This flag is temporary till the rte_eth_txq_conf.txq_flags
- * API will be deprecated.
- */
-#define ETH_TXQ_FLAGS_IGNORE 0x8000
-
/**
* A structure used to configure a TX ring of an Ethernet port.
*/
@@ -733,7 +685,6 @@ struct rte_eth_txconf {
uint16_t tx_free_thresh; /**< Start freeing TX buffers if there are
less free descriptors than this value. */
- uint32_t txq_flags; /**< Set flags for the Tx queue */
uint8_t tx_deferred_start; /**< Do not start queue with rte_eth_dev_start(). */
/**
* Per-queue Tx offloads to be set using DEV_TX_OFFLOAD_* flags.
@@ -1669,12 +1620,6 @@ int rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
* The *tx_rs_thresh* value should be less or equal then
* *tx_free_thresh* value, and both of them should be less then
* *nb_tx_desc* - 3.
- * - The *txq_flags* member contains flags to pass to the TX queue setup
- * function to configure the behavior of the TX queue. This should be set
- * to 0 if no special configuration is required.
- * This API is obsolete and will be deprecated. Applications
- * should set it to ETH_TXQ_FLAGS_IGNORE and use
- * the offloads field below.
* - The *offloads* member contains Tx offloads to be enabled.
* If an offloading set in tx_conf->offloads
* hasn't been set in the input argument eth_conf->txmode.offloads
@@ -4070,7 +4015,7 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
*
* If the PMD is DEV_TX_OFFLOAD_MT_LOCKFREE capable, multiple threads can
* invoke this function concurrently on the same tx queue without SW lock.
- * @see rte_eth_dev_info_get, struct rte_eth_txconf::txq_flags
+ * @see rte_eth_dev_info_get, struct rte_eth_txconf::offloads
*
* @see rte_eth_tx_prepare to perform some prior checks or adjustments
* for offloads.
diff --git a/test/test-pipeline/init.c b/test/test-pipeline/init.c
index 19cf04a6c..275c6186b 100644
--- a/test/test-pipeline/init.c
+++ b/test/test-pipeline/init.c
@@ -70,11 +70,7 @@ struct app_params app = {
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .header_split = 0, /* Header Split disabled */
- .hw_ip_checksum = 1, /* IP checksum offload enabled */
- .hw_vlan_filter = 0, /* VLAN filtering disabled */
.jumbo_frame = 0, /* Jumbo Frame Support disabled */
- .hw_strip_crc = 1, /* CRC stripped by hardware */
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/test/test/test_kni.c b/test/test/test_kni.c
index 56773c8a2..6763b3acf 100644
--- a/test/test/test_kni.c
+++ b/test/test/test_kni.c
@@ -71,11 +71,7 @@ static const struct rte_eth_txconf tx_conf = {
static const struct rte_eth_conf port_conf = {
.rxmode = {
- .header_split = 0,
- .hw_ip_checksum = 0,
- .hw_vlan_filter = 0,
.jumbo_frame = 0,
- .hw_strip_crc = 1,
},
.txmode = {
.mq_mode = ETH_DCB_NONE,
diff --git a/test/test/test_link_bonding.c b/test/test/test_link_bonding.c
index 0ffd65090..25e1bcd3d 100644
--- a/test/test/test_link_bonding.c
+++ b/test/test/test_link_bonding.c
@@ -43,9 +43,6 @@
#define TX_HTHRESH 0
#define TX_WTHRESH 0
#define TX_RSBIT_THRESH 32
-#define TX_Q_FLAGS (ETH_TXQ_FLAGS_NOMULTSEGS | ETH_TXQ_FLAGS_NOVLANOFFL |\
- ETH_TXQ_FLAGS_NOXSUMSCTP | ETH_TXQ_FLAGS_NOXSUMUDP | \
- ETH_TXQ_FLAGS_NOXSUMTCP)
#define MBUF_CACHE_SIZE (250)
#define BURST_SIZE (32)
@@ -138,13 +135,7 @@ static uint16_t vlan_id = 0x100;
struct rte_eth_rxmode rx_mode = {
.max_rx_pkt_len = ETHER_MAX_LEN, /**< Default maximum frame length. */
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled. */
- .hw_ip_checksum = 0, /**< IP checksum offload disabled. */
- .hw_vlan_filter = 1, /**< VLAN filtering enabled. */
- .hw_vlan_strip = 1, /**< VLAN strip enabled. */
- .hw_vlan_extend = 0, /**< Extended VLAN disabled. */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled. */
- .hw_strip_crc = 1, /**< CRC stripping by hardware enabled. */
};
struct rte_fdir_conf fdir_conf = {
@@ -157,13 +148,9 @@ struct rte_fdir_conf fdir_conf = {
static struct rte_eth_conf default_pmd_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_NONE,
- .max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload enabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
+ .max_rx_pkt_len = ETHER_MAX_LEN,
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 1, /**< CRC stripped by hardware */
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
@@ -189,8 +176,6 @@ static struct rte_eth_txconf tx_conf_default = {
},
.tx_free_thresh = TX_FREE_THRESH,
.tx_rs_thresh = TX_RSBIT_THRESH,
- .txq_flags = TX_Q_FLAGS
-
};
static void free_virtualpmd_tx_queue(void);
diff --git a/test/test/test_link_bonding_mode4.c b/test/test/test_link_bonding_mode4.c
index 33c1fab01..2f916233c 100644
--- a/test/test/test_link_bonding_mode4.c
+++ b/test/test/test_link_bonding_mode4.c
@@ -110,11 +110,7 @@ static struct rte_eth_conf default_pmd_conf = {
.mq_mode = ETH_MQ_RX_NONE,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload enabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 1, /**< CRC stripped by hardware */
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
--git a/test/test/test_link_bonding_rssconf.c b/test/test/test_link_bonding_rssconf.c
index 6a1a28d23..939458080 100644
--- a/test/test/test_link_bonding_rssconf.c
+++ b/test/test/test_link_bonding_rssconf.c
@@ -83,11 +83,7 @@ static struct rte_eth_conf default_pmd_conf = {
.mq_mode = ETH_MQ_RX_NONE,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload enabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 1, /**< CRC stripped by hardware */
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
@@ -100,11 +96,7 @@ static struct rte_eth_conf rss_pmd_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload enabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 1, /**< CRC stripped by hardware */
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
diff --git a/test/test/test_pmd_perf.c b/test/test/test_pmd_perf.c
index 54bc4f6b0..b89c812f4 100644
--- a/test/test/test_pmd_perf.c
+++ b/test/test/test_pmd_perf.c
@@ -65,14 +65,7 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_NONE,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload enabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
- .hw_vlan_strip = 0, /**< VLAN strip enabled. */
- .hw_vlan_extend = 0, /**< Extended VLAN disabled. */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 1, /**< CRC stripped by hardware */
- .enable_scatter = 0, /**< scatter rx disabled */
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
@@ -97,11 +90,6 @@ static struct rte_eth_txconf tx_conf = {
},
.tx_free_thresh = 32, /* Use PMD default values */
.tx_rs_thresh = 32, /* Use PMD default values */
- .txq_flags = (ETH_TXQ_FLAGS_NOMULTSEGS |
- ETH_TXQ_FLAGS_NOVLANOFFL |
- ETH_TXQ_FLAGS_NOXSUMSCTP |
- ETH_TXQ_FLAGS_NOXSUMUDP |
- ETH_TXQ_FLAGS_NOXSUMTCP)
};
enum {
@@ -808,38 +796,26 @@ test_set_rxtx_conf(cmdline_fixed_string_t mode)
if (!strcmp(mode, "vector")) {
/* vector rx, tx */
- tx_conf.txq_flags = 0xf01;
tx_conf.tx_rs_thresh = 32;
tx_conf.tx_free_thresh = 32;
- port_conf.rxmode.hw_ip_checksum = 0;
- port_conf.rxmode.enable_scatter = 0;
return 0;
} else if (!strcmp(mode, "scalar")) {
/* bulk alloc rx, full-featured tx */
- tx_conf.txq_flags = 0;
tx_conf.tx_rs_thresh = 32;
tx_conf.tx_free_thresh = 32;
- port_conf.rxmode.hw_ip_checksum = 1;
- port_conf.rxmode.enable_scatter = 0;
return 0;
} else if (!strcmp(mode, "hybrid")) {
/* bulk alloc rx, vector tx
* when vec macro not define,
* using the same rx/tx as scalar
*/
- tx_conf.txq_flags = 0xf01;
tx_conf.tx_rs_thresh = 32;
tx_conf.tx_free_thresh = 32;
- port_conf.rxmode.hw_ip_checksum = 1;
- port_conf.rxmode.enable_scatter = 0;
return 0;
} else if (!strcmp(mode, "full")) {
/* full feature rx,tx pair */
- tx_conf.txq_flags = 0x0; /* must condition */
tx_conf.tx_rs_thresh = 32;
tx_conf.tx_free_thresh = 32;
- port_conf.rxmode.hw_ip_checksum = 0;
- port_conf.rxmode.enable_scatter = 1; /* must condition */
return 0;
}
--
2.14.4
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [RFC] ethdev: remove all offload API
2018-06-08 22:41 [dpdk-dev] [RFC] ethdev: remove all offload API Ferruh Yigit
@ 2018-06-08 21:52 ` Ferruh Yigit
2018-06-09 8:04 ` Andrew Rybchenko
2018-06-29 1:11 ` Thomas Monjalon
2 siblings, 0 replies; 25+ messages in thread
From: Ferruh Yigit @ 2018-06-08 21:52 UTC (permalink / raw)
To: Jerin Jacob, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger,
John McNamara, Marko Kovacevic, Neil Horman, Remy Horton,
Ori Kam, Bruce Richardson, Pablo de Lara, Radu Nicolau,
Akhil Goyal, Tomasz Kantecki, Harry van Haaren, Jijiang Liu,
Ravi Kumar, Konstantin Ananyev, Andrew Rybchenko,
Maxime Coquelin, Tiwei Bie, Yong Wang, Amr Mokhtar,
Declan Doherty, Chas Williams, David Hunt, Cristian Dumitrescu,
Anatoly Burakov, Reshma Pattan, Byron Marohn, Thomas Monjalon
Cc: dev, Shahaf Shuler
On 6/8/2018 11:41 PM, Ferruh Yigit wrote:
> Cc: Shahaf Shuler <shahafs@mellanox.com>
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Correction:
Patch title should be "*old* offloading API", not *all* J
[RFC] ethdev: remove old offload API
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [RFC] ethdev: remove all offload API
2018-06-08 22:41 [dpdk-dev] [RFC] ethdev: remove all offload API Ferruh Yigit
2018-06-08 21:52 ` Ferruh Yigit
@ 2018-06-09 8:04 ` Andrew Rybchenko
2018-06-11 9:09 ` Ferruh Yigit
2018-06-29 1:11 ` Thomas Monjalon
2 siblings, 1 reply; 25+ messages in thread
From: Andrew Rybchenko @ 2018-06-09 8:04 UTC (permalink / raw)
To: Ferruh Yigit, Jerin Jacob, Wenzhuo Lu, Jingjing Wu,
Bernard Iremonger, John McNamara, Marko Kovacevic, Neil Horman,
Remy Horton, Ori Kam, Bruce Richardson, Pablo de Lara,
Radu Nicolau, Akhil Goyal, Tomasz Kantecki, Harry van Haaren,
Jijiang Liu, Ravi Kumar, Konstantin Ananyev, Maxime Coquelin,
Tiwei Bie, Yong Wang, Amr Mokhtar, Declan Doherty, Chas Williams,
David Hunt, Cristian Dumitrescu, Anatoly Burakov, Reshma Pattan,
Byron Marohn, Thomas Monjalon
Cc: dev, Shahaf Shuler
On 06/09/2018 01:41 AM, Ferruh Yigit wrote:
> Cc: Shahaf Shuler <shahafs@mellanox.com>
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
<...>
> diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
> index d00f91802..9fe042ffe 100644
> --- a/app/test-eventdev/test_perf_common.c
> +++ b/app/test-eventdev/test_perf_common.c
> @@ -680,13 +680,7 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt)
> .mq_mode = ETH_MQ_RX_RSS,
> .max_rx_pkt_len = ETHER_MAX_LEN,
> .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 = 1,
I have 2 questions here:
1. Why is jumbo_frame kept? There is DEV_RX_OFFLOAD_JUMBO_FRAME.
2. Why is hw_strip_crc=1 discarded? Yes, I remember plans to make it
default behaviour and introduce flag to keep CRC, but right now the
patch looks like mixture of two changes which is not good.
There are more cases in the patch where hw_strip_crc=1 is simply discarded.
<...>
> diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
> index 1b6499f85..ee8ae5b9f 100644
> --- a/drivers/net/sfc/sfc_ethdev.c
> +++ b/drivers/net/sfc/sfc_ethdev.c
> @@ -1089,7 +1089,6 @@ sfc_tx_queue_info_get(struct rte_eth_dev *dev, uint16_t tx_queue_id,
>
> memset(qinfo, 0, sizeof(*qinfo));
>
> - qinfo->conf.txq_flags = txq_info->txq->flags;
> qinfo->conf.offloads = txq_info->txq->offloads;
> qinfo->conf.tx_free_thresh = txq_info->txq->free_thresh;
> qinfo->conf.tx_deferred_start = txq_info->deferred_start;
> diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
> index cc76a5b15..58a0df583 100644
> --- a/drivers/net/sfc/sfc_rx.c
> +++ b/drivers/net/sfc/sfc_rx.c
> @@ -1446,7 +1446,6 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode)
> if (~rxmode->offloads & DEV_RX_OFFLOAD_CRC_STRIP) {
> sfc_warn(sa, "FCS stripping cannot be disabled - always on");
> rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
> - rxmode->hw_strip_crc = 1;
> }
>
> return rc;
> diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
> index 1bcc2c697..6d42a1a65 100644
> --- a/drivers/net/sfc/sfc_tx.c
> +++ b/drivers/net/sfc/sfc_tx.c
> @@ -171,7 +171,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
> txq->free_thresh =
> (tx_conf->tx_free_thresh) ? tx_conf->tx_free_thresh :
> SFC_TX_DEFAULT_FREE_THRESH;
> - txq->flags = tx_conf->txq_flags;
> txq->offloads = offloads;
>
> rc = sfc_dma_alloc(sa, "txq", sw_index, EFX_TXQ_SIZE(txq_info->entries),
> @@ -182,7 +181,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
> memset(&info, 0, sizeof(info));
> info.max_fill_level = txq_max_fill_level;
> info.free_thresh = txq->free_thresh;
> - info.flags = tx_conf->txq_flags;
> info.offloads = offloads;
> info.txq_entries = txq_info->entries;
> info.dma_desc_size_max = encp->enc_tx_dma_desc_size_max;
> @@ -431,18 +429,10 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
> if (rc != 0)
> goto fail_ev_qstart;
>
> - /*
> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a legacy
> - * application which expects that IPv4 checksum offload is enabled
> - * all the time as there is no legacy flag to turn off the offload.
> - */
> - if ((txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) ||
> - (~txq->flags & ETH_TXQ_FLAGS_IGNORE))
> + if (txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)
> flags |= EFX_TXQ_CKSUM_IPV4;
>
> - if ((txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
> - (offloads_supported & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)))
> + if (txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
> flags |= EFX_TXQ_CKSUM_INNER_IPV4;
>
> if ((txq->offloads & DEV_TX_OFFLOAD_TCP_CKSUM) ||
> @@ -453,16 +443,7 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
> flags |= EFX_TXQ_CKSUM_INNER_TCPUDP;
> }
>
> - /*
> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a legacy
> - * application. In turn, the absence of ETH_TXQ_FLAGS_NOXSUMTCP is
> - * associated specifically with a legacy application which expects
> - * both TCP checksum offload and TSO to be enabled because the legacy
> - * API does not provide a dedicated mechanism to control TSO.
> - */
> - if ((txq->offloads & DEV_TX_OFFLOAD_TCP_TSO) ||
> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
> - (~txq->flags & ETH_TXQ_FLAGS_NOXSUMTCP)))
> + if (txq->offloads & DEV_TX_OFFLOAD_TCP_TSO)
> flags |= EFX_TXQ_FATSOV2;
>
> rc = efx_tx_qcreate(sa->nic, sw_index, 0, &txq->mem,
net/sfc changes looks good.
Plus 'struct sfc_txq -> flags' (drivers/net/sfc/sfc_tx.h) and
'struct sfc_dp_tx_qcreate_info -> flags' (drivers/net/sfc/sfc_dp_tx.h)
should be
removed since there are not used now.
If finally rxmode.jumbo_frame is removed, it should removed from
net/sfc as well (but compiler will help to find it in any case).
After applying the patch:
$ git grep ETH_TXQ_FLAGS
drivers/net/fm10k/fm10k.h:#define FM10K_SIMPLE_TX_FLAG
((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \
drivers/net/fm10k/fm10k.h: ETH_TXQ_FLAGS_NOOFFLOADS)
In general I think that we should do it ASAP. Also it will guarantee
that new PMDs do not use corresponding structure members etc.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [RFC] ethdev: remove all offload API
2018-06-09 8:04 ` Andrew Rybchenko
@ 2018-06-11 9:09 ` Ferruh Yigit
2018-06-11 11:00 ` Shahaf Shuler
0 siblings, 1 reply; 25+ messages in thread
From: Ferruh Yigit @ 2018-06-11 9:09 UTC (permalink / raw)
To: Andrew Rybchenko, Jerin Jacob, Wenzhuo Lu, Jingjing Wu,
Bernard Iremonger, John McNamara, Marko Kovacevic, Neil Horman,
Remy Horton, Ori Kam, Bruce Richardson, Pablo de Lara,
Radu Nicolau, Akhil Goyal, Tomasz Kantecki, Harry van Haaren,
Jijiang Liu, Ravi Kumar, Konstantin Ananyev, Maxime Coquelin,
Tiwei Bie, Yong Wang, Amr Mokhtar, Declan Doherty, Chas Williams,
David Hunt, Cristian Dumitrescu, Anatoly Burakov, Reshma Pattan,
Byron Marohn, Thomas Monjalon
Cc: dev, Shahaf Shuler
On 6/9/2018 9:04 AM, Andrew Rybchenko wrote:
> On 06/09/2018 01:41 AM, Ferruh Yigit wrote:
>> Cc: Shahaf Shuler <shahafs@mellanox.com>
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> ---
>
> <...>
>
>> diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
>> index d00f91802..9fe042ffe 100644
>> --- a/app/test-eventdev/test_perf_common.c
>> +++ b/app/test-eventdev/test_perf_common.c
>> @@ -680,13 +680,7 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt)
>> .mq_mode = ETH_MQ_RX_RSS,
>> .max_rx_pkt_len = ETHER_MAX_LEN,
>> .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 = 1,
>
Hi Andrew,
> I have 2 questions here:
> 1. Why is jumbo_frame kept? There is DEV_RX_OFFLOAD_JUMBO_FRAME.
Because there are still some usage of this flag in PMDs, they need to be
clarified before removing the flag. I am for removing the flag in final version,
but for this RFC I am not able to find enough time to work on PMDs for it.
> 2. Why is hw_strip_crc=1 discarded? Yes, I remember plans to make it
> default behaviour and introduce flag to keep CRC, but right now the
> patch looks like mixture of two changes which is not good.
Yes it is wrong, app should replace "".hw_strip_crc=1 with KEEP_CRC offload.
Since both are RFC, kind of hard to maintain, but I think good to create a
dependency from this patch to KEEP_CRC one.
>
> There are more cases in the patch where hw_strip_crc=1 is simply discarded.
>
> <...>
>
>> diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
>> index 1b6499f85..ee8ae5b9f 100644
>> --- a/drivers/net/sfc/sfc_ethdev.c
>> +++ b/drivers/net/sfc/sfc_ethdev.c
>> @@ -1089,7 +1089,6 @@ sfc_tx_queue_info_get(struct rte_eth_dev *dev, uint16_t tx_queue_id,
>>
>> memset(qinfo, 0, sizeof(*qinfo));
>>
>> - qinfo->conf.txq_flags = txq_info->txq->flags;
>> qinfo->conf.offloads = txq_info->txq->offloads;
>> qinfo->conf.tx_free_thresh = txq_info->txq->free_thresh;
>> qinfo->conf.tx_deferred_start = txq_info->deferred_start;
>> diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
>> index cc76a5b15..58a0df583 100644
>> --- a/drivers/net/sfc/sfc_rx.c
>> +++ b/drivers/net/sfc/sfc_rx.c
>> @@ -1446,7 +1446,6 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode)
>> if (~rxmode->offloads & DEV_RX_OFFLOAD_CRC_STRIP) {
>> sfc_warn(sa, "FCS stripping cannot be disabled - always on");
>> rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
>> - rxmode->hw_strip_crc = 1;
>> }
>>
>> return rc;
>> diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
>> index 1bcc2c697..6d42a1a65 100644
>> --- a/drivers/net/sfc/sfc_tx.c
>> +++ b/drivers/net/sfc/sfc_tx.c
>> @@ -171,7 +171,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
>> txq->free_thresh =
>> (tx_conf->tx_free_thresh) ? tx_conf->tx_free_thresh :
>> SFC_TX_DEFAULT_FREE_THRESH;
>> - txq->flags = tx_conf->txq_flags;
>> txq->offloads = offloads;
>>
>> rc = sfc_dma_alloc(sa, "txq", sw_index, EFX_TXQ_SIZE(txq_info->entries),
>> @@ -182,7 +181,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
>> memset(&info, 0, sizeof(info));
>> info.max_fill_level = txq_max_fill_level;
>> info.free_thresh = txq->free_thresh;
>> - info.flags = tx_conf->txq_flags;
>> info.offloads = offloads;
>> info.txq_entries = txq_info->entries;
>> info.dma_desc_size_max = encp->enc_tx_dma_desc_size_max;
>> @@ -431,18 +429,10 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
>> if (rc != 0)
>> goto fail_ev_qstart;
>>
>> - /*
>> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a legacy
>> - * application which expects that IPv4 checksum offload is enabled
>> - * all the time as there is no legacy flag to turn off the offload.
>> - */
>> - if ((txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) ||
>> - (~txq->flags & ETH_TXQ_FLAGS_IGNORE))
>> + if (txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)
>> flags |= EFX_TXQ_CKSUM_IPV4;
>>
>> - if ((txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
>> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
>> - (offloads_supported & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)))
>> + if (txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
>> flags |= EFX_TXQ_CKSUM_INNER_IPV4;
>>
>> if ((txq->offloads & DEV_TX_OFFLOAD_TCP_CKSUM) ||
>> @@ -453,16 +443,7 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
>> flags |= EFX_TXQ_CKSUM_INNER_TCPUDP;
>> }
>>
>> - /*
>> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a legacy
>> - * application. In turn, the absence of ETH_TXQ_FLAGS_NOXSUMTCP is
>> - * associated specifically with a legacy application which expects
>> - * both TCP checksum offload and TSO to be enabled because the legacy
>> - * API does not provide a dedicated mechanism to control TSO.
>> - */
>> - if ((txq->offloads & DEV_TX_OFFLOAD_TCP_TSO) ||
>> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
>> - (~txq->flags & ETH_TXQ_FLAGS_NOXSUMTCP)))
>> + if (txq->offloads & DEV_TX_OFFLOAD_TCP_TSO)
>> flags |= EFX_TXQ_FATSOV2;
>>
>> rc = efx_tx_qcreate(sa->nic, sw_index, 0, &txq->mem,
>
> net/sfc changes looks good.
> Plus 'struct sfc_txq -> flags' (drivers/net/sfc/sfc_tx.h) and
> 'struct sfc_dp_tx_qcreate_info -> flags' (drivers/net/sfc/sfc_dp_tx.h) should be
> removed since there are not used now.
>
> If finally rxmode.jumbo_frame is removed, it should removed from
> net/sfc as well (but compiler will help to find it in any case).
>
> After applying the patch:
> $ git grep ETH_TXQ_FLAGS
> drivers/net/fm10k/fm10k.h:#define FM10K_SIMPLE_TX_FLAG
> ((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \
> drivers/net/fm10k/fm10k.h: ETH_TXQ_FLAGS_NOOFFLOADS)
Thanks, will remove this too.
>
> In general I think that we should do it ASAP. Also it will guarantee
> that new PMDs do not use corresponding structure members etc.
+1, +1
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [RFC] ethdev: remove all offload API
2018-06-11 9:09 ` Ferruh Yigit
@ 2018-06-11 11:00 ` Shahaf Shuler
2018-06-11 11:18 ` Ferruh Yigit
0 siblings, 1 reply; 25+ messages in thread
From: Shahaf Shuler @ 2018-06-11 11:00 UTC (permalink / raw)
To: Ferruh Yigit, Andrew Rybchenko, Jerin Jacob, Wenzhuo Lu,
Jingjing Wu, Bernard Iremonger, John McNamara, Marko Kovacevic,
Neil Horman, Remy Horton, Ori Kam, Bruce Richardson,
Pablo de Lara, Radu Nicolau, Akhil Goyal, Tomasz Kantecki,
Harry van Haaren, Jijiang Liu, Ravi Kumar, Konstantin Ananyev,
Maxime Coquelin, Tiwei Bie, Yong Wang, Amr Mokhtar,
Declan Doherty, Chas Williams, David Hunt, Cristian Dumitrescu,
Anatoly Burakov, Reshma Pattan, Byron Marohn, Thomas Monjalon
Cc: dev
Hi Ferruh,
Thanks for this patch.
Monday, June 11, 2018 12:10 PM, Ferruh Yigit:
> Subject: Re: [RFC] ethdev: remove all offload API
>
> On 6/9/2018 9:04 AM, Andrew Rybchenko wrote:
> > On 06/09/2018 01:41 AM, Ferruh Yigit wrote:
> >> Cc: Shahaf Shuler <shahafs@mellanox.com>
> >>
> >> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> >> ---
> >
> > <...>
> >
> >> diff --git a/app/test-eventdev/test_perf_common.c
> >> b/app/test-eventdev/test_perf_common.c
> >> index d00f91802..9fe042ffe 100644
> >> --- a/app/test-eventdev/test_perf_common.c
> >> +++ b/app/test-eventdev/test_perf_common.c
> >> @@ -680,13 +680,7 @@ perf_ethdev_setup(struct evt_test *test, struct
> evt_options *opt)
> >> .mq_mode = ETH_MQ_RX_RSS,
> >> .max_rx_pkt_len = ETHER_MAX_LEN,
> >> .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 = 1,
> >
>
> Hi Andrew,
>
> > I have 2 questions here:
> > 1. Why is jumbo_frame kept? There is
> DEV_RX_OFFLOAD_JUMBO_FRAME.
>
> Because there are still some usage of this flag in PMDs, they need to be
> clarified before removing the flag. I am for removing the flag in final version,
> but for this RFC I am not able to find enough time to work on PMDs for it.
Can you elaborate?
Is this something more than just a replace of the jumbo_frame bit with its corresponding flag?
>
> > 2. Why is hw_strip_crc=1 discarded? Yes, I remember plans to make it
> > default behaviour and introduce flag to keep CRC, but right now
> > the
> > patch looks like mixture of two changes which is not good.
>
> Yes it is wrong, app should replace "".hw_strip_crc=1 with KEEP_CRC offload.
> Since both are RFC, kind of hard to maintain, but I think good to create a
> dependency from this patch to KEEP_CRC one.
>
> >
> > There are more cases in the patch where hw_strip_crc=1 is simply
> discarded.
> >
> > <...>
> >
> >> diff --git a/drivers/net/sfc/sfc_ethdev.c
> >> b/drivers/net/sfc/sfc_ethdev.c index 1b6499f85..ee8ae5b9f 100644
> >> --- a/drivers/net/sfc/sfc_ethdev.c
> >> +++ b/drivers/net/sfc/sfc_ethdev.c
> >> @@ -1089,7 +1089,6 @@ sfc_tx_queue_info_get(struct rte_eth_dev
> *dev,
> >> uint16_t tx_queue_id,
> >>
> >> memset(qinfo, 0, sizeof(*qinfo));
> >>
> >> - qinfo->conf.txq_flags = txq_info->txq->flags;
> >> qinfo->conf.offloads = txq_info->txq->offloads;
> >> qinfo->conf.tx_free_thresh = txq_info->txq->free_thresh;
> >> qinfo->conf.tx_deferred_start = txq_info->deferred_start; diff
> >> --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index
> >> cc76a5b15..58a0df583 100644
> >> --- a/drivers/net/sfc/sfc_rx.c
> >> +++ b/drivers/net/sfc/sfc_rx.c
> >> @@ -1446,7 +1446,6 @@ sfc_rx_check_mode(struct sfc_adapter *sa,
> struct rte_eth_rxmode *rxmode)
> >> if (~rxmode->offloads & DEV_RX_OFFLOAD_CRC_STRIP) {
> >> sfc_warn(sa, "FCS stripping cannot be disabled - always on");
> >> rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
> >> - rxmode->hw_strip_crc = 1;
> >> }
> >>
> >> return rc;
> >> diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
> >> index 1bcc2c697..6d42a1a65 100644
> >> --- a/drivers/net/sfc/sfc_tx.c
> >> +++ b/drivers/net/sfc/sfc_tx.c
> >> @@ -171,7 +171,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int
> sw_index,
> >> txq->free_thresh =
> >> (tx_conf->tx_free_thresh) ? tx_conf->tx_free_thresh :
> >> SFC_TX_DEFAULT_FREE_THRESH;
> >> - txq->flags = tx_conf->txq_flags;
> >> txq->offloads = offloads;
> >>
> >> rc = sfc_dma_alloc(sa, "txq", sw_index,
> >> EFX_TXQ_SIZE(txq_info->entries), @@ -182,7 +181,6 @@
> sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
> >> memset(&info, 0, sizeof(info));
> >> info.max_fill_level = txq_max_fill_level;
> >> info.free_thresh = txq->free_thresh;
> >> - info.flags = tx_conf->txq_flags;
> >> info.offloads = offloads;
> >> info.txq_entries = txq_info->entries;
> >> info.dma_desc_size_max = encp->enc_tx_dma_desc_size_max;
> @@ -431,18
> >> +429,10 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
> >> if (rc != 0)
> >> goto fail_ev_qstart;
> >>
> >> - /*
> >> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a
> legacy
> >> - * application which expects that IPv4 checksum offload is enabled
> >> - * all the time as there is no legacy flag to turn off the offload.
> >> - */
> >> - if ((txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) ||
> >> - (~txq->flags & ETH_TXQ_FLAGS_IGNORE))
> >> + if (txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)
> >> flags |= EFX_TXQ_CKSUM_IPV4;
> >>
> >> - if ((txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
> >> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
> >> - (offloads_supported &
> DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)))
> >> + if (txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
> >> flags |= EFX_TXQ_CKSUM_INNER_IPV4;
> >>
> >> if ((txq->offloads & DEV_TX_OFFLOAD_TCP_CKSUM) || @@ -453,16
> +443,7
> >> @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
> >> flags |= EFX_TXQ_CKSUM_INNER_TCPUDP;
> >> }
> >>
> >> - /*
> >> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a
> legacy
> >> - * application. In turn, the absence of ETH_TXQ_FLAGS_NOXSUMTCP
> is
> >> - * associated specifically with a legacy application which expects
> >> - * both TCP checksum offload and TSO to be enabled because the
> legacy
> >> - * API does not provide a dedicated mechanism to control TSO.
> >> - */
> >> - if ((txq->offloads & DEV_TX_OFFLOAD_TCP_TSO) ||
> >> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
> >> - (~txq->flags & ETH_TXQ_FLAGS_NOXSUMTCP)))
> >> + if (txq->offloads & DEV_TX_OFFLOAD_TCP_TSO)
> >> flags |= EFX_TXQ_FATSOV2;
> >>
> >> rc = efx_tx_qcreate(sa->nic, sw_index, 0, &txq->mem,
> >
> > net/sfc changes looks good.
> > Plus 'struct sfc_txq -> flags' (drivers/net/sfc/sfc_tx.h) and 'struct
> > sfc_dp_tx_qcreate_info -> flags' (drivers/net/sfc/sfc_dp_tx.h) should
> > be removed since there are not used now.
> >
> > If finally rxmode.jumbo_frame is removed, it should removed from
> > net/sfc as well (but compiler will help to find it in any case).
> >
> > After applying the patch:
> > $ git grep ETH_TXQ_FLAGS
> > drivers/net/fm10k/fm10k.h:#define FM10K_SIMPLE_TX_FLAG
> > ((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \
> > drivers/net/fm10k/fm10k.h:
> > ETH_TXQ_FLAGS_NOOFFLOADS)
>
> Thanks, will remove this too.
>
> >
> > In general I think that we should do it ASAP. Also it will guarantee
> > that new PMDs do not use corresponding structure members etc.
>
> +1, +1
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [RFC] ethdev: remove all offload API
2018-06-11 11:00 ` Shahaf Shuler
@ 2018-06-11 11:18 ` Ferruh Yigit
2018-06-11 11:26 ` Ananyev, Konstantin
0 siblings, 1 reply; 25+ messages in thread
From: Ferruh Yigit @ 2018-06-11 11:18 UTC (permalink / raw)
To: Shahaf Shuler, Andrew Rybchenko, Jerin Jacob, Wenzhuo Lu,
Jingjing Wu, Bernard Iremonger, John McNamara, Marko Kovacevic,
Neil Horman, Remy Horton, Ori Kam, Bruce Richardson,
Pablo de Lara, Radu Nicolau, Akhil Goyal, Tomasz Kantecki,
Harry van Haaren, Jijiang Liu, Ravi Kumar, Konstantin Ananyev,
Maxime Coquelin, Tiwei Bie, Yong Wang, Amr Mokhtar,
Declan Doherty, Chas Williams, David Hunt, Cristian Dumitrescu,
Anatoly Burakov, Reshma Pattan, Byron Marohn, Thomas Monjalon
Cc: dev
On 6/11/2018 12:00 PM, Shahaf Shuler wrote:
> Hi Ferruh,
>
> Thanks for this patch.
>
> Monday, June 11, 2018 12:10 PM, Ferruh Yigit:
>> Subject: Re: [RFC] ethdev: remove all offload API
>>
>> On 6/9/2018 9:04 AM, Andrew Rybchenko wrote:
>>> On 06/09/2018 01:41 AM, Ferruh Yigit wrote:
>>>> Cc: Shahaf Shuler <shahafs@mellanox.com>
>>>>
>>>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>>>> ---
>>>
>>> <...>
>>>
>>>> diff --git a/app/test-eventdev/test_perf_common.c
>>>> b/app/test-eventdev/test_perf_common.c
>>>> index d00f91802..9fe042ffe 100644
>>>> --- a/app/test-eventdev/test_perf_common.c
>>>> +++ b/app/test-eventdev/test_perf_common.c
>>>> @@ -680,13 +680,7 @@ perf_ethdev_setup(struct evt_test *test, struct
>> evt_options *opt)
>>>> .mq_mode = ETH_MQ_RX_RSS,
>>>> .max_rx_pkt_len = ETHER_MAX_LEN,
>>>> .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 = 1,
>>>
>>
>> Hi Andrew,
>>
>>> I have 2 questions here:
>>> 1. Why is jumbo_frame kept? There is
>> DEV_RX_OFFLOAD_JUMBO_FRAME.
>>
>> Because there are still some usage of this flag in PMDs, they need to be
>> clarified before removing the flag. I am for removing the flag in final version,
>> but for this RFC I am not able to find enough time to work on PMDs for it.
>
> Can you elaborate?
> Is this something more than just a replace of the jumbo_frame bit with its corresponding flag?
That was my concern that copy paste won't be enough because some drivers not
just use the jumbo_frame but set it based on max_rx_pkt_len etc.., that is why
left out .jumbo_frame in the RFC.
>
>>
>>> 2. Why is hw_strip_crc=1 discarded? Yes, I remember plans to make it
>>> default behaviour and introduce flag to keep CRC, but right now
>>> the
>>> patch looks like mixture of two changes which is not good.
>>
>> Yes it is wrong, app should replace "".hw_strip_crc=1 with KEEP_CRC offload.
>> Since both are RFC, kind of hard to maintain, but I think good to create a
>> dependency from this patch to KEEP_CRC one.
>>
>>>
>>> There are more cases in the patch where hw_strip_crc=1 is simply
>> discarded.
>>>
>>> <...>
>>>
>>>> diff --git a/drivers/net/sfc/sfc_ethdev.c
>>>> b/drivers/net/sfc/sfc_ethdev.c index 1b6499f85..ee8ae5b9f 100644
>>>> --- a/drivers/net/sfc/sfc_ethdev.c
>>>> +++ b/drivers/net/sfc/sfc_ethdev.c
>>>> @@ -1089,7 +1089,6 @@ sfc_tx_queue_info_get(struct rte_eth_dev
>> *dev,
>>>> uint16_t tx_queue_id,
>>>>
>>>> memset(qinfo, 0, sizeof(*qinfo));
>>>>
>>>> - qinfo->conf.txq_flags = txq_info->txq->flags;
>>>> qinfo->conf.offloads = txq_info->txq->offloads;
>>>> qinfo->conf.tx_free_thresh = txq_info->txq->free_thresh;
>>>> qinfo->conf.tx_deferred_start = txq_info->deferred_start; diff
>>>> --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index
>>>> cc76a5b15..58a0df583 100644
>>>> --- a/drivers/net/sfc/sfc_rx.c
>>>> +++ b/drivers/net/sfc/sfc_rx.c
>>>> @@ -1446,7 +1446,6 @@ sfc_rx_check_mode(struct sfc_adapter *sa,
>> struct rte_eth_rxmode *rxmode)
>>>> if (~rxmode->offloads & DEV_RX_OFFLOAD_CRC_STRIP) {
>>>> sfc_warn(sa, "FCS stripping cannot be disabled - always on");
>>>> rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
>>>> - rxmode->hw_strip_crc = 1;
>>>> }
>>>>
>>>> return rc;
>>>> diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
>>>> index 1bcc2c697..6d42a1a65 100644
>>>> --- a/drivers/net/sfc/sfc_tx.c
>>>> +++ b/drivers/net/sfc/sfc_tx.c
>>>> @@ -171,7 +171,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int
>> sw_index,
>>>> txq->free_thresh =
>>>> (tx_conf->tx_free_thresh) ? tx_conf->tx_free_thresh :
>>>> SFC_TX_DEFAULT_FREE_THRESH;
>>>> - txq->flags = tx_conf->txq_flags;
>>>> txq->offloads = offloads;
>>>>
>>>> rc = sfc_dma_alloc(sa, "txq", sw_index,
>>>> EFX_TXQ_SIZE(txq_info->entries), @@ -182,7 +181,6 @@
>> sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
>>>> memset(&info, 0, sizeof(info));
>>>> info.max_fill_level = txq_max_fill_level;
>>>> info.free_thresh = txq->free_thresh;
>>>> - info.flags = tx_conf->txq_flags;
>>>> info.offloads = offloads;
>>>> info.txq_entries = txq_info->entries;
>>>> info.dma_desc_size_max = encp->enc_tx_dma_desc_size_max;
>> @@ -431,18
>>>> +429,10 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
>>>> if (rc != 0)
>>>> goto fail_ev_qstart;
>>>>
>>>> - /*
>>>> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a
>> legacy
>>>> - * application which expects that IPv4 checksum offload is enabled
>>>> - * all the time as there is no legacy flag to turn off the offload.
>>>> - */
>>>> - if ((txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) ||
>>>> - (~txq->flags & ETH_TXQ_FLAGS_IGNORE))
>>>> + if (txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)
>>>> flags |= EFX_TXQ_CKSUM_IPV4;
>>>>
>>>> - if ((txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
>>>> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
>>>> - (offloads_supported &
>> DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)))
>>>> + if (txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
>>>> flags |= EFX_TXQ_CKSUM_INNER_IPV4;
>>>>
>>>> if ((txq->offloads & DEV_TX_OFFLOAD_TCP_CKSUM) || @@ -453,16
>> +443,7
>>>> @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
>>>> flags |= EFX_TXQ_CKSUM_INNER_TCPUDP;
>>>> }
>>>>
>>>> - /*
>>>> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a
>> legacy
>>>> - * application. In turn, the absence of ETH_TXQ_FLAGS_NOXSUMTCP
>> is
>>>> - * associated specifically with a legacy application which expects
>>>> - * both TCP checksum offload and TSO to be enabled because the
>> legacy
>>>> - * API does not provide a dedicated mechanism to control TSO.
>>>> - */
>>>> - if ((txq->offloads & DEV_TX_OFFLOAD_TCP_TSO) ||
>>>> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
>>>> - (~txq->flags & ETH_TXQ_FLAGS_NOXSUMTCP)))
>>>> + if (txq->offloads & DEV_TX_OFFLOAD_TCP_TSO)
>>>> flags |= EFX_TXQ_FATSOV2;
>>>>
>>>> rc = efx_tx_qcreate(sa->nic, sw_index, 0, &txq->mem,
>>>
>>> net/sfc changes looks good.
>>> Plus 'struct sfc_txq -> flags' (drivers/net/sfc/sfc_tx.h) and 'struct
>>> sfc_dp_tx_qcreate_info -> flags' (drivers/net/sfc/sfc_dp_tx.h) should
>>> be removed since there are not used now.
>>>
>>> If finally rxmode.jumbo_frame is removed, it should removed from
>>> net/sfc as well (but compiler will help to find it in any case).
>>>
>>> After applying the patch:
>>> $ git grep ETH_TXQ_FLAGS
>>> drivers/net/fm10k/fm10k.h:#define FM10K_SIMPLE_TX_FLAG
>>> ((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \
>>> drivers/net/fm10k/fm10k.h:
>>> ETH_TXQ_FLAGS_NOOFFLOADS)
>>
>> Thanks, will remove this too.
>>
>>>
>>> In general I think that we should do it ASAP. Also it will guarantee
>>> that new PMDs do not use corresponding structure members etc.
>>
>> +1, +1
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [RFC] ethdev: remove all offload API
2018-06-11 11:18 ` Ferruh Yigit
@ 2018-06-11 11:26 ` Ananyev, Konstantin
2018-06-11 11:35 ` Ferruh Yigit
2018-06-11 11:35 ` Shahaf Shuler
0 siblings, 2 replies; 25+ messages in thread
From: Ananyev, Konstantin @ 2018-06-11 11:26 UTC (permalink / raw)
To: Yigit, Ferruh, Shahaf Shuler, Andrew Rybchenko, Jerin Jacob, Lu,
Wenzhuo, Wu, Jingjing, Iremonger, Bernard, Mcnamara, John,
Kovacevic, Marko, Neil Horman, Horton, Remy, Ori Kam, Richardson,
Bruce, De Lara Guarch, Pablo, Nicolau, Radu, Akhil Goyal,
Kantecki, Tomasz, Van Haaren, Harry, Jijiang Liu, Ravi Kumar,
Maxime Coquelin, Bie, Tiwei, Yong Wang, Mokhtar, Amr, Doherty,
Declan, Chas Williams, Hunt, David, Dumitrescu, Cristian,
Burakov, Anatoly, Pattan, Reshma, Marohn, Byron, Thomas Monjalon
Cc: dev
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Monday, June 11, 2018 12:18 PM
> To: Shahaf Shuler <shahafs@mellanox.com>; Andrew Rybchenko <arybchenko@solarflare.com>; Jerin Jacob
> <jerin.jacob@caviumnetworks.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Iremonger,
> Bernard <bernard.iremonger@intel.com>; Mcnamara, John <john.mcnamara@intel.com>; Kovacevic, Marko
> <marko.kovacevic@intel.com>; Neil Horman <nhorman@tuxdriver.com>; Horton, Remy <remy.horton@intel.com>; Ori Kam
> <orika@mellanox.com>; Richardson, Bruce <bruce.richardson@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Nicolau, Radu <radu.nicolau@intel.com>; Akhil Goyal <akhil.goyal@nxp.com>; Kantecki, Tomasz
> <tomasz.kantecki@intel.com>; Van Haaren, Harry <harry.van.haaren@intel.com>; Jijiang Liu <jijiang.liu@intel.com>; Ravi Kumar
> <ravi1.kumar@amd.com>; Ananyev, Konstantin <konstantin.ananyev@intel.com>; Maxime Coquelin
> <maxime.coquelin@redhat.com>; Bie, Tiwei <tiwei.bie@intel.com>; Yong Wang <yongwang@vmware.com>; Mokhtar, Amr
> <amr.mokhtar@intel.com>; Doherty, Declan <declan.doherty@intel.com>; Chas Williams <chas3@att.com>; Hunt, David
> <david.hunt@intel.com>; Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Burakov, Anatoly <anatoly.burakov@intel.com>;
> Pattan, Reshma <reshma.pattan@intel.com>; Marohn, Byron <byron.marohn@intel.com>; Thomas Monjalon
> <thomas@monjalon.net>
> Cc: dev@dpdk.org
> Subject: Re: [RFC] ethdev: remove all offload API
>
> On 6/11/2018 12:00 PM, Shahaf Shuler wrote:
> > Hi Ferruh,
> >
> > Thanks for this patch.
> >
> > Monday, June 11, 2018 12:10 PM, Ferruh Yigit:
> >> Subject: Re: [RFC] ethdev: remove all offload API
> >>
> >> On 6/9/2018 9:04 AM, Andrew Rybchenko wrote:
> >>> On 06/09/2018 01:41 AM, Ferruh Yigit wrote:
> >>>> Cc: Shahaf Shuler <shahafs@mellanox.com>
> >>>>
> >>>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> >>>> ---
> >>>
> >>> <...>
> >>>
> >>>> diff --git a/app/test-eventdev/test_perf_common.c
> >>>> b/app/test-eventdev/test_perf_common.c
> >>>> index d00f91802..9fe042ffe 100644
> >>>> --- a/app/test-eventdev/test_perf_common.c
> >>>> +++ b/app/test-eventdev/test_perf_common.c
> >>>> @@ -680,13 +680,7 @@ perf_ethdev_setup(struct evt_test *test, struct
> >> evt_options *opt)
> >>>> .mq_mode = ETH_MQ_RX_RSS,
> >>>> .max_rx_pkt_len = ETHER_MAX_LEN,
> >>>> .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 = 1,
> >>>
> >>
> >> Hi Andrew,
> >>
> >>> I have 2 questions here:
> >>> 1. Why is jumbo_frame kept? There is
> >> DEV_RX_OFFLOAD_JUMBO_FRAME.
> >>
> >> Because there are still some usage of this flag in PMDs, they need to be
> >> clarified before removing the flag. I am for removing the flag in final version,
> >> but for this RFC I am not able to find enough time to work on PMDs for it.
> >
> > Can you elaborate?
> > Is this something more than just a replace of the jumbo_frame bit with its corresponding flag?
>
> That was my concern that copy paste won't be enough because some drivers not
> just use the jumbo_frame but set it based on max_rx_pkt_len etc.., that is why
> left out .jumbo_frame in the RFC.
But max_rx_pkt_len need to be remained (and properly processed anyway) no?
BTW, I always wonder is there any reason to have jumbo_frame flag at all
(as we do have max_rx_pkt_len anyway)?
Konstantin
>
> >
> >>
> >>> 2. Why is hw_strip_crc=1 discarded? Yes, I remember plans to make it
> >>> default behaviour and introduce flag to keep CRC, but right now
> >>> the
> >>> patch looks like mixture of two changes which is not good.
> >>
> >> Yes it is wrong, app should replace "".hw_strip_crc=1 with KEEP_CRC offload.
> >> Since both are RFC, kind of hard to maintain, but I think good to create a
> >> dependency from this patch to KEEP_CRC one.
> >>
> >>>
> >>> There are more cases in the patch where hw_strip_crc=1 is simply
> >> discarded.
> >>>
> >>> <...>
> >>>
> >>>> diff --git a/drivers/net/sfc/sfc_ethdev.c
> >>>> b/drivers/net/sfc/sfc_ethdev.c index 1b6499f85..ee8ae5b9f 100644
> >>>> --- a/drivers/net/sfc/sfc_ethdev.c
> >>>> +++ b/drivers/net/sfc/sfc_ethdev.c
> >>>> @@ -1089,7 +1089,6 @@ sfc_tx_queue_info_get(struct rte_eth_dev
> >> *dev,
> >>>> uint16_t tx_queue_id,
> >>>>
> >>>> memset(qinfo, 0, sizeof(*qinfo));
> >>>>
> >>>> - qinfo->conf.txq_flags = txq_info->txq->flags;
> >>>> qinfo->conf.offloads = txq_info->txq->offloads;
> >>>> qinfo->conf.tx_free_thresh = txq_info->txq->free_thresh;
> >>>> qinfo->conf.tx_deferred_start = txq_info->deferred_start; diff
> >>>> --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index
> >>>> cc76a5b15..58a0df583 100644
> >>>> --- a/drivers/net/sfc/sfc_rx.c
> >>>> +++ b/drivers/net/sfc/sfc_rx.c
> >>>> @@ -1446,7 +1446,6 @@ sfc_rx_check_mode(struct sfc_adapter *sa,
> >> struct rte_eth_rxmode *rxmode)
> >>>> if (~rxmode->offloads & DEV_RX_OFFLOAD_CRC_STRIP) {
> >>>> sfc_warn(sa, "FCS stripping cannot be disabled - always on");
> >>>> rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
> >>>> - rxmode->hw_strip_crc = 1;
> >>>> }
> >>>>
> >>>> return rc;
> >>>> diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
> >>>> index 1bcc2c697..6d42a1a65 100644
> >>>> --- a/drivers/net/sfc/sfc_tx.c
> >>>> +++ b/drivers/net/sfc/sfc_tx.c
> >>>> @@ -171,7 +171,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int
> >> sw_index,
> >>>> txq->free_thresh =
> >>>> (tx_conf->tx_free_thresh) ? tx_conf->tx_free_thresh :
> >>>> SFC_TX_DEFAULT_FREE_THRESH;
> >>>> - txq->flags = tx_conf->txq_flags;
> >>>> txq->offloads = offloads;
> >>>>
> >>>> rc = sfc_dma_alloc(sa, "txq", sw_index,
> >>>> EFX_TXQ_SIZE(txq_info->entries), @@ -182,7 +181,6 @@
> >> sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
> >>>> memset(&info, 0, sizeof(info));
> >>>> info.max_fill_level = txq_max_fill_level;
> >>>> info.free_thresh = txq->free_thresh;
> >>>> - info.flags = tx_conf->txq_flags;
> >>>> info.offloads = offloads;
> >>>> info.txq_entries = txq_info->entries;
> >>>> info.dma_desc_size_max = encp->enc_tx_dma_desc_size_max;
> >> @@ -431,18
> >>>> +429,10 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
> >>>> if (rc != 0)
> >>>> goto fail_ev_qstart;
> >>>>
> >>>> - /*
> >>>> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a
> >> legacy
> >>>> - * application which expects that IPv4 checksum offload is enabled
> >>>> - * all the time as there is no legacy flag to turn off the offload.
> >>>> - */
> >>>> - if ((txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) ||
> >>>> - (~txq->flags & ETH_TXQ_FLAGS_IGNORE))
> >>>> + if (txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)
> >>>> flags |= EFX_TXQ_CKSUM_IPV4;
> >>>>
> >>>> - if ((txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
> >>>> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
> >>>> - (offloads_supported &
> >> DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)))
> >>>> + if (txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
> >>>> flags |= EFX_TXQ_CKSUM_INNER_IPV4;
> >>>>
> >>>> if ((txq->offloads & DEV_TX_OFFLOAD_TCP_CKSUM) || @@ -453,16
> >> +443,7
> >>>> @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
> >>>> flags |= EFX_TXQ_CKSUM_INNER_TCPUDP;
> >>>> }
> >>>>
> >>>> - /*
> >>>> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a
> >> legacy
> >>>> - * application. In turn, the absence of ETH_TXQ_FLAGS_NOXSUMTCP
> >> is
> >>>> - * associated specifically with a legacy application which expects
> >>>> - * both TCP checksum offload and TSO to be enabled because the
> >> legacy
> >>>> - * API does not provide a dedicated mechanism to control TSO.
> >>>> - */
> >>>> - if ((txq->offloads & DEV_TX_OFFLOAD_TCP_TSO) ||
> >>>> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
> >>>> - (~txq->flags & ETH_TXQ_FLAGS_NOXSUMTCP)))
> >>>> + if (txq->offloads & DEV_TX_OFFLOAD_TCP_TSO)
> >>>> flags |= EFX_TXQ_FATSOV2;
> >>>>
> >>>> rc = efx_tx_qcreate(sa->nic, sw_index, 0, &txq->mem,
> >>>
> >>> net/sfc changes looks good.
> >>> Plus 'struct sfc_txq -> flags' (drivers/net/sfc/sfc_tx.h) and 'struct
> >>> sfc_dp_tx_qcreate_info -> flags' (drivers/net/sfc/sfc_dp_tx.h) should
> >>> be removed since there are not used now.
> >>>
> >>> If finally rxmode.jumbo_frame is removed, it should removed from
> >>> net/sfc as well (but compiler will help to find it in any case).
> >>>
> >>> After applying the patch:
> >>> $ git grep ETH_TXQ_FLAGS
> >>> drivers/net/fm10k/fm10k.h:#define FM10K_SIMPLE_TX_FLAG
> >>> ((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \
> >>> drivers/net/fm10k/fm10k.h:
> >>> ETH_TXQ_FLAGS_NOOFFLOADS)
> >>
> >> Thanks, will remove this too.
> >>
> >>>
> >>> In general I think that we should do it ASAP. Also it will guarantee
> >>> that new PMDs do not use corresponding structure members etc.
> >>
> >> +1, +1
> >
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [RFC] ethdev: remove all offload API
2018-06-11 11:26 ` Ananyev, Konstantin
@ 2018-06-11 11:35 ` Ferruh Yigit
2018-06-11 11:35 ` Shahaf Shuler
1 sibling, 0 replies; 25+ messages in thread
From: Ferruh Yigit @ 2018-06-11 11:35 UTC (permalink / raw)
To: Ananyev, Konstantin, Shahaf Shuler, Andrew Rybchenko,
Jerin Jacob, Lu, Wenzhuo, Wu, Jingjing, Iremonger, Bernard,
Mcnamara, John, Kovacevic, Marko, Neil Horman, Horton, Remy,
Ori Kam, Richardson, Bruce, De Lara Guarch, Pablo, Nicolau, Radu,
Akhil Goyal, Kantecki, Tomasz, Van Haaren, Harry, Jijiang Liu,
Ravi Kumar, Maxime Coquelin, Bie, Tiwei, Yong Wang, Mokhtar, Amr,
Doherty, Declan, Chas Williams, Hunt, David, Dumitrescu,
Cristian, Burakov, Anatoly, Pattan, Reshma, Marohn, Byron,
Thomas Monjalon
Cc: dev
On 6/11/2018 12:26 PM, Ananyev, Konstantin wrote:
>
>
>> -----Original Message-----
>> From: Yigit, Ferruh
>> Sent: Monday, June 11, 2018 12:18 PM
>> To: Shahaf Shuler <shahafs@mellanox.com>; Andrew Rybchenko <arybchenko@solarflare.com>; Jerin Jacob
>> <jerin.jacob@caviumnetworks.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Iremonger,
>> Bernard <bernard.iremonger@intel.com>; Mcnamara, John <john.mcnamara@intel.com>; Kovacevic, Marko
>> <marko.kovacevic@intel.com>; Neil Horman <nhorman@tuxdriver.com>; Horton, Remy <remy.horton@intel.com>; Ori Kam
>> <orika@mellanox.com>; Richardson, Bruce <bruce.richardson@intel.com>; De Lara Guarch, Pablo
>> <pablo.de.lara.guarch@intel.com>; Nicolau, Radu <radu.nicolau@intel.com>; Akhil Goyal <akhil.goyal@nxp.com>; Kantecki, Tomasz
>> <tomasz.kantecki@intel.com>; Van Haaren, Harry <harry.van.haaren@intel.com>; Jijiang Liu <jijiang.liu@intel.com>; Ravi Kumar
>> <ravi1.kumar@amd.com>; Ananyev, Konstantin <konstantin.ananyev@intel.com>; Maxime Coquelin
>> <maxime.coquelin@redhat.com>; Bie, Tiwei <tiwei.bie@intel.com>; Yong Wang <yongwang@vmware.com>; Mokhtar, Amr
>> <amr.mokhtar@intel.com>; Doherty, Declan <declan.doherty@intel.com>; Chas Williams <chas3@att.com>; Hunt, David
>> <david.hunt@intel.com>; Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Burakov, Anatoly <anatoly.burakov@intel.com>;
>> Pattan, Reshma <reshma.pattan@intel.com>; Marohn, Byron <byron.marohn@intel.com>; Thomas Monjalon
>> <thomas@monjalon.net>
>> Cc: dev@dpdk.org
>> Subject: Re: [RFC] ethdev: remove all offload API
>>
>> On 6/11/2018 12:00 PM, Shahaf Shuler wrote:
>>> Hi Ferruh,
>>>
>>> Thanks for this patch.
>>>
>>> Monday, June 11, 2018 12:10 PM, Ferruh Yigit:
>>>> Subject: Re: [RFC] ethdev: remove all offload API
>>>>
>>>> On 6/9/2018 9:04 AM, Andrew Rybchenko wrote:
>>>>> On 06/09/2018 01:41 AM, Ferruh Yigit wrote:
>>>>>> Cc: Shahaf Shuler <shahafs@mellanox.com>
>>>>>>
>>>>>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>>>>>> ---
>>>>>
>>>>> <...>
>>>>>
>>>>>> diff --git a/app/test-eventdev/test_perf_common.c
>>>>>> b/app/test-eventdev/test_perf_common.c
>>>>>> index d00f91802..9fe042ffe 100644
>>>>>> --- a/app/test-eventdev/test_perf_common.c
>>>>>> +++ b/app/test-eventdev/test_perf_common.c
>>>>>> @@ -680,13 +680,7 @@ perf_ethdev_setup(struct evt_test *test, struct
>>>> evt_options *opt)
>>>>>> .mq_mode = ETH_MQ_RX_RSS,
>>>>>> .max_rx_pkt_len = ETHER_MAX_LEN,
>>>>>> .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 = 1,
>>>>>
>>>>
>>>> Hi Andrew,
>>>>
>>>>> I have 2 questions here:
>>>>> 1. Why is jumbo_frame kept? There is
>>>> DEV_RX_OFFLOAD_JUMBO_FRAME.
>>>>
>>>> Because there are still some usage of this flag in PMDs, they need to be
>>>> clarified before removing the flag. I am for removing the flag in final version,
>>>> but for this RFC I am not able to find enough time to work on PMDs for it.
>>>
>>> Can you elaborate?
>>> Is this something more than just a replace of the jumbo_frame bit with its corresponding flag?
>>
>> That was my concern that copy paste won't be enough because some drivers not
>> just use the jumbo_frame but set it based on max_rx_pkt_len etc.., that is why
>> left out .jumbo_frame in the RFC.
>
> But max_rx_pkt_len need to be remained (and properly processed anyway) no?
Yes, it will remain.
> BTW, I always wonder is there any reason to have jumbo_frame flag at all
> (as we do have max_rx_pkt_len anyway)?
agree that jumbo_frame flag, max_rx_pkt_len and mtu usage/relation can be
clarified more.
> Konstantin
>
>>
>>>
>>>>
>>>>> 2. Why is hw_strip_crc=1 discarded? Yes, I remember plans to make it
>>>>> default behaviour and introduce flag to keep CRC, but right now
>>>>> the
>>>>> patch looks like mixture of two changes which is not good.
>>>>
>>>> Yes it is wrong, app should replace "".hw_strip_crc=1 with KEEP_CRC offload.
>>>> Since both are RFC, kind of hard to maintain, but I think good to create a
>>>> dependency from this patch to KEEP_CRC one.
>>>>
>>>>>
>>>>> There are more cases in the patch where hw_strip_crc=1 is simply
>>>> discarded.
>>>>>
>>>>> <...>
>>>>>
>>>>>> diff --git a/drivers/net/sfc/sfc_ethdev.c
>>>>>> b/drivers/net/sfc/sfc_ethdev.c index 1b6499f85..ee8ae5b9f 100644
>>>>>> --- a/drivers/net/sfc/sfc_ethdev.c
>>>>>> +++ b/drivers/net/sfc/sfc_ethdev.c
>>>>>> @@ -1089,7 +1089,6 @@ sfc_tx_queue_info_get(struct rte_eth_dev
>>>> *dev,
>>>>>> uint16_t tx_queue_id,
>>>>>>
>>>>>> memset(qinfo, 0, sizeof(*qinfo));
>>>>>>
>>>>>> - qinfo->conf.txq_flags = txq_info->txq->flags;
>>>>>> qinfo->conf.offloads = txq_info->txq->offloads;
>>>>>> qinfo->conf.tx_free_thresh = txq_info->txq->free_thresh;
>>>>>> qinfo->conf.tx_deferred_start = txq_info->deferred_start; diff
>>>>>> --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index
>>>>>> cc76a5b15..58a0df583 100644
>>>>>> --- a/drivers/net/sfc/sfc_rx.c
>>>>>> +++ b/drivers/net/sfc/sfc_rx.c
>>>>>> @@ -1446,7 +1446,6 @@ sfc_rx_check_mode(struct sfc_adapter *sa,
>>>> struct rte_eth_rxmode *rxmode)
>>>>>> if (~rxmode->offloads & DEV_RX_OFFLOAD_CRC_STRIP) {
>>>>>> sfc_warn(sa, "FCS stripping cannot be disabled - always on");
>>>>>> rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
>>>>>> - rxmode->hw_strip_crc = 1;
>>>>>> }
>>>>>>
>>>>>> return rc;
>>>>>> diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
>>>>>> index 1bcc2c697..6d42a1a65 100644
>>>>>> --- a/drivers/net/sfc/sfc_tx.c
>>>>>> +++ b/drivers/net/sfc/sfc_tx.c
>>>>>> @@ -171,7 +171,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int
>>>> sw_index,
>>>>>> txq->free_thresh =
>>>>>> (tx_conf->tx_free_thresh) ? tx_conf->tx_free_thresh :
>>>>>> SFC_TX_DEFAULT_FREE_THRESH;
>>>>>> - txq->flags = tx_conf->txq_flags;
>>>>>> txq->offloads = offloads;
>>>>>>
>>>>>> rc = sfc_dma_alloc(sa, "txq", sw_index,
>>>>>> EFX_TXQ_SIZE(txq_info->entries), @@ -182,7 +181,6 @@
>>>> sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
>>>>>> memset(&info, 0, sizeof(info));
>>>>>> info.max_fill_level = txq_max_fill_level;
>>>>>> info.free_thresh = txq->free_thresh;
>>>>>> - info.flags = tx_conf->txq_flags;
>>>>>> info.offloads = offloads;
>>>>>> info.txq_entries = txq_info->entries;
>>>>>> info.dma_desc_size_max = encp->enc_tx_dma_desc_size_max;
>>>> @@ -431,18
>>>>>> +429,10 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
>>>>>> if (rc != 0)
>>>>>> goto fail_ev_qstart;
>>>>>>
>>>>>> - /*
>>>>>> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a
>>>> legacy
>>>>>> - * application which expects that IPv4 checksum offload is enabled
>>>>>> - * all the time as there is no legacy flag to turn off the offload.
>>>>>> - */
>>>>>> - if ((txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) ||
>>>>>> - (~txq->flags & ETH_TXQ_FLAGS_IGNORE))
>>>>>> + if (txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)
>>>>>> flags |= EFX_TXQ_CKSUM_IPV4;
>>>>>>
>>>>>> - if ((txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
>>>>>> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
>>>>>> - (offloads_supported &
>>>> DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)))
>>>>>> + if (txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
>>>>>> flags |= EFX_TXQ_CKSUM_INNER_IPV4;
>>>>>>
>>>>>> if ((txq->offloads & DEV_TX_OFFLOAD_TCP_CKSUM) || @@ -453,16
>>>> +443,7
>>>>>> @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
>>>>>> flags |= EFX_TXQ_CKSUM_INNER_TCPUDP;
>>>>>> }
>>>>>>
>>>>>> - /*
>>>>>> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a
>>>> legacy
>>>>>> - * application. In turn, the absence of ETH_TXQ_FLAGS_NOXSUMTCP
>>>> is
>>>>>> - * associated specifically with a legacy application which expects
>>>>>> - * both TCP checksum offload and TSO to be enabled because the
>>>> legacy
>>>>>> - * API does not provide a dedicated mechanism to control TSO.
>>>>>> - */
>>>>>> - if ((txq->offloads & DEV_TX_OFFLOAD_TCP_TSO) ||
>>>>>> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
>>>>>> - (~txq->flags & ETH_TXQ_FLAGS_NOXSUMTCP)))
>>>>>> + if (txq->offloads & DEV_TX_OFFLOAD_TCP_TSO)
>>>>>> flags |= EFX_TXQ_FATSOV2;
>>>>>>
>>>>>> rc = efx_tx_qcreate(sa->nic, sw_index, 0, &txq->mem,
>>>>>
>>>>> net/sfc changes looks good.
>>>>> Plus 'struct sfc_txq -> flags' (drivers/net/sfc/sfc_tx.h) and 'struct
>>>>> sfc_dp_tx_qcreate_info -> flags' (drivers/net/sfc/sfc_dp_tx.h) should
>>>>> be removed since there are not used now.
>>>>>
>>>>> If finally rxmode.jumbo_frame is removed, it should removed from
>>>>> net/sfc as well (but compiler will help to find it in any case).
>>>>>
>>>>> After applying the patch:
>>>>> $ git grep ETH_TXQ_FLAGS
>>>>> drivers/net/fm10k/fm10k.h:#define FM10K_SIMPLE_TX_FLAG
>>>>> ((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \
>>>>> drivers/net/fm10k/fm10k.h:
>>>>> ETH_TXQ_FLAGS_NOOFFLOADS)
>>>>
>>>> Thanks, will remove this too.
>>>>
>>>>>
>>>>> In general I think that we should do it ASAP. Also it will guarantee
>>>>> that new PMDs do not use corresponding structure members etc.
>>>>
>>>> +1, +1
>>>
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [RFC] ethdev: remove all offload API
2018-06-11 11:26 ` Ananyev, Konstantin
2018-06-11 11:35 ` Ferruh Yigit
@ 2018-06-11 11:35 ` Shahaf Shuler
2018-06-11 12:12 ` Ferruh Yigit
1 sibling, 1 reply; 25+ messages in thread
From: Shahaf Shuler @ 2018-06-11 11:35 UTC (permalink / raw)
To: Ananyev, Konstantin, Yigit, Ferruh, Andrew Rybchenko,
Jerin Jacob, Lu, Wenzhuo, Wu, Jingjing, Iremonger, Bernard,
Mcnamara, John, Kovacevic, Marko, Neil Horman, Horton, Remy,
Ori Kam, Richardson, Bruce, De Lara Guarch, Pablo, Nicolau, Radu,
Akhil Goyal, Kantecki, Tomasz, Van Haaren, Harry, Jijiang Liu,
Ravi Kumar, Maxime Coquelin, Bie, Tiwei, Yong Wang, Mokhtar, Amr,
Doherty, Declan, Chas Williams, Hunt, David, Dumitrescu,
Cristian, Burakov, Anatoly, Pattan, Reshma, Marohn, Byron,
Thomas Monjalon
Cc: dev
Monday, June 11, 2018 2:26 PM, Ananyev, Konstantin:
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [RFC] ethdev: remove all offload API
> > Subject: Re: [RFC] ethdev: remove all offload API
> >
> > On 6/11/2018 12:00 PM, Shahaf Shuler wrote:
> > > Hi Ferruh,
> > >
> > > Thanks for this patch.
> > >
> > > Monday, June 11, 2018 12:10 PM, Ferruh Yigit:
> > >> Subject: Re: [RFC] ethdev: remove all offload API
> > >>
> > >> On 6/9/2018 9:04 AM, Andrew Rybchenko wrote:
> > >>> On 06/09/2018 01:41 AM, Ferruh Yigit wrote:
> > >>>> Cc: Shahaf Shuler <shahafs@mellanox.com>
> > >>>>
> > >>>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > >>>> ---
> > >>>
> > >>> <...>
> > >>>
> > >>>> diff --git a/app/test-eventdev/test_perf_common.c
> > >>>> b/app/test-eventdev/test_perf_common.c
> > >>>> index d00f91802..9fe042ffe 100644
> > >>>> --- a/app/test-eventdev/test_perf_common.c
> > >>>> +++ b/app/test-eventdev/test_perf_common.c
> > >>>> @@ -680,13 +680,7 @@ perf_ethdev_setup(struct evt_test *test,
> > >>>> struct
> > >> evt_options *opt)
> > >>>> .mq_mode = ETH_MQ_RX_RSS,
> > >>>> .max_rx_pkt_len = ETHER_MAX_LEN,
> > >>>> .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 = 1,
> > >>>
> > >>
> > >> Hi Andrew,
> > >>
> > >>> I have 2 questions here:
> > >>> 1. Why is jumbo_frame kept? There is
> > >> DEV_RX_OFFLOAD_JUMBO_FRAME.
> > >>
> > >> Because there are still some usage of this flag in PMDs, they need
> > >> to be clarified before removing the flag. I am for removing the
> > >> flag in final version, but for this RFC I am not able to find enough time to
> work on PMDs for it.
> > >
> > > Can you elaborate?
> > > Is this something more than just a replace of the jumbo_frame bit with its
> corresponding flag?
> >
> > That was my concern that copy paste won't be enough because some
> > drivers not just use the jumbo_frame but set it based on
> > max_rx_pkt_len etc.., that is why left out .jumbo_frame in the RFC.
I understand the max_rx_pkt_len consideration, but in the end there is some logic which decide if to set/not the jumbo_frame bit. I would expect it just to replace it with the JUMBO_FRAME flag w/o touching the rest of the logic.
Can you refer to some specific file which you encounter it?
>
> But max_rx_pkt_len need to be remained (and properly processed anyway)
> no?
> BTW, I always wonder is there any reason to have jumbo_frame flag at all (as
> we do have max_rx_pkt_len anyway)?
I share the same thought, and it was expressed in multiple threads. There is more - {MTU, SCATTER, JUMBO_FRAME}, all are connected and depended only on max_rx_pkt_len and mbuf size.
However I think it is too much work to include into this RFC and completely orthogonal.
> Konstantin
>
> >
> > >
> > >>
> > >>> 2. Why is hw_strip_crc=1 discarded? Yes, I remember plans to make
> > >>> it
> > >>> default behaviour and introduce flag to keep CRC, but right
> > >>> now the
> > >>> patch looks like mixture of two changes which is not good.
> > >>
> > >> Yes it is wrong, app should replace "".hw_strip_crc=1 with KEEP_CRC
> offload.
> > >> Since both are RFC, kind of hard to maintain, but I think good to
> > >> create a dependency from this patch to KEEP_CRC one.
> > >>
> > >>>
> > >>> There are more cases in the patch where hw_strip_crc=1 is simply
> > >> discarded.
> > >>>
> > >>> <...>
> > >>>
> > >>>> diff --git a/drivers/net/sfc/sfc_ethdev.c
> > >>>> b/drivers/net/sfc/sfc_ethdev.c index 1b6499f85..ee8ae5b9f 100644
> > >>>> --- a/drivers/net/sfc/sfc_ethdev.c
> > >>>> +++ b/drivers/net/sfc/sfc_ethdev.c
> > >>>> @@ -1089,7 +1089,6 @@ sfc_tx_queue_info_get(struct rte_eth_dev
> > >> *dev,
> > >>>> uint16_t tx_queue_id,
> > >>>>
> > >>>> memset(qinfo, 0, sizeof(*qinfo));
> > >>>>
> > >>>> - qinfo->conf.txq_flags = txq_info->txq->flags;
> > >>>> qinfo->conf.offloads = txq_info->txq->offloads;
> > >>>> qinfo->conf.tx_free_thresh = txq_info->txq->free_thresh;
> > >>>> qinfo->conf.tx_deferred_start = txq_info->deferred_start;
> diff
> > >>>> --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index
> > >>>> cc76a5b15..58a0df583 100644
> > >>>> --- a/drivers/net/sfc/sfc_rx.c
> > >>>> +++ b/drivers/net/sfc/sfc_rx.c
> > >>>> @@ -1446,7 +1446,6 @@ sfc_rx_check_mode(struct sfc_adapter *sa,
> > >> struct rte_eth_rxmode *rxmode)
> > >>>> if (~rxmode->offloads & DEV_RX_OFFLOAD_CRC_STRIP) {
> > >>>> sfc_warn(sa, "FCS stripping cannot be disabled -
> always on");
> > >>>> rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
> > >>>> - rxmode->hw_strip_crc = 1;
> > >>>> }
> > >>>>
> > >>>> return rc;
> > >>>> diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
> > >>>> index 1bcc2c697..6d42a1a65 100644
> > >>>> --- a/drivers/net/sfc/sfc_tx.c
> > >>>> +++ b/drivers/net/sfc/sfc_tx.c
> > >>>> @@ -171,7 +171,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned
> > >>>> int
> > >> sw_index,
> > >>>> txq->free_thresh =
> > >>>> (tx_conf->tx_free_thresh) ? tx_conf-
> >tx_free_thresh :
> > >>>> SFC_TX_DEFAULT_FREE_THRESH;
> > >>>> - txq->flags = tx_conf->txq_flags;
> > >>>> txq->offloads = offloads;
> > >>>>
> > >>>> rc = sfc_dma_alloc(sa, "txq", sw_index,
> > >>>> EFX_TXQ_SIZE(txq_info->entries), @@ -182,7 +181,6 @@
> > >> sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
> > >>>> memset(&info, 0, sizeof(info));
> > >>>> info.max_fill_level = txq_max_fill_level;
> > >>>> info.free_thresh = txq->free_thresh;
> > >>>> - info.flags = tx_conf->txq_flags;
> > >>>> info.offloads = offloads;
> > >>>> info.txq_entries = txq_info->entries;
> > >>>> info.dma_desc_size_max = encp-
> >enc_tx_dma_desc_size_max;
> > >> @@ -431,18
> > >>>> +429,10 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int
> > >>>> +sw_index)
> > >>>> if (rc != 0)
> > >>>> goto fail_ev_qstart;
> > >>>>
> > >>>> - /*
> > >>>> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated
> with a
> > >> legacy
> > >>>> - * application which expects that IPv4 checksum offload is
> enabled
> > >>>> - * all the time as there is no legacy flag to turn off the offload.
> > >>>> - */
> > >>>> - if ((txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) ||
> > >>>> - (~txq->flags & ETH_TXQ_FLAGS_IGNORE))
> > >>>> + if (txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)
> > >>>> flags |= EFX_TXQ_CKSUM_IPV4;
> > >>>>
> > >>>> - if ((txq->offloads &
> DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
> > >>>> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
> > >>>> - (offloads_supported &
> > >> DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)))
> > >>>> + if (txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
> > >>>> flags |= EFX_TXQ_CKSUM_INNER_IPV4;
> > >>>>
> > >>>> if ((txq->offloads & DEV_TX_OFFLOAD_TCP_CKSUM) || @@
> -453,16
> > >> +443,7
> > >>>> @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
> > >>>> flags |= EFX_TXQ_CKSUM_INNER_TCPUDP;
> > >>>> }
> > >>>>
> > >>>> - /*
> > >>>> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated
> with a
> > >> legacy
> > >>>> - * application. In turn, the absence of
> ETH_TXQ_FLAGS_NOXSUMTCP
> > >> is
> > >>>> - * associated specifically with a legacy application which
> expects
> > >>>> - * both TCP checksum offload and TSO to be enabled
> because the
> > >> legacy
> > >>>> - * API does not provide a dedicated mechanism to control
> TSO.
> > >>>> - */
> > >>>> - if ((txq->offloads & DEV_TX_OFFLOAD_TCP_TSO) ||
> > >>>> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
> > >>>> - (~txq->flags & ETH_TXQ_FLAGS_NOXSUMTCP)))
> > >>>> + if (txq->offloads & DEV_TX_OFFLOAD_TCP_TSO)
> > >>>> flags |= EFX_TXQ_FATSOV2;
> > >>>>
> > >>>> rc = efx_tx_qcreate(sa->nic, sw_index, 0, &txq->mem,
> > >>>
> > >>> net/sfc changes looks good.
> > >>> Plus 'struct sfc_txq -> flags' (drivers/net/sfc/sfc_tx.h) and
> > >>> 'struct sfc_dp_tx_qcreate_info -> flags'
> > >>> (drivers/net/sfc/sfc_dp_tx.h) should be removed since there are not
> used now.
> > >>>
> > >>> If finally rxmode.jumbo_frame is removed, it should removed from
> > >>> net/sfc as well (but compiler will help to find it in any case).
> > >>>
> > >>> After applying the patch:
> > >>> $ git grep ETH_TXQ_FLAGS
> > >>> drivers/net/fm10k/fm10k.h:#define FM10K_SIMPLE_TX_FLAG
> > >>> ((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \
> > >>> drivers/net/fm10k/fm10k.h:
> > >>> ETH_TXQ_FLAGS_NOOFFLOADS)
> > >>
> > >> Thanks, will remove this too.
> > >>
> > >>>
> > >>> In general I think that we should do it ASAP. Also it will
> > >>> guarantee that new PMDs do not use corresponding structure
> members etc.
> > >>
> > >> +1, +1
> > >
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [RFC] ethdev: remove all offload API
2018-06-11 11:35 ` Shahaf Shuler
@ 2018-06-11 12:12 ` Ferruh Yigit
0 siblings, 0 replies; 25+ messages in thread
From: Ferruh Yigit @ 2018-06-11 12:12 UTC (permalink / raw)
To: Shahaf Shuler, Ananyev, Konstantin, Andrew Rybchenko,
Jerin Jacob, Lu, Wenzhuo, Wu, Jingjing, Iremonger, Bernard,
Mcnamara, John, Kovacevic, Marko, Neil Horman, Horton, Remy,
Ori Kam, Richardson, Bruce, De Lara Guarch, Pablo, Nicolau, Radu,
Akhil Goyal, Kantecki, Tomasz, Van Haaren, Harry, Jijiang Liu,
Ravi Kumar, Maxime Coquelin, Bie, Tiwei, Yong Wang, Mokhtar, Amr,
Doherty, Declan, Chas Williams, Hunt, David, Dumitrescu,
Cristian, Burakov, Anatoly, Pattan, Reshma, Marohn, Byron,
Thomas Monjalon
Cc: dev
On 6/11/2018 12:35 PM, Shahaf Shuler wrote:
> Monday, June 11, 2018 2:26 PM, Ananyev, Konstantin:
>> Cc: dev@dpdk.org
>> Subject: Re: [dpdk-dev] [RFC] ethdev: remove all offload API
>>> Subject: Re: [RFC] ethdev: remove all offload API
>>>
>>> On 6/11/2018 12:00 PM, Shahaf Shuler wrote:
>>>> Hi Ferruh,
>>>>
>>>> Thanks for this patch.
>>>>
>>>> Monday, June 11, 2018 12:10 PM, Ferruh Yigit:
>>>>> Subject: Re: [RFC] ethdev: remove all offload API
>>>>>
>>>>> On 6/9/2018 9:04 AM, Andrew Rybchenko wrote:
>>>>>> On 06/09/2018 01:41 AM, Ferruh Yigit wrote:
>>>>>>> Cc: Shahaf Shuler <shahafs@mellanox.com>
>>>>>>>
>>>>>>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>>>>>>> ---
>>>>>>
>>>>>> <...>
>>>>>>
>>>>>>> diff --git a/app/test-eventdev/test_perf_common.c
>>>>>>> b/app/test-eventdev/test_perf_common.c
>>>>>>> index d00f91802..9fe042ffe 100644
>>>>>>> --- a/app/test-eventdev/test_perf_common.c
>>>>>>> +++ b/app/test-eventdev/test_perf_common.c
>>>>>>> @@ -680,13 +680,7 @@ perf_ethdev_setup(struct evt_test *test,
>>>>>>> struct
>>>>> evt_options *opt)
>>>>>>> .mq_mode = ETH_MQ_RX_RSS,
>>>>>>> .max_rx_pkt_len = ETHER_MAX_LEN,
>>>>>>> .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 = 1,
>>>>>>
>>>>>
>>>>> Hi Andrew,
>>>>>
>>>>>> I have 2 questions here:
>>>>>> 1. Why is jumbo_frame kept? There is
>>>>> DEV_RX_OFFLOAD_JUMBO_FRAME.
>>>>>
>>>>> Because there are still some usage of this flag in PMDs, they need
>>>>> to be clarified before removing the flag. I am for removing the
>>>>> flag in final version, but for this RFC I am not able to find enough time to
>> work on PMDs for it.
>>>>
>>>> Can you elaborate?
>>>> Is this something more than just a replace of the jumbo_frame bit with its
>> corresponding flag?
>>>
>>> That was my concern that copy paste won't be enough because some
>>> drivers not just use the jumbo_frame but set it based on
>>> max_rx_pkt_len etc.., that is why left out .jumbo_frame in the RFC.
>
> I understand the max_rx_pkt_len consideration, but in the end there is some logic which decide if to set/not the jumbo_frame bit. I would expect it just to replace it with the JUMBO_FRAME flag w/o touching the rest of the logic.
>
> Can you refer to some specific file which you encounter it?
Hi Shahaf,
There is no specific usage, briefly while preparing RFC I concerned that the
jumbo_frame usage may not be straightforward and just left it in the RFC to not
mislead and postponed to consider later.
As mentioned before jumbo_frame should be replaced in final version of the patch.
Thanks,
ferruh
>
>>
>> But max_rx_pkt_len need to be remained (and properly processed anyway)
>> no?
>> BTW, I always wonder is there any reason to have jumbo_frame flag at all (as
>> we do have max_rx_pkt_len anyway)?
>
> I share the same thought, and it was expressed in multiple threads. There is more - {MTU, SCATTER, JUMBO_FRAME}, all are connected and depended only on max_rx_pkt_len and mbuf size.
> However I think it is too much work to include into this RFC and completely orthogonal.
>
>> Konstantin
>>
>>>
>>>>
>>>>>
>>>>>> 2. Why is hw_strip_crc=1 discarded? Yes, I remember plans to make
>>>>>> it
>>>>>> default behaviour and introduce flag to keep CRC, but right
>>>>>> now the
>>>>>> patch looks like mixture of two changes which is not good.
>>>>>
>>>>> Yes it is wrong, app should replace "".hw_strip_crc=1 with KEEP_CRC
>> offload.
>>>>> Since both are RFC, kind of hard to maintain, but I think good to
>>>>> create a dependency from this patch to KEEP_CRC one.
>>>>>
>>>>>>
>>>>>> There are more cases in the patch where hw_strip_crc=1 is simply
>>>>> discarded.
>>>>>>
>>>>>> <...>
>>>>>>
>>>>>>> diff --git a/drivers/net/sfc/sfc_ethdev.c
>>>>>>> b/drivers/net/sfc/sfc_ethdev.c index 1b6499f85..ee8ae5b9f 100644
>>>>>>> --- a/drivers/net/sfc/sfc_ethdev.c
>>>>>>> +++ b/drivers/net/sfc/sfc_ethdev.c
>>>>>>> @@ -1089,7 +1089,6 @@ sfc_tx_queue_info_get(struct rte_eth_dev
>>>>> *dev,
>>>>>>> uint16_t tx_queue_id,
>>>>>>>
>>>>>>> memset(qinfo, 0, sizeof(*qinfo));
>>>>>>>
>>>>>>> - qinfo->conf.txq_flags = txq_info->txq->flags;
>>>>>>> qinfo->conf.offloads = txq_info->txq->offloads;
>>>>>>> qinfo->conf.tx_free_thresh = txq_info->txq->free_thresh;
>>>>>>> qinfo->conf.tx_deferred_start = txq_info->deferred_start;
>> diff
>>>>>>> --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index
>>>>>>> cc76a5b15..58a0df583 100644
>>>>>>> --- a/drivers/net/sfc/sfc_rx.c
>>>>>>> +++ b/drivers/net/sfc/sfc_rx.c
>>>>>>> @@ -1446,7 +1446,6 @@ sfc_rx_check_mode(struct sfc_adapter *sa,
>>>>> struct rte_eth_rxmode *rxmode)
>>>>>>> if (~rxmode->offloads & DEV_RX_OFFLOAD_CRC_STRIP) {
>>>>>>> sfc_warn(sa, "FCS stripping cannot be disabled -
>> always on");
>>>>>>> rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
>>>>>>> - rxmode->hw_strip_crc = 1;
>>>>>>> }
>>>>>>>
>>>>>>> return rc;
>>>>>>> diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
>>>>>>> index 1bcc2c697..6d42a1a65 100644
>>>>>>> --- a/drivers/net/sfc/sfc_tx.c
>>>>>>> +++ b/drivers/net/sfc/sfc_tx.c
>>>>>>> @@ -171,7 +171,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned
>>>>>>> int
>>>>> sw_index,
>>>>>>> txq->free_thresh =
>>>>>>> (tx_conf->tx_free_thresh) ? tx_conf-
>>> tx_free_thresh :
>>>>>>> SFC_TX_DEFAULT_FREE_THRESH;
>>>>>>> - txq->flags = tx_conf->txq_flags;
>>>>>>> txq->offloads = offloads;
>>>>>>>
>>>>>>> rc = sfc_dma_alloc(sa, "txq", sw_index,
>>>>>>> EFX_TXQ_SIZE(txq_info->entries), @@ -182,7 +181,6 @@
>>>>> sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
>>>>>>> memset(&info, 0, sizeof(info));
>>>>>>> info.max_fill_level = txq_max_fill_level;
>>>>>>> info.free_thresh = txq->free_thresh;
>>>>>>> - info.flags = tx_conf->txq_flags;
>>>>>>> info.offloads = offloads;
>>>>>>> info.txq_entries = txq_info->entries;
>>>>>>> info.dma_desc_size_max = encp-
>>> enc_tx_dma_desc_size_max;
>>>>> @@ -431,18
>>>>>>> +429,10 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int
>>>>>>> +sw_index)
>>>>>>> if (rc != 0)
>>>>>>> goto fail_ev_qstart;
>>>>>>>
>>>>>>> - /*
>>>>>>> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated
>> with a
>>>>> legacy
>>>>>>> - * application which expects that IPv4 checksum offload is
>> enabled
>>>>>>> - * all the time as there is no legacy flag to turn off the offload.
>>>>>>> - */
>>>>>>> - if ((txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) ||
>>>>>>> - (~txq->flags & ETH_TXQ_FLAGS_IGNORE))
>>>>>>> + if (txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)
>>>>>>> flags |= EFX_TXQ_CKSUM_IPV4;
>>>>>>>
>>>>>>> - if ((txq->offloads &
>> DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
>>>>>>> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
>>>>>>> - (offloads_supported &
>>>>> DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)))
>>>>>>> + if (txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
>>>>>>> flags |= EFX_TXQ_CKSUM_INNER_IPV4;
>>>>>>>
>>>>>>> if ((txq->offloads & DEV_TX_OFFLOAD_TCP_CKSUM) || @@
>> -453,16
>>>>> +443,7
>>>>>>> @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
>>>>>>> flags |= EFX_TXQ_CKSUM_INNER_TCPUDP;
>>>>>>> }
>>>>>>>
>>>>>>> - /*
>>>>>>> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated
>> with a
>>>>> legacy
>>>>>>> - * application. In turn, the absence of
>> ETH_TXQ_FLAGS_NOXSUMTCP
>>>>> is
>>>>>>> - * associated specifically with a legacy application which
>> expects
>>>>>>> - * both TCP checksum offload and TSO to be enabled
>> because the
>>>>> legacy
>>>>>>> - * API does not provide a dedicated mechanism to control
>> TSO.
>>>>>>> - */
>>>>>>> - if ((txq->offloads & DEV_TX_OFFLOAD_TCP_TSO) ||
>>>>>>> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
>>>>>>> - (~txq->flags & ETH_TXQ_FLAGS_NOXSUMTCP)))
>>>>>>> + if (txq->offloads & DEV_TX_OFFLOAD_TCP_TSO)
>>>>>>> flags |= EFX_TXQ_FATSOV2;
>>>>>>>
>>>>>>> rc = efx_tx_qcreate(sa->nic, sw_index, 0, &txq->mem,
>>>>>>
>>>>>> net/sfc changes looks good.
>>>>>> Plus 'struct sfc_txq -> flags' (drivers/net/sfc/sfc_tx.h) and
>>>>>> 'struct sfc_dp_tx_qcreate_info -> flags'
>>>>>> (drivers/net/sfc/sfc_dp_tx.h) should be removed since there are not
>> used now.
>>>>>>
>>>>>> If finally rxmode.jumbo_frame is removed, it should removed from
>>>>>> net/sfc as well (but compiler will help to find it in any case).
>>>>>>
>>>>>> After applying the patch:
>>>>>> $ git grep ETH_TXQ_FLAGS
>>>>>> drivers/net/fm10k/fm10k.h:#define FM10K_SIMPLE_TX_FLAG
>>>>>> ((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \
>>>>>> drivers/net/fm10k/fm10k.h:
>>>>>> ETH_TXQ_FLAGS_NOOFFLOADS)
>>>>>
>>>>> Thanks, will remove this too.
>>>>>
>>>>>>
>>>>>> In general I think that we should do it ASAP. Also it will
>>>>>> guarantee that new PMDs do not use corresponding structure
>> members etc.
>>>>>
>>>>> +1, +1
>>>>
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [RFC] ethdev: remove all offload API
2018-06-08 22:41 [dpdk-dev] [RFC] ethdev: remove all offload API Ferruh Yigit
2018-06-08 21:52 ` Ferruh Yigit
2018-06-09 8:04 ` Andrew Rybchenko
@ 2018-06-29 1:11 ` Thomas Monjalon
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 0/5] remove old ethdev " Thomas Monjalon
2018-07-02 21:34 ` [dpdk-dev] [RFC] ethdev: remove all " Thomas Monjalon
2 siblings, 2 replies; 25+ messages in thread
From: Thomas Monjalon @ 2018-06-29 1:11 UTC (permalink / raw)
To: Ferruh Yigit, Shahaf Shuler
Cc: dev, Jerin Jacob, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger,
John McNamara, Marko Kovacevic, Neil Horman, Remy Horton,
Ori Kam, Bruce Richardson, Pablo de Lara, Radu Nicolau,
Akhil Goyal, Tomasz Kantecki, Harry van Haaren, Jijiang Liu,
Ravi Kumar, Konstantin Ananyev, Andrew Rybchenko,
Maxime Coquelin, Tiwei Bie, Yong Wang, Amr Mokhtar,
Declan Doherty, Chas Williams, David Hunt, Cristian Dumitrescu,
Anatoly Burakov, Reshma Pattan, Byron Marohn
09/06/2018 00:41, Ferruh Yigit:
> Cc: Shahaf Shuler <shahafs@mellanox.com>
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
I start working on it.
This is the list of remaining work on this patch:
- rebase
- add commit message (and fix title)
- check git grep ETH_TXQ_FLAGS_NO
- check git grep txq_flags
- rebase on top of KEEP_CRC flag
- remove jumbo_frame field
- check update of offload bits in apps
- mask with capability + warning auto-disabled offloads (can be separate)
^ permalink raw reply [flat|nested] 25+ messages in thread
* [dpdk-dev] [PATCH v2 0/5] remove old ethdev offload API
2018-06-29 1:11 ` Thomas Monjalon
@ 2018-07-02 21:27 ` Thomas Monjalon
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 1/5] doc: remove code from KNI example guide Thomas Monjalon
` (5 more replies)
2018-07-02 21:34 ` [dpdk-dev] [RFC] ethdev: remove all " Thomas Monjalon
1 sibling, 6 replies; 25+ messages in thread
From: Thomas Monjalon @ 2018-07-02 21:27 UTC (permalink / raw)
To: ferruh.yigit, arybchenko, shahafs
Cc: dev, ravi1.kumar, rasesh.mody, maxime.coquelin
A new offload API has been introduced in DPDK 17.11.
This patchset resumes the work started by Ferruh (RFC)
to definitely drop the old offload API.
There are:
- 3 patches to remove some useless code where the old API was found.
- 1 patch to remove usage of old API
- 1 (big) patch to remove the old API itself
Please review the big patch #5 written by Ferruh and me.
We would like to apply it shortly for 18.08-rc1.
Ferruh Yigit (1):
ethdev: remove old offload API
Thomas Monjalon (4):
doc: remove code from KNI example guide
test: remove unused configuration for bonding
ethdev: convert remaining apps to new offload API
net/fm10k: remove unused constant
app/test-eventdev/test_perf_common.c | 8 +-
app/test-eventdev/test_pipeline_common.c | 1 -
app/test-pmd/testpmd.c | 3 -
doc/guides/nics/features.rst | 1 -
doc/guides/prog_guide/poll_mode_drv.rst | 5 -
doc/guides/rel_notes/deprecation.rst | 9 -
doc/guides/sample_app_ug/flow_filtering.rst | 2 -
.../sample_app_ug/kernel_nic_interface.rst | 353 +-----------------
.../sample_app_ug/l2_forward_job_stats.rst | 19 -
.../sample_app_ug/l2_forward_real_virtual.rst | 19 -
doc/guides/sample_app_ug/link_status_intr.rst | 5 +-
.../sample_app_ug/vmdq_dcb_forwarding.rst | 4 -
drivers/net/axgbe/axgbe_ethdev.c | 2 -
drivers/net/axgbe/axgbe_rxtx.c | 4 +-
drivers/net/fm10k/fm10k.h | 3 -
drivers/net/ixgbe/ixgbe_rxtx.c | 2 +-
drivers/net/nfp/nfp_net.c | 4 +-
drivers/net/qede/qede_ethdev.c | 4 +-
drivers/net/sfc/sfc_dp_tx.h | 2 -
drivers/net/sfc/sfc_ethdev.c | 5 +-
drivers/net/sfc/sfc_rx.c | 1 -
drivers/net/sfc/sfc_tx.c | 25 +-
drivers/net/sfc/sfc_tx.h | 1 -
drivers/net/virtio/virtio_ethdev.c | 3 -
drivers/net/vmxnet3/vmxnet3_ethdev.c | 1 -
examples/bbdev_app/main.c | 6 +-
examples/bond/main.c | 3 -
examples/distributor/main.c | 2 -
examples/ethtool/ethtool-app/main.c | 2 -
examples/eventdev_pipeline/main.c | 2 -
examples/exception_path/main.c | 2 -
examples/flow_classify/flow_classify.c | 2 -
examples/flow_filtering/main.c | 1 -
examples/ip_fragmentation/main.c | 2 -
examples/ip_pipeline/link.c | 11 +-
examples/ip_reassembly/main.c | 2 -
examples/ipsec-secgw/ipsec-secgw.c | 2 -
examples/ipv4_multicast/main.c | 2 -
examples/kni/main.c | 2 -
examples/l2fwd-crypto/main.c | 2 -
examples/l2fwd-jobstats/main.c | 2 -
examples/l2fwd-keepalive/main.c | 2 -
examples/l2fwd/main.c | 2 -
examples/l3fwd-acl/main.c | 2 -
examples/l3fwd-power/main.c | 2 -
examples/l3fwd-vf/main.c | 2 -
examples/l3fwd/main.c | 2 -
examples/link_status_interrupt/main.c | 2 -
examples/load_balancer/init.c | 2 -
examples/multi_process/l2fwd_fork/main.c | 2 -
examples/multi_process/symmetric_mp/main.c | 2 -
examples/netmap_compat/bridge/bridge.c | 1 -
examples/netmap_compat/lib/compat_netmap.c | 1 -
examples/packet_ordering/main.c | 7 +-
.../performance-thread/l3fwd-thread/main.c | 2 -
examples/ptpclient/ptpclient.c | 3 -
examples/qos_meter/main.c | 3 -
examples/qos_sched/init.c | 2 -
examples/quota_watermark/qw/init.c | 2 -
examples/rxtx_callbacks/main.c | 2 -
examples/server_node_efd/server/init.c | 2 -
examples/skeleton/basicfwd.c | 2 -
examples/tep_termination/vxlan_setup.c | 2 -
examples/vhost/main.c | 2 -
examples/vm_power_manager/main.c | 2 -
examples/vmdq/main.c | 2 -
examples/vmdq_dcb/main.c | 2 -
lib/librte_ethdev/rte_ethdev.c | 115 ------
lib/librte_ethdev/rte_ethdev.h | 60 +--
test/test-pipeline/init.c | 6 +-
test/test/test_kni.c | 6 +-
test/test/test_link_bonding.c | 32 +-
test/test/test_link_bonding_mode4.c | 6 +-
test/test/test_link_bonding_rssconf.c | 12 +-
test/test/test_pmd_perf.c | 29 +-
75 files changed, 36 insertions(+), 818 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* [dpdk-dev] [PATCH v2 1/5] doc: remove code from KNI example guide
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 0/5] remove old ethdev " Thomas Monjalon
@ 2018-07-02 21:27 ` Thomas Monjalon
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 2/5] test: remove unused configuration for bonding Thomas Monjalon
` (4 subsequent siblings)
5 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2018-07-02 21:27 UTC (permalink / raw)
To: ferruh.yigit, arybchenko, shahafs
Cc: dev, ravi1.kumar, rasesh.mody, maxime.coquelin
The example code is showing how to use KNI, and can be found in
examples/kni/
The documentation guide for this example is explaining the code
to ease the understanding of the example.
And inside this documentation, there are a lot of examples code
which are copy/pasted. It is really too much and hard to maintain.
The code inside this documentation is replaced by the name
of the functions.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
.../sample_app_ug/kernel_nic_interface.rst | 353 +-----------------
1 file changed, 8 insertions(+), 345 deletions(-)
diff --git a/doc/guides/sample_app_ug/kernel_nic_interface.rst b/doc/guides/sample_app_ug/kernel_nic_interface.rst
index fc110997f..1b3ee9a5e 100644
--- a/doc/guides/sample_app_ug/kernel_nic_interface.rst
+++ b/doc/guides/sample_app_ug/kernel_nic_interface.rst
@@ -202,74 +202,8 @@ Setup of mbuf pool, driver and queues is similar to the setup done in the :doc:`
In addition, one or more kernel NIC interfaces are allocated for each
of the configured ports according to the command line parameters.
-The code for allocating the kernel NIC interfaces for a specific port is as follows:
-
-.. code-block:: c
-
- static int
- kni_alloc(uint16_t port_id)
- {
- uint8_t i;
- struct rte_kni *kni;
- struct rte_kni_conf conf;
- struct kni_port_params **params = kni_port_params_array;
-
- if (port_id >= RTE_MAX_ETHPORTS || !params[port_id])
- return -1;
-
- params[port_id]->nb_kni = params[port_id]->nb_lcore_k ? params[port_id]->nb_lcore_k : 1;
-
- for (i = 0; i < params[port_id]->nb_kni; i++) {
-
- /* Clear conf at first */
-
- memset(&conf, 0, sizeof(conf));
- if (params[port_id]->nb_lcore_k) {
- snprintf(conf.name, RTE_KNI_NAMESIZE, "vEth%u_%u", port_id, i);
- conf.core_id = params[port_id]->lcore_k[i];
- conf.force_bind = 1;
- } else
- snprintf(conf.name, RTE_KNI_NAMESIZE, "vEth%u", port_id);
- conf.group_id = (uint16_t)port_id;
- conf.mbuf_size = MAX_PACKET_SZ;
-
- /*
- * The first KNI device associated to a port
- * is the master, for multiple kernel thread
- * environment.
- */
-
- if (i == 0) {
- struct rte_kni_ops ops;
- struct rte_eth_dev_info dev_info;
-
- memset(&dev_info, 0, sizeof(dev_info)); rte_eth_dev_info_get(port_id, &dev_info);
-
- conf.addr = dev_info.pci_dev->addr;
- conf.id = dev_info.pci_dev->id;
-
- /* Get the interface default mac address */
- rte_eth_macaddr_get(port_id, (struct ether_addr *)&conf.mac_addr);
-
- memset(&ops, 0, sizeof(ops));
-
- ops.port_id = port_id;
- ops.change_mtu = kni_change_mtu;
- ops.config_network_if = kni_config_network_interface;
- ops.config_mac_address = kni_config_mac_address;
-
- kni = rte_kni_alloc(pktmbuf_pool, &conf, &ops);
- } else
- kni = rte_kni_alloc(pktmbuf_pool, &conf, NULL);
-
- if (!kni)
- rte_exit(EXIT_FAILURE, "Fail to create kni for "
- "port: %d\n", port_id);
-
- params[port_id]->kni[i] = kni;
- }
- return 0;
- }
+The code for allocating the kernel NIC interfaces for a specific port is
+in the function ``kni_alloc``.
The other step in the initialization process that is unique to this sample application
is the association of each port with lcores for RX, TX and kernel threads.
@@ -280,105 +214,8 @@ is the association of each port with lcores for RX, TX and kernel threads.
* Other lcores for pinning the kernel threads on one by one
-This is done by using the`kni_port_params_array[]` array, which is indexed by the port ID.
-The code is as follows:
-
-.. code-block:: console
-
- static int
- parse_config(const char *arg)
- {
- const char *p, *p0 = arg;
- char s[256], *end;
- unsigned size;
- enum fieldnames {
- FLD_PORT = 0,
- FLD_LCORE_RX,
- FLD_LCORE_TX,
- _NUM_FLD = KNI_MAX_KTHREAD + 3,
- };
- int i, j, nb_token;
- char *str_fld[_NUM_FLD];
- unsigned long int_fld[_NUM_FLD];
- uint16_t port_id, nb_kni_port_params = 0;
-
- memset(&kni_port_params_array, 0, sizeof(kni_port_params_array));
-
- while (((p = strchr(p0, '(')) != NULL) && nb_kni_port_params < RTE_MAX_ETHPORTS) {
- p++;
- if ((p0 = strchr(p, ')')) == NULL)
- goto fail;
-
- size = p0 - p;
-
- if (size >= sizeof(s)) {
- printf("Invalid config parameters\n");
- goto fail;
- }
-
- snprintf(s, sizeof(s), "%.*s", size, p);
- nb_token = rte_strsplit(s, sizeof(s), str_fld, _NUM_FLD, ',');
-
- if (nb_token <= FLD_LCORE_TX) {
- printf("Invalid config parameters\n");
- goto fail;
- }
-
- for (i = 0; i < nb_token; i++) {
- errno = 0;
- int_fld[i] = strtoul(str_fld[i], &end, 0);
- if (errno != 0 || end == str_fld[i]) {
- printf("Invalid config parameters\n");
- goto fail;
- }
- }
-
- i = 0;
- port_id = (uint8_t)int_fld[i++];
-
- if (port_id >= RTE_MAX_ETHPORTS) {
- printf("Port ID %u could not exceed the maximum %u\n", port_id, RTE_MAX_ETHPORTS);
- goto fail;
- }
-
- if (kni_port_params_array[port_id]) {
- printf("Port %u has been configured\n", port_id);
- goto fail;
- }
-
- kni_port_params_array[port_id] = (struct kni_port_params*)rte_zmalloc("KNI_port_params", sizeof(struct kni_port_params), RTE_CACHE_LINE_SIZE);
- kni_port_params_array[port_id]->port_id = port_id;
- kni_port_params_array[port_id]->lcore_rx = (uint8_t)int_fld[i++];
- kni_port_params_array[port_id]->lcore_tx = (uint8_t)int_fld[i++];
-
- if (kni_port_params_array[port_id]->lcore_rx >= RTE_MAX_LCORE || kni_port_params_array[port_id]->lcore_tx >= RTE_MAX_LCORE) {
- printf("lcore_rx %u or lcore_tx %u ID could not "
- "exceed the maximum %u\n",
- kni_port_params_array[port_id]->lcore_rx, kni_port_params_array[port_id]->lcore_tx, RTE_MAX_LCORE);
- goto fail;
- }
-
- for (j = 0; i < nb_token && j < KNI_MAX_KTHREAD; i++, j++)
- kni_port_params_array[port_id]->lcore_k[j] = (uint8_t)int_fld[i];
- kni_port_params_array[port_id]->nb_lcore_k = j;
- }
-
- print_config();
-
- return 0;
-
- fail:
-
- for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
- if (kni_port_params_array[i]) {
- rte_free(kni_port_params_array[i]);
- kni_port_params_array[i] = NULL;
- }
- }
-
- return -1;
-
- }
+This is done by using the ``kni_port_params_array[]`` array, which is indexed by the port ID.
+The code is in the function ``parse_config``.
Packet Forwarding
~~~~~~~~~~~~~~~~~
@@ -387,99 +224,18 @@ After the initialization steps are completed, the main_loop() function is run on
This function first checks the lcore_id against the user provided lcore_rx and lcore_tx
to see if this lcore is reading from or writing to kernel NIC interfaces.
-For the case that reads from a NIC port and writes to the kernel NIC interfaces,
+For the case that reads from a NIC port and writes to the kernel NIC interfaces (``kni_ingress``),
the packet reception is the same as in L2 Forwarding sample application
(see :ref:`l2_fwd_app_rx_tx_packets`).
The packet transmission is done by sending mbufs into the kernel NIC interfaces by rte_kni_tx_burst().
The KNI library automatically frees the mbufs after the kernel successfully copied the mbufs.
-.. code-block:: c
-
- /**
- * Interface to burst rx and enqueue mbufs into rx_q
- */
-
- static void
- kni_ingress(struct kni_port_params *p)
- {
- uint8_t i, nb_kni, port_id;
- unsigned nb_rx, num;
- struct rte_mbuf *pkts_burst[PKT_BURST_SZ];
-
- if (p == NULL)
- return;
-
- nb_kni = p->nb_kni;
- port_id = p->port_id;
-
- for (i = 0; i < nb_kni; i++) {
- /* Burst rx from eth */
- nb_rx = rte_eth_rx_burst(port_id, 0, pkts_burst, PKT_BURST_SZ);
- if (unlikely(nb_rx > PKT_BURST_SZ)) {
- RTE_LOG(ERR, APP, "Error receiving from eth\n");
- return;
- }
-
- /* Burst tx to kni */
- num = rte_kni_tx_burst(p->kni[i], pkts_burst, nb_rx);
- kni_stats[port_id].rx_packets += num;
- rte_kni_handle_request(p->kni[i]);
-
- if (unlikely(num < nb_rx)) {
- /* Free mbufs not tx to kni interface */
- kni_burst_free_mbufs(&pkts_burst[num], nb_rx - num);
- kni_stats[port_id].rx_dropped += nb_rx - num;
- }
- }
- }
-
-For the other case that reads from kernel NIC interfaces and writes to a physical NIC port, packets are retrieved by reading
-mbufs from kernel NIC interfaces by `rte_kni_rx_burst()`.
+For the other case that reads from kernel NIC interfaces
+and writes to a physical NIC port (``kni_egress``),
+packets are retrieved by reading mbufs from kernel NIC interfaces by ``rte_kni_rx_burst()``.
The packet transmission is the same as in the L2 Forwarding sample application
(see :ref:`l2_fwd_app_rx_tx_packets`).
-.. code-block:: c
-
- /**
- * Interface to dequeue mbufs from tx_q and burst tx
- */
-
- static void
-
- kni_egress(struct kni_port_params *p)
- {
- uint8_t i, nb_kni, port_id;
- unsigned nb_tx, num;
- struct rte_mbuf *pkts_burst[PKT_BURST_SZ];
-
- if (p == NULL)
- return;
-
- nb_kni = p->nb_kni;
- port_id = p->port_id;
-
- for (i = 0; i < nb_kni; i++) {
- /* Burst rx from kni */
- num = rte_kni_rx_burst(p->kni[i], pkts_burst, PKT_BURST_SZ);
- if (unlikely(num > PKT_BURST_SZ)) {
- RTE_LOG(ERR, APP, "Error receiving from KNI\n");
- return;
- }
-
- /* Burst tx to eth */
-
- nb_tx = rte_eth_tx_burst(port_id, 0, pkts_burst, (uint16_t)num);
-
- kni_stats[port_id].tx_packets += nb_tx;
-
- if (unlikely(nb_tx < num)) {
- /* Free mbufs not tx to NIC */
- kni_burst_free_mbufs(&pkts_burst[nb_tx], num - nb_tx);
- kni_stats[port_id].tx_dropped += num - nb_tx;
- }
- }
- }
-
Callbacks for Kernel Requests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -492,96 +248,3 @@ Application may choose to not implement following callbacks:
- ``config_mac_address``
- ``config_promiscusity``
-
-
-.. code-block:: c
-
- static struct rte_kni_ops kni_ops = {
- .change_mtu = kni_change_mtu,
- .config_network_if = kni_config_network_interface,
- .config_mac_address = kni_config_mac_address,
- .config_promiscusity = kni_config_promiscusity,
- };
-
- /* Callback for request of changing MTU */
-
- static int
- kni_change_mtu(uint16_t port_id, unsigned new_mtu)
- {
- int ret;
- struct rte_eth_conf conf;
-
- RTE_LOG(INFO, APP, "Change MTU of port %d to %u\n", port_id, new_mtu);
-
- /* Stop specific port */
-
- rte_eth_dev_stop(port_id);
-
- memcpy(&conf, &port_conf, sizeof(conf));
-
- /* Set new MTU */
-
- if (new_mtu > ETHER_MAX_LEN)
- conf.rxmode.jumbo_frame = 1;
- else
- conf.rxmode.jumbo_frame = 0;
-
- /* mtu + length of header + length of FCS = max pkt length */
-
- conf.rxmode.max_rx_pkt_len = new_mtu + KNI_ENET_HEADER_SIZE + KNI_ENET_FCS_SIZE;
-
- ret = rte_eth_dev_configure(port_id, 1, 1, &conf);
- if (ret < 0) {
- RTE_LOG(ERR, APP, "Fail to reconfigure port %d\n", port_id);
- return ret;
- }
-
- /* Restart specific port */
-
- ret = rte_eth_dev_start(port_id);
- if (ret < 0) {
- RTE_LOG(ERR, APP, "Fail to restart port %d\n", port_id);
- return ret;
- }
-
- return 0;
- }
-
- /* Callback for request of configuring network interface up/down */
-
- static int
- kni_config_network_interface(uint16_t port_id, uint8_t if_up)
- {
- int ret = 0;
-
- RTE_LOG(INFO, APP, "Configure network interface of %d %s\n",
-
- port_id, if_up ? "up" : "down");
-
- if (if_up != 0) {
- /* Configure network interface up */
- rte_eth_dev_stop(port_id);
- ret = rte_eth_dev_start(port_id);
- } else /* Configure network interface down */
- rte_eth_dev_stop(port_id);
-
- if (ret < 0)
- RTE_LOG(ERR, APP, "Failed to start port %d\n", port_id);
- return ret;
- }
-
- /* Callback for request of configuring device mac address */
-
- static int
- kni_config_mac_address(uint16_t port_id, uint8_t mac_addr[])
- {
- .....
- }
-
- /* Callback for request of configuring promiscuous mode */
-
- static int
- kni_config_promiscusity(uint16_t port_id, uint8_t to_on)
- {
- .....
- }
--
2.17.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* [dpdk-dev] [PATCH v2 2/5] test: remove unused configuration for bonding
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 0/5] remove old ethdev " Thomas Monjalon
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 1/5] doc: remove code from KNI example guide Thomas Monjalon
@ 2018-07-02 21:27 ` Thomas Monjalon
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 3/5] ethdev: convert remaining apps to new offload API Thomas Monjalon
` (3 subsequent siblings)
5 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2018-07-02 21:27 UTC (permalink / raw)
To: ferruh.yigit, arybchenko, shahafs
Cc: dev, ravi1.kumar, rasesh.mody, maxime.coquelin
The global variables rx_mode and fdir_conf
are not used in this test file.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
test/test/test_link_bonding.c | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/test/test/test_link_bonding.c b/test/test/test_link_bonding.c
index 0ffd65090..d74c0ab4e 100644
--- a/test/test/test_link_bonding.c
+++ b/test/test/test_link_bonding.c
@@ -135,25 +135,6 @@ static uint16_t dst_port_1 = 2024;
static uint16_t vlan_id = 0x100;
-struct rte_eth_rxmode rx_mode = {
- .max_rx_pkt_len = ETHER_MAX_LEN, /**< Default maximum frame length. */
- .split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled. */
- .hw_ip_checksum = 0, /**< IP checksum offload disabled. */
- .hw_vlan_filter = 1, /**< VLAN filtering enabled. */
- .hw_vlan_strip = 1, /**< VLAN strip enabled. */
- .hw_vlan_extend = 0, /**< Extended VLAN disabled. */
- .jumbo_frame = 0, /**< Jumbo Frame Support disabled. */
- .hw_strip_crc = 1, /**< CRC stripping by hardware enabled. */
-};
-
-struct rte_fdir_conf fdir_conf = {
- .mode = RTE_FDIR_MODE_NONE,
- .pballoc = RTE_FDIR_PBALLOC_64K,
- .status = RTE_FDIR_REPORT_STATUS,
- .drop_queue = 127,
-};
-
static struct rte_eth_conf default_pmd_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_NONE,
--
2.17.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* [dpdk-dev] [PATCH v2 3/5] ethdev: convert remaining apps to new offload API
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 0/5] remove old ethdev " Thomas Monjalon
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 1/5] doc: remove code from KNI example guide Thomas Monjalon
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 2/5] test: remove unused configuration for bonding Thomas Monjalon
@ 2018-07-02 21:27 ` Thomas Monjalon
2018-07-04 11:16 ` Andrew Rybchenko
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 4/5] net/fm10k: remove unused constant Thomas Monjalon
` (2 subsequent siblings)
5 siblings, 1 reply; 25+ messages in thread
From: Thomas Monjalon @ 2018-07-02 21:27 UTC (permalink / raw)
To: ferruh.yigit, arybchenko, shahafs
Cc: dev, ravi1.kumar, rasesh.mody, maxime.coquelin
Some test applications and examples were not converted
to the new offload API introduced in 17.11.
For reference, see "Hardware Offload" in
doc/guides/prog_guide/poll_mode_drv.rst
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
app/test-eventdev/test_perf_common.c | 8 +----
.../sample_app_ug/l2_forward_job_stats.rst | 19 ------------
.../sample_app_ug/l2_forward_real_virtual.rst | 19 ------------
doc/guides/sample_app_ug/link_status_intr.rst | 5 +---
.../sample_app_ug/vmdq_dcb_forwarding.rst | 4 ---
examples/bbdev_app/main.c | 6 +---
examples/ip_pipeline/link.c | 11 +------
test/test-pipeline/init.c | 6 +---
test/test/test_kni.c | 6 +---
test/test/test_link_bonding.c | 13 ++-------
test/test/test_link_bonding_mode4.c | 6 +---
| 12 ++------
test/test/test_pmd_perf.c | 29 +++----------------
13 files changed, 15 insertions(+), 129 deletions(-)
diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index d00f91802..eed80d1b1 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -680,13 +680,7 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt)
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.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 = 1,
+ .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/doc/guides/sample_app_ug/l2_forward_job_stats.rst b/doc/guides/sample_app_ug/l2_forward_job_stats.rst
index d7219a293..ba73d8557 100644
--- a/doc/guides/sample_app_ug/l2_forward_job_stats.rst
+++ b/doc/guides/sample_app_ug/l2_forward_job_stats.rst
@@ -218,25 +218,6 @@ The rte_eth_dev_configure() function is used to configure the number of queues f
"err=%d, port=%u\n",
ret, portid);
-The global configuration is stored in a static structure:
-
-.. code-block:: c
-
- static const struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload disabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
- .jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc= 0, /**< CRC stripped by hardware */
- },
-
- .txmode = {
- .mq_mode = ETH_DCB_NONE
- },
- };
-
RX Queue Initialization
~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/doc/guides/sample_app_ug/l2_forward_real_virtual.rst b/doc/guides/sample_app_ug/l2_forward_real_virtual.rst
index b459d4efe..2b2d5afa0 100644
--- a/doc/guides/sample_app_ug/l2_forward_real_virtual.rst
+++ b/doc/guides/sample_app_ug/l2_forward_real_virtual.rst
@@ -245,25 +245,6 @@ The rte_eth_dev_configure() function is used to configure the number of queues f
"err=%d, port=%u\n",
ret, portid);
-The global configuration is stored in a static structure:
-
-.. code-block:: c
-
- static const struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload disabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
- .jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc= 0, /**< CRC stripped by hardware */
- },
-
- .txmode = {
- .mq_mode = ETH_DCB_NONE
- },
- };
-
.. _l2_fwd_app_rx_init:
RX Queue Initialization
diff --git a/doc/guides/sample_app_ug/link_status_intr.rst b/doc/guides/sample_app_ug/link_status_intr.rst
index 8c11ba4ae..c7665fe5c 100644
--- a/doc/guides/sample_app_ug/link_status_intr.rst
+++ b/doc/guides/sample_app_ug/link_status_intr.rst
@@ -137,10 +137,7 @@ The global configuration is stored in a static structure:
static const struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload disabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
- .hw_strip_crc= 0, /**< CRC stripped by hardware */
+ .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {},
.intr_conf = {
diff --git a/doc/guides/sample_app_ug/vmdq_dcb_forwarding.rst b/doc/guides/sample_app_ug/vmdq_dcb_forwarding.rst
index 83fcdf637..0e9da9707 100644
--- a/doc/guides/sample_app_ug/vmdq_dcb_forwarding.rst
+++ b/doc/guides/sample_app_ug/vmdq_dcb_forwarding.rst
@@ -102,10 +102,6 @@ a default structure is provided for VMDQ and DCB configuration to be filled in l
.rxmode = {
.mq_mode = ETH_MQ_RX_VMDQ_DCB,
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload disabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
- .jumbo_frame = 0, /**< Jumbo Frame Support disabled */
},
.txmode = {
.mq_mode = ETH_MQ_TX_VMDQ_DCB,
diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index 254cc0676..045a190b9 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -64,11 +64,7 @@ static const struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_NONE,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload disabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
- .jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 0, /**< CRC stripped by hardware */
+ .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
diff --git a/examples/ip_pipeline/link.c b/examples/ip_pipeline/link.c
index b8a431f3e..181c31f9c 100644
--- a/examples/ip_pipeline/link.c
+++ b/examples/ip_pipeline/link.c
@@ -40,18 +40,9 @@ static struct rte_eth_conf port_conf_default = {
.link_speeds = 0,
.rxmode = {
.mq_mode = ETH_MQ_RX_NONE,
-
- .header_split = 0, /* Header split */
- .hw_ip_checksum = 0, /* IP checksum offload */
- .hw_vlan_filter = 0, /* VLAN filtering */
- .hw_vlan_strip = 0, /* VLAN strip */
- .hw_vlan_extend = 0, /* Extended VLAN */
- .jumbo_frame = 0, /* Jumbo frame support */
- .hw_strip_crc = 1, /* CRC strip by HW */
- .enable_scatter = 0, /* Scattered packets RX handler */
-
.max_rx_pkt_len = 9000, /* Jumbo frame max packet len */
.split_hdr_size = 0, /* Header split buffer size */
+ .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/test/test-pipeline/init.c b/test/test-pipeline/init.c
index 19cf04a6c..f33216c90 100644
--- a/test/test-pipeline/init.c
+++ b/test/test-pipeline/init.c
@@ -70,11 +70,7 @@ struct app_params app = {
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .header_split = 0, /* Header Split disabled */
- .hw_ip_checksum = 1, /* IP checksum offload enabled */
- .hw_vlan_filter = 0, /* VLAN filtering disabled */
- .jumbo_frame = 0, /* Jumbo Frame Support disabled */
- .hw_strip_crc = 1, /* CRC stripped by hardware */
+ .offloads = DEV_RX_OFFLOAD_CHECKSUM | DEV_RX_OFFLOAD_CRC_STRIP,
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/test/test/test_kni.c b/test/test/test_kni.c
index 56773c8a2..1b876719a 100644
--- a/test/test/test_kni.c
+++ b/test/test/test_kni.c
@@ -71,11 +71,7 @@ static const struct rte_eth_txconf tx_conf = {
static const struct rte_eth_conf port_conf = {
.rxmode = {
- .header_split = 0,
- .hw_ip_checksum = 0,
- .hw_vlan_filter = 0,
- .jumbo_frame = 0,
- .hw_strip_crc = 1,
+ .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
.mq_mode = ETH_DCB_NONE,
diff --git a/test/test/test_link_bonding.c b/test/test/test_link_bonding.c
index d74c0ab4e..ff0576a54 100644
--- a/test/test/test_link_bonding.c
+++ b/test/test/test_link_bonding.c
@@ -43,9 +43,6 @@
#define TX_HTHRESH 0
#define TX_WTHRESH 0
#define TX_RSBIT_THRESH 32
-#define TX_Q_FLAGS (ETH_TXQ_FLAGS_NOMULTSEGS | ETH_TXQ_FLAGS_NOVLANOFFL |\
- ETH_TXQ_FLAGS_NOXSUMSCTP | ETH_TXQ_FLAGS_NOXSUMUDP | \
- ETH_TXQ_FLAGS_NOXSUMTCP)
#define MBUF_CACHE_SIZE (250)
#define BURST_SIZE (32)
@@ -138,13 +135,9 @@ static uint16_t vlan_id = 0x100;
static struct rte_eth_conf default_pmd_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_NONE,
- .max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload enabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
- .jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 1, /**< CRC stripped by hardware */
+ .max_rx_pkt_len = ETHER_MAX_LEN,
+ .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
@@ -170,8 +163,6 @@ static struct rte_eth_txconf tx_conf_default = {
},
.tx_free_thresh = TX_FREE_THRESH,
.tx_rs_thresh = TX_RSBIT_THRESH,
- .txq_flags = TX_Q_FLAGS
-
};
static void free_virtualpmd_tx_queue(void);
diff --git a/test/test/test_link_bonding_mode4.c b/test/test/test_link_bonding_mode4.c
index 33c1fab01..9163f6313 100644
--- a/test/test/test_link_bonding_mode4.c
+++ b/test/test/test_link_bonding_mode4.c
@@ -110,11 +110,7 @@ static struct rte_eth_conf default_pmd_conf = {
.mq_mode = ETH_MQ_RX_NONE,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload enabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
- .jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 1, /**< CRC stripped by hardware */
+ .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
--git a/test/test/test_link_bonding_rssconf.c b/test/test/test_link_bonding_rssconf.c
index 6a1a28d23..e6e798f5b 100644
--- a/test/test/test_link_bonding_rssconf.c
+++ b/test/test/test_link_bonding_rssconf.c
@@ -83,11 +83,7 @@ static struct rte_eth_conf default_pmd_conf = {
.mq_mode = ETH_MQ_RX_NONE,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload enabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
- .jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 1, /**< CRC stripped by hardware */
+ .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
@@ -100,11 +96,7 @@ static struct rte_eth_conf rss_pmd_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload enabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
- .jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 1, /**< CRC stripped by hardware */
+ .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
diff --git a/test/test/test_pmd_perf.c b/test/test/test_pmd_perf.c
index 54bc4f6b0..4549965fc 100644
--- a/test/test/test_pmd_perf.c
+++ b/test/test/test_pmd_perf.c
@@ -65,14 +65,7 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_NONE,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload enabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
- .hw_vlan_strip = 0, /**< VLAN strip enabled. */
- .hw_vlan_extend = 0, /**< Extended VLAN disabled. */
- .jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 1, /**< CRC stripped by hardware */
- .enable_scatter = 0, /**< scatter rx disabled */
+ .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
@@ -97,11 +90,6 @@ static struct rte_eth_txconf tx_conf = {
},
.tx_free_thresh = 32, /* Use PMD default values */
.tx_rs_thresh = 32, /* Use PMD default values */
- .txq_flags = (ETH_TXQ_FLAGS_NOMULTSEGS |
- ETH_TXQ_FLAGS_NOVLANOFFL |
- ETH_TXQ_FLAGS_NOXSUMSCTP |
- ETH_TXQ_FLAGS_NOXSUMUDP |
- ETH_TXQ_FLAGS_NOXSUMTCP)
};
enum {
@@ -808,38 +796,29 @@ test_set_rxtx_conf(cmdline_fixed_string_t mode)
if (!strcmp(mode, "vector")) {
/* vector rx, tx */
- tx_conf.txq_flags = 0xf01;
tx_conf.tx_rs_thresh = 32;
tx_conf.tx_free_thresh = 32;
- port_conf.rxmode.hw_ip_checksum = 0;
- port_conf.rxmode.enable_scatter = 0;
return 0;
} else if (!strcmp(mode, "scalar")) {
/* bulk alloc rx, full-featured tx */
- tx_conf.txq_flags = 0;
tx_conf.tx_rs_thresh = 32;
tx_conf.tx_free_thresh = 32;
- port_conf.rxmode.hw_ip_checksum = 1;
- port_conf.rxmode.enable_scatter = 0;
+ port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_CHECKSUM;
return 0;
} else if (!strcmp(mode, "hybrid")) {
/* bulk alloc rx, vector tx
* when vec macro not define,
* using the same rx/tx as scalar
*/
- tx_conf.txq_flags = 0xf01;
tx_conf.tx_rs_thresh = 32;
tx_conf.tx_free_thresh = 32;
- port_conf.rxmode.hw_ip_checksum = 1;
- port_conf.rxmode.enable_scatter = 0;
+ port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_CHECKSUM;
return 0;
} else if (!strcmp(mode, "full")) {
/* full feature rx,tx pair */
- tx_conf.txq_flags = 0x0; /* must condition */
tx_conf.tx_rs_thresh = 32;
tx_conf.tx_free_thresh = 32;
- port_conf.rxmode.hw_ip_checksum = 0;
- port_conf.rxmode.enable_scatter = 1; /* must condition */
+ port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_SCATTER;
return 0;
}
--
2.17.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH v2 3/5] ethdev: convert remaining apps to new offload API
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 3/5] ethdev: convert remaining apps to new offload API Thomas Monjalon
@ 2018-07-04 11:16 ` Andrew Rybchenko
2018-07-04 12:26 ` Thomas Monjalon
0 siblings, 1 reply; 25+ messages in thread
From: Andrew Rybchenko @ 2018-07-04 11:16 UTC (permalink / raw)
To: Thomas Monjalon, ferruh.yigit, shahafs
Cc: dev, ravi1.kumar, rasesh.mody, maxime.coquelin
On 07/03/2018 12:27 AM, Thomas Monjalon wrote:
> Some test applications and examples were not converted
> to the new offload API introduced in 17.11.
>
> For reference, see "Hardware Offload" in
> doc/guides/prog_guide/poll_mode_drv.rst
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
<...>
> diff --git a/doc/guides/sample_app_ug/link_status_intr.rst b/doc/guides/sample_app_ug/link_status_intr.rst
> index 8c11ba4ae..c7665fe5c 100644
> --- a/doc/guides/sample_app_ug/link_status_intr.rst
> +++ b/doc/guides/sample_app_ug/link_status_intr.rst
> @@ -137,10 +137,7 @@ The global configuration is stored in a static structure:
> static const struct rte_eth_conf port_conf = {
> .rxmode = {
> .split_hdr_size = 0,
> - .header_split = 0, /**< Header Split disabled */
> - .hw_ip_checksum = 0, /**< IP checksum offload disabled */
> - .hw_vlan_filter = 0, /**< VLAN filtering disabled */
> - .hw_strip_crc= 0, /**< CRC stripped by hardware */
> + .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
Is it intended that CRC strip was disabled before and now it is becoming
enabled?
> },
> .txmode = {},
> .intr_conf = {
<...>
> diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
> index 254cc0676..045a190b9 100644
> --- a/examples/bbdev_app/main.c
> +++ b/examples/bbdev_app/main.c
> @@ -64,11 +64,7 @@ static const struct rte_eth_conf port_conf = {
> .mq_mode = ETH_MQ_RX_NONE,
> .max_rx_pkt_len = ETHER_MAX_LEN,
> .split_hdr_size = 0,
> - .header_split = 0, /**< Header Split disabled */
> - .hw_ip_checksum = 0, /**< IP checksum offload disabled */
> - .hw_vlan_filter = 0, /**< VLAN filtering disabled */
> - .jumbo_frame = 0, /**< Jumbo Frame Support disabled */
> - .hw_strip_crc = 0, /**< CRC stripped by hardware */
> + .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
Is it intended that CRC strip was disabled before and now it is becoming
enabled?
> },
> .txmode = {
> .mq_mode = ETH_MQ_TX_NONE,
<...>
> diff --git a/test/test/test_pmd_perf.c b/test/test/test_pmd_perf.c
> index 54bc4f6b0..4549965fc 100644
> --- a/test/test/test_pmd_perf.c
> +++ b/test/test/test_pmd_perf.c
> @@ -65,14 +65,7 @@ static struct rte_eth_conf port_conf = {
> .mq_mode = ETH_MQ_RX_NONE,
> .max_rx_pkt_len = ETHER_MAX_LEN,
> .split_hdr_size = 0,
> - .header_split = 0, /**< Header Split disabled */
> - .hw_ip_checksum = 0, /**< IP checksum offload enabled */
> - .hw_vlan_filter = 0, /**< VLAN filtering disabled */
> - .hw_vlan_strip = 0, /**< VLAN strip enabled. */
> - .hw_vlan_extend = 0, /**< Extended VLAN disabled. */
> - .jumbo_frame = 0, /**< Jumbo Frame Support disabled */
> - .hw_strip_crc = 1, /**< CRC stripped by hardware */
> - .enable_scatter = 0, /**< scatter rx disabled */
> + .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> .mq_mode = ETH_MQ_TX_NONE,
> @@ -97,11 +90,6 @@ static struct rte_eth_txconf tx_conf = {
> },
> .tx_free_thresh = 32, /* Use PMD default values */
> .tx_rs_thresh = 32, /* Use PMD default values */
> - .txq_flags = (ETH_TXQ_FLAGS_NOMULTSEGS |
> - ETH_TXQ_FLAGS_NOVLANOFFL |
> - ETH_TXQ_FLAGS_NOXSUMSCTP |
> - ETH_TXQ_FLAGS_NOXSUMUDP |
> - ETH_TXQ_FLAGS_NOXSUMTCP)
> };
>
> enum {
> @@ -808,38 +796,29 @@ test_set_rxtx_conf(cmdline_fixed_string_t mode)
>
> if (!strcmp(mode, "vector")) {
> /* vector rx, tx */
> - tx_conf.txq_flags = 0xf01;
I'd say that 100% correct equivalent would be:
tx_conf.offloads &= ~(DEV_TX_OFFLOAD_VLAN_INSERT |
DEV_TX_OFFLOAD_IPV4_CKSUM | DEV_TX_OFFLOAD_UDP_CKSUM |
DEV_TX_OFFLOAD_TCP_CKSUM | DEV_TX_OFFLOAD_SCTP_CKSUM |
DEV_TX_OFFLOAD_MULTI_SEGS);
I guess the function may be called few times with different mode set.
If so, similar fixes should be applied below as well.
> tx_conf.tx_rs_thresh = 32;
> tx_conf.tx_free_thresh = 32;
> - port_conf.rxmode.hw_ip_checksum = 0;
> - port_conf.rxmode.enable_scatter = 0;
port_conf.rxmode.offloads &= ~(DEV_RX_OFFLOAD_CHECKSUM |
DEV_RX_OFFLOAD_SCATTER);
> return 0;
> } else if (!strcmp(mode, "scalar")) {
> /* bulk alloc rx, full-featured tx */
> - tx_conf.txq_flags = 0;
I think here we should enable offloads listed above to have
full-featured Tx:
tx_conf.offloads |= ...
> tx_conf.tx_rs_thresh = 32;
> tx_conf.tx_free_thresh = 32;
> - port_conf.rxmode.hw_ip_checksum = 1;
> - port_conf.rxmode.enable_scatter = 0;
> + port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_CHECKSUM;
port_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_SCATTER;
> return 0;
> } else if (!strcmp(mode, "hybrid")) {
> /* bulk alloc rx, vector tx
> * when vec macro not define,
> * using the same rx/tx as scalar
> */
> - tx_conf.txq_flags = 0xf01;
As in similar case above.
> tx_conf.tx_rs_thresh = 32;
> tx_conf.tx_free_thresh = 32;
> - port_conf.rxmode.hw_ip_checksum = 1;
> - port_conf.rxmode.enable_scatter = 0;
> + port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_CHECKSUM;
As in similar case above
> return 0;
> } else if (!strcmp(mode, "full")) {
> /* full feature rx,tx pair */
> - tx_conf.txq_flags = 0x0; /* must condition */
As in similar case above.
> tx_conf.tx_rs_thresh = 32;
> tx_conf.tx_free_thresh = 32;
> - port_conf.rxmode.hw_ip_checksum = 0;
> - port_conf.rxmode.enable_scatter = 1; /* must condition */
> + port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_SCATTER;
port_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_CHECKSUM;
> return 0;
> }
>
In general I think that it would be really good to avoid changes in
behaviour when technical changes are done.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH v2 3/5] ethdev: convert remaining apps to new offload API
2018-07-04 11:16 ` Andrew Rybchenko
@ 2018-07-04 12:26 ` Thomas Monjalon
2018-07-04 12:52 ` Andrew Rybchenko
0 siblings, 1 reply; 25+ messages in thread
From: Thomas Monjalon @ 2018-07-04 12:26 UTC (permalink / raw)
To: Andrew Rybchenko, ferruh.yigit
Cc: shahafs, dev, ravi1.kumar, rasesh.mody, maxime.coquelin
04/07/2018 13:16, Andrew Rybchenko:
> On 07/03/2018 12:27 AM, Thomas Monjalon wrote:
> > --- a/doc/guides/sample_app_ug/link_status_intr.rst
> > +++ b/doc/guides/sample_app_ug/link_status_intr.rst
> > @@ -137,10 +137,7 @@ The global configuration is stored in a static structure:
> > static const struct rte_eth_conf port_conf = {
> > .rxmode = {
> > .split_hdr_size = 0,
> > - .header_split = 0, /**< Header Split disabled */
> > - .hw_ip_checksum = 0, /**< IP checksum offload disabled */
> > - .hw_vlan_filter = 0, /**< VLAN filtering disabled */
> > - .hw_strip_crc= 0, /**< CRC stripped by hardware */
> > + .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>
> Is it intended that CRC strip was disabled before and now it is becoming
> enabled?
Yes, I consider the comment to be the real intent.
> > --- a/examples/bbdev_app/main.c
> > +++ b/examples/bbdev_app/main.c
> > @@ -64,11 +64,7 @@ static const struct rte_eth_conf port_conf = {
> > .mq_mode = ETH_MQ_RX_NONE,
> > .max_rx_pkt_len = ETHER_MAX_LEN,
> > .split_hdr_size = 0,
> > - .header_split = 0, /**< Header Split disabled */
> > - .hw_ip_checksum = 0, /**< IP checksum offload disabled */
> > - .hw_vlan_filter = 0, /**< VLAN filtering disabled */
> > - .jumbo_frame = 0, /**< Jumbo Frame Support disabled */
> > - .hw_strip_crc = 0, /**< CRC stripped by hardware */
> > + .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>
> Is it intended that CRC strip was disabled before and now it is becoming
> enabled?
Yes, I consider the comment to be the real intent.
> > --- a/test/test/test_pmd_perf.c
> > +++ b/test/test/test_pmd_perf.c
> > @@ -97,11 +90,6 @@ static struct rte_eth_txconf tx_conf = {
> > },
> > .tx_free_thresh = 32, /* Use PMD default values */
> > .tx_rs_thresh = 32, /* Use PMD default values */
> > - .txq_flags = (ETH_TXQ_FLAGS_NOMULTSEGS |
> > - ETH_TXQ_FLAGS_NOVLANOFFL |
> > - ETH_TXQ_FLAGS_NOXSUMSCTP |
> > - ETH_TXQ_FLAGS_NOXSUMUDP |
> > - ETH_TXQ_FLAGS_NOXSUMTCP)
> > };
> >
> > enum {
> > @@ -808,38 +796,29 @@ test_set_rxtx_conf(cmdline_fixed_string_t mode)
> >
> > if (!strcmp(mode, "vector")) {
> > /* vector rx, tx */
> > - tx_conf.txq_flags = 0xf01;
>
> I'd say that 100% correct equivalent would be:
> tx_conf.offloads &= ~(DEV_TX_OFFLOAD_VLAN_INSERT |
> DEV_TX_OFFLOAD_IPV4_CKSUM | DEV_TX_OFFLOAD_UDP_CKSUM |
> DEV_TX_OFFLOAD_TCP_CKSUM | DEV_TX_OFFLOAD_SCTP_CKSUM |
> DEV_TX_OFFLOAD_MULTI_SEGS);
I'd say it is a really crappy code, and probably tuned for Intel devices only.
>
> I guess the function may be called few times with different mode set.
> If so, similar fixes should be applied below as well.
>
> > tx_conf.tx_rs_thresh = 32;
> > tx_conf.tx_free_thresh = 32;
> > - port_conf.rxmode.hw_ip_checksum = 0;
> > - port_conf.rxmode.enable_scatter = 0;
>
> port_conf.rxmode.offloads &= ~(DEV_RX_OFFLOAD_CHECKSUM |
> DEV_RX_OFFLOAD_SCATTER);
>
> > return 0;
> > } else if (!strcmp(mode, "scalar")) {
> > /* bulk alloc rx, full-featured tx */
> > - tx_conf.txq_flags = 0;
>
> I think here we should enable offloads listed above to have
> full-featured Tx:
> tx_conf.offloads |= ...
>
> > tx_conf.tx_rs_thresh = 32;
> > tx_conf.tx_free_thresh = 32;
> > - port_conf.rxmode.hw_ip_checksum = 1;
> > - port_conf.rxmode.enable_scatter = 0;
> > + port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_CHECKSUM;
>
> port_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_SCATTER;
>
> > return 0;
> > } else if (!strcmp(mode, "hybrid")) {
> > /* bulk alloc rx, vector tx
> > * when vec macro not define,
> > * using the same rx/tx as scalar
> > */
> > - tx_conf.txq_flags = 0xf01;
>
> As in similar case above.
>
> > tx_conf.tx_rs_thresh = 32;
> > tx_conf.tx_free_thresh = 32;
> > - port_conf.rxmode.hw_ip_checksum = 1;
> > - port_conf.rxmode.enable_scatter = 0;
> > + port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_CHECKSUM;
>
> As in similar case above
>
> > return 0;
> > } else if (!strcmp(mode, "full")) {
> > /* full feature rx,tx pair */
> > - tx_conf.txq_flags = 0x0; /* must condition */
>
> As in similar case above.
>
> > tx_conf.tx_rs_thresh = 32;
> > tx_conf.tx_free_thresh = 32;
> > - port_conf.rxmode.hw_ip_checksum = 0;
> > - port_conf.rxmode.enable_scatter = 1; /* must condition */
> > + port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_SCATTER;
>
> port_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_CHECKSUM;
>
> > return 0;
> > }
> >
>
> In general I think that it would be really good to avoid changes in
> behaviour when technical changes are done.
I agree, but in this case, it is impossible to know what was the real intent.
And I am perfectly fine breaking bad code.
The other option is to just remove the file. Maybe the best option?
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH v2 3/5] ethdev: convert remaining apps to new offload API
2018-07-04 12:26 ` Thomas Monjalon
@ 2018-07-04 12:52 ` Andrew Rybchenko
0 siblings, 0 replies; 25+ messages in thread
From: Andrew Rybchenko @ 2018-07-04 12:52 UTC (permalink / raw)
To: Thomas Monjalon, ferruh.yigit
Cc: shahafs, dev, ravi1.kumar, rasesh.mody, maxime.coquelin
On 07/04/2018 03:26 PM, Thomas Monjalon wrote:
> 04/07/2018 13:16, Andrew Rybchenko:
>> On 07/03/2018 12:27 AM, Thomas Monjalon wrote:
>>> --- a/doc/guides/sample_app_ug/link_status_intr.rst
>>> +++ b/doc/guides/sample_app_ug/link_status_intr.rst
>>> @@ -137,10 +137,7 @@ The global configuration is stored in a static structure:
>>> static const struct rte_eth_conf port_conf = {
>>> .rxmode = {
>>> .split_hdr_size = 0,
>>> - .header_split = 0, /**< Header Split disabled */
>>> - .hw_ip_checksum = 0, /**< IP checksum offload disabled */
>>> - .hw_vlan_filter = 0, /**< VLAN filtering disabled */
>>> - .hw_strip_crc= 0, /**< CRC stripped by hardware */
>>> + .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>> Is it intended that CRC strip was disabled before and now it is becoming
>> enabled?
> Yes, I consider the comment to be the real intent.
OK. I see. Most likely yes. I agree.
>>> --- a/examples/bbdev_app/main.c
>>> +++ b/examples/bbdev_app/main.c
>>> @@ -64,11 +64,7 @@ static const struct rte_eth_conf port_conf = {
>>> .mq_mode = ETH_MQ_RX_NONE,
>>> .max_rx_pkt_len = ETHER_MAX_LEN,
>>> .split_hdr_size = 0,
>>> - .header_split = 0, /**< Header Split disabled */
>>> - .hw_ip_checksum = 0, /**< IP checksum offload disabled */
>>> - .hw_vlan_filter = 0, /**< VLAN filtering disabled */
>>> - .jumbo_frame = 0, /**< Jumbo Frame Support disabled */
>>> - .hw_strip_crc = 0, /**< CRC stripped by hardware */
>>> + .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>> Is it intended that CRC strip was disabled before and now it is becoming
>> enabled?
> Yes, I consider the comment to be the real intent.
>
>>> --- a/test/test/test_pmd_perf.c
>>> +++ b/test/test/test_pmd_perf.c
>>> @@ -97,11 +90,6 @@ static struct rte_eth_txconf tx_conf = {
>>> },
>>> .tx_free_thresh = 32, /* Use PMD default values */
>>> .tx_rs_thresh = 32, /* Use PMD default values */
>>> - .txq_flags = (ETH_TXQ_FLAGS_NOMULTSEGS |
>>> - ETH_TXQ_FLAGS_NOVLANOFFL |
>>> - ETH_TXQ_FLAGS_NOXSUMSCTP |
>>> - ETH_TXQ_FLAGS_NOXSUMUDP |
>>> - ETH_TXQ_FLAGS_NOXSUMTCP)
>>> };
>>>
>>> enum {
>>> @@ -808,38 +796,29 @@ test_set_rxtx_conf(cmdline_fixed_string_t mode)
>>>
>>> if (!strcmp(mode, "vector")) {
>>> /* vector rx, tx */
>>> - tx_conf.txq_flags = 0xf01;
>> I'd say that 100% correct equivalent would be:
>> tx_conf.offloads &= ~(DEV_TX_OFFLOAD_VLAN_INSERT |
>> DEV_TX_OFFLOAD_IPV4_CKSUM | DEV_TX_OFFLOAD_UDP_CKSUM |
>> DEV_TX_OFFLOAD_TCP_CKSUM | DEV_TX_OFFLOAD_SCTP_CKSUM |
>> DEV_TX_OFFLOAD_MULTI_SEGS);
> I'd say it is a really crappy code, and probably tuned for Intel devices only.
>
>> I guess the function may be called few times with different mode set.
>> If so, similar fixes should be applied below as well.
>>
>>> tx_conf.tx_rs_thresh = 32;
>>> tx_conf.tx_free_thresh = 32;
>>> - port_conf.rxmode.hw_ip_checksum = 0;
>>> - port_conf.rxmode.enable_scatter = 0;
>> port_conf.rxmode.offloads &= ~(DEV_RX_OFFLOAD_CHECKSUM |
>> DEV_RX_OFFLOAD_SCATTER);
>>
>>> return 0;
>>> } else if (!strcmp(mode, "scalar")) {
>>> /* bulk alloc rx, full-featured tx */
>>> - tx_conf.txq_flags = 0;
>> I think here we should enable offloads listed above to have
>> full-featured Tx:
>> tx_conf.offloads |= ...
>>
>>> tx_conf.tx_rs_thresh = 32;
>>> tx_conf.tx_free_thresh = 32;
>>> - port_conf.rxmode.hw_ip_checksum = 1;
>>> - port_conf.rxmode.enable_scatter = 0;
>>> + port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_CHECKSUM;
>> port_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_SCATTER;
>>
>>> return 0;
>>> } else if (!strcmp(mode, "hybrid")) {
>>> /* bulk alloc rx, vector tx
>>> * when vec macro not define,
>>> * using the same rx/tx as scalar
>>> */
>>> - tx_conf.txq_flags = 0xf01;
>> As in similar case above.
>>
>>> tx_conf.tx_rs_thresh = 32;
>>> tx_conf.tx_free_thresh = 32;
>>> - port_conf.rxmode.hw_ip_checksum = 1;
>>> - port_conf.rxmode.enable_scatter = 0;
>>> + port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_CHECKSUM;
>> As in similar case above
>>
>>> return 0;
>>> } else if (!strcmp(mode, "full")) {
>>> /* full feature rx,tx pair */
>>> - tx_conf.txq_flags = 0x0; /* must condition */
>> As in similar case above.
>>
>>> tx_conf.tx_rs_thresh = 32;
>>> tx_conf.tx_free_thresh = 32;
>>> - port_conf.rxmode.hw_ip_checksum = 0;
>>> - port_conf.rxmode.enable_scatter = 1; /* must condition */
>>> + port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_SCATTER;
>> port_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_CHECKSUM;
>>
>>> return 0;
>>> }
>>>
>> In general I think that it would be really good to avoid changes in
>> behaviour when technical changes are done.
> I agree, but in this case, it is impossible to know what was the real intent.
> And I am perfectly fine breaking bad code.
> The other option is to just remove the file. Maybe the best option?
I have no strong opinion. As far as I can see there is no maintainer for
it...
^ permalink raw reply [flat|nested] 25+ messages in thread
* [dpdk-dev] [PATCH v2 4/5] net/fm10k: remove unused constant
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 0/5] remove old ethdev " Thomas Monjalon
` (2 preceding siblings ...)
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 3/5] ethdev: convert remaining apps to new offload API Thomas Monjalon
@ 2018-07-02 21:27 ` Thomas Monjalon
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 5/5] ethdev: remove old offload API Thomas Monjalon
2018-07-03 18:37 ` [dpdk-dev] [PATCH v2 0/5] remove old ethdev " Ferruh Yigit
5 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2018-07-02 21:27 UTC (permalink / raw)
To: ferruh.yigit, arybchenko, shahafs
Cc: dev, ravi1.kumar, rasesh.mody, maxime.coquelin, stable
The macro FM10K_SIMPLE_TX_FLAG was used with old Tx queue flags.
It is no longer used and was forgotten when cleaning old Tx flags.
Fixes: 1778ef67e2e7 ("net/fm10k: remove dependence on Tx queue flags")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/net/fm10k/fm10k.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/fm10k/fm10k.h b/drivers/net/fm10k/fm10k.h
index ef3078091..a46d427f7 100644
--- a/drivers/net/fm10k/fm10k.h
+++ b/drivers/net/fm10k/fm10k.h
@@ -106,9 +106,6 @@
#define FM10K_MISC_VEC_ID RTE_INTR_VEC_ZERO_OFFSET
#define FM10K_RX_VEC_START RTE_INTR_VEC_RXTX_OFFSET
-#define FM10K_SIMPLE_TX_FLAG ((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \
- ETH_TXQ_FLAGS_NOOFFLOADS)
-
struct fm10k_macvlan_filter_info {
uint16_t vlan_num; /* Total VLAN number */
uint16_t mac_num; /* Total mac number */
--
2.17.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* [dpdk-dev] [PATCH v2 5/5] ethdev: remove old offload API
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 0/5] remove old ethdev " Thomas Monjalon
` (3 preceding siblings ...)
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 4/5] net/fm10k: remove unused constant Thomas Monjalon
@ 2018-07-02 21:27 ` Thomas Monjalon
2018-07-03 12:28 ` Shahaf Shuler
2018-07-04 11:31 ` Andrew Rybchenko
2018-07-03 18:37 ` [dpdk-dev] [PATCH v2 0/5] remove old ethdev " Ferruh Yigit
5 siblings, 2 replies; 25+ messages in thread
From: Thomas Monjalon @ 2018-07-02 21:27 UTC (permalink / raw)
To: ferruh.yigit, arybchenko, shahafs
Cc: dev, ravi1.kumar, rasesh.mody, maxime.coquelin
From: Ferruh Yigit <ferruh.yigit@intel.com>
In DPDK 17.11, the ethdev offloads API has changed:
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")
commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
The new API is documented in the programmer's guide:
http://doc.dpdk.org/guides/prog_guide/poll_mode_drv.html#hardware-offload
For reminder, the main concepts in the new API were:
- All offloads are disabled by default
- Distinction between per port and per queue offloads.
The transition bits are now removed:
- Translation of the old API in ethdev
- rte_eth_conf.rxmode.ignore_offload_bitfield
- ETH_TXQ_FLAGS_IGNORE
The old API bits are now removed:
- Rx per-port rte_eth_conf.rxmode.[bit-fields]
- Tx per-queue rte_eth_txconf.txq_flags
- ETH_TXQ_FLAGS_NO*
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
app/test-eventdev/test_pipeline_common.c | 1 -
app/test-pmd/testpmd.c | 3 -
doc/guides/nics/features.rst | 1 -
doc/guides/prog_guide/poll_mode_drv.rst | 5 -
doc/guides/rel_notes/deprecation.rst | 9 --
doc/guides/sample_app_ug/flow_filtering.rst | 2 -
drivers/net/axgbe/axgbe_ethdev.c | 2 -
drivers/net/axgbe/axgbe_rxtx.c | 4 +-
drivers/net/ixgbe/ixgbe_rxtx.c | 2 +-
drivers/net/nfp/nfp_net.c | 4 +-
drivers/net/qede/qede_ethdev.c | 4 +-
drivers/net/sfc/sfc_dp_tx.h | 2 -
drivers/net/sfc/sfc_ethdev.c | 5 +-
drivers/net/sfc/sfc_rx.c | 1 -
drivers/net/sfc/sfc_tx.c | 25 +---
drivers/net/sfc/sfc_tx.h | 1 -
drivers/net/virtio/virtio_ethdev.c | 3 -
drivers/net/vmxnet3/vmxnet3_ethdev.c | 1 -
examples/bond/main.c | 3 -
examples/distributor/main.c | 2 -
examples/ethtool/ethtool-app/main.c | 2 -
examples/eventdev_pipeline/main.c | 2 -
examples/exception_path/main.c | 2 -
examples/flow_classify/flow_classify.c | 2 -
examples/flow_filtering/main.c | 1 -
examples/ip_fragmentation/main.c | 2 -
examples/ip_reassembly/main.c | 2 -
examples/ipsec-secgw/ipsec-secgw.c | 2 -
examples/ipv4_multicast/main.c | 2 -
examples/kni/main.c | 2 -
examples/l2fwd-crypto/main.c | 2 -
examples/l2fwd-jobstats/main.c | 2 -
examples/l2fwd-keepalive/main.c | 2 -
examples/l2fwd/main.c | 2 -
examples/l3fwd-acl/main.c | 2 -
examples/l3fwd-power/main.c | 2 -
examples/l3fwd-vf/main.c | 2 -
examples/l3fwd/main.c | 2 -
examples/link_status_interrupt/main.c | 2 -
examples/load_balancer/init.c | 2 -
examples/multi_process/l2fwd_fork/main.c | 2 -
examples/multi_process/symmetric_mp/main.c | 2 -
examples/netmap_compat/bridge/bridge.c | 1 -
examples/netmap_compat/lib/compat_netmap.c | 1 -
examples/packet_ordering/main.c | 7 +-
.../performance-thread/l3fwd-thread/main.c | 2 -
examples/ptpclient/ptpclient.c | 3 -
examples/qos_meter/main.c | 3 -
examples/qos_sched/init.c | 2 -
examples/quota_watermark/qw/init.c | 2 -
examples/rxtx_callbacks/main.c | 2 -
examples/server_node_efd/server/init.c | 2 -
examples/skeleton/basicfwd.c | 2 -
examples/tep_termination/vxlan_setup.c | 2 -
examples/vhost/main.c | 2 -
examples/vm_power_manager/main.c | 2 -
examples/vmdq/main.c | 2 -
examples/vmdq_dcb/main.c | 2 -
lib/librte_ethdev/rte_ethdev.c | 115 ------------------
lib/librte_ethdev/rte_ethdev.h | 60 +--------
60 files changed, 13 insertions(+), 322 deletions(-)
diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c
index 719518ff3..3bc9d513d 100644
--- a/app/test-eventdev/test_pipeline_common.c
+++ b/app/test-eventdev/test_pipeline_common.c
@@ -223,7 +223,6 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt)
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
- .ignore_offload_bitfield = 1,
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 63c2a5aca..dde7d43e3 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -334,7 +334,6 @@ lcoreid_t latencystats_lcore_id = -1;
struct rte_eth_rxmode rx_mode = {
.max_rx_pkt_len = ETHER_MAX_LEN, /**< Default maximum frame length. */
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
- .ignore_offload_bitfield = 1,
};
struct rte_eth_txmode tx_mode = {
@@ -1645,8 +1644,6 @@ start_port(portid_t pid)
port->need_reconfig_queues = 0;
/* setup tx queues */
for (qi = 0; qi < nb_txq; qi++) {
- port->tx_conf[qi].txq_flags =
- ETH_TXQ_FLAGS_IGNORE;
if ((numa_support) &&
(txring_numa[pi] != NUMA_NO_CONFIG))
diag = rte_eth_tx_queue_setup(pi, qi,
diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index ee89d6bfa..902ac160d 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -577,7 +577,6 @@ Supports L4 checksum offload.
* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_UDP_CKSUM,DEV_RX_OFFLOAD_TCP_CKSUM``.
* **[uses] rte_eth_txconf,rte_eth_txmode**: ``offloads:DEV_TX_OFFLOAD_UDP_CKSUM,DEV_TX_OFFLOAD_TCP_CKSUM,DEV_TX_OFFLOAD_SCTP_CKSUM``.
-* **[uses] user config**: ``dev_conf.rxmode.hw_ip_checksum``.
* **[uses] mbuf**: ``mbuf.ol_flags:PKT_TX_IPV4`` | ``PKT_TX_IPV6``,
``mbuf.ol_flags:PKT_TX_L4_NO_CKSUM`` | ``PKT_TX_TCP_CKSUM`` |
``PKT_TX_SCTP_CKSUM`` | ``PKT_TX_UDP_CKSUM``.
diff --git a/doc/guides/prog_guide/poll_mode_drv.rst b/doc/guides/prog_guide/poll_mode_drv.rst
index af82352a0..4b69f6cbe 100644
--- a/doc/guides/prog_guide/poll_mode_drv.rst
+++ b/doc/guides/prog_guide/poll_mode_drv.rst
@@ -328,11 +328,6 @@ A newly added offloads in ``[rt]x_conf->offloads`` to ``rte_eth_[rt]x_queue_setu
is the one which hasn't been enabled in ``rte_eth_dev_configure()`` and is requested to be enabled
in ``rte_eth_[rt]x_queue_setup()``. It must be per-queue type, otherwise trigger an error log.
-For an application to use the Tx offloads API it should set the ``ETH_TXQ_FLAGS_IGNORE`` flag in the ``txq_flags`` field located in ``rte_eth_txconf`` struct.
-In such cases it is not required to set other flags in ``txq_flags``.
-For an application to use the Rx offloads API it should set the ``ignore_offload_bitfield`` bit in the ``rte_eth_rxmode`` struct.
-In such cases it is not required to set other bitfield offloads in the ``rxmode`` struct.
-
Poll Mode Driver API
--------------------
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index cd128ae23..8df41cb6a 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -58,15 +58,6 @@ Deprecation Notices
experimental API ``rte_pktmbuf_attach_extbuf()`` is used. Removal of the macro
is to fix this semantic inconsistency.
-* ethdev: a new Tx and Rx offload API was introduced on 17.11.
- In the new API, offloads are divided into per-port and per-queue offloads.
- Offloads are disabled by default and enabled per application request.
-
- In later releases the old offloading API will be deprecated, which will include:
- - removal of ``ETH_TXQ_FLAGS_NO*`` flags.
- - removal of ``txq_flags`` field from ``rte_eth_txconf`` struct.
- - removal of the offloads bit-field from ``rte_eth_rxmode`` struct.
-
* ethdev: In v18.11 ``DEV_RX_OFFLOAD_CRC_STRIP`` offload flag will be removed, default
behavior without any flag will be changed to CRC strip.
To keep CRC ``DEV_RX_OFFLOAD_KEEP_CRC`` flag is required.
diff --git a/doc/guides/sample_app_ug/flow_filtering.rst b/doc/guides/sample_app_ug/flow_filtering.rst
index bbf8af0e6..bd0ae1e2f 100644
--- a/doc/guides/sample_app_ug/flow_filtering.rst
+++ b/doc/guides/sample_app_ug/flow_filtering.rst
@@ -139,7 +139,6 @@ application is shown below:
struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -216,7 +215,6 @@ The Ethernet port is configured with default settings using the
struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index e3773f4a2..c9c56c48b 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -387,8 +387,6 @@ axgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->default_txconf = (struct rte_eth_txconf) {
.tx_free_thresh = AXGBE_TX_FREE_THRESH,
- .txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS |
- ETH_TXQ_FLAGS_NOOFFLOADS,
};
}
diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index eae830f2e..c5fd5f418 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -371,10 +371,8 @@ int axgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
if (txq->nb_desc % txq->free_thresh != 0)
txq->vector_disable = 1;
- if ((tx_conf->txq_flags & (uint32_t)ETH_TXQ_FLAGS_NOOFFLOADS) !=
- ETH_TXQ_FLAGS_NOOFFLOADS) {
+ if (tx_conf->offloads != 0)
txq->vector_disable = 1;
- }
/* Allocate TX ring hardware descriptors */
tsize = txq->nb_desc * sizeof(struct axgbe_tx_desc);
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 9f2e5f114..354181664 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -1420,7 +1420,7 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status, uint64_t vlan_flags)
/*
* Check if VLAN present only.
* Do not check whether L3/L4 rx checksum done by NIC or not,
- * That can be found from rte_eth_rxmode.hw_ip_checksum flag
+ * That can be found from rte_eth_rxmode.offloads flag
*/
pkt_flags = (rx_status & IXGBE_RXD_STAT_VP) ? vlan_flags : 0;
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 5e3533901..30d3cd97b 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1439,9 +1439,9 @@ nfp_net_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
/* switch to jumbo mode if needed */
if ((uint32_t)mtu > ETHER_MAX_LEN)
- dev->data->dev_conf.rxmode.jumbo_frame = 1;
+ dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
else
- dev->data->dev_conf.rxmode.jumbo_frame = 0;
+ dev->data->dev_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
/* update max frame size */
dev->data->dev_conf.rxmode.max_rx_pkt_len = (uint32_t)mtu;
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 32005e969..eb2a22992 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2537,9 +2537,9 @@ static int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
}
}
if (max_rx_pkt_len > ETHER_MAX_LEN)
- dev->data->dev_conf.rxmode.jumbo_frame = 1;
+ dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
else
- dev->data->dev_conf.rxmode.jumbo_frame = 0;
+ dev->data->dev_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
if (!dev->data->dev_started && restart) {
qede_dev_start(dev);
diff --git a/drivers/net/sfc/sfc_dp_tx.h b/drivers/net/sfc/sfc_dp_tx.h
index a075612c7..eda9676c8 100644
--- a/drivers/net/sfc/sfc_dp_tx.h
+++ b/drivers/net/sfc/sfc_dp_tx.h
@@ -39,8 +39,6 @@ struct sfc_dp_tx_qcreate_info {
unsigned int max_fill_level;
/** Minimum number of unused Tx descriptors to do reap */
unsigned int free_thresh;
- /** Transmit queue configuration flags */
- unsigned int flags;
/** Offloads enabled on the transmit queue */
uint64_t offloads;
/** Tx queue size */
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 1b6499f85..531539e84 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -874,14 +874,12 @@ sfc_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
}
/*
- * The driver does not use it, but other PMDs update jumbo_frame
+ * The driver does not use it, but other PMDs update jumbo frame
* flag and max_rx_pkt_len when MTU is set.
*/
if (mtu > ETHER_MAX_LEN) {
struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
-
rxmode->offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
- rxmode->jumbo_frame = 1;
}
dev->data->dev_conf.rxmode.max_rx_pkt_len = sa->port.pdu;
@@ -1089,7 +1087,6 @@ sfc_tx_queue_info_get(struct rte_eth_dev *dev, uint16_t tx_queue_id,
memset(qinfo, 0, sizeof(*qinfo));
- qinfo->conf.txq_flags = txq_info->txq->flags;
qinfo->conf.offloads = txq_info->txq->offloads;
qinfo->conf.tx_free_thresh = txq_info->txq->free_thresh;
qinfo->conf.tx_deferred_start = txq_info->deferred_start;
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 98858d9d9..158c8e94b 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -1449,7 +1449,6 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode)
if (rte_eth_dev_must_keep_crc(rxmode->offloads)) {
sfc_warn(sa, "FCS stripping cannot be disabled - always on");
rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
- rxmode->hw_strip_crc = 1;
}
return rc;
diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
index 1bcc2c697..6d42a1a65 100644
--- a/drivers/net/sfc/sfc_tx.c
+++ b/drivers/net/sfc/sfc_tx.c
@@ -171,7 +171,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
txq->free_thresh =
(tx_conf->tx_free_thresh) ? tx_conf->tx_free_thresh :
SFC_TX_DEFAULT_FREE_THRESH;
- txq->flags = tx_conf->txq_flags;
txq->offloads = offloads;
rc = sfc_dma_alloc(sa, "txq", sw_index, EFX_TXQ_SIZE(txq_info->entries),
@@ -182,7 +181,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
memset(&info, 0, sizeof(info));
info.max_fill_level = txq_max_fill_level;
info.free_thresh = txq->free_thresh;
- info.flags = tx_conf->txq_flags;
info.offloads = offloads;
info.txq_entries = txq_info->entries;
info.dma_desc_size_max = encp->enc_tx_dma_desc_size_max;
@@ -431,18 +429,10 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
if (rc != 0)
goto fail_ev_qstart;
- /*
- * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a legacy
- * application which expects that IPv4 checksum offload is enabled
- * all the time as there is no legacy flag to turn off the offload.
- */
- if ((txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) ||
- (~txq->flags & ETH_TXQ_FLAGS_IGNORE))
+ if (txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)
flags |= EFX_TXQ_CKSUM_IPV4;
- if ((txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
- ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
- (offloads_supported & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)))
+ if (txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
flags |= EFX_TXQ_CKSUM_INNER_IPV4;
if ((txq->offloads & DEV_TX_OFFLOAD_TCP_CKSUM) ||
@@ -453,16 +443,7 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
flags |= EFX_TXQ_CKSUM_INNER_TCPUDP;
}
- /*
- * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a legacy
- * application. In turn, the absence of ETH_TXQ_FLAGS_NOXSUMTCP is
- * associated specifically with a legacy application which expects
- * both TCP checksum offload and TSO to be enabled because the legacy
- * API does not provide a dedicated mechanism to control TSO.
- */
- if ((txq->offloads & DEV_TX_OFFLOAD_TCP_TSO) ||
- ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
- (~txq->flags & ETH_TXQ_FLAGS_NOXSUMTCP)))
+ if (txq->offloads & DEV_TX_OFFLOAD_TCP_TSO)
flags |= EFX_TXQ_FATSOV2;
rc = efx_tx_qcreate(sa->nic, sw_index, 0, &txq->mem,
diff --git a/drivers/net/sfc/sfc_tx.h b/drivers/net/sfc/sfc_tx.h
index c2e5f13e9..146b805ca 100644
--- a/drivers/net/sfc/sfc_tx.h
+++ b/drivers/net/sfc/sfc_tx.h
@@ -58,7 +58,6 @@ struct sfc_txq {
struct sfc_dp_txq *dp;
efx_txq_t *common;
unsigned int free_thresh;
- unsigned int flags;
uint64_t offloads;
};
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 02980e3d1..119666611 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2143,9 +2143,6 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->min_rx_bufsize = VIRTIO_MIN_RX_BUFSIZE;
dev_info->max_rx_pktlen = VIRTIO_MAX_RX_PKTLEN;
dev_info->max_mac_addrs = VIRTIO_MAX_MAC_ADDRS;
- dev_info->default_txconf = (struct rte_eth_txconf) {
- .txq_flags = ETH_TXQ_FLAGS_NOOFFLOADS
- };
host_features = VTPCI_OPS(hw)->get_features(hw);
dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 95b465952..ace9d37c5 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1054,7 +1054,6 @@ vmxnet3_dev_info_get(struct rte_eth_dev *dev __rte_unused,
dev_info->speed_capa = ETH_LINK_SPEED_10G;
dev_info->max_mac_addrs = VMXNET3_MAX_MAC_ADDRS;
- dev_info->default_txconf.txq_flags = ETH_TXQ_FLAGS_NOXSUMSCTP;
dev_info->flow_type_rss_offloads = VMXNET3_RSS_OFFLOAD_ALL;
dev_info->rx_desc_lim = (struct rte_eth_desc_lim) {
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 65e0edd25..98415d66d 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -122,7 +122,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_NONE,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.rx_adv_conf = {
@@ -177,7 +176,6 @@ slave_port_init(uint16_t portid, struct rte_mempool *mbuf_pool)
/* TX setup */
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
retval = rte_eth_tx_queue_setup(portid, 0, nb_txd,
rte_eth_dev_socket_id(portid), &txq_conf);
@@ -246,7 +244,6 @@ bond_port_init(struct rte_mempool *mbuf_pool)
/* TX setup */
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
retval = rte_eth_tx_queue_setup(BOND_PORT, 0, nb_txd,
rte_eth_dev_socket_id(BOND_PORT), &txq_conf);
diff --git a/examples/distributor/main.c b/examples/distributor/main.c
index 2c5936489..85881a2e8 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -80,7 +80,6 @@ static const struct rte_eth_conf port_conf_default = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
- .ignore_offload_bitfield = 1,
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
@@ -141,7 +140,6 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
}
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf.offloads = port_conf.txmode.offloads;
for (q = 0; q < txRings; q++) {
retval = rte_eth_tx_queue_setup(port, q, nb_txd,
diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c
index c1815bb94..dc93adfe3 100644
--- a/examples/ethtool/ethtool-app/main.c
+++ b/examples/ethtool/ethtool-app/main.c
@@ -99,7 +99,6 @@ static void setup_ports(struct app_config *app_cfg, int cnt_ports)
memset(&cfg_port, 0, sizeof(cfg_port));
cfg_port.txmode.mq_mode = ETH_MQ_TX_NONE;
- cfg_port.rxmode.ignore_offload_bitfield = 1;
for (idx_port = 0; idx_port < cnt_ports; idx_port++) {
struct app_port *ptr_port = &app_cfg->ports[idx_port];
@@ -142,7 +141,6 @@ static void setup_ports(struct app_config *app_cfg, int cnt_ports)
"rte_eth_rx_queue_setup failed"
);
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
if (rte_eth_tx_queue_setup(
idx_port, 0, nb_txd,
rte_eth_dev_socket_id(idx_port), &txconf) < 0)
diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index b698e4ca2..7bc294946 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -267,7 +267,6 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
- .ignore_offload_bitfield = 1,
},
.rx_adv_conf = {
.rss_conf = {
@@ -307,7 +306,6 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
}
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf.offloads = port_conf_default.txmode.offloads;
/* Allocate and set up 1 TX queue per Ethernet port. */
for (q = 0; q < tx_rings; q++) {
diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index 2b381a5d8..0b59f6b3f 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -88,7 +88,6 @@
/* Options for configuring ethernet port */
static struct rte_eth_conf port_conf = {
.rxmode = {
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -457,7 +456,6 @@ init_port(uint16_t port)
port, ret);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(port, 0, nb_txd,
rte_eth_dev_socket_id(port),
diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c
index 6412fe440..199612926 100644
--- a/examples/flow_classify/flow_classify.c
+++ b/examples/flow_classify/flow_classify.c
@@ -62,7 +62,6 @@ const char cb_port_delim[] = ":";
static const struct rte_eth_conf port_conf_default = {
.rxmode = {
.max_rx_pkt_len = ETHER_MAX_LEN,
- .ignore_offload_bitfield = 1,
},
};
@@ -222,7 +221,6 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
}
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf.offloads = port_conf.txmode.offloads;
/* Allocate and set up 1 TX queue per Ethernet port. */
for (q = 0; q < tx_rings; q++) {
diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index e0ee51679..f59503439 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -121,7 +121,6 @@ init_port(void)
struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 8952ea456..5306d7672 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -140,7 +140,6 @@ static struct rte_eth_conf port_conf = {
.rxmode = {
.max_rx_pkt_len = JUMBO_FRAME_MAX_SIZE,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
DEV_RX_OFFLOAD_JUMBO_FRAME |
DEV_RX_OFFLOAD_CRC_STRIP),
@@ -973,7 +972,6 @@ main(int argc, char **argv)
fflush(stdout);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd,
socket, txconf);
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 3e8e79c21..94e63fc6a 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -164,7 +164,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = JUMBO_FRAME_MAX_SIZE,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
DEV_RX_OFFLOAD_JUMBO_FRAME |
DEV_RX_OFFLOAD_CRC_STRIP),
@@ -1121,7 +1120,6 @@ main(int argc, char **argv)
fflush(stdout);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd,
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index a5da8b280..199bae51b 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -199,7 +199,6 @@ static struct rte_eth_conf port_conf = {
.split_hdr_size = 0,
.offloads = DEV_RX_OFFLOAD_CHECKSUM |
DEV_RX_OFFLOAD_CRC_STRIP,
- .ignore_offload_bitfield = 1,
},
.rx_adv_conf = {
.rss_conf = {
@@ -1592,7 +1591,6 @@ port_init(uint16_t portid)
printf("Setup txq=%u,%d,%d\n", lcore_id, tx_queueid, socket_id);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, tx_queueid, nb_txd,
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index ad2072f41..331c32e71 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -109,7 +109,6 @@ static struct rte_eth_conf port_conf = {
.rxmode = {
.max_rx_pkt_len = JUMBO_FRAME_MAX_SIZE,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_JUMBO_FRAME |
DEV_RX_OFFLOAD_CRC_STRIP),
},
@@ -764,7 +763,6 @@ main(int argc, char **argv)
fflush(stdout);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd,
rte_lcore_to_socket_id(lcore_id), txconf);
diff --git a/examples/kni/main.c b/examples/kni/main.c
index 4b162debb..81336087d 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -95,7 +95,6 @@ static struct kni_port_params *kni_port_params_array[RTE_MAX_ETHPORTS];
/* Options for configuring ethernet port */
static struct rte_eth_conf port_conf = {
.rxmode = {
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -607,7 +606,6 @@ init_port(uint16_t port)
"port%u (%d)\n", (unsigned)port, ret);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(port, 0, nb_txd,
rte_eth_dev_socket_id(port), &txq_conf);
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 4bca87b19..1b5587968 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -211,7 +211,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_NONE,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -2371,7 +2370,6 @@ initialize_ports(struct l2fwd_crypto_options *options)
/* init one TX queue on each port */
fflush(stdout);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
retval = rte_eth_tx_queue_setup(portid, 0, nb_txd,
rte_eth_dev_socket_id(portid),
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index 34553faa2..af5423382 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -90,7 +90,6 @@ struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -876,7 +875,6 @@ main(int argc, char **argv)
/* init one TX queue on each port */
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
fflush(stdout);
ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index a18b707cd..2d8b4d1c6 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -81,7 +81,6 @@ struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -671,7 +670,6 @@ main(int argc, char **argv)
/* init one TX queue on each port */
fflush(stdout);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
rte_eth_dev_socket_id(portid),
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 690843578..9bb4c5bc4 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -82,7 +82,6 @@ static struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -670,7 +669,6 @@ main(int argc, char **argv)
/* init one TX queue on each port */
fflush(stdout);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
rte_eth_dev_socket_id(portid),
diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index 33ad467d3..55a5a69e5 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -127,7 +127,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
DEV_RX_OFFLOAD_CHECKSUM),
},
@@ -1982,7 +1981,6 @@ main(int argc, char **argv)
rte_eth_dev_info_get(portid, &dev_info);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd,
socketid, txconf);
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 596d64548..710b76d12 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -184,7 +184,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
DEV_RX_OFFLOAD_CHECKSUM),
},
@@ -1750,7 +1749,6 @@ main(int argc, char **argv)
fflush(stdout);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd,
socketid, txconf);
diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c
index aaafb7bc2..43e629828 100644
--- a/examples/l3fwd-vf/main.c
+++ b/examples/l3fwd-vf/main.c
@@ -161,7 +161,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
DEV_RX_OFFLOAD_CHECKSUM),
},
@@ -1009,7 +1008,6 @@ main(int argc, char **argv)
fflush(stdout);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
socketid, txconf);
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index bf7dbd814..faef9f1ac 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -120,7 +120,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
DEV_RX_OFFLOAD_CHECKSUM),
},
@@ -909,7 +908,6 @@ main(int argc, char **argv)
fflush(stdout);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd,
socketid, txconf);
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index f56895680..3b732076b 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -79,7 +79,6 @@ struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -653,7 +652,6 @@ main(int argc, char **argv)
/* init one TX queue logical core on each port */
fflush(stdout);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
rte_eth_dev_socket_id(portid),
diff --git a/examples/load_balancer/init.c b/examples/load_balancer/init.c
index 8d8dbe61e..6aa079c69 100644
--- a/examples/load_balancer/init.c
+++ b/examples/load_balancer/init.c
@@ -45,7 +45,6 @@ static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
DEV_RX_OFFLOAD_CRC_STRIP),
},
@@ -466,7 +465,6 @@ app_init_nics(void)
}
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
/* Init TX queues */
if (app.nic_tx_port_mask[port] == 1) {
diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c
index 94318ab61..20a6a3d87 100644
--- a/examples/multi_process/l2fwd_fork/main.c
+++ b/examples/multi_process/l2fwd_fork/main.c
@@ -127,7 +127,6 @@ struct cpu_aff_arg{
static const struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -1073,7 +1072,6 @@ main(int argc, char **argv)
/* init one TX queue on each port */
fflush(stdout);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.tx_offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
rte_eth_dev_socket_id(portid),
diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c
index 16f21a187..c36326917 100644
--- a/examples/multi_process/symmetric_mp/main.c
+++ b/examples/multi_process/symmetric_mp/main.c
@@ -178,7 +178,6 @@ smp_port_init(uint16_t port, struct rte_mempool *mbuf_pool,
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
DEV_RX_OFFLOAD_CRC_STRIP),
},
@@ -236,7 +235,6 @@ smp_port_init(uint16_t port, struct rte_mempool *mbuf_pool,
}
txq_conf = info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = port_conf.txmode.offloads;
for (q = 0; q < tx_rings; q ++) {
retval = rte_eth_tx_queue_setup(port, q, nb_txd,
diff --git a/examples/netmap_compat/bridge/bridge.c b/examples/netmap_compat/bridge/bridge.c
index cb1882e65..7afca28cd 100644
--- a/examples/netmap_compat/bridge/bridge.c
+++ b/examples/netmap_compat/bridge/bridge.c
@@ -26,7 +26,6 @@
struct rte_eth_conf eth_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
diff --git a/examples/netmap_compat/lib/compat_netmap.c b/examples/netmap_compat/lib/compat_netmap.c
index af3dd223f..0be0663ed 100644
--- a/examples/netmap_compat/lib/compat_netmap.c
+++ b/examples/netmap_compat/lib/compat_netmap.c
@@ -708,7 +708,6 @@ rte_netmap_init_port(uint16_t portid, const struct rte_netmap_port_conf *conf)
rxq_conf = dev_info.default_rxconf;
rxq_conf.offloads = conf->eth_conf->rxmode.offloads;
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = conf->eth_conf->txmode.offloads;
for (i = 0; i < conf->nr_tx_rings; i++) {
ret = rte_eth_tx_queue_setup(portid, i, tx_slots,
diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index 7ace7d10e..149bfdd02 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -35,11 +35,7 @@ volatile uint8_t quit_signal;
static struct rte_mempool *mbuf_pool;
-static struct rte_eth_conf port_conf_default = {
- .rxmode = {
- .ignore_offload_bitfield = 1,
- },
-};
+static struct rte_eth_conf port_conf_default;
struct worker_thread_args {
struct rte_ring *ring_in;
@@ -293,7 +289,6 @@ configure_eth_port(uint16_t port_id)
}
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf.offloads = port_conf.txmode.offloads;
for (q = 0; q < txRings; q++) {
ret = rte_eth_tx_queue_setup(port_id, q, nb_txd,
diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 40d807239..d1e4a1880 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -306,7 +306,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
DEV_RX_OFFLOAD_CRC_STRIP),
},
@@ -3597,7 +3596,6 @@ main(int argc, char **argv)
fflush(stdout);
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd,
socketid, txconf);
diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index c44013bc1..82ae71c19 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -50,7 +50,6 @@ static uint8_t ptp_enabled_ports[RTE_MAX_ETHPORTS];
static const struct rte_eth_conf port_conf_default = {
.rxmode = {
.max_rx_pkt_len = ETHER_MAX_LEN,
- .ignore_offload_bitfield = 1,
},
};
@@ -217,11 +216,9 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
/* Allocate and set up 1 TX queue per Ethernet port. */
for (q = 0; q < tx_rings; q++) {
- /* Setup txq_flags */
struct rte_eth_txconf *txconf;
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = port_conf.txmode.offloads;
retval = rte_eth_tx_queue_setup(port, q, nb_txd,
diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c
index 42cf4b29f..ca0e9e863 100644
--- a/examples/qos_meter/main.c
+++ b/examples/qos_meter/main.c
@@ -56,7 +56,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
DEV_RX_OFFLOAD_CRC_STRIP),
},
@@ -351,7 +350,6 @@ main(int argc, char **argv)
rte_exit(EXIT_FAILURE, "Port %d RX queue setup error (%d)\n", port_rx, ret);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(port_rx, NIC_TX_QUEUE, nb_txd,
rte_eth_dev_socket_id(port_rx),
@@ -383,7 +381,6 @@ main(int argc, char **argv)
rte_exit(EXIT_FAILURE, "Port %d RX queue setup error (%d)\n", port_tx, ret);
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(port_tx, NIC_TX_QUEUE, nb_txd,
rte_eth_dev_socket_id(port_tx),
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index c9e487975..94cbb26f8 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -59,7 +59,6 @@ static struct rte_eth_conf port_conf = {
.rxmode = {
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -96,7 +95,6 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
tx_conf.tx_free_thresh = 0;
tx_conf.tx_rs_thresh = 0;
tx_conf.tx_deferred_start = 0;
- tx_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
/* init port */
RTE_LOG(INFO, APP, "Initializing port %"PRIu16"... ", portid);
diff --git a/examples/quota_watermark/qw/init.c b/examples/quota_watermark/qw/init.c
index 00725bc95..19164385a 100644
--- a/examples/quota_watermark/qw/init.c
+++ b/examples/quota_watermark/qw/init.c
@@ -24,7 +24,6 @@
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -82,7 +81,6 @@ void configure_eth_port(uint16_t port_id)
/* Initialize the port's TX queue */
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = local_port_conf.txmode.offloads;
ret = rte_eth_tx_queue_setup(port_id, 0, nb_txd,
rte_eth_dev_socket_id(port_id),
diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
index e63ea288f..2058be627 100644
--- a/examples/rxtx_callbacks/main.c
+++ b/examples/rxtx_callbacks/main.c
@@ -20,7 +20,6 @@
static const struct rte_eth_conf port_conf_default = {
.rxmode = {
.max_rx_pkt_len = ETHER_MAX_LEN,
- .ignore_offload_bitfield = 1,
},
};
@@ -104,7 +103,6 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
}
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf.offloads = port_conf.txmode.offloads;
for (q = 0; q < tx_rings; q++) {
retval = rte_eth_tx_queue_setup(port, q, nb_txd,
diff --git a/examples/server_node_efd/server/init.c b/examples/server_node_efd/server/init.c
index 7dfe2fa23..af5a18e28 100644
--- a/examples/server_node_efd/server/init.c
+++ b/examples/server_node_efd/server/init.c
@@ -97,7 +97,6 @@ init_port(uint16_t port_num)
struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
- .ignore_offload_bitfield = 1,
},
};
const uint16_t rx_rings = 1, tx_rings = num_nodes;
@@ -139,7 +138,6 @@ init_port(uint16_t port_num)
}
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf.offloads = port_conf.txmode.offloads;
for (q = 0; q < tx_rings; q++) {
retval = rte_eth_tx_queue_setup(port_num, q, tx_ring_size,
diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c
index 03bc35856..4aba1dc38 100644
--- a/examples/skeleton/basicfwd.c
+++ b/examples/skeleton/basicfwd.c
@@ -20,7 +20,6 @@
static const struct rte_eth_conf port_conf_default = {
.rxmode = {
.max_rx_pkt_len = ETHER_MAX_LEN,
- .ignore_offload_bitfield = 1,
},
};
@@ -68,7 +67,6 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
}
txconf = dev_info.default_txconf;
- txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf.offloads = port_conf.txmode.offloads;
/* Allocate and set up 1 TX queue per Ethernet port. */
for (q = 0; q < tx_rings; q++) {
diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c
index 299c29d27..b99ab97d3 100644
--- a/examples/tep_termination/vxlan_setup.c
+++ b/examples/tep_termination/vxlan_setup.c
@@ -69,7 +69,6 @@ uint8_t tep_filter_type[] = {RTE_TUNNEL_FILTER_IMAC_TENID,
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
},
.txmode = {
@@ -131,7 +130,6 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool)
rxconf = &dev_info.default_rxconf;
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
if (!rte_eth_dev_is_valid_port(port))
return -1;
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 1659ef315..2175c1186 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -116,7 +116,6 @@ static struct rte_eth_conf vmdq_conf_default = {
.rxmode = {
.mq_mode = ETH_MQ_RX_VMDQ_ONLY,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
/*
* VLAN strip is necessary for 1G NIC such as I350,
* this fixes bug of ipv4 forwarding in guest can't
@@ -256,7 +255,6 @@ port_init(uint16_t port)
rxconf = &dev_info.default_rxconf;
txconf = &dev_info.default_txconf;
rxconf->rx_drop_en = 1;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
/*configure the number of supported virtio devices based on VMDQ limits */
num_devices = dev_info.max_vmdq_pools;
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index c9805a461..8911f2659 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -47,7 +47,6 @@ static volatile bool force_quit;
static const struct rte_eth_conf port_conf_default = {
.rxmode = {
.max_rx_pkt_len = ETHER_MAX_LEN,
- .ignore_offload_bitfield = 1,
},
};
@@ -83,7 +82,6 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
}
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = port_conf.txmode.offloads;
/* Allocate and set up 1 TX queue per Ethernet port. */
for (q = 0; q < tx_rings; q++) {
diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 52596dd5e..627a5da48 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -65,7 +65,6 @@ static const struct rte_eth_conf vmdq_conf_default = {
.rxmode = {
.mq_mode = ETH_MQ_RX_VMDQ_ONLY,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
},
.txmode = {
@@ -237,7 +236,6 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
rxconf = &dev_info.default_rxconf;
rxconf->rx_drop_en = 1;
txconf = &dev_info.default_txconf;
- txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
txconf->offloads = port_conf.txmode.offloads;
for (q = 0; q < rxRings; q++) {
retval = rte_eth_rx_queue_setup(port, q, rxRingSize,
diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c
index 2626a2f19..5a0463c58 100644
--- a/examples/vmdq_dcb/main.c
+++ b/examples/vmdq_dcb/main.c
@@ -71,7 +71,6 @@ static const struct rte_eth_conf vmdq_dcb_conf_default = {
.rxmode = {
.mq_mode = ETH_MQ_RX_VMDQ_DCB,
.split_hdr_size = 0,
- .ignore_offload_bitfield = 1,
},
.txmode = {
.mq_mode = ETH_MQ_TX_VMDQ_DCB,
@@ -290,7 +289,6 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
}
txq_conf = dev_info.default_txconf;
- txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
txq_conf.offloads = port_conf.txmode.offloads;
for (q = 0; q < num_queues; q++) {
retval = rte_eth_tx_queue_setup(port, q, txRingSize,
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 5aa7a1a7d..16b8258a7 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -974,41 +974,6 @@ rte_eth_speed_bitflag(uint32_t speed, int duplex)
}
}
-/**
- * A conversion function from rxmode bitfield API.
- */
-static void
-rte_eth_convert_rx_offload_bitfield(const struct rte_eth_rxmode *rxmode,
- uint64_t *rx_offloads)
-{
- uint64_t offloads = 0;
-
- if (rxmode->header_split == 1)
- offloads |= DEV_RX_OFFLOAD_HEADER_SPLIT;
- if (rxmode->hw_ip_checksum == 1)
- offloads |= DEV_RX_OFFLOAD_CHECKSUM;
- if (rxmode->hw_vlan_filter == 1)
- offloads |= DEV_RX_OFFLOAD_VLAN_FILTER;
- if (rxmode->hw_vlan_strip == 1)
- offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
- if (rxmode->hw_vlan_extend == 1)
- offloads |= DEV_RX_OFFLOAD_VLAN_EXTEND;
- if (rxmode->jumbo_frame == 1)
- offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
- if (rxmode->hw_strip_crc == 1)
- offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
- if (rxmode->enable_scatter == 1)
- offloads |= DEV_RX_OFFLOAD_SCATTER;
- if (rxmode->enable_lro == 1)
- offloads |= DEV_RX_OFFLOAD_TCP_LRO;
- if (rxmode->hw_timestamp == 1)
- offloads |= DEV_RX_OFFLOAD_TIMESTAMP;
- if (rxmode->security == 1)
- offloads |= DEV_RX_OFFLOAD_SECURITY;
-
- *rx_offloads = offloads;
-}
-
const char * __rte_experimental
rte_eth_dev_rx_offload_name(uint64_t offload)
{
@@ -1095,14 +1060,6 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
return -EBUSY;
}
- /*
- * Convert between the offloads API to enable PMDs to support
- * only one of them.
- */
- if (dev_conf->rxmode.ignore_offload_bitfield == 0)
- rte_eth_convert_rx_offload_bitfield(
- &dev_conf->rxmode, &local_conf.rxmode.offloads);
-
/* Copy the dev_conf parameter into the dev structure */
memcpy(&dev->data->dev_conf, &local_conf, sizeof(dev->data->dev_conf));
@@ -1547,14 +1504,6 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
rx_conf = &dev_info.default_rxconf;
local_conf = *rx_conf;
- if (dev->data->dev_conf.rxmode.ignore_offload_bitfield == 0) {
- /**
- * Reflect port offloads to queue offloads in order for
- * offloads to not be discarded.
- */
- rte_eth_convert_rx_offload_bitfield(&dev->data->dev_conf.rxmode,
- &local_conf.offloads);
- }
/*
* If an offloading has already been enabled in
@@ -1596,55 +1545,6 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
return eth_err(port_id, ret);
}
-/**
- * Convert from tx offloads to txq_flags.
- */
-static void
-rte_eth_convert_tx_offload(const uint64_t tx_offloads, uint32_t *txq_flags)
-{
- uint32_t flags = 0;
-
- if (!(tx_offloads & DEV_TX_OFFLOAD_MULTI_SEGS))
- flags |= ETH_TXQ_FLAGS_NOMULTSEGS;
- if (!(tx_offloads & DEV_TX_OFFLOAD_VLAN_INSERT))
- flags |= ETH_TXQ_FLAGS_NOVLANOFFL;
- if (!(tx_offloads & DEV_TX_OFFLOAD_SCTP_CKSUM))
- flags |= ETH_TXQ_FLAGS_NOXSUMSCTP;
- if (!(tx_offloads & DEV_TX_OFFLOAD_UDP_CKSUM))
- flags |= ETH_TXQ_FLAGS_NOXSUMUDP;
- if (!(tx_offloads & DEV_TX_OFFLOAD_TCP_CKSUM))
- flags |= ETH_TXQ_FLAGS_NOXSUMTCP;
- if (tx_offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
- flags |= ETH_TXQ_FLAGS_NOREFCOUNT | ETH_TXQ_FLAGS_NOMULTMEMP;
-
- *txq_flags = flags;
-}
-
-/**
- * A conversion function from txq_flags API.
- */
-static void
-rte_eth_convert_txq_flags(const uint32_t txq_flags, uint64_t *tx_offloads)
-{
- uint64_t offloads = 0;
-
- if (!(txq_flags & ETH_TXQ_FLAGS_NOMULTSEGS))
- offloads |= DEV_TX_OFFLOAD_MULTI_SEGS;
- if (!(txq_flags & ETH_TXQ_FLAGS_NOVLANOFFL))
- offloads |= DEV_TX_OFFLOAD_VLAN_INSERT;
- if (!(txq_flags & ETH_TXQ_FLAGS_NOXSUMSCTP))
- offloads |= DEV_TX_OFFLOAD_SCTP_CKSUM;
- if (!(txq_flags & ETH_TXQ_FLAGS_NOXSUMUDP))
- offloads |= DEV_TX_OFFLOAD_UDP_CKSUM;
- if (!(txq_flags & ETH_TXQ_FLAGS_NOXSUMTCP))
- offloads |= DEV_TX_OFFLOAD_TCP_CKSUM;
- if ((txq_flags & ETH_TXQ_FLAGS_NOREFCOUNT) &&
- (txq_flags & ETH_TXQ_FLAGS_NOMULTMEMP))
- offloads |= DEV_TX_OFFLOAD_MBUF_FAST_FREE;
-
- *tx_offloads = offloads;
-}
-
int
rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
uint16_t nb_tx_desc, unsigned int socket_id,
@@ -1707,15 +1607,7 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
if (tx_conf == NULL)
tx_conf = &dev_info.default_txconf;
- /*
- * Convert between the offloads API to enable PMDs to support
- * only one of them.
- */
local_conf = *tx_conf;
- if (!(tx_conf->txq_flags & ETH_TXQ_FLAGS_IGNORE)) {
- rte_eth_convert_txq_flags(tx_conf->txq_flags,
- &local_conf.offloads);
- }
/*
* If an offloading has already been enabled in
@@ -2493,7 +2385,6 @@ void
rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
{
struct rte_eth_dev *dev;
- struct rte_eth_txconf *txconf;
const struct rte_eth_desc_lim lim = {
.nb_max = UINT16_MAX,
.nb_min = 0,
@@ -2515,9 +2406,6 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
dev_info->nb_tx_queues = dev->data->nb_tx_queues;
dev_info->dev_flags = &dev->data->dev_flags;
- txconf = &dev_info->default_txconf;
- /* convert offload to txq_flags to support legacy app */
- rte_eth_convert_tx_offload(txconf->offloads, &txconf->txq_flags);
}
int
@@ -3958,7 +3846,6 @@ rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
struct rte_eth_txq_info *qinfo)
{
struct rte_eth_dev *dev;
- struct rte_eth_txconf *txconf = &qinfo->conf;
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
@@ -3975,8 +3862,6 @@ rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
memset(qinfo, 0, sizeof(*qinfo));
dev->dev_ops->txq_info_get(dev, queue_id, qinfo);
- /* convert offload to txq_flags to support legacy app */
- rte_eth_convert_tx_offload(txconf->offloads, &txconf->txq_flags);
return 0;
}
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index aa991da62..8d6b1f6e0 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -326,7 +326,7 @@ enum rte_eth_tx_mq_mode {
struct rte_eth_rxmode {
/** The multi-queue packet distribution mode to be used, e.g. RSS. */
enum rte_eth_rx_mq_mode mq_mode;
- uint32_t max_rx_pkt_len; /**< Only used if jumbo_frame enabled. */
+ uint32_t max_rx_pkt_len; /**< Only used if JUMBO_FRAME enabled. */
uint16_t split_hdr_size; /**< hdr buf size (header_split enabled).*/
/**
* Per-port Rx offloads to be set using DEV_RX_OFFLOAD_* flags.
@@ -334,33 +334,6 @@ struct rte_eth_rxmode {
* structure are allowed to be set.
*/
uint64_t offloads;
- __extension__
- /**
- * Below bitfield API is obsolete. Application should
- * enable per-port offloads using the offload field
- * above.
- */
- uint16_t header_split : 1, /**< Header Split enable. */
- hw_ip_checksum : 1, /**< IP/UDP/TCP checksum offload enable. */
- hw_vlan_filter : 1, /**< VLAN filter enable. */
- hw_vlan_strip : 1, /**< VLAN strip enable. */
- hw_vlan_extend : 1, /**< Extended VLAN enable. */
- jumbo_frame : 1, /**< Jumbo Frame Receipt enable. */
- hw_strip_crc : 1, /**< Enable CRC stripping by hardware. */
- enable_scatter : 1, /**< Enable scatter packets rx handler */
- enable_lro : 1, /**< Enable LRO */
- hw_timestamp : 1, /**< Enable HW timestamp */
- security : 1, /**< Enable rte_security offloads */
- /**
- * When set the offload bitfield should be ignored.
- * Instead per-port Rx offloads should be set on offloads
- * field above.
- * Per-queue offloads shuold be set on rte_eth_rxq_conf
- * structure.
- * This bit is temporary till rxmode bitfield offloads API will
- * be deprecated.
- */
- ignore_offload_bitfield : 1;
};
/**
@@ -707,28 +680,6 @@ struct rte_eth_rxconf {
uint64_t offloads;
};
-#define ETH_TXQ_FLAGS_NOMULTSEGS 0x0001 /**< nb_segs=1 for all mbufs */
-#define ETH_TXQ_FLAGS_NOREFCOUNT 0x0002 /**< refcnt can be ignored */
-#define ETH_TXQ_FLAGS_NOMULTMEMP 0x0004 /**< all bufs come from same mempool */
-#define ETH_TXQ_FLAGS_NOVLANOFFL 0x0100 /**< disable VLAN offload */
-#define ETH_TXQ_FLAGS_NOXSUMSCTP 0x0200 /**< disable SCTP checksum offload */
-#define ETH_TXQ_FLAGS_NOXSUMUDP 0x0400 /**< disable UDP checksum offload */
-#define ETH_TXQ_FLAGS_NOXSUMTCP 0x0800 /**< disable TCP checksum offload */
-#define ETH_TXQ_FLAGS_NOOFFLOADS \
- (ETH_TXQ_FLAGS_NOVLANOFFL | ETH_TXQ_FLAGS_NOXSUMSCTP | \
- ETH_TXQ_FLAGS_NOXSUMUDP | ETH_TXQ_FLAGS_NOXSUMTCP)
-#define ETH_TXQ_FLAGS_NOXSUMS \
- (ETH_TXQ_FLAGS_NOXSUMSCTP | ETH_TXQ_FLAGS_NOXSUMUDP | \
- ETH_TXQ_FLAGS_NOXSUMTCP)
-/**
- * When set the txq_flags should be ignored,
- * instead per-queue Tx offloads will be set on offloads field
- * located on rte_eth_txq_conf struct.
- * This flag is temporary till the rte_eth_txq_conf.txq_flags
- * API will be deprecated.
- */
-#define ETH_TXQ_FLAGS_IGNORE 0x8000
-
/**
* A structure used to configure a TX ring of an Ethernet port.
*/
@@ -738,7 +689,6 @@ struct rte_eth_txconf {
uint16_t tx_free_thresh; /**< Start freeing TX buffers if there are
less free descriptors than this value. */
- uint32_t txq_flags; /**< Set flags for the Tx queue */
uint8_t tx_deferred_start; /**< Do not start queue with rte_eth_dev_start(). */
/**
* Per-queue Tx offloads to be set using DEV_TX_OFFLOAD_* flags.
@@ -1680,12 +1630,6 @@ int rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
* The *tx_rs_thresh* value should be less or equal then
* *tx_free_thresh* value, and both of them should be less then
* *nb_tx_desc* - 3.
- * - The *txq_flags* member contains flags to pass to the TX queue setup
- * function to configure the behavior of the TX queue. This should be set
- * to 0 if no special configuration is required.
- * This API is obsolete and will be deprecated. Applications
- * should set it to ETH_TXQ_FLAGS_IGNORE and use
- * the offloads field below.
* - The *offloads* member contains Tx offloads to be enabled.
* If an offloading set in tx_conf->offloads
* hasn't been set in the input argument eth_conf->txmode.offloads
@@ -4081,7 +4025,7 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
*
* If the PMD is DEV_TX_OFFLOAD_MT_LOCKFREE capable, multiple threads can
* invoke this function concurrently on the same tx queue without SW lock.
- * @see rte_eth_dev_info_get, struct rte_eth_txconf::txq_flags
+ * @see rte_eth_dev_info_get, struct rte_eth_txconf::offloads
*
* @see rte_eth_tx_prepare to perform some prior checks or adjustments
* for offloads.
--
2.17.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH v2 5/5] ethdev: remove old offload API
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 5/5] ethdev: remove old offload API Thomas Monjalon
@ 2018-07-03 12:28 ` Shahaf Shuler
2018-07-04 11:31 ` Andrew Rybchenko
1 sibling, 0 replies; 25+ messages in thread
From: Shahaf Shuler @ 2018-07-03 12:28 UTC (permalink / raw)
To: Thomas Monjalon, ferruh.yigit, arybchenko
Cc: dev, ravi1.kumar, rasesh.mody, maxime.coquelin
Tuesday, July 3, 2018 12:28 AM, Thomas Monjalon:
> Subject: [PATCH v2 5/5] ethdev: remove old offload API
>
> From: Ferruh Yigit <ferruh.yigit@intel.com>
>
> In DPDK 17.11, the ethdev offloads API has changed:
> commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")
> commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
> The new API is documented in the programmer's guide:
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F
> %2Fdoc.dpdk.org%2Fguides%2Fprog_guide%2Fpoll_mode_drv.html%23hard
> ware-
> offload&data=02%7C01%7Cshahafs%40mellanox.com%7C0c0f5c75aed84da0
> 5ccc08d5e062b33f%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C63
> 6661636877193949&sdata=9SQ%2FdCvdcCsAz1u1DLHCCG8qkGJ1PdxkmMZE
> CEpowLg%3D&reserved=0
>
> For reminder, the main concepts in the new API were:
> - All offloads are disabled by default
> - Distinction between per port and per queue offloads.
>
> The transition bits are now removed:
> - Translation of the old API in ethdev
> - rte_eth_conf.rxmode.ignore_offload_bitfield
> - ETH_TXQ_FLAGS_IGNORE
>
> The old API bits are now removed:
> - Rx per-port rte_eth_conf.rxmode.[bit-fields]
> - Tx per-queue rte_eth_txconf.txq_flags
> - ETH_TXQ_FLAGS_NO*
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed by: Shahaf Shuler <shahafs@mellanox.com>
Thanks for this big work.
> ---
> app/test-eventdev/test_pipeline_common.c | 1 -
> app/test-pmd/testpmd.c | 3 -
> doc/guides/nics/features.rst | 1 -
> doc/guides/prog_guide/poll_mode_drv.rst | 5 -
> doc/guides/rel_notes/deprecation.rst | 9 --
> doc/guides/sample_app_ug/flow_filtering.rst | 2 -
> drivers/net/axgbe/axgbe_ethdev.c | 2 -
> drivers/net/axgbe/axgbe_rxtx.c | 4 +-
> drivers/net/ixgbe/ixgbe_rxtx.c | 2 +-
> drivers/net/nfp/nfp_net.c | 4 +-
> drivers/net/qede/qede_ethdev.c | 4 +-
> drivers/net/sfc/sfc_dp_tx.h | 2 -
> drivers/net/sfc/sfc_ethdev.c | 5 +-
> drivers/net/sfc/sfc_rx.c | 1 -
> drivers/net/sfc/sfc_tx.c | 25 +---
> drivers/net/sfc/sfc_tx.h | 1 -
> drivers/net/virtio/virtio_ethdev.c | 3 -
> drivers/net/vmxnet3/vmxnet3_ethdev.c | 1 -
> examples/bond/main.c | 3 -
> examples/distributor/main.c | 2 -
> examples/ethtool/ethtool-app/main.c | 2 -
> examples/eventdev_pipeline/main.c | 2 -
> examples/exception_path/main.c | 2 -
> examples/flow_classify/flow_classify.c | 2 -
> examples/flow_filtering/main.c | 1 -
> examples/ip_fragmentation/main.c | 2 -
> examples/ip_reassembly/main.c | 2 -
> examples/ipsec-secgw/ipsec-secgw.c | 2 -
> examples/ipv4_multicast/main.c | 2 -
> examples/kni/main.c | 2 -
> examples/l2fwd-crypto/main.c | 2 -
> examples/l2fwd-jobstats/main.c | 2 -
> examples/l2fwd-keepalive/main.c | 2 -
> examples/l2fwd/main.c | 2 -
> examples/l3fwd-acl/main.c | 2 -
> examples/l3fwd-power/main.c | 2 -
> examples/l3fwd-vf/main.c | 2 -
> examples/l3fwd/main.c | 2 -
> examples/link_status_interrupt/main.c | 2 -
> examples/load_balancer/init.c | 2 -
> examples/multi_process/l2fwd_fork/main.c | 2 -
> examples/multi_process/symmetric_mp/main.c | 2 -
> examples/netmap_compat/bridge/bridge.c | 1 -
> examples/netmap_compat/lib/compat_netmap.c | 1 -
> examples/packet_ordering/main.c | 7 +-
> .../performance-thread/l3fwd-thread/main.c | 2 -
> examples/ptpclient/ptpclient.c | 3 -
> examples/qos_meter/main.c | 3 -
> examples/qos_sched/init.c | 2 -
> examples/quota_watermark/qw/init.c | 2 -
> examples/rxtx_callbacks/main.c | 2 -
> examples/server_node_efd/server/init.c | 2 -
> examples/skeleton/basicfwd.c | 2 -
> examples/tep_termination/vxlan_setup.c | 2 -
> examples/vhost/main.c | 2 -
> examples/vm_power_manager/main.c | 2 -
> examples/vmdq/main.c | 2 -
> examples/vmdq_dcb/main.c | 2 -
> lib/librte_ethdev/rte_ethdev.c | 115 ------------------
> lib/librte_ethdev/rte_ethdev.h | 60 +--------
> 60 files changed, 13 insertions(+), 322 deletions(-)
>
> diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-
> eventdev/test_pipeline_common.c
> index 719518ff3..3bc9d513d 100644
> --- a/app/test-eventdev/test_pipeline_common.c
> +++ b/app/test-eventdev/test_pipeline_common.c
> @@ -223,7 +223,6 @@ pipeline_ethdev_setup(struct evt_test *test, struct
> evt_options *opt)
> .mq_mode = ETH_MQ_RX_RSS,
> .max_rx_pkt_len = ETHER_MAX_LEN,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> - .ignore_offload_bitfield = 1,
> },
> .rx_adv_conf = {
> .rss_conf = {
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index 63c2a5aca..dde7d43e3 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -334,7 +334,6 @@ lcoreid_t latencystats_lcore_id = -1;
> struct rte_eth_rxmode rx_mode = {
> .max_rx_pkt_len = ETHER_MAX_LEN, /**< Default maximum frame
> length. */
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> - .ignore_offload_bitfield = 1,
> };
>
> struct rte_eth_txmode tx_mode = {
> @@ -1645,8 +1644,6 @@ start_port(portid_t pid)
> port->need_reconfig_queues = 0;
> /* setup tx queues */
> for (qi = 0; qi < nb_txq; qi++) {
> - port->tx_conf[qi].txq_flags =
> - ETH_TXQ_FLAGS_IGNORE;
> if ((numa_support) &&
> (txring_numa[pi] !=
> NUMA_NO_CONFIG))
> diag = rte_eth_tx_queue_setup(pi,
> qi,
> diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
> index ee89d6bfa..902ac160d 100644
> --- a/doc/guides/nics/features.rst
> +++ b/doc/guides/nics/features.rst
> @@ -577,7 +577,6 @@ Supports L4 checksum offload.
>
> * **[uses] rte_eth_rxconf,rte_eth_rxmode**:
> ``offloads:DEV_RX_OFFLOAD_UDP_CKSUM,DEV_RX_OFFLOAD_TCP_CKSUM
> ``.
> * **[uses] rte_eth_txconf,rte_eth_txmode**:
> ``offloads:DEV_TX_OFFLOAD_UDP_CKSUM,DEV_TX_OFFLOAD_TCP_CKSUM
> ,DEV_TX_OFFLOAD_SCTP_CKSUM``.
> -* **[uses] user config**: ``dev_conf.rxmode.hw_ip_checksum``.
> * **[uses] mbuf**: ``mbuf.ol_flags:PKT_TX_IPV4`` | ``PKT_TX_IPV6``,
> ``mbuf.ol_flags:PKT_TX_L4_NO_CKSUM`` | ``PKT_TX_TCP_CKSUM`` |
> ``PKT_TX_SCTP_CKSUM`` | ``PKT_TX_UDP_CKSUM``.
> diff --git a/doc/guides/prog_guide/poll_mode_drv.rst
> b/doc/guides/prog_guide/poll_mode_drv.rst
> index af82352a0..4b69f6cbe 100644
> --- a/doc/guides/prog_guide/poll_mode_drv.rst
> +++ b/doc/guides/prog_guide/poll_mode_drv.rst
> @@ -328,11 +328,6 @@ A newly added offloads in ``[rt]x_conf->offloads`` to
> ``rte_eth_[rt]x_queue_setu
> is the one which hasn't been enabled in ``rte_eth_dev_configure()`` and is
> requested to be enabled
> in ``rte_eth_[rt]x_queue_setup()``. It must be per-queue type, otherwise
> trigger an error log.
>
> -For an application to use the Tx offloads API it should set the
> ``ETH_TXQ_FLAGS_IGNORE`` flag in the ``txq_flags`` field located in
> ``rte_eth_txconf`` struct.
> -In such cases it is not required to set other flags in ``txq_flags``.
> -For an application to use the Rx offloads API it should set the
> ``ignore_offload_bitfield`` bit in the ``rte_eth_rxmode`` struct.
> -In such cases it is not required to set other bitfield offloads in the ``rxmode``
> struct.
> -
> Poll Mode Driver API
> --------------------
>
> diff --git a/doc/guides/rel_notes/deprecation.rst
> b/doc/guides/rel_notes/deprecation.rst
> index cd128ae23..8df41cb6a 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -58,15 +58,6 @@ Deprecation Notices
> experimental API ``rte_pktmbuf_attach_extbuf()`` is used. Removal of the
> macro
> is to fix this semantic inconsistency.
>
> -* ethdev: a new Tx and Rx offload API was introduced on 17.11.
> - In the new API, offloads are divided into per-port and per-queue offloads.
> - Offloads are disabled by default and enabled per application request.
> -
> - In later releases the old offloading API will be deprecated, which will
> include:
> - - removal of ``ETH_TXQ_FLAGS_NO*`` flags.
> - - removal of ``txq_flags`` field from ``rte_eth_txconf`` struct.
> - - removal of the offloads bit-field from ``rte_eth_rxmode`` struct.
> -
> * ethdev: In v18.11 ``DEV_RX_OFFLOAD_CRC_STRIP`` offload flag will be
> removed, default
> behavior without any flag will be changed to CRC strip.
> To keep CRC ``DEV_RX_OFFLOAD_KEEP_CRC`` flag is required.
> diff --git a/doc/guides/sample_app_ug/flow_filtering.rst
> b/doc/guides/sample_app_ug/flow_filtering.rst
> index bbf8af0e6..bd0ae1e2f 100644
> --- a/doc/guides/sample_app_ug/flow_filtering.rst
> +++ b/doc/guides/sample_app_ug/flow_filtering.rst
> @@ -139,7 +139,6 @@ application is shown below:
> struct rte_eth_conf port_conf = {
> .rxmode = {
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> @@ -216,7 +215,6 @@ The Ethernet port is configured with default settings
> using the
> struct rte_eth_conf port_conf = {
> .rxmode = {
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> diff --git a/drivers/net/axgbe/axgbe_ethdev.c
> b/drivers/net/axgbe/axgbe_ethdev.c
> index e3773f4a2..c9c56c48b 100644
> --- a/drivers/net/axgbe/axgbe_ethdev.c
> +++ b/drivers/net/axgbe/axgbe_ethdev.c
> @@ -387,8 +387,6 @@ axgbe_dev_info_get(struct rte_eth_dev *dev, struct
> rte_eth_dev_info *dev_info)
>
> dev_info->default_txconf = (struct rte_eth_txconf) {
> .tx_free_thresh = AXGBE_TX_FREE_THRESH,
> - .txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS |
> - ETH_TXQ_FLAGS_NOOFFLOADS,
> };
> }
>
> diff --git a/drivers/net/axgbe/axgbe_rxtx.c
> b/drivers/net/axgbe/axgbe_rxtx.c
> index eae830f2e..c5fd5f418 100644
> --- a/drivers/net/axgbe/axgbe_rxtx.c
> +++ b/drivers/net/axgbe/axgbe_rxtx.c
> @@ -371,10 +371,8 @@ int axgbe_dev_tx_queue_setup(struct rte_eth_dev
> *dev, uint16_t queue_idx,
> if (txq->nb_desc % txq->free_thresh != 0)
> txq->vector_disable = 1;
>
> - if ((tx_conf->txq_flags & (uint32_t)ETH_TXQ_FLAGS_NOOFFLOADS)
> !=
> - ETH_TXQ_FLAGS_NOOFFLOADS) {
> + if (tx_conf->offloads != 0)
> txq->vector_disable = 1;
> - }
>
> /* Allocate TX ring hardware descriptors */
> tsize = txq->nb_desc * sizeof(struct axgbe_tx_desc);
> diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
> index 9f2e5f114..354181664 100644
> --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> @@ -1420,7 +1420,7 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status,
> uint64_t vlan_flags)
> /*
> * Check if VLAN present only.
> * Do not check whether L3/L4 rx checksum done by NIC or not,
> - * That can be found from rte_eth_rxmode.hw_ip_checksum flag
> + * That can be found from rte_eth_rxmode.offloads flag
> */
> pkt_flags = (rx_status & IXGBE_RXD_STAT_VP) ? vlan_flags : 0;
>
> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
> index 5e3533901..30d3cd97b 100644
> --- a/drivers/net/nfp/nfp_net.c
> +++ b/drivers/net/nfp/nfp_net.c
> @@ -1439,9 +1439,9 @@ nfp_net_dev_mtu_set(struct rte_eth_dev *dev,
> uint16_t mtu)
>
> /* switch to jumbo mode if needed */
> if ((uint32_t)mtu > ETHER_MAX_LEN)
> - dev->data->dev_conf.rxmode.jumbo_frame = 1;
> + dev->data->dev_conf.rxmode.offloads |=
> DEV_RX_OFFLOAD_JUMBO_FRAME;
> else
> - dev->data->dev_conf.rxmode.jumbo_frame = 0;
> + dev->data->dev_conf.rxmode.offloads &=
> ~DEV_RX_OFFLOAD_JUMBO_FRAME;
>
> /* update max frame size */
> dev->data->dev_conf.rxmode.max_rx_pkt_len = (uint32_t)mtu;
> diff --git a/drivers/net/qede/qede_ethdev.c
> b/drivers/net/qede/qede_ethdev.c
> index 32005e969..eb2a22992 100644
> --- a/drivers/net/qede/qede_ethdev.c
> +++ b/drivers/net/qede/qede_ethdev.c
> @@ -2537,9 +2537,9 @@ static int qede_set_mtu(struct rte_eth_dev *dev,
> uint16_t mtu)
> }
> }
> if (max_rx_pkt_len > ETHER_MAX_LEN)
> - dev->data->dev_conf.rxmode.jumbo_frame = 1;
> + dev->data->dev_conf.rxmode.offloads |=
> DEV_RX_OFFLOAD_JUMBO_FRAME;
> else
> - dev->data->dev_conf.rxmode.jumbo_frame = 0;
> + dev->data->dev_conf.rxmode.offloads &=
> ~DEV_RX_OFFLOAD_JUMBO_FRAME;
>
> if (!dev->data->dev_started && restart) {
> qede_dev_start(dev);
> diff --git a/drivers/net/sfc/sfc_dp_tx.h b/drivers/net/sfc/sfc_dp_tx.h
> index a075612c7..eda9676c8 100644
> --- a/drivers/net/sfc/sfc_dp_tx.h
> +++ b/drivers/net/sfc/sfc_dp_tx.h
> @@ -39,8 +39,6 @@ struct sfc_dp_tx_qcreate_info {
> unsigned int max_fill_level;
> /** Minimum number of unused Tx descriptors to do reap */
> unsigned int free_thresh;
> - /** Transmit queue configuration flags */
> - unsigned int flags;
> /** Offloads enabled on the transmit queue */
> uint64_t offloads;
> /** Tx queue size */
> diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
> index 1b6499f85..531539e84 100644
> --- a/drivers/net/sfc/sfc_ethdev.c
> +++ b/drivers/net/sfc/sfc_ethdev.c
> @@ -874,14 +874,12 @@ sfc_dev_set_mtu(struct rte_eth_dev *dev,
> uint16_t mtu)
> }
>
> /*
> - * The driver does not use it, but other PMDs update jumbo_frame
> + * The driver does not use it, but other PMDs update jumbo frame
> * flag and max_rx_pkt_len when MTU is set.
> */
> if (mtu > ETHER_MAX_LEN) {
> struct rte_eth_rxmode *rxmode = &dev->data-
> >dev_conf.rxmode;
> -
> rxmode->offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
> - rxmode->jumbo_frame = 1;
> }
>
> dev->data->dev_conf.rxmode.max_rx_pkt_len = sa->port.pdu;
> @@ -1089,7 +1087,6 @@ sfc_tx_queue_info_get(struct rte_eth_dev *dev,
> uint16_t tx_queue_id,
>
> memset(qinfo, 0, sizeof(*qinfo));
>
> - qinfo->conf.txq_flags = txq_info->txq->flags;
> qinfo->conf.offloads = txq_info->txq->offloads;
> qinfo->conf.tx_free_thresh = txq_info->txq->free_thresh;
> qinfo->conf.tx_deferred_start = txq_info->deferred_start;
> diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
> index 98858d9d9..158c8e94b 100644
> --- a/drivers/net/sfc/sfc_rx.c
> +++ b/drivers/net/sfc/sfc_rx.c
> @@ -1449,7 +1449,6 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct
> rte_eth_rxmode *rxmode)
> if (rte_eth_dev_must_keep_crc(rxmode->offloads)) {
> sfc_warn(sa, "FCS stripping cannot be disabled - always on");
> rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
> - rxmode->hw_strip_crc = 1;
> }
>
> return rc;
> diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
> index 1bcc2c697..6d42a1a65 100644
> --- a/drivers/net/sfc/sfc_tx.c
> +++ b/drivers/net/sfc/sfc_tx.c
> @@ -171,7 +171,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int
> sw_index,
> txq->free_thresh =
> (tx_conf->tx_free_thresh) ? tx_conf->tx_free_thresh :
> SFC_TX_DEFAULT_FREE_THRESH;
> - txq->flags = tx_conf->txq_flags;
> txq->offloads = offloads;
>
> rc = sfc_dma_alloc(sa, "txq", sw_index, EFX_TXQ_SIZE(txq_info-
> >entries),
> @@ -182,7 +181,6 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int
> sw_index,
> memset(&info, 0, sizeof(info));
> info.max_fill_level = txq_max_fill_level;
> info.free_thresh = txq->free_thresh;
> - info.flags = tx_conf->txq_flags;
> info.offloads = offloads;
> info.txq_entries = txq_info->entries;
> info.dma_desc_size_max = encp->enc_tx_dma_desc_size_max;
> @@ -431,18 +429,10 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int
> sw_index)
> if (rc != 0)
> goto fail_ev_qstart;
>
> - /*
> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a
> legacy
> - * application which expects that IPv4 checksum offload is enabled
> - * all the time as there is no legacy flag to turn off the offload.
> - */
> - if ((txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) ||
> - (~txq->flags & ETH_TXQ_FLAGS_IGNORE))
> + if (txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)
> flags |= EFX_TXQ_CKSUM_IPV4;
>
> - if ((txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
> - (offloads_supported &
> DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)))
> + if (txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
> flags |= EFX_TXQ_CKSUM_INNER_IPV4;
>
> if ((txq->offloads & DEV_TX_OFFLOAD_TCP_CKSUM) ||
> @@ -453,16 +443,7 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int
> sw_index)
> flags |= EFX_TXQ_CKSUM_INNER_TCPUDP;
> }
>
> - /*
> - * The absence of ETH_TXQ_FLAGS_IGNORE is associated with a
> legacy
> - * application. In turn, the absence of ETH_TXQ_FLAGS_NOXSUMTCP
> is
> - * associated specifically with a legacy application which expects
> - * both TCP checksum offload and TSO to be enabled because the
> legacy
> - * API does not provide a dedicated mechanism to control TSO.
> - */
> - if ((txq->offloads & DEV_TX_OFFLOAD_TCP_TSO) ||
> - ((~txq->flags & ETH_TXQ_FLAGS_IGNORE) &&
> - (~txq->flags & ETH_TXQ_FLAGS_NOXSUMTCP)))
> + if (txq->offloads & DEV_TX_OFFLOAD_TCP_TSO)
> flags |= EFX_TXQ_FATSOV2;
>
> rc = efx_tx_qcreate(sa->nic, sw_index, 0, &txq->mem,
> diff --git a/drivers/net/sfc/sfc_tx.h b/drivers/net/sfc/sfc_tx.h
> index c2e5f13e9..146b805ca 100644
> --- a/drivers/net/sfc/sfc_tx.h
> +++ b/drivers/net/sfc/sfc_tx.h
> @@ -58,7 +58,6 @@ struct sfc_txq {
> struct sfc_dp_txq *dp;
> efx_txq_t *common;
> unsigned int free_thresh;
> - unsigned int flags;
> uint64_t offloads;
> };
>
> diff --git a/drivers/net/virtio/virtio_ethdev.c
> b/drivers/net/virtio/virtio_ethdev.c
> index 02980e3d1..119666611 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -2143,9 +2143,6 @@ virtio_dev_info_get(struct rte_eth_dev *dev,
> struct rte_eth_dev_info *dev_info)
> dev_info->min_rx_bufsize = VIRTIO_MIN_RX_BUFSIZE;
> dev_info->max_rx_pktlen = VIRTIO_MAX_RX_PKTLEN;
> dev_info->max_mac_addrs = VIRTIO_MAX_MAC_ADDRS;
> - dev_info->default_txconf = (struct rte_eth_txconf) {
> - .txq_flags = ETH_TXQ_FLAGS_NOOFFLOADS
> - };
>
> host_features = VTPCI_OPS(hw)->get_features(hw);
> dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
> diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c
> b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> index 95b465952..ace9d37c5 100644
> --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
> +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> @@ -1054,7 +1054,6 @@ vmxnet3_dev_info_get(struct rte_eth_dev *dev
> __rte_unused,
> dev_info->speed_capa = ETH_LINK_SPEED_10G;
> dev_info->max_mac_addrs = VMXNET3_MAX_MAC_ADDRS;
>
> - dev_info->default_txconf.txq_flags =
> ETH_TXQ_FLAGS_NOXSUMSCTP;
> dev_info->flow_type_rss_offloads = VMXNET3_RSS_OFFLOAD_ALL;
>
> dev_info->rx_desc_lim = (struct rte_eth_desc_lim) {
> diff --git a/examples/bond/main.c b/examples/bond/main.c
> index 65e0edd25..98415d66d 100644
> --- a/examples/bond/main.c
> +++ b/examples/bond/main.c
> @@ -122,7 +122,6 @@ static struct rte_eth_conf port_conf = {
> .mq_mode = ETH_MQ_RX_NONE,
> .max_rx_pkt_len = ETHER_MAX_LEN,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .rx_adv_conf = {
> @@ -177,7 +176,6 @@ slave_port_init(uint16_t portid, struct rte_mempool
> *mbuf_pool)
>
> /* TX setup */
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = local_port_conf.txmode.offloads;
> retval = rte_eth_tx_queue_setup(portid, 0, nb_txd,
> rte_eth_dev_socket_id(portid), &txq_conf);
> @@ -246,7 +244,6 @@ bond_port_init(struct rte_mempool *mbuf_pool)
>
> /* TX setup */
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = local_port_conf.txmode.offloads;
> retval = rte_eth_tx_queue_setup(BOND_PORT, 0, nb_txd,
> rte_eth_dev_socket_id(BOND_PORT),
> &txq_conf);
> diff --git a/examples/distributor/main.c b/examples/distributor/main.c
> index 2c5936489..85881a2e8 100644
> --- a/examples/distributor/main.c
> +++ b/examples/distributor/main.c
> @@ -80,7 +80,6 @@ static const struct rte_eth_conf port_conf_default = {
> .rxmode = {
> .mq_mode = ETH_MQ_RX_RSS,
> .max_rx_pkt_len = ETHER_MAX_LEN,
> - .ignore_offload_bitfield = 1,
> },
> .txmode = {
> .mq_mode = ETH_MQ_TX_NONE,
> @@ -141,7 +140,6 @@ port_init(uint16_t port, struct rte_mempool
> *mbuf_pool)
> }
>
> txconf = dev_info.default_txconf;
> - txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf.offloads = port_conf.txmode.offloads;
> for (q = 0; q < txRings; q++) {
> retval = rte_eth_tx_queue_setup(port, q, nb_txd,
> diff --git a/examples/ethtool/ethtool-app/main.c
> b/examples/ethtool/ethtool-app/main.c
> index c1815bb94..dc93adfe3 100644
> --- a/examples/ethtool/ethtool-app/main.c
> +++ b/examples/ethtool/ethtool-app/main.c
> @@ -99,7 +99,6 @@ static void setup_ports(struct app_config *app_cfg, int
> cnt_ports)
>
> memset(&cfg_port, 0, sizeof(cfg_port));
> cfg_port.txmode.mq_mode = ETH_MQ_TX_NONE;
> - cfg_port.rxmode.ignore_offload_bitfield = 1;
>
> for (idx_port = 0; idx_port < cnt_ports; idx_port++) {
> struct app_port *ptr_port = &app_cfg->ports[idx_port];
> @@ -142,7 +141,6 @@ static void setup_ports(struct app_config *app_cfg,
> int cnt_ports)
> "rte_eth_rx_queue_setup failed"
> );
> txconf = dev_info.default_txconf;
> - txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> if (rte_eth_tx_queue_setup(
> idx_port, 0, nb_txd,
> rte_eth_dev_socket_id(idx_port), &txconf) < 0)
> diff --git a/examples/eventdev_pipeline/main.c
> b/examples/eventdev_pipeline/main.c
> index b698e4ca2..7bc294946 100644
> --- a/examples/eventdev_pipeline/main.c
> +++ b/examples/eventdev_pipeline/main.c
> @@ -267,7 +267,6 @@ port_init(uint8_t port, struct rte_mempool
> *mbuf_pool)
> .rxmode = {
> .mq_mode = ETH_MQ_RX_RSS,
> .max_rx_pkt_len = ETHER_MAX_LEN,
> - .ignore_offload_bitfield = 1,
> },
> .rx_adv_conf = {
> .rss_conf = {
> @@ -307,7 +306,6 @@ port_init(uint8_t port, struct rte_mempool
> *mbuf_pool)
> }
>
> txconf = dev_info.default_txconf;
> - txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf.offloads = port_conf_default.txmode.offloads;
> /* Allocate and set up 1 TX queue per Ethernet port. */
> for (q = 0; q < tx_rings; q++) {
> diff --git a/examples/exception_path/main.c
> b/examples/exception_path/main.c
> index 2b381a5d8..0b59f6b3f 100644
> --- a/examples/exception_path/main.c
> +++ b/examples/exception_path/main.c
> @@ -88,7 +88,6 @@
> /* Options for configuring ethernet port */
> static struct rte_eth_conf port_conf = {
> .rxmode = {
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> @@ -457,7 +456,6 @@ init_port(uint16_t port)
> port, ret);
>
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = local_port_conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(port, 0, nb_txd,
> rte_eth_dev_socket_id(port),
> diff --git a/examples/flow_classify/flow_classify.c
> b/examples/flow_classify/flow_classify.c
> index 6412fe440..199612926 100644
> --- a/examples/flow_classify/flow_classify.c
> +++ b/examples/flow_classify/flow_classify.c
> @@ -62,7 +62,6 @@ const char cb_port_delim[] = ":";
> static const struct rte_eth_conf port_conf_default = {
> .rxmode = {
> .max_rx_pkt_len = ETHER_MAX_LEN,
> - .ignore_offload_bitfield = 1,
> },
> };
>
> @@ -222,7 +221,6 @@ port_init(uint8_t port, struct rte_mempool
> *mbuf_pool)
> }
>
> txconf = dev_info.default_txconf;
> - txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf.offloads = port_conf.txmode.offloads;
> /* Allocate and set up 1 TX queue per Ethernet port. */
> for (q = 0; q < tx_rings; q++) {
> diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
> index e0ee51679..f59503439 100644
> --- a/examples/flow_filtering/main.c
> +++ b/examples/flow_filtering/main.c
> @@ -121,7 +121,6 @@ init_port(void)
> struct rte_eth_conf port_conf = {
> .rxmode = {
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> diff --git a/examples/ip_fragmentation/main.c
> b/examples/ip_fragmentation/main.c
> index 8952ea456..5306d7672 100644
> --- a/examples/ip_fragmentation/main.c
> +++ b/examples/ip_fragmentation/main.c
> @@ -140,7 +140,6 @@ static struct rte_eth_conf port_conf = {
> .rxmode = {
> .max_rx_pkt_len = JUMBO_FRAME_MAX_SIZE,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = (DEV_RX_OFFLOAD_CHECKSUM |
> DEV_RX_OFFLOAD_JUMBO_FRAME |
> DEV_RX_OFFLOAD_CRC_STRIP),
> @@ -973,7 +972,6 @@ main(int argc, char **argv)
> fflush(stdout);
>
> txconf = &dev_info.default_txconf;
> - txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf->offloads = local_port_conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(portid, queueid,
> nb_txd,
> socket, txconf);
> diff --git a/examples/ip_reassembly/main.c
> b/examples/ip_reassembly/main.c
> index 3e8e79c21..94e63fc6a 100644
> --- a/examples/ip_reassembly/main.c
> +++ b/examples/ip_reassembly/main.c
> @@ -164,7 +164,6 @@ static struct rte_eth_conf port_conf = {
> .mq_mode = ETH_MQ_RX_RSS,
> .max_rx_pkt_len = JUMBO_FRAME_MAX_SIZE,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = (DEV_RX_OFFLOAD_CHECKSUM |
> DEV_RX_OFFLOAD_JUMBO_FRAME |
> DEV_RX_OFFLOAD_CRC_STRIP),
> @@ -1121,7 +1120,6 @@ main(int argc, char **argv)
> fflush(stdout);
>
> txconf = &dev_info.default_txconf;
> - txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf->offloads = local_port_conf.txmode.offloads;
>
> ret = rte_eth_tx_queue_setup(portid, queueid,
> nb_txd,
> diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-
> secgw/ipsec-secgw.c
> index a5da8b280..199bae51b 100644
> --- a/examples/ipsec-secgw/ipsec-secgw.c
> +++ b/examples/ipsec-secgw/ipsec-secgw.c
> @@ -199,7 +199,6 @@ static struct rte_eth_conf port_conf = {
> .split_hdr_size = 0,
> .offloads = DEV_RX_OFFLOAD_CHECKSUM |
> DEV_RX_OFFLOAD_CRC_STRIP,
> - .ignore_offload_bitfield = 1,
> },
> .rx_adv_conf = {
> .rss_conf = {
> @@ -1592,7 +1591,6 @@ port_init(uint16_t portid)
> printf("Setup txq=%u,%d,%d\n", lcore_id, tx_queueid,
> socket_id);
>
> txconf = &dev_info.default_txconf;
> - txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf->offloads = local_port_conf.txmode.offloads;
>
> ret = rte_eth_tx_queue_setup(portid, tx_queueid, nb_txd,
> diff --git a/examples/ipv4_multicast/main.c
> b/examples/ipv4_multicast/main.c
> index ad2072f41..331c32e71 100644
> --- a/examples/ipv4_multicast/main.c
> +++ b/examples/ipv4_multicast/main.c
> @@ -109,7 +109,6 @@ static struct rte_eth_conf port_conf = {
> .rxmode = {
> .max_rx_pkt_len = JUMBO_FRAME_MAX_SIZE,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = (DEV_RX_OFFLOAD_JUMBO_FRAME |
> DEV_RX_OFFLOAD_CRC_STRIP),
> },
> @@ -764,7 +763,6 @@ main(int argc, char **argv)
> fflush(stdout);
>
> txconf = &dev_info.default_txconf;
> - txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf->offloads = local_port_conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(portid, queueid,
> nb_txd,
>
> rte_lcore_to_socket_id(lcore_id), txconf);
> diff --git a/examples/kni/main.c b/examples/kni/main.c
> index 4b162debb..81336087d 100644
> --- a/examples/kni/main.c
> +++ b/examples/kni/main.c
> @@ -95,7 +95,6 @@ static struct kni_port_params
> *kni_port_params_array[RTE_MAX_ETHPORTS];
> /* Options for configuring ethernet port */
> static struct rte_eth_conf port_conf = {
> .rxmode = {
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> @@ -607,7 +606,6 @@ init_port(uint16_t port)
> "port%u (%d)\n", (unsigned)port, ret);
>
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = local_port_conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(port, 0, nb_txd,
> rte_eth_dev_socket_id(port), &txq_conf);
> diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
> index 4bca87b19..1b5587968 100644
> --- a/examples/l2fwd-crypto/main.c
> +++ b/examples/l2fwd-crypto/main.c
> @@ -211,7 +211,6 @@ static struct rte_eth_conf port_conf = {
> .mq_mode = ETH_MQ_RX_NONE,
> .max_rx_pkt_len = ETHER_MAX_LEN,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> @@ -2371,7 +2370,6 @@ initialize_ports(struct l2fwd_crypto_options
> *options)
> /* init one TX queue on each port */
> fflush(stdout);
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = local_port_conf.txmode.offloads;
> retval = rte_eth_tx_queue_setup(portid, 0, nb_txd,
> rte_eth_dev_socket_id(portid),
> diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-
> jobstats/main.c
> index 34553faa2..af5423382 100644
> --- a/examples/l2fwd-jobstats/main.c
> +++ b/examples/l2fwd-jobstats/main.c
> @@ -90,7 +90,6 @@ struct rte_eth_dev_tx_buffer
> *tx_buffer[RTE_MAX_ETHPORTS];
> static struct rte_eth_conf port_conf = {
> .rxmode = {
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> @@ -876,7 +875,6 @@ main(int argc, char **argv)
>
> /* init one TX queue on each port */
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = local_port_conf.txmode.offloads;
> fflush(stdout);
> ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
> diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-
> keepalive/main.c
> index a18b707cd..2d8b4d1c6 100644
> --- a/examples/l2fwd-keepalive/main.c
> +++ b/examples/l2fwd-keepalive/main.c
> @@ -81,7 +81,6 @@ struct rte_eth_dev_tx_buffer
> *tx_buffer[RTE_MAX_ETHPORTS];
> static struct rte_eth_conf port_conf = {
> .rxmode = {
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> @@ -671,7 +670,6 @@ main(int argc, char **argv)
> /* init one TX queue on each port */
> fflush(stdout);
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = local_port_conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
> rte_eth_dev_socket_id(portid),
> diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
> index 690843578..9bb4c5bc4 100644
> --- a/examples/l2fwd/main.c
> +++ b/examples/l2fwd/main.c
> @@ -82,7 +82,6 @@ static struct rte_eth_dev_tx_buffer
> *tx_buffer[RTE_MAX_ETHPORTS];
> static struct rte_eth_conf port_conf = {
> .rxmode = {
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> @@ -670,7 +669,6 @@ main(int argc, char **argv)
> /* init one TX queue on each port */
> fflush(stdout);
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = local_port_conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
> rte_eth_dev_socket_id(portid),
> diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
> index 33ad467d3..55a5a69e5 100644
> --- a/examples/l3fwd-acl/main.c
> +++ b/examples/l3fwd-acl/main.c
> @@ -127,7 +127,6 @@ static struct rte_eth_conf port_conf = {
> .mq_mode = ETH_MQ_RX_RSS,
> .max_rx_pkt_len = ETHER_MAX_LEN,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
> DEV_RX_OFFLOAD_CHECKSUM),
> },
> @@ -1982,7 +1981,6 @@ main(int argc, char **argv)
>
> rte_eth_dev_info_get(portid, &dev_info);
> txconf = &dev_info.default_txconf;
> - txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf->offloads = local_port_conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(portid, queueid,
> nb_txd,
> socketid, txconf);
> diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
> index 596d64548..710b76d12 100644
> --- a/examples/l3fwd-power/main.c
> +++ b/examples/l3fwd-power/main.c
> @@ -184,7 +184,6 @@ static struct rte_eth_conf port_conf = {
> .mq_mode = ETH_MQ_RX_RSS,
> .max_rx_pkt_len = ETHER_MAX_LEN,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
> DEV_RX_OFFLOAD_CHECKSUM),
> },
> @@ -1750,7 +1749,6 @@ main(int argc, char **argv)
> fflush(stdout);
>
> txconf = &dev_info.default_txconf;
> - txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf->offloads = local_port_conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(portid, queueid,
> nb_txd,
> socketid, txconf);
> diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c
> index aaafb7bc2..43e629828 100644
> --- a/examples/l3fwd-vf/main.c
> +++ b/examples/l3fwd-vf/main.c
> @@ -161,7 +161,6 @@ static struct rte_eth_conf port_conf = {
> .mq_mode = ETH_MQ_RX_RSS,
> .max_rx_pkt_len = ETHER_MAX_LEN,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
> DEV_RX_OFFLOAD_CHECKSUM),
> },
> @@ -1009,7 +1008,6 @@ main(int argc, char **argv)
> fflush(stdout);
>
> txconf = &dev_info.default_txconf;
> - txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf->offloads = local_port_conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
> socketid, txconf);
> diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
> index bf7dbd814..faef9f1ac 100644
> --- a/examples/l3fwd/main.c
> +++ b/examples/l3fwd/main.c
> @@ -120,7 +120,6 @@ static struct rte_eth_conf port_conf = {
> .mq_mode = ETH_MQ_RX_RSS,
> .max_rx_pkt_len = ETHER_MAX_LEN,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
> DEV_RX_OFFLOAD_CHECKSUM),
> },
> @@ -909,7 +908,6 @@ main(int argc, char **argv)
> fflush(stdout);
>
> txconf = &dev_info.default_txconf;
> - txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf->offloads = local_port_conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(portid, queueid,
> nb_txd,
> socketid, txconf);
> diff --git a/examples/link_status_interrupt/main.c
> b/examples/link_status_interrupt/main.c
> index f56895680..3b732076b 100644
> --- a/examples/link_status_interrupt/main.c
> +++ b/examples/link_status_interrupt/main.c
> @@ -79,7 +79,6 @@ struct rte_eth_dev_tx_buffer
> *tx_buffer[RTE_MAX_ETHPORTS];
> static struct rte_eth_conf port_conf = {
> .rxmode = {
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> @@ -653,7 +652,6 @@ main(int argc, char **argv)
> /* init one TX queue logical core on each port */
> fflush(stdout);
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = local_port_conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
> rte_eth_dev_socket_id(portid),
> diff --git a/examples/load_balancer/init.c b/examples/load_balancer/init.c
> index 8d8dbe61e..6aa079c69 100644
> --- a/examples/load_balancer/init.c
> +++ b/examples/load_balancer/init.c
> @@ -45,7 +45,6 @@ static struct rte_eth_conf port_conf = {
> .rxmode = {
> .mq_mode = ETH_MQ_RX_RSS,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = (DEV_RX_OFFLOAD_CHECKSUM |
> DEV_RX_OFFLOAD_CRC_STRIP),
> },
> @@ -466,7 +465,6 @@ app_init_nics(void)
> }
>
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = local_port_conf.txmode.offloads;
> /* Init TX queues */
> if (app.nic_tx_port_mask[port] == 1) {
> diff --git a/examples/multi_process/l2fwd_fork/main.c
> b/examples/multi_process/l2fwd_fork/main.c
> index 94318ab61..20a6a3d87 100644
> --- a/examples/multi_process/l2fwd_fork/main.c
> +++ b/examples/multi_process/l2fwd_fork/main.c
> @@ -127,7 +127,6 @@ struct cpu_aff_arg{
> static const struct rte_eth_conf port_conf = {
> .rxmode = {
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> @@ -1073,7 +1072,6 @@ main(int argc, char **argv)
> /* init one TX queue on each port */
> fflush(stdout);
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.tx_offloads = local_port_conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
> rte_eth_dev_socket_id(portid),
> diff --git a/examples/multi_process/symmetric_mp/main.c
> b/examples/multi_process/symmetric_mp/main.c
> index 16f21a187..c36326917 100644
> --- a/examples/multi_process/symmetric_mp/main.c
> +++ b/examples/multi_process/symmetric_mp/main.c
> @@ -178,7 +178,6 @@ smp_port_init(uint16_t port, struct rte_mempool
> *mbuf_pool,
> .rxmode = {
> .mq_mode = ETH_MQ_RX_RSS,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = (DEV_RX_OFFLOAD_CHECKSUM |
> DEV_RX_OFFLOAD_CRC_STRIP),
> },
> @@ -236,7 +235,6 @@ smp_port_init(uint16_t port, struct rte_mempool
> *mbuf_pool,
> }
>
> txq_conf = info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = port_conf.txmode.offloads;
> for (q = 0; q < tx_rings; q ++) {
> retval = rte_eth_tx_queue_setup(port, q, nb_txd,
> diff --git a/examples/netmap_compat/bridge/bridge.c
> b/examples/netmap_compat/bridge/bridge.c
> index cb1882e65..7afca28cd 100644
> --- a/examples/netmap_compat/bridge/bridge.c
> +++ b/examples/netmap_compat/bridge/bridge.c
> @@ -26,7 +26,6 @@
> struct rte_eth_conf eth_conf = {
> .rxmode = {
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> diff --git a/examples/netmap_compat/lib/compat_netmap.c
> b/examples/netmap_compat/lib/compat_netmap.c
> index af3dd223f..0be0663ed 100644
> --- a/examples/netmap_compat/lib/compat_netmap.c
> +++ b/examples/netmap_compat/lib/compat_netmap.c
> @@ -708,7 +708,6 @@ rte_netmap_init_port(uint16_t portid, const struct
> rte_netmap_port_conf *conf)
> rxq_conf = dev_info.default_rxconf;
> rxq_conf.offloads = conf->eth_conf->rxmode.offloads;
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = conf->eth_conf->txmode.offloads;
> for (i = 0; i < conf->nr_tx_rings; i++) {
> ret = rte_eth_tx_queue_setup(portid, i, tx_slots,
> diff --git a/examples/packet_ordering/main.c
> b/examples/packet_ordering/main.c
> index 7ace7d10e..149bfdd02 100644
> --- a/examples/packet_ordering/main.c
> +++ b/examples/packet_ordering/main.c
> @@ -35,11 +35,7 @@ volatile uint8_t quit_signal;
>
> static struct rte_mempool *mbuf_pool;
>
> -static struct rte_eth_conf port_conf_default = {
> - .rxmode = {
> - .ignore_offload_bitfield = 1,
> - },
> -};
> +static struct rte_eth_conf port_conf_default;
>
> struct worker_thread_args {
> struct rte_ring *ring_in;
> @@ -293,7 +289,6 @@ configure_eth_port(uint16_t port_id)
> }
>
> txconf = dev_info.default_txconf;
> - txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf.offloads = port_conf.txmode.offloads;
> for (q = 0; q < txRings; q++) {
> ret = rte_eth_tx_queue_setup(port_id, q, nb_txd,
> diff --git a/examples/performance-thread/l3fwd-thread/main.c
> b/examples/performance-thread/l3fwd-thread/main.c
> index 40d807239..d1e4a1880 100644
> --- a/examples/performance-thread/l3fwd-thread/main.c
> +++ b/examples/performance-thread/l3fwd-thread/main.c
> @@ -306,7 +306,6 @@ static struct rte_eth_conf port_conf = {
> .mq_mode = ETH_MQ_RX_RSS,
> .max_rx_pkt_len = ETHER_MAX_LEN,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = (DEV_RX_OFFLOAD_CHECKSUM |
> DEV_RX_OFFLOAD_CRC_STRIP),
> },
> @@ -3597,7 +3596,6 @@ main(int argc, char **argv)
> fflush(stdout);
>
> txconf = &dev_info.default_txconf;
> - txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf->offloads = local_port_conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(portid, queueid,
> nb_txd,
> socketid, txconf);
> diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
> index c44013bc1..82ae71c19 100644
> --- a/examples/ptpclient/ptpclient.c
> +++ b/examples/ptpclient/ptpclient.c
> @@ -50,7 +50,6 @@ static uint8_t
> ptp_enabled_ports[RTE_MAX_ETHPORTS];
> static const struct rte_eth_conf port_conf_default = {
> .rxmode = {
> .max_rx_pkt_len = ETHER_MAX_LEN,
> - .ignore_offload_bitfield = 1,
> },
> };
>
> @@ -217,11 +216,9 @@ port_init(uint16_t port, struct rte_mempool
> *mbuf_pool)
>
> /* Allocate and set up 1 TX queue per Ethernet port. */
> for (q = 0; q < tx_rings; q++) {
> - /* Setup txq_flags */
> struct rte_eth_txconf *txconf;
>
> txconf = &dev_info.default_txconf;
> - txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf->offloads = port_conf.txmode.offloads;
>
> retval = rte_eth_tx_queue_setup(port, q, nb_txd,
> diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c
> index 42cf4b29f..ca0e9e863 100644
> --- a/examples/qos_meter/main.c
> +++ b/examples/qos_meter/main.c
> @@ -56,7 +56,6 @@ static struct rte_eth_conf port_conf = {
> .mq_mode = ETH_MQ_RX_RSS,
> .max_rx_pkt_len = ETHER_MAX_LEN,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = (DEV_RX_OFFLOAD_CHECKSUM |
> DEV_RX_OFFLOAD_CRC_STRIP),
> },
> @@ -351,7 +350,6 @@ main(int argc, char **argv)
> rte_exit(EXIT_FAILURE, "Port %d RX queue setup error
> (%d)\n", port_rx, ret);
>
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(port_rx, NIC_TX_QUEUE, nb_txd,
> rte_eth_dev_socket_id(port_rx),
> @@ -383,7 +381,6 @@ main(int argc, char **argv)
> rte_exit(EXIT_FAILURE, "Port %d RX queue setup error
> (%d)\n", port_tx, ret);
>
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(port_tx, NIC_TX_QUEUE, nb_txd,
> rte_eth_dev_socket_id(port_tx),
> diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
> index c9e487975..94cbb26f8 100644
> --- a/examples/qos_sched/init.c
> +++ b/examples/qos_sched/init.c
> @@ -59,7 +59,6 @@ static struct rte_eth_conf port_conf = {
> .rxmode = {
> .max_rx_pkt_len = ETHER_MAX_LEN,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> @@ -96,7 +95,6 @@ app_init_port(uint16_t portid, struct rte_mempool
> *mp)
> tx_conf.tx_free_thresh = 0;
> tx_conf.tx_rs_thresh = 0;
> tx_conf.tx_deferred_start = 0;
> - tx_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
>
> /* init port */
> RTE_LOG(INFO, APP, "Initializing port %"PRIu16"... ", portid);
> diff --git a/examples/quota_watermark/qw/init.c
> b/examples/quota_watermark/qw/init.c
> index 00725bc95..19164385a 100644
> --- a/examples/quota_watermark/qw/init.c
> +++ b/examples/quota_watermark/qw/init.c
> @@ -24,7 +24,6 @@
> static struct rte_eth_conf port_conf = {
> .rxmode = {
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> @@ -82,7 +81,6 @@ void configure_eth_port(uint16_t port_id)
>
> /* Initialize the port's TX queue */
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = local_port_conf.txmode.offloads;
> ret = rte_eth_tx_queue_setup(port_id, 0, nb_txd,
> rte_eth_dev_socket_id(port_id),
> diff --git a/examples/rxtx_callbacks/main.c
> b/examples/rxtx_callbacks/main.c
> index e63ea288f..2058be627 100644
> --- a/examples/rxtx_callbacks/main.c
> +++ b/examples/rxtx_callbacks/main.c
> @@ -20,7 +20,6 @@
> static const struct rte_eth_conf port_conf_default = {
> .rxmode = {
> .max_rx_pkt_len = ETHER_MAX_LEN,
> - .ignore_offload_bitfield = 1,
> },
> };
>
> @@ -104,7 +103,6 @@ port_init(uint16_t port, struct rte_mempool
> *mbuf_pool)
> }
>
> txconf = dev_info.default_txconf;
> - txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf.offloads = port_conf.txmode.offloads;
> for (q = 0; q < tx_rings; q++) {
> retval = rte_eth_tx_queue_setup(port, q, nb_txd,
> diff --git a/examples/server_node_efd/server/init.c
> b/examples/server_node_efd/server/init.c
> index 7dfe2fa23..af5a18e28 100644
> --- a/examples/server_node_efd/server/init.c
> +++ b/examples/server_node_efd/server/init.c
> @@ -97,7 +97,6 @@ init_port(uint16_t port_num)
> struct rte_eth_conf port_conf = {
> .rxmode = {
> .mq_mode = ETH_MQ_RX_RSS,
> - .ignore_offload_bitfield = 1,
> },
> };
> const uint16_t rx_rings = 1, tx_rings = num_nodes;
> @@ -139,7 +138,6 @@ init_port(uint16_t port_num)
> }
>
> txconf = dev_info.default_txconf;
> - txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf.offloads = port_conf.txmode.offloads;
> for (q = 0; q < tx_rings; q++) {
> retval = rte_eth_tx_queue_setup(port_num, q, tx_ring_size,
> diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c
> index 03bc35856..4aba1dc38 100644
> --- a/examples/skeleton/basicfwd.c
> +++ b/examples/skeleton/basicfwd.c
> @@ -20,7 +20,6 @@
> static const struct rte_eth_conf port_conf_default = {
> .rxmode = {
> .max_rx_pkt_len = ETHER_MAX_LEN,
> - .ignore_offload_bitfield = 1,
> },
> };
>
> @@ -68,7 +67,6 @@ port_init(uint16_t port, struct rte_mempool
> *mbuf_pool)
> }
>
> txconf = dev_info.default_txconf;
> - txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf.offloads = port_conf.txmode.offloads;
> /* Allocate and set up 1 TX queue per Ethernet port. */
> for (q = 0; q < tx_rings; q++) {
> diff --git a/examples/tep_termination/vxlan_setup.c
> b/examples/tep_termination/vxlan_setup.c
> index 299c29d27..b99ab97d3 100644
> --- a/examples/tep_termination/vxlan_setup.c
> +++ b/examples/tep_termination/vxlan_setup.c
> @@ -69,7 +69,6 @@ uint8_t tep_filter_type[] =
> {RTE_TUNNEL_FILTER_IMAC_TENID,
> static struct rte_eth_conf port_conf = {
> .rxmode = {
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> },
> .txmode = {
> @@ -131,7 +130,6 @@ vxlan_port_init(uint16_t port, struct rte_mempool
> *mbuf_pool)
>
> rxconf = &dev_info.default_rxconf;
> txconf = &dev_info.default_txconf;
> - txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
>
> if (!rte_eth_dev_is_valid_port(port))
> return -1;
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index 1659ef315..2175c1186 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -116,7 +116,6 @@ static struct rte_eth_conf vmdq_conf_default = {
> .rxmode = {
> .mq_mode = ETH_MQ_RX_VMDQ_ONLY,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> /*
> * VLAN strip is necessary for 1G NIC such as I350,
> * this fixes bug of ipv4 forwarding in guest can't
> @@ -256,7 +255,6 @@ port_init(uint16_t port)
> rxconf = &dev_info.default_rxconf;
> txconf = &dev_info.default_txconf;
> rxconf->rx_drop_en = 1;
> - txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
>
> /*configure the number of supported virtio devices based on VMDQ
> limits */
> num_devices = dev_info.max_vmdq_pools;
> diff --git a/examples/vm_power_manager/main.c
> b/examples/vm_power_manager/main.c
> index c9805a461..8911f2659 100644
> --- a/examples/vm_power_manager/main.c
> +++ b/examples/vm_power_manager/main.c
> @@ -47,7 +47,6 @@ static volatile bool force_quit;
> static const struct rte_eth_conf port_conf_default = {
> .rxmode = {
> .max_rx_pkt_len = ETHER_MAX_LEN,
> - .ignore_offload_bitfield = 1,
> },
> };
>
> @@ -83,7 +82,6 @@ port_init(uint16_t port, struct rte_mempool
> *mbuf_pool)
> }
>
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = port_conf.txmode.offloads;
> /* Allocate and set up 1 TX queue per Ethernet port. */
> for (q = 0; q < tx_rings; q++) {
> diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
> index 52596dd5e..627a5da48 100644
> --- a/examples/vmdq/main.c
> +++ b/examples/vmdq/main.c
> @@ -65,7 +65,6 @@ static const struct rte_eth_conf vmdq_conf_default = {
> .rxmode = {
> .mq_mode = ETH_MQ_RX_VMDQ_ONLY,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> },
>
> .txmode = {
> @@ -237,7 +236,6 @@ port_init(uint16_t port, struct rte_mempool
> *mbuf_pool)
> rxconf = &dev_info.default_rxconf;
> rxconf->rx_drop_en = 1;
> txconf = &dev_info.default_txconf;
> - txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txconf->offloads = port_conf.txmode.offloads;
> for (q = 0; q < rxRings; q++) {
> retval = rte_eth_rx_queue_setup(port, q, rxRingSize,
> diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c
> index 2626a2f19..5a0463c58 100644
> --- a/examples/vmdq_dcb/main.c
> +++ b/examples/vmdq_dcb/main.c
> @@ -71,7 +71,6 @@ static const struct rte_eth_conf
> vmdq_dcb_conf_default = {
> .rxmode = {
> .mq_mode = ETH_MQ_RX_VMDQ_DCB,
> .split_hdr_size = 0,
> - .ignore_offload_bitfield = 1,
> },
> .txmode = {
> .mq_mode = ETH_MQ_TX_VMDQ_DCB,
> @@ -290,7 +289,6 @@ port_init(uint16_t port, struct rte_mempool
> *mbuf_pool)
> }
>
> txq_conf = dev_info.default_txconf;
> - txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> txq_conf.offloads = port_conf.txmode.offloads;
> for (q = 0; q < num_queues; q++) {
> retval = rte_eth_tx_queue_setup(port, q, txRingSize,
> diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
> index 5aa7a1a7d..16b8258a7 100644
> --- a/lib/librte_ethdev/rte_ethdev.c
> +++ b/lib/librte_ethdev/rte_ethdev.c
> @@ -974,41 +974,6 @@ rte_eth_speed_bitflag(uint32_t speed, int duplex)
> }
> }
>
> -/**
> - * A conversion function from rxmode bitfield API.
> - */
> -static void
> -rte_eth_convert_rx_offload_bitfield(const struct rte_eth_rxmode
> *rxmode,
> - uint64_t *rx_offloads)
> -{
> - uint64_t offloads = 0;
> -
> - if (rxmode->header_split == 1)
> - offloads |= DEV_RX_OFFLOAD_HEADER_SPLIT;
> - if (rxmode->hw_ip_checksum == 1)
> - offloads |= DEV_RX_OFFLOAD_CHECKSUM;
> - if (rxmode->hw_vlan_filter == 1)
> - offloads |= DEV_RX_OFFLOAD_VLAN_FILTER;
> - if (rxmode->hw_vlan_strip == 1)
> - offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
> - if (rxmode->hw_vlan_extend == 1)
> - offloads |= DEV_RX_OFFLOAD_VLAN_EXTEND;
> - if (rxmode->jumbo_frame == 1)
> - offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
> - if (rxmode->hw_strip_crc == 1)
> - offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
> - if (rxmode->enable_scatter == 1)
> - offloads |= DEV_RX_OFFLOAD_SCATTER;
> - if (rxmode->enable_lro == 1)
> - offloads |= DEV_RX_OFFLOAD_TCP_LRO;
> - if (rxmode->hw_timestamp == 1)
> - offloads |= DEV_RX_OFFLOAD_TIMESTAMP;
> - if (rxmode->security == 1)
> - offloads |= DEV_RX_OFFLOAD_SECURITY;
> -
> - *rx_offloads = offloads;
> -}
> -
> const char * __rte_experimental
> rte_eth_dev_rx_offload_name(uint64_t offload)
> {
> @@ -1095,14 +1060,6 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t
> nb_rx_q, uint16_t nb_tx_q,
> return -EBUSY;
> }
>
> - /*
> - * Convert between the offloads API to enable PMDs to support
> - * only one of them.
> - */
> - if (dev_conf->rxmode.ignore_offload_bitfield == 0)
> - rte_eth_convert_rx_offload_bitfield(
> - &dev_conf->rxmode,
> &local_conf.rxmode.offloads);
> -
> /* Copy the dev_conf parameter into the dev structure */
> memcpy(&dev->data->dev_conf, &local_conf, sizeof(dev->data-
> >dev_conf));
>
> @@ -1547,14 +1504,6 @@ rte_eth_rx_queue_setup(uint16_t port_id,
> uint16_t rx_queue_id,
> rx_conf = &dev_info.default_rxconf;
>
> local_conf = *rx_conf;
> - if (dev->data->dev_conf.rxmode.ignore_offload_bitfield == 0) {
> - /**
> - * Reflect port offloads to queue offloads in order for
> - * offloads to not be discarded.
> - */
> - rte_eth_convert_rx_offload_bitfield(&dev->data-
> >dev_conf.rxmode,
> - &local_conf.offloads);
> - }
>
> /*
> * If an offloading has already been enabled in
> @@ -1596,55 +1545,6 @@ rte_eth_rx_queue_setup(uint16_t port_id,
> uint16_t rx_queue_id,
> return eth_err(port_id, ret);
> }
>
> -/**
> - * Convert from tx offloads to txq_flags.
> - */
> -static void
> -rte_eth_convert_tx_offload(const uint64_t tx_offloads, uint32_t
> *txq_flags)
> -{
> - uint32_t flags = 0;
> -
> - if (!(tx_offloads & DEV_TX_OFFLOAD_MULTI_SEGS))
> - flags |= ETH_TXQ_FLAGS_NOMULTSEGS;
> - if (!(tx_offloads & DEV_TX_OFFLOAD_VLAN_INSERT))
> - flags |= ETH_TXQ_FLAGS_NOVLANOFFL;
> - if (!(tx_offloads & DEV_TX_OFFLOAD_SCTP_CKSUM))
> - flags |= ETH_TXQ_FLAGS_NOXSUMSCTP;
> - if (!(tx_offloads & DEV_TX_OFFLOAD_UDP_CKSUM))
> - flags |= ETH_TXQ_FLAGS_NOXSUMUDP;
> - if (!(tx_offloads & DEV_TX_OFFLOAD_TCP_CKSUM))
> - flags |= ETH_TXQ_FLAGS_NOXSUMTCP;
> - if (tx_offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
> - flags |= ETH_TXQ_FLAGS_NOREFCOUNT |
> ETH_TXQ_FLAGS_NOMULTMEMP;
> -
> - *txq_flags = flags;
> -}
> -
> -/**
> - * A conversion function from txq_flags API.
> - */
> -static void
> -rte_eth_convert_txq_flags(const uint32_t txq_flags, uint64_t *tx_offloads)
> -{
> - uint64_t offloads = 0;
> -
> - if (!(txq_flags & ETH_TXQ_FLAGS_NOMULTSEGS))
> - offloads |= DEV_TX_OFFLOAD_MULTI_SEGS;
> - if (!(txq_flags & ETH_TXQ_FLAGS_NOVLANOFFL))
> - offloads |= DEV_TX_OFFLOAD_VLAN_INSERT;
> - if (!(txq_flags & ETH_TXQ_FLAGS_NOXSUMSCTP))
> - offloads |= DEV_TX_OFFLOAD_SCTP_CKSUM;
> - if (!(txq_flags & ETH_TXQ_FLAGS_NOXSUMUDP))
> - offloads |= DEV_TX_OFFLOAD_UDP_CKSUM;
> - if (!(txq_flags & ETH_TXQ_FLAGS_NOXSUMTCP))
> - offloads |= DEV_TX_OFFLOAD_TCP_CKSUM;
> - if ((txq_flags & ETH_TXQ_FLAGS_NOREFCOUNT) &&
> - (txq_flags & ETH_TXQ_FLAGS_NOMULTMEMP))
> - offloads |= DEV_TX_OFFLOAD_MBUF_FAST_FREE;
> -
> - *tx_offloads = offloads;
> -}
> -
> int
> rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
> uint16_t nb_tx_desc, unsigned int socket_id,
> @@ -1707,15 +1607,7 @@ rte_eth_tx_queue_setup(uint16_t port_id,
> uint16_t tx_queue_id,
> if (tx_conf == NULL)
> tx_conf = &dev_info.default_txconf;
>
> - /*
> - * Convert between the offloads API to enable PMDs to support
> - * only one of them.
> - */
> local_conf = *tx_conf;
> - if (!(tx_conf->txq_flags & ETH_TXQ_FLAGS_IGNORE)) {
> - rte_eth_convert_txq_flags(tx_conf->txq_flags,
> - &local_conf.offloads);
> - }
>
> /*
> * If an offloading has already been enabled in
> @@ -2493,7 +2385,6 @@ void
> rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info
> *dev_info)
> {
> struct rte_eth_dev *dev;
> - struct rte_eth_txconf *txconf;
> const struct rte_eth_desc_lim lim = {
> .nb_max = UINT16_MAX,
> .nb_min = 0,
> @@ -2515,9 +2406,6 @@ rte_eth_dev_info_get(uint16_t port_id, struct
> rte_eth_dev_info *dev_info)
> dev_info->nb_tx_queues = dev->data->nb_tx_queues;
>
> dev_info->dev_flags = &dev->data->dev_flags;
> - txconf = &dev_info->default_txconf;
> - /* convert offload to txq_flags to support legacy app */
> - rte_eth_convert_tx_offload(txconf->offloads, &txconf->txq_flags);
> }
>
> int
> @@ -3958,7 +3846,6 @@ rte_eth_tx_queue_info_get(uint16_t port_id,
> uint16_t queue_id,
> struct rte_eth_txq_info *qinfo)
> {
> struct rte_eth_dev *dev;
> - struct rte_eth_txconf *txconf = &qinfo->conf;
>
> RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
>
> @@ -3975,8 +3862,6 @@ rte_eth_tx_queue_info_get(uint16_t port_id,
> uint16_t queue_id,
>
> memset(qinfo, 0, sizeof(*qinfo));
> dev->dev_ops->txq_info_get(dev, queue_id, qinfo);
> - /* convert offload to txq_flags to support legacy app */
> - rte_eth_convert_tx_offload(txconf->offloads, &txconf->txq_flags);
>
> return 0;
> }
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index aa991da62..8d6b1f6e0 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -326,7 +326,7 @@ enum rte_eth_tx_mq_mode {
> struct rte_eth_rxmode {
> /** The multi-queue packet distribution mode to be used, e.g. RSS.
> */
> enum rte_eth_rx_mq_mode mq_mode;
> - uint32_t max_rx_pkt_len; /**< Only used if jumbo_frame enabled.
> */
> + uint32_t max_rx_pkt_len; /**< Only used if JUMBO_FRAME
> enabled. */
> uint16_t split_hdr_size; /**< hdr buf size (header_split enabled).*/
> /**
> * Per-port Rx offloads to be set using DEV_RX_OFFLOAD_* flags.
> @@ -334,33 +334,6 @@ struct rte_eth_rxmode {
> * structure are allowed to be set.
> */
> uint64_t offloads;
> - __extension__
> - /**
> - * Below bitfield API is obsolete. Application should
> - * enable per-port offloads using the offload field
> - * above.
> - */
> - uint16_t header_split : 1, /**< Header Split enable. */
> - hw_ip_checksum : 1, /**< IP/UDP/TCP checksum offload
> enable. */
> - hw_vlan_filter : 1, /**< VLAN filter enable. */
> - hw_vlan_strip : 1, /**< VLAN strip enable. */
> - hw_vlan_extend : 1, /**< Extended VLAN enable. */
> - jumbo_frame : 1, /**< Jumbo Frame Receipt enable. */
> - hw_strip_crc : 1, /**< Enable CRC stripping by hardware. */
> - enable_scatter : 1, /**< Enable scatter packets rx handler */
> - enable_lro : 1, /**< Enable LRO */
> - hw_timestamp : 1, /**< Enable HW timestamp */
> - security : 1, /**< Enable rte_security offloads */
> - /**
> - * When set the offload bitfield should be ignored.
> - * Instead per-port Rx offloads should be set on offloads
> - * field above.
> - * Per-queue offloads shuold be set on rte_eth_rxq_conf
> - * structure.
> - * This bit is temporary till rxmode bitfield offloads API will
> - * be deprecated.
> - */
> - ignore_offload_bitfield : 1;
> };
>
> /**
> @@ -707,28 +680,6 @@ struct rte_eth_rxconf {
> uint64_t offloads;
> };
>
> -#define ETH_TXQ_FLAGS_NOMULTSEGS 0x0001 /**< nb_segs=1 for all
> mbufs */
> -#define ETH_TXQ_FLAGS_NOREFCOUNT 0x0002 /**< refcnt can be ignored
> */
> -#define ETH_TXQ_FLAGS_NOMULTMEMP 0x0004 /**< all bufs come from
> same mempool */
> -#define ETH_TXQ_FLAGS_NOVLANOFFL 0x0100 /**< disable VLAN offload
> */
> -#define ETH_TXQ_FLAGS_NOXSUMSCTP 0x0200 /**< disable SCTP
> checksum offload */
> -#define ETH_TXQ_FLAGS_NOXSUMUDP 0x0400 /**< disable UDP
> checksum offload */
> -#define ETH_TXQ_FLAGS_NOXSUMTCP 0x0800 /**< disable TCP checksum
> offload */
> -#define ETH_TXQ_FLAGS_NOOFFLOADS \
> - (ETH_TXQ_FLAGS_NOVLANOFFL |
> ETH_TXQ_FLAGS_NOXSUMSCTP | \
> - ETH_TXQ_FLAGS_NOXSUMUDP |
> ETH_TXQ_FLAGS_NOXSUMTCP)
> -#define ETH_TXQ_FLAGS_NOXSUMS \
> - (ETH_TXQ_FLAGS_NOXSUMSCTP |
> ETH_TXQ_FLAGS_NOXSUMUDP | \
> - ETH_TXQ_FLAGS_NOXSUMTCP)
> -/**
> - * When set the txq_flags should be ignored,
> - * instead per-queue Tx offloads will be set on offloads field
> - * located on rte_eth_txq_conf struct.
> - * This flag is temporary till the rte_eth_txq_conf.txq_flags
> - * API will be deprecated.
> - */
> -#define ETH_TXQ_FLAGS_IGNORE 0x8000
> -
> /**
> * A structure used to configure a TX ring of an Ethernet port.
> */
> @@ -738,7 +689,6 @@ struct rte_eth_txconf {
> uint16_t tx_free_thresh; /**< Start freeing TX buffers if there are
> less free descriptors than this value. */
>
> - uint32_t txq_flags; /**< Set flags for the Tx queue */
> uint8_t tx_deferred_start; /**< Do not start queue with
> rte_eth_dev_start(). */
> /**
> * Per-queue Tx offloads to be set using DEV_TX_OFFLOAD_* flags.
> @@ -1680,12 +1630,6 @@ int rte_eth_rx_queue_setup(uint16_t port_id,
> uint16_t rx_queue_id,
> * The *tx_rs_thresh* value should be less or equal then
> * *tx_free_thresh* value, and both of them should be less then
> * *nb_tx_desc* - 3.
> - * - The *txq_flags* member contains flags to pass to the TX queue setup
> - * function to configure the behavior of the TX queue. This should be set
> - * to 0 if no special configuration is required.
> - * This API is obsolete and will be deprecated. Applications
> - * should set it to ETH_TXQ_FLAGS_IGNORE and use
> - * the offloads field below.
> * - The *offloads* member contains Tx offloads to be enabled.
> * If an offloading set in tx_conf->offloads
> * hasn't been set in the input argument eth_conf->txmode.offloads
> @@ -4081,7 +4025,7 @@ static inline int
> rte_eth_tx_descriptor_status(uint16_t port_id,
> *
> * If the PMD is DEV_TX_OFFLOAD_MT_LOCKFREE capable, multiple threads
> can
> * invoke this function concurrently on the same tx queue without SW lock.
> - * @see rte_eth_dev_info_get, struct rte_eth_txconf::txq_flags
> + * @see rte_eth_dev_info_get, struct rte_eth_txconf::offloads
> *
> * @see rte_eth_tx_prepare to perform some prior checks or adjustments
> * for offloads.
> --
> 2.17.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH v2 5/5] ethdev: remove old offload API
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 5/5] ethdev: remove old offload API Thomas Monjalon
2018-07-03 12:28 ` Shahaf Shuler
@ 2018-07-04 11:31 ` Andrew Rybchenko
1 sibling, 0 replies; 25+ messages in thread
From: Andrew Rybchenko @ 2018-07-04 11:31 UTC (permalink / raw)
To: Thomas Monjalon, ferruh.yigit, shahafs
Cc: dev, ravi1.kumar, rasesh.mody, maxime.coquelin
On 07/03/2018 12:27 AM, Thomas Monjalon wrote:
> From: Ferruh Yigit <ferruh.yigit@intel.com>
>
> In DPDK 17.11, the ethdev offloads API has changed:
> commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")
> commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
> The new API is documented in the programmer's guide:
> http://doc.dpdk.org/guides/prog_guide/poll_mode_drv.html#hardware-offload
>
> For reminder, the main concepts in the new API were:
> - All offloads are disabled by default
> - Distinction between per port and per queue offloads.
>
> The transition bits are now removed:
> - Translation of the old API in ethdev
> - rte_eth_conf.rxmode.ignore_offload_bitfield
> - ETH_TXQ_FLAGS_IGNORE
>
> The old API bits are now removed:
> - Rx per-port rte_eth_conf.rxmode.[bit-fields]
> - Tx per-queue rte_eth_txconf.txq_flags
> - ETH_TXQ_FLAGS_NO*
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/5] remove old ethdev offload API
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 0/5] remove old ethdev " Thomas Monjalon
` (4 preceding siblings ...)
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 5/5] ethdev: remove old offload API Thomas Monjalon
@ 2018-07-03 18:37 ` Ferruh Yigit
2018-07-04 18:56 ` Ferruh Yigit
5 siblings, 1 reply; 25+ messages in thread
From: Ferruh Yigit @ 2018-07-03 18:37 UTC (permalink / raw)
To: Thomas Monjalon, arybchenko, shahafs
Cc: dev, ravi1.kumar, rasesh.mody, maxime.coquelin
On 7/2/2018 10:27 PM, Thomas Monjalon wrote:
> A new offload API has been introduced in DPDK 17.11.
>
> This patchset resumes the work started by Ferruh (RFC)
> to definitely drop the old offload API.
>
> There are:
> - 3 patches to remove some useless code where the old API was found.
> - 1 patch to remove usage of old API
> - 1 (big) patch to remove the old API itself
>
> Please review the big patch #5 written by Ferruh and me.
> We would like to apply it shortly for 18.08-rc1.
>
>
> Ferruh Yigit (1):
> ethdev: remove old offload API
>
> Thomas Monjalon (4):
> doc: remove code from KNI example guide
> test: remove unused configuration for bonding
> ethdev: convert remaining apps to new offload API
> net/fm10k: remove unused constant
For Series,
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/5] remove old ethdev offload API
2018-07-03 18:37 ` [dpdk-dev] [PATCH v2 0/5] remove old ethdev " Ferruh Yigit
@ 2018-07-04 18:56 ` Ferruh Yigit
0 siblings, 0 replies; 25+ messages in thread
From: Ferruh Yigit @ 2018-07-04 18:56 UTC (permalink / raw)
To: Thomas Monjalon, arybchenko, shahafs
Cc: dev, ravi1.kumar, rasesh.mody, maxime.coquelin
On 7/3/2018 7:37 PM, Ferruh Yigit wrote:
> On 7/2/2018 10:27 PM, Thomas Monjalon wrote:
>> A new offload API has been introduced in DPDK 17.11.
>>
>> This patchset resumes the work started by Ferruh (RFC)
>> to definitely drop the old offload API.
>>
>> There are:
>> - 3 patches to remove some useless code where the old API was found.
>> - 1 patch to remove usage of old API
>> - 1 (big) patch to remove the old API itself
>>
>> Please review the big patch #5 written by Ferruh and me.
>> We would like to apply it shortly for 18.08-rc1.
>>
>>
>> Ferruh Yigit (1):
>> ethdev: remove old offload API
>>
>> Thomas Monjalon (4):
>> doc: remove code from KNI example guide
>> test: remove unused configuration for bonding
>> ethdev: convert remaining apps to new offload API
>> net/fm10k: remove unused constant
>
> For Series,
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Series applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [RFC] ethdev: remove all offload API
2018-06-29 1:11 ` Thomas Monjalon
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 0/5] remove old ethdev " Thomas Monjalon
@ 2018-07-02 21:34 ` Thomas Monjalon
1 sibling, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2018-07-02 21:34 UTC (permalink / raw)
To: dev
Cc: Ferruh Yigit, Shahaf Shuler, Jerin Jacob, Wenzhuo Lu,
Jingjing Wu, Bernard Iremonger, John McNamara, Marko Kovacevic,
Neil Horman, Remy Horton, Ori Kam, Bruce Richardson,
Pablo de Lara, Radu Nicolau, Akhil Goyal, Tomasz Kantecki,
Harry van Haaren, Jijiang Liu, Ravi Kumar, Konstantin Ananyev,
Andrew Rybchenko, Maxime Coquelin, Tiwei Bie, Yong Wang,
Amr Mokhtar, Declan Doherty, Chas Williams, David Hunt,
Cristian Dumitrescu, Anatoly Burakov, Reshma Pattan,
Byron Marohn
29/06/2018 03:11, Thomas Monjalon:
> 09/06/2018 00:41, Ferruh Yigit:
> > Cc: Shahaf Shuler <shahafs@mellanox.com>
> >
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>
> I start working on it.
> This is the list of remaining work on this patch:
> - rebase
> - add commit message (and fix title)
> - check git grep ETH_TXQ_FLAGS_NO
> - check git grep txq_flags
> - rebase on top of KEEP_CRC flag
> - remove jumbo_frame field
> - check update of offload bits in apps
> - mask with capability + warning auto-disabled offloads (can be separate)
I won't work on providing an automatic offload disabling with warning,
based on device capabilities, for examples or other apps.
I am not sure it is needed.
If there is a strong desire, feel to propose, and it can be planned for 18.11.
If you look for a summary of the offload rework task (almost finished),
this is the roadmap/guidelines sent last year:
http://mails.dpdk.org/archives/dev/2017-December/083363.html
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2018-07-04 18:56 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-08 22:41 [dpdk-dev] [RFC] ethdev: remove all offload API Ferruh Yigit
2018-06-08 21:52 ` Ferruh Yigit
2018-06-09 8:04 ` Andrew Rybchenko
2018-06-11 9:09 ` Ferruh Yigit
2018-06-11 11:00 ` Shahaf Shuler
2018-06-11 11:18 ` Ferruh Yigit
2018-06-11 11:26 ` Ananyev, Konstantin
2018-06-11 11:35 ` Ferruh Yigit
2018-06-11 11:35 ` Shahaf Shuler
2018-06-11 12:12 ` Ferruh Yigit
2018-06-29 1:11 ` Thomas Monjalon
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 0/5] remove old ethdev " Thomas Monjalon
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 1/5] doc: remove code from KNI example guide Thomas Monjalon
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 2/5] test: remove unused configuration for bonding Thomas Monjalon
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 3/5] ethdev: convert remaining apps to new offload API Thomas Monjalon
2018-07-04 11:16 ` Andrew Rybchenko
2018-07-04 12:26 ` Thomas Monjalon
2018-07-04 12:52 ` Andrew Rybchenko
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 4/5] net/fm10k: remove unused constant Thomas Monjalon
2018-07-02 21:27 ` [dpdk-dev] [PATCH v2 5/5] ethdev: remove old offload API Thomas Monjalon
2018-07-03 12:28 ` Shahaf Shuler
2018-07-04 11:31 ` Andrew Rybchenko
2018-07-03 18:37 ` [dpdk-dev] [PATCH v2 0/5] remove old ethdev " Ferruh Yigit
2018-07-04 18:56 ` Ferruh Yigit
2018-07-02 21:34 ` [dpdk-dev] [RFC] ethdev: remove all " Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).