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.
Showing the changes to include/uapi/linux (1 of 5 files). Show all
Unified · Split
| @@ -3707,6 +3707,8 @@ struct xdp_md { · 3706 unmodified lines | ||
| 3707 | 3707 | /* Below access go through struct xdp_rxq_info */ |
| 3708 | 3708 | __u32 ingress_ifindex; /* rxq->dev->ifindex */ |
| 3709 | 3709 | __u32 rx_queue_index; /* rxq->queue_index */ |
| 3710 | + | |
| 3711 | + __u32 egress_ifindex; /* txq->dev->ifindex */ | |
| 3710 | 3712 | }; |
| 3711 | 3713 | |
| 3712 | 3714 | enum sk_action { |