netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Seewald <tseewald@gmail.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Tom Seewald <tseewald@gmail.com>,
	Vishal Kulkarni <vishal@chelsio.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Rohit Maheshwari <rohitm@chelsio.com>
Subject: [PATCH] cxbgb4: Fix build failure when CHELSIO_TLS_DEVICE=n
Date: Sun, 15 Nov 2020 20:31:40 -0600	[thread overview]
Message-ID: <20201116023140.28975-1-tseewald@gmail.com> (raw)

After commit 9d2e5e9eeb59 ("cxgb4/ch_ktls: decrypted bit is not enough")
building the kernel with CHELSIO_T4=y and CHELSIO_TLS_DEVICE=n results
in the following error:

ld: drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.o: in function
`cxgb_select_queue':
cxgb4_main.c:(.text+0x2dac): undefined reference to `tls_validate_xmit_skb'

This is caused by cxgb_select_queue() calling cxgb4_is_ktls_skb() without
checking if CHELSIO_TLS_DEVICE=y. Fix this by calling cxgb4_is_ktls_skb()
only when this config option is enabled.

Fixes: 9d2e5e9eeb59 ("cxgb4/ch_ktls: decrypted bit is not enough")
Signed-off-by: Tom Seewald <tseewald@gmail.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 7fd264a6d085..8e8783afd6df 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -1176,7 +1176,9 @@ static u16 cxgb_select_queue(struct net_device *dev, struct sk_buff *skb,
 		txq = netdev_pick_tx(dev, skb, sb_dev);
 		if (xfrm_offload(skb) || is_ptp_enabled(skb, dev) ||
 		    skb->encapsulation ||
-		    cxgb4_is_ktls_skb(skb) ||
+#if IS_ENABLED(CONFIG_CHELSIO_TLS_DEVICE)
+		cxgb4_is_ktls_skb(skb) ||
+#endif /* CHELSIO_TLS_DEVICE */
 		    (proto != IPPROTO_TCP && proto != IPPROTO_UDP))
 			txq = txq % pi->nqsets;
 
-- 
2.20.1


             reply	other threads:[~2020-11-16  2:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16  2:31 Tom Seewald [this message]
2020-11-17 22:25 ` [PATCH] cxbgb4: Fix build failure when CHELSIO_TLS_DEVICE=n Jakub Kicinski
2020-11-19  5:40   ` Tom Seewald
2020-11-19 17:37     ` Jakub Kicinski
2020-11-20  6:54       ` Tom Seewald
2020-11-20 15:35         ` Jakub Kicinski
2020-11-20 19:25           ` [PATCH] cxgb4: Fix build failure when CONFIG_TLS=m Tom Seewald
2020-11-21 21:12             ` Jakub Kicinski

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=20201116023140.28975-1-tseewald@gmail.com \
    --to=tseewald@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rohitm@chelsio.com \
    --cc=vishal@chelsio.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).