Re: [PATCH v2 10/20] nvme-auth: guarantee dhchap buffers under memory pressure

Chaitanya Kulkarni
2022-11-15T04:04:48Z

On 11/13/22 03:24, Sagi Grimberg wrote:
> We want to guarantee that we have chap buffers when a controller
> reconnects under memory pressure. Add a mempool specifically
> for that.
>
> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
> ---
> drivers/nvme/host/auth.c | 30 ++++++++++++++++++++++++++++--
> drivers/nvme/host/core.c | 6 ++++++
> drivers/nvme/host/nvme.h | 7 +++++++
> 3 files changed, 41 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
> index 4d288333b0fd..4bfe9ecda12a 100644
> --- a/drivers/nvme/host/auth.c
> +++ b/drivers/nvme/host/auth.c
> @@ -14,6 +14,8 @@
> #include <linux/nvme-auth.h>
>
> #define CHAP_BUF_SIZE 4096
> +struct kmem_cache *nvme_chap_buf_cache;
> +mempool_t *nvme_chap_buf_pool;
>

is there a reason they are not declared as static ?

-ck