From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 03B1645C0D for ; Wed, 30 Oct 2024 02:02:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 855E0402EE; Wed, 30 Oct 2024 02:02:12 +0100 (CET) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) by mails.dpdk.org (Postfix) with ESMTP id C523D4025E for ; Wed, 30 Oct 2024 02:02:11 +0100 (CET) Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2fb3ce15172so3792761fa.0 for ; Tue, 29 Oct 2024 18:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1730250131; x=1730854931; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nE+gZrpwXMs+K9/Chq+Zn0+bjoxFORBqgf9bc6bLhM4=; b=KUb3guNv6/hYgKTF1Lt6DOw9IcieQlvYzcm0pweu1CUdg8IH66GcGXQn1gaEOStneB cm3jI73GMGOHWtmtiBCOIwUw6xg9p88v1NTCjMKMaewzq0WcUJUug4aXIQGAHw4Ca9uL MoTpaX0ED24i+9L3iL3zHaC8ZzGMYAPxex1g8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730250131; x=1730854931; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nE+gZrpwXMs+K9/Chq+Zn0+bjoxFORBqgf9bc6bLhM4=; b=uBWcK8PW8fUtQPfRB3wG5XxUwpqan0RPu9lxbCE0WppJlcjbXGUdOEF+IH1OJEjtRL tSZer6krpNgRUJNdeYBzPKnwGr5hmDSRkpXKu5b+qdHhxtuX/ZUL/d1D4YugnUYUEif1 sIFYCQZhMxby39cZLGDBdZeiZmBV/VefeKCM7qAdOjHR7EUxON8b3lKNr1Zgy4YhZQa9 i0UkAgpxC0Ck76p0yfqxgJpf5RqtRIW7zZ7nKUTpG8C287XNC+ANZw6Uy4pz4NTFz8WC oQJG01OqANTPPpcqa1XLvqH1oCa9Rk8qS1s+j/+99Bxi1nFL8HKagYcjYbqErfr6V/n8 yAKg== X-Forwarded-Encrypted: i=1; AJvYcCWZJRnuuVDuzgoHMQOprqHWQ5bzP7cz95q+Ei1s7XB2TYZHCva9gMXgy7Rdd05jhidW9VZsmA==@dpdk.org X-Gm-Message-State: AOJu0YwqKVA1H7yyIEfKLom3qMOTZVXs6qSjE5/4NtZK/TYioNNp+3r2 F9wWV9iYRC/sf9pkHAaqpE/f6DH92r83DKsNyJzdtQHYkIYEXLHHYUjYUYxtEW4nU92sXSnLck+ 0f+NIrMYUc3L5l1gXblQqIv0zhi1lqVNv9T7T6901muBhpw8voB3/LXgrW+E/10zI3Sr44yZ0j7 bfx/kr888= X-Google-Smtp-Source: AGHT+IEg85eALlZwBtay9c0uihlWm0Ww+qFlrW9OsEBDmtWtRboVZJykj0Ad7r22hPa2AV3k25J1jN4sHlXmVzMYZeA= X-Received: by 2002:a05:651c:2116:b0:2fb:6243:321d with SMTP id 38308e7fff4ca-2fcdc90eb42mr15639881fa.5.1730250131034; Tue, 29 Oct 2024 18:02:11 -0700 (PDT) MIME-Version: 1.0 References: <20240919114719.2389589a@hermes.local> <20241024093357.2473c767@hermes.local> In-Reply-To: From: Nandini Rangaswamy Date: Tue, 29 Oct 2024 18:01:59 -0700 Message-ID: Subject: Re: Netvsc PMD : Hotplug handling : checksum offloads To: Stephen Hemminger Cc: Long Li , users@dpdk.org Content-Type: multipart/alternative; boundary="0000000000006efc670625a740c4" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --0000000000006efc670625a740c4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Stephen, I am testing UDP IPv4 offloads. Earlier with failsafe PMD , my dpdk app would subscribe to hotplug add and delete callbacks. In Hotplug add callback the appropriate mbuf flags were set for hardware to perform checksum offload and in hotplug delete, the function pointer was modified to calculate checksum in software. To test netvsc PMD, I have commented out the code in hotplug callbacks to understand what happens. As you mentioned, as part of hotplug add, hn_vf_add restores all the VF offloads and it works as expected. In case of hotplug removal, I notice that even in the absence of software checksum , the packets are reaching the destination with the correct checksum. The dpdk app continues to set mbuf flags for offload in the sender. I expected packets to be dropped at the sender because offloads should be absent as VF is removed. Does netvsc pmd calculate checksum if mbuf checksum offload flags are set and VF is absent? Regards, Nandini On Thu, Oct 24, 2024 at 2:38=E2=80=AFPM Nandini Rangaswamy < nandini.rangaswamy@broadcom.com> wrote: > Hi Stephen/Long, > I did some more code instrumentation and I observed that when a hotplug > add event is received, the conf is applied back to VF and offloads work a= s > expected. > I also observe that when VF is removed, the offloads still continue to > work as expected. Is this because the offloads are not unset when VF is > removed ? > Regards, > Nandini > > On Thu, Oct 24, 2024 at 9:33=E2=80=AFAM Stephen Hemminger < > stephen@networkplumber.org> wrote: > >> On Wed, 23 Oct 2024 13:34:53 -0700 >> Nandini Rangaswamy wrote: >> >> > Hi Stephen, >> > The code looking at checksum flags in each packet would not give us >> desired >> > performance. Instead, should the dpdk app register callbacks for hotpl= ug >> > add and re-configure the checksum offloads when VF is added again? >> > Regards, >> > Nandini >> >> The code in hn_vf_add which is where netvsc PMD handles hot add of VF >> should be feeding the current offload settings to the VF. >> >> Maybe the rte_eth_conf being passed to VF is incorrect, or >> the configuration step there is failing. Probably need more >> instrumentation >> and logs to tell. >> > --=20 This electronic communication and the information and any files transmitted= =20 with it, or attached to it, are confidential and are intended solely for=20 the use of the individual or entity to whom it is addressed and may contain= =20 information that is confidential, legally privileged, protected by privacy= =20 laws, or otherwise restricted from disclosure to anyone else. If you are=20 not the intended recipient or the person responsible for delivering the=20 e-mail to the intended recipient, you are hereby notified that any use,=20 copying, distributing, dissemination, forwarding, printing, or copying of= =20 this e-mail is strictly prohibited. If you received this e-mail in error,= =20 please return the e-mail to the sender, delete it from your computer, and= =20 destroy any printed copy of it. --0000000000006efc670625a740c4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Stephen,
I am testing UDP IPv4 offloads. Earlier wi= th failsafe PMD , my dpdk app would subscribe to hotplug add and delete cal= lbacks. In Hotplug add callback=C2=A0the appropriate mbuf flags were set fo= r hardware to perform checksum offload and in hotplug delete, the function = pointer was modified to calculate checksum in software.
To test n= etvsc PMD, I have commented out the code in hotplug callbacks to understand= what happens. As you mentioned, as part of hotplug add, hn_vf_add restores= all the VF offloads and it works as expected. In case of hotplug removal, = I notice that even in the absence=C2=A0of software checksum , the packets a= re reaching the destination with the correct checksum. The dpdk app continu= es to set mbuf flags for offload in the sender. I expected packets to be dr= opped at the sender because offloads should be absent as VF is removed. Doe= s netvsc pmd calculate checksum if mbuf checksum offload flags are set and = VF is absent?

