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

Quicly hotfix pcb - fix chksum verify #343

Merged
merged 7 commits into from
Sep 28, 2023

Conversation

maryamtahhan
Copy link
Contributor

@maryamtahhan maryamtahhan commented Sep 27, 2023

Depends on #340

Fixes the PCB lookup failure in the UDP input node for cnet and the failing csum verifications ...
Note: it looks like the same issue exists in the tcp input node also... so I applied the same fix

Note: Only tested UDP path with quicly client application...

@maryamtahhan maryamtahhan changed the title Quicly Quicly hotfix pcb - disable chksum verify Sep 27, 2023
@@ -90,14 +92,14 @@ tcp_input_lookup(struct cne_node *node, pktmbuf_t *m, struct pcb_hd *hd)
pcb = cnet_pcb_lookup(hd, &key, BEST_MATCH);
if (likely(pcb)) {
int rc = TCP_INPUT_NEXT_PKT_DROP;

#if 0 // Disable till cne_ipv4_udptcp_cksum_verify is fixed
if (is_pcb_dom_inet6(pcb))
csum = cne_ipv6_udptcp_cksum_verify(&tip->ip6, &tip->tcp);
else
csum = cne_ipv4_udptcp_cksum_verify(&tip->ip4, &tip->tcp);
if (csum)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also csum here needs to be signed, at the fns above return -1 on a fail...

Copy link
Contributor

@KeithWiles KeithWiles Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I agree it should be signed, but maybe the function should be returning a 0 or 1 for fail/pass?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe I should just rename the csum variable to something else as it's not really a csum returned by those functions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree it is not a checksum. We can do that change now or after this one gets merged up to you or I can create a PR for that just that fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can push a separate PR to rename it after this no prob

Copy link
Contributor

@KeithWiles KeithWiles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look fine to me and I only had a couple comments.

@maryamtahhan maryamtahhan force-pushed the quicly branch 2 times, most recently from f4ea904 to 57c246b Compare September 28, 2023 11:23
@maryamtahhan
Copy link
Contributor Author

I've only tested UDP and not TCP - would someone be able to check the TCP path?

@maryamtahhan
Copy link
Contributor Author

maryamtahhan commented Sep 28, 2023

@pbanicev Can you verify this works for you?

Screenshot 2023-09-28 at 12 36 23

Copy link
Contributor

@KeithWiles KeithWiles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks these changes are good, IPv6 caused a couple problems. :-)

@KeithWiles
Copy link
Contributor

The code for TCP looks correct, but I can check it after the merge if that seems reasonable?

@maryamtahhan
Copy link
Contributor Author

, IPv6 caused a couple problems. :-)

seems reasonable :)

@maryamtahhan maryamtahhan changed the title Quicly hotfix pcb - disable chksum verify Quicly hotfix pcb - fix chksum verify Sep 28, 2023
@KeithWiles KeithWiles merged commit 4e38ed8 into CloudNativeDataPlane:main Sep 28, 2023
5 of 6 checks passed
@KeithWiles
Copy link
Contributor

Thank you @maryamtahhan

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

Successfully merging this pull request may close these issues.

3 participants