[dpdk-dev] examples: remove unnecessary function calls
Checks
Commit Message
Removed rte_eth_dev_info_get() calls and declaration of struct rte_eth_dev_info
where info is not used anymore
Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
---
examples/l2fwd-jobstats/main.c | 3 ---
examples/l2fwd-keepalive/main.c | 3 ---
examples/l2fwd/main.c | 3 ---
examples/link_status_interrupt/main.c | 3 ---
examples/multi_process/l2fwd_fork/main.c | 3 ---
5 files changed, 15 deletions(-)
Comments
On 12/10/2017 11:31 PM, Prashant Bhole wrote:
> Removed rte_eth_dev_info_get() calls and declaration of struct rte_eth_dev_info
> where info is not used anymore
>
> Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
At any point in the history were they used? If so, can you please add the commit
making them unnecessary with "Fixes" tag?
11/12/2017 19:12, Ferruh Yigit:
> On 12/10/2017 11:31 PM, Prashant Bhole wrote:
> > Removed rte_eth_dev_info_get() calls and declaration of struct rte_eth_dev_info
> > where info is not used anymore
> >
> > Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
>
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
>
> At any point in the history were they used? If so, can you please add the commit
> making them unnecessary with "Fixes" tag?
Maybe some were used. The first one I've checked was never used.
Not worth spending time on it in my opinion.
Applied, thanks
@@ -769,7 +769,6 @@ int
main(int argc, char **argv)
{
struct lcore_queue_conf *qconf;
- struct rte_eth_dev_info dev_info;
unsigned lcore_id, rx_lcore_id;
unsigned nb_ports_in_mask = 0;
int ret;
@@ -827,8 +826,6 @@ main(int argc, char **argv)
last_port = portid;
nb_ports_in_mask++;
-
- rte_eth_dev_info_get(portid, &dev_info);
}
if (nb_ports_in_mask % 2) {
printf("Notice: odd number of ports in portmask.\n");
@@ -556,7 +556,6 @@ int
main(int argc, char **argv)
{
struct lcore_queue_conf *qconf;
- struct rte_eth_dev_info dev_info;
int ret;
uint16_t nb_ports;
uint16_t nb_ports_available;
@@ -618,8 +617,6 @@ main(int argc, char **argv)
last_port = portid;
nb_ports_in_mask++;
-
- rte_eth_dev_info_get(portid, &dev_info);
}
if (nb_ports_in_mask % 2) {
printf("Notice: odd number of ports in portmask.\n");
@@ -549,7 +549,6 @@ int
main(int argc, char **argv)
{
struct lcore_queue_conf *qconf;
- struct rte_eth_dev_info dev_info;
int ret;
uint16_t nb_ports;
uint16_t nb_ports_available;
@@ -610,8 +609,6 @@ main(int argc, char **argv)
last_port = portid;
nb_ports_in_mask++;
-
- rte_eth_dev_info_get(portid, &dev_info);
}
if (nb_ports_in_mask % 2) {
printf("Notice: odd number of ports in portmask.\n");
@@ -549,7 +549,6 @@ int
main(int argc, char **argv)
{
struct lcore_queue_conf *qconf;
- struct rte_eth_dev_info dev_info;
int ret;
uint16_t nb_ports;
uint16_t portid, portid_last = 0;
@@ -596,8 +595,6 @@ main(int argc, char **argv)
portid_last = portid;
nb_ports_in_mask++;
-
- rte_eth_dev_info_get(portid, &dev_info);
}
if (nb_ports_in_mask < 2 || nb_ports_in_mask % 2)
rte_exit(EXIT_FAILURE, "Current enabled port number is %u, "
@@ -927,7 +927,6 @@ int
main(int argc, char **argv)
{
struct lcore_queue_conf *qconf;
- struct rte_eth_dev_info dev_info;
int ret;
uint16_t nb_ports;
uint16_t nb_ports_available;
@@ -1015,8 +1014,6 @@ main(int argc, char **argv)
last_port = portid;
nb_ports_in_mask++;
-
- rte_eth_dev_info_get(portid, &dev_info);
}
if (nb_ports_in_mask % 2) {
printf("Notice: odd number of ports in portmask.\n");