aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/bonding
AgeCommit message (Expand)AuthorFilesLines
2018-06-05bond: send gratuitous arp when the active slave went down in active-backup modeSteven4-3/+74
2018-05-30bonding: fix packet trace in bond-inputDamjan Marion1-5/+1
2018-05-29Add VLIB_NODE_FN() macro to simplify multiversioning of node functionsDamjan Marion1-21/+5
2018-05-27bond-input performance optimizationDamjan Marion1-291/+261
2018-05-25bond: performance harvestingSteven4-133/+183
2018-04-24lacp: deleting the bond subinterface may cause lacp to lose the partner [VPP-...Steven3-23/+2
2018-04-13bond: ping fails between l2 BD [VPP-1238]Steven2-15/+76
2018-04-12bond: 1 packet/frame == bad performance [VPP-1236]Steven1-6/+8
2018-03-30bond: show trace causes a crash if the interface is deletedSteven2-9/+30
2018-03-28bond: cli renameSteven1-11/+10
2018-03-27bond: coverity woesSteven2-27/+32
2018-03-22bond: performance enhancementSteven3-155/+220
2018-03-21bond: Add bonding driver and LACP protocolSteven6-0/+2767
* Literal.String.Heredoc */ .highlight .si { color: #e6db74 } /* Literal.String.Interpol */ .highlight .sx { color: #e6db74 } /* Literal.String.Other */ .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #a6e22e } /* Name.Function.Magic */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 * Copyright (c) 2018 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_dhcp6_pd_client_dp_h
#define included_vnet_dhcp6_pd_client_dp_h

#include <vlib/vlib.h>
#include <dhcp/dhcp6_client_common_dp.h>

typedef struct
{
  u32 preferred_lt;
  u32 valid_lt;
  ip6_address_t prefix;
  u8 prefix_length;
} dhcp6_pd_send_client_message_params_prefix_t;

typedef struct
{
  u32 sw_if_index;
  u32 server_index;
  u32 irt;
  u32 mrt;
  u32 mrc;
  u32 mrd;
  u8 msg_type;
  u32 T1;
  u32 T2;
  dhcp6_pd_send_client_message_params_prefix_t *prefixes;
} dhcp6_pd_send_client_message_params_t;

typedef struct
{
  u8 entry_valid;
  u8 keep_sending_client_message;	/* when true then next fields are valid */
  dhcp6_pd_send_client_message_params_t params;
  f64 transaction_start;
  f64 sleep_interval;
  f64 due_time;
  u32 n_left;
  f64 start_time;
  u32 transaction_id;
  vlib_buffer_t *buffer;
  u32 elapsed_pos;
  u32 adj_index;
} dhcp6_pd_client_state_t;

typedef struct
{
  dhcp6_pd_client_state_t *client_state_by_sw_if_index;

  uword publisher_node;
  uword publisher_et;

  u32 seed;

  /* convenience */
  vlib_main_t *vlib_main;
  vnet_main_t *vnet_main;
} dhcp6_pd_client_main_t;

extern dhcp6_pd_client_main_t dhcp6_pd_client_main;

typedef struct
{
  ip6_address_t prefix;
  u8 prefix_length;
  u32 valid_time;
  u32 preferred_time;
  u16 status_code;
} dhcp6_prefix_info_t;

typedef struct
{
  dhcp6_report_common_t body;
  u32 n_prefixes;
  dhcp6_prefix_info_t *prefixes;
} prefix_report_t;

void dhcp6_pd_send_client_message (vlib_main_t * vm, u32 sw_if_index, u8 stop,
				   dhcp6_pd_send_client_message_params_t *
				   params);
void dhcp6_pd_set_publisher_node (uword node_index, uword event_type);
int dhcp6_pd_publish_report (prefix_report_t * r);
int dhcp6_pd_client_enable_disable (u32 sw_if_index,
				    const u8 * prefix_group, u8 enable);
int dhcp6_cp_ip6_address_add_del (u32 sw_if_index, const u8 * prefix_group,
				  ip6_address_t address, u8 prefix_length,
				  u8 is_add);

extern vlib_node_registration_t dhcp6_pd_reply_process_node;

enum
{ DHCP6_PD_DP_REPLY_REPORT, DHCP6_PD_DP_REPORT_MAX };

#include <dhcp/dhcp.api_types.h>

typedef struct _vnet_dhcp6_pd_reply_function_list_elt
{
  struct _vnet_dhcp6_pd_reply_function_list_elt
    *next_dhcp6_pd_reply_event_function;
  clib_error_t *(*fp) (vl_api_dhcp6_pd_reply_event_t * mp);
} _vnet_dhcp6_pd_reply_event_function_list_elt_t;

typedef struct
{
  _vnet_dhcp6_pd_reply_event_function_list_elt_t *functions;
} dhcp6_pd_client_public_main_t;

extern dhcp6_pd_client_public_main_t dhcp6_pd_client_public_main;

#define VNET_DHCP6_PD_REPLY_EVENT_FUNCTION(f)                             \
                                                                          \
static void __vnet_dhcp6_pd_reply_event_function_init_##f (void)          \
    __attribute__((__constructor__)) ;                                    \
                                                                          \
static void __vnet_dhcp6_pd_reply_event_function_init_##f (void)          \
{                                                                         \
 dhcp6_pd_client_public_main_t * nm = &dhcp6_pd_client_public_main;       \
 static _vnet_dhcp6_pd_reply_event_function_list_elt_t init_function;     \
 init_function.next_dhcp6_pd_reply_event_function = nm->functions;        \
 nm->functions = &init_function;                                          \
 init_function.fp = (void *) &f;                                          \
}                                                                         \
                                                                          \
static void __vnet_dhcp6_pd_reply_event_function_deinit_##f (void)        \
    __attribute__((__destructor__)) ;                                     \
                                                                          \
static void __vnet_dhcp6_pd_reply_event_function_deinit_##f (void)        \
{                                                                         \
 dhcp6_pd_client_public_main_t * nm = &dhcp6_pd_client_public_main;       \
 _vnet_dhcp6_pd_reply_event_function_list_elt_t *next;                    \
 if (nm->functions->fp == (void *) &f)                                    \
    {                                                                     \
      nm->functions =                                                     \
        nm->functions->next_dhcp6_pd_reply_event_function;                \
      return;                                                             \
    }                                                                     \
  next = nm->functions;                                                   \
  while (next->next_dhcp6_pd_reply_event_function)                        \
    {                                                                     \
      if (next->next_dhcp6_pd_reply_event_function->fp == (void *) &f)    \
        {                                                                 \
          next->next_dhcp6_pd_reply_event_function =                      \
            next->next_dhcp6_pd_reply_event_function->next_dhcp6_pd_reply_event_function; \
          return;                                                         \
        }                                                                 \
      next = next->next_dhcp6_pd_reply_event_function;                    \
    }                                                                     \
}

#endif /* included_vnet_dhcp6_pd_client_dp_h */

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