/*-
* BSD LICENSE
- *
+ *
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
if (fill >= thresh) {
n = RTE_MIN(len - txmb->tail, fill);
-
+
k = rte_eth_tx_burst(port, qconf->tx_queue_id[port],
txmb->m_table + txmb->tail, (uint16_t)n);
if (++txmb->tail == len)
txmb->tail = 0;
}
-
+
TX_LCORE_STAT_UPDATE(&qconf->tx_stat, queue, 1);
txmb->m_table[txmb->head] = m;
if(++txmb->head == len)
/* process this fragment. */
if ((mo = ipv4_frag_mbuf(tbl, dr, m, tms, ipv4_hdr,
- ip_ofs, ip_flag)) == NULL)
+ ip_ofs, ip_flag)) == NULL)
/* no packet to send out. */
return;
char *end;
uint64_t v;
- static const char frmt_sec[] = "s";
- static const char frmt_msec[] = "ms";
+ static const char frmt_sec[] = "s";
+ static const char frmt_msec[] = "ms";
/* parse decimal string */
errno = 0;
printf("numa is disabled \n");
numa_on = 0;
}
-
+
if (!strncmp(lgopts[option_index].name,
"maxflows", 8)) {
if ((ret = parse_flow_num(optarg, MIN_FLOW_NUM,
return (ret);
}
}
-
+
if (!strncmp(lgopts[option_index].name, "flowttl", 7)) {
if ((ret = parse_flow_ttl(optarg, MIN_FLOW_TTL,
MAX_FLOW_TTL,
printf("jumbo frame is enabled \n");
port_conf.rxmode.jumbo_frame = 1;
-
- /* if no max-pkt-len set, use the default value ETHER_MAX_LEN */
+
+ /* if no max-pkt-len set, use the default value ETHER_MAX_LEN */
if (0 == getopt_long(argc, argvopt, "", &lenopts, &option_index)) {
ret = parse_max_pkt_len(optarg);
if ((ret < 64) || (ret > MAX_JUMBO_PKT_LEN)){
}
port_conf.rxmode.max_rx_pkt_len = ret;
}
- printf("set jumbo frame max packet length to %u\n",
+ printf("set jumbo frame max packet length to %u\n",
(unsigned int)port_conf.rxmode.max_rx_pkt_len);
}
-
+
break;
default:
ipv4_l3fwd_route_array[i].depth,
ipv4_l3fwd_route_array[i].if_out);
}
-
+
/* create the LPM6 table */
rte_snprintf(s, sizeof(s), "IPV6_L3FWD_LPM_%d", socketid);
-
+
config.max_rules = IPV6_L3FWD_LPM_MAX_RULES;
config.number_tbl8s = IPV6_L3FWD_LPM_NUMBER_TBL8S;
config.flags = 0;
* At any given moment up to <max_flow_num * (MAX_FRAG_NUM - 1)>
* mbufs could be stored int the fragment table.
* Plus, each TX queue can hold up to <max_flow_num> packets.
- */
+ */
nb_mbuf = 2 * RTE_MAX(max_flow_num, 2UL * MAX_PKT_BURST) * MAX_FRAG_NUM;
nb_mbuf *= (port_conf.rxmode.max_rx_pkt_len + BUF_SIZE - 1) / BUF_SIZE;
nb_mbuf += RTE_TEST_RX_DESC_DEFAULT + RTE_TEST_TX_DESC_DEFAULT;
nb_mbuf = RTE_MAX(nb_mbuf, (uint32_t)DEF_MBUF_NUM);
-
+
rte_snprintf(buf, sizeof(buf), "mbuf_pool_%u_%u", lcore, queue);
if ((qconf->pool[queue] = rte_mempool_create(buf, nb_mbuf, MBUF_SIZE, 0,
rte_exit(EXIT_FAILURE, "init_lcore_rx_queues failed\n");
- /* init driver(s) */
- if (rte_pmd_init_all() < 0)
- rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
-
if (rte_eal_pci_probe() < 0)
rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");