All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 00/10] net: Fix packet corruption issue when handling asynch replies
@ 2018-09-26 21:48 Joe Hershberger
  2018-09-26 21:48 ` [U-Boot] [PATCH v2 01/10] net: sandbox: Move disabled flag into priv struct Joe Hershberger
                   ` (9 more replies)
  0 siblings, 10 replies; 24+ messages in thread
From: Joe Hershberger @ 2018-09-26 21:48 UTC (permalink / raw)
  To: u-boot

The issue [1] was reported by (Peter) Tran Tien Dat. Unfortunately his
fix for the issue broke notmal operation and I don't feel is a good way
to address the issue. Also, the situation was not covered in the unit
tests, so we'll add them now.

First we refactor the unit test capability of the sandbox ethernet fake
driver so that we can exercise that part of the network stack, then
add the tests where we prove that the async replies work, but that in
the process, the action expected by the user (ping in this case) is
broken.

Lastly, we correct the problem and change the unit tests to also expect
success of the user's operation.

[1] https://patchwork.ozlabs.org/patch/939617/

Changes in v2:
- Added parameter comments
- Changed return value to use typical error approach
- In test, stop calling reply functions when one matches
- add comments as to the use of the uts variable
- add missing commit message
- check the return of the injection handler and pass on overflow error
- rename local "uc_priv" variable to "dev_priv" to not be misleading.
- return an error instead of 0 / 1
- return bool instead of int

Joe Hershberger (10):
  net: sandbox: Move disabled flag into priv struct
  net: sandbox: Refactor sandbox send function
  net: sandbox: Make the fake eth driver response configurable
  net: sandbox: Share the priv structure with tests
  net: sandbox: Allow fake eth to handle more than 1 packet response
  net: Add an accessor to know if waiting for ARP
  net: sandbox: Add a priv ptr for tests to use
  test: eth: Add a test for ARP requests
  test: eth: Add a test for the target being pinged
  net: Don't overwrite waiting packets with asynchronous replies

 arch/sandbox/include/asm/eth.h |  93 +++++++++
 drivers/net/sandbox.c          | 417 +++++++++++++++++++++++++++++++----------
 include/net.h                  |   9 +
 net/arp.c                      |  20 +-
 net/arp.h                      |   1 +
 net/net.c                      |   8 +
 net/ping.c                     |   7 +-
 test/dm/eth.c                  | 170 +++++++++++++++++
 8 files changed, 616 insertions(+), 109 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2018-10-11 19:26 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26 21:48 [U-Boot] [PATCH v2 00/10] net: Fix packet corruption issue when handling asynch replies Joe Hershberger
2018-09-26 21:48 ` [U-Boot] [PATCH v2 01/10] net: sandbox: Move disabled flag into priv struct Joe Hershberger
2018-10-11 19:25   ` [U-Boot] " Joe Hershberger
2018-09-26 21:48 ` [U-Boot] [PATCH v2 02/10] net: sandbox: Refactor sandbox send function Joe Hershberger
2018-09-27  6:38   ` Bin Meng
2018-10-11 19:25   ` [U-Boot] " Joe Hershberger
2018-09-26 21:48 ` [U-Boot] [PATCH v2 03/10] net: sandbox: Make the fake eth driver response configurable Joe Hershberger
2018-10-11 19:25   ` [U-Boot] " Joe Hershberger
2018-09-26 21:48 ` [U-Boot] [PATCH v2 04/10] net: sandbox: Share the priv structure with tests Joe Hershberger
2018-10-11 19:25   ` [U-Boot] " Joe Hershberger
2018-09-26 21:48 ` [U-Boot] [PATCH v2 05/10] net: sandbox: Allow fake eth to handle more than 1 packet response Joe Hershberger
2018-10-11 19:25   ` [U-Boot] " Joe Hershberger
2018-09-26 21:48 ` [U-Boot] [PATCH v2 06/10] net: Add an accessor to know if waiting for ARP Joe Hershberger
2018-09-27  6:38   ` Bin Meng
2018-10-11 19:25   ` [U-Boot] " Joe Hershberger
2018-09-26 21:48 ` [U-Boot] [PATCH v2 07/10] net: sandbox: Add a priv ptr for tests to use Joe Hershberger
2018-09-27  6:52   ` Bin Meng
2018-10-11 19:25   ` [U-Boot] " Joe Hershberger
2018-09-26 21:49 ` [U-Boot] [PATCH v2 08/10] test: eth: Add a test for ARP requests Joe Hershberger
2018-10-11 19:25   ` [U-Boot] " Joe Hershberger
2018-09-26 21:49 ` [U-Boot] [PATCH v2 09/10] test: eth: Add a test for the target being pinged Joe Hershberger
2018-10-11 19:26   ` [U-Boot] " Joe Hershberger
2018-09-26 21:49 ` [U-Boot] [PATCH v2 10/10] net: Don't overwrite waiting packets with asynchronous replies Joe Hershberger
2018-10-11 19:26   ` [U-Boot] " Joe Hershberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.