Searched hist:"604 dfd6efc9b79bce432f2394791708d8e8f6efc" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/net/core/ |
H A D | pktgen.c | diff 604dfd6efc9b79bce432f2394791708d8e8f6efc Sun Jan 27 15:14:08 CST 2013 Cong Wang <amwang@redhat.com> pktgen: correctly handle failures when adding a device
The return value of pktgen_add_device() is not checked, so even if we fail to add some device, for example, non-exist one, we still see "OK:...". This patch fixes it.
After this patch, I got:
# echo "add_device non-exist" > /proc/net/pktgen/kpktgend_0 -bash: echo: write error: No such device # cat /proc/net/pktgen/kpktgend_0 Running: Stopped: Result: ERROR: can not add device non-exist # echo "add_device eth0" > /proc/net/pktgen/kpktgend_0 # cat /proc/net/pktgen/kpktgend_0 Running: Stopped: eth0 Result: OK: add_device=eth0
(Candidate for -stable)
Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|