/*
 *------------------------------------------------------------------
 * 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.
 *------------------------------------------------------------------
 */

#include <stdint.h>
#include <net/if.h>
#include <sys/ioctl.h>

#include <vlib/vlib.h>
#include <vlib/unix/unix.h>
#include <vnet/ethernet/ethernet.h>
#include <vnet/devices/devices.h>
#include <vnet/feature/feature.h>

#include <vnet/devices/netmap/net_netmap.h>
#include <vnet/devices/netmap/netmap.h>

#define foreach_netmap_input_error

typedef enum
{
#define _(f,s) NETMAP_INPUT_ERROR_##f,
  foreach_netmap_input_error
#undef _
    NETMAP_INPUT_N_ERROR,
} netmap_input_error_t;

static char *netmap_input_error_strings[] = {
#define _(n,s) s,
  foreach_netmap_input_error
#undef _
};

typedef struct
{
  u32 next_index;
  u32 hw_if_index;
  struct netmap_slot slot;
} netmap_input_trace_t;

static u8 *
format_netmap_input_trace (u8 * s, va_list * args)
{
  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
  netmap_input_trace_t *t = va_arg (*args, netmap_input_trace_t *);
  uword indent = format_get_indent (s);

  s = format (s, "netmap: hw_if_index %d next-index %d",
	      t->hw_if_index, t->next_index);
  s = format (s, "\n%Uslot: flags 0x%x len %u buf_idx %u",
	      format_white_space, indent + 2,
	      t->slot.flags, t->slot.len, t->slot.buf_idx);
  return s;
}

always_inline void
buffer_add_to_chain (vlib_main_t * vm, u32 bi, u32 first_bi, u32 prev_bi)
{
  vlib_buffer_t *b = vlib_get_buffer (vm, bi);
  vlib_buffer_t *first_b = vlib_get_buffer (vm, first_bi);
  vlib_buffer_t *prev_b = vlib_get_buffer (vm, prev_bi);

  /* update first buffer */
  first_b->total_length_not_including_first_buffer += b->current_length;

  /* update previous buffer */
  prev_b->next_buffer = bi;
  prev_b->flags |= VLIB_BUFFER_NEXT_PRESENT;

  /* update current buffer */
  b->next_buffer = 0;
}

