/*
 * Copyright (c) 2015 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.
 */
/*
 * rewrite.h: packet rewrite
 *
 * Copyright (c) 2008 Eliot Dresselhaus
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

#ifndef included_vnet_rewrite_h
#define included_vnet_rewrite_h

#include <vlib/vlib.h>
#include <vnet/l3_types.h>

/* Consider using vector types for speed? */
typedef uword vnet_rewrite_data_t;

typedef CLIB_PACKED (struct {
  /* Interface to mark re-written packets with. */
  u32 sw_if_index;

  /* Packet processing node where rewrite happens. */
  u32 node_index;

  /* Next node to feed after packet rewrite is done. */
  u16 next_index;

  /* Number of bytes in rewrite data. */
  u16 data_bytes;

  /* Max packet size layer 3 (MTU) for output interface.
     Used for MTU check after packet rewrite. */
  u16 max_l3_packet_bytes;

  /* Rewrite string starting at end and going backwards. */
  u8 data[0];
}) vnet_rewrite_header_t;

/*
  Helper macro for declaring rewrite string w/ given max-size.

  Typical usage:
    typedef struct {
      // User data.
      int a, b;

      // Total adjacency is 64 bytes.
      vnet_rewrite_declare(64 - 2*sizeof(int)) rw;
    } my_adjacency_t;
*/
#define vnet_declare_rewrite(total_bytes)				\
struct {								\
  vnet_rewrite_header_t rewrite_header;  			        \
									\
  u8 rewrite_data[(total_bytes) - sizeof (vnet_rewrite_header_t)];	\
}

always_inline void
vnet_rewrite_set_data_internal (vnet_rewrite_header_t * rw,
				int max_size,
				void * data,
				int data_bytes)
{
  /* Sanity check values carefully for this memset operation*/
  ASSERT ((max_size > 0) && (max_size < VLIB_BUFFER_PRE_DATA_SIZE));
  ASSERT ((data_bytes >= 0) && (data_bytes < max_size));

  rw->data_bytes = data_bytes;
  clib_memcpy (rw->data + max_size - data_bytes, data, data_bytes);
  memset (rw->data, 0xfe, max_size - data_bytes);
}

#define vnet_rewrite_set_data(rw,data,data_bytes)		\
  vnet_rewrite_set_data_internal (&((rw).rewrite_header),	\
				  sizeof ((rw).rewrite_data),	\
				  (data),			\
				  (data_bytes))

always_inline void *
vnet_rewrite_get_data_internal (vnet_rewrite_header_t * rw, int max_size)
{
  ASSERT (rw->data_bytes <= max_size);
  return rw->data + max_size - rw->data_bytes;
}

#define vnet_rewrite_get_data(rw) \
  vnet_rewrite_get_data_internal (&((rw).rewrite_header), sizeof ((rw).rewrite_data))

always_inline void
vnet_rewrite_copy_one (vnet_rewrite_data_t * p0, vnet_rewrite_data_t * rw0, int i)
{
  p0[-i] = rw0[-i];
}

void vnet_rewrite_copy_slow_path (vnet_rewrite_data_t * p0,
				  vnet_rewrite_data_t * rw0,
				  word n_left,
				  uword most_likely_size);

typedef CLIB_PACKED (struct {
  u64 a;
  u32 b;
  u16 c;
}) eh_copy_t;

always_inline void
_vnet_rewrite_one_header (vnet_rewrite_header_t * h0,
			  void * packet0,
			  int max_size,
			  int most_likely_size)
{
  vnet_rewrite_data_t * p0 = packet0;
  vnet_rewrite_data_t * rw0 = (vnet_rewrite_data_t *) (h0->data + max_size);
  word n_left0;

  /* 0xfefe => poisoned adjacency => crash */
  ASSERT (h0->data_bytes != 0xfefe);

  if (PREDICT_TRUE (h0->data_bytes == sizeof (eh_copy_t)))
    {
      eh_copy_t * s, * d;
      s = (eh_copy_t *)(h0->data + max_size - sizeof (eh_copy_t));
      d = (eh_copy_t *)(((u8 *)packet0) - sizeof (eh_copy_t));
      clib_memcpy (d, s, sizeof (eh_copy_t));
      return;
    }
      

#define _(i)								\
  do {									\
    if (most_likely_size > ((i)-1)*sizeof (vnet_rewrite_data_t))	\
      vnet_rewrite_copy_one (p0, rw0, (i));				\
  } while (0)

  _ (4);
  _ (3);
  _ (2);
  _ (1);

#undef _
    
  n_left0 = (int)
      (((int) h0->data_bytes - most_likely_size) + (sizeof(rw0[0])-1))
      / (int) sizeof (rw0[0]);
  if (PREDICT_FALSE (n_left0 > 0))
    vnet_rewrite_copy_slow_path (p0, rw0, n_left0, most_likely_size);
}

