Commit c8d3928e authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

nfp: tls: avoid one of the ifdefs for TLS

Move the #ifdef CONFIG_TLS_DEVICE a little so we can eliminate
the other one.
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: default avatarDirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ab232e61
...@@ -822,11 +822,11 @@ static void nfp_net_tx_csum(struct nfp_net_dp *dp, ...@@ -822,11 +822,11 @@ static void nfp_net_tx_csum(struct nfp_net_dp *dp,
u64_stats_update_end(&r_vec->tx_sync); u64_stats_update_end(&r_vec->tx_sync);
} }
#ifdef CONFIG_TLS_DEVICE
static struct sk_buff * static struct sk_buff *
nfp_net_tls_tx(struct nfp_net_dp *dp, struct nfp_net_r_vector *r_vec, nfp_net_tls_tx(struct nfp_net_dp *dp, struct nfp_net_r_vector *r_vec,
struct sk_buff *skb, u64 *tls_handle, int *nr_frags) struct sk_buff *skb, u64 *tls_handle, int *nr_frags)
{ {
#ifdef CONFIG_TLS_DEVICE
struct nfp_net_tls_offload_ctx *ntls; struct nfp_net_tls_offload_ctx *ntls;
struct sk_buff *nskb; struct sk_buff *nskb;
bool resync_pending; bool resync_pending;
...@@ -889,9 +889,9 @@ nfp_net_tls_tx(struct nfp_net_dp *dp, struct nfp_net_r_vector *r_vec, ...@@ -889,9 +889,9 @@ nfp_net_tls_tx(struct nfp_net_dp *dp, struct nfp_net_r_vector *r_vec,
memcpy(tls_handle, ntls->fw_handle, sizeof(ntls->fw_handle)); memcpy(tls_handle, ntls->fw_handle, sizeof(ntls->fw_handle));
ntls->next_seq += datalen; ntls->next_seq += datalen;
#endif
return skb; return skb;
} }
#endif
static void nfp_net_tx_xmit_more_flush(struct nfp_net_tx_ring *tx_ring) static void nfp_net_tx_xmit_more_flush(struct nfp_net_tx_ring *tx_ring)
{ {
...@@ -985,13 +985,11 @@ static int nfp_net_tx(struct sk_buff *skb, struct net_device *netdev) ...@@ -985,13 +985,11 @@ static int nfp_net_tx(struct sk_buff *skb, struct net_device *netdev)
return NETDEV_TX_BUSY; return NETDEV_TX_BUSY;
} }
#ifdef CONFIG_TLS_DEVICE
skb = nfp_net_tls_tx(dp, r_vec, skb, &tls_handle, &nr_frags); skb = nfp_net_tls_tx(dp, r_vec, skb, &tls_handle, &nr_frags);
if (unlikely(!skb)) { if (unlikely(!skb)) {
nfp_net_tx_xmit_more_flush(tx_ring); nfp_net_tx_xmit_more_flush(tx_ring);
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
#endif
md_bytes = nfp_net_prep_tx_meta(skb, tls_handle); md_bytes = nfp_net_prep_tx_meta(skb, tls_handle);
if (unlikely(md_bytes < 0)) if (unlikely(md_bytes < 0))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment