The contention is only when the ring overflows into the list though.Or we can add plist to a union:This look ok.
struct sk_buff {
union {
struct {
/* These two members must be first. */
struct sk_buff *next;
struct sk_buff *prev;
union {
struct net_device *dev;
/* Some protocols might use this space to store information,
* while device pointer would be NULL.
* UDP receive path is one user.
*/
unsigned long dev_scratch;
};
};
struct rb_node rbnode; /* used in netem & tcp stack */
+ struct plist plist; /* For use with ptr_ring */
};
Yes, it's not clear to me this is really needed for XDP consider the lockFor XDP, we need to embed plist in struct xdp_buff too,Right - that's pretty straightforward, isn't it?
contention it brings.
Thanks