[v13 2/3] net/af_xdp: fix multi interface support for K8s

Maryam Tahhan mtahhan at redhat.com
Mon Apr 8 15:12:00 CEST 2024


On 08/04/2024 11:46, Loftus, Ciara wrote:
>> +#ifdef ETH_AF_XDP_UPDATE_XSKMAP
>> +static __rte_always_inline int
>> +update_xskmap(struct xsk_socket *xsk, int map_fd, int xsk_queue_idx
>> __rte_unused)
>> +{
>> +	return xsk_socket__update_xskmap(xsk, map_fd);
>> +}
>> +#else
>> +static __rte_always_inline int
>> +update_xskmap(struct xsk_socket *xsk, int map_fd, int xsk_queue_idx)
>> +{
>> +	int fd = xsk_socket__fd(xsk);
> 'fd' computed here is not used in this function so generates an unused variable warning.

Just for clarification on the fix - the 3rd argument to the 
bpf_map_update_elem() should be that xsk fd. So I will update the code 
to reflect this:

` return bpf_map_update_elem(map_fd, &xsk_queue_idx, &fd, 0);`


Thanks again and great catch.

BR
Maryam

>> +	return bpf_map_update_elem(map_fd, &xsk_queue_idx, &map_fd,
>> 0);
>> +}
>> +#endif
>> +




More information about the stable mailing list