# Re: \[PATCH net-next 2/2\] net/mlx5e: Clamp page\_pool size to max

- From: Jakub Kicinski \<kuba@kernel.org\>
- Date: 2025-09-25 15:03:37 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/09/3231582
- Thread: https://ratatoskr.run/netdev/2025/09/3226102/t.md

```text
On Thu, 25 Sep 2025 10:25:40 +0000 Dragos Tatulea wrote:
> Should the page_pool should print a warning when it clamps?

I don't think so, goal is to avoid having all drivers copy the clamp on
their side. So if we still warn drivers will still have to worry.

> Also, checking for size > 32K and clamping to 16K looks a bit weird...
> Should the limit be lowered to 16K alltogether?

That's what I mean, replace the if (>32k) return E2BIG; with
size = min(size, 16k).
```
