On 7/7/21 3:16 PM, Zvi Effron wrote:
Support specifying the ingress_ifindex and rx_queue_index of xdp_md contexts for BPF_PROG_TEST_RUN. The intended use case is to allow testing XDP programs that make decisions based on the ingress interface or RX queue. If ingress_ifindex is specified, look up the device by the provided index in the current namespace and use its xdp_rxq for the xdp_buff. If the rx_queue_index is out of range, or is non-zero when the ingress_ifindex is 0, return -EINVAL. Co-developed-by: Cody Haas <chaas@xxxxxxxxxxxxx> Signed-off-by: Cody Haas <chaas@xxxxxxxxxxxxx> Co-developed-by: Lisa Watanabe <lwatanabe@xxxxxxxxxxxxx> Signed-off-by: Lisa Watanabe <lwatanabe@xxxxxxxxxxxxx> Signed-off-by: Zvi Effron <zeffron@xxxxxxxxxxxxx>
I double checked reference counting for `device` and it seems correct to me, so Acked-by: Yonghong Song <yhs@xxxxxx>