diff mbox series

[1/1] ice: add support BIG TCP on IPv6

Message ID 20230206155912.2032457-1-pawel.chmielewski@intel.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [1/1] ice: add support BIG TCP on IPv6 | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers fail 7 maintainers not CCed: pabeni@redhat.com kuba@kernel.org jesse.brandeburg@intel.com edumazet@google.com anthony.l.nguyen@intel.com intel-wired-lan@lists.osuosl.org davem@davemloft.net
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 25 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Pawel Chmielewski Feb. 6, 2023, 3:59 p.m. UTC
This change enables sending BIG TCP packets on IPv6 in the ice driver using
generic ipv6_hopopt_jumbo_remove helper for stripping HBH header.

Tested:
netperf -t TCP_RR -H 2001:db8:0:f101::1  -- -r80000,80000 -O MIN_LATENCY,P90_LATENCY,P99_LATENCY,THROUGHPUT

Results varied from one setup to another, but in every case we got lower
latencies and increased transactions rate.

Signed-off-by: Pawel Chmielewski <pawel.chmielewski@intel.com>
---
 drivers/net/ethernet/intel/ice/ice.h      | 2 ++
 drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
 drivers/net/ethernet/intel/ice/ice_txrx.c | 3 +++
 3 files changed, 7 insertions(+)

Comments

Paul Menzel Feb. 6, 2023, 4:53 p.m. UTC | #1
Dear Pawel,


Thank you for your patch.

Am 06.02.23 um 16:59 schrieb Pawel Chmielewski:
> This change enables sending BIG TCP packets on IPv6 in the ice driver using
> generic ipv6_hopopt_jumbo_remove helper for stripping HBH header.
> 
> Tested:
> netperf -t TCP_RR -H 2001:db8:0:f101::1  -- -r80000,80000 -O MIN_LATENCY,P90_LATENCY,P99_LATENCY,THROUGHPUT
> 
> Results varied from one setup to another, but in every case we got lower
> latencies and increased transactions rate.

Please give some concrete examples nevertheless.


Kind regards,

Paul


