- 24 5月, 2014 7 次提交
-
-
由 Ezequiel Garcia 提交于
This commit checks the return code of mvneta_setup_txq() call in mvneta_change_mtu(). Also, use the netdevice pointer directly instead of dereferencing the port structure. While here, let's fix a tiny comment typo. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ezequiel Garcia 提交于
A tiny clean-up to improve readability. This commit makes no functionality change. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ezequiel Garcia 提交于
Currently, mv643xx_eth_adjust_link() is only used to call mv643xx_adjust_pscr(). This commit renames the latter to the former, and therefore removes the extra and useless function. Acked-by: NSebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Andrew Morton 提交于
Older gcc's (mine is gcc-4.4.4) make a mess of this. lib/test_bpf.c:74: error: unknown field 'insns' specified in initializer lib/test_bpf.c:75: warning: missing braces around initializer lib/test_bpf.c:75: warning: (near initialization for 'tests[0].<anonymous>.insns[0]') lib/test_bpf.c:76: error: extra brace group at end of initializer lib/test_bpf.c:76: error: (near initialization for 'tests[0].<anonymous>') lib/test_bpf.c:76: warning: excess elements in union initializer lib/test_bpf.c:76: warning: (near initialization for 'tests[0].<anonymous>') lib/test_bpf.c:77: error: extra brace group at end of initializer Cc: Alexei Starovoitov <ast@plumgrid.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Acked-by: NAlexei Starovoitov <ast@plumgrid.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Sucheta Chakraborty 提交于
o min_tx_rate puts lower limit on the VF bandwidth. VF is guaranteed to have a bandwidth of at least this value. max_tx_rate puts cap on the VF bandwidth. VF can have a bandwidth of up to this value. o A new handler set_vf_rate for attr IFLA_VF_RATE has been introduced which takes 4 arguments: netdev, VF number, min_tx_rate, max_tx_rate o ndo_set_vf_rate replaces ndo_set_vf_tx_rate handler. o Drivers that currently implement ndo_set_vf_tx_rate should now call ndo_set_vf_rate instead and reject attempt to set a minimum bandwidth greater than 0 for IFLA_VF_TX_RATE when IFLA_VF_RATE is not yet implemented by driver. o If user enters only one of either min_tx_rate or max_tx_rate, then, userland should read back the other value from driver and set both for IFLA_VF_RATE. Drivers that have not yet implemented IFLA_VF_RATE should always return min_tx_rate as 0 when read from ip tool. o If both IFLA_VF_TX_RATE and IFLA_VF_RATE options are specified, then IFLA_VF_RATE should override. o Idea is to have consistent display of rate values to user. o Usage example: - ./ip link set p4p1 vf 0 rate 900 ./ip link show p4p1 32: p4p1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000 link/ether 00:0e:1e:08:b0:f0 brd ff:ff:ff:ff:ff:ff vf 0 MAC 3e:a0:ca:bd:ae:5a, tx rate 900 (Mbps), max_tx_rate 900Mbps vf 1 MAC f6:c6:7c:3f:3d:6c vf 2 MAC 56:32:43:98:d7:71 vf 3 MAC d6:be:c3:b5:85:ff vf 4 MAC ee:a9:9a:1e:19:14 vf 5 MAC 4a:d0:4c:07:52:18 vf 6 MAC 3a:76:44:93:62:f9 vf 7 MAC 82:e9:e7:e3:15:1a ./ip link set p4p1 vf 0 max_tx_rate 300 min_tx_rate 200 ./ip link show p4p1 32: p4p1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000 link/ether 00:0e:1e:08:b0:f0 brd ff:ff:ff:ff:ff:ff vf 0 MAC 3e:a0:ca:bd:ae:5a, tx rate 300 (Mbps), max_tx_rate 300Mbps, min_tx_rate 200Mbps vf 1 MAC f6:c6:7c:3f:3d:6c vf 2 MAC 56:32:43:98:d7:71 vf 3 MAC d6:be:c3:b5:85:ff vf 4 MAC ee:a9:9a:1e:19:14 vf 5 MAC 4a:d0:4c:07:52:18 vf 6 MAC 3a:76:44:93:62:f9 vf 7 MAC 82:e9:e7:e3:15:1a ./ip link set p4p1 vf 0 max_tx_rate 600 rate 300 ./ip link show p4p1 32: p4p1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000 link/ether 00:0e:1e:08:b0:f brd ff:ff:ff:ff:ff:ff vf 0 MAC 3e:a0:ca:bd:ae:5, tx rate 600 (Mbps), max_tx_rate 600Mbps, min_tx_rate 200Mbps vf 1 MAC f6:c6:7c:3f:3d:6c vf 2 MAC 56:32:43:98:d7:71 vf 3 MAC d6:be:c3:b5:85:ff vf 4 MAC ee:a9:9a:1e:19:14 vf 5 MAC 4a:d0:4c:07:52:18 vf 6 MAC 3a:76:44:93:62:f9 vf 7 MAC 82:e9:e7:e3:15:1a Signed-off-by: NSucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Haiyang Zhang 提交于
It passes the hash value as the RNDIS Per-packet info to the Hyper-V host, so that the send completion notices can be spread across multiple channels. MS-TFS: 140273 Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
git://git.kernel.org/pub/scm/linux/kernel/git/pshelar/openvswitch由 David S. Miller 提交于
Pravin B Shelar says: ==================== Open vSwitch A set of OVS changes for net-next/3.16. Most of change are related to improving performance of flow setup by minimizing critical sections. ==================== Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 23 5月, 2014 33 次提交
-
-
由 Pravin B Shelar 提交于
Following patch get rid of struct genl_family_and_ops which is redundant due to changes to struct genl_family. Signed-off-by: NKyle Mestery <mestery@noironetworks.com> Acked-by: NKyle Mestery <mestery@noironetworks.com> Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
-
由 Jarno Rajahalme 提交于
Signed-off-by: NJarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
-
由 Jarno Rajahalme 提交于
Following patch will be easier to reason about with separate ovs_flow_cmd_new() and ovs_flow_cmd_set() functions. Signed-off-by: NJarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
-
由 Jarno Rajahalme 提交于
ovs_flow_cmd_del() now allocates reply (if needed) after the flow has already been removed from the flow table. If the reply allocation fails, a netlink error is signaled with netlink_set_err(), as is already done in ovs_flow_cmd_new_or_set() in the similar situation. Signed-off-by: NJarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
-
由 Jarno Rajahalme 提交于
Reduce and clarify locking requirements for ovs_flow_cmd_alloc_info(), ovs_flow_cmd_fill_info() and ovs_flow_cmd_build_info(). A datapath pointer is available only when holding a lock. Change ovs_flow_cmd_fill_info() and ovs_flow_cmd_build_info() to take a dp_ifindex directly, rather than a datapath pointer that is then (only) used to get the dp_ifindex. This is useful, since the dp_ifindex is available even when the datapath pointer is not, both before and after taking a lock, which makes further critical section reduction possible. Make ovs_flow_cmd_alloc_info() take an 'acts' argument instead a 'flow' pointer. This allows some future patches to do the allocation before acquiring the flow pointer. The locking requirements after this patch are: ovs_flow_cmd_alloc_info(): May be called without locking, must not be called while holding the RCU read lock (due to memory allocation). If 'acts' belong to a flow in the flow table, however, then the caller must hold ovs_mutex. ovs_flow_cmd_fill_info(): Either ovs_mutex or RCU read lock must be held. ovs_flow_cmd_build_info(): This calls both of the above, so the caller must hold ovs_mutex. Signed-off-by: NJarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
-
由 Jarno Rajahalme 提交于
For ovs_flow_stats_get() using ovsl_dereference() was wrong, since flow dumps call this with RCU read lock. ovs_flow_stats_clear() is always called with ovs_mutex, so can use ovsl_dereference(). Also, make the ovs_flow_stats_get() 'flow' argument const to make later patches cleaner. Signed-off-by: NJarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
-
由 Jarno Rajahalme 提交于
Incorrect struct name was confusing, even though otherwise inconsequental. Signed-off-by: NJarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
-
由 Jarno Rajahalme 提交于
Move most memory allocations away from the ovs_mutex critical sections. vport allocations still happen while the lock is taken, as changing that would require major refactoring. Also, vports are created very rarely so it should not matter. Change ovs_dp_cmd_get() now only takes the rcu_read_lock(), rather than ovs_lock(), as nothing need to be changed. This was done by ovs_vport_cmd_get() already. Signed-off-by: NJarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
-
由 Jarno Rajahalme 提交于
Masks are inserted when flows are inserted to the table, so it is logical to correspondingly remove masks when flows are removed from the table, in ovs_flow_table_remove(). This allows ovs_flow_free() to be called without locking, which will be used by later patches. Signed-off-by: NJarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
-
由 Jarno Rajahalme 提交于
Use netlink_has_listeners() and NLM_F_ECHO flag to determine if a reply is needed or not for OVS_FLOW_CMD_NEW, OVS_FLOW_CMD_SET, or OVS_FLOW_CMD_DEL. Currently, OVS userspace does not request a reply for OVS_FLOW_CMD_NEW, but usually does for OVS_FLOW_CMD_DEL, as stats may have changed. Signed-off-by: NJarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
-
由 Jarno Rajahalme 提交于
Remove unnecessary locking from functions that are always called with appropriate locking. Signed-off-by: NJarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: NThomas Graf <tgraf@redhat.com> Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
-
由 Jarno Rajahalme 提交于
Flow SET can accept an empty set of actions, with the intended semantics of leaving existing actions unmodified. This seems to have been brokin after OVS 1.7, as we have assigned the flow's actions pointer to NULL in this case, but we never check for the NULL pointer later on. This patch restores the intended behavior and documents it in the include/linux/openvswitch.h. Signed-off-by: NJarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
-
由 Jarno Rajahalme 提交于
Minimize padding in sw_flow_key and move 'tp' top the main struct. These changes simplify code when accessing the transport port numbers and the tcp flags, and makes the sw_flow_key 8 bytes smaller on 64-bit systems (128->120 bytes). These changes also make the keys for IPv4 packets to fit in one cache line. There is a valid concern for safety of packing the struct ovs_key_ipv4_tunnel, as it would be possible to take the address of the tun_id member as a __be64 * which could result in unaligned access in some systems. However: - sw_flow_key itself is 64-bit aligned, so the tun_id within is always 64-bit aligned. - We never make arrays of ovs_key_ipv4_tunnel (which would force every second tun_key to be misaligned). - We never take the address of the tun_id in to a __be64 *. - Whereever we use struct ovs_key_ipv4_tunnel outside the sw_flow_key, it is in stack (on tunnel input functions), where compiler has full control of the alignment. Signed-off-by: NJarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
-
由 David S. Miller 提交于
Amir Vadai says: ==================== net/mlx4_core: Deprecate module parameter use_prio This small patchset deprecates the mlx4_core module paramater 'use_prio', as suggested by Carol Soto from IBM in [1]. Also, replaced some calls to the prefered pr_warn/info/devel macro's. Patchset was applied and tested on commit b6052af6: "Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge" [1] - http://marc.info/?l=linux-netdev&m=139871350103432&w=2 ==================== Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Amir Vadai 提交于
As checkpatch suggests. Also changed some printk's into pr_* Signed-off-by: NAmir Vadai <amirv@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Amir Vadai 提交于
use_prio was added as part of an infrastructure for running FCoE in A0 mode. FCoE didn't get into Mellanox Upstream driver, and when it will, it won't be using A0 steering mode. Therefore we can safely deprecate this module parameter without hurting any existing user. CC: Carol Soto <clsoto@linux.vnet.ibm.com> Signed-off-by: NAmir Vadai <amirv@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next由 David S. Miller 提交于
Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2014-05-22 This is the last ipsec pull request before I leave for a three weeks vacation tomorrow. David, can you please take urgent ipsec patches directly into net/net-next during this time? I'll continue to run the ipsec/ipsec-next trees as soon as I'm back. 1) Simplify the xfrm audit handling, from Tetsuo Handa. 2) Codingstyle cleanup for xfrm_output, from abian Frederick. Please pull or let me know if there are problems. ==================== Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dan Carpenter 提交于
We should call put_dev() on the error path here. Fixes: 3e9c156e ('ieee802154: add netlink interfaces for llsec') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dan Carpenter 提交于
There is a typo here where we test for USB_CDC_NCM_NTH32_SIGN instead of USB_CDC_NCM_NTB32_SUPPORTED. The test probably still works as written because 0x686D636E has (1 << 1) set and doesn't have (1 << 0) set. Fixes: f8afb73d ('net: cdc_ncm: factor out one-time device initialization') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Manuel Schölling 提交于
To be future-proof and for better readability the time comparisons are modified to use time_before_eq() instead of plain, error-prone math. Signed-off-by: NManuel Schölling <manuel.schoelling@gmx.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Manuel Schölling 提交于
To be future-proof and for better readability the time comparisons are modified to use time_before_eq() instead of plain, error-prone math. Signed-off-by: NManuel Schölling <manuel.schoelling@gmx.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Manuel Schölling 提交于
The code for resetting the timer can be simplified if mod_timer() is used instead of del_timer() followed by add_timer(). Signed-off-by: NManuel Schölling <manuel.schoelling@gmx.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Manuel Schölling 提交于
To be future-proof and for better readability the time comparisons are modified to use time_before() instead of plain, error-prone math. Signed-off-by: NManuel Schölling <manuel.schoelling@gmx.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Manuel Schölling 提交于
To be future-proof and for better readability the time comparisons are modified to use time_before() instead of plain, error-prone math. Signed-off-by: NManuel Schölling <manuel.schoelling@gmx.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 David S. Miller 提交于
Veaceslav Falico says: ==================== bonding: fix enslaving a dev without mtu setting support With the introduction of bond_free_slave() we need to have slave->bond populated before calling it, however if the dev_mtu_set(slave, mtu) fails, we call bond_free_slave() before actually setting slave->bond, and thus we'll panic. Fix this by populating slave->bond (and ->dev, it seems appropriate) as early as possible. Also, remove a harmful check for NULL in bond_get_bond_by_slave(), as it's only hiding the real problem and making it harder to debug. ==================== CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Andy Gospodarek <andy@greyhouse.net> CC: netdev@vger.kernel.org Signed-off-by: NVeaceslav Falico <vfalico@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Veaceslav Falico 提交于
Every caller relies on the result being the actual bond, so this verification just masks the real problem. CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: NVeaceslav Falico <vfalico@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Veaceslav Falico 提交于
The new bond_free_slave() needs new_slave->bond to verify if additional structures were allocated, so populate it early so that, in case of failure in bond_enslave(), we would be able to get it. Also populate the new_slave->dev field, as it's too one of the most needed things to assign early. CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: NVeaceslav Falico <vfalico@gmail.com> Acked-by: NDing Tianhong <dingtianhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 David S. Miller 提交于
Sascha Hauer says: ==================== make of_set_phy_supported work with genphy driver The mdio phys recently gained support for specifying the phy speed via devicetree. This currently only works with the hardware specific phy drivers but not with the genphy driver. This series fixes this. ==================== Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Sascha Hauer 提交于
of_set_phy_supported allows overwiting hardware capabilities of a phy with values from the devicetree. of_set_phy_supported is called right after phy_device_register in the assumption that phy_probe is called from phy_device_register and the features of the phy are already initialized. For the genphy driver this is not true, here phy_probe is called later during phy_connect time. phy_probe will then overwrite all settings done from of_set_phy_supported Fix this by moving of_set_phy_supported to the core phy code and calling it from phy_probe. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Sascha Hauer 提交于
of_set_phy_supported allows overwiting hardware capabilities of a phy with values from the devicetree. This does not work with the genphy driver though because the genphys config_init function will overwrite all values adjusted by of_set_phy_supported. Fix this by initialising the genphy features in the phy_driver struct and in config_init just limit the features to the ones the hardware can actually support. The resulting features are a subset of the devicetree specified features and the hardware features. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
git://gitorious.org/linux-can/linux-can-next由 David S. Miller 提交于
Marc Kleine-Budde says: ==================== pull-request: can-next 2014-05-19 this is a pull request of a single patch for net-next/master. It fixes a use after free(), which slipped into to gs_usb driver. ==================== Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Cong Wang 提交于
Merge net/bridge/br_notify.c into net/bridge/br.c, since it has only br_device_event() and br.c is small. Cc: Stephen Hemminger <stephen@networkplumber.org> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Chen Gang 提交于
'dccp_timestamp_seed' is initialized once by ktime_get_real() in dccp_timestamping_init(). It is always less than ktime_get_real() in dccp_timestamp(). Then, ktime_us_delta() in dccp_timestamp() will always return positive number. So can use manual type cast to let compiler and do_div() know about it to avoid warning. The related warning (with allmodconfig under unicore32): CC [M] net/dccp/timer.o net/dccp/timer.c: In function ‘dccp_timestamp’: net/dccp/timer.c:285: warning: comparison of distinct pointer types lacks a cast Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-