Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/i40e_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -14849,11 +14849,12 @@ static int i40e_xdp_setup(struct i40e_vsi *vsi, struct bpf_prog *prog,

if (old_prog)
bpf_prog_put(old_prog);
#ifdef HAVE_AF_XDP_ZC_SUPPORT

/* Kick start the NAPI context if there is an AF_XDP socket open
* on that queue id. This so that receiving will start.
*/
if (need_reset && prog) {
#ifdef HAVE_AF_XDP_ZC_SUPPORT
for (i = 0; i < vsi->num_queue_pairs; i++)
Comment on lines 14853 to 14858
Copy link

@imcom imcom Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* Kick start the NAPI context if there is an AF_XDP socket open
* on that queue id. This so that receiving will start.
*/
if (need_reset && prog) {
#ifdef HAVE_AF_XDP_ZC_SUPPORT
for (i = 0; i < vsi->num_queue_pairs; i++)
if (need_reset && prog) {
#ifdef HAVE_AF_XDP_ZC_SUPPORT
/* Kick start the NAPI context if there is an AF_XDP socket open
* on that queue id. This so that receiving will start.
*/
for (i = 0; i < vsi->num_queue_pairs; i++)

#ifdef HAVE_NETDEV_BPF_XSK_POOL
if (vsi->xdp_rings[i]->xsk_pool)
Expand All @@ -14866,9 +14867,9 @@ static int i40e_xdp_setup(struct i40e_vsi *vsi, struct bpf_prog *prog,
#else
(void)i40e_xsk_async_xmit(vsi->netdev, i);
#endif /* HAVE_NDO_XSK_WAKEUP */
#endif /* HAVE_AF_XDP_ZC_SUPPORT */
xdp_features_set_redirect_target(vsi->netdev, false);
}
#endif /* HAVE_AF_XDP_ZC_SUPPORT */

return 0;
}
Expand Down