diff options
| author | songyanchao <[email protected]> | 2023-08-08 07:06:37 +0000 |
|---|---|---|
| committer | songyanchao <[email protected]> | 2023-08-08 07:06:37 +0000 |
| commit | 525abd9e514c4397dc80ba007e349f8b396438f2 (patch) | |
| tree | 42a8787ca2c37c77fbd387a597b230d26698e02d | |
| parent | c383ccc2653aa872c090c907615c1285d4319cc9 (diff) | |
🐞 fix(TSG-16535): 修复因修改分流算法导致tfe自检不通过问题,启用 ctrlzone reset 函数
修复因修改分流算法导致tfe自检不通过问题,启用 ctrlzone reset 函数
| -rw-r--r-- | app/src/mrb.c | 8 | ||||
| -rw-r--r-- | app/src/rawio.c | 7 | ||||
| -rw-r--r-- | service/src/node_phydev.c | 8 |
3 files changed, 14 insertions, 9 deletions
diff --git a/app/src/mrb.c b/app/src/mrb.c index bac8da4..ed8a5af 100644 --- a/app/src/mrb.c +++ b/app/src/mrb.c @@ -51,8 +51,11 @@ void marsio_buff_ctrlzone_set(marsio_buff_t * mr_buff, uint8_t id, void * ptr_da void marsio_buff_ctrlzone_reset(marsio_buff_t * mr_buff) { + PROTECT_rte_mbuf_unpoison_meta((struct rte_mbuf *)mr_buff); + memset(mrbuf_cz_data(mr_buff, MR_NODE_CTRLZONE_ID), 0, sizeof(struct mrb_metadata)); + PROTECT_rte_mbuf_poison_meta(mr_buff); return; - +#if 0 PROTECT_rte_mbuf_unpoison_meta((struct rte_mbuf *)mr_buff); struct mrb_zone_idx *cz_first = NULL, *cz_last = NULL; @@ -63,6 +66,7 @@ void marsio_buff_ctrlzone_reset(marsio_buff_t * mr_buff) memset(mrbuf_cz_data(mr_buff, 0), 0, cz_last->offset + cz_last->size - cz_first->offset); } PROTECT_rte_mbuf_poison_meta(mr_buff); +#endif } void * mr_buffer_ctrlzone(struct rte_mbuf * mr_buff, uint8_t id) @@ -215,7 +219,7 @@ void marsio_buff_do_rehash(struct mr_instance * mr_instance, marsio_buff_t * m) struct pkt_parser_result * parser_results[1] = {&mrb_metadata->pkt_parser_result}; /* clear the txq hash */ - mbuf->hash.txadapter.txq = 0; + //mbuf->hash.txadapter.txq = 0; /* do the rehash */ distributer_calculate_from_parser_results(mr_instance->dist_object, mbufs, parser_results, 1); diff --git a/app/src/rawio.c b/app/src/rawio.c index b919278..6876c1f 100644 --- a/app/src/rawio.c +++ b/app/src/rawio.c @@ -127,12 +127,13 @@ int marsio_send_buffer_flush(struct mr_vdev * vdev, queue_id_t sid) hash_t hash[MR_BURST_MAX]; for (int i = 0; i < tx_buffer->length; i++) { - uint16_t hash_txq = tx_buffer->mbufs[i]->hash.txadapter.txq; - uint32_t hash_usr = tx_buffer->mbufs[i]->hash.usr; + //uint16_t hash_txq = tx_buffer->mbufs[i]->hash.txadapter.txq; + //uint32_t hash_usr = tx_buffer->mbufs[i]->hash.usr; /* if the hash_qid's highest bit is set, use the txq */ #if 1 - hash[i] = hash_txq & 0x8000 ? hash_txq & 0x7FFF : hash_usr; + //hash[i] = hash_txq & 0x8000 ? hash_txq & 0x7FFF : hash_usr; + hash[i] = tx_buffer->mbufs[i]->hash.usr; #else /* round-robin */ hash[i] = round_robin_counter++; diff --git a/service/src/node_phydev.c b/service/src/node_phydev.c index 0c4bf7e..db038b2 100644 --- a/service/src/node_phydev.c +++ b/service/src/node_phydev.c @@ -235,8 +235,8 @@ static __rte_always_inline uint16_t dpdk_dev_rx_node_process(struct rte_graph * struct dev_node_qid_map * qid_map = ctx->qid_map; unsigned int core_id = rte_lcore_id(); - unsigned int tmp_core_idx = rte_lcore_index((int)core_id); - unsigned int core_idx = tmp_core_idx > 0 ? tmp_core_idx - 1 : 0; + //unsigned int tmp_core_idx = rte_lcore_index((int)core_id); + //unsigned int core_idx = tmp_core_idx > 0 ? tmp_core_idx - 1 : 0; /* check the core can do recv for this device or not */ if (qid_map->qid_enabled[core_id] == 0) @@ -286,7 +286,7 @@ static __rte_always_inline uint16_t dpdk_dev_rx_node_process(struct rte_graph * parser_results[i] = &mrb_meta->pkt_parser_result; /* save the qid, set the highest bit to 1 */ - mbuf->hash.txadapter.txq = (uint16_t)core_idx | (1 << 15); + //mbuf->hash.txadapter.txq = (uint16_t)core_idx | (1 << 15); } /* for test */ @@ -564,4 +564,4 @@ int node_manager_dev_init(struct sc_main * sc, struct node_manager_main * node_m int node_manager_phydev_deinit(struct node_manager_main * node_mgr_main) { return 0; -}
\ No newline at end of file +} |
