X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Fvport-capwap.c;h=191156b8055c9cb7191aa155e0dda5cd76d39ce2;hb=77912ae717298cb06544f1bebd9701d0b3c2f2f0;hp=3fb4ffb36f750296824b9051ceb048def858c6d4;hpb=085a41cb35dc1d396cf2d5fd833696072d84c040;p=openvswitch diff --git a/datapath/vport-capwap.c b/datapath/vport-capwap.c index 3fb4ffb3..191156b8 100644 --- a/datapath/vport-capwap.c +++ b/datapath/vport-capwap.c @@ -32,7 +32,7 @@ #define CAPWAP_FRAG_TIMEOUT (30 * HZ) #define CAPWAP_FRAG_MAX_MEM (256 * 1024) -#define CAPWAP_FRAG_PRUNE_MEM (192 *1024) +#define CAPWAP_FRAG_PRUNE_MEM (192 * 1024) #define CAPWAP_FRAG_SECRET_INTERVAL (10 * 60 * HZ) /* @@ -100,7 +100,7 @@ struct capwaphdr_wsi_key { /* Flag indicating a 64bit key is stored in WSI data field */ #define CAPWAP_WSI_F_KEY64 0x80 -static inline struct capwaphdr *capwap_hdr(const struct sk_buff *skb) +static struct capwaphdr *capwap_hdr(const struct sk_buff *skb) { return (struct capwaphdr *)(udp_hdr(skb) + 1); } @@ -170,7 +170,7 @@ static int capwap_hdr_len(const struct tnl_mutable_config *mutable) if (mutable->flags & TNL_F_CSUM) return -EINVAL; - /* if keys are specified, then add WSI field */ + /* if keys are specified, then add WSI field */ if (mutable->out_key || (mutable->flags & TNL_F_OUT_KEY_ACTION)) { size += sizeof(struct capwaphdr_wsi) + sizeof(struct capwaphdr_wsi_key); @@ -282,8 +282,7 @@ static int process_capwap_wsi(struct sk_buff *skb, __be64 *key) return 0; } -static inline struct sk_buff *process_capwap_proto(struct sk_buff *skb, - __be64 *key) +static struct sk_buff *process_capwap_proto(struct sk_buff *skb, __be64 *key) { struct capwaphdr *cwh = capwap_hdr(skb); int hdr_len = sizeof(struct udphdr); @@ -507,18 +506,18 @@ static struct sk_buff *fragment(struct sk_buff *skb, const struct vport *vport, remaining -= frag_size; } - goto out; + consume_skb(skb); + return result; error: tnl_free_linked_skbs(result); -out: kfree_skb(skb); - return result; + return NULL; } /* All of the following functions relate to fragmentation reassembly. */ -static inline struct frag_queue *ifq_cast(struct inet_frag_queue *ifq) +static struct frag_queue *ifq_cast(struct inet_frag_queue *ifq) { return container_of(ifq, struct frag_queue, ifq); }