aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/hs_apps/sapi
AgeCommit message (Expand)AuthorFilesLines
2020-08-06misc: harmonize namesDave Barach1-1/+1
2020-04-10udp: remove connected udp transport protoFlorin Coras2-8/+0
2020-04-03session udp: fix transport flags and migrationFlorin Coras1-1/+1
2020-04-03session: remove obsolete apisFlorin Coras1-1/+0
2020-03-25session: api to add new transport typesFlorin Coras4-18/+12
2020-03-05session: API cleanupJakub Grajciar1-23/+26
2020-02-20hsa: cleanup vpp_echo JSON outputDave Wallace1-4/+8
2020-01-30vcl session: propagate cleanup notifications to appsFlorin Coras1-0/+9
2020-01-03hsa: fix coverity warningFlorin Coras1-0/+2
2019-12-21session: move add/del segment msg to mqFlorin Coras4-97/+95
2019-12-19hsa: Add periodic timingNathan Skrzypczak3-18/+71
2019-12-13hsa: Fix timing & nitsNathan Skrzypczak2-3/+9
2019-12-11quic: Add support for unidirectional streamsNathan Skrzypczak3-0/+13
2019-12-11hsa: Add option for multiple ipsNathan Skrzypczak5-44/+152
2019-12-10api: multiple connections per processDave Barach1-1/+1
2019-12-03hsa: Less verbose logging for many sessionsNathan Skrzypczak6-50/+83
2019-11-22hsa: Improve for mq-intensiveNathan Skrzypczak5-46/+31
2019-11-07hsa: Add ckpair & crypto engine in vpp_echoNathan Skrzypczak6-78/+80
2019-10-30hsa: vpp_echo fifo size is u32Dave Wallace2-15/+23
2019-10-22tests: enable vpp_echo to run in gdbDave Wallace2-0/+15
2019-10-11hsa: vpp_echo refactor quic nclients argDave Wallace1-2/+1
2019-10-11hsa: vpp_echo clean up results comparisonDave Wallace2-20/+20
2019-10-11hsa: vpp_echo remove redundant unformat functionDave Wallace3-31/+9
2019-10-09hsa: use crypto_engine_type_t for TLSNathan Skrzypczak4-9/+9
2019-10-09hsa: fix vpp_echo session closeDave Wallace5-78/+221
2019-10-08hsa: make vpp_echo use mq instead of bapiNathan Skrzypczak7-186/+285
2019-10-04hsa: make APP_OPTIONS_PREALLOC_FIFO_PAIRS configurableMathiasRaoul3-1/+5
2019-09-30hsa: fix vpp_echo mq lockingNathan Skrzypczak3-18/+62
2019-09-30hsa: fix non-NULL terminated C-string use in echoBenoît Ganne1-9/+9
2019-09-23hsa: fix typo in vpp_echo for tx-bufMathiasRaoul1-6/+6
2019-09-20session: fix msg freeing on errorNathan Skrzypczak1-6/+0
2019-09-20hsa: refactor vpp_echo failure handlingDave Wallace7-97/+214
2019-09-18hsa: fix vpp_echo stats outputDave Wallace1-16/+37
2019-09-13hsa: Fix QUIC sessions count calculationAloys Augustin1-3/+1
2019-09-12hsa: fix memory management bugsBenoît Ganne1-2/+2
2019-09-04session: improve cliFlorin Coras1-3/+3
2019-08-28hsa: clean up vpp_echo json outputDave Wallace1-11/+13
2019-08-28quic: Fix listener vpp_session_handleNathan Skrzypczak1-0/+1
2019-08-19hsa: move udp_echo to vpp_echoNathan Skrzypczak2-1256/+182
2019-08-19hsa: move tcp_echo to vpp_echoNathan Skrzypczak2-1414/+143
2019-08-16hsa: Refactor quic_echo to allow other protocolsNathan Skrzypczak8-2320/+2878
2019-08-02quic: Improve quic echo connect threadingNathan Skrzypczak3-725/+862
2019-07-26quic: coverity fixesNathan Skrzypczak1-8/+28
2019-07-18session: Refactor invalid session idx/handleNathan Skrzypczak1-3/+0
2019-07-11quic: Fix quic_echo event flagsNathan Skrzypczak1-9/+9
2019-07-10quic: Improve timing interface for quic_echoNathan Skrzypczak1-100/+202
2019-07-09quic: echo thread can handle multiple sessionsNathan Skrzypczak1-128/+267
2019-07-09quic: fix passive disconnect handling & refactorNathan Skrzypczak1-9/+13
2019-07-04hsa: clean up quic_echoDave Wallace1-11/+11
2019-06-29svm: rename fifo tx notifications to reflect useFlorin Coras1-2/+2
/* check if we've exhausted the ring */ if (PREDICT_FALSE (frame_not_ready + n_sent == frame_num)) break; } CLIB_MEMORY_BARRIER (); if (PREDICT_TRUE (n_sent)) { apif->next_tx_frame = tx_frame; if (PREDICT_FALSE (sendto (apif->fd, NULL, 0, MSG_DONTWAIT, NULL, 0) == -1)) { /* Uh-oh, drop & move on, but count whether it was fatal or not. * Note that we have no reliable way to properly determine the * disposition of the packets we just enqueued for delivery. */ vlib_error_count (vm, node->node_index, unix_error_is_fatal (errno) ? AF_PACKET_TX_ERROR_TXRING_FATAL : AF_PACKET_TX_ERROR_TXRING_EAGAIN, n_sent); } } clib_spinlock_unlock_if_init (&apif->lockp); if (PREDICT_FALSE (frame_not_ready)) vlib_error_count (vm, node->node_index, AF_PACKET_TX_ERROR_FRAME_NOT_READY, frame_not_ready); if (PREDICT_FALSE (frame_not_ready + n_sent == frame_num)) vlib_error_count (vm, node->node_index, AF_PACKET_TX_ERROR_TXRING_OVERRUN, n_left); vlib_buffer_free (vm, vlib_frame_vector_args (frame), frame->n_vectors); return frame->n_vectors; } static void af_packet_set_interface_next_node (vnet_main_t * vnm, u32 hw_if_index, u32 node_index) { af_packet_main_t *apm = &af_packet_main; vnet_hw_interface_t *hw = vnet_get_hw_interface (vnm, hw_if_index); af_packet_if_t *apif = pool_elt_at_index (apm->interfaces, hw->dev_instance); /* Shut off redirection */ if (node_index == ~0) { apif->per_interface_next_index = node_index; return; } apif->per_interface_next_index = vlib_node_add_next (vlib_get_main (), af_packet_input_node.index, node_index); } static void af_packet_clear_hw_interface_counters (u32 instance) { /* Nothing for now */ } static clib_error_t * af_packet_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) { af_packet_main_t *apm = &af_packet_main; vnet_hw_interface_t *hw = vnet_get_hw_interface (vnm, hw_if_index); af_packet_if_t *apif = pool_elt_at_index (apm->interfaces, hw->dev_instance); u32 hw_flags; int rv, fd = socket (AF_UNIX, SOCK_DGRAM, 0); struct ifreq ifr; if (0 > fd) { vlib_log_warn (apm->log_class, "af_packet_%s could not open socket", apif->host_if_name); return 0; } /* if interface is a bridge ignore */ if (apif->host_if_index < 0) goto error; /* no error */ /* use host_if_index in case host name has changed */ ifr.ifr_ifindex = apif->host_if_index; if ((rv = ioctl (fd, SIOCGIFNAME, &ifr)) < 0) { vlib_log_warn (apm->log_class, "af_packet_%s ioctl could not retrieve eth name", apif->host_if_name); goto error; } apif->is_admin_up = (flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP) != 0; if ((rv = ioctl (fd, SIOCGIFFLAGS, &ifr)) < 0) { vlib_log_warn (apm->log_class, "af_packet_%s error: %d", apif->is_admin_up ? "up" : "down", rv); goto error; } if (apif->is_admin_up) { hw_flags = VNET_HW_INTERFACE_FLAG_LINK_UP; ifr.ifr_flags |= IFF_UP; } else { hw_flags = 0; ifr.ifr_flags &= ~IFF_UP; } if ((rv = ioctl (fd, SIOCSIFFLAGS, &ifr)) < 0) { vlib_log_warn (apm->log_class, "af_packet_%s error: %d", apif->is_admin_up ? "up" : "down", rv); goto error; } vnet_hw_interface_set_flags (vnm, hw_if_index, hw_flags); error: if (0 <= fd) close (fd); return 0; /* no error */ } static clib_error_t * af_packet_subif_add_del_function (vnet_main_t * vnm, u32 hw_if_index, struct vnet_sw_interface_t *st, int is_add) { /* Nothing for now */ return 0; } static clib_error_t *af_packet_set_mac_address_function (struct vnet_hw_interface_t *hi, const u8 * old_address, const u8 * address) { af_packet_main_t *apm = &af_packet_main; af_packet_if_t *apif = pool_elt_at_index (apm->interfaces, hi->dev_instance); int rv, fd = socket (AF_UNIX, SOCK_DGRAM, 0); struct ifreq ifr; if (0 > fd) { vlib_log_warn (apm->log_class, "af_packet_%s could not open socket", apif->host_if_name); return 0; } /* if interface is a bridge ignore */ if (apif->host_if_index < 0) goto error; /* no error */ /* use host_if_index in case host name has changed */ ifr.ifr_ifindex = apif->host_if_index; if ((rv = ioctl (fd, SIOCGIFNAME, &ifr)) < 0) { vlib_log_warn (apm->log_class, "af_packet_%s ioctl could not retrieve eth name, error: %d", apif->host_if_name, rv); goto error; } clib_memcpy (ifr.ifr_hwaddr.sa_data, address, 6); ifr.ifr_hwaddr.sa_family = ARPHRD_ETHER; if ((rv = ioctl (fd, SIOCSIFHWADDR, &ifr)) < 0) { vlib_log_warn (apm->log_class, "af_packet_%s ioctl could not set mac, error: %d", apif->host_if_name, rv); goto error; } error: if (0 <= fd) close (fd); return 0; /* no error */ } /* *INDENT-OFF* */ VNET_DEVICE_CLASS (af_packet_device_class) = { .name = "af-packet", .format_device_name = format_af_packet_device_name, .format_device = format_af_packet_device, .format_tx_trace = format_af_packet_tx_trace, .tx_function_n_errors = AF_PACKET_TX_N_ERROR, .tx_function_error_strings = af_packet_tx_func_error_strings, .rx_redirect_to_node = af_packet_set_interface_next_node, .clear_counters = af_packet_clear_hw_interface_counters, .admin_up_down_function = af_packet_interface_admin_up_down, .subif_add_del_function = af_packet_subif_add_del_function, .mac_addr_change_function = af_packet_set_mac_address_function, }; /* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */