aboutsummaryrefslogtreecommitdiff
path: root/datapath/vport-netdev.c
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2010-11-23 22:08:27 -0800
committerJesse Gross <jesse@nicira.com>2010-12-02 17:10:16 -0800
commitb279fccf5bd8c5addfb8e73b04103405b6a8237e (patch)
tree66c716276007e4a8a456c46f5a0784f74da4118e /datapath/vport-netdev.c
parentf981c8b0da9c8efec309064367e36338518eba15 (diff)
datapath: Constify ops structures.
vport_ops, tunnel_ops, and ethtool_ops should not change at runtime. Therefore, mark them as const to keep them out of the hotpath and to prevent them from getting trampled. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath/vport-netdev.c')
-rw-r--r--datapath/vport-netdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/datapath/vport-netdev.c b/datapath/vport-netdev.c
index c643696f..11421bf7 100644
--- a/datapath/vport-netdev.c
+++ b/datapath/vport-netdev.c
@@ -299,7 +299,7 @@ struct vport *netdev_get_vport(struct net_device *dev)
#endif
}
-struct vport_ops netdev_vport_ops = {
+const struct vport_ops netdev_vport_ops = {
.type = "netdev",
.flags = (VPORT_F_REQUIRED |
(USE_VPORT_STATS ? VPORT_F_GEN_STATS : 0)),