History

xdp: Add xdp_txq_info to xdp_buff

Add xdp_txq_info as the Tx counterpart to xdp_rxq_info. At the moment only the device is added. Other fields (queue_index) can be added as use cases arise. >From a UAPI perspective, add egress_ifindex to xdp context for bpf programs to see the Tx device. Update the verifier to only allow accesses to egress_ifindex by XDP programs with BPF_XDP_DEVMAP expected attach type.

David Ahern committed 6 years ago

Commit 64b59021 parent fbee97f5 files · +29 −0Browse files

Showing the changes to include/uapi/linux (1 of 5 files). Show all

Unified · Split

include/uapi/linux/bpf.h+2−0
@@ -3707,6 +3707,8 @@ struct xdp_md { · 3706 unmodified lines
3707 /* Below access go through struct xdp_rxq_info */3707 /* Below access go through struct xdp_rxq_info */
3708 __u32 ingress_ifindex; /* rxq->dev->ifindex */3708 __u32 ingress_ifindex; /* rxq->dev->ifindex */
3709 __u32 rx_queue_index; /* rxq->queue_index */3709 __u32 rx_queue_index; /* rxq->queue_index */
3710
3711 __u32 egress_ifindex; /* txq->dev->ifindex */
3710};3712};
3711 3713
3712enum sk_action {3714enum sk_action {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t