OSDN Git Service

net: ipa: determine filter table size from memory region
authorAlex Elder <elder@linaro.org>
Tue, 25 Oct 2022 19:51:43 +0000 (14:51 -0500)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 27 Oct 2022 11:38:13 +0000 (13:38 +0200)
commitf787d84830152be76b76470ac865d2033285c2d9
treec33bde78d4dd627559ef856494327761aba4e914
parent8defab8bdfb1d0dc4e4e3c687cfde33b596896f7
net: ipa: determine filter table size from memory region

Currently we assume that any filter table contains a fixed number
of entries.  Like routing tables, the number of entries in a filter
table is limited only by the size of the IPA-local memory region
used to hold the table.

Stop assuming that a filter table has exactly 14 entries.  Instead,
determine the number of entries in a routing table by dividing its
memory region size by the size of an entry.  (Note that the first
"entry" in a filter table contains an endpoint bitmap.)

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ipa/ipa.h
drivers/net/ipa/ipa_cmd.c
drivers/net/ipa/ipa_table.c
drivers/net/ipa/ipa_table.h