nvethernet: enable rx frame based interrupt coalescing

Rx frame based coalescing can be enabled only when
Rx timer based coalescing is also enabled. This is to avoid
no rx interrupt issues for applications which send only limited
frames and expects reply.

Bug 200529168

Change-Id: I7b00414bd56935ad8df57c9fa28764feb878213d
Signed-off-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2233503
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Ajay Gupta
2019-11-04 15:05:51 -08:00
committed by Revanth Kumar Uppala
parent 9fec12055d
commit 5a14f39d86
2 changed files with 50 additions and 5 deletions

View File

@@ -3251,6 +3251,29 @@ static int ether_parse_dt(struct ether_priv_data *pdata)
}
osi_dma->use_riwt = OSI_ENABLE;
}
/* rx_frames value to be set */
ret = of_property_read_u32(np, "nvidia,rx_frames",
&osi_dma->rx_frames);
if (ret < 0) {
osi_dma->use_rx_frames = OSI_DISABLE;
} else {
if (osi_dma->rx_frames > RX_DESC_CNT ||
osi_dma->rx_frames < OSI_MIN_RX_COALESCE_FRAMES) {
dev_err(dev,
"invalid rx-frames, must be inrange %d to %d",
OSI_MIN_RX_COALESCE_FRAMES, RX_DESC_CNT);
return -EINVAL;
}
osi_dma->use_rx_frames = OSI_ENABLE;
}
if (osi_dma->use_riwt == OSI_DISABLE &&
osi_dma->use_rx_frames == OSI_ENABLE) {
dev_err(dev, "invalid settings : rx-frames must be enabled"
" along with use_riwt in DT\n");
return -EINVAL;
}
/* Enable VLAN strip by default */
osi_core->strip_vlan_tag = OSI_ENABLE;