MCPcopy Create free account
hub / github.com/F-Stack/f-stack / icmp_echo_config_setup

Function icmp_echo_config_setup

dpdk/app/test-pmd/config.c:4979–5033  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4977}
4978
4979static void
4980icmp_echo_config_setup(void)
4981{
4982 portid_t rxp;
4983 queueid_t rxq;
4984 lcoreid_t lc_id;
4985 uint16_t sm_id;
4986
4987 if ((lcoreid_t)(nb_txq * nb_fwd_ports) < nb_fwd_lcores)
4988 cur_fwd_config.nb_fwd_lcores = (lcoreid_t)
4989 (nb_txq * nb_fwd_ports);
4990 else
4991 cur_fwd_config.nb_fwd_lcores = (lcoreid_t) nb_fwd_lcores;
4992 cur_fwd_config.nb_fwd_ports = nb_fwd_ports;
4993 cur_fwd_config.nb_fwd_streams =
4994 (streamid_t) (nb_rxq * cur_fwd_config.nb_fwd_ports);
4995 if (cur_fwd_config.nb_fwd_streams < cur_fwd_config.nb_fwd_lcores)
4996 cur_fwd_config.nb_fwd_lcores =
4997 (lcoreid_t)cur_fwd_config.nb_fwd_streams;
4998 if (verbose_level > 0) {
4999 printf("%s fwd_cores=%d fwd_ports=%d fwd_streams=%d\n",
5000 __FUNCTION__,
5001 cur_fwd_config.nb_fwd_lcores,
5002 cur_fwd_config.nb_fwd_ports,
5003 cur_fwd_config.nb_fwd_streams);
5004 }
5005
5006 /* reinitialize forwarding streams */
5007 init_fwd_streams();
5008 setup_fwd_config_of_each_lcore(&cur_fwd_config);
5009 rxp = 0; rxq = 0;
5010 for (lc_id = 0; lc_id < cur_fwd_config.nb_fwd_lcores; lc_id++) {
5011 if (verbose_level > 0)
5012 printf(" core=%d: \n", lc_id);
5013 for (sm_id = 0; sm_id < fwd_lcores[lc_id]->stream_nb; sm_id++) {
5014 struct fwd_stream *fs;
5015 fs = fwd_streams[fwd_lcores[lc_id]->stream_idx + sm_id];
5016 fs->rx_port = fwd_ports_ids[rxp];
5017 fs->rx_queue = rxq;
5018 fs->tx_port = fs->rx_port;
5019 fs->tx_queue = rxq;
5020 fs->peer_addr = fs->tx_port;
5021 fs->retry_enabled = retry_enabled;
5022 if (verbose_level > 0)
5023 printf(" stream=%d port=%d rxq=%d txq=%d\n",
5024 sm_id, fs->rx_port, fs->rx_queue,
5025 fs->tx_queue);
5026 rxq = (queueid_t) (rxq + 1);
5027 if (rxq == nb_rxq) {
5028 rxq = 0;
5029 rxp = (portid_t) (rxp + 1);
5030 }
5031 }
5032 }
5033}
5034
5035void
5036fwd_config_setup(void)

Callers 1

fwd_config_setupFunction · 0.85

Calls 3

init_fwd_streamsFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected