/*
 * Copyright (c) 2016 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef included_vnet_flow_flow_h
#define included_vnet_flow_flow_h

#include <vppinfra/clib.h>
#include <vppinfra/pcap.h>
#include <vnet/vnet.h>
#include <vnet/l3_types.h>
#include <vnet/ip/ip4_packet.h>
#include <vnet/ip/ip6_packet.h>
#include <vnet/ethernet/packet.h>

#define foreach_flow_type \
  /* l2 flow*/ \
  _(ETHERNET, ethernet, "ethernet") \
  /* l3 IP flow */ \
  _(IP4, ip4, "ipv4") \
  _(IP6, ip6, "ipv6") \
  /* IP tunnel flow */ \
  _(IP4_L2TPV3OIP, ip4_l2tpv3oip, "ipv4-l2tpv3oip") \
  _(IP4_IPSEC_ESP, ip4_ipsec_esp, "ipv4-ipsec-esp") \
  _(IP4_IPSEC_AH, ip4_ipsec_ah, "ipv4-ipsec-ah") \
  /* l4 flow*/ \
  _(IP4_N_TUPLE, ip4_n_tuple, "ipv4-n-tuple") \
  _(IP6_N_TUPLE, ip6_n_tuple, "ipv6-n-tuple") \
  _(IP4_N_TUPLE_TAGGED, ip4_n_tuple_tagged, "ipv4-n-tuple-tagged") \
  _(IP6_N_TUPLE_TAGGED, ip6_n_tuple_tagged, "ipv6-n-tuple-tagged") \
  /* L4 tunnel flow*/ \
  _(IP4_VXLAN, ip4_vxlan, "ipv4-vxlan") \
  _(IP6_VXLAN, ip6_vxlan, "ipv6-vxlan") \
  _(IP4_GTPC, ip4_gtpc, "ipv4-gtpc") \
  _(IP4_GTPU, ip4_gtpu, "ipv4-gtpu")

#define foreach_flow_entry_ethernet \
  _fe(ethernet_header_t, eth_hdr)

#define foreach_flow_entry_ip4 \
  _fe(ip4_address_and_mask_t, src_addr) \
  _fe(ip4_address_and_mask_t, dst_addr) \
  _fe(ip_prot_and_mask_t, protocol)

#define foreach_flow_entry_ip6 \
  _fe(ip6_address_and_mask_t, src_addr) \
  _fe(ip6_address_and_mask_t, dst_addr) \
  _fe(ip_prot_and_mask_t, protocol)

#define foreach_flow_entry_ip4_l2tpv3oip \
  foreach_flow_entry_ip4 \
  _fe(u32, session_id)

#define foreach_flow_entry_ip4_ipsec_esp \
  foreach_flow_entry_ip4 \
  _fe(u32, spi)

#define foreach_flow_entry_ip4_ipsec_ah \
  foreach_flow_entry_ip4 \
  _fe(u32, spi)

#define foreach_flow_entry_ip4_n_tuple \
  foreach_flow_entry_ip4 \
  _fe(ip_port_and_mask_t, src_port) \
  _fe(ip_port_and_mask_t, dst_port)

#define foreach_flow_entry_ip6_n_tuple \
  foreach_flow_entry_ip6 \
  _fe(ip_port_and_mask_t, src_port) \
  _fe(ip_port_and_mask_t, dst_port)

#define foreach_flow_entry_ip4_n_tuple_tagged \
  foreach_flow_entry_ip4 \
  _fe(ip_port_and_mask_t, src_port) \
  _fe(ip_port_and_mask_t, dst_port)

#define foreach_flow_entry_ip6_n_tuple_tagged \
  foreach_flow_entry_ip6 \
  _fe(ip_port_and_mask_t, src_port) \
  _fe(ip_port_and_mask_t, dst_port)

#define foreach_flow_entry_ip4_vxlan                                          \
  foreach_flow_entry_ip4_n_tuple _fe (u32, vni)

#define foreach_flow_entry_ip6_vxlan                                          \
  foreach_flow_entry_ip6_n_tuple _fe (u32, vni)

#define foreach_flow_entry_ip4_gtpc \
  foreach_flow_entry_ip4_n_tuple \
  _fe(u32, teid)

#define foreach_flow_entry_ip4_gtpu \
  foreach_flow_entry_ip4_n_tuple \
  _fe(u32, teid)

#define foreach_flow_action \
  _(0, COUNT, "count") \
  _(1, MARK, "mark") \
  _(2, BUFFER_ADVANCE, "buffer-advance") \
  _(3, REDIRECT_TO_NODE, "redirect-to-node") \
  _(4, REDIRECT_TO_QUEUE, "redirect-to-queue") \
  _(5, RSS, "rss") \
  _(6, DROP, "drop")

typedef enum
{
#define _(v,n,s)  VNET_FLOW_ACTION_##n = (1 << v),
  foreach_flow_action
#undef _
} vnet_flow_action_t;

#define foreach_flow_error \
  _( -1, NOT_SUPPORTED, "not supported")			\
  _( -2, ALREADY_DONE, "already done")				\
  _( -3, ALREADY_EXISTS, "already exists")			\
  _( -4, NO_SUCH_ENTRY, "no such entry")			\
  _( -5, NO_SUCH_INTERFACE, "no such interface")		\
  _( -6, INTERNAL, "internal error")

