aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow_table.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2014-01-09netfilter: nf_tables: rename nft_do_chain_pktinfo() to nft_do_chain()Patrick McHardy10-12/+12
We don't encode argument types into function names and since besides nft_do_chain() there are only AF-specific versions, there is no risk of confusion. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-01-09netfilter: nf_tables: prohibit deletion of a table with existing setsPatrick McHardy1-1/+1
We currently leak the set memory when deleting a table that still has sets in it. Return EBUSY when attempting to delete a table with sets. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-01-09netfilter: nf_tables: take AF module reference when creating a tablePatrick McHardy1-1/+7
The table refers to data of the AF module, so we need to make sure the module isn't unloaded while the table exists. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-01-09netfilter: nf_tables: perform flags validation before table allocationPatrick McHardy1-13/+9
Simplifies error handling. Additionally use the correct type u32 for the host byte order flags value. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-01-09netfilter: nf_tables: minor nf_chain_type cleanupsPatrick McHardy11-34/+44
Minor nf_chain_type cleanups: - reorder struct to plug a hoe - rename struct module member to "owner" for consistency - rename nf_hookfn array to "hooks" for consistency - reorder initializers for better readability Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-01-09netfilter: nf_tables: constify chain type definitions and pointersPatrick McHardy11-19/+19
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-01-09netfilter: nf_tables: replay request after dropping locks to load chain typePatrick McHardy1-4/+8
To avoid races, we need to replay to request after dropping the nfnl_mutex to auto-load the chain type module. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-01-09netfilter: nf_tables: add missing module references to chain typesPatrick McHardy5-0/+5
In some cases we neither take a reference to the AF info nor to the chain type, allowing the module to be unloaded while in use. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-01-09netfilter: nf_tables: fix chain type module reference handlingPatrick McHardy2-22/+25
The chain type module reference handling makes no sense at all: we take a reference immediately when the module is registered, preventing the module from ever being unloaded. Fix by taking a reference when we're actually creating a chain of the chain type and release the reference when destroying the chain. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-01-09netfilter: nf_tables: fix check for table overflowPatrick McHardy1-3/+3
The table use counter is only increased for new chains, so move the check to the correct position. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-01-09netfilter: nf_tables: restore chain change atomicityPatrick McHardy1-22/+21
Chain counter validation is performed after the chain policy has potentially been changed. Move counter validation/setting before changing of the chain policy to fix this. Additionally fix a memory leak if chain counter allocation fails for new chains, remove an unnecessary free_percpu() and move counter allocation for new chains Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-01-09netfilter: nf_tables: split chain policy validation from actually setting itPatrick McHardy1-36/+20
Currently nf_tables_newchain() atomicity is broken because of having validation of some netlink attributes performed after changing attributes of the chain. The chain policy is (currently) fine, but split it up as preparation for the following fixes and to avoid future mistakes. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-01-09netfilter: nft_meta: fix lack of validation of the input registerPablo Neira Ayuso1-0/+3
We have to validate that the input register is in the range of allowed registers, otherwise we can take a incorrect register value as input that may lead us to a crash. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-01-09netfilter: nft_ct: Add support to set the connmarkKristian Evensen2-30/+136
This patch adds kernel support for setting properties of tracked connections. Currently, only connmark is supported. One use-case for this feature is to provide the same functionality as -j CONNMARK --save-mark in iptables. Some restructuring was needed to implement the set op. The new structure follows that of nft_meta. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-01-09ath9k: Disable cross-band FCCSujith Manoharan1-7/+0
Fast Channel Change across bands was enabled for AR9462 recently, but this is causing baseband issues. Disable it until this feature is tested well. Also, remove the feature bit for AR9565 since it is a single-band card and doesn't support this feature. Cc: stable@vger.kernel.org Reported-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09ath9k: Use correct channel for RX packetsSujith Manoharan1-11/+14
Accessing the current channel definition in mac80211 when processing RX packets is problematic because it could have been updated when a scan is issued. Since a channel change involves flushing the existing packets in the RX queue before a chip-reset is done, they would be processed using the wrong band/channel information. To avoid this, use the current channel information maintained in the driver. Cc: stable@vger.kernel.org Reported-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09ath9k: Update WB335 PCI IDsSujith Manoharan1-19/+82
* Add new AR9565 1.0/1.0.1/1.1 IDs * Change Dell/Lenovo/Samsung cards to 2-Antenna with diversity. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09mwifiex: use a function to replace two copies of a code fragmentBing Zhao3-14/+13
Instead of having two copies of the code for device tree cfgdata downloading, add a function to improve the code. Reviewed-by: Paul Stewart <pstew@chromium.org> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09mwifiex: fix potential buffer overflow in dt configurationBing Zhao1-2/+3
If cfgdata length exceeds the command buffer size we will end up getting buffer overflow problem. Fix it by checking the buffer size less the command header length. Reviewed-by: Paul Stewart <pstew@chromium.org> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wil6210: prefetch head of packetVladimir Kondratiev1-0/+3
As soon as skb is ready to be reaped, prefetch 1-st cache line. This accelerates data access that is performed later, during the packet classification by the driver and IP stack. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wil6210: Fix IP version indication for Tx csum offloadVladimir Kondratiev1-2/+3
Bit DMA_CFG_DESC_TX_OFFLOAD_CFG_L3T_IPV4_POS should be set for IPv4 only. Don't set it for IPv6 Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wil6210: interrupt moderationVladimir Kondratiev2-0/+14
Use hardware capabilities to limit IRQ generation to about 15 per msec It corresponds to about 7 packets/IRQ when running iperf with default parameters at 1.3Gbps Do not enable this feature in the sniffer (monitor) mode, because interrupt moderation cause timestamp accuracy deterioration. For the sniffer flow, it is important to get precise timestamp. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09brcmfmac: add support for bcm43362 deviceArend van Spriel4-0/+40
This patch adds support for the bcm43362 1x1 11n chipset. This chipset is used in AP6210 wifi module found on Cubieboard [1]. [1] http://cubieboard.org/ Reviewed-by: Franky Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wl1251: fix NULL pointer dereferencePavel Machek1-1/+1
wl1251: fix NULL pointer dereference Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Reported-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wl1251: add nvs file name to module firmware listPavel Machek1-0/+1
Add nvs file name to module firmware list Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wl1251: enforce changed hw encryption support on monitor state changeDavid Gnedt1-0/+13
The firmware doesn't support per packet encryption selection, so disable hw encryption support completely while a monitor interface is present to support injection of packets (which shouldn't get encrypted by hw). To enforce the changed hw encryption support force a disassociation on non-monitor interfaces. For disassociation a workaround using hw connection monitor is employed, which temporary enables hw connection manager flag. Signed-off-by: David Gnedt <david.gnedt@davizone.at> Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wl1251: disable retry and ACK policy for injected packetsDavid Gnedt2-2/+13
Set the retry limit to 0 and disable the ACK policy for injected packets. Signed-off-by: David Gnedt <david.gnedt@davizone.at> Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wl1251: enable tx path in monitor mode if necessary for packet injectionDavid Gnedt3-0/+31
If necessary enable the tx path in monitor mode for packet injection using the JOIN command with BSS_TYPE_STA_BSS and zero BSSID. Signed-off-by: David Gnedt <david.gnedt@davizone.at> Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wl1251: fix channel switching in monitor modeDavid Gnedt1-2/+13
Use the ENABLE_RX command for channel switching when no interface is present (monitor mode only). The advantage of ENABLE_RX is that it leaves the tx data path disabled in firmware, whereas the usual JOIN command seems to transmit some frames at firmware level. Signed-off-by: David Gnedt <david.gnedt@davizone.at> Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wl1251: disable power saving in monitor modeDavid Gnedt1-3/+7
Force power saving off while monitor interface is present. Signed-off-by: David Gnedt <david.gnedt@davizone.at> Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wl1251: implement multicast address filtering (fwd)David Gnedt5-11/+67
Port multicast address filtering from wl1271 driver. It sets up the hardware multicast address filter in configure_filter() with addresses supplied through prepare_multicast(). Signed-off-by: David Gnedt <david.gnedt@davizone.at> Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wl1251: configure hardware en-/decryption for monitor modeDavid Gnedt7-11/+39
Disable hardware encryption (DF_ENCRYPTION_DISABLE) and decryption (DF_SNIFF_MODE_ENABLE) via wl1251_acx_feature_cfg while monitor interface is present. Signed-off-by: David Gnedt <david.gnedt@davizone.at> Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wl1251: split RX and TX data path initialisationDavid Gnedt3-17/+41
Split up data path initialisation into RX and TX data path initialisation functions. This change is required for channel switching in monitor mode. Signed-off-by: David Gnedt <david.gnedt@davizone.at> Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wl1251: implement hardware ARP filteringDavid Gnedt3-0/+53
Update hardware ARP filter configuration on BSS_CHANGED_ARP_FILTER notification from mac80211. Ported from wl1271 driver. Signed-off-by: David Gnedt <david.gnedt@davizone.at> Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wl1251: retry power save entryDavid Gnedt5-1/+58
Port of the power save entry retry code from wl1251 driver version included in the Maemo Fremantle kernel. This tries to enable power save mode up to 3 times before failing. Signed-off-by: David Gnedt <david.gnedt@davizone.at> Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09wl1251: fix scan behaviour while not associatedDavid Gnedt3-1/+17
With a dissasociated card I often encoutered very long scan delays. My guess is that it has something to do with the cards DTIM handling and another firmware bug mentioned in the TI WLAN driver, which is described as the card may never end scanning if the channel is overloaded because it can't send probe requests. I think the firmware somehow also tries to receive DTIM messages when the BSSID is not set. Therefore most of the time it waits for DTIM messages and can't do scanning work. Anyway we can workaround this misbehaviour by setting the HIGH_PRIORITY bit for scans in disassociated state. Signed-off-by: David Gnedt <david.gnedt@davizone.at> Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-09i40e: Turn flow director off in MFP modeCatherine Sullivan1-7/+7
The driver needs to set the MFP flag earlier in i40e_sw_init and then can use that flag to decide if other hardware work-arouds are required. Change-ID: Ib17ad1e3485f57b28845ab4722294a99f203bd48 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: Add a dummy packet templateJesse Brandeburg1-3/+23
The hardware requires a full packet template to be pointed to when adding hardware flow filters. This patch adds the template and uses it for programming filters. Change-ID: I09db9f4ab0207ca9c520ae36596d74e1a0663ae5 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: fix spelling errorsJesse Brandeburg1-1/+1
This patch does s/rebuid/rebuild/. Change-ID: I77ff0c26db3d23ca5dc971b82d71b4ed8c6bcc14 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: trivial: formatting and checkpatch fixesMitch Williams2-16/+17
Fix some badly formatted lines, long lines and a mis-formatted else. Change-ID: Iac2eef064ae27c55a0c3d9c15c525bf8fed8ab6f Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: shorten wordy fieldsMitch Williams4-11/+11
The alloc_rx_buff_failed and alloc_rx_page_failed variables are both part of an rx specific structure so just remove the _rx part of the name. No functional changes. Change-ID: Icffa2f5d13c6f2b1e09cf45b9472b83c9dae8fc6 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: accept pf to pf adminq messagesShannon Nelson1-2/+5
The admin queue can be used to send messages among the physical function interfaces. This adds the code to handle that case. Change-ID: I0700fcc47e41433131a381f0eb72fc7b01b6bd87 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: remove interrupt on AQ errorShannon Nelson1-1/+1
Since nearly everything we do is synchronous, using the interrupt-on-error bit is unnecessary and causing unneeded interrupts. If anyone wants to use the bit they can turn it on in individual AQ requests using the cmd_details parameter. Change-ID: I4690a9c561d3e0836aeadb4f88f8a8702b1d1366 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: release NVM resource reservation on startupShannon Nelson1-0/+3
Call AQ to release any reservation held by this PF on the NVM resource lock on startup, in order to clear anything that might have been left over from a previous run. The lock is only cleared by the requestor calling for it to be cleared, on power-on, or firmware reset. This should help limit the need for rebooting a customer machine if something goes wrong on a firmware update or some other action. Change-ID: I8c8473e601d4ef512dda7baa77a6e75f2e5fea49 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: Cleanup reconfig rss pathAnjali Singhai Jain1-8/+0
RSS initialization was doing some extra work, remove the extra work and any bugs it created when managing number of queues. Change-ID: Iea75b04a70d73ce76947b6a177ce89ab4899d4c6 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: disable packet splitJesse Brandeburg1-1/+0
The driver and hardware support splitting packets on headers but with the use of GRO we don't need the extra bus overhead, so make this driver more like igb and ixgbe and disable packet split. Change-ID: Id42f2c3736baa9d5bdfe1f72d64226e7d8ebd737 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: add a comment on barrier and fix panic on resetGreg Rose2-4/+12
The memory barrier used in maybe_stop_tx can use a comment. Also add checks to VSI->rx_rings to ensure a kernel panic is not induced. Change-ID: I48cc1bf1d6cf301818155b737edeef77c0d790c7 Change-ID: I1363a8445fbf521a26267849966296ed55f43ad8 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: Fix MAC format in Write MAC address AQ cmdKamil Krawczyk1-2/+5
The MAC address format expected by the hardware is in a very specific format, and the driver was filling in the data incorrectly. Change-ID: I7bc66505ef459ee347dd3bda68051004c141c689 Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: Fix GPL headerGreg Rose27-108/+81
The GPL header included in each file in the i40e driver doesn't need to include the "this program" text since this driver is already part of the larger kernel. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: use kernel specific definesJesse Brandeburg2-7/+5
Replace uses of I40E_LENGTH_OF_ADDRESS with ETH_ALEN. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>