summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2016-04-01 00:12:24 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-04-01 21:38:34 +0200
commit09419f235e099ecb265a590778fe64a685a2a241 (patch)
treee1c2e2f9da95991613170fb088f4491427735338 /examples
parentf9bd3342114a9db436f71b12ac424aff224482cb (diff)
downloaddpdk-09419f235e099ecb265a590778fe64a685a2a241.zip
dpdk-09419f235e099ecb265a590778fe64a685a2a241.tar.gz
dpdk-09419f235e099ecb265a590778fe64a685a2a241.tar.xz
ethdev: use constants for link state
Define and use ETH_LINK_UP and ETH_LINK_DOWN where appropriate. Signed-off-by: Marc Sune <marcdevel@gmail.com> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/exception_path/main.c2
-rw-r--r--examples/ip_fragmentation/main.c2
-rw-r--r--examples/ip_pipeline/init.c2
-rw-r--r--examples/ip_reassembly/main.c2
-rw-r--r--examples/ipsec-secgw/ipsec-secgw.c2
-rw-r--r--examples/ipv4_multicast/main.c2
-rw-r--r--examples/kni/main.c2
-rw-r--r--examples/l2fwd-crypto/main.c2
-rw-r--r--examples/l2fwd-ivshmem/host/host.c2
-rw-r--r--examples/l2fwd-jobstats/main.c2
-rw-r--r--examples/l2fwd-keepalive/main.c2
-rw-r--r--examples/l2fwd/main.c2
-rw-r--r--examples/l3fwd-acl/main.c2
-rw-r--r--examples/l3fwd-power/main.c2
-rw-r--r--examples/l3fwd/main.c2
-rw-r--r--examples/link_status_interrupt/main.c2
-rw-r--r--examples/load_balancer/init.c2
-rw-r--r--examples/multi_process/client_server_mp/mp_server/init.c2
-rw-r--r--examples/multi_process/l2fwd_fork/main.c2
-rw-r--r--examples/multi_process/symmetric_mp/main.c2
-rw-r--r--examples/performance-thread/l3fwd-thread/main.c2
21 files changed, 21 insertions, 21 deletions
diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index b3fe170..bec9804 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -485,7 +485,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 8021702..81a4918 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -631,7 +631,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c
index e59a6b4..83422e8 100644
--- a/examples/ip_pipeline/init.c
+++ b/examples/ip_pipeline/init.c
@@ -856,7 +856,7 @@ app_check_link(struct app_params *app)
link_params.link_speed / 1000,
link_params.link_status ? "UP" : "DOWN");
- if (link_params.link_status == 0)
+ if (link_params.link_status == ETH_LINK_DOWN)
all_links_up = 0;
}
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 19ec46c..c27e735 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -763,7 +763,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 1d6c81b..00ab2d8 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -947,7 +947,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 5dbea1a..96b4157 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -642,7 +642,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/kni/main.c b/examples/kni/main.c
index 6d434ad..a5297f2 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -670,7 +670,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 09a07d3..35171d1 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -1440,7 +1440,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/l2fwd-ivshmem/host/host.c b/examples/l2fwd-ivshmem/host/host.c
index 6e6ed5e..4bd7c41 100644
--- a/examples/l2fwd-ivshmem/host/host.c
+++ b/examples/l2fwd-ivshmem/host/host.c
@@ -371,7 +371,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index d1e9bf7..9f3a77d 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -746,7 +746,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index 94b8677..8da89aa 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -499,7 +499,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index e175681..1ad9488 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -480,7 +480,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index 3a895b7..621872f 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -1858,7 +1858,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index e7ebe30..5934efe 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1509,7 +1509,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 92fda3b..bf6d885 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -769,7 +769,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index cbc29bc..9981598 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -523,7 +523,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/load_balancer/init.c b/examples/load_balancer/init.c
index a96d778..e07850b 100644
--- a/examples/load_balancer/init.c
+++ b/examples/load_balancer/init.c
@@ -395,7 +395,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/multi_process/client_server_mp/mp_server/init.c b/examples/multi_process/client_server_mp/mp_server/init.c
index 1078ffd..ecb61c6 100644
--- a/examples/multi_process/client_server_mp/mp_server/init.c
+++ b/examples/multi_process/client_server_mp/mp_server/init.c
@@ -226,7 +226,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c
index aebf531..2dc8b82 100644
--- a/examples/multi_process/l2fwd_fork/main.c
+++ b/examples/multi_process/l2fwd_fork/main.c
@@ -900,7 +900,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c
index 72bad54..6bbff07 100644
--- a/examples/multi_process/symmetric_mp/main.c
+++ b/examples/multi_process/symmetric_mp/main.c
@@ -388,7 +388,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}
diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 61c023e..15c0a4d 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -3408,7 +3408,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status == 0) {
+ if (link.link_status == ETH_LINK_DOWN) {
all_ports_up = 0;
break;
}