All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Michael Chan <michael.chan@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch,
	pavan.chebbi@broadcom.com, andrew.gospodarek@broadcom.com
Subject: Re: [PATCH net-next v3 09/15] bnxt_en: Add infrastructure for crypto key context IDs
Date: Mon, 15 Jun 2026 13:57:33 -0700	[thread overview]
Message-ID: <20260615135733.281f0d94@kernel.org> (raw)
In-Reply-To: <20260614072407.2761092-10-michael.chan@broadcom.com>

On Sun, 14 Jun 2026 00:24:01 -0700 Michael Chan wrote:
> Each kTLS connection requires a crypto key context ID (KID).  These KIDs
> are allocated from the firmware in batches.  Add data structure to store
> these IDs.  The bnxt_kid_info structure stores a batch of IDs and it can be
> linked as we allocate more batches.  There is a bitmap in the structure
> to keep track of which ones are in use.  Add APIs to allocate and free
> these KIDs.

../drivers/net/ethernet/broadcom/bnxt/bnxt_ktls.c:283:7: warning: variable 'kctx_tx' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
  283 |                 if (retry_cnt++ > KTLS_RETRY_MAX) {
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/net/ethernet/broadcom/bnxt/bnxt_ktls.c:319:8: note: uninitialized use occurs here
  319 |         kfree(kctx_tx);
      |               ^~~~~~~
../drivers/net/ethernet/broadcom/bnxt/bnxt_ktls.c:283:3: note: remove the 'if' if its condition is always false
  283 |                 if (retry_cnt++ > KTLS_RETRY_MAX) {
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  284 |                         atomic64_inc(&ktls->counters[BNXT_KTLS_ERR_RETRY_EXCEEDED]);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  285 |                         netdev_warn(dev, "%s timed out waiting for device, state %lx\n",
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  286 |                                     __func__, bp->state);
      |                                     ~~~~~~~~~~~~~~~~~~~~~
  287 |                         goto free;
      |                         ~~~~~~~~~~
  288 |                 }
      |                 ~
../drivers/net/ethernet/broadcom/bnxt/bnxt_ktls.c:277:7: warning: variable 'kctx_tx' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
  277 |                 if (!netif_running(dev) ||
      |                     ^~~~~~~~~~~~~~~~~~~~~~
  278 |                     test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/net/ethernet/broadcom/bnxt/bnxt_ktls.c:319:8: note: uninitialized use occurs here
  319 |         kfree(kctx_tx);
      |               ^~~~~~~
../drivers/net/ethernet/broadcom/bnxt/bnxt_ktls.c:277:3: note: remove the 'if' if its condition is always false
  277 |                 if (!netif_running(dev) ||
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
  278 |                     test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  279 |                         goto free;
      |                         ~~~~~~~~~
../drivers/net/ethernet/broadcom/bnxt/bnxt_ktls.c:277:7: warning: variable 'kctx_tx' is used uninitialized whenever '||' condition is true [-Wsometimes-uninitialized]
  277 |                 if (!netif_running(dev) ||
      |                     ^~~~~~~~~~~~~~~~~~~
../drivers/net/ethernet/broadcom/bnxt/bnxt_ktls.c:319:8: note: uninitialized use occurs here
  319 |         kfree(kctx_tx);
      |               ^~~~~~~
../drivers/net/ethernet/broadcom/bnxt/bnxt_ktls.c:277:7: note: remove the '||' if its condition is always false
  277 |                 if (!netif_running(dev) ||
      |                     ^~~~~~~~~~~~~~~~~~~~~~
../drivers/net/ethernet/broadcom/bnxt/bnxt_ktls.c:260:42: note: initialize the variable 'kctx_tx' to silence this warning
  260 |         struct bnxt_ktls_offload_ctx_tx *kctx_tx;
      |                                                 ^
      |                                                  = NULL
-- 
pw-bot: cr

  reply	other threads:[~2026-06-15 20:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-14  7:23 [PATCH net-next v3 00/15] bnxt_en: Add kTLS TX offload support Michael Chan
2026-06-14  7:23 ` [PATCH net-next v3 01/15] bnxt_en: Add Midpath channel information Michael Chan
2026-06-14  7:23 ` [PATCH net-next v3 02/15] bnxt_en: Account for the MPC TX and CP rings Michael Chan
2026-06-14  7:23 ` [PATCH net-next v3 03/15] bnxt_en: Set default MPC ring count Michael Chan
2026-06-14  7:23 ` [PATCH net-next v3 04/15] bnxt_en: Rename xdp_tx_lock to tx_lock Michael Chan
2026-06-14  7:23 ` [PATCH net-next v3 05/15] bnxt_en: Allocate and free MPC software structures Michael Chan
2026-06-14  7:23 ` [PATCH net-next v3 06/15] bnxt_en: Allocate and free MPC channels from firmware Michael Chan
2026-06-14  7:23 ` [PATCH net-next v3 07/15] bnxt_en: Allocate crypto structure and backing store Michael Chan
2026-06-14  7:24 ` [PATCH net-next v3 08/15] bnxt_en: Reserve crypto RX and TX key contexts on a PF Michael Chan
2026-06-14  7:24 ` [PATCH net-next v3 09/15] bnxt_en: Add infrastructure for crypto key context IDs Michael Chan
2026-06-15 20:57   ` Jakub Kicinski [this message]
2026-06-14  7:24 ` [PATCH net-next v3 10/15] bnxt_en: Add MPC transmit and completion functions Michael Chan
2026-06-14  7:24 ` [PATCH net-next v3 11/15] bnxt_en: Add crypto MPC transmit/completion infrastructure Michael Chan
2026-06-14  7:24 ` [PATCH net-next v3 12/15] bnxt_en: Support kTLS TX offload by implementing .tls_dev_add/del() Michael Chan
2026-06-15 20:58   ` Jakub Kicinski
2026-06-14  7:24 ` [PATCH net-next v3 13/15] bnxt_en: Implement kTLS TX normal path Michael Chan
2026-06-14  7:24 ` [PATCH net-next v3 14/15] bnxt_en: Add support for inline transmit BDs Michael Chan
2026-06-14  7:24 ` [PATCH net-next v3 15/15] bnxt_en: Add kTLS retransmission support Michael Chan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260615135733.281f0d94@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.