ionic: small driver fixes
Subsystems (3)
v2 cover ionic: small driver fixes
This is a pair of fixes to address a DIM issue and a kernel test robot complaint
v2:
- dropped 5 patches, to be reposted for net-next
- added Florian's Rb
v1:
https://lore.kernel.org/netdev/[email protected]/
Brett Creeley (1):
ionic: Fix dim work handling in split interrupt mode
Shannon Nelson (1):
ionic: fix snprintf format length warning
drivers/net/ethernet/pensando/ionic/ionic_dev.h | 2 +- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-)
Signature · 1 line
2.17.1
PATCH v2 1/2 ionic: fix snprintf format length warning
Our friendly kernel test robot has reminded us that with a new check we have a warning about a potential string truncation. In this case it really doesn't hurt anything, but it is worth addressing especially since there really is no reason to reserve so many bytes for our queue names. It seems that cutting the queue name buffer length in half stops the complaint.
--- drivers/net/ethernet/pensando/ionic/ionic_dev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/pensando/ionic/ionic_dev.h +1 -1
@@ -223,7 +223,7 @@ struct ionic_desc_info {void *cb_arg; }; -#define IONIC_QUEUE_NAME_MAX_SZ 32 +#define IONIC_QUEUE_NAME_MAX_SZ 16struct ionic_queue {struct device *dev;
Signature · 1 line
2.17.1
PATCH v2 2/2 ionic: Fix dim work handling in split interrupt mode
In reply to Shannon NelsonFrom: Brett Creeley <[email protected]>
Currently ionic_dim_work() is incorrect when in split interrupt mode. This is because the interrupt rate is only being changed for the Rx side even for dim running on Tx. Fix this by using the qcq from the container_of macro. Also, introduce some local variables for a bit of cleanup.
--- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/net/ethernet/pensando/ionic/ionic_lif.c +8 -8
@@ -49,24 +49,24 @@ static void ionic_lif_queue_identify(struct ionic_lif *lif);static void ionic_dim_work (struct work_struct *work) { struct dim *dim = container_of(work, struct dim, work); +struct ionic_intr_info *intr;struct dim_cq_moder cur_moder;struct ionic_qcq *qcq; +struct ionic_lif *lif;u32 new_coal; cur_moder =net_dim_get_rx_moderation (dim->mode, dim->profile_ix); qcq = container_of(dim, struct ionic_qcq, dim); - new_coal =ionic_coal_usec_to_hw (qcq->q.lif->ionic, cur_moder.usec); + lif = qcq->q.lif; + new_coal =ionic_coal_usec_to_hw (lif->ionic, cur_moder.usec); new_coal = new_coal ? new_coal :1 ; -if (qcq->intr.dim_coal_hw != new_coal) { -unsigned int qi = qcq->cq.bound_q->index; -struct ionic_lif *lif = qcq->q.lif; - - qcq->intr.dim_coal_hw = new_coal; + intr = &qcq->intr; +if (intr->dim_coal_hw != new_coal) { + intr->dim_coal_hw = new_coal;ionic_intr_coal_init (lif->ionic->idev.intr_ctrl, - lif->rxqcqs[qi]->intr.index, - qcq->intr.dim_coal_hw); + intr->index, intr->dim_coal_hw); } dim->state =DIM_START_MEASURE ;
Signature · 1 line
2.17.1
This series was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Mon, 4 Dec 2023 11:22:32 -0800 you wrote:
This is a pair of fixes to address a DIM issue and a kernel test robot complaint
v2:
- dropped 5 patches, to be reposted for net-next
- added Florian's Rb[...]
Here is the summary with links:
- [v2,net,1/2] ionic: fix snprintf format length warning
https://git.kernel.org/netdev/net/c/0ceb3860a676 - [v2,net,2/2] ionic: Fix dim work handling in split interrupt mode https://git.kernel.org/netdev/net/c/4115ba677c35
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html