]> git.itanic.dy.fi Git - linux-stable/commit
net: ipa: introduce generalized status decoder
authorAlex Elder <elder@linaro.org>
Wed, 25 Jan 2023 20:45:44 +0000 (14:45 -0600)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Jan 2023 11:16:29 +0000 (11:16 +0000)
commitebd2a82ecea8f6cb9165d6a05c23da16e1ec5669
treecf24e01fc9484dba834cd617cb209b66fa1c5b05
parent02c5077439fc7d4cd885add2d4e2d3e678b23e21
net: ipa: introduce generalized status decoder

Stop assuming the IPA packet status has a fixed format (defined by
a C structure).  Instead, use a function to extract each field from
a block of data interpreted as an IPA packet status.  Define an
enumerated type that identifies the fields that can be extracted.
The current function extracts fields based on the existing
ipa_status structure format (which is no longer used).

Define IPA_STATUS_RULE_MISS, to replace the calls to field_max() to
represent that condition; those depended on the knowing the width of
a filter or router rule in the IPA packet status structure.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_endpoint.c