#include <vppinfra/lb_hash_hash.h>
#include <vnet/ip/ip.h>
#include <vnet/ip-neighbor/ip_neighbor.h>
+#include <vnet/ip-neighbor/ip4_neighbor.h>
+#include <vnet/ip-neighbor/ip6_neighbor.h>
-#define foreach_bond_tx_error \
- _(NONE, "no error") \
- _(IF_DOWN, "interface down") \
- _(NO_MEMBER, "no member")
+#define foreach_bond_tx_error \
+ _ (NONE, "no error") \
+ _ (IF_DOWN, "interface down") \
+ _ (BAD_LB_MODE, "bad load balance mode") \
+ _ (NO_MEMBER, "no member")
typedef enum
{
else if (bif->lb == BOND_LB_RR)
bond_tx_inline (vm, bif, bufs, hashes, n_left, n_members, BOND_LB_RR);
else
- ASSERT (0);
+ {
+ vlib_buffer_free (vm, vlib_frame_vector_args (frame), frame->n_vectors);
+ vlib_increment_simple_counter (
+ vnet_main.interface_main.sw_if_counters + VNET_INTERFACE_COUNTER_DROP,
+ thread_index, bif->sw_if_index, frame->n_vectors);
+ vlib_error_count (vm, node->node_index, BOND_TX_ERROR_BAD_LB_MODE,
+ frame->n_vectors);
+ return frame->n_vectors;
+ }
/* calculate port out of hash */
h = hashes;
{
bond_main_t *bm = &bond_main;
- ip_neighbor_advertise (bm->vlib_main, IP46_TYPE_BOTH, NULL, sw_if_index);
+ ip4_neighbor_advertise (bm->vlib_main, bm->vnet_main, sw_if_index, NULL);
+ ip6_neighbor_advertise (bm->vlib_main, bm->vnet_main, sw_if_index, NULL);
return (WALK_CONTINUE);
}