]> git.itanic.dy.fi Git - linux-stable/commit
net: ipa: reduce arguments to ipa_table_init_add()
authorAlex Elder <elder@linaro.org>
Wed, 2 Nov 2022 22:11:31 +0000 (17:11 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Nov 2022 10:16:53 +0000 (10:16 +0000)
commit5cb76899fb47791c12eb9fce4aef8a858c41783d
tree6dc1e3f30dfb94360416062c7d426e6657830bb8
parentd28c0e73efbee95edf789f07c494592f89862606
net: ipa: reduce arguments to ipa_table_init_add()

Recently ipa_table_mem() was added as a way to look up one of 8
possible memory regions by indicating whether it was a filter or
route table, hashed or not, and IPv6 or not.

We can simplify the interface to ipa_table_init_add() by passing two
flags to it instead of the opcode and both hashed and non-hashed
memory region IDs.  The "filter" and "ipv6" flags are sufficient to
determine the opcode to use, and with ipa_table_mem() can look up
the correct memory region as well.

It's possible to not have hashed tables, but we already verify the
number of entries in a filter or routing table is nonzero.  Stop
assuming a hashed table entry exists in ipa_table_init_add().

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