Thread (17 messages) flat view 17 messages, 3 authors, 2017-11-01

Re: [RFC 01/12] net: bpf: rename ndo_xdp to ndo_bpf

From: Jakub Kicinski <hidden>
Date: 2017-11-01 16:00:35

On Wed, 1 Nov 2017 08:41:42 +0100, Jesper Dangaard Brouer wrote:
quoted
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index fc059f193e7d..edf984406ba0 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -2115,7 +2115,7 @@ static const struct net_device_ops virtnet_netdev = {
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	.ndo_poll_controller = virtnet_netpoll,
 #endif
-	.ndo_xdp		= virtnet_xdp,
+	.ndo_bpf		= virtnet_xdp,
 	.ndo_xdp_xmit		= virtnet_xdp_xmit,
 	.ndo_xdp_flush		= virtnet_xdp_flush,
 	.ndo_features_check	= passthru_features_check,  
Sorry, but I don't understand why this rename is needed.

Are you going to add another type than BPF_PROG_TYPE_XDP?
I'm adding commands which can be used for cls_bpf programs as well:

+	/* BPF program for offload callbacks, invoked at program load time. */
+	BPF_OFFLOAD_VERIFIER_PREP,
+	BPF_OFFLOAD_TRANSLATE,
+	BPF_OFFLOAD_DESTROY,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help