aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_lookup.h (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2012-07-18asix: Fix return value in AX88172A driver bind functionChristian Riesch1-0/+1
Return -ENOTSUPP if the initialization fails because the device is configured for a mode that is not supported by the driver. Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-18tcp: refine SYN handling in tcp_validate_incomingEric Dumazet1-1/+5
Followup of commit 0c24604b68fc (tcp: implement RFC 5961 4.2) As reported by Vijay Subramanian, we should send a challenge ACK instead of a dup ack if a SYN flag is set on a packet received out of window. This permits the ratelimiting to work as intended, and to increase correct SNMP counters. Suggested-by: Vijay Subramanian <subramanian.vijay@gmail.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Vijay Subramanian <subramanian.vijay@gmail.com> Cc: Kiran Kumar Kella <kkiran@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-18bonding: refine IFF_XMIT_DST_RELEASE capabilityEric Dumazet1-0/+5
Some workloads greatly benefit of IFF_XMIT_DST_RELEASE capability on output net device, avoiding dirtying dst refcount. bonding currently disables IFF_XMIT_DST_RELEASE unconditionally. If all slaves have the IFF_XMIT_DST_RELEASE bit set, then bonding master can also have it in its priv_flags Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Jay Vosburgh <fubar@us.ibm.com> Cc: Andy Gospodarek <andy@greyhouse.net> Cc: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-18net: qmi_wwan: make dynamic device IDs workBjørn Mork1-1/+18
The usbnet API use the device ID table to store a pointer to a minidriver. Setting a generic pointer for dynamic device IDs will in most cases make them work as expected. usbnet will otherwise treat the dynamic IDs as blacklisted. That is rarely useful. There is no standard class describing devices supported by this driver, and most vendors don't even provide enough information to allow vendor specific wildcard matching. The result is that most of the supported devices must be explicitly listed in the device table. Allowing dynamic IDs to work both simplifies testing and verification of new devices, and provides a way for end users to use a device before the ID is added to the driver. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-18b44: add 64 bit statsKevin Groeneveld2-41/+58
Add support for 64 bit stats to Broadcom b44 ethernet driver. Signed-off-by: Kevin Groeneveld <kgroeneveld@gmail.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-18be2net: Ignore physical link async event for LancerPadmanabh Ratnakar2-0/+6
The ability of driver to transmit packets depends on logical state of the link. Ignore physical link status. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-18be2net: Fix VF driver load for LancerPadmanabh Ratnakar2-1/+9
Lancer FW has added new capability checks for VFs. Driver should only use those capabilities which are allowed for VFs. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-18ipv6: fix inet6_csk_xmit()Eric Dumazet3-22/+25
We should provide to inet6_csk_route_socket a struct flowi6 pointer, so that net6_csk_xmit() works correctly instead of sending garbage. Also add some consts Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Yuchung Cheng <ycheng@google.com> Cc: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-17ixgbevf: Update descriptor macros to accept pointers and drop _ADV suffixAlexander Duyck2-15/+15
This change updates the descriptor macros to accept pointers, updates the name to drop the _ADV suffix, and include the IXGBEVF name in the macro. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17ixgbe: Cleanup logic for MRQC and MTQC configurationAlexander Duyck1-50/+66
This change is meant to make the code much more readable for MTQC and MRQC configuration. The big change is that I simplified much of the logic so that we are essentially handling just 4 cases and their variants. In the cases where RSS is disabled we are actually just programming the RETA table with all 1s resulting in a single queue RSS. In the case of SR-IOV I am treating that as a subset of VMDq. This all results int he following configuration for the hardware: DCB En Dis VMDq En VMDQ/DCB VMDq/RSS Dis DCB/RSS RSS Cc: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17ixgbe: Update the logic for ixgbe_cache_ring_dcb and DCB RSS configurationAlexander Duyck2-50/+42
This change cleans up some of the logic in an attempt to try and simplify things for how we are configuring DCB w/ RSS. In this patch I basically did 3 things. I updated the logic for getting the first register index. I applied the fact that all TCs get the same number of queues to simplify the looping logic in caching the DCB ring register. Finally I updated how we configure the RQTC register to match the fact that all TCs are assigned the same number of queues. Cc: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17ixgbe: Move configuration of set_real_num_rx/tx_queues into openAlexander Duyck2-56/+38
It makes much more sense for us to configure the real number of Tx and Rx queues in the ixgbe_open call than it does in ixgbe_set_num_queues. By setting the number in ixgbe_open we can avoid a number of unecessary updates and only have to make the calls once. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17ixgbe: Handle failures in the ixgbe_setup_rx/tx_resources callsAlexander Duyck1-4/+16
Previously we were exiting without cleaning up the memory internally on the ixgbe_setup_rx_resources and ixgbe_setup_tx_resources calls. Instead of forcing the caller to clean things up for us we should instead just unwind the rings and free the memory as we go. This way we can more gracefully clean up the rings in the event of an allocation failure. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17ixgbe: Ping the VFs on link status change to trigger link changeAlexander Duyck1-0/+6
When the link status changes on the PF we need to notify the VFs. In order to do this we should ping all of the VFs in order to trigger a link status change on them as well. This fixes issues in which the PF would reset, but the VF didn't because the NAK flag was not set in the VF mailbox. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17r8169: verbose error message.Francois Romieu1-1/+2
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Hayes Wang <hayeswang@realtek.com>
2012-07-17r8169: remove rtl_ocpdr_cond.Hayes Wang1-11/+1
It is not needed for mac_ocp_{write / read}. Actually bit 31 of OCPDR does not change and r8168_mac_ocp_read always returns ~0. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Tested-by: Francois Romieu <romieu@fr.zoreil.com>
2012-07-17ipv4: fix rcu splatEric Dumazet3-10/+11
free_nh_exceptions() should use rcu_dereference_protected(..., 1) since its called after one RCU grace period. Also add some const-ification in recent code. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-17ipv4: Fix nexthop exception hash computation.David S. Miller1-4/+12
Need to mask it with (FNHE_HASH_SIZE - 1). Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-17team: add netpoll supportJiri Pirko6-10/+152
It's done in very similar way this is done in bonding and bridge. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-17netpoll: move np->dev and np->dev_name init into __netpoll_setup()Jiri Pirko5-17/+9
Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-17ipv4: Add FIB nexthop exceptions.David S. Miller3-31/+266
In a regime where we have subnetted route entries, we need a way to store persistent storage about destination specific learned values such as redirects and PMTU values. This is implemented here via nexthop exceptions. The initial implementation is a 2048 entry hash table with relaiming starting at chain length 5. A more sophisticated scheme can be devised if that proves necessary. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-17sfc: Correct some comments on enum reset_typeBen Hutchings1-4/+4
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-07-17sfc: Fix interface statistics running backwardBen Hutchings3-10/+28
Some interface statistics are computed in such a way that they can sometimes decrease (and even underflow). Since the computed value will never be greater than the true value, we fix this by only storing the computed value when it increases. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-07-17sfc: Disable VF queues during register self-testBen Hutchings5-60/+76
Currently VF queues and drivers may remain active during this test. This could cause memory corruption or spurious test failures. Therefore we reset the port/function before running these tests on Siena. On Falcon this doesn't work: we have to do some additional initialisation before some blocks will work again. So refactor the reset/register-test sequence into an efx_nic_type method so efx_selftest() doesn't have to consider such quirks. In the process, fix another minor bug: Siena does not have an 'invisible' reset and the self-test currently fails to push the PHY configuration after resetting. Passing RESET_TYPE_ALL to efx_reset_{down,up}() fixes this. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-07-17sfc: Explain why efx_mcdi_exit_assertion() ignores result of efx_mcdi_rpc()Ben Hutchings1-3/+8
Fix CID 113952 in Coverity report on Linux. This is the one instance where we don't, and shouldn't, check the return code from efx_mcdi_rpc(). It wasn't immediately obvious to me why we didn't, so I think an explanation is in order. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-07-17sfc: Use dev_kfree_skb() in efx_end_loopback()Ben Hutchings1-1/+1
Fix CID 102619 in the Coverity report on Linux. efx_end_loopback() iterates over an array of skb pointers of which some may be null (if efx_begin_loopback() failed). It should not use dev_kfree_skb_irq(), which requires non-null pointers. In practice this is safe because it does not run in interrupt context and therefore always ends up calling dev_kfree_skb(), which does allow null pointers. But we should make that explicit. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-07-17sfc: Use strlcpy() to copy ethtool stats namesBen Hutchings1-1/+1
Fix CID 113703 in the Coverity report on Linux. ethtool stats names are limited to 32 bytes including a null terminator. Use strlcpy() to ensure that we will always include the null terminator even if a source string becomes longer than this. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-07-17sfc: Stop changing header offsets on TXBen Hutchings1-9/+0
There is nothing in the VLAN driver or core VLAN support that invalidates the TCP and IP header offsets. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-07-17sfc: Remove dead write to tso_state::packet_spaceBen Hutchings1-1/+0
tso_state::packet_space is always set in tso_start_packet(); the value set in tso_start() is not used, and is also incorrect. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-07-17sfc: Use generic DMA API, not PCI-DMA APIBen Hutchings5-63/+62
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-07-17sfc: Work around bogus 'uninitialised variable' warningBen Hutchings1-1/+1
With some gcc versions & optimisations, the compiler will warn that 'depth' in efx_filter_insert_filter() may be used without being initialised, although this is not the case. This is related to inlining of efx_filter_search(), which only has one caller since commit 8db182f4a8a6e2dcb8b65905ea4af56210e65430 ('sfc: Remove now-unused filter function'). Shut the compiler up by initialising it to 0. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-07-17tcp: implement RFC 5961 4.2Eric Dumazet3-19/+17
Implement the RFC 5691 mitigation against Blind Reset attack using SYN bit. Section 4.2 of RFC 5961 advises to send a Challenge ACK and drop incoming packet, instead of resetting the session. Add a new SNMP counter to count number of challenge acks sent in response to SYN packets. (netstat -s | grep TCPSYNChallenge) Remove obsolete TCPAbortOnSyn, since we no longer abort a TCP session because of a SYN flag. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Kiran Kumar Kella <kkiran@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-17net: Pass optional SKB and SK arguments to dst_ops->{update_pmtu,redirect}()David S. Miller21-49/+71
This will be used so that we can compose a full flow key. Even though we have a route in this context, we need more. In the future the routes will be without destination address, source address, etc. keying. One ipv4 route will cover entire subnets, etc. In this environment we have to have a way to possess persistent storage for redirects and PMTU information. This persistent storage will exist in the FIB tables, and that's why we'll need to be able to rebuild a full lookup flow key here. Using that flow key will do a fib_lookup() and create/update the persistent entry. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-17ixgbevf: Use igb style interrupt masks instead of ixgbe styleAlexander Duyck3-146/+105
The interrupt registers accessed in ixgbevf are more similar to the igb style registers than they are to the ixgbe style registers. As such we would be better off setting up the code for the EICS, EIMS, EICS, EIAM, and EIAC like we do in igb instead of ixgbe. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17ixgbevf: Move Tx clean-up into NAPI contextAlexander Duyck3-182/+89
Currently the VF driver is processing all of the transmits in interrupt context. This can be messy since the Rx is all handled in NAPI and this may result in interrupts being disabled. In order to resolve this move all of the Tx packet processing into NAPI and combine all of the interrupt and polling routines into just a pair of functions. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17ixgbevf: Update q_vector to contain ring pointers instead of bitmapsAlexander Duyck2-105/+65
For most cases the ixgbevf driver will only ever contain a single Tx and single Rx queue. In order to track that it makes more sense to use a pointer instead of using a bitmap which must be search in order to locate the ring on an adapter index. As such I am changing the code to use pointers and an iterator to access all rings on a given q_vector. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17ixgbevf: Cleanup accounting for space needed at start of xmit_frameAlexander Duyck1-22/+24
This change cleans up the accounting needed at the start of xmit_frame so that we can avoid doing too much work to determine how many descriptors we will need. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17ixgbevf: Drop use of eitr_low and eitr_high for hard coded valuesAlexander Duyck2-10/+4
This patch drops the use of eitr_low and eitr_high as values being stored in the adapter structure. Since the values have no external way to be changed they might as well just be hard coded values and save us the space on the adapter structure. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17ixgbevf: Make use of NETIF_F_RXCSUM instead of keeping our own flagAlexander Duyck2-20/+2
The IXGBE_FLAG_RX_CSUM_ENABLED flag is redundant since NETIF_F_RXCSUM is keeping the value we want to already have. As such we can drop the redundant flag and just make use of NETIF_F_RXCSUM. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17ixgbevf: Drop netdev_registered value since that is already stored in netdevAlexander Duyck2-6/+1
There is no need to keep a separate netdev_registered value since that is already stored in the netdev itself. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17ixgbevf: Drop all dead or unnecessary codeAlexander Duyck3-228/+22
There is a large amount of code present in this driver to support features that either do no exist or are not supported such ask packet split, DCA, or RSC. This patch strips out almost all of that code and in the case of conditionals based on unused flags I am flatting the code out to just the path that would have been selected. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17tcp: implement RFC 5961 3.2Eric Dumazet6-1/+45
Implement the RFC 5691 mitigation against Blind Reset attack using RST bit. Idea is to validate incoming RST sequence, to match RCV.NXT value, instead of previouly accepted window : (RCV.NXT <= SEG.SEQ < RCV.NXT+RCV.WND) If sequence is in window but not an exact match, send a "challenge ACK", so that the other part can resend an RST with the appropriate sequence. Add a new sysctl, tcp_challenge_ack_limit, to limit number of challenge ACK sent per second. Add a new SNMP counter to count number of challenge acks sent. (netstat -s | grep TCPChallengeACK) Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Kiran Kumar Kella <kkiran@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-17ipv6: fix unappropriate errno returned for non-multicast addressLi Wei1-0/+3
We need to check the passed in multicast address and return appropriate errno(EINVAL) if it is not valid. And it's no need to walk through the ipv6_mc_list in this situation. Signed-off-by: Li Wei <lw@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-17bnx2x: organize BDs calculation for stop/resumeDmitry Kravkov2-4/+22
Put the numbers used for stop/resume queue in a single place and fix the condition for sanity check. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-17can: softing: softing_main: ensure a consistent return value in error caseJulia Lawall1-1/+1
Typically, the return value desired for the failure of a function with an integer return value is a negative integer. In these cases, the return value is sometimes a negative integer and sometimes 0, due to a subsequent initialization of the return variable within the loop. A simplified version of the semantic match that finds this problem is: (http://coccinelle.lip6.fr/) //<smpl> @r exists@ identifier ret; position p; constant C; expression e1,e3,e4; statement S; @@ ret = -C ... when != ret = e3 when any if@p (...) S ... when any if (\(ret != 0\|ret < 0\|ret > 0\) || ...) { ... return ...; } ... when != ret = e3 when any *if@p (...) { ... when != ret = e4 return ret; } //</smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Kurt Van Dijck <kurt.van.dijck@eia.be> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-07-17can: mpc5xxx_can: make data in mpc5xxx_can_probe constMarc Kleine-Budde1-1/+1
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-07-17can: flexcan: make flexcan_priv.devtype_data member point to const dataMarc Kleine-Budde1-2/+2
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-07-16asix: Add a new driver for the AX88172AChristian Riesch5-3/+437
The Asix AX88172A is a USB 2.0 Ethernet interface that supports both an internal PHY as well as an external PHY (connected via MII). This patch adds a driver for the AX88172A and provides support for both modes and the phylib. Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-16asix: Factor out common codeChristian Riesch4-3333/+64
Allow the new driver for the AX88172A to share code with the existing drivers for ASIX devices. Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-16asix: Rename asix.c to asix_devices.cChristian Riesch4-0/+3361
This patch further creates two additional copies of asix.c. In another patch these copies will be used to factor out common code. Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>