git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
app/crypto-perf: support lookaside IPsec
[dpdk.git]
/
lib
/
kni
/
rte_kni.c
diff --git
a/lib/kni/rte_kni.c
b/lib/kni/rte_kni.c
index
eb24b0d
..
d3e2360
100644
(file)
--- a/
lib/kni/rte_kni.c
+++ b/
lib/kni/rte_kni.c
@@
-811,6
+811,9
@@
rte_kni_update_link(struct rte_kni *kni, unsigned int linkup)
}
old_linkup = (old_carrier[0] == '1');
}
old_linkup = (old_carrier[0] == '1');
+ if (old_linkup == (int)linkup)
+ goto out;
+
new_carrier = linkup ? "1" : "0";
ret = write(fd, new_carrier, 1);
if (ret < 1) {
new_carrier = linkup ? "1" : "0";
ret = write(fd, new_carrier, 1);
if (ret < 1) {
@@
-818,7
+821,7
@@
rte_kni_update_link(struct rte_kni *kni, unsigned int linkup)
close(fd);
return -1;
}
close(fd);
return -1;
}
-
+out:
close(fd);
return old_linkup;
}
close(fd);
return old_linkup;
}