Skip to content

Commit

Permalink
fix formula error in comment
Browse files Browse the repository at this point in the history
Signed-off-by: ZENOTME <st810918843@gmail.com>
  • Loading branch information
ZENOTME authored and tohojo committed Mar 11, 2024
1 parent 3d7c83c commit 7fe0a09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion headers/xdp/xsk.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ XDP_ALWAYS_INLINE __u32 xsk_prod_nb_free(struct xsk_ring_prod *r, __u32 nb)
* that this addition can be avoided in the more frequently
* executed code that computs free_entries in the beginning of
* this function. Without this optimization it whould have been
* free_entries = r->cached_prod - r->cached_cons + r->size.
* free_entries = r->cached_cons - r->cached_prod + r->size
*/
r->cached_cons = __atomic_load_n(r->consumer, __ATOMIC_ACQUIRE);
r->cached_cons += r->size;
Expand Down

0 comments on commit 7fe0a09

Please sign in to comment.