diff options
author | Kevin Paul Herbert <kph@cisco.com> | 2015-12-08 19:53:45 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2016-01-27 18:58:26 +0000 |
commit | cf121e3d5135c1c06ccca35372126baf5559e144 (patch) | |
tree | 1f389dae64a22a920e81852901c945cbc2a887f3 /vlib | |
parent | c42508d1581fc1ad4afe2e234fb1f1f005613eb5 (diff) |
ip_checksum.c: Fixes for ip_csum_and_memcpy() alignment issues
Add explicit support for incremental operations which may be on
byte boundaries and misaligned. Since this is a memcpy() like function,
it needs to be robust in all byte operations.
Add code to perform the checksum 16 bits at a time when the destination
buffer pointer is not naturally aligned. The previous code did support
misaligned source data (via clib_mem_unaligned()), but didn't properly
align the destination pointer.
It would be possible to further optimize this by adding an optimzed
move operation where the source is aligned on natural boundaries.
Look at this as we optimize this function. At this point, I am
concentrating on correctness.
Change-Id: I2b0fd4795ec5c0ca294a733159c7355b54177690
Signed-off-by: Kevin Paul Herbert <kph@cisco.com>
Diffstat (limited to 'vlib')
0 files changed, 0 insertions, 0 deletions