ionic: add a check for max SGs and SKB frags
authorShannon Nelson <shannon.nelson@amd.com>
Mon, 18 Sep 2023 22:21:35 +0000 (15:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Sep 2023 09:52:31 +0000 (10:52 +0100)
commit40d835391b4f0af99cf49c71fab4d6ba8511b07f
treefda7e53f0ddb6ee172da9b6a3d882fddc205a3ef
parent4d9d72200d4c69710e8371c872449c46bcab646f
ionic: add a check for max SGs and SKB frags

Add a check of the queue's max_sg_elems against the maximum frags we
expect to see per SKB and take the smaller of the two as our max for
the queues' descriptor buffer allocations.

Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_lif.c