[PATCH API-NEXT v4] api: ones complement metadata#242
Closed
psavol wants to merge 3 commits intoOpenDataPlane:api-nextfrom
Closed
[PATCH API-NEXT v4] api: ones complement metadata#242psavol wants to merge 3 commits intoOpenDataPlane:api-nextfrom
psavol wants to merge 3 commits intoOpenDataPlane:api-nextfrom
Conversation
Bill-Fischofer-Linaro
approved these changes
Oct 20, 2017
Contributor
|
@psavol please rebase to avoid merge conflict. |
9785c1d to
e8159b4
Compare
e8159b4 to
3732719
Compare
|
@psavol it would be nice if you can provide an example code, how this API function will fit into packet reassembly example. |
Collaborator
Author
|
From commit log: "This offloads L4 checksum |
Contributor
From: "Savolainen, Petri (Nokia - FI/Espoo)" Ping. > -----Original Message----- > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of > Github ODP bot > Sent: Thursday, October 26, 2017 3:00 PM > To: lng-odp@lists.linaro.org > Subject: [lng-odp] [PATCH API-NEXT v3 0/3] api: ones complement metadata > > Added packet metadata for ones complement sum over IP > payload in a packet. Some NICs calculate the sum > during packet input (at least for IP fragments) and > store the value into the packet descriptor. This offloads > L4 checksum calculation for IP fragments as SW does not > need sum all payload data, but just combine pre-calculated > sums from packet descriptors and remove extra header fields > from the sum. > > ----------------github------------------------ > /** Email created from pull request 242 (psavol:next-checksum-metadata) > ** https://github.com/Linaro/odp/pull/242 > ** Patch: https://github.com/Linaro/odp/pull/242.patch > ** Base sha: 63d92eb289261d1534b5b9e1e04291faa5e45d30 > ** Merge commit sha: 5c16247e4ce2735df80c66f11dd9c9708e8c905f > **/ > ----------------/github------------------------ > > ----------------checkpatch.pl------------------------ > total: 0 errors, 0 warnings, 0 checks, 26 lines checked > > > to_send-p-000.patch has no obvious style problems and is ready for > submission. > total: 0 errors, 0 warnings, 0 checks, 14 lines checked > > > to_send-p-001.patch has no obvious style problems and is ready for > submission. > total: 0 errors, 0 warnings, 0 checks, 55 lines checked > > > to_send-p-002.patch has no obvious style problems and is ready for > submission. > ----------------/checkpatch.pl------------------------ |
|
@muvarov @Bill-Fischofer-Linaro this was approved long ago. Can we get this in? |
muvarov
reviewed
Nov 9, 2017
test/validation/api/pktio/pktio.c
Outdated
| static bool wait_for_network; | ||
|
|
||
| /* Dummy global variable to avoid compiler optimizing out API calls */ | ||
| uint64_t odp_valid_test_pktio_u64; |
Contributor
There was a problem hiding this comment.
please rename it without odp_. And I would move it inside loop and make it volatile then declaring somewhere on the top.
Collaborator
Author
There was a problem hiding this comment.
This is "static volatile uint64_t test_pktio_dummy_u64" in v4
added 3 commits
November 9, 2017 12:56
Added packet metadata for ones complement sum over packet data. Some NICs calculate the sum during packet input (at least for IP fragments) and store the value into the packet descriptor. This offloads L4 checksum calculation for IP fragments as SW does not need sum all payload data, but just combine pre-calculated sums from packet descriptors and remove extra header fields from the sum. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
Added dummy implementation of ones complement calls. Linux generic implementation does not calculate the sum for all incoming packets as it would be wasteful in SW. It's better to wait until application asks it with odp_chksum_ones_comp16(). Later on, the sum could be stored into the packet header, if we found a way to get it from the HW. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
Call ones complement function. Actual validation of correctness of the sum is to be done, when an implementation exist which sets the sum on packet input. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
3732719 to
83a39b8
Compare
Contributor
|
Merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added packet metadata for ones complement sum over IP
payload in a packet. Some NICs calculate the sum
during packet input (at least for IP fragments) and
store the value into the packet descriptor. This offloads
L4 checksum calculation for IP fragments as SW does not
need sum all payload data, but just combine pre-calculated
sums from packet descriptors and remove extra header fields
from the sum.