vport.h (09ce069dff607f86dcdeb541d20734a8f42478c5) vport.h (7d5437c709ded4f152cb8b305d17972d6707f20c)
1/*
2 * Copyright (c) 2007-2012 Nicira, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of version 2 of the GNU General Public
6 * License as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but

--- 170 unchanged lines hidden (view full) ---

179 * the result of a hash table lookup. @priv must point to the start of the
180 * private data area.
181 */
182static inline struct vport *vport_from_priv(const void *priv)
183{
184 return (struct vport *)(priv - ALIGN(sizeof(struct vport), VPORT_ALIGN));
185}
186
1/*
2 * Copyright (c) 2007-2012 Nicira, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of version 2 of the GNU General Public
6 * License as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but

--- 170 unchanged lines hidden (view full) ---

179 * the result of a hash table lookup. @priv must point to the start of the
180 * private data area.
181 */
182static inline struct vport *vport_from_priv(const void *priv)
183{
184 return (struct vport *)(priv - ALIGN(sizeof(struct vport), VPORT_ALIGN));
185}
186
187void ovs_vport_receive(struct vport *, struct sk_buff *);
187void ovs_vport_receive(struct vport *, struct sk_buff *,
188 struct ovs_key_ipv4_tunnel *);
188void ovs_vport_record_error(struct vport *, enum vport_err_type err_type);
189
190/* List of statically compiled vport implementations. Don't forget to also
191 * add yours to the list at the top of vport.c. */
192extern const struct vport_ops ovs_netdev_vport_ops;
193extern const struct vport_ops ovs_internal_vport_ops;
194
195static inline void ovs_skb_postpush_rcsum(struct sk_buff *skb,
196 const void *start, unsigned int len)
197{
198 if (skb->ip_summed == CHECKSUM_COMPLETE)
199 skb->csum = csum_add(skb->csum, csum_partial(start, len, 0));
200}
201
202#endif /* vport.h */
189void ovs_vport_record_error(struct vport *, enum vport_err_type err_type);
190
191/* List of statically compiled vport implementations. Don't forget to also
192 * add yours to the list at the top of vport.c. */
193extern const struct vport_ops ovs_netdev_vport_ops;
194extern const struct vport_ops ovs_internal_vport_ops;
195
196static inline void ovs_skb_postpush_rcsum(struct sk_buff *skb,
197 const void *start, unsigned int len)
198{
199 if (skb->ip_summed == CHECKSUM_COMPLETE)
200 skb->csum = csum_add(skb->csum, csum_partial(start, len, 0));
201}
202
203#endif /* vport.h */