Skip to content

Conversation

@hisharanwithu
Copy link
Contributor

This patch series enables batching the send/receive operation on
a network packets on a netdev. The implementation extends the
virtio-net driver to support batch operation.

  • plat/virtio: Remove warning in virtio_netdev_recv
  • lib/uknetdev: Support burst tx
  • lib/uknetdev: Support to check UK_NETDEV_UNDERRUN status
  • lib/uknetdev: Support burst receive
  • plat/virtio: Support ANY_LAYOUT on virtio_net
  • lib/uknetdev: Release a burst of packet from ring

Sharan Santhanam added 6 commits June 30, 2021 09:46
The netdev parameter maybe unused if the UK_ASSERT are not enabled.
To suppress the unused warning we add `__maybe_unused` attribute.

Signed-off-by: Sharan Santhanam <sharan.santhanam@neclab.eu>
Transmit a burst of packets. This patch also provides a
compatible tx_one interface to be backwards compatible to the
uk_netdev_tx_one interface.

Signed-off-by: Sharan Santhanam <sharan.santhanam@neclab.eu>
On performing `uk_netdev_tx_burst`, a portion of netbufs on the
list of buffers may not be sent and a status UK_NETDEV_UNDERRUN is
reported back. The helper function allows to check the flag is set.

Signed-off-by: Sharan Santhanam <sharan.santhanam@neclab.eu>
Receive a burst of packets on a rx queue. The patch also provides a
compatible rx_one interface to be compatible with the
uk_netdev_rx_one

Signed-off-by: Sharan Santhanam <sharan.santhanam@neclab.eu>
Add support to ANY_LAYOUT to the virtio driver. The advantage of
using ANY_LAYOUT reduces the necessity of having 2 descriptor per
packet to 1 descriptor per packet

Signed-off-by: Sharan Santhanam <sharan.santhanam@neclab.eu>
The transmit ring frees a burst of packet from the ring instead of
freeing one packet at time. This patch also allows the users of the
netdev to make the decision of releasing the transmission buffer.

Signed-off-by: Sharan Santhanam <sharan.santhanam@neclab.eu>
@skuenzer skuenzer self-requested a review July 1, 2021 09:55
@unikraft-bot
Copy link
Member

⚠️ Checkpatch passed with warnings

Beep boop! I ran Unikraft's checkpatch.pl support script on your pull request but it encountered warnings:

SHA commit checkpatch
f6115a3 plat/virtio: Remove warning in virtio_netdev_recv
995a704 lib/uknetdev: Support burst tx
31de5c7 lib/uknetdev: Support to check UK_NETDEV_UNDERRUN status
a1569a0 lib/uknetdev: Support burst receive ⚠️
8702620 plat/virtio: Support ANY_LAYOUT on virtio_net ⚠️
2bf0cdc lib/uknetdev: Release a burst of packet from ring

Truncated logs starting from first warning a1569a0:

WARNING:LONG_LINE_STRING: line over 80 characters
#314: FILE: plat/drivers/virtio/virtio_net.c:324:
+			uk_pr_debug("Enqueue netbuf %"PRIu16"/%"PRIu16" (%p) to virtqueue %p write_cnt: %d...\n",

total: 0 errors, 1 warnings, 590 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/tmp/build/a53d4c5b/patches/0004-lib-uknetdev-Support-burst-receive.patch has style problems, please review.

NOTE: Ignored message types: ASSIGN_IN_IF FILE_PATH_CHANGES NEW_TYPEDEFS OBSOLETE

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

View complete logs | Learn more about Unikraft's coding style and contribution guidelines.

@razvand razvand added this to the v0.8 - Enceladus milestone Nov 27, 2021
@hisharanwithu hisharanwithu requested a review from a team February 2, 2022 09:28
@razvand razvand removed the request for review from a team February 5, 2022 06:32
@unikraft-bot unikraft-bot requested review from a team as code owners August 19, 2022 14:32
@nderjung nderjung added the needs/rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 15, 2022
@Zack-Will
Copy link

I see that netdevice supports burst in earlier versions, why was this feature removed?

@razvand
Copy link
Contributor

razvand commented May 14, 2023

I see that netdevice supports burst in earlier versions, why was this feature removed?

@skuenzer, could you answer this?

@skuenzer
Copy link
Member

I see that netdevice supports burst in earlier versions, why was this feature removed?

Hi @Zack-Will,
in fact, burst behavior was never upstream but planned for uknetdev. We planned to update this PR with a slight different API, however, we did not manage to do so yet because of different priorities. On the other hand, you also need networking stacks supporting bursts, the use is limited to custom network functions. Are you interested in such a functionality?

Thanks,

Simon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/plat Unikraft Patform kind/enhancement New feature or request lib/uknetdev needs/rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. plat/driver/virtio

Projects

Status: 🧊 Icebox
Status: review:changes_requested

Development

Successfully merging this pull request may close these issues.

6 participants