X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Fdatapath.h;h=b5200848b10b39acc51bd34f8474a4f6dd817f10;hb=1d87357a1322c2faa290452c08c7f794c0be848b;hp=102b27f31f1af633d65bddd0333356297fe59425;hpb=064af42167bf4fc9aaea2702d80ce08074b889c0;p=openvswitch diff --git a/datapath/datapath.h b/datapath/datapath.h index 102b27f3..b5200848 100644 --- a/datapath/datapath.h +++ b/datapath/datapath.h @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2009 Nicira Networks. + * Distributed under the terms of the GNU GPL version 2. + * + * Significant portions of this file may be copied from parts of the Linux + * kernel, by Linus Torvalds and others. + */ + /* Interface exported by openvswitch_mod. */ #ifndef DATAPATH_H @@ -10,10 +18,9 @@ #include #include #include +#include #include "flow.h" -#include "brc_sysfs.h" - -struct sk_buff; +#include "dp_sysfs.h" /* Mask for the priority bits in a vlan header. If we ever merge upstream * then this should go into include/linux/if_vlan.h. */ @@ -58,9 +65,7 @@ struct datapath { struct mutex mutex; int dp_idx; -#ifdef SUPPORT_SYSFS struct kobject ifobj; -#endif int drop_frags; @@ -88,18 +93,13 @@ struct net_bridge_port { u16 port_no; struct datapath *dp; struct net_device *dev; -#ifdef SUPPORT_SYSFS struct kobject kobj; -#endif + char linkname[IFNAMSIZ]; struct list_head node; /* Element in datapath.ports. */ }; extern struct notifier_block dp_device_notifier; extern int (*dp_ioctl_hook)(struct net_device *dev, struct ifreq *rq, int cmd); -extern int (*dp_add_dp_hook)(struct datapath *dp); -extern int (*dp_del_dp_hook)(struct datapath *dp); -extern int (*dp_add_if_hook)(struct net_bridge_port *p); -extern int (*dp_del_if_hook)(struct net_bridge_port *p); /* Flow table. */ struct dp_table *dp_table_create(unsigned int n_buckets); @@ -114,11 +114,9 @@ int dp_table_foreach(struct dp_table *table, void *aux); void dp_process_received_packet(struct sk_buff *, struct net_bridge_port *); -int dp_del_port(struct net_bridge_port *, struct list_head *); -int dp_output_port(struct datapath *, struct sk_buff *, int out_port, - int ignore_no_fwd); +int dp_del_port(struct net_bridge_port *); int dp_output_control(struct datapath *, struct sk_buff *, int, u32 arg); -void dp_set_origin(struct datapath *, u16, struct sk_buff *); +int dp_min_mtu(const struct datapath *dp); struct datapath *get_dp(int dp_idx); @@ -136,4 +134,6 @@ static inline int skb_checksum_setup(struct sk_buff *skb) } #endif +int vswitch_skb_checksum_setup(struct sk_buff *skb); + #endif /* datapath.h */