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_fill()

Factor out handling a single nv from fbnic_fill() to make
it reusable for queue ops.

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

authored by

Jakub Kicinski and committed by
Paolo Abeni
709da681 8a47d940

+18 -15
+18 -15
drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
··· 2348 2348 fbnic_nv_flush(fbn->napi[i]); 2349 2349 } 2350 2350 2351 + static void fbnic_nv_fill(struct fbnic_napi_vector *nv) 2352 + { 2353 + int j, t; 2354 + 2355 + /* Configure NAPI mapping and populate pages 2356 + * in the BDQ rings to use for Rx 2357 + */ 2358 + for (j = 0, t = nv->txt_count; j < nv->rxt_count; j++, t++) { 2359 + struct fbnic_q_triad *qt = &nv->qt[t]; 2360 + 2361 + /* Populate the header and payload BDQs */ 2362 + fbnic_fill_bdq(&qt->sub0); 2363 + fbnic_fill_bdq(&qt->sub1); 2364 + } 2365 + } 2366 + 2351 2367 void fbnic_fill(struct fbnic_net *fbn) 2352 2368 { 2353 2369 int i; 2354 2370 2355 - for (i = 0; i < fbn->num_napi; i++) { 2356 - struct fbnic_napi_vector *nv = fbn->napi[i]; 2357 - int j, t; 2358 - 2359 - /* Configure NAPI mapping and populate pages 2360 - * in the BDQ rings to use for Rx 2361 - */ 2362 - for (j = 0, t = nv->txt_count; j < nv->rxt_count; j++, t++) { 2363 - struct fbnic_q_triad *qt = &nv->qt[t]; 2364 - 2365 - /* Populate the header and payload BDQs */ 2366 - fbnic_fill_bdq(&qt->sub0); 2367 - fbnic_fill_bdq(&qt->sub1); 2368 - } 2369 - } 2371 + for (i = 0; i < fbn->num_napi; i++) 2372 + fbnic_nv_fill(fbn->napi[i]); 2370 2373 } 2371 2374 2372 2375 static void fbnic_enable_twq0(struct fbnic_ring *twq)