* Netvsc PMD : Hotplug handling : checksum offloads @ 2024-09-19 18:11 Nandini Rangaswamy 2024-09-19 18:47 ` Stephen Hemminger 0 siblings, 1 reply; 7+ messages in thread From: Nandini Rangaswamy @ 2024-09-19 18:11 UTC (permalink / raw) To: Long Li, Stephen Hemminger, users [-- Attachment #1: Type: text/plain, Size: 1535 bytes --] Hi Long/Stephen, I was going through the hotplug handling code in netvsc PMD and need clarification. Earlier with failsafe PMD , my dpdk app used to subscribe to hotplug events to set the checksum offloads to do software checksum calculation when VF was removed and switch to H/W checksum calculation when VF was added. I see even with netvsc PMD , it does not do anything specific to RSS /checksum offloads in hotplug callbacks but initializes VF port (through ioctl) during hotplug add and removes VF port in hotplug remove callback. So my understanding is, the dpdk app should continue to handle the checksum offloads as part of hotplug callbacks and netvsc will not handle it automatically. Can you confirm if this is correct? Regards, Nandini -- This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly 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. [-- Attachment #2: Type: text/html, Size: 1688 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Netvsc PMD : Hotplug handling : checksum offloads 2024-09-19 18:11 Netvsc PMD : Hotplug handling : checksum offloads Nandini Rangaswamy @ 2024-09-19 18:47 ` Stephen Hemminger 2024-10-23 20:34 ` Nandini Rangaswamy 0 siblings, 1 reply; 7+ messages in thread From: Stephen Hemminger @ 2024-09-19 18:47 UTC (permalink / raw) To: Nandini Rangaswamy; +Cc: Long Li, users On Thu, 19 Sep 2024 11:11:44 -0700 Nandini Rangaswamy <nandini.rangaswamy@broadcom.com> wrote: > Hi Long/Stephen, > I was going through the hotplug handling code in netvsc PMD and need > clarification. > Earlier with failsafe PMD , my dpdk app used to subscribe to hotplug events > to set the checksum offloads to do software checksum calculation when VF > was removed and switch to H/W checksum calculation when VF was added. > I see even with netvsc PMD , it does not do anything specific to RSS > /checksum offloads in hotplug callbacks but initializes VF port (through > ioctl) during hotplug add and removes VF port in hotplug remove callback. > So my understanding is, the dpdk app should continue to handle the checksum > offloads as part of hotplug callbacks and netvsc will not handle it > automatically. > Can you confirm if this is correct? > Regards, > Nandini The code should look at the checksum flags in each packet, rather than assuming VF hotplug will change things. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Netvsc PMD : Hotplug handling : checksum offloads 2024-09-19 18:47 ` Stephen Hemminger @ 2024-10-23 20:34 ` Nandini Rangaswamy 2024-10-24 16:33 ` Stephen Hemminger 0 siblings, 1 reply; 7+ messages in thread From: Nandini Rangaswamy @ 2024-10-23 20:34 UTC (permalink / raw) To: Stephen Hemminger; +Cc: Long Li, users [-- Attachment #1: Type: text/plain, Size: 2206 bytes --] 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 hotplug add and re-configure the checksum offloads when VF is added again? Regards, Nandini On Thu, Sep 19, 2024 at 11:47 AM Stephen Hemminger < stephen@networkplumber.org> wrote: > On Thu, 19 Sep 2024 11:11:44 -0700 > Nandini Rangaswamy <nandini.rangaswamy@broadcom.com> wrote: > > > Hi Long/Stephen, > > I was going through the hotplug handling code in netvsc PMD and need > > clarification. > > Earlier with failsafe PMD , my dpdk app used to subscribe to hotplug > events > > to set the checksum offloads to do software checksum calculation when VF > > was removed and switch to H/W checksum calculation when VF was added. > > I see even with netvsc PMD , it does not do anything specific to RSS > > /checksum offloads in hotplug callbacks but initializes VF port (through > > ioctl) during hotplug add and removes VF port in hotplug remove callback. > > So my understanding is, the dpdk app should continue to handle the > checksum > > offloads as part of hotplug callbacks and netvsc will not handle it > > automatically. > > Can you confirm if this is correct? > > Regards, > > Nandini > > The code should look at the checksum flags in each packet, rather > than assuming VF hotplug will change things. > > -- This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly 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. [-- Attachment #2: Type: text/html, Size: 2727 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Netvsc PMD : Hotplug handling : checksum offloads 2024-10-23 20:34 ` Nandini Rangaswamy @ 2024-10-24 16:33 ` Stephen Hemminger 2024-10-24 21:38 ` Nandini Rangaswamy 0 siblings, 1 reply; 7+ messages in thread From: Stephen Hemminger @ 2024-10-24 16:33 UTC (permalink / raw) To: Nandini Rangaswamy; +Cc: Long Li, users 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 desired > performance. Instead, should the dpdk app register callbacks for hotplug > 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. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Netvsc PMD : Hotplug handling : checksum offloads 2024-10-24 16:33 ` Stephen Hemminger @ 2024-10-24 21:38 ` Nandini Rangaswamy 2024-10-30 1:01 ` Nandini Rangaswamy 0 siblings, 1 reply; 7+ messages in thread From: Nandini Rangaswamy @ 2024-10-24 21:38 UTC (permalink / raw) To: Stephen Hemminger; +Cc: Long Li, users [-- Attachment #1: Type: text/plain, Size: 1933 bytes --] 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 as 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 AM Stephen Hemminger < stephen@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 > desired > > performance. Instead, should the dpdk app register callbacks for hotplug > > 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 electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly 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. [-- Attachment #2: Type: text/html, Size: 2425 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Netvsc PMD : Hotplug handling : checksum offloads 2024-10-24 21:38 ` Nandini Rangaswamy @ 2024-10-30 1:01 ` Nandini Rangaswamy 2024-10-31 22:14 ` Long Li 0 siblings, 1 reply; 7+ messages in thread From: Nandini Rangaswamy @ 2024-10-30 1:01 UTC (permalink / raw) To: Stephen Hemminger; +Cc: Long Li, users [-- Attachment #1: Type: text/plain, Size: 3068 bytes --] 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 PM 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 as > 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 AM Stephen Hemminger < > stephen@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 >> desired >> > performance. Instead, should the dpdk app register callbacks for hotplug >> > 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 electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly 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. [-- Attachment #2: Type: text/html, Size: 3850 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Netvsc PMD : Hotplug handling : checksum offloads 2024-10-30 1:01 ` Nandini Rangaswamy @ 2024-10-31 22:14 ` Long Li 0 siblings, 0 replies; 7+ messages in thread From: Long Li @ 2024-10-31 22:14 UTC (permalink / raw) To: Nandini Rangaswamy, Stephen Hemminger; +Cc: users [-- Attachment #1: Type: text/plain, Size: 3906 bytes --] Hi Nandini, Just want to clarify, you don’t use TX checksum with Netvsc but the packet is sent to the wire with checksum automatically set. If you use TX/RX checksum with Netvsc, do you see problems while sending/receiving packets with the correct checksums? VF should always use the same checksum offload settings as Netvsc, it is done in hn_vf_add(). Unless you have a special requirement, you probably don’t want to handle hotplug events for the VF, as Netvsc should handle that for you. You should always use Netvsc to send/receive all packets. Thanks, Long From: Nandini Rangaswamy <nandini.rangaswamy@broadcom.com> Sent: Tuesday, October 29, 2024 6:02 PM To: Stephen Hemminger <stephen@networkplumber.org> Cc: Long Li <longli@microsoft.com>; users@dpdk.org Subject: Re: Netvsc PMD : Hotplug handling : checksum offloads 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 PM Nandini Rangaswamy <nandini.rangaswamy@broadcom.com<mailto: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 as 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 AM Stephen Hemminger <stephen@networkplumber.org<mailto:stephen@networkplumber.org>> wrote: On Wed, 23 Oct 2024 13:34:53 -0700 Nandini Rangaswamy <nandini.rangaswamy@broadcom.com<mailto:nandini.rangaswamy@broadcom.com>> 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 hotplug > 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 electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly 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. [-- Attachment #2: Type: text/html, Size: 8167 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-10-31 22:14 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-09-19 18:11 Netvsc PMD : Hotplug handling : checksum offloads Nandini Rangaswamy 2024-09-19 18:47 ` Stephen Hemminger 2024-10-23 20:34 ` Nandini Rangaswamy 2024-10-24 16:33 ` Stephen Hemminger 2024-10-24 21:38 ` Nandini Rangaswamy 2024-10-30 1:01 ` Nandini Rangaswamy 2024-10-31 22:14 ` Long Li
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).