feature porting from i40evf to iavf
cover feature porting from i40evf to iavf
This patch set port some features of i40evf to iavf.
Robin Zhang (8):
net/iavf: use link status helper functions net/iavf: set min and max MTU for VF net/iavf: re-program promiscuous mode on VF interface net/iavf: optimize promiscuous ops
net/iavf: add workaround promiscuous disable net/iavf: cleanup Tx buffers
net/iavf: add extended stats
net/iavf: support check DD bit of a RX descriptor
drivers/net/iavf/iavf_ethdev.c | 162 +++++++++++++++++++++------------ drivers/net/iavf/iavf_rxtx.c | 94 ++++++++++++++++++- drivers/net/iavf/iavf_rxtx.h | 2 + drivers/net/iavf/iavf_vchnl.c | 13 ++- 4 files changed, 209 insertions(+), 62 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/8 net/iavf: use link status helper functions
Use new rte_eth_linkstatus_get/set helper functions to handle link status update.
--- drivers/net/iavf/iavf_ethdev.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/net/iavf/iavf_ethdev.c +1 -6
@@ -665,12 +665,7 @@ iavf_dev_link_update(struct rte_eth_dev *dev, new_link.link_autoneg = !(dev->data->dev_conf.link_speeds Ð_LINK_SPEED_FIXED ); -if (rte_atomic64_cmpset ((uint64_t *)&dev->data->dev_link, - *(uint64_t *)&dev->data->dev_link, - *(uint64_t *)&new_link) ==0 ) -return -1 ; - -return 0 ; +return rte_eth_linkstatus_set (dev, &new_link); } static int
Signature · 1 line
2.17.1
PATCH 2/8 net/iavf: set min and max MTU for VF
In reply to Robin ZhangThis commit sets the min and max supported MTU values for iavf VF devices via the iavf_dev_info_get() function. Min MTU supported is set to RTE_ETHER_MIN_MTU and max MTU is calculated as the max packet length supported minus the transport overhead.
--- drivers/net/iavf/iavf_ethdev.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/iavf/iavf_ethdev.c +2 -0
@@ -540,6 +540,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_tx_queues = vf->vsi_res->num_queue_pairs; dev_info->min_rx_bufsize =IAVF_BUF_SIZE_MIN ; dev_info->max_rx_pktlen =IAVF_FRAME_SIZE_MAX ; + dev_info->max_mtu = dev_info->max_rx_pktlen -IAVF_ETH_OVERHEAD ; + dev_info->min_mtu =RTE_ETHER_MIN_MTU ; dev_info->hash_key_size = vf->vf_res->rss_key_size; dev_info->reta_size = vf->vf_res->rss_lut_size; dev_info->flow_type_rss_offloads =IAVF_RSS_OFFLOAD_ALL ;
Signature · 1 line
2.17.1
PATCH 3/8 net/iavf: re-program promiscuous mode on VF interface
In reply to Robin ZhangDuring a kernel PF reset, this event is propagated to the VF. The DPDK VF PMD will execute the reset task before the PF is done with his. This results in the admin queue message not being responded to leaving the port in "promiscuous" mode.
This patch makes sure the promiscuous mode is configured independently of the current admin state.
--- drivers/net/iavf/iavf_ethdev.c | 12 ------------ 1 file changed, 12 deletions(-)
drivers/net/iavf/iavf_ethdev.c +0 -12
@@ -678,9 +678,6 @@ iavf_dev_promiscuous_enable(struct rte_eth_dev *dev)struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter);int ret; -if (vf->promisc_unicast_enabled) -return 0 ; - ret =iavf_config_promisc (adapter, true, vf->promisc_multicast_enabled);if (!ret) vf->promisc_unicast_enabled = true;
@@ -700,9 +697,6 @@ iavf_dev_promiscuous_disable(struct rte_eth_dev *dev)struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter);int ret; -if (!vf->promisc_unicast_enabled) -return 0 ; - ret =iavf_config_promisc (adapter, false, vf->promisc_multicast_enabled);if (!ret)
@@ -723,9 +717,6 @@ iavf_dev_allmulticast_enable(struct rte_eth_dev *dev)struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter);int ret; -if (vf->promisc_multicast_enabled) -return 0 ; - ret =iavf_config_promisc (adapter, vf->promisc_unicast_enabled, true);if (!ret) vf->promisc_multicast_enabled = true;
@@ -745,9 +736,6 @@ iavf_dev_allmulticast_disable(struct rte_eth_dev *dev)struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter);int ret; -if (!vf->promisc_multicast_enabled) -return 0 ; - ret =iavf_config_promisc (adapter, vf->promisc_unicast_enabled, false);if (!ret) vf->promisc_multicast_enabled = false;
Signature · 1 line
2.17.1
PATCH 4/8 net/iavf: optimize promiscuous ops
In reply to Robin ZhangThis patch is to improve efficiency and eliminate code redundancy of promiscuous ops.
--- drivers/net/iavf/iavf_ethdev.c | 49 ++++++---------------------------- drivers/net/iavf/iavf_vchnl.c | 13 +++++++-- 2 files changed, 19 insertions(+), 43 deletions(-)
drivers/net/iavf/iavf_ethdev.c +8 -41
@@ -676,17 +676,9 @@ iavf_dev_promiscuous_enable(struct rte_eth_dev *dev)struct iavf_adapter *adapter =IAVF_DEV_PRIVATE_TO_ADAPTER (dev->data->dev_private);struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter); -int ret; - - ret =iavf_config_promisc (adapter, true, vf->promisc_multicast_enabled); -if (!ret) - vf->promisc_unicast_enabled = true; -else if (ret ==IAVF_NOT_SUPPORTED ) - ret = -ENOTSUP ; -else - ret = -EAGAIN ; -return ret; +return iavf_config_promisc (adapter, + true, vf->promisc_multicast_enabled); } static int
@@ -695,18 +687,9 @@ iavf_dev_promiscuous_disable(struct rte_eth_dev *dev)struct iavf_adapter *adapter =IAVF_DEV_PRIVATE_TO_ADAPTER (dev->data->dev_private);struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter); -int ret; - - ret =iavf_config_promisc (adapter, false, - vf->promisc_multicast_enabled); -if (!ret) - vf->promisc_unicast_enabled = false; -else if (ret ==IAVF_NOT_SUPPORTED ) - ret = -ENOTSUP ; -else - ret = -EAGAIN ; -return ret; +return iavf_config_promisc (adapter, + false, vf->promisc_multicast_enabled); } static int
@@ -715,17 +698,9 @@ iavf_dev_allmulticast_enable(struct rte_eth_dev *dev)struct iavf_adapter *adapter =IAVF_DEV_PRIVATE_TO_ADAPTER (dev->data->dev_private);struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter); -int ret; - - ret =iavf_config_promisc (adapter, vf->promisc_unicast_enabled, true); -if (!ret) - vf->promisc_multicast_enabled = true; -else if (ret ==IAVF_NOT_SUPPORTED ) - ret = -ENOTSUP ; -else - ret = -EAGAIN ; -return ret; +return iavf_config_promisc (adapter, + vf->promisc_unicast_enabled, true); } static int
@@ -734,17 +709,9 @@ iavf_dev_allmulticast_disable(struct rte_eth_dev *dev)struct iavf_adapter *adapter =IAVF_DEV_PRIVATE_TO_ADAPTER (dev->data->dev_private);struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter); -int ret; - - ret =iavf_config_promisc (adapter, vf->promisc_unicast_enabled, false); -if (!ret) - vf->promisc_multicast_enabled = false; -else if (ret ==IAVF_NOT_SUPPORTED ) - ret = -ENOTSUP ; -else - ret = -EAGAIN ; -return ret; +return iavf_config_promisc (adapter, + vf->promisc_unicast_enabled, false); } static int
drivers/net/iavf/iavf_vchnl.c +11 -2
@@ -841,10 +841,19 @@ iavf_config_promisc(struct iavf_adapter *adapter, err =iavf_execute_vf_cmd (adapter, &args); -if (err) +if (err) {PMD_DRV_LOG (ERR ,"fail to execute command CONFIG_PROMISCUOUS_MODE" ); -return err; + +if (err ==IAVF_NOT_SUPPORTED ) +return -ENOTSUP ; + +return -EAGAIN ; + } + + vf->promisc_unicast_enabled = enable_unicast; + vf->promisc_multicast_enabled = enable_multicast; +return 0 ; }int
Signature · 1 line
2.17.1
PATCH 5/8 net/iavf: add workaround promiscuous disable
In reply to Robin ZhangIn scenario of Kernel Driver runs on PF and PMD runs on VF, PMD exit doesn't disable promiscuous mode, this will cause vlan filter set by Kernel Driver will not take effect.
This patch will fix it, add promiscuous disable at device disable.
--- drivers/net/iavf/iavf_ethdev.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/net/iavf/iavf_ethdev.c +9 -0
@@ -1428,6 +1428,15 @@ iavf_dev_close(struct rte_eth_dev *dev)iavf_dev_stop (dev);iavf_flow_flush (dev,NULL );iavf_flow_uninit (adapter); + +/* +* disable promiscuous mode before reset vf +* it is a workaround solution when work with kernel driver +* and it is not the normal way +*/ +if (vf->promisc_unicast_enabled || vf->promisc_multicast_enabled) +iavf_config_promisc (adapter, false, false); +iavf_shutdown_adminq (hw);/* disable uio intr before callback unregister */ rte_intr_disable (intr_handle);
Signature · 1 line
2.17.1
PATCH 6/8 net/iavf: cleanup Tx buffers
In reply to Robin ZhangAdd support to the iavf driver for the API rte_eth_tx_done_cleanup to force free consumed buffers on Tx ring.
--- drivers/net/iavf/iavf_ethdev.c | 1 + drivers/net/iavf/iavf_rxtx.c | 68 +++++++++++++++++++++++++++++++++- drivers/net/iavf/iavf_rxtx.h | 1 + 3 files changed, 69 insertions(+), 1 deletion(-)
drivers/net/iavf/iavf_ethdev.c +1 -0
@@ -121,6 +121,7 @@ static const struct eth_dev_ops iavf_eth_dev_ops = { .rx_queue_intr_enable = iavf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = iavf_dev_rx_queue_intr_disable, .filter_ctrl = iavf_dev_filter_ctrl, + .tx_done_cleanup = iavf_dev_tx_done_cleanup, }; static int
drivers/net/iavf/iavf_rxtx.c +67 -1
80 lines not on this page · raw message
drivers/net/iavf/iavf_rxtx.h +1 -0
@@ -379,6 +379,7 @@ int iavf_dev_tx_queue_setup(struct rte_eth_dev *dev, const struct rte_eth_txconf *tx_conf);int iavf_dev_tx_queue_start (struct rte_eth_dev *dev,uint16_t tx_queue_id);int iavf_dev_tx_queue_stop (struct rte_eth_dev *dev,uint16_t tx_queue_id); +int iavf_dev_tx_done_cleanup (void *txq,uint32_t free_cnt);void iavf_dev_tx_queue_release (void *txq);void iavf_stop_queues (struct rte_eth_dev *dev); uint16_t iavf_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
Signature · 1 line
2.17.1
PATCH 7/8 net/iavf: add extended stats
In reply to Robin ZhangAdd implementation of xstats() functions in iavf PMD.
--- drivers/net/iavf/iavf_ethdev.c | 81 ++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+)
drivers/net/iavf/iavf_ethdev.c +81 -0
@@ -40,6 +40,11 @@ static const uint32_t *iavf_dev_supported_ptypes_get(struct rte_eth_dev *dev);static int iavf_dev_stats_get (struct rte_eth_dev *dev,struct rte_eth_stats *stats);static int iavf_dev_stats_reset (struct rte_eth_dev *dev); +static int iavf_dev_xstats_get (struct rte_eth_dev *dev, +struct rte_eth_xstat *xstats,unsigned int n); +static int iavf_dev_xstats_get_names (struct rte_eth_dev *dev, +struct rte_eth_xstat_name *xstats_names, +unsigned int limit);static int iavf_dev_promiscuous_enable (struct rte_eth_dev *dev);static int iavf_dev_promiscuous_disable (struct rte_eth_dev *dev);static int iavf_dev_allmulticast_enable (struct rte_eth_dev *dev);
@@ -82,6 +87,30 @@ static const struct rte_pci_id pci_id_iavf_map[] = { { .vendor_id = 0, /* sentinel */ }, }; +struct rte_iavf_xstats_name_off { +char name[RTE_ETH_XSTATS_NAME_SIZE ]; +unsigned int offset; +}; + +static const struct rte_iavf_xstats_name_off rte_iavf_stats_strings[] = { + {"rx_bytes" , offsetof(struct iavf_eth_stats , rx_bytes)}, + {"rx_unicast_packets" , offsetof(struct iavf_eth_stats , rx_unicast)}, + {"rx_multicast_packets" , offsetof(struct iavf_eth_stats , rx_multicast)}, + {"rx_broadcast_packets" , offsetof(struct iavf_eth_stats , rx_broadcast)}, + {"rx_dropped_packets" , offsetof(struct iavf_eth_stats , rx_discards)}, + {"rx_unknown_protocol_packets" , offsetof(struct iavf_eth_stats , + rx_unknown_protocol)}, + {"tx_bytes" , offsetof(struct iavf_eth_stats , tx_bytes)}, + {"tx_unicast_packets" , offsetof(struct iavf_eth_stats , tx_unicast)}, + {"tx_multicast_packets" , offsetof(struct iavf_eth_stats , tx_multicast)}, + {"tx_broadcast_packets" , offsetof(struct iavf_eth_stats , tx_broadcast)}, + {"tx_dropped_packets" , offsetof(struct iavf_eth_stats , tx_discards)}, + {"tx_error_packets" , offsetof(struct iavf_eth_stats , tx_errors)}, +}; + +#define IAVF_NB_XSTATS (sizeof(rte_iavf_stats_strings) / \ + sizeof(rte_iavf_stats_strings[0])) +static const struct eth_dev_ops iavf_eth_dev_ops = { .dev_configure = iavf_dev_configure, .dev_start = iavf_dev_start,
@@ -93,6 +122,9 @@ static const struct eth_dev_ops iavf_eth_dev_ops = { .link_update = iavf_dev_link_update, .stats_get = iavf_dev_stats_get, .stats_reset = iavf_dev_stats_reset, + .xstats_get = iavf_dev_xstats_get, + .xstats_get_names = iavf_dev_xstats_get_names, + .xstats_reset = iavf_dev_stats_reset, .promiscuous_enable = iavf_dev_promiscuous_enable, .promiscuous_disable = iavf_dev_promiscuous_disable, .allmulticast_enable = iavf_dev_allmulticast_enable,
@@ -1092,6 +1124,55 @@ iavf_dev_stats_reset(struct rte_eth_dev *dev)return 0 ; } +static int iavf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, +struct rte_eth_xstat_name *xstats_names, + __rte_unused unsigned int limit) +{ +unsigned int i; + +if (xstats_names !=NULL ) +for (i =0 ; i <IAVF_NB_XSTATS ; i++) { +snprintf (xstats_names[i].name, +sizeof (xstats_names[i].name), +"%s" , rte_iavf_stats_strings[i].name); + } +return IAVF_NB_XSTATS ; +} + +static int iavf_dev_xstats_get (struct rte_eth_dev *dev, +struct rte_eth_xstat *xstats,unsigned int n) +{ +int ret; +unsigned int i; +struct iavf_adapter *adapter = +IAVF_DEV_PRIVATE_TO_ADAPTER (dev->data->dev_private); +struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (dev->data->dev_private); +struct iavf_vsi *vsi = &vf->vsi; +struct virtchnl_eth_stats *pstats =NULL ; + +if (n <IAVF_NB_XSTATS ) +return IAVF_NB_XSTATS ; + + ret =iavf_query_stats (adapter, &pstats); +if (ret !=0 ) +return 0 ; + +if (!xstats) +return 0 ; + +iavf_update_stats (vsi, pstats); + +/* loop over xstats array and values from pstats */ +for (i =0 ; i <IAVF_NB_XSTATS ; i++) { + xstats[i].id = i; + xstats[i].value = *(uint64_t *)(((char *)pstats) + + rte_iavf_stats_strings[i].offset); + } + +return IAVF_NB_XSTATS ; +} + +static int iavf_dev_rx_queue_intr_enable (struct rte_eth_dev *dev,uint16_t queue_id) {
Signature · 1 line
2.17.1
PATCH 8/8 net/iavf: support check DD bit of a RX descriptor
In reply to Robin ZhangAdd implementation of inline API rx_descriptor_done in iavf PMD.
--- drivers/net/iavf/iavf_ethdev.c | 1 + drivers/net/iavf/iavf_rxtx.c | 26 ++++++++++++++++++++++++++ drivers/net/iavf/iavf_rxtx.h | 1 + 3 files changed, 28 insertions(+)
drivers/net/iavf/iavf_ethdev.c +1 -0
@@ -1417,6 +1417,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)/* assign ops func pointer */ eth_dev->dev_ops = &iavf_eth_dev_ops; eth_dev->rx_queue_count = iavf_dev_rxq_count; + eth_dev->rx_descriptor_done = iavf_dev_rx_desc_done; eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status; eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status; eth_dev->rx_pkt_burst = &iavf_recv_pkts;
drivers/net/iavf/iavf_rxtx.c +26 -0
@@ -2337,6 +2337,32 @@ iavf_dev_rxq_count(struct rte_eth_dev *dev, uint16_t queue_id)return desc; } +int +iavf_dev_rx_desc_done (void *rx_queue,uint16_t offset) +{ +volatile union iavf_rx_desc *rxdp; +struct iavf_rx_queue *rxq = rx_queue; +uint16_t desc; +int ret; + +if (unlikely (offset >= rxq->nb_rx_desc)) { +PMD_DRV_LOG (ERR ,"Invalid RX descriptor id %u" , offset); +return 0 ; + } + + desc = rxq->rx_tail + offset; +if (desc >= rxq->nb_rx_desc) + desc -= rxq->nb_rx_desc; + + rxdp = &rxq->rx_ring[desc]; + + ret = !!(((rte_le_to_cpu_64 (rxdp->wb.qword1.status_error_len) & +IAVF_RXD_QW1_STATUS_MASK ) >>IAVF_RXD_QW1_STATUS_SHIFT ) & + (1 <<IAVF_RX_DESC_STATUS_DD_SHIFT )); + +return ret; +} +int iavf_dev_rx_desc_status (void *rx_queue,uint16_t offset) {
drivers/net/iavf/iavf_rxtx.h +1 -0
@@ -404,6 +404,7 @@ void iavf_dev_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,void iavf_dev_txq_info_get (struct rte_eth_dev *dev,uint16_t queue_id,struct rte_eth_txq_info *qinfo);uint32_t iavf_dev_rxq_count (struct rte_eth_dev *dev,uint16_t queue_id); +int iavf_dev_rx_desc_done (void *rx_queue,uint16_t offset);int iavf_dev_rx_desc_status (void *rx_queue,uint16_t offset);int iavf_dev_tx_desc_status (void *tx_queue,uint16_t offset);
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 8/8] net/iavf: support check DD bit of a RX descriptor
Quoted 14 lines · Robin Zhang
Add implementation of inline API
rx_descriptor_donein iavf PMD.Signed-off-by Robin Zhang <[email protected]>--- drivers/net/iavf/iavf_ethdev.c | 1 + drivers/net/iavf/iavf_rxtx.c | 26 ++++++++++++++++++++++++++ drivers/net/iavf/iavf_rxtx.h | 1 + 3 files changed, 28 insertions(+)drivers/net/iavf/iavf_ethdev.c +0
-0
drivers/net/iavf/iavf_ethdev.c iavf_dev_init(struct rte_eth_dev *eth_dev) · line 1422
Quoted 6 lines
drivers/net/iavf/iavf_ethdev.c +1
-0@@ -1417,6 +1417,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)/* assign ops func pointer */ eth_dev->dev_ops = &iavf_eth_dev_ops; eth_dev->rx_queue_count = iavf_dev_rxq_count; + eth_dev->rx_descriptor_done = iavf_dev_rx_desc_done; eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status; eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status;
Hi Robin,
'rx_descriptor_done' dev_ops is deprecated, 'rx_descriptor_status' should provide same information?
Is there a specific reason/need to implement 'rx_descriptor_done'? If not I will drop this patch.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [dpdk-dev] [PATCH 8/8] net/iavf: support check DD bit of a RX descriptor
Quoted 39 lines · RobinX
Hi Ferruh
Quoted 37 lines
-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Thursday, October 8, 2020 11:06 PM
To: Zhang, RobinX <[email protected]>; [email protected]
Cc: Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 8/8] net/iavf: support check DD bit of a RX descriptorQuoted 14 lines · Robin Zhang
Add implementation of inline API
rx_descriptor_donein iavf PMD.Signed-off-by Robin Zhang <[email protected]>--- drivers/net/iavf/iavf_ethdev.c | 1 + drivers/net/iavf/iavf_rxtx.c | 26 ++++++++++++++++++++++++++ drivers/net/iavf/iavf_rxtx.h | 1 + 3 files changed, 28 insertions(+)(quoted diff) +0
-0
b/drivers/net/iavf/iavf_ethdev.cindex836c09f58..b7a819a0e100644drivers/net/iavf/iavf_ethdev.c iavf_dev_init(struct rte_eth_dev *eth_dev) · line 1422
Quoted 6 lines
drivers/net/iavf/iavf_ethdev.c +1
-0@@ -1417,6 +1417,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)/* assign ops func pointer */ eth_dev->dev_ops = &iavf_eth_dev_ops; eth_dev->rx_queue_count = iavf_dev_rxq_count; + eth_dev->rx_descriptor_done = iavf_dev_rx_desc_done; eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status; eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status;Hi Robin,
'
rx_descriptor_done'dev_opsis deprecated, 'rx_descriptor_status' should provide same information?
Quoted 7 lines
Quoted 2 lines
Is there a specific reason/need to implement '
rx_descriptor_done'? If not I will drop this patch.The purpose of this patch is keep same behavior between i40evf and iavf.
Refer to i40evf commit
cbfc6111b5in dpdk-next-net-intel, 'rx_descriptor_done' is moved to 'structrte_eth_dev'.
I see, but for i40evf, the 'rx_descriptor_done' was already there and it will be removed in 21.11.
I think no need to add a deprecated feature. 'rte_eth_rx_descriptor_status' replaces it and it is already implemented in iavf.
Re: [dpdk-dev] [PATCH 8/8] net/iavf: support check DD bit of a RX descriptor
Quoted 58 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Ferruh Yigit
Sent: Monday, October 12, 2020 4:33 PM
To: Zhang, RobinX <[email protected]>; [email protected]
Cc: Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 8/8] net/iavf: support check DD bit of a RX descriptorQuoted 39 lines · RobinX
Hi Ferruh
Quoted 37 lines
-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Thursday, October 8, 2020 11:06 PM
To: Zhang, RobinX <[email protected]>; [email protected]
Cc: Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 8/8] net/iavf: support check DD bit of a RX descriptorQuoted 14 lines · Robin Zhang
Add implementation of inline API
rx_descriptor_donein iavf PMD.Signed-off-by Robin Zhang <[email protected]>--- drivers/net/iavf/iavf_ethdev.c | 1 + drivers/net/iavf/iavf_rxtx.c | 26 ++++++++++++++++++++++++++ drivers/net/iavf/iavf_rxtx.h | 1 + 3 files changed, 28 insertions(+)(quoted diff) +0
-0
b/drivers/net/iavf/iavf_ethdev.cindex836c09f58..b7a819a0e100644drivers/net/iavf/iavf_ethdev.c iavf_dev_init(struct rte_eth_dev *eth_dev) · line 1422
Quoted 6 lines
drivers/net/iavf/iavf_ethdev.c +1
-0@@ -1417,6 +1417,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)/* assign ops func pointer */ eth_dev->dev_ops = &iavf_eth_dev_ops; eth_dev->rx_queue_count = iavf_dev_rxq_count; + eth_dev->rx_descriptor_done = iavf_dev_rx_desc_done; eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status; eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status;Hi Robin,
'
rx_descriptor_done'dev_opsis deprecated, 'rx_descriptor_status' should provide same information?Quoted 6 lines
Quoted 2 lines
Is there a specific reason/need to implement '
rx_descriptor_done'? If not I will drop this patch.The purpose of this patch is keep same behavior between i40evf and iavf.
Refer to i40evf commit
cbfc6111b5in dpdk-next-net-intel,
Quoted 8 lines
'
rx_descriptor_done' is moved to 'structrte_eth_dev'.Quoted 1 line
I see, but for i40evf, the '
rx_descriptor_done' was already there and it will be removed in 21.11.I think no need to add a deprecated feature. '
rte_eth_rx_descriptor_status' replaces it and it is already implemented in iavf.
+1. Let's drop this patch.
Quoted 23 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Robin Zhang
Sent: Sunday, September 27, 2020 3:26 PM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>; Zhang, RobinX <[email protected]>
Subject: [dpdk-dev] [PATCH 0/8] feature porting from i40evf to iavfThis patch set port some features of i40evf to iavf.
Robin Zhang (8):
net/iavf: use link status helper functions net/iavf: set min and max MTU for VF net/iavf: re-program promiscuous mode on VF interface net/iavf: optimize promiscuous ops
net/iavf: add workaround promiscuous disable net/iavf: cleanup Tx buffers
net/iavf: add extended stats
net/iavf: support check DD bit of a RX descriptor
Quoted 8 lines
drivers/net/iavf/iavf_ethdev.c | 162 +++++++++++++++++++++------------ drivers/net/iavf/iavf_rxtx.c | 94 ++++++++++++++++++- drivers/net/iavf/iavf_rxtx.h | 2 + drivers/net/iavf/iavf_vchnl.c | 13 ++- 4 files changed, 209 insertions(+), 62 deletions(-)--
2.17.1
Applied to dpdk-next-net-intel.
Thanks
Qi