diff options
author | Pierre Pfister <ppfister@cisco.com> | 2016-10-05 09:38:21 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-10-05 09:33:07 +0000 |
commit | d4bc9af55fc9a7bb5133da8c863569497cb92cd0 (patch) | |
tree | 6a64ccf779e28162e6c6bd260b0602011aadc9d6 /plugins/lb-plugin/lb/cli.c | |
parent | 4c20e7197707aa95b144b289704e9e97335db17d (diff) |
Load Balancer: Use FIB 2.0
This patch fixes load balancer, which was not working
since FIB 2.0.
Two FIB DPO types are defined:
- One for IPv4 GRE
- One for IPv6 GRE
When an AS is created, the plugin automatically uses
the result from the FIB in order to transmit the packet.
Therefore, the packet does not need to visit ip-lookup twice.
The 'bypass' command was removed, as it is now done
automatically using this process.
Change-Id: Ib505ba31bfc67897eaff752821087821c360360a
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Diffstat (limited to 'plugins/lb-plugin/lb/cli.c')
-rw-r--r-- | plugins/lb-plugin/lb/cli.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/plugins/lb-plugin/lb/cli.c b/plugins/lb-plugin/lb/cli.c index 398572ce..b59c6426 100644 --- a/plugins/lb-plugin/lb/cli.c +++ b/plugins/lb-plugin/lb/cli.c @@ -17,47 +17,6 @@ #include <lb/util.h> static clib_error_t * -lb_bypass_command_fn (vlib_main_t * vm, - unformat_input_t * input, vlib_cli_command_t * cmd) -{ - unformat_input_t _line_input, *line_input = &_line_input; - ip46_address_t vip_prefix, as_addr; - u8 vip_plen; - u32 vip_index; - u8 disable = 0; - int ret; - - if (!unformat_user (input, unformat_line_input, line_input)) - return 0; - - if (!unformat(line_input, "%U", unformat_ip46_prefix, &vip_prefix, &vip_plen, IP46_TYPE_ANY)) - return clib_error_return (0, "invalid vip prefix: '%U'", - format_unformat_error, line_input); - - if ((ret = lb_vip_find_index(&vip_prefix, vip_plen, &vip_index))) - return clib_error_return (0, "lb_vip_find_index error %d", ret); - - if (!unformat(line_input, "%U", unformat_ip46_address, &as_addr, IP46_TYPE_ANY)) - return clib_error_return (0, "invalid as address: '%U'", - format_unformat_error, line_input); - - if (unformat(line_input, "disable")) - disable = 1; - - if ((ret = lb_as_lookup_bypass(vip_index, &as_addr, disable))) - return clib_error_return (0, "lb_as_lookup_bypass error %d", ret); - - return 0; -} - -VLIB_CLI_COMMAND (lb_bypass_command, static) = -{ - .path = "lb bypass", - .short_help = "lb bypass <prefix> <address> [disable]", - .function = lb_bypass_command_fn, -}; - -static clib_error_t * lb_vip_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) { |