> Signed-off-by: Pawel Chmielewski <pawel.chmielewski@intel.com>
> ---
>   drivers/net/ethernet/intel/ice/ice.h      | 2 ++
>   drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
>   drivers/net/ethernet/intel/ice/ice_txrx.c | 3 +++
>   3 files changed, 7 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
> index 3d26ff4122e0..c774fdd482cd 100644
> --- a/drivers/net/ethernet/intel/ice/ice.h
> +++ b/drivers/net/ethernet/intel/ice/ice.h
> @@ -122,6 +122,8 @@
>   
>   #define ICE_MAX_MTU	(ICE_AQ_SET_MAC_FRAME_SIZE_MAX - ICE_ETH_PKT_HDR_PAD)
>   
> +#define ICE_MAX_TSO_SIZE 131072
> +
>   #define ICE_UP_TABLE_TRANSLATE(val, i) \
>   		(((val) << ICE_AQ_VSI_UP_TABLE_UP##i##_S) & \
>   		  ICE_AQ_VSI_UP_TABLE_UP##i##_M)
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index 22b8ad058286..8c74a48ad0d3 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -3421,6 +3421,8 @@ static void ice_set_netdev_features(struct net_device *netdev)
>   	 * be changed at runtime
>   	 */
>   	netdev->hw_features |= NETIF_F_RXFCS;
> +
> +	netif_set_tso_max_size(netdev, ICE_MAX_TSO_SIZE);
>   }
>   
>   /**
> diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c
> index ccf09c957a1c..bef927afb766 100644
> --- a/drivers/net/ethernet/intel/ice/ice_txrx.c
> +++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
> @@ -2297,6 +2297,9 @@ ice_xmit_frame_ring(struct sk_buff *skb, struct ice_tx_ring *tx_ring)
>   
>   	ice_trace(xmit_frame_ring, tx_ring, skb);
>   
> +	if (unlikely(ipv6_hopopt_jumbo_remove(skb)))
> +		goto out_drop;
> +
>   	count = ice_xmit_desc_count(skb);
>   	if (ice_chk_linearize(skb, count)) {
>   		if (__skb_linearize(skb))
Pawel Chmielewski Feb. 7, 2023, 4:26 p.m. UTC | #2
On Mon, Feb 06, 2023 at 05:53:00PM +0100, Paul Menzel wrote:
> Dear Pawel,
> 
> 
> Thank you for your patch.
> 
> Am 06.02.23 um 16:59 schrieb Pawel Chmielewski:
> > This change enables sending BIG TCP packets on IPv6 in the ice driver using
> > generic ipv6_hopopt_jumbo_remove helper for stripping HBH header.
> > 
> > Tested:
> > netperf -t TCP_RR -H 2001:db8:0:f101::1  -- -r80000,80000 -O MIN_LATENCY,P90_LATENCY,P99_LATENCY,THROUGHPUT
> > 
> > Results varied from one setup to another, but in every case we got lower
> > latencies and increased transactions rate.
> 
> Please give some concrete examples nevertheless.
Of course. I'll send v2 with the results. Thank you.

> 
> 
> Kind regards,
> 
> Paul
> 
> 
> > Signed-off-by: Pawel Chmielewski <pawel.chmielewski@intel.com>
> > ---
> >   drivers/net/ethernet/intel/ice/ice.h      | 2 ++
> >   drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
> >   drivers/net/ethernet/intel/ice/ice_txrx.c | 3 +++
> >   3 files changed, 7 insertions(+)
> > 
> > diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
> > index 3d26ff4122e0..c774fdd482cd 100644
> > --- a/drivers/net/ethernet/intel/ice/ice.h
> > +++ b/drivers/net/ethernet/intel/ice/ice.h
> > @@ -122,6 +122,8 @@
> >   #define ICE_MAX_MTU	(ICE_AQ_SET_MAC_FRAME_SIZE_MAX - ICE_ETH_PKT_HDR_PAD)
> > +#define ICE_MAX_TSO_SIZE 131072
> > +
> >   #define ICE_UP_TABLE_TRANSLATE(val, i) \
> >   		(((val) << ICE_AQ_VSI_UP_TABLE_UP##i##_S) & \
> >   		  ICE_AQ_VSI_UP_TABLE_UP##i##_M)
> > diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> > index 22b8ad058286..8c74a48ad0d3 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_main.c
> > +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> > @@ -3421,6 +3421,8 @@ static void ice_set_netdev_features(struct net_device *netdev)
> >   	 * be changed at runtime
> >   	 */
> >   	netdev->hw_features |= NETIF_F_RXFCS;
> > +
> > +	netif_set_tso_max_size(netdev, ICE_MAX_TSO_SIZE);
> >   }
> >   /**
> > diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c
> > index ccf09c957a1c..bef927afb766 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_txrx.c
> > +++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
> > @@ -2297,6 +2297,9 @@ ice_xmit_frame_ring(struct sk_buff *skb, struct ice_tx_ring *tx_ring)
> >   	ice_trace(xmit_frame_ring, tx_ring, skb);
> > +	if (unlikely(ipv6_hopopt_jumbo_remove(skb)))
> > +		goto out_drop;
> > +
> >   	count = ice_xmit_desc_count(skb);
> >   	if (ice_chk_linearize(skb, count)) {
> >   		if (__skb_linearize(skb))
G, GurucharanX Feb. 13, 2023, 8:49 a.m. UTC | #3
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Pawel Chmielewski
> Sent: Monday, February 6, 2023 9:29 PM
> To: netdev@vger.kernel.org
> Cc: intel-wired-lan@osuosl.org
> Subject: [Intel-wired-lan] [PATCH 1/1] ice: add support BIG TCP on IPv6
> 
> This change enables sending BIG TCP packets on IPv6 in the ice driver using
> generic ipv6_hopopt_jumbo_remove helper for stripping HBH header.
> 
> Tested:
> netperf -t TCP_RR -H 2001:db8:0:f101::1  -- -r80000,80000 -O
> MIN_LATENCY,P90_LATENCY,P99_LATENCY,THROUGHPUT
> 
> Results varied from one setup to another, but in every case we got lower
> latencies and increased transactions rate.
> 
> Signed-off-by: Pawel Chmielewski <pawel.chmielewski@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice.h      | 2 ++
>  drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
> drivers/net/ethernet/intel/ice/ice_txrx.c | 3 +++
>  3 files changed, 7 insertions(+)
> 

Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index 3d26ff4122e0..c774fdd482cd 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -122,6 +122,8 @@ 
 
 #define ICE_MAX_MTU	(ICE_AQ_SET_MAC_FRAME_SIZE_MAX - ICE_ETH_PKT_HDR_PAD)
 
+#define ICE_MAX_TSO_SIZE 131072
+
 #define ICE_UP_TABLE_TRANSLATE(val, i) \
 		(((val) << ICE_AQ_VSI_UP_TABLE_UP##i##_S) & \
 		  ICE_AQ_VSI_UP_TABLE_UP##i##_M)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 22b8ad058286..8c74a48ad0d3 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -3421,6 +3421,8 @@  static void ice_set_netdev_features(struct net_device *netdev)
 	 * be changed at runtime
 	 */
 	netdev->hw_features |= NETIF_F_RXFCS;
+
+	netif_set_tso_max_size(netdev, ICE_MAX_TSO_SIZE);
 }
 
 /**
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c
index ccf09c957a1c..bef927afb766 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx.c
+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
@@ -2297,6 +2297,9 @@  ice_xmit_frame_ring(struct sk_buff *skb, struct ice_tx_ring *tx_ring)
 
 	ice_trace(xmit_frame_ring, tx_ring, skb);
 
+	if (unlikely(ipv6_hopopt_jumbo_remove(skb)))
+		goto out_drop;
+
 	count = ice_xmit_desc_count(skb);
 	if (ice_chk_linearize(skb, count)) {
 		if (__skb_linearize(skb))