remove trailing whitespaces

This commit removes trailing whitespace from lines in files. Almost all
files are affected, as the BSD license copyright header had trailing
whitespace on 4 lines in it [hence the number of files reporting 8 lines
changed in the diffstat].

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
[Thomas: remove spaces before tabs in libs]
[Thomas: remove more trailing spaces in non-C files]
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This commit is contained in:
Bruce Richardson 2014-06-04 00:42:50 +01:00 committed by Thomas Monjalon
parent d10296d7ea
commit 3031749c2d
573 changed files with 4637 additions and 4639 deletions

View File

@ -1,12 +1,12 @@
# 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
@ -16,7 +16,7 @@
# * 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

View File

@ -1,12 +1,12 @@
# 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
@ -16,7 +16,7 @@
# * 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

View File

@ -1,12 +1,12 @@
# 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
@ -16,7 +16,7 @@
# * 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

View File

@ -1,12 +1,12 @@
# 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
@ -16,7 +16,7 @@
# * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,14 +1,14 @@
#!/usr/bin/python
# 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
@ -18,7 +18,7 @@
# * 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

View File

@ -1,14 +1,14 @@
#!/usr/bin/python
# 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
@ -18,7 +18,7 @@
# * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,12 +1,12 @@
# 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
@ -16,7 +16,7 @@
# * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,12 +1,12 @@
# 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
@ -16,7 +16,7 @@
# * 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

View File

@ -1,14 +1,14 @@
/*-
* BSD LICENSE
*
*
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* Copyright(c) 2014 6WIND S.A.
* 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
@ -18,7 +18,7 @@
* * 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
@ -272,10 +272,10 @@ static void cmd_help_long_parsed(void *parsed_result,
"rx_vlan add (vlan_id) port (port_id) vf (vf_mask)\n"
" Add a vlan_id, to the set of VLAN identifiers"
"filtered for VF(s) from port_id.\n\n"
"rx_vlan rm (vlan_id) port (port_id) vf (vf_mask)\n"
" Remove a vlan_id, to the set of VLAN identifiers"
"filtered for VF(s) from port_id.\n\n"
"filtered for VF(s) from port_id.\n\n"
"rx_vlan set tpid (value) (port_id)\n"
" Set the outer VLAN TPID for Packet Filtering on"
@ -309,9 +309,9 @@ static void cmd_help_long_parsed(void *parsed_result,
"mac_addr add port (port_id) vf (vf_id) (mac_address)\n"
" Add a MAC address for a VF on the port.\n\n"
"set port (port_id) uta (mac_address|all) (on|off)\n"
" Add/Remove a or all unicast hash filter(s)"
" Add/Remove a or all unicast hash filter(s)"
"from port X.\n\n"
"set promisc (port_id|all) (on|off)\n"
@ -346,8 +346,8 @@ static void cmd_help_long_parsed(void *parsed_result,
" BAM:accepts broadcast packets;"
"MPE:accepts all multicast packets\n\n"
" Enable/Disable a VF receive mode of a port\n\n"
"set port (port_id) mirror-rule (rule_id)"
"set port (port_id) mirror-rule (rule_id)"
"(pool-mirror|vlan-mirror)\n"
" (poolmask|vlanid[,vlanid]*) dst-pool (pool_id) (on|off)\n"
" Set pool or vlan type mirror rule on a port.\n"
@ -2927,9 +2927,9 @@ static void cmd_set_burst_tx_retry_parsed(void *parsed_result,
if (!strcmp(res->set, "set") && !strcmp(res->burst, "burst")
&& !strcmp(res->tx, "tx")) {
if (!strcmp(res->delay, "delay"))
burst_tx_delay_time = res->time;
burst_tx_delay_time = res->time;
if (!strcmp(res->retry, "retry"))
burst_tx_retry_num = res->retry_num;
burst_tx_retry_num = res->retry_num;
}
}
@ -4564,15 +4564,15 @@ cmd_set_uc_hash_parsed(void *parsed_result,
{
int ret=0;
struct cmd_set_uc_hash_table *res = parsed_result;
int is_on = (strcmp(res->mode, "on") == 0) ? 1 : 0;
if (strcmp(res->what, "uta") == 0)
ret = rte_eth_dev_uc_hash_table_set(res->port_id,
ret = rte_eth_dev_uc_hash_table_set(res->port_id,
&res->address,(uint8_t)is_on);
if (ret < 0)
printf("bad unicast hash table parameter, return code = %d \n", ret);
}
cmdline_parse_token_string_t cmd_set_uc_hash_set =
@ -4588,7 +4588,7 @@ cmdline_parse_token_string_t cmd_set_uc_hash_what =
TOKEN_STRING_INITIALIZER(struct cmd_set_uc_hash_table,
what, "uta");
cmdline_parse_token_etheraddr_t cmd_set_uc_hash_mac =
TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_uc_hash_table,
TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_uc_hash_table,
address);
cmdline_parse_token_string_t cmd_set_uc_hash_mode =
TOKEN_STRING_INITIALIZER(struct cmd_set_uc_hash_table,
@ -4625,14 +4625,14 @@ cmd_set_uc_all_hash_parsed(void *parsed_result,
{
int ret=0;
struct cmd_set_uc_all_hash_table *res = parsed_result;
int is_on = (strcmp(res->mode, "on") == 0) ? 1 : 0;
if ((strcmp(res->what, "uta") == 0) &&
if ((strcmp(res->what, "uta") == 0) &&
(strcmp(res->value, "all") == 0))
ret = rte_eth_dev_uc_all_hash_table_set(res->port_id,(uint8_t) is_on);
if (ret < 0)
printf("bad unicast hash table parameter,"
printf("bad unicast hash table parameter,"
"return code = %d \n", ret);
}
@ -4649,7 +4649,7 @@ cmdline_parse_token_string_t cmd_set_uc_all_hash_what =
TOKEN_STRING_INITIALIZER(struct cmd_set_uc_all_hash_table,
what, "uta");
cmdline_parse_token_string_t cmd_set_uc_all_hash_value =
TOKEN_STRING_INITIALIZER(struct cmd_set_uc_all_hash_table,
TOKEN_STRING_INITIALIZER(struct cmd_set_uc_all_hash_table,
value,"all");
cmdline_parse_token_string_t cmd_set_uc_all_hash_mode =
TOKEN_STRING_INITIALIZER(struct cmd_set_uc_all_hash_table,
@ -4751,7 +4751,7 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
int ret;
uint16_t rx_mode = 0;
struct cmd_set_vf_rxmode *res = parsed_result;
int is_on = (strcmp(res->on, "on") == 0) ? 1 : 0;
if (!strcmp(res->what,"rxmode")) {
if (!strcmp(res->mode, "AUPE"))
@ -4831,7 +4831,7 @@ static void cmd_vf_mac_addr_parsed(void *parsed_result,
int ret = 0;
if (strcmp(res->what, "add") == 0)
ret = rte_eth_dev_mac_addr_add(res->port_num,
ret = rte_eth_dev_mac_addr_add(res->port_num,
&res->address, res->vf_num);
if(ret < 0)
printf("vf_mac_addr_cmd error: (%s)\n", strerror(-ret));
@ -4842,22 +4842,22 @@ cmdline_parse_token_string_t cmd_vf_mac_addr_cmd =
TOKEN_STRING_INITIALIZER(struct cmd_vf_mac_addr_result,
mac_addr_cmd,"mac_addr");
cmdline_parse_token_string_t cmd_vf_mac_addr_what =
TOKEN_STRING_INITIALIZER(struct cmd_vf_mac_addr_result,
TOKEN_STRING_INITIALIZER(struct cmd_vf_mac_addr_result,
what,"add");
cmdline_parse_token_string_t cmd_vf_mac_addr_port =
TOKEN_STRING_INITIALIZER(struct cmd_vf_mac_addr_result,
TOKEN_STRING_INITIALIZER(struct cmd_vf_mac_addr_result,
port,"port");
cmdline_parse_token_num_t cmd_vf_mac_addr_portnum =
TOKEN_NUM_INITIALIZER(struct cmd_vf_mac_addr_result,
TOKEN_NUM_INITIALIZER(struct cmd_vf_mac_addr_result,
port_num, UINT8);
cmdline_parse_token_string_t cmd_vf_mac_addr_vf =
TOKEN_STRING_INITIALIZER(struct cmd_vf_mac_addr_result,
TOKEN_STRING_INITIALIZER(struct cmd_vf_mac_addr_result,
vf,"vf");
cmdline_parse_token_num_t cmd_vf_mac_addr_vfnum =
TOKEN_NUM_INITIALIZER(struct cmd_vf_mac_addr_result,
vf_num, UINT8);
cmdline_parse_token_etheraddr_t cmd_vf_mac_addr_addr =
TOKEN_ETHERADDR_INITIALIZER(struct cmd_vf_mac_addr_result,
TOKEN_ETHERADDR_INITIALIZER(struct cmd_vf_mac_addr_result,
address);
cmdline_parse_inst_t cmd_vf_mac_addr_filter = {
@ -5034,7 +5034,7 @@ cmd_set_mirror_mask_parsed(void *parsed_result,
cmdline_parse_inst_t cmd_set_mirror_mask = {
.f = cmd_set_mirror_mask_parsed,
.data = NULL,
.help_str = "set port X mirror-rule Y pool-mirror|vlan-mirror "
.help_str = "set port X mirror-rule Y pool-mirror|vlan-mirror "
"pool_mask|vlan_id[,vlan_id]* dst-pool Z on|off",
.tokens = {
(void *)&cmd_mirror_mask_set,

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -653,7 +653,7 @@ port_rss_reta_info(portid_t port_id,struct rte_eth_rss_reta *reta_conf)
uint8_t i,j;
int ret;
if (port_id_is_invalid(port_id))
if (port_id_is_invalid(port_id))
return;
ret = rte_eth_dev_rss_reta_query(port_id, reta_conf);
@ -666,14 +666,14 @@ port_rss_reta_info(portid_t port_id,struct rte_eth_rss_reta *reta_conf)
for (i = 0; i< ETH_RSS_RETA_NUM_ENTRIES/2; i++) {
if (reta_conf->mask_lo & (uint64_t)(1ULL << i))
printf("RSS RETA configuration: hash index=%d,"
"queue=%d\n",i,reta_conf->reta[i]);
"queue=%d\n",i,reta_conf->reta[i]);
}
}
if (reta_conf->mask_hi != 0) {
for (i = 0; i< ETH_RSS_RETA_NUM_ENTRIES/2; i++) {
if(reta_conf->mask_hi & (uint64_t)(1ULL << i)) {
j = (uint8_t)(i + ETH_RSS_RETA_NUM_ENTRIES/2);
j = (uint8_t)(i + ETH_RSS_RETA_NUM_ENTRIES/2);
printf("RSS RETA configuration: hash index=%d,"
"queue=%d\n",j,reta_conf->reta[j]);
}
@ -962,13 +962,13 @@ dcb_rxq_2_txq_mapping(queueid_t rxq, queueid_t *txq)
if(dcb_q_mapping == DCB_4_TCS_Q_MAPPING) {
if (rxq < 32)
/* tc0: 0-31 */
*txq = rxq;
/* tc0: 0-31 */
*txq = rxq;
else if (rxq < 64) {
/* tc1: 64-95 */
/* tc1: 64-95 */
*txq = (uint16_t)(rxq + 32);
}
else {
}
else {
/* tc2: 96-111;tc3:112-127 */
*txq = (uint16_t)(rxq/2 + 64);
}
@ -994,7 +994,7 @@ dcb_rxq_2_txq_mapping(queueid_t rxq, queueid_t *txq)
/**
* For the DCB forwarding test, each core is assigned on every port multi-transmit
* queue.
* queue.
*
* Each core is assigned a multi-stream, each stream being composed of
* a RX queue to poll on a RX port for input messages, associated with
@ -1006,7 +1006,7 @@ dcb_rxq_2_txq_mapping(queueid_t rxq, queueid_t *txq)
* - TxPk = (RxPi + 1) if RxPi is even, (RxPi - 1) if RxPi is odd
* - TxQl = RxQj
* In non-VT mode,
* - TxPk = (RxPi + 1) if RxPi is even, (RxPi - 1) if RxPi is odd
* - TxPk = (RxPi + 1) if RxPi is even, (RxPi - 1) if RxPi is odd
* There is a mapping of RxQj to TxQl to be required,and the mapping was implemented
* in dcb_rxq_2_txq_mapping function.
*/
@ -1024,7 +1024,7 @@ dcb_fwd_config_setup(void)
cur_fwd_config.nb_fwd_lcores = (lcoreid_t) nb_fwd_lcores;
cur_fwd_config.nb_fwd_ports = nb_fwd_ports;
cur_fwd_config.nb_fwd_streams =
cur_fwd_config.nb_fwd_streams =
(streamid_t) (nb_q * cur_fwd_config.nb_fwd_ports);
/* reinitialize forwarding streams */
@ -1182,7 +1182,7 @@ fwd_config_display(void)
if((dcb_config) && (nb_fwd_lcores == 1)) {
printf("In DCB mode,the nb forwarding cores should be larger than 1\n");
return;
}
}
fwd_config_setup();
pkt_fwd_config_display(&cur_fwd_config);
}
@ -1786,11 +1786,11 @@ fdir_set_masks(portid_t port_id, struct rte_fdir_masks *fdir_masks)
"diag=%d\n", port_id, diag);
}
void
void
set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on)
{
int diag;
if (port_id_is_invalid(port_id))
return;
if (is_rx)
@ -1799,13 +1799,13 @@ set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on)
diag = rte_eth_dev_set_vf_tx(port_id,vf,on);
if (diag == 0)
return;
if(is_rx)
if(is_rx)
printf("rte_eth_dev_set_vf_rx for port_id=%d failed "
"diag=%d\n", port_id, diag);
else
printf("rte_eth_dev_set_vf_tx for port_id=%d failed "
"diag=%d\n", port_id, diag);
}
void

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -72,7 +72,7 @@ get_phys_map(void *va, phys_addr_t pa[], uint32_t pg_num, uint32_t pg_sz)
"at offset %zu, error code: %d\n",
nb, PAGEMAP_FNAME, (size_t)ofs, errno);
rc = ENOENT;
}
}
close(fd);
@ -136,11 +136,11 @@ mempool_anon_create(const char *name, unsigned elt_num, unsigned elt_size,
if ((usz = rte_mempool_xmem_usage(va, elt_num, total_size, pa,
pg_num, pg_shift)) < 0) {
n = -usz;
rc = ENOENT;
RTE_LOG(ERR, USER1, "%s(%s) only %u objects from %u "
"requested can be created over "
"requested can be created over "
"mmaped region %p of %zu bytes\n",
__func__, name, n, elt_num, va, sz);
} else {
@ -150,7 +150,7 @@ mempool_anon_create(const char *name, unsigned elt_num, unsigned elt_size,
uv = va + usz;
usz = sz - usz;
RTE_LOG(INFO, USER1,
"%s(%s): unmap unused %zu of %zu "
"mmaped bytes @%p\n",
@ -159,7 +159,7 @@ mempool_anon_create(const char *name, unsigned elt_num, unsigned elt_size,
sz -= usz;
pg_num = sz >> pg_shift;
}
if ((mp = rte_mempool_xmem_create(name, elt_num,
elt_size, cache_size, private_data_size,
mp_init, mp_init_arg,
@ -169,7 +169,7 @@ mempool_anon_create(const char *name, unsigned elt_num, unsigned elt_size,
RTE_VERIFY(elt_num == mp->size);
}
}
}
if (mp == NULL) {
munmap(va, sz);

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -364,7 +364,7 @@ parse_portnuma_config(const char *q_arg)
_NUM_FLD
};
unsigned long int_fld[_NUM_FLD];
char *str_fld[_NUM_FLD];
char *str_fld[_NUM_FLD];
/* reset from value set at definition */
while ((p = strchr(p0,'(')) != NULL) {
@ -417,7 +417,7 @@ parse_ringnuma_config(const char *q_arg)
_NUM_FLD
};
unsigned long int_fld[_NUM_FLD];
char *str_fld[_NUM_FLD];
char *str_fld[_NUM_FLD];
#define RX_RING_ONLY 0x1
#define TX_RING_ONLY 0x2
#define RXTX_RING 0x3
@ -475,8 +475,8 @@ parse_ringnuma_config(const char *q_arg)
ring_flag,port_id);
break;
}
}
}
return 0;
}
@ -551,7 +551,7 @@ launch_args_parse(int argc, char** argv)
{ "mp-anon", 0, 0, 0 },
{ "port-numa-config", 1, 0, 0 },
{ "ring-numa-config", 1, 0, 0 },
{ "socket-num", 1, 0, 0 },
{ "socket-num", 1, 0, 0 },
{ "mbuf-size", 1, 0, 0 },
{ "total-num-mbufs", 1, 0, 0 },
{ "max-pkt-len", 1, 0, 0 },

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -95,10 +95,10 @@ uint8_t auto_start = 0;
uint8_t numa_support = 0; /**< No numa support by default */
/*
* In UMA mode,all memory is allocated from socket 0 if --socket-num is
* In UMA mode,all memory is allocated from socket 0 if --socket-num is
* not configured.
*/
uint8_t socket_num = UMA_NO_CONFIG;
uint8_t socket_num = UMA_NO_CONFIG;
/*
* Use ANONYMOUS mapped memory (might be not physically continuous) for mbufs.
@ -178,10 +178,10 @@ uint16_t mb_mempool_cache = DEF_PKT_BURST; /**< Size of mbuf mempool cache. */
/* current configuration is in DCB or not,0 means it is not in DCB mode */
uint8_t dcb_config = 0;
/* Whether the dcb is in testing status */
uint8_t dcb_test = 0;
/* DCB on and VT on mapping is default */
enum dcb_queue_mapping_mode dcb_q_mapping = DCB_VT_Q_MAPPING;
@ -273,7 +273,7 @@ uint8_t no_link_check = 0; /* check by default */
#ifdef RTE_NIC_BYPASS
/* The NIC bypass watchdog timeout. */
uint32_t bypass_timeout = RTE_BYPASS_TMT_OFF;
uint32_t bypass_timeout = RTE_BYPASS_TMT_OFF;
#endif
@ -466,7 +466,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
testpmd_mbuf_pool_ctor, &mbp_ctor_arg,
testpmd_mbuf_ctor, &mb_ctor_arg,
socket_id, 0);
else
else
rte_mp = rte_mempool_create(pool_name, nb_mbuf, mb_size,
(unsigned) mb_mempool_cache,
sizeof(struct rte_pktmbuf_pool_private),
@ -544,13 +544,13 @@ init_config(void)
* Use the maximum value of nb_rxd and nb_txd here, then nb_rxd and
* nb_txd can be configured at run time.
*/
if (param_total_num_mbufs)
if (param_total_num_mbufs)
nb_mbuf_per_pool = param_total_num_mbufs;
else {
nb_mbuf_per_pool = RTE_TEST_RX_DESC_MAX + (nb_lcores * mb_mempool_cache)
+ RTE_TEST_TX_DESC_MAX + MAX_PKT_BURST;
if (!numa_support)
if (!numa_support)
nb_mbuf_per_pool = (nb_mbuf_per_pool * nb_ports);
}
@ -570,13 +570,13 @@ init_config(void)
rte_exit(EXIT_FAILURE, "rte_zmalloc(%d struct rte_port) "
"failed\n", nb_ports);
}
for (pid = 0; pid < nb_ports; pid++) {
port = &ports[pid];
rte_eth_dev_info_get(pid, &port->dev_info);
if (numa_support) {
if (port_numa[pid] != NUMA_NO_CONFIG)
if (port_numa[pid] != NUMA_NO_CONFIG)
port_per_socket[port_numa[pid]]++;
else {
uint32_t socket_id = rte_eth_dev_socket_id(pid);
@ -584,7 +584,7 @@ init_config(void)
/* if socket_id is invalid, set to 0 */
if (check_socket_id(socket_id) < 0)
socket_id = 0;
port_per_socket[socket_id]++;
port_per_socket[socket_id]++;
}
}
@ -601,9 +601,9 @@ init_config(void)
nb_mbuf_per_pool = nb_mbuf_per_pool/nb_ports;
for (i = 0; i < MAX_SOCKET; i++) {
nb_mbuf = (nb_mbuf_per_pool *
nb_mbuf = (nb_mbuf_per_pool *
port_per_socket[i]);
if (nb_mbuf)
if (nb_mbuf)
mbuf_pool_create(mbuf_data_size,
nb_mbuf,i);
}
@ -659,10 +659,10 @@ init_fwd_streams(void)
}
}
else {
if (socket_num == UMA_NO_CONFIG)
if (socket_num == UMA_NO_CONFIG)
port->socket_id = 0;
else
port->socket_id = socket_num;
else
port->socket_id = socket_num;
}
}
@ -1243,7 +1243,7 @@ start_port(portid_t pid)
printf("Fail from init_fwd_streams()\n");
return -1;
}
if(dcb_config)
dcb_test = 1;
for (pi = 0; pi < nb_ports; pi++) {
@ -1281,15 +1281,15 @@ start_port(portid_t pid)
/* setup tx queues */
for (qi = 0; qi < nb_txq; qi++) {
if ((numa_support) &&
(txring_numa[pi] != NUMA_NO_CONFIG))
(txring_numa[pi] != NUMA_NO_CONFIG))
diag = rte_eth_tx_queue_setup(pi, qi,
nb_txd,txring_numa[pi],
&(port->tx_conf));
else
diag = rte_eth_tx_queue_setup(pi, qi,
diag = rte_eth_tx_queue_setup(pi, qi,
nb_txd,port->socket_id,
&(port->tx_conf));
if (diag == 0)
continue;
@ -1306,9 +1306,9 @@ start_port(portid_t pid)
}
/* setup rx queues */
for (qi = 0; qi < nb_rxq; qi++) {
if ((numa_support) &&
if ((numa_support) &&
(rxring_numa[pi] != NUMA_NO_CONFIG)) {
struct rte_mempool * mp =
struct rte_mempool * mp =
mbuf_pool_find(rxring_numa[pi]);
if (mp == NULL) {
printf("Failed to setup RX queue:"
@ -1317,13 +1317,13 @@ start_port(portid_t pid)
rxring_numa[pi]);
return -1;
}
diag = rte_eth_rx_queue_setup(pi, qi,
nb_rxd,rxring_numa[pi],
&(port->rx_conf),mp);
}
else
diag = rte_eth_rx_queue_setup(pi, qi,
diag = rte_eth_rx_queue_setup(pi, qi,
nb_rxd,port->socket_id,
&(port->rx_conf),
mbuf_pool_find(port->socket_id));
@ -1642,7 +1642,7 @@ init_port_config(void)
if( port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0)
port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_RSS;
else
port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_NONE;
port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_NONE;
}
port->rx_conf.rx_thresh = rx_thresh;
@ -1673,7 +1673,7 @@ static int
get_eth_dcb_conf(struct rte_eth_conf *eth_conf, struct dcb_config *dcb_conf)
{
uint8_t i;
/*
* Builds up the correct configuration for dcb+vt based on the vlan tags array
* given above, and the number of traffic classes available for use.
@ -1681,7 +1681,7 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf, struct dcb_config *dcb_conf)
if (dcb_conf->dcb_mode == DCB_VT_ENABLED) {
struct rte_eth_vmdq_dcb_conf vmdq_rx_conf;
struct rte_eth_vmdq_dcb_tx_conf vmdq_tx_conf;
/* VMDQ+DCB RX and TX configrations */
vmdq_rx_conf.enable_default_pool = 0;
vmdq_rx_conf.default_pool = 0;
@ -1689,7 +1689,7 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf, struct dcb_config *dcb_conf)
(dcb_conf->num_tcs == ETH_4_TCS ? ETH_32_POOLS : ETH_16_POOLS);
vmdq_tx_conf.nb_queue_pools =
(dcb_conf->num_tcs == ETH_4_TCS ? ETH_32_POOLS : ETH_16_POOLS);
vmdq_rx_conf.nb_pool_maps = sizeof( vlan_tags )/sizeof( vlan_tags[ 0 ]);
for (i = 0; i < vmdq_rx_conf.nb_pool_maps; i++) {
vmdq_rx_conf.pool_map[i].vlan_id = vlan_tags[ i ];
@ -1699,7 +1699,7 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf, struct dcb_config *dcb_conf)
vmdq_rx_conf.dcb_queue[i] = i;
vmdq_tx_conf.dcb_queue[i] = i;
}
/*set DCB mode of RX and TX of multiple queues*/
eth_conf->rxmode.mq_mode = ETH_MQ_RX_VMDQ_DCB;
eth_conf->txmode.mq_mode = ETH_MQ_TX_VMDQ_DCB;
@ -1707,7 +1707,7 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf, struct dcb_config *dcb_conf)
eth_conf->dcb_capability_en = ETH_DCB_PG_SUPPORT|ETH_DCB_PFC_SUPPORT;
else
eth_conf->dcb_capability_en = ETH_DCB_PG_SUPPORT;
(void)(rte_memcpy(&eth_conf->rx_adv_conf.vmdq_dcb_conf, &vmdq_rx_conf,
sizeof(struct rte_eth_vmdq_dcb_conf)));
(void)(rte_memcpy(&eth_conf->tx_adv_conf.vmdq_dcb_tx_conf, &vmdq_tx_conf,
@ -1716,16 +1716,16 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf, struct dcb_config *dcb_conf)
else {
struct rte_eth_dcb_rx_conf rx_conf;
struct rte_eth_dcb_tx_conf tx_conf;
/* queue mapping configuration of DCB RX and TX */
if (dcb_conf->num_tcs == ETH_4_TCS)
dcb_q_mapping = DCB_4_TCS_Q_MAPPING;
else
dcb_q_mapping = DCB_8_TCS_Q_MAPPING;
rx_conf.nb_tcs = dcb_conf->num_tcs;
tx_conf.nb_tcs = dcb_conf->num_tcs;
for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++){
rx_conf.dcb_queue[i] = i;
tx_conf.dcb_queue[i] = i;
@ -1736,7 +1736,7 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf, struct dcb_config *dcb_conf)
eth_conf->dcb_capability_en = ETH_DCB_PG_SUPPORT|ETH_DCB_PFC_SUPPORT;
else
eth_conf->dcb_capability_en = ETH_DCB_PG_SUPPORT;
(void)(rte_memcpy(&eth_conf->rx_adv_conf.dcb_rx_conf, &rx_conf,
sizeof(struct rte_eth_dcb_rx_conf)));
(void)(rte_memcpy(&eth_conf->tx_adv_conf.dcb_tx_conf, &tx_conf,
@ -1754,25 +1754,25 @@ init_port_dcb_config(portid_t pid,struct dcb_config *dcb_conf)
int retval;
uint16_t nb_vlan;
uint16_t i;
/* rxq and txq configuration in dcb mode */
nb_rxq = 128;
nb_txq = 128;
rx_free_thresh = 64;
memset(&port_conf,0,sizeof(struct rte_eth_conf));
/* Enter DCB configuration status */
dcb_config = 1;
nb_vlan = sizeof( vlan_tags )/sizeof( vlan_tags[ 0 ]);
/*set configuration of DCB in vt mode and DCB in non-vt mode*/
retval = get_eth_dcb_conf(&port_conf, dcb_conf);
if (retval < 0)
return retval;
rte_port = &ports[pid];
memcpy(&rte_port->dev_conf, &port_conf,sizeof(struct rte_eth_conf));
rte_port->rx_conf.rx_thresh = rx_thresh;
rte_port->rx_conf.rx_free_thresh = rx_free_thresh;
rte_port->tx_conf.tx_thresh = tx_thresh;
@ -1783,12 +1783,12 @@ init_port_dcb_config(portid_t pid,struct dcb_config *dcb_conf)
for (i = 0; i < nb_vlan; i++){
rx_vft_set(pid, vlan_tags[i], 1);
}
rte_eth_macaddr_get(pid, &rte_port->eth_addr);
map_port_queue_stats_mapping_registers(pid, rte_port);
rte_port->dcb_flag = 1;
return 0;
}

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -241,7 +241,7 @@ struct dcb_config {
enum rte_eth_nb_tcs num_tcs;
uint8_t pfc_en;
};
/*
* In DCB io FWD mode, 128 RX queue to 128 TX queue mapping
*/
@ -287,20 +287,20 @@ extern uint32_t bypass_timeout; /**< Store the NIC bypass watchdog timeout */
#define MAX_SOCKET 2 /*MAX SOCKET:currently, it is 2 */
/*
* Store specified sockets on which memory pool to be used by ports
* is allocated.
* Store specified sockets on which memory pool to be used by ports
* is allocated.
*/
uint8_t port_numa[RTE_MAX_ETHPORTS];
/*
* Store specified sockets on which RX ring to be used by ports
* is allocated.
* is allocated.
*/
uint8_t rxring_numa[RTE_MAX_ETHPORTS];
/*
* Store specified sockets on which TX ring to be used by ports
* is allocated.
* is allocated.
*/
uint8_t txring_numa[RTE_MAX_ETHPORTS];
@ -525,7 +525,7 @@ void fdir_remove_perfect_filter(portid_t port_id, uint16_t soft_id,
void fdir_set_masks(portid_t port_id, struct rte_fdir_masks *fdir_masks);
void port_rss_reta_info(portid_t port_id, struct rte_eth_rss_reta *reta_conf);
void set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on);
void set_vf_rx_vlan(portid_t port_id, uint16_t vlan_id,
void set_vf_rx_vlan(portid_t port_id, uint16_t vlan_id,
uint64_t vf_mask, uint8_t on);
void port_rss_hash_conf_show(portid_t port_id, int show_rss_key);

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,12 +1,12 @@
# 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
@ -16,7 +16,7 @@
# * 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

View File

@ -1,14 +1,14 @@
#!/usr/bin/python
# 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
@ -18,7 +18,7 @@
# * 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

View File

@ -1,14 +1,14 @@
#!/usr/bin/python
# 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
@ -18,7 +18,7 @@
# * 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

View File

@ -1,14 +1,14 @@
#!/usr/bin/python
# 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
@ -18,7 +18,7 @@
# * 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

View File

@ -1,14 +1,14 @@
#!/usr/bin/python
# 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
@ -18,7 +18,7 @@
# * 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

View File

@ -1,14 +1,14 @@
/*-
* BSD LICENSE
*
*
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* Copyright(c) 2014 6WIND S.A.
* 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
@ -18,7 +18,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -630,7 +630,7 @@ test_parse_ipaddr_invalid_data(void)
int ret;
memset(&result, 0, sizeof(result));
/* test invalid strings */
for (i = 0; i < IPADDR_INVALID_STRS_SIZE; i++) {

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,14 +1,14 @@
/*-
* BSD LICENSE
*
*
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* Copyright(c) 2014 6WIND S.A.
* 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
@ -18,7 +18,7 @@
* * 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
@ -162,7 +162,7 @@ process_hugefiles(const char * prefix, enum hugepage_action action)
rte_snprintf(file_path, sizeof(file_path),
"%s/%s", hugedir, dirent->d_name);
/* remove file */
if (remove(file_path) < 0) {
printf("Error deleting %s - %s!\n",
@ -668,7 +668,7 @@ test_dom0_misc_flags(void)
printf("Error - process did not run ok with --no-shconf flag\n");
return -1;
}
return 0;
}
#else

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -92,7 +92,7 @@ static rte_atomic32_t synchro = RTE_ATOMIC32_INIT(0);
} while(0)
/*
* rte_eal_init only init once
* rte_eal_init only init once
*/
static int
test_eal_init_once(__attribute__((unused)) void *arg)
@ -119,7 +119,7 @@ ring_create_lookup(__attribute__((unused)) void *arg)
int i;
WAIT_SYNCHRO_FOR_SLAVES();
/* create the same ring simultaneously on all threads */
for (i = 0; i < MAX_ITER_TIMES; i++) {
rp = rte_ring_create("fr_test_once", 4096, SOCKET_ID_ANY, 0);
@ -235,7 +235,7 @@ hash_create_free(__attribute__((unused)) void *arg)
};
WAIT_SYNCHRO_FOR_SLAVES();
/* create the same hash simultaneously on all threads */
hash_params.name = "fr_test_once";
for (i = 0; i < MAX_ITER_TIMES; i++) {
@ -250,7 +250,7 @@ hash_create_free(__attribute__((unused)) void *arg)
hash_params.name = hash_name;
handle = rte_hash_create(&hash_params);
if (NULL == handle)
if (NULL == handle)
return -1;
/* verify correct existing and then free all */
@ -303,7 +303,7 @@ fbk_create_free(__attribute__((unused)) void *arg)
};
WAIT_SYNCHRO_FOR_SLAVES();
/* create the same fbk hash table simultaneously on all threads */
fbk_params.name = "fr_test_once";
for (i = 0; i < MAX_ITER_TIMES; i++) {
@ -319,7 +319,7 @@ fbk_create_free(__attribute__((unused)) void *arg)
handle = rte_fbk_hash_create(&fbk_params);
if (NULL == handle)
return -1;
return -1;
/* verify correct existing and then free all */
if (handle != rte_fbk_hash_find_existing(fbk_name))
@ -365,7 +365,7 @@ lpm_create_free(__attribute__((unused)) void *arg)
int i;
WAIT_SYNCHRO_FOR_SLAVES();
/* create the same lpm simultaneously on all threads */
for (i = 0; i < MAX_ITER_TIMES; i++) {
lpm = rte_lpm_create("fr_test_once", SOCKET_ID_ANY, 4, RTE_LPM_HEAP);
@ -378,7 +378,7 @@ lpm_create_free(__attribute__((unused)) void *arg)
rte_snprintf(lpm_name, sizeof(lpm_name), "fr_test_%d_%d", lcore_self, i);
lpm = rte_lpm_create(lpm_name, SOCKET_ID_ANY, 4, RTE_LPM_HEAP);
if (NULL == lpm)
return -1;
return -1;
/* verify correct existing and then free all */
if (lpm != rte_lpm_find_existing(lpm_name))
@ -419,8 +419,8 @@ struct test_case test_cases[] = {
#endif /* RTE_LIBRTE_LPM */
};
/**
* launch test case in two separate thread
/**
* launch test case in two separate thread
*/
static int
launch_test(struct test_case *pt_case)
@ -454,11 +454,11 @@ launch_test(struct test_case *pt_case)
cores--;
if (rte_eal_wait_lcore(lcore_id) < 0)
ret = -1;
if (pt_case->clean != NULL)
pt_case->clean(lcore_id);
}
return ret;
}
@ -482,7 +482,7 @@ test_func_reentrancy(void)
pt_case = &test_cases[case_id];
if (pt_case->func == NULL)
continue;
if (launch_test(pt_case) < 0) {
printf("Func-ReEnt CASE %"PRIu32": %s FAIL\n", case_id, pt_case->name);
return -1;

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -144,7 +144,7 @@ static int
kni_change_mtu(uint8_t port_id, unsigned new_mtu)
{
printf("Change MTU of port %d to %u\n", port_id, new_mtu);
kni_pkt_mtu = new_mtu;
kni_pkt_mtu = new_mtu;
printf("Change MTU of port %d to %i successfully.\n",
port_id, kni_pkt_mtu);
return 0;
@ -458,7 +458,7 @@ test_kni_processing(uint8_t port_id, struct rte_mempool *mp)
return -1;
}
test_kni_ctx = NULL;
/* test of releasing a released kni device */
if (rte_kni_release(kni) == 0) {
printf("should not release a released kni device\n");
@ -477,7 +477,7 @@ test_kni_processing(uint8_t port_id, struct rte_mempool *mp)
printf("fail to release kni\n");
return -1;
}
return ret;
fail_kni:
if (rte_kni_release(kni) < 0) {

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -111,7 +111,7 @@ rte_lpm6_test tests6[] = {
test14,
test15,
test16,
test17,
test17,
test18,
test19,
test20,
@ -167,7 +167,7 @@ test0(void)
{
struct rte_lpm6 *lpm = NULL;
struct rte_lpm6_config config;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -186,12 +186,12 @@ test0(void)
config.max_rules = MAX_RULES;
lpm = rte_lpm6_create(__func__, -2, &config);
TEST_LPM_ASSERT(lpm == NULL);
/* rte_lpm6_create: number_tbl8s is bigger than the maximum */
config.number_tbl8s = MAX_NUM_TBL8S + 1;
lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm == NULL);
/* rte_lpm6_create: config = NULL */
lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, NULL);
TEST_LPM_ASSERT(lpm == NULL);
@ -209,7 +209,7 @@ test1(void)
{
struct rte_lpm6 *lpm1 = NULL, *lpm2 = NULL, *lpm3 = NULL;
struct rte_lpm6_config config;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -221,11 +221,11 @@ test1(void)
/* rte_lpm6_create: lpm name == LPM2 */
lpm2 = rte_lpm6_create("LPM2", SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm2 != NULL);
/* rte_lpm6_create: lpm name == LPM2 */
lpm3 = rte_lpm6_create("LPM1", SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm3 == lpm1);
rte_lpm6_free(lpm1);
rte_lpm6_free(lpm2);
@ -242,7 +242,7 @@ test2(void)
struct rte_lpm6 *lpm = NULL;
struct rte_lpm6_config config;
int32_t i;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -270,11 +270,11 @@ test3(void)
{
struct rte_lpm6 *lpm = NULL;
struct rte_lpm6_config config;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
@ -291,11 +291,11 @@ test4(void)
{
struct rte_lpm6 *lpm = NULL;
struct rte_lpm6_config config;
uint8_t ip[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
uint8_t depth = 24, next_hop = 100;
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -333,7 +333,7 @@ test5(void)
uint8_t ip[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
uint8_t depth = 24;
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -371,7 +371,7 @@ test6(void)
uint8_t ip[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
uint8_t next_hop_return = 0;
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -383,7 +383,7 @@ test6(void)
/*Create vaild lpm to use in rest of test. */
lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
/* rte_lpm6_lookup: ip = NULL */
status = rte_lpm6_lookup(lpm, NULL, &next_hop_return);
TEST_LPM_ASSERT(status < 0);
@ -409,7 +409,7 @@ test7(void)
uint8_t ip[10][16];
int16_t next_hop_return[10];
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -421,7 +421,7 @@ test7(void)
/*Create vaild lpm to use in rest of test. */
lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
/* rte_lpm6_lookup: ip = NULL */
status = rte_lpm6_lookup_bulk_func(lpm, NULL, next_hop_return, 10);
TEST_LPM_ASSERT(status < 0);
@ -447,7 +447,7 @@ test8(void)
uint8_t ip[10][16];
uint8_t depth[10];
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -459,7 +459,7 @@ test8(void)
/*Create vaild lpm to use in rest of test. */
lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
/* rte_lpm6_delete: ip = NULL */
status = rte_lpm6_delete_bulk_func(lpm, NULL, depth, 10);
TEST_LPM_ASSERT(status < 0);
@ -487,7 +487,7 @@ test9(void)
uint8_t depth = 16, next_hop_add = 100, next_hop_return = 0;
int32_t status = 0;
uint8_t i;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -497,16 +497,16 @@ test9(void)
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
for (i = 0; i < UINT8_MAX; i++) {
ip[2] = i;
status = rte_lpm6_lookup(lpm, ip, &next_hop_return);
TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add));
}
status = rte_lpm6_delete(lpm, ip, depth);
TEST_LPM_ASSERT(status == 0);
for (i = 0; i < UINT8_MAX; i++) {
ip[2] = i;
status = rte_lpm6_lookup(lpm, ip, &next_hop_return);
@ -531,14 +531,14 @@ test10(void)
uint8_t depth, next_hop_add = 100;
int32_t status = 0;
int i;
config.max_rules = 127;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
for (i = 1; i < 128; i++) {
depth = (uint8_t)i;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
@ -574,7 +574,7 @@ test11(void)
uint8_t ip[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
uint8_t depth, next_hop_add = 100;
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = 16;
config.flags = 0;
@ -585,33 +585,33 @@ test11(void)
depth = 128;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
ip[0] = 1;
depth = 25;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
status = rte_lpm6_delete(lpm, ip, depth);
TEST_LPM_ASSERT(status == 0);
depth = 33;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
status = rte_lpm6_delete(lpm, ip, depth);
TEST_LPM_ASSERT(status == 0);
depth = 41;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
status = rte_lpm6_delete(lpm, ip, depth);
TEST_LPM_ASSERT(status == 0);
depth = 49;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == -ENOSPC);
depth = 41;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
@ -634,7 +634,7 @@ test12(void)
uint8_t ip[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
uint8_t depth, next_hop_add = 100;
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = 16;
config.flags = 0;
@ -645,12 +645,12 @@ test12(void)
depth = 128;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
ip[0] = 1;
depth = 41;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
depth = 49;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == -ENOSPC);
@ -672,7 +672,7 @@ test13(void)
uint8_t ip[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
uint8_t depth, next_hop_add = 100;
int32_t status = 0;
config.max_rules = 2;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -683,19 +683,19 @@ test13(void)
depth = 1;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
depth = 2;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
depth = 3;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == -ENOSPC);
depth = 2;
status = rte_lpm6_delete(lpm, ip, depth);
TEST_LPM_ASSERT(status == 0);
depth = 3;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
@ -720,14 +720,14 @@ test14(void)
uint8_t depth = 25, next_hop_add = 100;
int32_t status = 0;
int i, j;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
for (i = 0; i < 256; i++) {
ip[0] = (uint8_t)i;
for (j = 0; j < 256; j++) {
@ -745,7 +745,7 @@ test14(void)
ip[0] = 255;
ip[1] = 255;
ip[2] = 0;
ip[2] = 0;
status = rte_lpm6_delete(lpm, ip, depth);
TEST_LPM_ASSERT(status == 0);
@ -771,7 +771,7 @@ test15(void)
uint8_t ip[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
uint8_t depth = 24, next_hop_add = 100, next_hop_return = 0;
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -784,7 +784,7 @@ test15(void)
status = rte_lpm6_lookup(lpm, ip, &next_hop_return);
TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add));
status = rte_lpm6_delete(lpm, ip, depth);
TEST_LPM_ASSERT(status == 0);
@ -807,7 +807,7 @@ test16(void)
uint8_t ip[] = {12,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0};
uint8_t depth = 128, next_hop_add = 100, next_hop_return = 0;
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -820,7 +820,7 @@ test16(void)
status = rte_lpm6_lookup(lpm, ip, &next_hop_return);
TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add));
status = rte_lpm6_delete(lpm, ip, depth);
TEST_LPM_ASSERT(status == 0);
@ -851,7 +851,7 @@ test17(void)
uint8_t ip2[] = {128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
uint8_t depth, next_hop_add, next_hop_return;
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -875,7 +875,7 @@ test17(void)
TEST_LPM_ASSERT((status == 0) &&
(next_hop_return == next_hop_add));
}
/* Loop with rte_lpm6_delete. */
for (depth = 128; depth >= 1; depth--) {
next_hop_add = (uint8_t) (depth - 1);
@ -917,7 +917,7 @@ test18(void)
uint8_t depth, depth_1, depth_2, next_hop_add, next_hop_add_1,
next_hop_add_2, next_hop_return;
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -935,7 +935,7 @@ test18(void)
status = rte_lpm6_lookup(lpm, ip, &next_hop_return);
TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add));
status = rte_lpm6_delete(lpm, ip, depth);
TEST_LPM_ASSERT(status == 0);
@ -963,7 +963,7 @@ test18(void)
status = rte_lpm6_lookup(lpm, ip, &next_hop_return);
TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add));
depth = 24;
status = rte_lpm6_delete(lpm, ip, depth);
@ -1008,7 +1008,7 @@ test18(void)
status = rte_lpm6_lookup(lpm, ip, &next_hop_return);
TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add));
status = rte_lpm6_delete(lpm, ip, depth);
TEST_LPM_ASSERT(status == 0);
@ -1078,7 +1078,7 @@ test19(void)
uint8_t ip[16];
uint8_t depth, next_hop_add, next_hop_return;
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -1170,7 +1170,7 @@ test19(void)
rte_lpm6_delete_all(lpm);
/*
/*
* Add rule that updates the next hop in TBL24 & lookup
* (& delete & lookup)
*/
@ -1276,7 +1276,7 @@ test20(void)
uint8_t ip[16];
uint8_t depth, next_hop_add, next_hop_return;
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -1344,7 +1344,7 @@ test21(void)
uint8_t depth, next_hop_add;
int16_t next_hop_return[4];
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -1358,23 +1358,23 @@ test21(void)
status = rte_lpm6_add(lpm, ip_batch[0], depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
IPv6(ip_batch[1], 128, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
depth = 48;
next_hop_add = 101;
status = rte_lpm6_add(lpm, ip_batch[1], depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
IPv6(ip_batch[2], 128, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
depth = 48;
next_hop_add = 102;
status = rte_lpm6_add(lpm, ip_batch[2], depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
IPv6(ip_batch[3], 128, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
status = rte_lpm6_lookup_bulk_func(lpm, ip_batch,
next_hop_return, 4);
TEST_LPM_ASSERT(status == 0 && next_hop_return[0] == 100
@ -1402,97 +1402,97 @@ test22(void)
uint8_t depth[5], next_hop_add;
int16_t next_hop_return[5];
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
/* Adds 5 rules and look them up */
IPv6(ip_batch[0], 128, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
depth[0] = 48;
next_hop_add = 101;
status = rte_lpm6_add(lpm, ip_batch[0], depth[0], next_hop_add);
TEST_LPM_ASSERT(status == 0);
IPv6(ip_batch[1], 128, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
depth[1] = 48;
next_hop_add = 102;
status = rte_lpm6_add(lpm, ip_batch[1], depth[1], next_hop_add);
TEST_LPM_ASSERT(status == 0);
IPv6(ip_batch[2], 128, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
depth[2] = 48;
next_hop_add = 103;
status = rte_lpm6_add(lpm, ip_batch[2], depth[2], next_hop_add);
TEST_LPM_ASSERT(status == 0);
IPv6(ip_batch[3], 128, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
depth[3] = 48;
next_hop_add = 104;
status = rte_lpm6_add(lpm, ip_batch[3], depth[3], next_hop_add);
TEST_LPM_ASSERT(status == 0);
IPv6(ip_batch[4], 128, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
depth[4] = 48;
next_hop_add = 105;
status = rte_lpm6_add(lpm, ip_batch[4], depth[4], next_hop_add);
TEST_LPM_ASSERT(status == 0);
status = rte_lpm6_lookup_bulk_func(lpm, ip_batch,
next_hop_return, 5);
TEST_LPM_ASSERT(status == 0 && next_hop_return[0] == 101
&& next_hop_return[1] == 102 && next_hop_return[2] == 103
&& next_hop_return[3] == 104 && next_hop_return[4] == 105);
/* Use the delete_bulk function to delete two of them. Lookup again */
status = rte_lpm6_delete_bulk_func(lpm, &ip_batch[0], depth, 2);
TEST_LPM_ASSERT(status == 0);
status = rte_lpm6_lookup_bulk_func(lpm, ip_batch,
next_hop_return, 5);
TEST_LPM_ASSERT(status == 0 && next_hop_return[0] == -1
&& next_hop_return[1] == -1 && next_hop_return[2] == 103
&& next_hop_return[3] == 104 && next_hop_return[4] == 105);
/* Use the delete_bulk function to delete one more. Lookup again */
status = rte_lpm6_delete_bulk_func(lpm, &ip_batch[2], depth, 1);
TEST_LPM_ASSERT(status == 0);
status = rte_lpm6_lookup_bulk_func(lpm, ip_batch,
next_hop_return, 5);
TEST_LPM_ASSERT(status == 0 && next_hop_return[0] == -1
&& next_hop_return[1] == -1 && next_hop_return[2] == -1
&& next_hop_return[3] == 104 && next_hop_return[4] == 105);
/* Use the delete_bulk function to delete two, one invalid. Lookup again */
IPv6(ip_batch[4], 128, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
status = rte_lpm6_delete_bulk_func(lpm, &ip_batch[3], depth, 2);
TEST_LPM_ASSERT(status == 0);
IPv6(ip_batch[4], 128, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
status = rte_lpm6_lookup_bulk_func(lpm, ip_batch,
next_hop_return, 5);
TEST_LPM_ASSERT(status == 0 && next_hop_return[0] == -1
&& next_hop_return[1] == -1 && next_hop_return[2] == -1
&& next_hop_return[3] == -1 && next_hop_return[4] == 105);
/* Use the delete_bulk function to delete the remaining one. Lookup again */
status = rte_lpm6_delete_bulk_func(lpm, &ip_batch[4], depth, 1);
TEST_LPM_ASSERT(status == 0);
status = rte_lpm6_lookup_bulk_func(lpm, ip_batch,
next_hop_return, 5);
TEST_LPM_ASSERT(status == 0 && next_hop_return[0] == -1
@ -1518,7 +1518,7 @@ test23(void)
uint8_t ip[16];
uint8_t depth, next_hop_add, next_hop_return;
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -1562,7 +1562,7 @@ test24(void)
{
struct rte_lpm6 *lpm = NULL, *result = NULL;
struct rte_lpm6_config config;
config.max_rules = 256 * 32;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -1602,7 +1602,7 @@ test25(void)
uint32_t i;
uint8_t depth, next_hop_add, next_hop_return, next_hop_expected;
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -1617,11 +1617,11 @@ test25(void)
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
}
for (i = 0; i < 100000; i++) {
memcpy(ip, large_ips_table[i].ip, 16);
next_hop_expected = large_ips_table[i].next_hop;
status = rte_lpm6_lookup(lpm, ip, &next_hop_return);
TEST_LPM_ASSERT((status == 0) &&
(next_hop_return == next_hop_expected));
@ -1655,7 +1655,7 @@ test26(void)
uint8_t next_hop_ip_20_25 = 111;
uint8_t next_hop_return = 0;
int32_t status = 0;
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -1740,7 +1740,7 @@ test27(void)
next_hop_add = 128;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
depth = 112;
next_hop_add = 112;
status = rte_lpm6_add(lpm, ip, depth, next_hop_add);
@ -1804,7 +1804,7 @@ perf_test(void)
uint8_t next_hop_add = 0xAA, next_hop_return = 0;
int status = 0;
int64_t count = 0;
config.max_rules = 1000000;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
@ -1852,24 +1852,24 @@ perf_test(void)
printf("Average LPM Lookup: %.1f cycles (fails = %.1f%%)\n",
(double)total_time / ((double)ITERATIONS * BATCH_SIZE),
(count * 100.0) / (double)(ITERATIONS * BATCH_SIZE));
/* Measure bulk Lookup */
total_time = 0;
count = 0;
uint8_t ip_batch[NUM_IPS_ENTRIES][16];
int16_t next_hops[NUM_IPS_ENTRIES];
for (i = 0; i < NUM_IPS_ENTRIES; i++)
memcpy(ip_batch[i], large_ips_table[i].ip, 16);
for (i = 0; i < ITERATIONS; i ++) {
/* Lookup per batch */
begin = rte_rdtsc();
rte_lpm6_lookup_bulk_func(lpm, ip_batch, next_hops, NUM_IPS_ENTRIES);
total_time += rte_rdtsc() - begin;
for (j = 0; j < NUM_IPS_ENTRIES; j++)
if (next_hops[j] < 0)
count++;
@ -1910,7 +1910,7 @@ test_lpm6(void)
for (i = 0; i < NUM_LPM6_TESTS; i++) {
status = tests6[i]();
if (status < 0) {
printf("ERROR: LPM Test %s: FAIL\n", RTE_STR(tests6[i]));
global_status = status;

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -45,7 +45,7 @@ struct ips_tbl_entry {
};
static struct rules_tbl_entry large_route_table[] =
{
{
{{66, 70, 154, 143, 197, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 50, 146},
{{107, 79, 18, 235, 142, 84, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 54, 141},
{{247, 132, 113, 1, 215, 247, 183, 239, 128, 0, 0, 0, 0, 0, 0, 0}, 67, 23},

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -464,7 +464,7 @@ test_pktmbuf_pool_ptr(void)
unsigned i;
struct rte_mbuf *m[NB_MBUF];
int ret = 0;
for (i=0; i<NB_MBUF; i++)
m[i] = NULL;
@ -483,10 +483,10 @@ test_pktmbuf_pool_ptr(void)
if (m[i] != NULL)
rte_pktmbuf_free(m[i]);
}
for (i=0; i<NB_MBUF; i++)
m[i] = NULL;
/* alloc NB_MBUF mbufs */
for (i=0; i<NB_MBUF; i++) {
m[i] = rte_pktmbuf_alloc(pktmbuf_pool);
@ -861,7 +861,7 @@ test_mbuf(void)
printf("test_mbuf_pool() failed (2)\n");
return -1;
}
/* test that the pointer to the data on a packet mbuf is set properly */
if (test_pktmbuf_pool_ptr() < 0) {
printf("test_pktmbuf_pool_ptr() failed\n");

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -569,7 +569,7 @@ check_memzone_bounded(const char *name, uint32_t len, uint32_t align,
bmask = ~((phys_addr_t)bound - 1);
if ((mz = rte_memzone_reserve_bounded(name, len, SOCKET_ID_ANY, 0,
if ((mz = rte_memzone_reserve_bounded(name, len, SOCKET_ID_ANY, 0,
align, bound)) == NULL) {
printf("%s(%s): memzone creation failed\n",
__func__, name);
@ -620,7 +620,7 @@ test_memzone_bounded(void)
"conditions\n", __func__, memzone_err->name);
return (-1);
}
/* should fail as len is greater then boundary */
name = "bounded_error_32";
if ((memzone_err = rte_memzone_reserve_bounded(name,

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -66,21 +66,21 @@
#define TM_TEST_TRTCM_CBS_DF 2048
#define TM_TEST_TRTCM_PBS_DF 4096
static struct rte_meter_srtcm_params sparams =
{.cir = TM_TEST_SRTCM_CIR_DF,
.cbs = TM_TEST_SRTCM_CBS_DF,
static struct rte_meter_srtcm_params sparams =
{.cir = TM_TEST_SRTCM_CIR_DF,
.cbs = TM_TEST_SRTCM_CBS_DF,
.ebs = TM_TEST_SRTCM_EBS_DF,};
static struct rte_meter_trtcm_params tparams=
{.cir = TM_TEST_TRTCM_CIR_DF,
.pir = TM_TEST_TRTCM_PIR_DF,
.cbs = TM_TEST_TRTCM_CBS_DF,
static struct rte_meter_trtcm_params tparams=
{.cir = TM_TEST_TRTCM_CIR_DF,
.pir = TM_TEST_TRTCM_PIR_DF,
.cbs = TM_TEST_TRTCM_CBS_DF,
.pbs = TM_TEST_TRTCM_PBS_DF,};
/**
* functional test for rte_meter_srtcm_config
*/
static inline int
static inline int
tm_test_srtcm_config(void)
{
#define SRTCM_CFG_MSG "srtcm_config"
@ -112,16 +112,16 @@ tm_test_srtcm_config(void)
sparams1 = sparams;
sparams1.ebs = 0;
if(rte_meter_srtcm_config(&sm, &sparams1) != 0)
melog(SRTCM_CFG_MSG);
melog(SRTCM_CFG_MSG);
sparams1 = sparams;
sparams1.cbs = 0;
if(rte_meter_srtcm_config(&sm, &sparams1) != 0)
melog(SRTCM_CFG_MSG);
melog(SRTCM_CFG_MSG);
/* usual parameter, should be successful */
if(rte_meter_srtcm_config(&sm, &sparams) != 0)
melog(SRTCM_CFG_MSG);
melog(SRTCM_CFG_MSG);
return 0;
@ -130,7 +130,7 @@ tm_test_srtcm_config(void)
/**
* functional test for rte_meter_trtcm_config
*/
static inline int
static inline int
tm_test_trtcm_config(void)
{
struct rte_meter_trtcm tm;
@ -159,12 +159,12 @@ tm_test_trtcm_config(void)
tparams1 = tparams;
tparams1.pbs = 0;
if(rte_meter_trtcm_config(&tm, &tparams1) == 0)
melog(TRTCM_CFG_MSG);
melog(TRTCM_CFG_MSG);
tparams1 = tparams;
tparams1.pir = 0;
if(rte_meter_trtcm_config(&tm, &tparams1) == 0)
melog(TRTCM_CFG_MSG);
melog(TRTCM_CFG_MSG);
/* pir should be greater or equal to cir */
tparams1 = tparams;
@ -174,7 +174,7 @@ tm_test_trtcm_config(void)
/* usual parameter, should be successful */
if(rte_meter_trtcm_config(&tm, &tparams) != 0)
melog(TRTCM_CFG_MSG);
melog(TRTCM_CFG_MSG);
return 0;
}
@ -182,29 +182,29 @@ tm_test_trtcm_config(void)
/**
* functional test for rte_meter_srtcm_color_blind_check
*/
static inline int
static inline int
tm_test_srtcm_color_blind_check(void)
{
#define SRTCM_BLIND_CHECK_MSG "srtcm_blind_check"
struct rte_meter_srtcm sm;
uint64_t time;
uint64_t hz = rte_get_tsc_hz();
/* Test green */
if(rte_meter_srtcm_config(&sm, &sparams) != 0)
melog(SRTCM_BLIND_CHECK_MSG);
time = rte_get_tsc_cycles() + hz;
if(rte_meter_srtcm_color_blind_check(
&sm, time, TM_TEST_SRTCM_CBS_DF - 1)
&sm, time, TM_TEST_SRTCM_CBS_DF - 1)
!= e_RTE_METER_GREEN)
melog(SRTCM_BLIND_CHECK_MSG" GREEN");
/* Test yellow */
if(rte_meter_srtcm_config(&sm, &sparams) != 0)
melog(SRTCM_BLIND_CHECK_MSG);
time = rte_get_tsc_cycles() + hz;
if(rte_meter_srtcm_color_blind_check(
&sm, time, TM_TEST_SRTCM_CBS_DF + 1)
&sm, time, TM_TEST_SRTCM_CBS_DF + 1)
!= e_RTE_METER_YELLOW)
melog(SRTCM_BLIND_CHECK_MSG" YELLOW");
@ -220,10 +220,10 @@ tm_test_srtcm_color_blind_check(void)
melog(SRTCM_BLIND_CHECK_MSG);
time = rte_get_tsc_cycles() + hz;
if(rte_meter_srtcm_color_blind_check(
&sm, time, TM_TEST_SRTCM_EBS_DF + 1)
&sm, time, TM_TEST_SRTCM_EBS_DF + 1)
!= e_RTE_METER_RED)
melog(SRTCM_BLIND_CHECK_MSG" RED");
return 0;
}
@ -231,7 +231,7 @@ tm_test_srtcm_color_blind_check(void)
/**
* functional test for rte_meter_trtcm_color_blind_check
*/
static inline int
static inline int
tm_test_trtcm_color_blind_check(void)
{
#define TRTCM_BLIND_CHECK_MSG "trtcm_blind_check"
@ -239,22 +239,22 @@ tm_test_trtcm_color_blind_check(void)
uint64_t time;
struct rte_meter_trtcm tm;
uint64_t hz = rte_get_tsc_hz();
/* Test green */
if(rte_meter_trtcm_config(&tm, &tparams) != 0)
melog(TRTCM_BLIND_CHECK_MSG);
time = rte_get_tsc_cycles() + hz;
if(rte_meter_trtcm_color_blind_check(
&tm, time, TM_TEST_TRTCM_CBS_DF - 1)
&tm, time, TM_TEST_TRTCM_CBS_DF - 1)
!= e_RTE_METER_GREEN)
melog(TRTCM_BLIND_CHECK_MSG" GREEN");
/* Test yellow */
if(rte_meter_trtcm_config(&tm, &tparams) != 0)
melog(TRTCM_BLIND_CHECK_MSG);
time = rte_get_tsc_cycles() + hz;
if(rte_meter_trtcm_color_blind_check(
&tm, time, TM_TEST_TRTCM_CBS_DF + 1)
&tm, time, TM_TEST_TRTCM_CBS_DF + 1)
!= e_RTE_METER_YELLOW)
melog(TRTCM_BLIND_CHECK_MSG" YELLOW");
@ -262,7 +262,7 @@ tm_test_trtcm_color_blind_check(void)
melog(TRTCM_BLIND_CHECK_MSG);
time = rte_get_tsc_cycles() + hz;
if(rte_meter_trtcm_color_blind_check(
&tm, time, TM_TEST_TRTCM_PBS_DF - 1)
&tm, time, TM_TEST_TRTCM_PBS_DF - 1)
!= e_RTE_METER_YELLOW)
melog(TRTCM_BLIND_CHECK_MSG" YELLOW");
@ -271,7 +271,7 @@ tm_test_trtcm_color_blind_check(void)
melog(TRTCM_BLIND_CHECK_MSG);
time = rte_get_tsc_cycles() + hz;
if(rte_meter_trtcm_color_blind_check(
&tm, time, TM_TEST_TRTCM_PBS_DF + 1)
&tm, time, TM_TEST_TRTCM_PBS_DF + 1)
!= e_RTE_METER_RED)
melog(TRTCM_BLIND_CHECK_MSG" RED");
@ -282,13 +282,13 @@ tm_test_trtcm_color_blind_check(void)
/**
* @in[4] : the flags packets carries.
* @in[4] : the flags function expect to return.
* It will do blind check at the time of 1 second from beginning.
* At the time, it will use packets length of cbs -1, cbs + 1,
* It will do blind check at the time of 1 second from beginning.
* At the time, it will use packets length of cbs -1, cbs + 1,
* ebs -1 and ebs +1 with flag in[0], in[1], in[2] and in[3] to do
* aware check, expect flag out[0], out[1], out[2] and out[3]
*/
static inline int
static inline int
tm_test_srtcm_aware_check
(enum rte_meter_color in[4], enum rte_meter_color out[4])
{
@ -296,14 +296,14 @@ tm_test_srtcm_aware_check
struct rte_meter_srtcm sm;
uint64_t time;
uint64_t hz = rte_get_tsc_hz();
if(rte_meter_srtcm_config(&sm, &sparams) != 0)
melog(SRTCM_AWARE_CHECK_MSG);
time = rte_get_tsc_cycles() + hz;
if(rte_meter_srtcm_color_aware_check(
&sm, time, TM_TEST_SRTCM_CBS_DF - 1, in[0]) != out[0])
melog(SRTCM_AWARE_CHECK_MSG" %u:%u", in[0], out[0]);
if(rte_meter_srtcm_config(&sm, &sparams) != 0)
melog(SRTCM_AWARE_CHECK_MSG);
time = rte_get_tsc_cycles() + hz;
@ -324,7 +324,7 @@ tm_test_srtcm_aware_check
if(rte_meter_srtcm_color_aware_check(
&sm, time, TM_TEST_SRTCM_EBS_DF + 1, in[3]) != out[3])
melog(SRTCM_AWARE_CHECK_MSG" %u:%u", in[3], out[3]);
return 0;
}
@ -332,14 +332,14 @@ tm_test_srtcm_aware_check
/**
* functional test for rte_meter_srtcm_color_aware_check
*/
static inline int
static inline int
tm_test_srtcm_color_aware_check(void)
{
enum rte_meter_color in[4], out[4];
/**
* test 4 points that will produce green, yellow, yellow, red flag
* if using blind check
* test 4 points that will produce green, yellow, yellow, red flag
* if using blind check
*/
/* previouly have a green, test points should keep unchanged */
@ -352,7 +352,7 @@ tm_test_srtcm_color_aware_check(void)
return -1;
/**
* previously have a yellow, green & yellow = yellow
* previously have a yellow, green & yellow = yellow
* yellow & red = red
*/
in[0] = in[1] = in[2] = in[3] = e_RTE_METER_YELLOW;
@ -362,9 +362,9 @@ tm_test_srtcm_color_aware_check(void)
out[3] = e_RTE_METER_RED;
if(tm_test_srtcm_aware_check(in, out) != 0)
return -1;
/**
* previously have a red, red & green = red
* previously have a red, red & green = red
* red & yellow = red
*/
in[0] = in[1] = in[2] = in[3] = e_RTE_METER_RED;
@ -381,12 +381,12 @@ tm_test_srtcm_color_aware_check(void)
/**
* @in[4] : the flags packets carries.
* @in[4] : the flags function expect to return.
* It will do blind check at the time of 1 second from beginning.
* At the time, it will use packets length of cbs -1, cbs + 1,
* It will do blind check at the time of 1 second from beginning.
* At the time, it will use packets length of cbs -1, cbs + 1,
* ebs -1 and ebs +1 with flag in[0], in[1], in[2] and in[3] to do
* aware check, expect flag out[0], out[1], out[2] and out[3]
*/
static inline int
static inline int
tm_test_trtcm_aware_check
(enum rte_meter_color in[4], enum rte_meter_color out[4])
{
@ -394,14 +394,14 @@ tm_test_trtcm_aware_check
struct rte_meter_trtcm tm;
uint64_t time;
uint64_t hz = rte_get_tsc_hz();
if(rte_meter_trtcm_config(&tm, &tparams) != 0)
melog(TRTCM_AWARE_CHECK_MSG);
time = rte_get_tsc_cycles() + hz;
if(rte_meter_trtcm_color_aware_check(
&tm, time, TM_TEST_TRTCM_CBS_DF - 1, in[0]) != out[0])
melog(TRTCM_AWARE_CHECK_MSG" %u:%u", in[0], out[0]);
if(rte_meter_trtcm_config(&tm, &tparams) != 0)
melog(TRTCM_AWARE_CHECK_MSG);
time = rte_get_tsc_cycles() + hz;
@ -422,7 +422,7 @@ tm_test_trtcm_aware_check
if(rte_meter_trtcm_color_aware_check(
&tm, time, TM_TEST_TRTCM_PBS_DF + 1, in[3]) != out[3])
melog(TRTCM_AWARE_CHECK_MSG" %u:%u", in[3], out[3]);
return 0;
}
@ -431,13 +431,13 @@ tm_test_trtcm_aware_check
* functional test for rte_meter_trtcm_color_aware_check
*/
static inline int
static inline int
tm_test_trtcm_color_aware_check(void)
{
enum rte_meter_color in[4], out[4];
/**
* test 4 points that will produce green, yellow, yellow, red flag
* if using blind check
* test 4 points that will produce green, yellow, yellow, red flag
* if using blind check
*/
/* previouly have a green, test points should keep unchanged */
@ -448,7 +448,7 @@ tm_test_trtcm_color_aware_check(void)
out[3] = e_RTE_METER_RED;
if(tm_test_trtcm_aware_check(in, out) != 0)
return -1;
in[0] = in[1] = in[2] = in[3] = e_RTE_METER_YELLOW;
out[0] = e_RTE_METER_YELLOW;
out[1] = e_RTE_METER_YELLOW;
@ -456,7 +456,7 @@ tm_test_trtcm_color_aware_check(void)
out[3] = e_RTE_METER_RED;
if(tm_test_trtcm_aware_check(in, out) != 0)
return -1;
in[0] = in[1] = in[2] = in[3] = e_RTE_METER_RED;
out[0] = e_RTE_METER_RED;
out[1] = e_RTE_METER_RED;
@ -471,14 +471,14 @@ tm_test_trtcm_color_aware_check(void)
/**
* test main entrance for library meter
*/
int
int
test_meter(void)
{
if(tm_test_srtcm_config() != 0 )
return -1;
if(tm_test_trtcm_config() != 0 )
return -1;
return -1;
if(tm_test_srtcm_color_blind_check() != 0)
return -1;
@ -488,10 +488,10 @@ test_meter(void)
if(tm_test_srtcm_color_aware_check()!= 0)
return -1;
if(tm_test_trtcm_color_aware_check()!= 0)
return -1;
return 0;
}

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -174,7 +174,7 @@ run_object_creation_tests(void)
printf("### Testing object creation - expect lots of mz reserve errors!\n");
rte_errno = 0;
if ((rte_memzone_reserve("test_mz", size, rte_socket_id(),
if ((rte_memzone_reserve("test_mz", size, rte_socket_id(),
flags) == NULL) &&
(rte_memzone_lookup("test_mz") == NULL)) {
printf("Error: unexpected return value from rte_memzone_reserve\n");
@ -213,7 +213,7 @@ run_object_creation_tests(void)
const struct rte_fbk_hash_params fbk_params = { .name = "test_fbk_mp_hash" };
rte_errno=0;
if ((rte_fbk_hash_create(&fbk_params) != NULL) &&
if ((rte_fbk_hash_create(&fbk_params) != NULL) &&
(rte_fbk_hash_find_existing(fbk_params.name) == NULL)){
printf("Error: unexpected return value from rte_fbk_hash_create()\n");
return -1;

View File

@ -1,14 +1,14 @@
/*-
* BSD LICENSE
*
*
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* Copyright(c) 2014 6WIND S.A.
* 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
@ -18,7 +18,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -65,7 +65,7 @@ test_ethdev_configure(void)
struct rte_eth_link link;
memset(&null_conf, 0, sizeof(struct rte_eth_conf));
if ((TX_PORT >= RTE_MAX_ETHPORTS) || (RX_PORT >= RTE_MAX_ETHPORTS)\
|| (RXTX_PORT >= RTE_MAX_ETHPORTS)) {
printf(" TX/RX port exceed max eth ports\n");
@ -206,7 +206,7 @@ test_stats_reset(void)
printf("Testing ring PMD stats reset\n");
rte_eth_stats_reset(RXTX_PORT);
/* check stats of RXTX port, should all be zero */
rte_eth_stats_get(RXTX_PORT, &stats);
if (stats.ipackets != 0 || stats.opackets != 0 ||
@ -236,7 +236,7 @@ test_stats_reset(void)
}
rte_eth_stats_reset(RXTX_PORT);
/* check stats of RXTX port, should all be zero */
rte_eth_stats_get(RXTX_PORT, &stats);
if (stats.ipackets != 0 || stats.opackets != 0 ||
@ -249,7 +249,7 @@ test_stats_reset(void)
return 0;
}
static int
static int
test_pmd_ring_init(void)
{
struct rte_eth_stats stats;
@ -330,13 +330,13 @@ test_pmd_ring_pair_create(void)
return -1;
}
if ((rte_eth_rx_queue_setup(RXTX_PORT4, 0, RING_SIZE, SOCKET0, NULL, mp) < 0)
if ((rte_eth_rx_queue_setup(RXTX_PORT4, 0, RING_SIZE, SOCKET0, NULL, mp) < 0)
|| (rte_eth_rx_queue_setup(RXTX_PORT5, 0, RING_SIZE, SOCKET0, NULL, mp) < 0)) {
printf("RX queue setup failed\n");
return -1;
}
if ((rte_eth_dev_start(RXTX_PORT4) < 0)
if ((rte_eth_dev_start(RXTX_PORT4) < 0)
|| (rte_eth_dev_start(RXTX_PORT5) < 0)) {
printf("Error starting RXTX port\n");
return -1;
@ -398,18 +398,18 @@ test_pmd_ring_pair_attach(void)
return -1;
}
if ((rte_eth_rx_queue_setup(RXTX_PORT4, 0, RING_SIZE, SOCKET0, NULL, mp) < 0)
if ((rte_eth_rx_queue_setup(RXTX_PORT4, 0, RING_SIZE, SOCKET0, NULL, mp) < 0)
|| (rte_eth_rx_queue_setup(RXTX_PORT5, 0, RING_SIZE, SOCKET0, NULL, mp) < 0)) {
printf("RX queue setup failed\n");
return -1;
}
if ((rte_eth_dev_start(RXTX_PORT4) < 0)
if ((rte_eth_dev_start(RXTX_PORT4) < 0)
|| (rte_eth_dev_start(RXTX_PORT5) < 0)) {
printf("Error starting RXTX port\n");
return -1;
}
rte_eth_stats_reset(RXTX_PORT4);
rte_eth_stats_reset(RXTX_PORT5);
@ -441,7 +441,7 @@ test_pmd_ring_pair_attach(void)
rte_eth_dev_stop(RXTX_PORT4);
rte_eth_dev_stop(RXTX_PORT5);
return 0;
}
@ -499,7 +499,7 @@ test_pmd_ring(void)
return -1;
if (test_pmd_ring_pair_attach() < 0)
return -1;
return -1;
return 0;
}

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -76,7 +76,7 @@ struct test_queue { /**< Test structure for RTE_RED Queues */
uint32_t *qconfig; /**< Configuration of RTE_RED queues for test */
uint32_t *q; /**< Queue size */
uint32_t q_ramp_up; /**< Num of enqueues to ramp up the queue */
uint32_t avg_ramp_up; /**< Average num of enqueues to ramp up the queue */
uint32_t avg_ramp_up; /**< Average num of enqueues to ramp up the queue */
uint32_t avg_tolerance; /**< Tolerance in queue average */
double drop_tolerance; /**< Drop tolerance of packets not enqueued */
};
@ -310,7 +310,7 @@ static uint64_t get_machclk_freq(void)
end = rte_rdtsc();
diff = (uint64_t)(tv_end.tv_sec - tv_start.tv_sec) * USEC_PER_SEC
+ ((tv_end.tv_nsec - tv_start.tv_nsec + TEST_NSEC_MARGIN) /
+ ((tv_end.tv_nsec - tv_start.tv_nsec + TEST_NSEC_MARGIN) /
USEC_PER_MSEC); /**< diff is in micro secs */
if (diff == 0)
@ -419,7 +419,7 @@ increase_average_qsize(struct rte_red_config *red_cfg,
static struct rte_red_config ft_wrconfig[1];
static struct rte_red ft_rtdata[1];
static uint8_t ft_wq_log2[] = {9};
static uint8_t ft_maxp_inv[] = {10};
static uint8_t ft_maxp_inv[] = {10};
static uint32_t ft_qconfig[] = {0, 0, 1, 1};
static uint32_t ft_q[] ={0};
static uint32_t ft_dropped[] ={0};
@ -518,7 +518,7 @@ static enum test_result func_test1(struct test_config *tcfg)
goto out;
}
printf("%s", tcfg->htxt);
printf("%s", tcfg->htxt);
for (i = 0; i < RTE_DIM(ft1_tlevels); i++) {
const char *label = NULL;
@ -793,10 +793,10 @@ static enum test_result func_test3(struct test_config *tcfg)
result = FAIL;
}
exp_avg = calc_exp_avg_on_empty(avg_before,
exp_avg = calc_exp_avg_on_empty(avg_before,
(1 << *tcfg->tconfig->wq_log2),
tcfg->tvar->wait_usec);
avg_after = rte_red_get_avg_float(tcfg->tconfig->rconfig,
avg_after = rte_red_get_avg_float(tcfg->tconfig->rconfig,
tcfg->tqueue->rdata);
if (!check_avg(&diff, avg_after, exp_avg, (double)tcfg->tqueue->avg_tolerance))
result = FAIL;
@ -905,7 +905,7 @@ static enum test_result func_test4(struct test_config *tcfg)
rte_red_mark_queue_empty(tcfg->tqueue->rdata, get_port_ts());
/**
* record empty time locally
* record empty time locally
*/
start = rte_rdtsc();
@ -914,8 +914,8 @@ static enum test_result func_test4(struct test_config *tcfg)
/**
* enqueue one packet to recalculate average queue size
*/
if (rte_red_enqueue(tcfg->tconfig->rconfig,
tcfg->tqueue->rdata,
if (rte_red_enqueue(tcfg->tconfig->rconfig,
tcfg->tqueue->rdata,
*tcfg->tqueue->q,
get_port_ts()) != 0) {
result = FAIL;
@ -1077,7 +1077,7 @@ static enum test_result func_test5(struct test_config *tcfg)
drop_rate = calc_drop_rate(tcfg->tvar->enqueued[j],tcfg->tvar->dropped[j]);
drop_prob = calc_drop_prob(tcfg->tconfig->min_th, tcfg->tconfig->max_th,
tcfg->tconfig->maxp_inv[tcfg->tqueue->qconfig[j]],
tcfg->tconfig->maxp_inv[tcfg->tqueue->qconfig[j]],
*tcfg->tlevel);
if (!check_drop_rate(&diff, drop_rate, drop_prob, (double)tcfg->tqueue->drop_tolerance))
result = FAIL;
@ -1183,7 +1183,7 @@ static enum test_result func_test6(struct test_config *tcfg)
double exp_avg = 0;
double diff = 0.0;
avg_before = rte_red_get_avg_float(&tcfg->tconfig->rconfig[tcfg->tqueue->qconfig[j]],
avg_before = rte_red_get_avg_float(&tcfg->tconfig->rconfig[tcfg->tqueue->qconfig[j]],
&tcfg->tqueue->rdata[j]);
/**
@ -1196,7 +1196,7 @@ static enum test_result func_test6(struct test_config *tcfg)
/**
* enqueue one packet to recalculate average queue size
*/
if (rte_red_enqueue(&tcfg->tconfig->rconfig[tcfg->tqueue->qconfig[j]],
if (rte_red_enqueue(&tcfg->tconfig->rconfig[tcfg->tqueue->qconfig[j]],
&tcfg->tqueue->rdata[j],
tcfg->tqueue->q[j],
get_port_ts()) == 0) {
@ -1206,7 +1206,7 @@ static enum test_result func_test6(struct test_config *tcfg)
result = FAIL;
}
exp_avg = calc_exp_avg_on_empty(avg_before,
exp_avg = calc_exp_avg_on_empty(avg_before,
(1 << tcfg->tconfig->wq_log2[tcfg->tqueue->qconfig[j]]),
tcfg->tvar->wait_usec);
avg_after = rte_red_get_avg_float(&tcfg->tconfig->rconfig[tcfg->tqueue->qconfig[j]],
@ -1229,7 +1229,7 @@ static enum test_result func_test6(struct test_config *tcfg)
static struct rte_red_config pt_wrconfig[1];
static struct rte_red pt_rtdata[1];
static uint8_t pt_wq_log2[] = {9};
static uint8_t pt_maxp_inv[] = {10};
static uint8_t pt_maxp_inv[] = {10};
static uint32_t pt_qconfig[] = {0};
static uint32_t pt_q[] = {0};
static uint32_t pt_dropped[] = {0};
@ -1286,7 +1286,7 @@ static void enqueue_dequeue_perf(struct rte_red_config *red_cfg,
}
/**
* Setup test structures for tests P1, P2, P3
* Setup test structures for tests P1, P2, P3
* performance tests 1, 2 and 3
*/
static uint32_t pt1_tlevel[] = {16};
@ -1337,8 +1337,8 @@ static struct test_config perf1_test3_config = {
};
/**
* Performance test function to measure enqueue performance.
* This runs performance tests 1, 2 and 3
* Performance test function to measure enqueue performance.
* This runs performance tests 1, 2 and 3
*/
static enum test_result perf1_test(struct test_config *tcfg)
{
@ -1369,7 +1369,7 @@ static enum test_result perf1_test(struct test_config *tcfg)
* set the queue average
*/
rte_red_set_avg_int(tcfg->tconfig->rconfig, tcfg->tqueue->rdata, *tcfg->tlevel);
if (rte_red_get_avg_int(tcfg->tconfig->rconfig, tcfg->tqueue->rdata)
if (rte_red_get_avg_int(tcfg->tconfig->rconfig, tcfg->tqueue->rdata)
!= *tcfg->tlevel) {
result = FAIL;
goto out;
@ -1395,7 +1395,7 @@ static enum test_result perf1_test(struct test_config *tcfg)
}
/**
* Setup test structures for tests P4, P5, P6
* Setup test structures for tests P4, P5, P6
* performance tests 4, 5 and 6
*/
static uint32_t pt4_tlevel[] = {16};
@ -1469,8 +1469,8 @@ static struct test_config perf2_test6_config = {
};
/**
* Performance test function to measure enqueue performance when the
* queue is empty. This runs performance tests 4, 5 and 6
* Performance test function to measure enqueue performance when the
* queue is empty. This runs performance tests 4, 5 and 6
*/
static enum test_result perf2_test(struct test_config *tcfg)
{
@ -1488,7 +1488,7 @@ static enum test_result perf2_test(struct test_config *tcfg)
goto out;
}
printf("%s", tcfg->htxt);
printf("%s", tcfg->htxt);
for (i = 0; i < tcfg->tvar->num_iterations; i++) {
uint32_t count = 0;
@ -1534,7 +1534,7 @@ static enum test_result perf2_test(struct test_config *tcfg)
*/
ts = get_port_ts();
rdtsc_prof_start(&prof);
ret = rte_red_enqueue(tcfg->tconfig->rconfig, tcfg->tqueue->rdata,
ret = rte_red_enqueue(tcfg->tconfig->rconfig, tcfg->tqueue->rdata,
*tcfg->tqueue->q, ts );
rdtsc_prof_end(&prof);
@ -1557,7 +1557,7 @@ static enum test_result perf2_test(struct test_config *tcfg)
int ok = 0;
avg_after = rte_red_get_avg_float(tcfg->tconfig->rconfig, tcfg->tqueue->rdata);
exp_avg = calc_exp_avg_on_empty(avg_before,
exp_avg = calc_exp_avg_on_empty(avg_before,
(1 << *tcfg->tconfig->wq_log2),
tcfg->tvar->wait_usec);
if (check_avg(&diff, avg_after, exp_avg, (double)tcfg->tqueue->avg_tolerance))
@ -1589,7 +1589,7 @@ static uint32_t avg_max_bits = 0;
static struct rte_red_config ovfl_wrconfig[1];
static struct rte_red ovfl_rtdata[1];
static uint8_t ovfl_maxp_inv[] = {10};
static uint8_t ovfl_maxp_inv[] = {10};
static uint32_t ovfl_qconfig[] = {0, 0, 1, 1};
static uint32_t ovfl_q[] ={0};
static uint32_t ovfl_dropped[] ={0};
@ -1735,7 +1735,7 @@ static enum test_result ovfl_test1(struct test_config *tcfg)
result = FAIL;
printf("%s", tcfg->htxt);
printf("%-16u%-9u%-15u0x%08x %-10u%-10u%-10u%-13.2lf%-13.2lf\n",
avg, *tcfg->tconfig->wq_log2, RTE_RED_SCALING,
avg_max, avg_max_bits,
@ -1748,17 +1748,17 @@ static enum test_result ovfl_test1(struct test_config *tcfg)
/**
* define the functional and performance tests to be executed
*/
struct tests func_tests[] = {
struct tests func_tests[] = {
{ &func_test1_config, func_test1 },
{ &func_test2_config, func_test2 },
{ &func_test2_config, func_test2 },
{ &func_test3_config, func_test3 },
{ &func_test4_config, func_test4 },
{ &func_test5_config, func_test5 },
{ &func_test6_config, func_test6 },
{ &ovfl_test1_config, ovfl_test1 },
{ &ovfl_test1_config, ovfl_test1 },
};
struct tests perf_tests[] = {
struct tests perf_tests[] = {
{ &perf1_test1_config, perf1_test },
{ &perf1_test2_config, perf1_test },
{ &perf1_test3_config, perf1_test },

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -54,7 +54,7 @@
#define RING_SIZE 4096
#define MAX_BURST 32
/*
/*
* the sizes to enqueue and dequeue in testing
* (marked volatile so they won't be seen as compile-time constants)
*/
@ -166,7 +166,7 @@ test_empty_dequeue(void)
(double)(mc_end-mc_start) / iterations);
}
/*
/*
* for the separate enqueue and dequeue threads they take in one param
* and return two. Input = burst size, output = cycle average for sp/sc & mp/mc
*/
@ -175,9 +175,9 @@ struct thread_params {
double spsc, mpmc; /* output value, the single or multi timings */
};
/*
/*
* Function that uses rdtsc to measure timing for ring enqueue. Needs pair
* thread running dequeue_bulk function
* thread running dequeue_bulk function
*/
static int
enqueue_bulk(void *p)
@ -210,9 +210,9 @@ enqueue_bulk(void *p)
return 0;
}
/*
/*
* Function that uses rdtsc to measure timing for ring dequeue. Needs pair
* thread running enqueue_bulk function
* thread running enqueue_bulk function
*/
static int
dequeue_bulk(void *p)
@ -245,7 +245,7 @@ dequeue_bulk(void *p)
return 0;
}
/*
/*
* Function that calls the enqueue and dequeue bulk functions on pairs of cores.
* used to measure ring perf between hyperthreads, cores and sockets.
*/
@ -275,7 +275,7 @@ run_on_core_pair(struct lcore_pair *cores,
}
}
/*
/*
* Test function that determines how long an enqueue + dequeue of a single item
* takes on a single lcore. Result is for comparison with the bulk enq+deq.
*/
@ -307,7 +307,7 @@ test_single_enqueue_dequeue(void)
(mc_end-mc_start) >> iter_shift);
}
/*
/*
* Test that does both enqueue and dequeue on a core using the burst() API calls
* instead of the bulk() calls used in other tests. Results should be the same
* as for the bulk function called on a single lcore.

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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
@ -155,7 +155,7 @@ prepare_pkt(struct rte_mbuf *mbuf)
/**
* test main entrance for library sched
*/
int
int
test_sched(void)
{
struct rte_mempool *mp = NULL;
@ -175,7 +175,7 @@ test_sched(void)
port = rte_sched_port_config(&port_param);
VERIFY(port != NULL, "Error config sched port\n");
err = rte_sched_subport_config(port, SUBPORT, subport_param);
VERIFY(err == 0, "Error config sched, err=%d\n", err);

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,13 +1,13 @@
/*-
* 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
@ -17,7 +17,7 @@
* * 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

View File

@ -1,12 +1,12 @@
# 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
@ -16,7 +16,7 @@
# * 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
@ -122,7 +122,7 @@ CONFIG_RTE_LIBRTE_EAL_BAREMETAL=n
#
# Compile Environment Abstraction Layer to support Vmware TSC map
#
#
CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=y
#

View File

@ -1,12 +1,12 @@
# 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
@ -16,7 +16,7 @@
# * 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
@ -136,7 +136,7 @@ CONFIG_RTE_LIBRTE_EAL_BAREMETAL=n
#
# Compile Environment Abstraction Layer to support Vmware TSC map
#
#
CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=y
#

View File

@ -1,12 +1,12 @@
# 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
@ -16,7 +16,7 @@
# * 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

View File

@ -1,12 +1,12 @@
# 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
@ -16,7 +16,7 @@
# * 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

View File

@ -1,12 +1,12 @@
# 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
@ -16,7 +16,7 @@
# * 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

View File

@ -1,12 +1,12 @@
# 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
@ -16,7 +16,7 @@
# * 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

View File

@ -1,12 +1,12 @@
# 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
@ -16,7 +16,7 @@
# * 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

Some files were not shown because too many files have changed in this diff Show More