* [next-queue PATCH v1 1/2] igb: Change RXPBSIZE size when setting Qav mode
@ 2018-11-17 0:19 Vinicius Costa Gomes
2018-11-17 0:19 ` [next-queue PATCH v1 2/2] Documentation: igb: Add a section about CBS Vinicius Costa Gomes
2018-11-30 3:16 ` [next-queue PATCH v1 1/2] igb: Change RXPBSIZE size when setting Qav mode Brown, Aaron F
0 siblings, 2 replies; 4+ messages in thread
From: Vinicius Costa Gomes @ 2018-11-17 0:19 UTC (permalink / raw)
To: intel-wired-lan
Cc: Jesus Sanchez-Palencia, jeffrey.t.kirsher, netdev,
jesus.s.palencia
From: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Section 4.5.9 of the datasheet says that the total size of all packet
buffers combined (TxPB 0 + 1 + 2 + 3 + RxPB + BMC2OS + OS2BMC) must not
exceed 60KB. Today we are configuring a total of 62KB, so reduce the
RxPB from 32KB to 30KB in order to respect that.
The choice of changing RxPBSIZE here is mainly because it seems more
correct to give more priority to the transmit packet buffers over the
receiver ones when running in Qav mode. Also, the BMC2OS and OS2BMC
sizes are already too short.
Signed-off-by: Jesus Sanchez-Palencia <jesus.s.palencia@gmail.com>
---
drivers/net/ethernet/intel/igb/e1000_defines.h | 1 +
drivers/net/ethernet/intel/igb/igb_main.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/igb/e1000_defines.h b/drivers/net/ethernet/intel/igb/e1000_defines.h
index 8a28f3388f69..01fcfc6f3415 100644
--- a/drivers/net/ethernet/intel/igb/e1000_defines.h
+++ b/drivers/net/ethernet/intel/igb/e1000_defines.h
@@ -334,6 +334,7 @@
#define I210_RXPBSIZE_DEFAULT 0x000000A2 /* RXPBSIZE default */
#define I210_RXPBSIZE_MASK 0x0000003F
+#define I210_RXPBSIZE_PB_30KB 0x0000001E
#define I210_RXPBSIZE_PB_32KB 0x00000020
#define I210_TXPBSIZE_DEFAULT 0x04000014 /* TXPBSIZE default */
#define I210_TXPBSIZE_MASK 0xC0FFFFFF
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index bb4f3f64fbf0..e135adf46980 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -1934,7 +1934,7 @@ static void igb_setup_tx_mode(struct igb_adapter *adapter)
val = rd32(E1000_RXPBS);
val &= ~I210_RXPBSIZE_MASK;
- val |= I210_RXPBSIZE_PB_32KB;
+ val |= I210_RXPBSIZE_PB_30KB;
wr32(E1000_RXPBS, val);
/* Section 8.12.9 states that MAX_TPKT_SIZE from DTXMXPKTSZ
--
2.19.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [next-queue PATCH v1 2/2] Documentation: igb: Add a section about CBS
2018-11-17 0:19 [next-queue PATCH v1 1/2] igb: Change RXPBSIZE size when setting Qav mode Vinicius Costa Gomes
@ 2018-11-17 0:19 ` Vinicius Costa Gomes
2018-11-30 3:18 ` [Intel-wired-lan] " Brown, Aaron F
2018-11-30 3:16 ` [next-queue PATCH v1 1/2] igb: Change RXPBSIZE size when setting Qav mode Brown, Aaron F
1 sibling, 1 reply; 4+ messages in thread
From: Vinicius Costa Gomes @ 2018-11-17 0:19 UTC (permalink / raw)
To: intel-wired-lan
Cc: Vinicius Costa Gomes, jeffrey.t.kirsher, netdev, jesus.s.palencia
Add some pointers to the definition of the CBS algorithm, and some
notes about the limits of its implementation in the i210 family of
controllers.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
---
Documentation/networking/igb.rst | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/Documentation/networking/igb.rst b/Documentation/networking/igb.rst
index ba16b86d5593..e87a4a72ea2d 100644
--- a/Documentation/networking/igb.rst
+++ b/Documentation/networking/igb.rst
@@ -177,6 +177,25 @@ rate limit using the IProute2 tool. Download the latest version of the
IProute2 tool from Sourceforge if your version does not have all the features
you require.
+Credit Based Shaper (Qav Mode)
+------------------------------
+When enabling the CBS qdisc in the hardware offload mode, traffic shaping using
+the CBS (described in the IEEE 802.1Q-2018 Section 8.6.8.2 and discussed in the
+Annex L) algorithm will run in the i210 controller, so it's more accurate and
+uses less CPU.
+
+When using offloaded CBS, and the traffic rate obeys the configured rate
+(doesn't go above it), CBS should have little to no effect in the latency.
+
+The offloaded version of the algorithm has some limits, caused by how the idle
+slope is expressed in the adapter's registers. It can only represent idle slopes
+in 16.38431 kbps units, which means that if a idle slope of 2576kbps is
+requested, the controller will be configured to use a idle slope of ~2589 kbps,
+because the driver rounds the value up. For more details, see the comments on
+:c:func:`igb_config_tx_modes()`.
+
+NOTE: This feature is exclusive to i210 models.
+
Support
=======
--
2.19.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [Intel-wired-lan] [next-queue PATCH v1 2/2] Documentation: igb: Add a section about CBS
2018-11-17 0:19 ` [next-queue PATCH v1 2/2] Documentation: igb: Add a section about CBS Vinicius Costa Gomes
@ 2018-11-30 3:18 ` Brown, Aaron F
0 siblings, 0 replies; 4+ messages in thread
From: Brown, Aaron F @ 2018-11-30 3:18 UTC (permalink / raw)
To: Gomes, Vinicius, intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, jesus.s.palencia@gmail.com
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On
> Behalf Of Vinicius Costa Gomes
> Sent: Friday, November 16, 2018 4:19 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; jesus.s.palencia@gmail.com
> Subject: [Intel-wired-lan] [next-queue PATCH v1 2/2] Documentation: igb:
> Add a section about CBS
>
> Add some pointers to the definition of the CBS algorithm, and some
> notes about the limits of its implementation in the i210 family of
> controllers.
>
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
> ---
> Documentation/networking/igb.rst | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [next-queue PATCH v1 1/2] igb: Change RXPBSIZE size when setting Qav mode
2018-11-17 0:19 [next-queue PATCH v1 1/2] igb: Change RXPBSIZE size when setting Qav mode Vinicius Costa Gomes
2018-11-17 0:19 ` [next-queue PATCH v1 2/2] Documentation: igb: Add a section about CBS Vinicius Costa Gomes
@ 2018-11-30 3:16 ` Brown, Aaron F
1 sibling, 0 replies; 4+ messages in thread
From: Brown, Aaron F @ 2018-11-30 3:16 UTC (permalink / raw)
To: Gomes, Vinicius, intel-wired-lan@lists.osuosl.org
Cc: Sanchez-Palencia, Jesus, Kirsher, Jeffrey T,
netdev@vger.kernel.org, jesus.s.palencia@gmail.com
> From: netdev-owner@vger.kernel.org [mailto:netdev-
> owner@vger.kernel.org] On Behalf Of Vinicius Costa Gomes
> Sent: Friday, November 16, 2018 4:19 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: Sanchez-Palencia, Jesus <jesus.sanchez-palencia@intel.com>; Kirsher,
> Jeffrey T <jeffrey.t.kirsher@intel.com>; netdev@vger.kernel.org;
> jesus.s.palencia@gmail.com
> Subject: [next-queue PATCH v1 1/2] igb: Change RXPBSIZE size when setting
> Qav mode
>
> From: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
>
> Section 4.5.9 of the datasheet says that the total size of all packet
> buffers combined (TxPB 0 + 1 + 2 + 3 + RxPB + BMC2OS + OS2BMC) must not
> exceed 60KB. Today we are configuring a total of 62KB, so reduce the
> RxPB from 32KB to 30KB in order to respect that.
>
> The choice of changing RxPBSIZE here is mainly because it seems more
> correct to give more priority to the transmit packet buffers over the
> receiver ones when running in Qav mode. Also, the BMC2OS and OS2BMC
> sizes are already too short.
>
> Signed-off-by: Jesus Sanchez-Palencia <jesus.s.palencia@gmail.com>
> ---
> drivers/net/ethernet/intel/igb/e1000_defines.h | 1 +
> drivers/net/ethernet/intel/igb/igb_main.c | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-30 14:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-17 0:19 [next-queue PATCH v1 1/2] igb: Change RXPBSIZE size when setting Qav mode Vinicius Costa Gomes
2018-11-17 0:19 ` [next-queue PATCH v1 2/2] Documentation: igb: Add a section about CBS Vinicius Costa Gomes
2018-11-30 3:18 ` [Intel-wired-lan] " Brown, Aaron F
2018-11-30 3:16 ` [next-queue PATCH v1 1/2] igb: Change RXPBSIZE size when setting Qav mode Brown, Aaron F
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox