git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
crypto/dpaa_sec: support scatter gather for PDCP
[dpdk.git]
/
examples
/
l3fwd
/
main.c
diff --git
a/examples/l3fwd/main.c
b/examples/l3fwd/main.c
index
7b96831
..
3800bad
100644
(file)
--- a/
examples/l3fwd/main.c
+++ b/
examples/l3fwd/main.c
@@
-81,7
+81,7
@@
volatile bool force_quit;
/* ethernet addresses of ports */
uint64_t dest_eth_addr[RTE_MAX_ETHPORTS];
/* ethernet addresses of ports */
uint64_t dest_eth_addr[RTE_MAX_ETHPORTS];
-struct ether_addr ports_eth_addr[RTE_MAX_ETHPORTS];
+struct
rte_
ether_addr ports_eth_addr[RTE_MAX_ETHPORTS];
xmm_t val_eth[RTE_MAX_ETHPORTS];
xmm_t val_eth[RTE_MAX_ETHPORTS];
@@
-120,7
+120,7
@@
static uint16_t nb_lcore_params = sizeof(lcore_params_array_default) /
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
- .max_rx_pkt_len = ETHER_MAX_LEN,
+ .max_rx_pkt_len =
RTE_
ETHER_MAX_LEN,
.split_hdr_size = 0,
.offloads = DEV_RX_OFFLOAD_CHECKSUM,
},
.split_hdr_size = 0,
.offloads = DEV_RX_OFFLOAD_CHECKSUM,
},
@@
-570,7
+570,7
@@
parse_args(int argc, char **argv)
/*
* if no max-pkt-len set, use the default
/*
* if no max-pkt-len set, use the default
- * value ETHER_MAX_LEN.
+ * value
RTE_
ETHER_MAX_LEN.
*/
if (getopt_long(argc, argvopt, "",
&lenopts, &option_index) == 0) {
*/
if (getopt_long(argc, argvopt, "",
&lenopts, &option_index) == 0) {
@@
-647,10
+647,10
@@
parse_args(int argc, char **argv)
}
static void
}
static void
-print_ethaddr(const char *name, const struct ether_addr *eth_addr)
+print_ethaddr(const char *name, const struct
rte_
ether_addr *eth_addr)
{
{
- char buf[ETHER_ADDR_FMT_SIZE];
-
ether_format_addr(buf,
ETHER_ADDR_FMT_SIZE, eth_addr);
+ char buf[
RTE_
ETHER_ADDR_FMT_SIZE];
+
rte_ether_format_addr(buf, RTE_
ETHER_ADDR_FMT_SIZE, eth_addr);
printf("%s%s", name, buf);
}
printf("%s%s", name, buf);
}
@@
-827,7
+827,7
@@
main(int argc, char **argv)
/* pre-init dst MACs for all ports to 02:00:00:00:00:xx */
for (portid = 0; portid < RTE_MAX_ETHPORTS; portid++) {
dest_eth_addr[portid] =
/* pre-init dst MACs for all ports to 02:00:00:00:00:xx */
for (portid = 0; portid < RTE_MAX_ETHPORTS; portid++) {
dest_eth_addr[portid] =
- ETHER_LOCAL_ADMIN_ADDR + ((uint64_t)portid << 40);
+
RTE_
ETHER_LOCAL_ADMIN_ADDR + ((uint64_t)portid << 40);
*(uint64_t *)(val_eth + portid) = dest_eth_addr[portid];
}
*(uint64_t *)(val_eth + portid) = dest_eth_addr[portid];
}
@@
-908,14
+908,14
@@
main(int argc, char **argv)
print_ethaddr(" Address:", &ports_eth_addr[portid]);
printf(", ");
print_ethaddr("Destination:",
print_ethaddr(" Address:", &ports_eth_addr[portid]);
printf(", ");
print_ethaddr("Destination:",
- (const struct ether_addr *)&dest_eth_addr[portid]);
+ (const struct
rte_
ether_addr *)&dest_eth_addr[portid]);
printf(", ");
/*
* prepare src MACs for each port.
*/
printf(", ");
/*
* prepare src MACs for each port.
*/
- ether_addr_copy(&ports_eth_addr[portid],
- (struct ether_addr *)(val_eth + portid) + 1);
+
rte_
ether_addr_copy(&ports_eth_addr[portid],
+ (struct
rte_
ether_addr *)(val_eth + portid) + 1);
/* init memory */
if (!per_port_pool) {
/* init memory */
if (!per_port_pool) {
@@
-971,14
+971,10
@@
main(int argc, char **argv)
fflush(stdout);
/* init RX queues */
for(queue = 0; queue < qconf->n_rx_queue; ++queue) {
fflush(stdout);
/* init RX queues */
for(queue = 0; queue < qconf->n_rx_queue; ++queue) {
- struct rte_eth_dev *dev;
- struct rte_eth_conf *conf;
struct rte_eth_rxconf rxq_conf;
portid = qconf->rx_queue_list[queue].port_id;
queueid = qconf->rx_queue_list[queue].queue_id;
struct rte_eth_rxconf rxq_conf;
portid = qconf->rx_queue_list[queue].port_id;
queueid = qconf->rx_queue_list[queue].queue_id;
- dev = &rte_eth_devices[portid];
- conf = &dev->data->dev_conf;
if (numa_on)
socketid =
if (numa_on)
socketid =
@@
-991,7
+987,7
@@
main(int argc, char **argv)
rte_eth_dev_info_get(portid, &dev_info);
rxq_conf = dev_info.default_rxconf;
rte_eth_dev_info_get(portid, &dev_info);
rxq_conf = dev_info.default_rxconf;
- rxq_conf.offloads =
conf->
rxmode.offloads;
+ rxq_conf.offloads =
port_conf.
rxmode.offloads;
if (!per_port_pool)
ret = rte_eth_rx_queue_setup(portid, queueid,
nb_rxd, socketid,
if (!per_port_pool)
ret = rte_eth_rx_queue_setup(portid, queueid,
nb_rxd, socketid,