-
Notifications
You must be signed in to change notification settings - Fork 0
VOER-???: Upgrade prox for DPDK-24.11.2 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: touchstone-master-02425932
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -329,7 +329,11 @@ void display_init(void) | |
| init_pair(WHITE_ON_NOTHING, COLOR_WHITE, -1); | ||
| /* nodelay(scr, TRUE); */ | ||
| noecho(); | ||
|
|
||
| printf("Before Curset\n"); | ||
| curs_set(0); | ||
| volatile int dummy = 0; | ||
| if (dummy == 0) printf("After Curset"); | ||
|
Comment on lines
+335
to
+336
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rm. |
||
| /* Create fullscreen log window. When stats are displayed | ||
| later, it is recreated with appropriate dimensions. */ | ||
| win_txt = create_subwindow(0, 0, 0, 0); | ||
|
|
@@ -625,7 +629,7 @@ static void stats_display_layout(uint8_t in_place) | |
| delwin(win_title); | ||
| delwin(win_tabs); | ||
| delwin(win_cmd); | ||
| delwin(win_txt); | ||
| //delwin(win_txt); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. un-rm. |
||
| delwin(win_help); | ||
|
|
||
| clear(); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -289,7 +289,7 @@ static int handle_bulk_impair(struct task_base *tbase, struct rte_mbuf **mbufs, | |
| out[idx] = rand_r(&task->seed) <= task->tresh_no_drop? 0 : OUT_DISCARD; | ||
| new_mbufs[idx] = task->queue[task->queue_tail].mbuf; | ||
| PREFETCH0(new_mbufs[idx]); | ||
| PREFETCH0(&new_mbufs[idx]->cacheline1); | ||
| PREFETCH0(RTE_PTR_ADD(new_mbufs[idx], RTE_CACHE_LINE_MIN_SIZE)); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reason/source for this change? |
||
| idx++; | ||
| task->queue_tail = (task->queue_tail + 1) & task->queue_mask; | ||
| } | ||
|
|
@@ -303,7 +303,7 @@ static int handle_bulk_impair(struct task_base *tbase, struct rte_mbuf **mbufs, | |
| out[idx] = 0; | ||
| new_mbufs[idx] = task->queue[task->queue_tail].mbuf; | ||
| PREFETCH0(new_mbufs[idx]); | ||
| PREFETCH0(&new_mbufs[idx]->cacheline1); | ||
| PREFETCH0(RTE_PTR_ADD(new_mbufs[idx], RTE_CACHE_LINE_MIN_SIZE)); | ||
| idx++; | ||
| task->queue_tail = (task->queue_tail + 1) & task->queue_mask; | ||
| } | ||
|
|
@@ -404,7 +404,7 @@ static int handle_bulk_impair_random(struct task_base *tbase, struct rte_mbuf ** | |
| out[pkt_idx] = rand_r(&task->seed) <= task->tresh_no_drop? 0 : OUT_DISCARD; | ||
| new_mbufs[pkt_idx] = queue->queue_elem[queue->queue_tail].mbuf; | ||
| PREFETCH0(new_mbufs[pkt_idx]); | ||
| PREFETCH0(&new_mbufs[pkt_idx]->cacheline1); | ||
| PREFETCH0(rte_pktmbuf_mtod(new_mbufs[pkt_idx], void *)); | ||
| pkt_idx++; | ||
| queue->queue_tail = (queue->queue_tail + 1) & task->queue_mask; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -469,8 +469,8 @@ static inline uint8_t handle_ipv6_encap(struct task_ipv6_encap* ptask, struct rt | |
| pip6->proto = IPPROTO_IPIP; | ||
| pip6->payload_len = rte_cpu_to_be_16(ipv4_length); | ||
| pip6->hop_limits = ptask->tunnel_hop_limit; | ||
| rte_memcpy(pip6->dst_addr, &tun_dest->dst_addr, sizeof(pip6->dst_addr)); | ||
| rte_memcpy(pip6->src_addr, &ptask->local_endpoint_addr, sizeof(pip6->src_addr)); | ||
| rte_memcpy(&pip6->dst_addr, &tun_dest->dst_addr, sizeof(pip6->dst_addr)); | ||
| rte_memcpy(&pip6->src_addr, &ptask->local_endpoint_addr, sizeof(pip6->src_addr)); | ||
|
Comment on lines
+472
to
+473
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That does not seem right! Source of this change in DPDK? |
||
|
|
||
| if (tun_base->runtime_flags & TASK_TX_CRC) { | ||
| // We modified the TTL in the IPv4 header, hence have to recompute the IPv4 checksum | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -677,8 +677,25 @@ static void init_port(struct prox_port_cfg *port_cfg) | |
| // Enable RSS if multiple receive queues | ||
| if (strcmp(port_cfg->short_name, "virtio")) { | ||
| port_cfg->port_conf.rxmode.mq_mode |= RTE_ETH_MQ_RX_RSS; | ||
| port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key = toeplitz_init_key; | ||
| port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len = TOEPLITZ_KEY_LEN; | ||
| port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len= port_cfg->dev_info.hash_key_size; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quite interesting. Why? |
||
| printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len); | ||
| if (port_cfg->dev_info.hash_key_size == TOEPLITZ_KEY_LEN_52){ | ||
| port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key = toeplitz_init_key_52; | ||
| for (int i = 0; i < TOEPLITZ_KEY_LEN_52; i++) { | ||
| printf("%02x ", toeplitz_init_key_52[i]); | ||
| if ((i + 1) % 8 == 0) printf("\n"); | ||
| } | ||
|
Comment on lines
+684
to
+687
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rm. |
||
| } | ||
| else{ | ||
| port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key = toeplitz_init_key; | ||
| for (int i = 0; i < TOEPLITZ_KEY_LEN; i++) { | ||
| printf("%02x ", toeplitz_init_key[i]); | ||
| if ((i + 1) % 8 == 0) printf("\n"); | ||
| } | ||
|
Comment on lines
+691
to
+694
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rm. |
||
| } | ||
|
|
||
| printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rm. |
||
|
|
||
| #if RTE_VERSION >= RTE_VERSION_NUM(2,0,0,0) | ||
| port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf = RTE_ETH_RSS_IP|RTE_ETH_RSS_UDP; | ||
| #else | ||
|
|
@@ -689,14 +706,17 @@ static void init_port(struct prox_port_cfg *port_cfg) | |
|
|
||
| // Make sure that the requested RSS offload is supported by the PMD | ||
| #if RTE_VERSION >= RTE_VERSION_NUM(2,0,0,0) | ||
| printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len); | ||
| port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf &= port_cfg->dev_info.flow_type_rss_offloads; | ||
| printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len); | ||
| #endif | ||
| if (strcmp(port_cfg->short_name, "virtio")) { | ||
| printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len); | ||
|
Comment on lines
+709
to
+714
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rm. |
||
| plog_info("\t\t Enabling RSS rss_hf = 0x%lx (requested 0x%llx, supported 0x%lx)\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf, RTE_ETH_RSS_IP|RTE_ETH_RSS_UDP, port_cfg->dev_info.flow_type_rss_offloads); | ||
| } else { | ||
| plog_info("\t\t Not enabling RSS on virtio port"); | ||
| } | ||
|
|
||
| printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rm. |
||
| // rxmode such as hw src strip | ||
| #if RTE_VERSION >= RTE_VERSION_NUM(18,8,0,1) | ||
| #if defined (RTE_ETH_RX_OFFLOAD_CRC_STRIP) | ||
|
|
@@ -715,6 +735,7 @@ static void init_port(struct prox_port_cfg *port_cfg) | |
| port_cfg->port_conf.rxmode.jumbo_frame = 1; | ||
| } | ||
| #endif | ||
| printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rm. |
||
|
|
||
| // IPV4, UDP, SCTP Checksums | ||
| #if RTE_VERSION >= RTE_VERSION_NUM(18,8,0,1) | ||
|
|
@@ -748,7 +769,7 @@ static void init_port(struct prox_port_cfg *port_cfg) | |
| else | ||
| plog_info("\t\tTX offloads enabled on port %d\n", port_id); | ||
| #endif | ||
|
|
||
| printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len); | ||
| // Refcount | ||
| #if RTE_VERSION >= RTE_VERSION_NUM(18,8,0,1) | ||
| CONFIGURE_TX_OFFLOAD(RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE); | ||
|
|
@@ -758,7 +779,7 @@ static void init_port(struct prox_port_cfg *port_cfg) | |
| else | ||
| plog_info("\t\tRefcnt enabled on port %d\n", port_id); | ||
| #endif | ||
|
|
||
| printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len); | ||
| plog_info("\t\tConfiguring port %u... with %u RX queues and %u TX queues\n", | ||
| port_id, port_cfg->n_rxq, port_cfg->n_txq); | ||
|
|
||
|
|
@@ -777,7 +798,7 @@ static void init_port(struct prox_port_cfg *port_cfg) | |
| port_cfg->port_conf.intr_conf.lsc = 0; | ||
| plog_info("\t\tDisabling link state interrupt for vmxnet3/VF/virtio (unsupported)\n"); | ||
| } | ||
|
|
||
| printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len); | ||
| if (port_cfg->lsc_set_explicitely) { | ||
| port_cfg->port_conf.intr_conf.lsc = port_cfg->lsc_val; | ||
| plog_info("\t\tOverriding link state interrupt configuration to '%s'\n", port_cfg->lsc_val? "enabled" : "disabled"); | ||
|
|
@@ -791,7 +812,7 @@ static void init_port(struct prox_port_cfg *port_cfg) | |
| plog_info("\t\tNumber of RX descriptors is set to %d (minimum required for %s\n", port_cfg->min_rx_desc, port_cfg->short_name); | ||
| port_cfg->n_rxd = port_cfg->min_rx_desc; | ||
| } | ||
|
|
||
| printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len); | ||
| if (port_cfg->n_txd > port_cfg->max_tx_desc) { | ||
| plog_info("\t\tNumber of TX descriptors is set to %d (maximum required for %s\n", port_cfg->max_tx_desc, port_cfg->short_name); | ||
| port_cfg->n_txd = port_cfg->max_tx_desc; | ||
|
|
@@ -801,7 +822,9 @@ static void init_port(struct prox_port_cfg *port_cfg) | |
| plog_info("\t\tNumber of RX descriptors is set to %d (maximum required for %s\n", port_cfg->max_rx_desc, port_cfg->short_name); | ||
| port_cfg->n_rxd = port_cfg->max_rx_desc; | ||
| } | ||
|
|
||
| printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len); | ||
| printf("rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len); | ||
| printf("Hash Key size in port_conf var= %u\n", port_cfg->dev_info.hash_key_size); | ||
| ret = rte_eth_dev_configure(port_id, port_cfg->n_rxq, | ||
| port_cfg->n_txq, &port_cfg->port_conf); | ||
| PROX_PANIC(ret < 0, "\t\t\trte_eth_dev_configure() failed on port %u: %s (%d)\n", port_id, strerror(-ret), ret); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ | |
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
| */ | ||
|
|
||
| #define __USE_GNU | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? |
||
| #include <pthread.h> | ||
| #include <rte_cycles.h> | ||
| #include <rte_table_hash.h> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm.