net/ark: update packet Rx path to set mbuf time stamp field
PATCH 1/2 net/ark: update packet Rx path to set mbuf time stamp field
Time stamp was carried in the packet meta data, but not place in the mbuf. The new time stamp field is the proper destination.
Remove the setting of data offset since this is done by rte_pktmbuf_free()
--- drivers/net/ark/ark_ethdev_rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ark/ark_ethdev_rx.c +2 -1
@@ -292,7 +292,7 @@ eth_ark_recv_pkts(void *rx_queue, mbuf->port = meta->port; mbuf->pkt_len = meta->pkt_len; mbuf->data_len = meta->pkt_len; - mbuf->data_off =RTE_PKTMBUF_HEADROOM ; + mbuf->timestamp = meta->timestamp; mbuf->udata64 = meta->user_data;if (ARK_RX_DEBUG ) {/* debug sanity checks */
@@ -322,6 +322,7 @@ eth_ark_recv_pkts(void *rx_queue, mbuf->pkt_len =63 ; meta->pkt_len =63 ; } +/* seqn is only set under debug */ mbuf->seqn = cons_index; }
Signature · 1 line
2.7.4
PATCH 2/2 net/ark: report hardware status during PMD init
Expose additional fpga status registers and report conditions during PMD init
--- drivers/net/ark/ark_ethdev.c | 9 +++++++++ drivers/net/ark/ark_rqp.c | 6 ++++++ drivers/net/ark/ark_rqp.h | 4 +++- 3 files changed, 18 insertions(+), 1 deletion(-)
drivers/net/ark/ark_ethdev.c +9 -0
@@ -297,6 +297,15 @@ eth_ark_dev_init(struct rte_eth_dev *dev) ark->sysctrl.t32[4], __func__);return -1 ; } +if (ark->sysctrl.t32[3 ] !=0 ) { +if (ark_rqp_lasped (ark->rqpacing)) +PMD_DRV_LOG (INFO ,"Arkville Evaluation System - " +"Timer has Expired\n" ); +else +PMD_DRV_LOG (INFO ,"Arkville Evaluation System - " +"Timer is Running\n" ); + } +PMD_DRV_LOG (INFO , "HW Sanity test has PASSED, expected constant"
drivers/net/ark/ark_rqp.c +6 -0
@@ -89,3 +89,9 @@ ark_rqp_dump(struct ark_rqpace_t *rqp)"cplh pending max" , rqp->cplh_pending_max, "cpld pending max", rqp->cpld_pending_max); } + +int +ark_rqp_lasped (struct ark_rqpace_t *rqp) +{ +return rqp->lasped; +}
drivers/net/ark/ark_rqp.h +3 -1
@@ -76,9 +76,11 @@ struct ark_rqpace_t {volatile uint32_t cplh_pending_max;volatile uint32_t cpld_pending_max;volatile uint32_t err_count_other; +char eval[4 ]; + volatile int lasped; };void ark_rqp_dump (struct ark_rqpace_t *rqp);void ark_rqp_stats_reset (struct ark_rqpace_t *rqp); - +int ark_rqp_lasped (struct ark_rqpace_t *rqp);#endif
Signature · 1 line
2.7.4
Re: [PATCH 2/2] net/ark: report hardware status during PMD init
Quoted 15 lines · Ed Czeck
Expose additional fpga status registers and report conditions during PMD init
Signed-off-by Ed Czeck <[email protected]>--- drivers/net/ark/ark_ethdev.c | 9 +++++++++ drivers/net/ark/ark_rqp.c | 6 ++++++ drivers/net/ark/ark_rqp.h | 4 +++- 3 files changed, 18 insertions(+), 1 deletion(-)drivers/net/ark/ark_ethdev.c +0
-0
drivers/net/ark/ark_ethdev.c eth_ark_dev_init(struct rte_eth_dev *dev) · line 302
Quoted 6 lines
drivers/net/ark/ark_ethdev.c +3
-0@@ -297,6 +297,15 @@ eth_ark_dev_init(struct rte_eth_dev *dev) ark->sysctrl.t32[4], __func__);return -1 ; } +if (ark->sysctrl.t32[3 ] !=0 ) { +if (ark_rqp_lasped (ark->rqpacing)) + PMD_DRV_LOG(INFO, "Arkville Evaluation System - "
Is this should be "info" level or debug, is end user interested if timer expired or not?
drivers/net/ark/ark_ethdev.c eth_ark_dev_init(struct rte_eth_dev *dev) · line 305
Quoted 3 lines
drivers/net/ark/ark_ethdev.c +3
-0+ "Timer has Expired\n"); + else + PMD_DRV_LOG(INFO, "Arkville Evaluation System - "
btw, what is the logic in pmd, when to use PMD_DRV_LOG and when to use PMD_DEBUG_LOG?
drivers/net/ark/ark_ethdev.c eth_ark_dev_init(struct rte_eth_dev *dev) · line 309
Quoted 4 lines
drivers/net/ark/ark_ethdev.c +3
-0+ "Timer is Running\n"); + } +
Extra line.
Quoted 2 lines
drivers/net/ark/ark_ethdev.c +0
-0PMD_DRV_LOG (INFO , "HW Sanity test has PASSED, expected constant"
<...>
Quoted 11 lines · Ed Czeck
Time stamp was carried in the packet meta data, but not place in the mbuf. The new time stamp field is the proper destination.
Remove the setting of data offset since this is done by
rte_pktmbuf_free()Signed-off-by Ed Czeck <[email protected]>
Re: [PATCH 2/2] net/ark: report hardware status during PMD init
In reply to Ferruh YigitQuoted 5 lines · Ferruh Yigit
Quoted 3 lines · Ed Czeck
Expose additional fpga status registers and report conditions during PMD init
Quoted 8 lines
drivers/net/ark/ark_ethdev.c eth_ark_dev_init(struct rte_eth_dev *dev) · line 302
Quoted 3 lines
drivers/net/ark/ark_ethdev.c +3
-0+if (ark->sysctrl.t32[3 ] !=0 ) { +if (ark_rqp_lasped (ark->rqpacing)) + PMD_DRV_LOG(INFO, "Arkville Evaluation System - "Is this should be "info" level or debug, is end user interested if timer expired or not?
These messages are intended for the user. After internal discussion we
promoted them to warning and error.
Quoted 6 lines
drivers/net/ark/ark_ethdev.c eth_ark_dev_init(struct rte_eth_dev *dev) · line 305
Quoted 3 lines
drivers/net/ark/ark_ethdev.c +3
-0+ "Timer has Expired\n"); + else + PMD_DRV_LOG(INFO, "Arkville Evaluation System - "btw, what is the logic in pmd, when to use
PMD_DRV_LOGand when to usePMD_DEBUG_LOG?
The PMD_DRV_LOG macro is a local wrapper on RTE_LOG, while the PMD_DEBUG_LOG macro is a compile-time conditional macro to the same RTE_LOG. The DEBUG_LOG macro is conditionalize on the configuration RTE_LIBRTE_ARK_DEBUG_TRACE.
Quoted 7 lines
drivers/net/ark/ark_ethdev.c eth_ark_dev_init(struct rte_eth_dev *dev) · line 308
Quoted 4 lines
drivers/net/ark/ark_ethdev.c +3
-0+ "Timer is Running\n"); + } +Extra line.
Removed.
Thank you
PATCH v2 1/2 net/ark: update packet Rx path to set mbuf time stamp field
In reply to Ed CzeckTime stamp was carried in the packet meta data, but not place in the mbuf. The new time stamp field is the proper destination.
Remove the setting of data offset since this is done by rte_pktmbuf_free()
--- drivers/net/ark/ark_ethdev_rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ark/ark_ethdev_rx.c +2 -1
@@ -292,7 +292,7 @@ eth_ark_recv_pkts(void *rx_queue, mbuf->port = meta->port; mbuf->pkt_len = meta->pkt_len; mbuf->data_len = meta->pkt_len; - mbuf->data_off =RTE_PKTMBUF_HEADROOM ; + mbuf->timestamp = meta->timestamp; mbuf->udata64 = meta->user_data;if (ARK_RX_DEBUG ) {/* debug sanity checks */
@@ -322,6 +322,7 @@ eth_ark_recv_pkts(void *rx_queue, mbuf->pkt_len =63 ; meta->pkt_len =63 ; } +/* seqn is only set under debug */ mbuf->seqn = cons_index; }
Signature · 1 line
2.7.4
PATCH v2 2/2 net/ark: report hardware status during PMD init
In reply to Ed CzeckExpose additional fpga status registers.
Report hardware status during PMD init.
--- drivers/net/ark/ark_ethdev.c | 9 +++++++++ drivers/net/ark/ark_rqp.c | 6 ++++++ drivers/net/ark/ark_rqp.h | 4 +++- 3 files changed, 18 insertions(+), 1 deletion(-)
drivers/net/ark/ark_ethdev.c +9 -0
@@ -297,6 +297,15 @@ eth_ark_dev_init(struct rte_eth_dev *dev) ark->sysctrl.t32[4], __func__);return -1 ; } +if (ark->sysctrl.t32[3 ] !=0 ) { +if (ark_rqp_lasped (ark->rqpacing)) { +PMD_DRV_LOG (ERR ,"Arkville Evaluation System - " +"Timer has Expired\n" ); +return -1 ; + } +PMD_DRV_LOG (WARNING ,"Arkville Evaluation System - " +"Timer is Running\n" ); + }PMD_DRV_LOG (INFO , "HW Sanity test has PASSED, expected constant"
drivers/net/ark/ark_rqp.c +6 -0
@@ -89,3 +89,9 @@ ark_rqp_dump(struct ark_rqpace_t *rqp)"cplh pending max" , rqp->cplh_pending_max, "cpld pending max", rqp->cpld_pending_max); } + +int +ark_rqp_lasped (struct ark_rqpace_t *rqp) +{ +return rqp->lasped; +}
drivers/net/ark/ark_rqp.h +3 -1
@@ -76,9 +76,11 @@ struct ark_rqpace_t {volatile uint32_t cplh_pending_max;volatile uint32_t cpld_pending_max;volatile uint32_t err_count_other; +char eval[4 ]; + volatile int lasped; };void ark_rqp_dump (struct ark_rqpace_t *rqp);void ark_rqp_stats_reset (struct ark_rqpace_t *rqp); - +int ark_rqp_lasped (struct ark_rqpace_t *rqp);#endif
Signature · 1 line
2.7.4
Quoted 8 lines · Ed Czeck
Time stamp was carried in the packet meta data, but not place in the mbuf. The new time stamp field is the proper destination.
Remove the setting of data offset since this is done by
rte_pktmbuf_free()Signed-off-by Ed Czeck <[email protected]>
Series applied to dpdk-next-net/master, thanks.
Re: [PATCH v2 2/2] net/ark: report hardware status during PMD init
In reply to Ed CzeckQuoted 7 lines · Ed Czeck
Expose additional fpga status registers.
Report hardware status during PMD init.Signed-off-by Ed Czeck <[email protected]>