always_inline uword
netmap_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
			vlib_frame_t * frame, netmap_if_t * nif)
{
  u32 next_index = VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT;
  uword n_trace = vlib_get_trace_count (vm, node);
  netmap_main_t *nm = &netmap_main;
  u32 n_rx_packets = 0;
  u32 n_rx_bytes = 0;
  u32 *to_next = 0;
  u32 n_free_bufs;
  struct netmap_ring *ring;
  int cur_ring;
  u32 thread_index = vlib_get_thread_index ();
  u32 n_buffer_bytes = vlib_buffer_free_list_buffer_size (vm,
							  VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);

  if (nif->per_interface_next_index != ~0)
    next_index = nif->per_interface_next_index;

  n_free_bufs = vec_len (nm->rx_buffers[thread_index]);
  if (PREDICT_FALSE (n_free_bufs < VLIB_FRAME_SIZE))
    {
      vec_validate (nm->rx_buffers[thread_index],
		    VLIB_FRAME_SIZE + n_free_bufs - 1);
      n_free_bufs +=
	vlib_buffer_alloc (vm, &nm->rx_buffers[thread_index][n_free_bufs],
			   VLIB_FRAME_SIZE);
      _vec_len (nm->rx_buffers[thread_index]) = n_free_bufs;
    }

  cur_ring = nif->first_rx_ring;
  while (cur_ring <= nif->last_rx_ring && n_free_bufs)
    {
      int r = 0;
      u32 cur_slot_index;
      ring = NETMAP_RXRING (nif->nifp, cur_ring);
      r = nm_ring_space (ring);

      if (!r)
	{
	  cur_ring++;
	  continue;
	}

      if (r > n_free_bufs)
	r = n_free_bufs;

      cur_slot_index = ring->cur;
      while (r)
	{
	  u32 n_left_to_next;
	  u32 next0 = next_index;
	  vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);

	  while (r && n_left_to_next)
	    {
	      vlib_buffer_t *first_b0 = 0;
	      u32 offset = 0;
	      u32 bi0 = 0, first_bi0 = 0, prev_bi0;
	      u32 next_slot_index = (cur_slot_index + 1) % ring->num_slots;
	      u32 next2_slot_index = (cur_slot_index + 2) % ring->num_slots;
	      struct netmap_slot *slot = &ring->slot[cur_slot_index];
	      u32 data_len = slot->len;

	      /* prefetch 2 slots in advance */
	      CLIB_PREFETCH (&ring->slot[next2_slot_index],
			     CLIB_CACHE_LINE_BYTES, LOAD);
	      /* prefetch start of next packet */
	      CLIB_PREFETCH (NETMAP_BUF
			     (ring, ring->slot[next_slot_index].buf_idx),
			     CLIB_CACHE_LINE_BYTES, LOAD);

	      while (data_len && n_free_bufs)
		{
		  vlib_buffer_t *b0;
		  /* grab free buffer */
		  u32 last_empty_buffer =
		    vec_len (nm->rx_buffers[thread_index]) - 1;
		  prev_bi0 = bi0;
		  bi0 = nm->rx_buffers[thread_index][last_empty_buffer];
		  b0 = vlib_get_buffer (vm, bi0);
		  _vec_len (nm->rx_buffers[thread_index]) = last_empty_buffer;
		  n_free_bufs--;

		  /* copy data */
		  u32 bytes_to_copy =
		    data_len > n_buffer_bytes ? n_buffer_bytes : data_len;
		  b0->current_data = 0;
		  clib_memcpy (vlib_buffer_get_current (b0),
			       (u8 *) NETMAP_BUF (ring,
						  slot->buf_idx) + offset,
			       bytes_to_copy);

		  /* fill buffer header */
		  b0->current_length = bytes_to_copy;

		  if (offset == 0)
		    {
		      b0->total_length_not_including_first_buffer = 0;
		      b0->flags = VLIB_BUFFER_TOTAL_LENGTH_VALID;
		      vnet_buffer (b0)->sw_if_index[VLIB_RX] =
			nif->sw_if_index;
		      vnet_buffer (b0)->sw_if_index[VLIB_TX] = (u32) ~ 0;
		      first_bi0 = bi0;
		      first_b0 = vlib_get_buffer (vm, first_bi0);
		    }
		  else
		    buffer_add_to_chain (vm, bi0, first_bi0, prev_bi0);

		  offset += bytes_to_copy;
		  data_len -= bytes_to_copy;
		}

	      /* trace */
	      VLIB_BUFFER_TRACE_TRAJECTORY_INIT (first_b0);
	      if (PREDICT_FALSE (n_trace > 0))
		{
		  if (PREDICT_TRUE (first_b0 != 0))
		    {
		      netmap_input_trace_t *tr;
		      vlib_trace_buffer (vm, node, next0, first_b0,
					 /* follow_chain */ 0);
		      vlib_set_trace_count (vm, node, --n_trace);
		      tr = vlib_add_trace (vm, node, first_b0, sizeof (*tr));
		      tr->next_index = next0;
		      tr->hw_if_index = nif->hw_if_index;
		      memcpy (&tr->slot, slot, sizeof (struct netmap_slot));
		    }
		}

	      /* redirect if feature path enabled */
	      vnet_feature_start_device_input_x1 (nif->sw_if_index, &next0,
						  first_b0);

	      /* enque and take next packet */
	      vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next,
					       n_left_to_next, first_bi0,
					       next0);

	      /* next packet */
	      n_rx_packets++;
	      n_rx_bytes += slot->len;
	      to_next[0] = first_bi0;
	      to_next += 1;
	      n_left_to_next--;
	      cur_slot_index = next_slot_index;

	      r--;
	    }
	  vlib_put_next_frame (vm, node, next_index, n_left_to_next);
	}
      ring->head = ring->cur = cur_slot_index;
      cur_ring++;
    }

  if (n_rx_packets)
    ioctl (nif->fd, NIOCRXSYNC, NULL);

  vlib_increment_combined_counter
    (vnet_get_main ()->interface_main.combined_sw_if_counters
     + VNET_INTERFACE_COUNTER_RX,
     vlib_get_thread_index (), nif->hw_if_index, n_rx_packets, n_rx_bytes);

  vnet_device_increment_rx_packets (thread_index, n_rx_packets);

  return n_rx_packets;
}

static uword
netmap_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
		 vlib_frame_t * frame)
{
  int i;
  u32 n_rx_packets = 0;
  u32 thread_index = vlib_get_thread_index ();
  netmap_main_t *nm = &netmap_main;
  netmap_if_t *nmi;

  for (i = 0; i < vec_len (nm->interfaces); i++)
    {
      nmi = vec_elt_at_index (nm->interfaces, i);
      if (nmi->is_admin_up &&
	  (i % nm->input_cpu_count) ==
	  (thread_index - nm->input_cpu_first_index))
	n_rx_packets += netmap_device_input_fn (vm, node, frame, nmi);
    }

  return n_rx_packets;
}

/* *INDENT-OFF* */
VLIB_REGISTER_NODE (netmap_input_node) = {
  .function = netmap_input_fn,
  .name = "netmap-input",
  .sibling_of = "device-input",
  .format_trace = format_netmap_input_trace,
  .type = VLIB_NODE_TYPE_INPUT,
  /* default state is INTERRUPT mode, switch to POLLING if worker threads are enabled */
  .state = VLIB_NODE_STATE_INTERRUPT,
  .n_errors = NETMAP_INPUT_N_ERROR,
  .error_strings = netmap_input_error_strings,
};

VLIB_NODE_FUNCTION_MULTIARCH (netmap_input_node, netmap_input_fn)
/* *INDENT-ON* */


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