always_inline void
_vnet_rewrite_two_headers (vnet_rewrite_header_t * h0,
			   vnet_rewrite_header_t * h1,
			   void * packet0,
			   void * packet1,
			   int max_size,
			   int most_likely_size)
{
  vnet_rewrite_data_t * p0 = packet0;
  vnet_rewrite_data_t * p1 = packet1;
  vnet_rewrite_data_t * rw0 = (vnet_rewrite_data_t *) (h0->data + max_size);
  vnet_rewrite_data_t * rw1 = (vnet_rewrite_data_t *) (h1->data + max_size);
  word n_left0, n_left1;
  int slow_path;

  /* 0xfefe => poisoned adjacency => crash */
  ASSERT (h0->data_bytes != 0xfefe);
  ASSERT (h1->data_bytes != 0xfefe);

  /* Arithmetic calculation: bytes0 == bytes1 == 14 */
  slow_path = h0->data_bytes ^ h1->data_bytes;
  slow_path += h0->data_bytes ^ sizeof (eh_copy_t);

  if (PREDICT_TRUE (slow_path == 0))
    {
      eh_copy_t * s0, * d0, * s1, * d1;
      s0 = (eh_copy_t *)(h0->data + max_size - sizeof (eh_copy_t));
      d0 = (eh_copy_t *)(((u8 *)packet0) - sizeof (eh_copy_t));
      clib_memcpy (d0, s0, sizeof (eh_copy_t));
      s1 = (eh_copy_t *)(h1->data + max_size - sizeof (eh_copy_t));
      d1 = (eh_copy_t *)(((u8 *)packet1) - sizeof (eh_copy_t));
      clib_memcpy (d1, s1, sizeof (eh_copy_t));
      return;
    }

#define _(i)								\
  do {									\
    if (most_likely_size > ((i)-1)*sizeof (vnet_rewrite_data_t))	\
      {									\
	vnet_rewrite_copy_one (p0, rw0, (i));				\
	vnet_rewrite_copy_one (p1, rw1, (i));				\
      }									\
  } while (0)

  _ (4);
  _ (3);
  _ (2);
  _ (1);

#undef _
    
  n_left0 = (int)
      (((int) h0->data_bytes - most_likely_size) + (sizeof(rw0[0])-1))
      / (int) sizeof (rw0[0]);
  n_left1 = (int)
      (((int) h1->data_bytes - most_likely_size) + (sizeof(rw1[0])-1))
      / (int) sizeof (rw1[0]);

  if (PREDICT_FALSE (n_left0 > 0 || n_left1 > 0))
    {
      vnet_rewrite_copy_slow_path (p0, rw0, n_left0, most_likely_size);
      vnet_rewrite_copy_slow_path (p1, rw1, n_left1, most_likely_size);
    }
}

#define vnet_rewrite_one_header(rw0,p0,most_likely_size)	\
  _vnet_rewrite_one_header (&((rw0).rewrite_header), (p0),	\
			    sizeof ((rw0).rewrite_data),	\
			    (most_likely_size))

#define vnet_rewrite_two_headers(rw0,rw1,p0,p1,most_likely_size)	\
  _vnet_rewrite_two_headers (&((rw0).rewrite_header), &((rw1).rewrite_header), \
			     (p0), (p1),				\
			     sizeof ((rw0).rewrite_data),		\
			     (most_likely_size))

#define VNET_REWRITE_FOR_SW_INTERFACE_ADDRESS_BROADCAST ((void *) 0)
void vnet_rewrite_for_sw_interface (struct vnet_main_t * vnm,
				    vnet_l3_packet_type_t packet_type,
				    u32 sw_if_index,
				    u32 node_index,
				    void * dst_address,
				    vnet_rewrite_header_t * rw,
				    u32 max_rewrite_bytes);

void vnet_rewrite_for_tunnel (struct vnet_main_t * vnm,
                              u32 tx_sw_if_index,
                              u32 rewrite_node_index,
                              u32 post_rewrite_node_index,
                              vnet_rewrite_header_t * rw,
                              u8 *rewrite_data,
                              u32 rewrite_length);

/* Parser for unformat header & rewrite string. */
unformat_function_t unformat_vnet_rewrite;

format_function_t format_vnet_rewrite;
format_function_t format_vnet_rewrite_header;

serialize_function_t serialize_vnet_rewrite, unserialize_vnet_rewrite;

#endif /* included_vnet_rewrite_h */
