Skip to content

Commit

Permalink
virtio_net: fix dma hang issue for multiseg pkts
Browse files Browse the repository at this point in the history
For multi-seg pkts where pkt len is equal to total length of
required virtio descriptor buffers, an additional dma is triggered
for 0 length.
A fix is added in calculation of required buffers.

Fixes: 3660e13 ("virtio_net: fix vring desc length calculation")

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Change-Id: I897d9be5013446f1df5df93baee1f775e1735ed4
Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/dataplane/dpu-offload/+/134042
Tested-by: sa_ip-toolkits-Jenkins <sa_ip-toolkits-jenkins@marvell.com>
Reviewed-by: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>
  • Loading branch information
rbhansali authored and jerinjacobk committed Aug 27, 2024
1 parent b36fd7e commit afb3254
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/virtio_net/virtio_net_enq.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ calculate_nb_enq(uint64_t *sd_desc_base, uint16_t off, uint32_t slen, uint16_t q
uint32_t dlen = 0;
uint64_t d_flags;

while (dlen <= slen && avail_sd) {
while (dlen < slen && avail_sd) {
d_flags = *DESC_PTR_OFF(sd_desc_base, off, 8);
dlen += d_flags & (RTE_BIT64(32) - 1);
off = (off + 1) & (qsize - 1);
Expand Down

0 comments on commit afb3254

Please sign in to comment.