Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1578590 > unrolled thread

re: sfc: process RX event inner checksum flags

Started byColin Ian King <colin.king@canonical.com>
First post2017-02-10 17:20 +0100
Last post2017-02-10 18:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  re: sfc: process RX event inner checksum flags Colin Ian King <colin.king@canonical.com> - 2017-02-10 17:20 +0100
    Re: sfc: process RX event inner checksum flags Edward Cree <ecree@solarflare.com> - 2017-02-10 18:00 +0100

#1578590 — re: sfc: process RX event inner checksum flags

FromColin Ian King <colin.king@canonical.com>
Date2017-02-10 17:20 +0100
Subjectre: sfc: process RX event inner checksum flags
Message-ID<t9m5s-5JI-29@gated-at.bofh.it>
Hi there,


not sure if this is a bug, or intentional, but CoverityScan picked up a
mismatch in arguments when calling efx_ef10_handle_rx_event_error() with
commit "sfc: process RX event inner checksum flags" that landed in
linux-next:

  CID 1402067 (#1 of 1): Arguments in wrong order
(SWAPPED_ARGUMENTS)swapped_arguments: The positions of arguments in the
call to efx_ef10_handle_rx_event_errors do not match the ordering of the
parameters:

    rx_l3_class is passed to rx_encap_hdr
    rx_l4_class is passed to rx_l3_class
    rx_encap_hdr is passed to rx_l4_class


The function in question has the prototype:

static u16 efx_ef10_handle_rx_event_errors(struct efx_channel *channel,
                                          unsigned int n_packets,
                                          unsigned int rx_encap_hdr,
                                          unsigned int rx_l3_class,
                                          unsigned int rx_l4_class,
                                          const efx_qword_t *event)

...where as it it being called using:

flags |= efx_ef10_handle_rx_event_errors(channel, n_packets,
rx_l3_class, rx_l4_class, rx_encap_hdr, event);

Is this a bug or intentional?

Colin

[toc] | [next] | [standalone]


#1578614

FromEdward Cree <ecree@solarflare.com>
Date2017-02-10 18:00 +0100
Message-ID<t9mI9-5ZB-5@gated-at.bofh.it>
In reply to#1578590
On 10/02/17 16:14, Colin Ian King wrote:
> Hi there,
>
>
> not sure if this is a bug, or intentional, but CoverityScan picked up a
> mismatch in arguments when calling efx_ef10_handle_rx_event_error() with
> commit "sfc: process RX event inner checksum flags"

It's a bug, thanks for the catch (and thanks Coverity as well).

Will send a patch shortly.

-Ed

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web