Regards,
Nandini

On T= hu, Oct 24, 2024 at 2:38=E2=80=AFPM Nandini Rangaswamy <nandini.rangaswamy@broadcom.com> = wrote:
Hi Stephen/Long,
I did some more code instrumentation and I ob= served that when a hotplug add=C2=A0event is received, the conf is applied = back to VF and offloads work as expected.
I also observe that whe= n VF is removed, the offloads still continue to work as expected. Is this b= ecause the offloads are not unset when VF is removed ?
Regards,
Nandini

On Thu, Oct 24, 2024 at 9:33=E2=80=AFAM Stephen Hemmi= nger <st= ephen@networkplumber.org> wrote:
On Wed, 23 Oct 2024 13:34:53 -0700
Nandini Rangaswamy <nandini.rangaswamy@broadcom.com> wrote:

> Hi Stephen,
> The code looking at checksum flags in each packet would not give us de= sired
> performance. Instead, should the dpdk app register callbacks for hotpl= ug
> add and re-configure the checksum offloads when VF is added again?
> Regards,
> Nandini

The code in hn_vf_add which is where netvsc PMD handles hot add of VF
should be feeding the current offload settings to the VF.

Maybe the rte_eth_conf being passed to VF is incorrect, or
the configuration step there is failing. Probably need more instrumentation=
and logs to tell.

This ele= ctronic communication and the information and any files transmitted with it= , or attached to it, are confidential and are intended solely for the use o= f the individual or entity to whom it is addressed and may contain informat= ion that is confidential, legally privileged, protected by privacy laws, or= otherwise restricted from disclosure to anyone else. If you are not the in= tended recipient or the person responsible for delivering the e-mail to the= intended recipient, you are hereby notified that any use, copying, distrib= uting, dissemination, forwarding, printing, or copying of this e-mail is st= rictly prohibited. If you received this e-mail in error, please return the = e-mail to the sender, delete it from your computer, and destroy any printed= copy of it. --0000000000006efc670625a740c4--