aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxge/vxge-main.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-08-05vxge: prefetch skb->dataBenjamin LaHaise1-1/+5
This patch implements prefetching of skb->data from a copy of the pointer in the descriptor (which is already in the L1 cache at this point). This improves netperf rx performance (netperf -L 0,0 -c -H 192.168.254.2 -- -M 131072 -m 131072) by 4.9% on a P4 Xeon host. Signed-off-by: Benjamin LaHaise <ben.lahaise@neterion.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-05vxge: prefetch RxD descriptorsBenjamin LaHaise1-0/+1
This patch prefetches RxD descriptors which helps to lower the latency of a cache miss in vxge_hw_ring_rxd_next_completed. This lowers the % of CPU time used by vxge_hw_ring_rxd_next_completed() where the descriptor is accessed in profiling netperf on a P4 Xeon from 1.5% to 1.0%. Signed-off-by: Benjamin LaHaise <ben.lahaise@neterion.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-05vxge: fix pktgen hangs (don't abuse skb->cb[])Benjamin LaHaise1-25/+28
This patch fixes a case in the transmit completion code which was resulting in pktgen hanging at the end of a run. The cause is due to the fact that the ->cb[] area of an skb cannot be used in a network driver's transmit path, as that area belongs to the network protocol. Pktgen hangs, as it sends out the same packet multiple times, and vxge's use of this area of the skb for a temporary list can only add the packet to the temporary list once (while it may be on the queue many times). The fix is to remove this abuse of skb->cb[]. Instead, skb pointers are placed into a temporary stack array, and then free outside of the tx lock. This retains the smp optimization of doing dev_kfree_skb() outside of the tx lock. Signed-off-by: Benjamin LaHaise <ben.lahaise@neterion.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-05vxge: don't drop frame on tx queue fullBenjamin LaHaise1-0/+6
The vxge driver will drop a packet in its transmit function if the number of TxDs available hits 0. Instead of doing that, simply stop the transmit queue when transmitting a packet with the last available TxD. Signed-off-by: Benjamin LaHaise <ben.lahaise@neterion.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-01vxge: return PCI_ERS_RESULT_DISCONNECT on permanent failureDean Nelson1-0/+3
PCI drivers that implement the struct pci_error_handlers' error_detected callback should return PCI_ERS_RESULT_DISCONNECT if the state passed in is pci_channel_io_perm_failure. This patch fixes the issue for vxge. Signed-off-by: Dean Nelson <dnelson@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05vxge: Printing the function's configured mode of operationSreenivasa Honnur1-0/+21
- Printing the function's configured mode of operation. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05vxge: Disable fcs stripping.Sreenivasa Honnur1-4/+6
- Disable fcs stripping. The minimum frame size that can be received by the hardware is 57 Bytes. A 64 Byte Ethernet frame with the vlan tag and fcs stripped will result in a 56 Byte frame which will lock up the receive engine. The work around is to disable fcs stripping in the hardware which is done with a firmware upgrade. The fixes are - 1. Ensure that the correct firmware version is used. 2. Decrement the indicated packet length of the receive packet by 4 bytes (FCS length). Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05vxge: Fixes in isr routineSreenivasa Honnur1-10/+12
- Fixes in isr routine Fixed crash with INTA mode during driver unload. Pass hldev to request_irq instead of vdev. Fixed Traffic failure with GRO in INTA mode. Pass the correct napi context to gro functions. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05vxge: Removed the code to bounds check the mss valueSreenivasa Honnur1-5/+0
- Removed the code to bounds check the mss value. The hardware does bounds checking and will not allow an oversized mss to lockup the transmit path. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05vxge: check for card status before continuing in device closeSreenivasa Honnur1-0/+3
- Fixed the crash in rmmod after vpath open failed when trying to change mtu. We should check for card status before continuing in device close. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05vxge: Fixed memory leak by freeing memory allocated for device_configSreenivasa Honnur1-0/+1
- Fixed memory leak by freeing memory allocated for device_config. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05vxge: Removed ioremap of unused bar addresses and their referencesSreenivasa Honnur1-25/+9
- Removed ioremap of bar1 address Driver needs only bar0 address for register access - Removed references to bar1 and bar2 addresses Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functionsPatrick McHardy1-2/+2
This patch is the result of an automatic spatch transformation to convert all ndo_start_xmit() return values of 0 to NETDEV_TX_OK. Some occurences are missed by the automatic conversion, those will be handled in a seperate patch. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-17vxge: Enable SRIOV support in the driver.Sivakumar Subramani1-0/+13
- Enabled SRIOV support in the driver. - Call __vxge_hw_verify_pci_e_info() for the PF only. This function verifies the negotiated link width and current link speed in the Link Status Register (offset 12h) which are reserved fields for VFs as per the SRIOV specification, section 3.5.8. - Implemented David Miller's comment to remove the #ifdef CONFIG_PCI_IOV as these intefaces have NOP versions declared when the defintion is not set. Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com> Signed-off-by: Rastapur Santosh <santosh.rastapur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29net: dont update dev->trans_start in 10GB driversEric Dumazet1-2/+4
Followup of commits 9d21493b4beb8f918ba248032fefa393074a5e2b and 08baf561083bc27a953aa087dd8a664bb2b88e8e (net: tx scalability works : trans_start) (net: txq_trans_update() helper) Now that core network takes care of trans_start updates, dont do it in drivers themselves, if possible. Multi queue drivers can avoid one cache miss (on dev->trans_start) in their start_xmit() handler. Exceptions are NETIF_F_LLTX drivers (vxge & tehuti) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-04vxge: should include tcp.hAlexander Beregalov1-0/+1
Fix this build error: drivers/net/vxge/vxge-main.c: In function 'vxge_get_vpath_no': drivers/net/vxge/vxge-main.c:695: error: dereferencing pointer to incomplete type ... Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-02Neterion: New driver: Main entry pointsRamkrishna Vepa1-0/+4502
This patch implements all the driver entry point functions. - Definition of all module loadable paramters. - Implementation of all driver entry point functions. - Changes in this submission - - Fixed compilation error when enabling debug statements - Fixed few warnings when CONFIG_PCI_MSI is not defined - Removed unnecessary volatile variables - Removed compare_ether_addr as it causes unaligned memory access on the sparc64 platform. - Changes in previous submissions - - As per Stephen Hemminger's comments removed the following loadable parameters - gro, rx_& tx max_indicate_pkts, exec_mode, rx & tx pause_enable, tx_steering_type and intr_type. - Added Device ID definition in vxge-main.h instead of include/linux/pci_ids.h file - Reported by David Miller - Incorporated following review comments from Ben Hutchings - NAPI is always enabled (no option to turn it OFF). - Loadable parameters rx_steering_type: This loadable option is removed. ring_blocks: This loadable option is removed. The driver default settings work well in most if not all cases. Another patch to configure these parameters with ethtool will be released in the future. - LRO has been deprecated in favour of GRO - Bill Fink & Dave Miller's comment - Fixed sparse warnings - Reported by Andi Kleen - Removed unused variables Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com> Signed-off-by: Rastapur Santosh <santosh.rastapur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>