[PATCH v3] net/ice: support link flow control

Medvedkin, Vladimir vladimir.medvedkin at intel.com
Fri Sep 25 17:40:39 CEST 2026


Hi Bruce,

On 9/25/2026 4:02 PM, Bruce Richardson wrote:
> On Tue, Sep 22, 2026 at 06:23:33PM +0000, Vladimir Medvedkin wrote:
>> Add get and set operations for IEEE 802.3x link flow control.
>> Link pause is advertised only when requested, retained across port
>> stop/start and re-armed on link-up. The watermark and pause quanta
>> programming is shared with priority flow control.
>>
>> Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
>> ---
>> v3:
>> - Address Bruce's comments.
>> - Add documentation.
>> - Retain LFC configuration across port stop/start.
>> - Fix various issues.
>>
>>   doc/guides/nics/features/ice.ini       |   1 +
>>   doc/guides/nics/ice.rst                |  50 +++++
>>   doc/guides/rel_notes/release_26_11.rst |   4 +
>>   drivers/net/intel/ice/ice_ethdev.c     | 296 +++++++++++++++++++++----
>>   drivers/net/intel/ice/ice_ethdev.h     |   1 +
>>   5 files changed, 310 insertions(+), 42 deletions(-)
>>
> Acked-by: Bruce Richardson <bruce.richardson at intel.com>
>
> One comment inline below. I can fix on apply if you agree with it.
>

<snip>

>> +	/* Update forwarding of the non FC MAC control frames settings */
>> +	if (hw->mac_type == ICE_MAC_E830) {
>> +#define E830_MAC_COMMAND_CONFIG(pi) (((pi)->phy.link_info.link_speed == ICE_AQ_LINK_SPEED_200GB) ? \
>> +		E830_PRTMAC_200G_COMMAND_CONFIG : E830_PRTMAC_COMMAND_CONFIG)
>> +
> I don't like this definition right in the middle of the function. I think
> it should either be defined right before the function or else, at latest,
> just inside the function opening brace at the top.
> If you are ok with it, I'll move it on apply of the patch.
Sure, no objections
>> +		u32 mac_config = rd32(hw, E830_MAC_COMMAND_CONFIG(port_info));
>> +
>> +		if (fc_conf->mac_ctrl_frame_fwd)
>> +			mac_config |= E830_PRTMAC_COMMAND_CONFIG_CNTL_FRM_ENA_M;
>> +		else
>> +			mac_config &= ~E830_PRTMAC_COMMAND_CONFIG_CNTL_FRM_ENA_M;
>> +
>> +		wr32(hw, E830_MAC_COMMAND_CONFIG(port_info), mac_config);
>> +	} else {
>> +		fc_conf->mac_ctrl_frame_fwd = false;
>> +	}
>> +
>> +	/* Update pause quanta and refresh threshold */
>> +	max_frame_size = pf->dev_data->mtu ?
>> +		pf->dev_data->mtu + ICE_ETH_OVERHEAD :
>> +		ICE_FRAME_SIZE_MAX;
>> +	ret = ice_aq_set_mac_pfc_cfg(hw, max_frame_size, tc_bitmap,
>> +			fc_conf->pause_time, ((u32)fc_conf->pause_time + 1) / 2,
>> +			false, NULL);
>> +	if (ret)
>> +		PMD_DRV_LOG(ERR, "Can not update MAC configuration");
>> +
>> +	return ret;
>> +}
> <snip>

-- 
Regards,
Vladimir



More information about the dev mailing list