summaryrefslogtreecommitdiffstats
AgeCommit message (Expand)AuthorFilesLines
2021-04-05arping: coverity woe on COPY_PASTE_ERRORSteven Luong1-1/+1
2021-04-05cnat: explicit BIHASH_USE_HEAP settingDave Barach1-0/+2
2021-04-05ip6-nd: Solicitation reply only if target is our link-localNeale Ranns2-4/+21
2021-04-02svm: lock-free fifo chunk list push and popFlorin Coras2-43/+57
2021-04-02build: create _objs target for each libraryDamjan Marion1-3/+10
2021-04-02arping: add arping commandSteven Luong9-0/+1475
2021-04-02ip-neighbor: suppress unsolicited clib_warning when sending garpSteven Luong2-5/+19
2021-04-01misc: update INFO.yamlDamjan Marion1-29/+16
2021-04-01tests: support injecting multiple worker pcaps on one PGKlement Sekera2-39/+39
2021-04-01session: always clean rx mqs on app detachFlorin Coras1-4/+3
2021-04-01avf: disable VLAN stripping on E810 using V2 VLAN APIsDamjan Marion4-14/+201
2021-04-01nat: fix ordering of feature nodesKlement Sekera1-2/+4
2021-04-01perfmon: combined set and start command.Ray Kinsella3-47/+36
2021-04-01ip: extend show cmd of ip reassembly configurationAnton Nikolaev4-0/+16
2021-04-01lacp: correctly set is_mp_safe for VL_API_SW_INTERFACE_LACP_DUMPSteven Luong1-2/+1
2021-04-01perfmon: % power level per nodeRay Kinsella2-0/+58
2021-04-01dpdk: Update version to 21.02Kepka, Krzysztof1-4/+4
2021-04-01fib: Move the adjacency midchain nodes into a separate fileNeale Ranns5-233/+251
2021-03-31nat: enable multiworker testsKlement Sekera1-2/+0
2021-03-31dpdk: fix packet offset for GCM crypto opsRobert Shearman1-0/+1
2021-03-31nat: fix test for multi-worker scenarioKlement Sekera1-3/+16
2021-03-31avf: improve capabilities handlingDamjan Marion5-39/+56
2021-03-31perfmon: add branch mispredictionsRay Kinsella3-0/+76
2021-03-31srv6-ad-flow: SRv6 Per-Flow Dynamic ProxyFrancois Clad8-0/+2336
2021-03-31nat: correct thread index usageKlement Sekera3-12/+15
2021-03-31nat: avoid creating negative zero checksumKlement Sekera1-1/+3
2021-03-31nat: NAT44-ED unused value removalFilip Varga1-4/+1
2021-03-31nat: NAT66 plugin enable&disable calls updateFilip Varga7-119/+263
2021-03-31tests: call venv module directlyKlement Sekera1-1/+1
2021-03-30session: interrupt mode for session node on main threadFlorin Coras1-15/+20
2021-03-30interface: fix coverityDamjan Marion1-2/+2
2021-03-30stats: python: handle when pattern is not list in lsOle Troan1-0/+9
2021-03-30svm: cleanup mq private data on fifo segment cleanupFlorin Coras3-2/+16
2021-03-30misc: vpptop makefile targetVladimir Lavor4-1/+280
2021-03-30nat: fix HA multi-worker issuesKlement Sekera6-154/+176
2021-03-30avf: fix coverity issuesChenmin Sun1-4/+4
2021-03-30map: tune dump/details test for socket transportOle Troan1-1/+1
2021-03-29svm session vcl: per app rx message queuesFlorin Coras11-104/+518
2021-03-29tls: fix app_worker_connect_notify param erroryedg1-1/+1
2021-03-29tests: move vxlan tests to src/vnet/vxlan/testsDave Wallace6-0/+0
2021-03-28vcl: fix only first epoll listen session be registerednandfan1-14/+2
2021-03-26vlib: convert foreach_vlib_main macro to be more gdb and clang-format friendlyDamjan Marion13-350/+315
2021-03-26vlib: split vlib_main_t into global and per-threadDamjan Marion24-456/+469
2021-03-26vlib: introduce vlib_get_elog_main()Damjan Marion15-85/+88
2021-03-26vlib: introduce vlib_get_main_by_index(), vlib_get_n_threads()Damjan Marion43-137/+166
2021-03-26tests: move ping tests to src/plugin/ping/testDave Wallace1-0/+0
2021-03-26avf: flow support enhancementChenmin Sun1-49/+219
2021-03-26avf: handle flow id in data pathChenmin Sun3-27/+122
2021-03-26avf: add avf flow frameworkChenmin Sun7-34/+2430
2021-03-25svm: add producer wait functionFlorin Coras3-14/+47
n class="k">case VNET_COP_DEFAULT: { static char * start_nodes[] = { "cop-input" }; static char * feature_nodes[] = { [DEFAULT_RX_COP_WHITELIST] = "default-cop-whitelist", [DEFAULT_RX_COP_INPUT] = "ethernet-input", }; vnet_config_init (vm, &ccm->config_main, start_nodes, ARRAY_LEN(start_nodes), feature_nodes, ARRAY_LEN(feature_nodes)); } break; default: clib_warning ("bug"); break; } } vec_validate_init_empty (ccm->config_index_by_sw_if_index, sw_if_index, ~0); ci = ccm->config_index_by_sw_if_index[sw_if_index]; /* Create a sensible initial config: send pkts to xxx-input */ if (address_family == VNET_COP_IP4) default_next = IP4_RX_COP_INPUT; else if (address_family == VNET_COP_IP6) default_next = IP6_RX_COP_INPUT; else default_next = DEFAULT_RX_COP_INPUT; if (is_add) ci = vnet_config_add_feature (vm, &ccm->config_main, ci, default_next, data, sizeof(*data)); else ci = vnet_config_del_feature (vm, &ccm->config_main, ci, default_next, data, sizeof(*data)); ccm->config_index_by_sw_if_index[sw_if_index] = ci; } return 0; } VNET_SW_INTERFACE_ADD_DEL_FUNCTION (cop_sw_interface_add_del); static clib_error_t * cop_init (vlib_main_t *vm) { cop_main_t * cm = &cop_main; cm->vlib_main = vm; cm->vnet_main = vnet_get_main(); return 0; } /* *INDENT-OFF* */ VLIB_INIT_FUNCTION (cop_init) = { .runs_after = VLIB_INITS ("ip4_whitelist_init", "ip6_whitelist_init"), }; /* *INDENT-ON* */ int cop_interface_enable_disable (u32 sw_if_index, int enable_disable) { cop_main_t * cm = &cop_main; vnet_sw_interface_t * sw; int rv; u32 node_index = enable_disable ? cop_input_node.index : ~0; /* Not a physical port? */ sw = vnet_get_sw_interface (cm->vnet_main, sw_if_index); if (sw->type != VNET_SW_INTERFACE_TYPE_HARDWARE) return VNET_API_ERROR_INVALID_SW_IF_INDEX; /* * Redirect pkts from the driver to the cop node. * Returns VNET_API_ERROR_UNIMPLEMENTED if the h/w driver * doesn't implement the API. * * Node_index = ~0 => shut off redirection */ rv = vnet_hw_interface_rx_redirect_to_node (cm->vnet_main, sw_if_index, node_index); return rv; } static clib_error_t * cop_enable_disable_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) { cop_main_t * cm = &cop_main; u32 sw_if_index = ~0; int enable_disable = 1; int rv; while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) { if (unformat (input, "disable")) enable_disable = 0; else if (unformat (input, "%U", unformat_vnet_sw_interface, cm->vnet_main, &sw_if_index)) ; else break; } if (sw_if_index == ~0) return clib_error_return (0, "Please specify an interface..."); rv = cop_interface_enable_disable (sw_if_index, enable_disable); switch(rv) { case 0: break; case VNET_API_ERROR_INVALID_SW_IF_INDEX: return clib_error_return (0, "Invalid interface, only works on physical ports"); break; case VNET_API_ERROR_UNIMPLEMENTED: return clib_error_return (0, "Device driver doesn't support redirection"); break; default: return clib_error_return (0, "cop_interface_enable_disable returned %d", rv); } return 0; } VLIB_CLI_COMMAND (cop_interface_command, static) = { .path = "cop interface", .short_help = "cop interface <interface-name> [disable]", .function = cop_enable_disable_command_fn, }; int cop_whitelist_enable_disable (cop_whitelist_enable_disable_args_t *a) { cop_main_t * cm = &cop_main; vlib_main_t * vm = cm->vlib_main; ip4_main_t * im4 = &ip4_main; ip6_main_t * im6 = &ip6_main; int address_family; int is_add; cop_config_main_t * ccm; u32 next_to_add_del = 0; uword * p; u32 fib_index = 0; u32 ci; cop_config_data_t _data, *data=&_data; /* * Enable / disable whitelist processing on the specified interface */ for (address_family = VNET_COP_IP4; address_family < VNET_N_COPS; address_family++) { ccm = &cm->cop_config_mains[address_family]; switch(address_family) { case VNET_COP_IP4: is_add = (a->ip4 != 0); next_to_add_del = IP4_RX_COP_WHITELIST; /* configured opaque data must match, or no supper */ p = hash_get (im4->fib_index_by_table_id, a->fib_id); if (p) fib_index = p[0]; else { if (is_add) return VNET_API_ERROR_NO_SUCH_FIB; else continue; } break; case VNET_COP_IP6: is_add = (a->ip6 != 0); next_to_add_del = IP6_RX_COP_WHITELIST; p = hash_get (im6->fib_index_by_table_id, a->fib_id); if (p) fib_index = p[0]; else { if (is_add) return VNET_API_ERROR_NO_SUCH_FIB; else continue; } break; case VNET_COP_DEFAULT: is_add = (a->default_cop != 0); next_to_add_del = DEFAULT_RX_COP_WHITELIST; break; default: clib_warning ("BUG"); } ci = ccm->config_index_by_sw_if_index[a->sw_if_index]; data->fib_index = fib_index; if (is_add) ci = vnet_config_add_feature (vm, &ccm->config_main, ci, next_to_add_del, data, sizeof (*data)); else ci = vnet_config_del_feature (vm, &ccm->config_main, ci, next_to_add_del, data, sizeof (*data)); ccm->config_index_by_sw_if_index[a->sw_if_index] = ci; } return 0; } static clib_error_t * cop_whitelist_enable_disable_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) { cop_main_t * cm = &cop_main; u32 sw_if_index = ~0; u8 ip4 = 0; u8 ip6 = 0; u8 default_cop = 0; u32 fib_id = 0; int rv; cop_whitelist_enable_disable_args_t _a, * a = &_a; while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) { if (unformat (input, "ip4")) ip4 = 1; else if (unformat (input, "ip6")) ip6 = 1; else if (unformat (input, "default")) default_cop = 1; else if (unformat (input, "%U", unformat_vnet_sw_interface, cm->vnet_main, &sw_if_index)) ; else if (unformat (input, "fib-id %d", &fib_id)) ; else break; } if (sw_if_index == ~0) return clib_error_return (0, "Please specify an interface..."); a->sw_if_index = sw_if_index; a->ip4 = ip4; a->ip6 = ip6; a->default_cop = default_cop; a->fib_id = fib_id; rv = cop_whitelist_enable_disable (a); switch(rv) { case 0: break; case VNET_API_ERROR_INVALID_SW_IF_INDEX: return clib_error_return (0, "Invalid interface, only works on physical ports"); break; case VNET_API_ERROR_NO_SUCH_FIB: return clib_error_return (0, "Invalid fib"); break; case VNET_API_ERROR_UNIMPLEMENTED: return clib_error_return (0, "Device driver doesn't support redirection"); break; default: return clib_error_return (0, "cop_whitelist_enable_disable returned %d", rv); } return 0; } VLIB_CLI_COMMAND (cop_whitelist_command, static) = { .path = "cop whitelist", .short_help = "cop whitelist <interface-name> [ip4][ip6][default][fib-id <NN>][disable]", .function = cop_whitelist_enable_disable_command_fn, };