17 Dec, 2011
7 commits
-
The socket inode is used as a key for lookup. This is effectively
the only really unique ID of a unix socket, but using this for
search currently has one problem -- it is O(number of sockets) :(Does it worth fixing this lookup or inventing some other ID for
unix sockets?Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Walk the unix sockets table and fill the core response structure,
which includes type, state and inode.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Includes basic module_init/_exit functionality, dump/get_exact stubs
and declares the basic API structures for request and response.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
The sk address is used as a cookie between dump/get_exact calls.
It will be required for unix socket sdumping, so move it from
inet_diag to sock_diag.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
I've made a mistake when fixing the sock_/inet_diag aliases :(
1. The sock_diag layer should request the family-based alias,
not just the IPPROTO_IP one;
2. The inet_diag layer should request for AF_INET+protocol alias,
not just the protocol one.Thus fix this.
Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
It should belong to sock_diag, not inet_diag.
Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller
16 Dec, 2011
8 commits
-
Conflicts:
drivers/net/ethernet/freescale/fsl_pq_mdio.c
net/batman-adv/translation-table.c
net/ipv6/route.c -
This patch creates a new device member to hold the RSS indirection table
and separates out the code that initializes the table from the code that
programs the table into device registers.Signed-off-by: Matt Carlson
Reviewed-by: Michael Chan
Reviewed-by: Benjamin Li
Signed-off-by: David S. Miller -
This patch replaces tg3's internal tg3_advert_flowctrl_1000T function
with mii_advertise_flowctrl provided by the kernel headers.Signed-off-by: Matt Carlson
Reviewed-by: Michael Chan
Reviewed-by: Benjamin Li
Signed-off-by: David S. Miller -
This patch adds support for the 57766 ASIC revision.
Signed-off-by: Matt Carlson
Reviewed-by: Michael Chan
Reviewed-by: Benjamin Li
Signed-off-by: David S. Miller -
The 57766 ASIC rev will impose a new TX BD DMA limit on the driver.
This patch prepares for 57766 support by making the tx BD DMA limit
tunable.Signed-off-by: Matt Carlson
Reviewed-by: Michael Chan
Reviewed-by: Benjamin Li
Signed-off-by: David S. Miller -
There are some devices in the 57765 ASIC rev that are EEE capable.
Unfortunately the EEE setup code only gets executed if the device is
gigabit capable. This patch fixes the problem.Signed-off-by: Matt Carlson
Reviewed-by: Michael Chan
Reviewed-by: Benjamin Li
Signed-off-by: David S. Miller -
We should only dereference the pointer if it's valid, not the other way
round.Signed-off-by: Dan Carpenter
Signed-off-by: David S. Miller -
They need to be available for other protocols as well, since
they are used in sock.c openlySigned-off-by: Glauber Costa
CC: Hiroyouki Kamezawa
CC: David S. Miller
CC: Eric Dumazet
CC: Stephen Rothwell
Signed-off-by: David S. Miller
15 Dec, 2011
4 commits
-
commit b099ce2602d806 (net: Batch inet_twsk_purge) added rcu protection
on tw_net for no obvious reason.struct net are refcounted anyway since timewait sockets escape from rcu
protected sections. tw_net stay valid for the whole timwait lifetime.This also removes a lot of sparse errors.
Signed-off-by: Eric Dumazet
CC: Eric W. Biederman
Signed-off-by: David S. Miller -
net/ipv4/sysctl_net_ipv4.c:78:6: warning: symbol 'inet_get_ping_group_range_table'
was not declared. Should it be static?net/ipv4/sysctl_net_ipv4.c:119:31: warning: incorrect type in argument 2
(different signedness)
net/ipv4/sysctl_net_ipv4.c:119:31: expected int *range
net/ipv4/sysctl_net_ipv4.c:119:31: got unsigned int *Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Its better to use a predefined size for this small automatic variable.
Removes a sparse error as well :
net/sched/cls_flow.c:288:13: error: bad constant expression
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Signed-off-by: Barak Witkowski
Signed-off-by: Eilon Greenstein
Signed-off-by: David S. Miller
14 Dec, 2011
21 commits
-
commit 6d4cdf47d2 (vlan: add 802.1q netpoll support) forgot to declare
as static some private functions.Signed-off-by: Eric Dumazet
CC: Benjamin LaHaise
Signed-off-by: David S. Miller -
The original code generates a Sparse warning:
net/8021q/vlan_core.c:336:9:
error: incompatible types in comparison expression (different address spaces)It's ok to dereference __rcu pointers here because we are holding the
RTNL lock. I've added some calls to rtnl_dereference() to silence the
warning.Signed-off-by: Dan Carpenter
Acked-by: Eric Dumazet
Acked-by: Jiri Pirko
Signed-off-by: David S. Miller -
Before adding a struct rtnl_link_ops into link_ops list, check it doesnt
clash with a prior one.Based on a previous patch from Alexander Smirnov
Signed-off-by: Eric Dumazet
CC: Alexander Smirnov
Signed-off-by: David S. Miller -
After commit 8e2ec639173f325977818c45011ee176ef2b11f6 ("ipv6: don't
use inetpeer to store metrics for routes.") the test in rt6_alloc_cow()
for setting the ANYCAST flag is now wrong.'rt' will always now have a plen of 128, because it is set explicitly
to 128 by ip6_rt_copy.So to restore the semantics of the test, check the destination prefix
length of 'ort'.Signed-off-by: David S. Miller
-
Don't just succeed with a route that has a NULL neighbour attached.
This follows the behavior of addrconf_dst_alloc().Allowing this kind of route to end up with a NULL neigh attached will
result in packet drops on output until the route is somehow
invalidated, since nothing will meanwhile try to lookup the neigh
again.A statistic is bumped for the case where we see a neigh-less route on
output, but the resulting packet drop is otherwise silent in nature,
and frankly it's a hard error for this to happen and ipv6 should do
what ipv4 does which is say something in the kernel logs.Signed-off-by: David S. Miller
-
It's simpler to just keep these things out until there is a real user
of them, so we can see what the needs actually are, rather than keep
these things around as useless overhead.Signed-off-by: David S. Miller
-
Signed-off-by: Yevgeny Petrilin
Signed-off-by: David S. Miller -
Signed-off-by: Yevgeny Petrilin
Signed-off-by: David S. Miller -
1. Added module parameters sr_iov and probe_vf for controlling enablement of
SRIOV mode.
2. Increased default max num-qps, num-mpts and log_num_macs to accomodate
SRIOV mode
3. Added port_type_array as a module parameter to allow driver startup with
ports configured as desired.
In SRIOV mode, only ETH is supported, and this array is ignored; otherwise,
for the case where the FW supports both port types (ETH and IB), the
port_type_array parameter is used.
By default, the port_type_array is set to configure both ports as IB.
4. When running in sriov mode, the master needs to initialize the ICM eq table
to hold the eq's for itself and also for all the slaves.
5. mlx4_set_port_mask() now invoked from mlx4_init_hca, instead of in mlx4_dev_cap.
6. Introduced sriov VF (slave) device startup/teardown logic (mainly procedures
mlx4_init_slave, mlx4_slave_exit, mlx4_slave_cap, mlx4_slave_exit and flow
modifications in __mlx4_init_one, mlx4_init_hca, and mlx4_setup_hca).
VFs obtain their startup information from the PF (master) device via the
comm channel.
7. In SRIOV mode (both PF and VF), MSI_X must be enabled, or the driver
aborts loading the device.
8. Do not allow setting port type via sysfs when running in SRIOV mode.
9. mlx4_get_ownership: Currently, only one PF is supported by the driver.
If the HCA is burned with FW which enables more than one PF, only one
of the PFs is allowed to run. The first one up grabs a FW ownership
semaphone -- all other PFs will find that semaphore taken, and the
driver will not allow them to run.Signed-off-by: Jack Morgenstein
Signed-off-by: Yevgeny Petrilin
Signed-off-by: Liran Liss
Signed-off-by: Marcel Apfelbaum
Signed-off-by: David S. Miller -
When running in SRIOV mode, driver should not automatically start/stop
the mlx4_core upon sensing an HCA internal error -- doing this disables/enables
sriov, which will cause the hypervisor to hang if there are running VMs with
attached VFs.In addition, on VMs the catas process should not run at all, since the HCA
error buffer is not available to VMs in the BARs.Signed-off-by: Jack Morgenstein
Signed-off-by: David S. Miller -
In the previous implementation mtts are managed by:
1. order - log(mtt segments), 'mtt segment' groups several mtts together.
2. first_seg - segment location relative to mtt table.
In the current implementation:
1. order - log(mtts) rather than segments
2. offset - mtt index in mtt tableNote: The actual mtt allocation is made in segments but it is
transparent to callers.Rational: The mtt resource holders are not interested on how the allocation
of mtt is done, but rather on how they will use it.Signed-off-by: Marcel Apfelbaum
Reviewed-by: Jack Morgenstein
Signed-off-by: David S. Miller -
To enable internal loopback, always fill DMAC in control segment
when transmitting the packet, once this is done, the packet is subject
for loopback for if the DMAC mathces one of the multicast/unicast addresses
registered on the physical port.
In receive path if source MAC is our own MAC and we are not in selftest,
or not in force LB mode - drop this packet.Signed-off-by: Eugenia Emantayev
Signed-off-by: Yevgeny Petrilin
Signed-off-by: David S. Miller -
The physical port is now common to the PF and VFs.
The port resources and configuration is managed by the PF, VFs can
only influence the MTU of the port, it is set as max among all functions,
Each function allocates RX buffers of required size to meet it's MTU enforcement.
Port management code was moved to mlx4_core, as the mlx4_en module is
virtualization unawareMove handling qp functionality to mlx4_get_eth_qp/mlx4_put_eth_qp
including reserve/release range and add/release unicast steering.
Let mlx4_register/unregister_mac deal only with MAC (un)registration.Signed-off-by: Eugenia Emantayev
Signed-off-by: Yevgeny Petrilin
Signed-off-by: David S. Miller -
Let multicast/unicast attaching flow go through resource tracker.
The PF is the one responsible for managing all the steering entries.
Define and use module parameter that determines the number of qps
per multicast group.
Minor changes in function calls according to changed prototype.Signed-off-by: Eugenia Emantayev
Signed-off-by: Yevgeny Petrilin
Signed-off-by: David S. Miller -
Signed-off-by: Jack Morgenstein
Signed-off-by: David S. Miller -
The resource tracker is used to track usage of HCA resources by the different
guests.Virtual functions (VFs) are attached to guest operating systems but
resources are allocated from the same pool and are assigned to VFs. It is
essential that hostile/buggy guests not be able to affect the operation of
other VFs, possibly attached to other guest OSs since ConnectX firmware is not
tolerant to misuse of resources.The resource tracker module associates each resource with a VF and maintains
state information for the allocated object. It also defines allowed state
transitions and enforces them.Relationships between resources are also referred to. For example, CQs are
pointed to by QPs, so it is forbidden to destroy a CQ if a QP refers to it.ICM memory is always accessible through the primary function and hence it is
allocated by the owner of the primary function.When a guest dies, an FLR is generated for all the VFs it owns and all the
resources it used are freed.The tracked resource types are: QPs, CQs, SRQs, MPTs, MTTs, MACs, RES_EQs,
and XRCDNs.Signed-off-by: Eli Cohen
Signed-off-by: Jack Morgenstein
Signed-off-by: David S. Miller -
Passing async events to slaves:
In SRIOV mode, each slave creates its own async EQ, but only the master can
register directly with the FW to receive async events. Async events which
should be passed to slaves (such as a WQ_ACCESS_ERROR for a QP owned by a slave)
are generated at the slave by the master using the GEN_EQE FW command.Wrapper functions: mlx4_MAP_EQ_wrapper
Only the master can map an EQ. The slave commands to map their EQs arrive
at the master via the comm channel. The master then invokes the wrapper
function to do the work (and enter the resource in the tracking database).New events: COMM_CHANNEL and FLR
The COMM_CHANNEL event arrives only at the master, and signals that
a slave has posted a command on the comm channel.
The FLR event is generated by the FW when a guest operating a VF
unexpectedly goes down.Signed-off-by: Jack Morgenstein
Signed-off-by: David S. Miller -
MTTs are resources which are allocated and tracked by the PF driver.
In multifunction mode, the allocation and icm mapping is done in
the resource tracker (later patch in this sequence).To accomplish this, we have "work" functions whose names start with
"__", and "request" functions (same name, no __). If we are operating
in multifunction mode, the request function actually results in
comm-channel commands being sent (ALLOC_RES or FREE_RES).
The PF-driver comm-channel handler will ultimately invoke the
"work" (__) function and return the result.If we are not in multifunction mode, the "work" handler is invoked
immediately.Signed-off-by: Jack Morgenstein
Signed-off-by: David S. Miller -
CQs are resources which are allocated and tracked by the PF driver.
In multifunction mode, the allocation and icm mapping is done in
the resource tracker (later patch in this sequence).To accomplish this, we have "work" functions whose names start with
"__", and "request" functions (same name, no __). If we are operating
in multifunction mode, the request function actually results in
comm-channel commands being sent (ALLOC_RES or FREE_RES).
The PF-driver comm-channel handler will ultimately invoke the
"work" (__) function and return the result.If we are not in multifunction mode, the "work" handler is invoked
immediately.Signed-off-by: Jack Morgenstein
Signed-off-by: David S. Miller -
QPs are resources which are allocated and tracked by the PF driver.
In multifunction mode, the allocation and icm mapping is done in
the resource tracker (later patch in this sequence).To accomplish this, we have "work" functions whose names start with
"__", and "request" functions (same name, no __). If we are operating
in multifunction mode, the request function actually results in
comm-channel commands being sent (ALLOC_RES or FREE_RES).
The PF-driver comm-channel handler will ultimately invoke the
"work" (__) function and return the result.If we are not in multifunction mode, the "work" handler is invoked
immediately.Signed-off-by: Jack Morgenstein
Signed-off-by: David S. Miller -
SRQs are resources which are allocated and tracked by the PF driver.
In multifunction mode, the allocation and icm mapping is done in
the resource tracker (later patch in this sequence).To accomplish this, we have "work" functions whose names start with
"__", and "request" functions (same name, no __). If we are operating
in multifunction mode, the request function actually results in
comm-channel commands being sent (ALLOC_RES or FREE_RES).
The PF-driver comm-channel handler will ultimately invoke the
"work" (__) function and return the result.If we are not in multifunction mode, the "work" handler is invoked
immediately.Signed-off-by: Jack Morgenstein
Signed-off-by: David S. Miller