On Fri, Aug 26, 2016 at 2:39 AM, Chandran, Sugesh <sugesh.chand...@intel.com> wrote: >> -----Original Message----- >> From: Jesse Gross [mailto:je...@kernel.org] >> Sent: Thursday, August 25, 2016 10:09 PM >> To: Chandran, Sugesh <sugesh.chand...@intel.com> >> Cc: ovs dev <dev@openvswitch.org> >> Subject: Re: [RFC PATCHv5] netdev-dpdk: Enable Rx checksum offloading >> feature on DPDK physical ports. >> >> On Thu, Aug 25, 2016 at 2:43 AM, Sugesh Chandran >> <sugesh.chand...@intel.com> wrote: >> > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index >> > 6d334db..46c4045 100644 >> > --- a/lib/netdev-dpdk.c >> > +++ b/lib/netdev-dpdk.c >> > static void >> > +dpdk_eth_checksum_offload_configure(struct netdev_dpdk *dev) >> > + OVS_REQUIRES(dev->mutex) >> > +{ >> > + struct rte_eth_dev_info info; >> > + bool rx_csum_ol_flag = false; >> > + uint32_t rx_chksm_offload_capa = DEV_RX_OFFLOAD_UDP_CKSUM | >> > + DEV_RX_OFFLOAD_TCP_CKSUM | >> > + DEV_RX_OFFLOAD_IPV4_CKSUM; >> > + rte_eth_dev_info_get(dev->port_id, &info); >> > + rx_csum_ol_flag = (dev->hw_ol_features & >> > +NETDEV_RX_CHECKSUM_OFFLOAD) != 0; >> > + >> > + if (rx_csum_ol_flag && >> > + (info.rx_offload_capa & rx_chksm_offload_capa) != >> > + rx_chksm_offload_capa) { >> > + VLOG_WARN("Failed to enable Rx checksum offload on device %d", >> > + dev->port_id); >> > + dev->hw_ol_features &= ~NETDEV_RX_CHECKSUM_OFFLOAD; >> > + } >> > + netdev_request_reconfigure(&dev->up); >> > +} >> >> Sorry :) I noticed one more thing. > [Sugesh] Not a problem Jesse :) .I feel we must return right after flag got > cleared when the device > doesn’t support the rx checksum offloading. So that it avoid calling > unnecessary reconfigure. > Does it make sense?
Yes - I think that should solve the problem. I would also change VLOG_WARN to VLOG_WARN_ONCE to avoid the same message over and over again. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev