xdp: don't make drivers report attachment mode
prog_attached of struct netdev_bpf should have been superseded by simply setting prog_id long time ago, but we kept it around to allow offloading drivers to communicate attachment mode (drv vs hw). Subsequently drivers were also allowed to report back attachment flags (prog_flags), and since nowadays only programs attached will XDP_FLAGS_HW_MODE can get offloaded, we can tell the attachment mode from the flags driver reports. Remove prog_attached member. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
此提交包含在:
@@ -1848,7 +1848,6 @@ static int nicvf_xdp(struct net_device *netdev, struct netdev_bpf *xdp)
|
||||
case XDP_SETUP_PROG:
|
||||
return nicvf_xdp_setup(nic, xdp->prog);
|
||||
case XDP_QUERY_PROG:
|
||||
xdp->prog_attached = !!nic->xdp_prog;
|
||||
xdp->prog_id = nic->xdp_prog ? nic->xdp_prog->aux->id : 0;
|
||||
return 0;
|
||||
default:
|
||||
|
新增問題並參考
封鎖使用者