Thomas Graf [Tue, 21 Jun 2011 03:11:20 +0000 (03:11 +0000)]
rtnl: provide link dump consistency info
This patch adds a change sequence counter to each net namespace
which is bumped whenever a netdevice is added or removed from
the list. If such a change occurred while a link dump took place,
the dump will have the NLM_F_DUMP_INTR flag set in the first
message which has been interrupted and in all subsequent messages
of the same dump.
Note that links may still be modified or renamed while a dump is
taking place but we can guarantee for userspace to receive a
complete list of links and not miss any.
Testing:
I have added 500 VLAN netdevices to make sure the dump is split
over multiple messages. Then while continuously dumping links in
one process I also continuously deleted and re-added a dummy
netdevice in another process. Multiple dumps per seconds have
had the NLM_F_DUMP_INTR flag set.
I guess we can wait for Johannes patch to hit net-next via the
wireless tree. I just wanted to give this some testing right away.
Signed-off-by: Thomas Graf <tgraf@infradead.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Sathya Perla [Wed, 29 Jun 2011 23:33:17 +0000 (23:33 +0000)]
be2net: create/destroy rx-queues on interface open/close
On some skews, the BE card sends pause frames (and not drop pkts) if there are
no more posted buffers available for packet reception. This behaviour has a
side effect: When an interface is disabled, buffers are no longer posted on the
corresponding RX rings. All broadcast and multicast traffic being received on
the port will quickly fill up the PMEM and cause pause push back. As the PMEM
is shared by both the ports, all traffic being received on the other (enabled)
port also gets stalled.
The fix is to destroy RX rings when the interface is disabled. If there is no
RX ring match in the RXF lookup, the packets are discarded and so don't hog the
PMEM.
The RXQ creation cmd must now use MCC instead of MBOX as they are are called
post MCC queue creation.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Sathya Perla [Wed, 29 Jun 2011 23:32:56 +0000 (23:32 +0000)]
be2net: fix certain cmd failure logging
Some (older)versions of cards/fw may not recognize certain cmds and
return illegal/unsupported errors. As long as the driver can handle
this gracefully there is no need to log an error msg.
Also finetuned 2 existing error log messages.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
o Add external loopback test in self test:
- Send set external loopback mode request to fw.
To quiscent other storage functions.
- Perform test
- Send unset loopback mode request to fw.
o Rename ilb to lb.
o Update driver version 5.0.20.
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: add external loopback test in ethtool self test
External loopback test can be performed by application without any driver
support on normal Ethernet cards.
But on CNA devices, where multiple functions share same physical port.
Here internal loopback test and external loopback test can be initiated by
multiple functions at same time. To co exist all functions, firmware need
to regulate what test can be run by which function. So before performing external
loopback test, command need to send to firmware, which will quiescent other functions.
User may not want to run external loopback test always. As special cable need to be
connected for this test.
So adding explicit flag in ethtool self test, which will specify interface
to perform external loopback test.
ETH_TEST_FL_EXTERNAL_LB: Application set to request external loopback test
ETH_TEST_FL_EXTERNAL_LB_DONE: Driver ack if test performed
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Tobias Klauser [Wed, 29 Jun 2011 02:14:46 +0000 (02:14 +0000)]
net: am79c961a: Omit check for multicast bit in netdev_for_each_mc_addr
There is no need to check for the address being a multicast address in
the netdev_for_each_mc_addr loop, so remove it.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Exclude duplicated checking for iface-up. This flags is checked in 'is_skb_forwardable' function, which is subroutine of 'dev_forward_skb'.
Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Guo-Fu Tseng [Tue, 28 Jun 2011 01:38:30 +0000 (01:38 +0000)]
jme: Cleanup PM operations after using new PM API
1. Using enum name instead of numeric value.
2. device_set_wakeup_enable expect bool argument
adding !!() to the argument to be passed.
3. Remove non-jme-hardware related operations from
jme_clear_pm()
4. Reuse jme_clear_pm() in jme_resume() and jme_powersave_phy()
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Kurt Van Dijck [Mon, 27 Jun 2011 05:00:13 +0000 (05:00 +0000)]
can: remove useless defaults in Kconfig
There's no need for "default N' (or 'default n') as it's default.
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Vasanthy Kolluri [Fri, 17 Jun 2011 07:56:48 +0000 (07:56 +0000)]
enic: Add support to configure hardware interrupt coalesce timers in a platform independent way
enic driver and the underlying hardware use different units for representing the interrupt coalesce timer.
Driver converts the interrupt coalesce timer in usec to hardware cycles while setting the relevant hardware
registers. The conversion factor can be different for each of the adapter hardware types. So it is dynamically
learnt from the adapter firmware using the devcmd CMD_INTR_COAL_CONVERT. This allows the driver to configure
the hardware interrupt coalesce timers in a platform independent way.
Signed-off-by: Danny Guo <dannguo@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David Wang <dwang2@cisco.com> Signed-off-by: David S. Miller <davem@conan.davemloft.net>
Jon Mason [Mon, 27 Jun 2011 05:05:05 +0000 (05:05 +0000)]
myri10ge: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking. It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.
Signed-off-by: Jon Mason <mason@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jon Mason [Mon, 27 Jun 2011 05:05:04 +0000 (05:05 +0000)]
myri10ge: add support for set_phys_id
Add myri10ge driver support for the ethtool identify operation.
NOTE: Rather than blinking (which is the normal case), when identify is
used, the yellow LED turns solid.
Signed-off-by: Jon Mason <mason@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jon Mason [Mon, 27 Jun 2011 17:57:28 +0000 (17:57 +0000)]
myri10ge: rework parity error check and cleanup
Clean up watchdog reset code:
- move code that checks for stuck slice to a common routine
- unless there is a confirmed h/w fault, verify that a stuck
slice is still stuck in the watchdog worker; if the slice is no
longer stuck, abort the reset.
- this removes an egregious 2000ms pause in the watchdog worker that
was a diagnostic aid (to look for spurious resets) the snuck into
production code.
v3 includes corrections from Joe Perches
Signed-off-by: Jon Mason <mason@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jon Mason [Mon, 27 Jun 2011 05:05:00 +0000 (05:05 +0000)]
myri10ge: ensure tx queues remain stopped
Ensure that our tx queues remain stopped when we stop them in
myri10ge_close(). Not doing so can potentially lead to traffic being
transmitted when the interface is removed, which can lead to NULL
pointer dereferences.
Signed-off-by: Jon Mason <mason@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Barry Grussling [Fri, 24 Jun 2011 19:53:51 +0000 (19:53 +0000)]
DSA: Enable cascading in multi-chip 6131 configuration
This patch enables the 6131 family of chips to forward DSA
packets to other switch chips. This is needed if multiple
DSA chips are used in a device. Without this patch the
chip will drop any DSA packets not destined for it.
This patch only enables the forwarding of DSA packets if
multiple chips are used in the switch configuration.
Signed-off-by: Barry Grussling <barry@grussling.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Rothwell [Wed, 29 Jun 2011 09:55:59 +0000 (02:55 -0700)]
net: include dma-mapping.h in ll_temac_main.c for dma_map_single etc
fixes thses build errors:
drivers/net/ll_temac_main.c: In function 'temac_dma_bd_release':
drivers/net/ll_temac_main.c:209:4: error: implicit declaration of function 'dma_unmap_single'
drivers/net/ll_temac_main.c:215:3: error: implicit declaration of function 'dma_free_coherent'
drivers/net/ll_temac_main.c: In function 'temac_dma_bd_init':
drivers/net/ll_temac_main.c:243:2: error: implicit declaration of function 'dma_alloc_coherent'
drivers/net/ll_temac_main.c:243:14: warning: assignment makes pointer from integer without a cast
drivers/net/ll_temac_main.c:251:14: warning: assignment makes pointer from integer without a cast
drivers/net/ll_temac_main.c:280:3: error: implicit declaration of function 'dma_map_single'
drivers/net/ll_temac_main.c: In function 'temac_start_xmit_done':
drivers/net/ll_temac_main.c:628:22: warning: cast to pointer from integer of different size
Caused by commit commit b7f080cfe223 ("net: remove mm.h inclusion from
netdevice.h").
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Rothwell [Wed, 29 Jun 2011 09:55:28 +0000 (02:55 -0700)]
net: include io.h in sja1000_of_platform.c for iounmap etc
fixes these build errors:
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_read_reg':
drivers/net/can/sja1000/sja1000_of_platform.c:61:2: error: implicit declaration of function 'in_8'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_write_reg':
drivers/net/can/sja1000/sja1000_of_platform.c:67:2: error: implicit declaration of function 'out_8'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_remove':
drivers/net/can/sja1000/sja1000_of_platform.c:81:2: error: implicit declaration of function 'iounmap'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_probe':
drivers/net/can/sja1000/sja1000_of_platform.c:113:2: error: implicit declaration of function 'ioremap_nocache'
drivers/net/can/sja1000/sja1000_of_platform.c:113:7: warning: assignment makes pointer from integer without a cast
Caused by commit b7f080cfe223 ("net: remove mm.h inclusion from
netdevice.h").
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Jesse Gross [Fri, 24 Jun 2011 14:24:35 +0000 (14:24 +0000)]
vmxnet3: Enable GRO support.
When receiving packets from another guest on the same hypervisor, it's
generally possible to receive large packets because no segmentation is
necessary and these packets are handled by LRO. However, when doing
routing or bridging we must disable LRO and lose this benefit. In
these cases GRO can still be used and it is very effective because the
packets which are segmented in the hypervisor are received very close
together and can easily be merged.
CC: Shreyas Bhatewara <sbhatewara@vmware.com> CC: Scott Goldman <scottjg@vmware.com> CC: VMware PV-Drivers <pv-drivers@vmware.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: Scott J. Goldman <scottjg@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jon Mason [Mon, 27 Jun 2011 07:48:11 +0000 (07:48 +0000)]
vxge: remove unnecessary reads of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking. It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.
Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Jon Mason [Mon, 27 Jun 2011 07:46:56 +0000 (07:46 +0000)]
sky2: remove unnecessary reads of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking. It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it. Also, pci_is_pcie is a
better way of determining if the device is PCIE or not (as it uses the
same saved PCIE capability offset).
Signed-off-by: Jon Mason <jdmason@kudzu.us> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jon Mason [Mon, 27 Jun 2011 07:46:31 +0000 (07:46 +0000)]
r8169: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking. Use the
value from pci_dev instead of checking in the driver and saving it off
the the driver specific structure. Also, it will remove an unnecessary
search in the PCI configuration space if this value is referenced
instead of reacquiring it.
Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Jon Mason [Mon, 27 Jun 2011 07:45:44 +0000 (07:45 +0000)]
niu: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking. It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.
Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Jon Mason [Mon, 27 Jun 2011 07:45:12 +0000 (07:45 +0000)]
bnx2x: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking. It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it. Also, pci_is_pcie is a
better way of determining if the device is PCIE or not (as it uses the
same saved PCIE capability offset).
Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Jon Mason [Mon, 27 Jun 2011 07:44:43 +0000 (07:44 +0000)]
bnx2: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking. It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it. Also, pci_is_pcie is a
better way of determining if the device is PCIE or not (as it uses the
same saved PCIE capability offset).
Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Jon Mason [Mon, 27 Jun 2011 07:44:01 +0000 (07:44 +0000)]
igb: remove unnecessary reads of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking. It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.
Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Jon Mason [Mon, 27 Jun 2011 07:43:47 +0000 (07:43 +0000)]
e1000e: remove unnecessary reads of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking. It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.
Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Jon Mason [Mon, 27 Jun 2011 07:42:49 +0000 (07:42 +0000)]
cxgb3: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking. It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.
Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Jon Mason [Mon, 27 Jun 2011 07:42:17 +0000 (07:42 +0000)]
mlx4: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking. It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.
Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Jon Mason [Mon, 27 Jun 2011 12:56:50 +0000 (12:56 +0000)]
tg3: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking. Use the
value from pci_dev instead of checking in the driver and saving it off
the the driver specific structure. It will remove an unnecessary search
in the PCI configuration space if this value is referenced instead of
reacquiring it.
v2 of the patch re-adds the PCI_EXPRESS flag and adds comments
describing why it is necessary.
[ pdev->pcie_cap --> pci_pcie_cap(pdev) -DaveM ]
Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: David S. Miller <davem@davemloft.net>
${LINUX}/drivers/net/sh_eth.c:1773: warning:
'mdp' may be used uninitialized in this function
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jesse Gross [Thu, 23 Jun 2011 13:04:39 +0000 (13:04 +0000)]
vmxnet3: Convert to new vlan model.
This converts the vmxnet3 driver to use the new vlan model. In doing so
it fixes missing tags in tcpdump and failure to do checksum offload when
tx vlan offload is disabled.
CC: Shreyas Bhatewara <sbhatewara@vmware.com> CC: VMware PV-Drivers <pv-drivers@vmware.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: Scott J. Goldman <scottjg@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Mike Frysinger [Fri, 24 Jun 2011 04:33:02 +0000 (04:33 +0000)]
can: bfin_can: auto-calculate accessor sizes
Since we have a struct that defines the sizes of the registers, we don't
need to explicitly use the 16bit read/write helpers. Let the code figure
out which size access to make based on the size of the C type.
There should be no functional changes here.
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Mike Frysinger [Fri, 24 Jun 2011 04:33:01 +0000 (04:33 +0000)]
can: bfin_can: simplify xmit id1 setup
If we look closely, the 4 writes to TRANSMIT_CHL.id1 can be collapsed
down into much simpler code. So do just that.
This also fixes a build failure due to the I/O macros no longer
getting pulled in. Their minor (and accidental) usage here gets
dropped as part of the unification.
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Kurt Van Dijck <kurt.van.dijck@eia.be> Signed-off-by: David S. Miller <davem@davemloft.net>
Sergei Shtylyov [Thu, 23 Jun 2011 04:44:30 +0000 (04:44 +0000)]
mlx4: use pci_dev->revision
Commit 725c89997e03d71b09ea3c17c997da0712b9d835 (mlx4_en: Reporting HW revision
in ethtool -i) added code to read the revision ID from the PCI configuration
register while it's already stored by PCI subsystem in the 'revision' field of
'struct pci_dev'...
While at it, move the code being changed a bit in order to not break the
initialization sequence.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
jamal [Sun, 26 Jun 2011 08:13:54 +0000 (08:13 +0000)]
net_sched: fix dequeuer fairness
Results on dummy device can be seen in my netconf 2011
slides. These results are for a 10Gige IXGBE intel
nic - on another i5 machine, very similar specs to
the one used in the netconf2011 results.
It turns out - this is a hell lot worse than dummy
and so this patch is even more beneficial for 10G.
Test setup:
----------
System under test sending packets out.
Additional box connected directly dropping packets.
Installed prio qdisc on the eth device and default
netdev default length of 1000 used as is.
The 3 prio bands each were set to 100 (didnt factor in
the results).
5 packet runs were made and the middle 3 picked.
results
-------
The "cpu" column indicates the which cpu the sample
was taken on,
The "Pkt runx" carries the number of packets a cpu
dequeued when forced to be in the "dequeuer" role.
The "avg" for each run is the number of times each
cpu should be a "dequeuer" if the system was fair.
As you can see the system is still not perfect but
is a lot better than what it was before...
At the moment we use the old backlog weight, weight_p
which is 64 packets. It seems to be reasonably fine
with that value.
The system could be made more fair if we reduce the
weight_p (as per my presentation), but we are going
to affect the shared backlog weight. Unless deemed
necessary, I think the default value is fine. If not
we could add yet another knob.
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Sathya Perla [Sun, 26 Jun 2011 20:41:53 +0000 (20:41 +0000)]
be2net: fix initialization of vlan_prio_bmap
Initialization of this field to "all priorities" must be done before MCC queue
creation. As soon as the MCC queue is created, an event modifying this value
may be received.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Sathya Perla [Sun, 26 Jun 2011 20:40:48 +0000 (20:40 +0000)]
be2net: fix netdev_stats_update
Problem initially reproted and fixed by Eric Dumazet <eric.dumazet@gmail.com>
netdev_stats_update() resets netdev->stats and then accumulates stats from
various rings. This is wrong as stats readers can sometimes catch zero values.
Use temporary variables instead for accumulating per-ring values.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
John Fastabend [Sat, 18 Jun 2011 07:40:04 +0000 (07:40 +0000)]
ixgbe: implement DCB ops dcb_ieee_del()
Implement DCB ops dcb_ieee_del() and set FCoE to the default
priority when no priority exists.
Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
John Fastabend [Sat, 18 Jun 2011 07:39:58 +0000 (07:39 +0000)]
ixgbe: remove unused fcoe.tc field and fcoe_setapp()
The fcoe.tc field is no longer used so remove it. After
the field is removed there is no need to keep fcoe_setapp()
around so remove it as well. And finally we can get rid
of some DCB #ifdef's in the fcoe code.
Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Removed the getapp() routines from ixgbe because they are no
longer needed. It also allowed the set hardware routines to
use both IEEE 802.1Qaz app types and CEE app types. This
added code to do bit shifting in the IEEE case.
This patch reverts the checks and handles the IEEE case
from the setapp entry point. I prefer this because it
keeps the two paths from having to be aware of the DCB
mode. This resolves a bug where I missed setting the
selector bit in the IEEE spec value and left it in the
CEE value. Now that they are separate routines these types
of errors should not occur.
Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Lior Levy [Sat, 25 Jun 2011 07:09:08 +0000 (00:09 -0700)]
ixgbe: A fix to VF TX rate limit
There is a need to configure MMW_SIZE in register RTTBCNRM with a correct
value (0x4 for non jumbo frames and 0x14 for jumbo frames support).
For 82599 the value is 0x4 and for X540 the value is 0x14.
Signed-off-by: Lior Levy <lior.levy@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Alexander Duyck [Fri, 27 May 2011 05:31:52 +0000 (05:31 +0000)]
ixgbe: Update method used for determining descriptor count for an skb
This patch updates the current methods used for determining if we have
enough space to transmit a given skb. The current method is quite wasteful
as it has us go through and determine how each page is going to be broken
up. That only needs to be done if pages are larger than our maximum data
per TXD. As such I have wrapped that in a page size check.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Alexander Duyck [Fri, 27 May 2011 05:31:47 +0000 (05:31 +0000)]
ixgbe: Add one function that handles most of context descriptor setup
There is a significant amount of shared functionality between the checksum
and TSO offload configuration that is shared in regards to how they setup
the context descriptors. Since so much of the functionality is shared it
makes sense to move the shared functionality into a single function and
just call that function from the two context descriptor specific routines.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Alexander Duyck [Fri, 27 May 2011 05:31:42 +0000 (05:31 +0000)]
ixgbe: Move all values that deal with count, next_to_use, next_to_clean to u16
This change updates all values dealing with count, next_to_use, and
next_to_clean so that they stay u16 values. The advantage of this is that
there is no re-casting of type during the propagation through the stack.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Alexander Duyck [Fri, 27 May 2011 05:31:37 +0000 (05:31 +0000)]
ixgbe: Convert IXGBE_DESC_UNUSED from macro to static inline function
This change is a minor cleanup that converts the IXGBE_DESC_UNUSED macro
into a static inline function just for the case of the code being a bit
cleaner.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com> Acked-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Wed, 22 Jun 2011 20:39:00 +0000 (20:39 +0000)]
zorro8390: Update style, neaten, restructure to eliminate prototypes
Convert to current logging styles.
Move code blocks to eliminate need for prototypes.
Use tabs for code indent and standardize spacing.
Comment neatening.
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Wed, 22 Jun 2011 20:38:53 +0000 (20:38 +0000)]
ariadne: Update style, neaten, restructure to eliminate prototypes
Convert to current logging styles.
Move code blocks to eliminate need for prototypes.
Use tabs for code indent and sandardize spacing.
Comment neatening.
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Allan Stephens [Wed, 1 Jun 2011 20:21:12 +0000 (16:21 -0400)]
tipc: Optimize creation of connection protocol messages
Simplifies the creation of connection protocol messages by eliminating
the passing of information that is no longer required, is constant,
or is contained within the port structure that is issuing the message.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Allan Stephens [Wed, 1 Jun 2011 19:48:42 +0000 (15:48 -0400)]
tipc: Don't create payload message using connection protocol routine
Modifies the logic that creates a connection termination payload
message so that it no longer (mis)uses a routine that creates a
connection protocol message. The revised code is now more easily
understood, and avoids setting several fields that are either not
present in payload messages or were being set more than once.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Allan Stephens [Wed, 1 Jun 2011 19:08:10 +0000 (15:08 -0400)]
tipc: Reject connection protocol message sent to unconnected port
Restructures the logic used in tipc_port_recv_proto_msg() to ensure
that incoming connection protocol messages are handled properly. The
routine now uses a two-stage process that first ensures the message
applies on an existing connection and then processes the request.
This corrects a loophole that allowed a connection probe request to
be processed if it was sent to an unconnected port that had no names
bound to it.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Allan Stephens [Tue, 31 May 2011 20:10:08 +0000 (16:10 -0400)]
tipc: Optimize creation of FIN messages
Speeds up the creation of the FIN message that terminates a TIPC
connection. The typical peer termination message is now created by
duplicating the terminating port's standard payload message header
and adjusting the message size, importance, and error code fields,
rather than building all fields of the message from scratch. A FIN
message that is directed to the port itself is created the same way.
but also requires swapping the origin and destination address fields.
In addition to reducing the work required to create FIN messages,
these changes eliminate several instances of duplicated code,
Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Allan Stephens [Tue, 31 May 2011 19:03:18 +0000 (15:03 -0400)]
tipc: Cleanup of message header size terminology
Performs cosmetic cleanup of the symbolic names used to specify TIPC
payload message header sizes. The revised names now more accurately
reflect the payload messages in which they can appear. In addition,
several places where these payload message symbol names were being used
to create non-payload messages have been updated to use the proper
internal message symbolic name.
No functional changes are introduced by this rework.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Allan Stephens [Tue, 31 May 2011 18:35:18 +0000 (14:35 -0400)]
tipc: Eliminate useless check when creating internal message
Gets rid of code that allows tipc_msg_init() to create a short
payload message header. This optimization is possible because
there are no longer any callers who require this capability.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Allan Stephens [Mon, 30 May 2011 15:27:50 +0000 (11:27 -0400)]
tipc: Eliminate checks for empty zone list during name translation
Gets rid of a pair of checks to see if a name sequence entry in
TIPC's name table has an empty zone list. These checks are pointless
since the zone list can never be empty (i.e. as soon as the list
becomes empty the associated name sequence entry is deleted).
Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Allan Stephens [Mon, 30 May 2011 14:48:48 +0000 (10:48 -0400)]
tipc: Convert name table publication lists to standard kernel lists
Modifies the main circular linked lists of publications used in TIPC's
name table to use the standard kernel linked list type. This change
simplifies the deletion of an existing publication by eliminating
the need to search up to three lists to locate the publication.
The use of standard list routines also helps improve the readability
of the name table code by make it clearer what each list operation
being performed is actually doing.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>