From: Jijiang Liu <jijiang.liu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v3 4/8] driver/virtio:fill virtio device info for TX offload
Date: Wed, 4 Nov 2015 16:35:27 +0800 [thread overview]
Message-ID: <1446626131-27513-5-git-send-email-jijiang.liu@intel.com> (raw)
In-Reply-To: <1446626131-27513-1-git-send-email-jijiang.liu@intel.com>
Fill virtio device info for TX offload.
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
---
drivers/net/virtio/virtio_ethdev.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index cb5dfee..b831c02 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1559,6 +1559,16 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->default_txconf = (struct rte_eth_txconf) {
.txq_flags = ETH_TXQ_FLAGS_NOOFFLOADS
};
+
+ if (hw->guest_features & (1u << VIRTIO_NET_F_CSUM))
+ dev_info->tx_offload_capa = DEV_TX_OFFLOAD_IPV4_CKSUM |
+ DEV_TX_OFFLOAD_UDP_CKSUM |
+ DEV_TX_OFFLOAD_TCP_CKSUM |
+ DEV_TX_OFFLOAD_SCTP_CKSUM;
+
+ if ((hw->guest_features & (1u << VIRTIO_NET_F_HOST_TSO4)) ||
+ (hw->guest_features & (1u << VIRTIO_NET_F_HOST_TSO6)))
+ dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_TCP_TSO;
}
/*
--
1.7.7.6
next prev parent reply other threads:[~2015-11-04 8:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 8:35 [dpdk-dev] [PATCH v3 0/8] add vhost TX offload support Jijiang Liu
2015-11-04 8:35 ` [dpdk-dev] [PATCH v3 1/8] driver/virtio:add virtual addr for virtio net header Jijiang Liu
2015-11-04 8:35 ` [dpdk-dev] [PATCH v3 2/8] driver/virtio: record virtual address of " Jijiang Liu
2015-11-04 8:35 ` [dpdk-dev] [PATCH v3 3/8] driver/virtio:add vhost TX checksum support capability in virtio-net Jijiang Liu
2015-11-04 8:35 ` Jijiang Liu [this message]
2015-11-04 8:35 ` [dpdk-dev] [PATCH v3 5/8] driver/virtio:enqueue vhost TX offload Jijiang Liu
2015-11-04 8:35 ` [dpdk-dev] [PATCH v3 6/8] " Jijiang Liu
2015-11-04 8:35 ` [dpdk-dev] [PATCH v3 7/8] lib/librte_vhost:dequeue " Jijiang Liu
2015-11-04 8:35 ` [dpdk-dev] [PATCH v3 8/8] examples/vhost:support TX offload in vhost sample Jijiang Liu
2015-11-04 10:48 ` [dpdk-dev] [PATCH v3 0/8] add vhost TX offload support Liu, Jijiang
2015-11-04 10:54 Jijiang Liu
2015-11-04 10:54 ` [dpdk-dev] [PATCH v3 4/8] driver/virtio:fill virtio device info for TX offload Jijiang Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446626131-27513-5-git-send-email-jijiang.liu@intel.com \
--to=jijiang.liu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).