Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can UDPST run on RDK-B's platform via HW accel? #17

Open
lixingang-1993 opened this issue Oct 18, 2024 · 5 comments
Open

Can UDPST run on RDK-B's platform via HW accel? #17

lixingang-1993 opened this issue Oct 18, 2024 · 5 comments

Comments

@lixingang-1993
Copy link

I'm trying to integrate the UDPST to RDK-B platform.
On RDK-B broadcom 3390, bspeed is a HW accel module for UDP throughtput test.
But bspeed module only return the length of payload and the length is the length of multiple UDP packets, so the client can not verify the PDU and calcuate the UDP packets count.

Is there a solution to this situation?

thanks
Xingang Li

@lc9892
Copy link

lc9892 commented Oct 18, 2024

There might be an easy solution.
In the Load PDU header there is a field called "udpPayload"...
struct loadHdr {
...
uint16_t udpPayload; // UDP payload (bytes)
...
};

The sending side populates it so that when the receiver only asks to receive the Load PDU number of bytes from the protocol stack, to save the memory copy of the filler bytes, it can still calculate accurate stats. For example, the existing code uses it like this:
//
// Update traffic stats (use size specified in PDU, actual receive may have been truncated)
//
payload = (unsigned int) ntohs(lHdr->udpPayload);
c->sisAct.rxDatagrams++;
c->sisAct.rxBytes += (uint64_t) payload;
c->tiRxDatagrams++;
c->tiRxBytes += payload;

If I understand your issue correctly, you should be able to use that field in the first datagram to find the second one and then use it in the second one to find the third...and so on.

Hope that helps, otherwise let me know.
Len

@lixingang-1993
Copy link
Author

lixingang-1993 commented Oct 18, 2024 via email

@lixingang-1993
Copy link
Author

lixingang-1993 commented Oct 18, 2024 via email

@lc9892
Copy link

lc9892 commented Oct 18, 2024

It sounds like you can only get the length and not any of the data. If so, that driver can only be used for a simple saturation test, not a more advanced test that adjusts the sending rate based on packet loss (as indicated by sequence number gaps). Also, the status feedback messages going in the opposite direction need to be read as well. Both are part of the protocol.

Are there alternatives to that driver or any option to get the data? I know that Broadcom has integrated the code into a number of RGs (e.g., BGW-320) using an offload capability in their device driver that bypasses the normal protocol stack. However, in that case the driver does pass all the data back and forth.

If you can't actually get any of the received data (and only the lengths), I don't know if there's much you can do to support a TR-471 test. Have you used the software without using the bspeed driver API? Does that work on the device (even if slower than you'd like)?

Len

@lixingang-1993
Copy link
Author

lixingang-1993 commented Oct 18, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants