-static void gre_build_header(const struct vport *vport,
- const struct tnl_mutable_config *mutable,
- void *header)
-{
- struct gre_base_hdr *greh = header;
- __be32 *options = (__be32 *)(greh + 1);
-
- greh->protocol = htons(ETH_P_TEB);
- greh->flags = 0;
-
- if (mutable->flags & TNL_F_CSUM) {
- greh->flags |= GRE_CSUM;
- *options = 0;
- options++;
- }
-
- if (mutable->flags & TNL_F_OUT_KEY_ACTION) {
- greh->flags |= GRE_KEY;
- if (mutable->key.tunnel_type & TNL_T_PROTO_GRE64)
- greh->flags |= GRE_SEQ;
-
- } else if (mutable->out_key) {
- greh->flags |= GRE_KEY;
- *options = be64_get_low32(mutable->out_key);
- if (mutable->key.tunnel_type & TNL_T_PROTO_GRE64) {
- options++;
- *options = be64_get_high32(mutable->out_key);
- greh->flags |= GRE_SEQ;
- }
- }
-}
-
-static struct sk_buff *gre_update_header(const struct vport *vport,