#define foreach_flow_rss_types                                                \
  _ (0, FRAG_IPV4, "ipv4-frag")                                               \
  _ (1, IPV4_TCP, "ipv4-tcp")                                                 \
  _ (2, IPV4_UDP, "ipv4-udp")                                                 \
  _ (3, IPV4_SCTP, "ipv4-sctp")                                               \
  _ (4, IPV4_OTHER, "ipv4-other")                                             \
  _ (5, IPV4, "ipv4")                                                         \
  _ (6, IPV6_TCP_EX, "ipv6-tcp-ex")                                           \
  _ (7, IPV6_UDP_EX, "ipv6-udp-ex")                                           \
  _ (8, FRAG_IPV6, "ipv6-frag")                                               \
  _ (9, IPV6_TCP, "ipv6-tcp")                                                 \
  _ (10, IPV6_UDP, "ipv6-udp")                                                \
  _ (11, IPV6_SCTP, "ipv6-sctp")                                              \
  _ (12, IPV6_OTHER, "ipv6-other")                                            \
  _ (13, IPV6_EX, "ipv6-ex")                                                  \
  _ (14, IPV6, "ipv6")                                                        \
  _ (15, L2_PAYLOAD, "l2-payload")                                            \
  _ (16, PORT, "port")                                                        \
  _ (17, VXLAN, "vxlan")                                                      \
  _ (18, GENEVE, "geneve")                                                    \
  _ (19, NVGRE, "nvgre")                                                      \
  _ (20, GTPU, "gtpu")                                                        \
  _ (21, ESP, "esp")                                                          \
  _ (60, L4_DST_ONLY, "l4-dst-only")                                          \
  _ (61, L4_SRC_ONLY, "l4-src-only")                                          \
  _ (62, L3_DST_ONLY, "l3-dst-only")                                          \
  _ (63, L3_SRC_ONLY, "l3-src-only")

typedef enum
{
#define _(v, n, s) VNET_FLOW_RSS_TYPES_##n = v,
  foreach_flow_rss_types
#undef _
} vnet_flow_rss_types_t;

#define foreach_rss_function           \
  _(DEFAULT, "default")                \
  _(TOEPLITZ, "toeplitz")              \
  _(SIMPLE_XOR, "simple_xor")          \
  _(SYMMETRIC_TOEPLITZ, "symmetric_toeplitz")

typedef enum
{
  VNET_FLOW_NO_ERROR = 0,
#define _(v,n,s)  VNET_FLOW_ERROR_##n = v,
  foreach_flow_error
#undef _
} vnet_flow_error_t;

typedef struct
{
  u16 port, mask;
} ip_port_and_mask_t;

typedef struct
{
  ip_protocol_t prot;
  /* ip protocol mask should be either 0 or 0xFF */
  /* other values are meanless */
  u8 mask;
} ip_prot_and_mask_t;

typedef enum
{
  VNET_FLOW_TYPE_UNKNOWN,
#define _(a,b,c) VNET_FLOW_TYPE_##a,
  foreach_flow_type
#undef _
    VNET_FLOW_N_TYPES,
} vnet_flow_type_t;

typedef enum
{
#define _(a,b) VNET_RSS_FUNC_##a,
  foreach_rss_function
#undef _
    VNET_RSS_N_TYPES,
} vnet_rss_function_t;

/*
 * Create typedef struct vnet_flow_XXX_t
 */
#define _fe(a, b) a b;
#define _(a,b,c) \
typedef struct { \
int foo; \
foreach_flow_entry_##b \
} vnet_flow_##b##_t;
foreach_flow_type;
#undef _
#undef _fe

/* main flow struct */
typedef struct
{
  /* flow type */
  vnet_flow_type_t type;

  /* flow index */
  u32 index;

  /* bitmap of flow actions (VNET_FLOW_ACTION_*) */
  u32 actions;

  /* flow id for VNET_FLOW_ACTION_MARK */
  u32 mark_flow_id;

  /* node index and next index for VNET_FLOW_ACTION_REDIRECT_TO_NODE */
  u32 redirect_node_index;
  u32 redirect_device_input_next_index;

  /* queue for VNET_FLOW_ACTION_REDIRECT_TO_QUEUE */
  u32 redirect_queue;

  /* buffer offset for VNET_FLOW_ACTION_BUFFER_ADVANCE */
  i32 buffer_advance;

  /* RSS types, including IPv4/IPv6/TCP/UDP... */
  u64 rss_types;

  /* RSS functions, including IPv4/IPv6/TCP/UDP... */
  vnet_rss_function_t rss_fun;

  union
  {
#define _(a,b,c) vnet_flow_##b##_t b;
    foreach_flow_type
#undef _
  };

  /* per-interface private data */
  uword *private_data;
} vnet_flow_t;

int vnet_flow_get_range (vnet_main_t * vnm, char *owner, u32 count,
			 u32 * start);
int vnet_flow_add (vnet_main_t * vnm, vnet_flow_t * flow, u32 * flow_index);
int vnet_flow_enable (vnet_main_t * vnm, u32 flow_index, u32 hw_if_index);
int vnet_flow_disable (vnet_main_t * vnm, u32 flow_index, u32 hw_if_index);
int vnet_flow_del (vnet_main_t * vnm, u32 flow_index);
vnet_flow_t *vnet_get_flow (u32 flow_index);

typedef struct
{
  u32 start;
  u32 count;
  u8 *owner;
} vnet_flow_range_t;

typedef struct
{
  /* pool of device flow entries */
  vnet_flow_t *global_flow_pool;

  /* flow ids allocated */
  u32 flows_used;

  /* vector of flow ranges */
  vnet_flow_range_t *ranges;

  u16 msg_id_base;
} vnet_flow_main_t;

extern vnet_flow_main_t flow_main;

format_function_t format_flow_actions;
format_function_t format_flow_enabled_hw;

#endif /* included_vnet_flow_flow_h */

/*
 * fd.io coding-style-patch-verification: ON
 *
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */
