Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

eth: fbnic: split fbnic_enable()

Factor out handling a single nv from fbnic_enable() to make
it reusable for queue ops. Use a __ prefix for the factored
out code. The real fbnic_nv_enable() which will include
fbnic_wrfl() will be added with the qops, to avoid unused
function warnings.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20250901211214.1027927-9-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Jakub Kicinski and committed by
Paolo Abeni
8a47d940 be2be74a

+25 -22
+25 -22
drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
··· 2584 2584 fbnic_ring_wr32(rcq, FBNIC_QUEUE_RCQ_CTL, FBNIC_QUEUE_RCQ_CTL_ENABLE); 2585 2585 } 2586 2586 2587 + static void __fbnic_nv_enable(struct fbnic_napi_vector *nv) 2588 + { 2589 + int j, t; 2590 + 2591 + /* Setup Tx Queue Triads */ 2592 + for (t = 0; t < nv->txt_count; t++) { 2593 + struct fbnic_q_triad *qt = &nv->qt[t]; 2594 + 2595 + fbnic_enable_twq0(&qt->sub0); 2596 + fbnic_enable_twq1(&qt->sub1); 2597 + fbnic_enable_tcq(nv, &qt->cmpl); 2598 + } 2599 + 2600 + /* Setup Rx Queue Triads */ 2601 + for (j = 0; j < nv->rxt_count; j++, t++) { 2602 + struct fbnic_q_triad *qt = &nv->qt[t]; 2603 + 2604 + fbnic_enable_bdq(&qt->sub0, &qt->sub1); 2605 + fbnic_config_drop_mode_rcq(nv, &qt->cmpl); 2606 + fbnic_enable_rcq(nv, &qt->cmpl); 2607 + } 2608 + } 2609 + 2587 2610 void fbnic_enable(struct fbnic_net *fbn) 2588 2611 { 2589 2612 struct fbnic_dev *fbd = fbn->fbd; 2590 2613 int i; 2591 2614 2592 - for (i = 0; i < fbn->num_napi; i++) { 2593 - struct fbnic_napi_vector *nv = fbn->napi[i]; 2594 - int j, t; 2595 - 2596 - /* Setup Tx Queue Triads */ 2597 - for (t = 0; t < nv->txt_count; t++) { 2598 - struct fbnic_q_triad *qt = &nv->qt[t]; 2599 - 2600 - fbnic_enable_twq0(&qt->sub0); 2601 - fbnic_enable_twq1(&qt->sub1); 2602 - fbnic_enable_tcq(nv, &qt->cmpl); 2603 - } 2604 - 2605 - /* Setup Rx Queue Triads */ 2606 - for (j = 0; j < nv->rxt_count; j++, t++) { 2607 - struct fbnic_q_triad *qt = &nv->qt[t]; 2608 - 2609 - fbnic_enable_bdq(&qt->sub0, &qt->sub1); 2610 - fbnic_config_drop_mode_rcq(nv, &qt->cmpl); 2611 - fbnic_enable_rcq(nv, &qt->cmpl); 2612 - } 2613 - } 2615 + for (i = 0; i < fbn->num_napi; i++) 2616 + __fbnic_nv_enable(fbn->napi[i]); 2614 2617 2615 2618 fbnic_wrfl(fbd); 2616 2619 }