Message ID | 20240125214657.734291-2-mkp@redhat.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [ovs-dev,1/5] dp-packet: Reset offload/offsets when clearing a packet. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/intel-ovs-compilation | fail | test: fail |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
On 1/25/24 22:46, Mike Pattrick wrote: > This patch fixes the correctness of dp_packet_inner_l4_size() when > checking for the existence of an inner L4 header. Previously it checked > for the outer L4 header. > > This function is currently only used when a packet is already flagged > for tunneling, so an incorrect determination isn't possible as long as > the flags of the packet are correct. > > Fixes: 85bcbbed839a ("userspace: Enable tunnel tests with TSO.") > Signed-off-by: Mike Pattrick <mkp@redhat.com> > --- > lib/dp-packet.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) The name of this patch doesn't seem to correspond to the content. > > diff --git a/lib/dp-packet.h b/lib/dp-packet.h > index dceb701e8..802d3f385 100644 > --- a/lib/dp-packet.h > +++ b/lib/dp-packet.h > @@ -540,7 +540,7 @@ dp_packet_inner_l4(const struct dp_packet *b) > static inline size_t > dp_packet_inner_l4_size(const struct dp_packet *b) > { > - return OVS_LIKELY(b->l4_ofs != UINT16_MAX) > + return OVS_LIKELY(b->inner_l4_ofs != UINT16_MAX) > ? (const char *) dp_packet_tail(b) > - (const char *) dp_packet_inner_l4(b) > - dp_packet_l2_pad_size(b)
diff --git a/lib/dp-packet.h b/lib/dp-packet.h index dceb701e8..802d3f385 100644 --- a/lib/dp-packet.h +++ b/lib/dp-packet.h @@ -540,7 +540,7 @@ dp_packet_inner_l4(const struct dp_packet *b) static inline size_t dp_packet_inner_l4_size(const struct dp_packet *b) { - return OVS_LIKELY(b->l4_ofs != UINT16_MAX) + return OVS_LIKELY(b->inner_l4_ofs != UINT16_MAX) ? (const char *) dp_packet_tail(b) - (const char *) dp_packet_inner_l4(b) - dp_packet_l2_pad_size(b)
This patch fixes the correctness of dp_packet_inner_l4_size() when checking for the existence of an inner L4 header. Previously it checked for the outer L4 header. This function is currently only used when a packet is already flagged for tunneling, so an incorrect determination isn't possible as long as the flags of the packet are correct. Fixes: 85bcbbed839a ("userspace: Enable tunnel tests with TSO.") Signed-off-by: Mike Pattrick <mkp@redhat.com> --- lib/dp-packet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)