From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Harold Huang <baymaxhuang@gmail.com>, dev@dpdk.org
Cc: Chenbo Xia <chenbo.xia@intel.com>
Subject: Re: [PATCH] net/virtio: include ipv4 cksum to support cksum offload capability
Date: Mon, 31 Jan 2022 11:03:58 +0100 [thread overview]
Message-ID: <f6d438c8-5b7f-d58b-a371-142571d88b87@redhat.com> (raw)
In-Reply-To: <20220107115312.280036-1-baymaxhuang@gmail.com>
Hi Harold,
On 1/7/22 12:53, Harold Huang wrote:
> Device cksum offload capability usually include ipv4 cksum, tcp and udp
> cksum offload capability. The application such as OVS usually negotiate
> with the drive like this to enable cksum offload.
>
> Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
> ---
> drivers/net/virtio/virtio_ethdev.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index c2588369b2..65b03bf0e4 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -3041,6 +3041,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
> dev_info->rx_offload_capa |= RTE_ETH_RX_OFFLOAD_SCATTER;
> if (host_features & (1ULL << VIRTIO_NET_F_GUEST_CSUM)) {
> dev_info->rx_offload_capa |=
> + RTE_ETH_RX_OFFLOAD_IPV4_CKSUM |
> RTE_ETH_RX_OFFLOAD_TCP_CKSUM |
> RTE_ETH_RX_OFFLOAD_UDP_CKSUM;
> }
> @@ -3055,6 +3056,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
> RTE_ETH_TX_OFFLOAD_VLAN_INSERT;
> if (host_features & (1ULL << VIRTIO_NET_F_CSUM)) {
> dev_info->tx_offload_capa |=
> + RTE_ETH_TX_OFFLOAD_IPV4_CKSUM |
> RTE_ETH_TX_OFFLOAD_UDP_CKSUM |
> RTE_ETH_TX_OFFLOAD_TCP_CKSUM;
> }
I'm not sure to understand why this is needed, as Vhost lib will always
ensure the IP csum has been calculated. Could you please elaborate?
Thanks,
Maxime
next prev parent reply other threads:[~2022-01-31 10:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 11:53 Harold Huang
2022-01-31 10:03 ` Maxime Coquelin [this message]
2022-02-07 2:54 ` Harold Huang
2022-02-15 20:08 ` David Marchand
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=f6d438c8-5b7f-d58b-a371-142571d88b87@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=baymaxhuang@gmail.com \
--cc=chenbo.xia@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).