From: Jakub Kicinski Date: Tue, 9 Jul 2019 02:53:12 +0000 (-0700) Subject: nfp: tls: count TSO segments separately for the TLS offload X-Git-Tag: v5.3-rc1~140^2~17^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=427545b3046326cd7b4dbbd7869f08737df2ad2b;p=thirdparty%2Flinux.git nfp: tls: count TSO segments separately for the TLS offload Count the number of successfully submitted TLS segments, not skbs. This will make it easier to compare the TLS encryption count against other counters. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c index 2703344274483..9a4421df9be97 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c @@ -880,7 +880,10 @@ nfp_net_tls_tx(struct nfp_net_dp *dp, struct nfp_net_r_vector *r_vec, if (datalen) { u64_stats_update_begin(&r_vec->tx_sync); - r_vec->hw_tls_tx++; + if (!skb_is_gso(skb)) + r_vec->hw_tls_tx++; + else + r_vec->hw_tls_tx += skb_shinfo(skb)->gso_segs; u64_stats_update_end(&r_vec->tx_sync); }