@@ -84,7 +84,7 @@ master_thread_main(void) {
84
84
const uint64_t start_time = rte_get_tsc_cycles ();
85
85
uint64_t total_rx_pkts ;
86
86
87
- RTE_LOG (INFO , APP , "Core %d: Running master thread\n" , rte_lcore_id ());
87
+ RTE_LOG (INFO , APP , "Socket %d, Core %d: Running master thread\n" , rte_socket_id () , rte_lcore_id ());
88
88
89
89
if (stats_destination == ONVM_STATS_WEB ) {
90
90
RTE_LOG (INFO , APP , "ONVM stats can be viewed through the web console\n" );
@@ -130,7 +130,7 @@ master_thread_main(void) {
130
130
rte_pdump_uninit ();
131
131
#endif
132
132
133
- RTE_LOG (INFO , APP , "Core %d: Initiating shutdown sequence\n" , rte_lcore_id ());
133
+ RTE_LOG (INFO , APP , "Socket %d, Core %d: Initiating shutdown sequence\n" , rte_socket_id () , rte_lcore_id ());
134
134
135
135
/* Stop all RX and TX threads */
136
136
worker_keep_running = 0 ;
@@ -140,7 +140,7 @@ master_thread_main(void) {
140
140
if (nfs [i ].status != NF_RUNNING )
141
141
continue ;
142
142
143
- RTE_LOG (INFO , APP , "Core %d: Notifying NF %" PRIu16 " to shut down\n" , rte_lcore_id (), i );
143
+ RTE_LOG (INFO , APP , "Socket %d, Core %d: Notifying NF %" PRIu16 " to shut down\n" , rte_socket_id () , rte_lcore_id (), i );
144
144
onvm_nf_send_msg (i , MSG_STOP , NULL );
145
145
146
146
/* If in shared core mode NFs might be sleeping */
@@ -154,13 +154,13 @@ master_thread_main(void) {
154
154
/* Wait to process all exits */
155
155
for (shutdown_iter_count = 0 ; shutdown_iter_count < MAX_SHUTDOWN_ITERS && num_nfs > 0 ; shutdown_iter_count ++ ) {
156
156
onvm_nf_check_status ();
157
- RTE_LOG (INFO , APP , "Core %d: Waiting for %" PRIu16 " NFs to exit\n" , rte_lcore_id (), num_nfs );
157
+ RTE_LOG (INFO , APP , "Socket %d, Core %d: Waiting for %" PRIu16 " NFs to exit\n" , rte_socket_id () , rte_lcore_id (), num_nfs );
158
158
sleep (sleeptime );
159
159
}
160
160
161
161
if (num_nfs > 0 ) {
162
- RTE_LOG (INFO , APP , "Core %d: Up to %" PRIu16 " NFs may still be running and must be killed manually\n" ,
163
- rte_lcore_id (), num_nfs );
162
+ RTE_LOG (INFO , APP , "Socket %d, Core %d: Up to %" PRIu16 " NFs may still be running and must be killed manually\n" ,
163
+ rte_socket_id (), rte_lcore_id (), num_nfs );
164
164
}
165
165
166
166
/* Clean up the shared memory */
@@ -171,7 +171,7 @@ master_thread_main(void) {
171
171
}
172
172
}
173
173
174
- RTE_LOG (INFO , APP , "Core %d: Master thread done\n" , rte_lcore_id ());
174
+ RTE_LOG (INFO , APP , "Socket %d, Core %d: Master thread done\n" , rte_socket_id () , rte_lcore_id ());
175
175
}
176
176
177
177
/*
@@ -186,7 +186,7 @@ rx_thread_main(void *arg) {
186
186
cur_lcore = rte_lcore_id ();
187
187
188
188
onvm_stats_gen_event_info ("Rx Start" , ONVM_EVENT_WITH_CORE , & cur_lcore );
189
- RTE_LOG (INFO , APP , "Core %d: Running RX thread for RX queue %d\n" , cur_lcore , rx_mgr -> id );
189
+ RTE_LOG (INFO , APP , "Socket %d, Core %d: Running RX thread for RX queue %d\n" , rte_socket_id () , cur_lcore , rx_mgr -> id );
190
190
191
191
for (; worker_keep_running ;) {
192
192
/* Read ports */
@@ -206,7 +206,7 @@ rx_thread_main(void *arg) {
206
206
}
207
207
}
208
208
209
- RTE_LOG (INFO , APP , "Core %d: RX thread done\n" , rte_lcore_id ());
209
+ RTE_LOG (INFO , APP , "Socket %d, Core %d: RX thread done\n" , rte_socket_id () , rte_lcore_id ());
210
210
return 0 ;
211
211
}
212
212
@@ -220,10 +220,10 @@ tx_thread_main(void *arg) {
220
220
221
221
onvm_stats_gen_event_info ("Tx Start" , ONVM_EVENT_WITH_CORE , & cur_lcore );
222
222
if (tx_mgr -> tx_thread_info -> first_nf == tx_mgr -> tx_thread_info -> last_nf - 1 ) {
223
- RTE_LOG (INFO , APP , "Core %d: Running TX thread for NF %d\n" , cur_lcore ,
223
+ RTE_LOG (INFO , APP , "Socket %d, Core %d: Running TX thread for NF %d\n" , rte_socket_id () , cur_lcore ,
224
224
tx_mgr -> tx_thread_info -> first_nf );
225
225
} else if (tx_mgr -> tx_thread_info -> first_nf < tx_mgr -> tx_thread_info -> last_nf ) {
226
- RTE_LOG (INFO , APP , "Core %d: Running TX thread for NFs %d to %d\n" , cur_lcore ,
226
+ RTE_LOG (INFO , APP , "Socket %d, Core %d: Running TX thread for NFs %d to %d\n" , rte_socket_id () , cur_lcore ,
227
227
tx_mgr -> tx_thread_info -> first_nf , tx_mgr -> tx_thread_info -> last_nf - 1 );
228
228
}
229
229
@@ -250,7 +250,7 @@ tx_thread_main(void *arg) {
250
250
onvm_pkt_flush_all_nfs (tx_mgr , NULL );
251
251
}
252
252
253
- RTE_LOG (INFO , APP , "Core %d: TX thread done\n" , rte_lcore_id ());
253
+ RTE_LOG (INFO , APP , "Socket %d, Core %d: TX thread done\n" , rte_socket_id () , rte_lcore_id ());
254
254
return 0 ;
255
255
}
256
256
@@ -276,10 +276,10 @@ wakeup_thread_main(void *arg) {
276
276
struct wakeup_thread_context * wakeup_ctx = (struct wakeup_thread_context * )arg ;
277
277
278
278
if (wakeup_ctx -> first_nf == wakeup_ctx -> last_nf - 1 ) {
279
- RTE_LOG (INFO , APP , "Core %d: Running Wakeup thread for NF %d\n" , rte_lcore_id (),
279
+ RTE_LOG (INFO , APP , "Socket %d, Core %d: Running Wakeup thread for NF %d\n" , rte_socket_id () , rte_lcore_id (),
280
280
wakeup_ctx -> first_nf );
281
281
} else if (wakeup_ctx -> first_nf < wakeup_ctx -> last_nf ) {
282
- RTE_LOG (INFO , APP , "Core %d: Running Wakeup thread for NFs %d to %d\n" , rte_lcore_id (),
282
+ RTE_LOG (INFO , APP , "Socket %d, Core %d: Running Wakeup thread for NFs %d to %d\n" , rte_socket_id () , rte_lcore_id (),
283
283
wakeup_ctx -> first_nf , wakeup_ctx -> last_nf - 1 );
284
284
}
285
285
@@ -379,7 +379,7 @@ main(int argc, char *argv[]) {
379
379
/* Offset cur_lcore to start assigning TX cores */
380
380
cur_lcore += (rx_lcores - 1 );
381
381
382
- RTE_LOG (INFO , APP , "%d cores available in total\n" , rte_lcore_count ());
382
+ RTE_LOG (INFO , APP , "%d Sockets, %d Cores available in total\n" , rte_socket_count () , rte_lcore_count ());
383
383
RTE_LOG (INFO , APP , "%d cores available for handling manager RX queues\n" , rx_lcores );
384
384
RTE_LOG (INFO , APP , "%d cores available for handling TX queues\n" , tx_lcores );
385
385
if (ONVM_NF_SHARE_CORES )
@@ -432,7 +432,7 @@ main(int argc, char *argv[]) {
432
432
tx_mgr [i ]-> tx_thread_info -> last_nf = RTE_MIN ((i + 1 ) * nfs_per_tx + 1 , (unsigned )MAX_NFS );
433
433
cur_lcore = rte_get_next_lcore (cur_lcore , 1 , 1 );
434
434
if (rte_eal_remote_launch (tx_thread_main , (void * )tx_mgr [i ], cur_lcore ) == - EBUSY ) {
435
- RTE_LOG (ERR , APP , "Core %d is already busy, can't use for nf %d TX\n" , cur_lcore ,
435
+ RTE_LOG (ERR , APP , "Socket %d, Core %d is already busy, can't use for nf %d TX\n" , rte_socket_id () , cur_lcore ,
436
436
tx_mgr [i ]-> tx_thread_info -> first_nf );
437
437
onvm_main_free (tx_lcores ,rx_lcores , tx_mgr , rx_mgr , wakeup_ctx );
438
438
return -1 ;
@@ -454,7 +454,7 @@ main(int argc, char *argv[]) {
454
454
}
455
455
cur_lcore = rte_get_next_lcore (cur_lcore , 1 , 1 );
456
456
if (rte_eal_remote_launch (rx_thread_main , (void * )rx_mgr [i ], cur_lcore ) == - EBUSY ) {
457
- RTE_LOG (ERR , APP , "Core %d is already busy, can't use for RX queue id %d\n" , cur_lcore ,
457
+ RTE_LOG (ERR , APP , "Socket %d, Core %d is already busy, can't use for RX queue id %d\n" , rte_socket_id () , cur_lcore ,
458
458
rx_mgr [i ]-> id );
459
459
onvm_main_free (tx_lcores ,rx_lcores , tx_mgr , rx_mgr , wakeup_ctx );
460
460
return -1 ;
@@ -472,8 +472,8 @@ main(int argc, char *argv[]) {
472
472
wakeup_ctx [i ]-> last_nf = RTE_MIN ((i + 1 ) * nfs_per_wakeup_thread + 1 , (unsigned )MAX_NFS );
473
473
cur_lcore = rte_get_next_lcore (cur_lcore , 1 , 1 );
474
474
if (rte_eal_remote_launch (wakeup_thread_main , (void * )wakeup_ctx [i ], cur_lcore ) == - EBUSY ) {
475
- RTE_LOG (ERR , APP , "Core %d is already busy, can't use for nf %d wakeup thread\n" ,
476
- cur_lcore , wakeup_ctx [i ]-> first_nf );
475
+ RTE_LOG (ERR , APP , "Socket %d, Core %d is already busy, can't use for nf %d wakeup thread\n" ,
476
+ rte_socket_id (), cur_lcore , wakeup_ctx [i ]-> first_nf );
477
477
onvm_main_free (tx_lcores , rx_lcores , tx_mgr , rx_mgr , wakeup_ctx );
478
478
return -1 ;
479
479
}
0 commit comments