The address should be calculated before type cast, not after.
Fixes:
cc0251813277 ("net/netvsc: split send buffers from Tx descriptors")
Cc: stable@dpdk.org
Reported-by: Souvik Dey <sodey@rbbn.com>
Signed-off-by: Long Li <longli@microsoft.com>
txd->queue_id = txq->queue_id;
txd->chim_index = NVS_CHIM_IDX_INVALID;
- txd->rndis_pkt = (struct rndis_packet_msg *)(char *)txq->tx_rndis
- + idx * HN_RNDIS_PKT_ALIGNED;
+ txd->rndis_pkt = (struct rndis_packet_msg *)((char *)txq->tx_rndis
+ + idx * HN_RNDIS_PKT_ALIGNED);
}
int