Re: [PATCH 2.6.32-rc1] net: VMware virtual Ethernet NIC driver: vmxnet3
From: Shreyas Bhatewara Date: Wed, 30 Sep 2009 14:34:57 -0700 (PDT) > +{ > + struct vmxnet3_adapter *adapter = netdev_priv(netdev); > + u8 *base; > + int i; > + > + VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, > VMXNET3_CMD_GET_STATS); > + > + /* this does assume each counter is 64-bit wide */ > + > + base = (u8 *)&adapter->tqd_start->stats; > + for (i = 0; i < ARRAY_SIZE(vmxnet3_tq_dev_stats); i++) > + *buf++ = *(u64 *)(base + vmxnet3_tq_dev_stats[i].offset); > + > + base = (u8 *)&adapter->tx_queue.stats; > + for (i = 0; i < ARRAY_SIZE(vmxnet3_tq_driver_stats); i++) > + *buf++ = *(u64 *)(base + vmxnet3_tq_driver_stats[i].offset); > + > + base = (u8 *)&adapter->rqd_start->stats; There's a lot of code like this that isn't indented properly. Either that or your email client has corrupted the patch by breaking up long lines or similar. Another example: > +static int > +vmxnet3_set_rx_csum(struct net_device *netdev, u32 val) > +{ > + struct vmxnet3_adapter *adapter = netdev_priv(netdev); > + > + if (adapter->rxcsum != val) { > + adapter->rxcsum = val; > + if (netif_running(netdev)) { > + if (val) > + adapter->shared->devRead.misc.uptFeatures |= > + UPT1_F_RXCSUM; > + else > + adapter->shared->devRead.misc.uptFeatures &= > + ~UPT1_F_RXCSUM; > + > + VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, > + VMXNET3_CMD_UPDATE_FEATURE); > + } > + } > + return 0; > +} Yikes! :-) ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization
Re: [PATCH 2.6.32-rc1] net: VMware virtual Ethernet NIC driver: vmxnet3
From: Stephen Hemminger Date: Wed, 30 Sep 2009 17:39:23 -0700 > Why not use NETIF_F_LRO and ethtool to control LRO support? In fact, you must, in order to handle bridging and routing correctly. Bridging and routing is illegal with LRO enabled, so the kernel automatically issues the necessary ethtool commands to disable LRO in the relevant devices. Therefore you must support the ethtool LRO operation in order to support LRO at all. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization
RE: [PATCH 2.6.32-rc1] net: VMware virtual Ethernet NIC driver: vmxnet3
Stephen, Thanks for taking a look. > -Original Message- > From: Stephen Hemminger [mailto:shemmin...@vyatta.com] > Sent: Wednesday, September 30, 2009 5:39 PM > To: Shreyas Bhatewara > Cc: linux-kernel; netdev; Stephen Hemminger; David S. Miller; Jeff > Garzik; Anthony Liguori; Chris Wright; Greg Kroah-Hartman; Andrew > Morton; virtualization; pv-drivers > Subject: Re: [PATCH 2.6.32-rc1] net: VMware virtual Ethernet NIC > driver: vmxnet3 > > On Wed, 30 Sep 2009 14:34:57 -0700 (PDT) > Shreyas Bhatewara wrote: > > Note: your patch was linewrapped again > Fixed the alpine option. Should not happen again. > > + > > + > > +static void > > +vmxnet3_declare_features(struct vmxnet3_adapter *adapter, bool > dma64) > > +{ > > + struct net_device *netdev = adapter->netdev; > > + > > + netdev->features = NETIF_F_SG | > > + NETIF_F_HW_CSUM | > > + NETIF_F_HW_VLAN_TX | > > + NETIF_F_HW_VLAN_RX | > > + NETIF_F_HW_VLAN_FILTER | > > + NETIF_F_TSO | > > + NETIF_F_TSO6; > > + > > + printk(KERN_INFO "features: sg csum vlan jf tso tsoIPv6"); > > + > > + adapter->rxcsum = true; > > + adapter->jumbo_frame = true; > > + > > + if (!disable_lro) { > > + adapter->lro = true; > > + printk(" lro"); > > + } > > Why not use NETIF_F_LRO and ethtool to control LRO support? Yes, that would be a better way to do it. I will make that change. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization
Re: [PATCH 2.6.32-rc1] net: VMware virtual Ethernet NIC driver: vmxnet3
On Wed, 30 Sep 2009 14:34:57 -0700 (PDT) Shreyas Bhatewara wrote: Note: your patch was linewrapped again > + > + > +static void > +vmxnet3_declare_features(struct vmxnet3_adapter *adapter, bool dma64) > +{ > + struct net_device *netdev = adapter->netdev; > + > + netdev->features = NETIF_F_SG | > + NETIF_F_HW_CSUM | > + NETIF_F_HW_VLAN_TX | > + NETIF_F_HW_VLAN_RX | > + NETIF_F_HW_VLAN_FILTER | > + NETIF_F_TSO | > + NETIF_F_TSO6; > + > + printk(KERN_INFO "features: sg csum vlan jf tso tsoIPv6"); > + > + adapter->rxcsum = true; > + adapter->jumbo_frame = true; > + > + if (!disable_lro) { > + adapter->lro = true; > + printk(" lro"); > + } Why not use NETIF_F_LRO and ethtool to control LRO support? ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization