* Re: [PATCH net-next v2 1/7] r8169: adjust some registers
From: Francois Romieu @ 2011-07-07 8:50 UTC (permalink / raw)
To: Hayes Wang; +Cc: netdev, linux-kernel
In-Reply-To: <1309939088-31994-1-git-send-email-hayeswang@realtek.com>
Hayes Wang <hayeswang@realtek.com> :
[...]
I have acked and pushed the whole serie against davem's -next branch
(aec27311c23a8ce8eaf490762249d3ed74be83b6) as :
git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6.git davem-next.r8169
I have done three changes which do imho not deserve a separate patch:
- renamed rtl_eri_write_w0w1 to rtl_w1w0i_eri as there already is a
rtl_w1w0_phy. Parameters have been permuted (idem for callers).
- fixed spurious static<space><space> and excess comment line length.
I am giving it a pair of hours testing.
--
Ueimor
^ permalink raw reply
* Re: [PATCH] gianfar v2: code cleanups
From: David Miller @ 2011-07-07 7:48 UTC (permalink / raw)
To: sebastian.belden; +Cc: netdev, joe, sebastian.poehn
In-Reply-To: <1309764900.3123.7.camel@DENEC1DT0191>
From: "Sebastian Pöhn" <sebastian.belden@googlemail.com>
Date: Mon, 04 Jul 2011 09:35:00 +0200
> This patch:
> # improves readability of some gianfar nfc code
>
> Signed-off-by: Sebastian Poehn <sebastian.poehn@belden.com>
Your email client has corrupted this patch, breaking up long
lines, etc.
Please read "Documentation/email-clients.txt" in the kernel
tree, and after following it's advice send a test email with
the patch to yourself. Verify that the patch you receive
in the email can be applied properly.
Only once you've passed this test should you attempt to resend
your patch here.
Thanks.
^ permalink raw reply
* Re: [Bugme-new] [Bug 38102] New: BUG kmalloc-2048: Poison overwritten
From: Alexey Zaytsev @ 2011-07-07 7:45 UTC (permalink / raw)
To: Eric Dumazet
Cc: Michael Büsch, Neil Horman, Andrew Morton, netdev,
Gary Zambrano, bugme-daemon, David S. Miller, Pekka Pietikainen,
Florian Schirmer, Felix Fietkau, Michael Buesch
In-Reply-To: <1310021286.2481.36.camel@edumazet-laptop>
On Thu, Jul 7, 2011 at 10:48, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le jeudi 07 juillet 2011 à 10:32 +0400, Alexey Zaytsev a écrit :
>> Sorry, been busy for the last couple days. Any patches I should test?
>
> Please try :
>
Thanks. Seems to fail to initialize, getting this in dmesg:
[ 103.421577] b44 0000:02:0e.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 103.440139] ssb: Core 0 found: Fast Ethernet (cc 0x806, rev 0x07,
vendor 0x4243)
[ 103.440159] ssb: Core 1 found: V90 (cc 0x807, rev 0x03, vendor 0x4243)
[ 103.440177] ssb: Core 2 found: PCI (cc 0x804, rev 0x0A, vendor 0x4243)
[ 103.481128] ssb: Sonics Silicon Backplane found on PCI device 0000:02:0e.0
[ 103.481532] b44: b44.c:v2.0
[ 103.502185] b44 ssb1:0: eth0: Broadcom 44xx/47xx 10/100BaseT
Ethernet 00:17:a4:dd:4e:93
[ 109.405071] b44 ssb1:0: eth0: powering down PHY
[ 112.816456] b44 ssb1:0: eth0: Link is up at 100 Mbps, full duplex
[ 112.816470] b44 ssb1:0: eth0: Flow control is off for TX and off for RX
[ 112.952073] b44 ssb1:0: eth0: powering down PHY
[ 113.816148] b44 ssb1:0: eth0: Link is down
[ 114.953717] b44 ssb1:0: eth0: powering down PHY
[ 117.816246] b44 ssb1:0: eth0: Link is up at 100 Mbps, full duplex
[ 117.816260] b44 ssb1:0: eth0: Flow control is off for TX and off for RX
[ 117.963238] b44 ssb1:0: eth0: powering down PHY
[ 118.816128] b44 ssb1:0: eth0: Link is down
[ 119.962817] b44 ssb1:0: eth0: powering down PHY
^ permalink raw reply
* Re: [PATCH 0/4] skge: driver update
From: David Miller @ 2011-07-07 7:30 UTC (permalink / raw)
To: shemminger; +Cc: netdev
In-Reply-To: <20110707050003.998140428@vyatta.com>
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 06 Jul 2011 22:00:04 -0700
> Add one pci id, and cleanup table.
> Make support for really old hardware optional.
All applied to net-next-2.6
^ permalink raw reply
* Re: [PATCH net-next] net: doc: fix compile warning of no format arguments in ifenslave.c
From: David Miller @ 2011-07-07 7:28 UTC (permalink / raw)
To: shanwei; +Cc: rdunlap, netdev, linux-doc
In-Reply-To: <4E155A7F.6050008@cn.fujitsu.com>
From: Shan Wei <shanwei@cn.fujitsu.com>
Date: Thu, 07 Jul 2011 15:04:31 +0800
> Fix following warning in ifenslave.c with gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4).
...
> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Applied.
^ permalink raw reply
* [help] macb driver modification for direct mac-to-mac connection without phy -- Thanks
From: Xu Bingcan @ 2011-07-07 7:27 UTC (permalink / raw)
To: netdev; +Cc: Bingcan Xu
Hi, Guys
I am appreciate that anyone can give me some hint...
My Case Description:
I'm working with an Atmel ARM9 board (macb driver), that doesn't have
a PHY. The MAC is connected to a switch via MII. That MII link is
hard-wired to be 100M full-duplex.
I have a real, working MDIO bus.What I don't have is a PHY.I don't
want an emulated MDIO bus such as phy_fixed.
I found a mail thread about "Question about PHY-less board and
"fixed_phy"" in the linux netdev but no solution provided.
http://www.spinics.net/lists/netdev/msg143651.html
/* Not really PHY in our situation. Use a fake phy like fixed_phy
except a really MDIO to switch
* The switch IP175C uses the PHY addr 0-6 16 18 29 30 31. For more
detail information refer to IP175Cx-DS-R17-20081121.pdf.
* For simplity, the fake PHY use addr = FAKE_PHY_ADDR(19)
*/
I try to modify mdiobus_scan() so that it just allocate space and does
not register device for PHYADDR 19
at macb_mii_probe().. I replace the first found phy to my hardcode one
FAKE_PHY_ADDR(19)...
then I modify the macb_mdio_read() macb_mdio_write() to use my stub
function when addr == FAKE_PHY_ADDR.
But the traffic are lost when startup.
Thanks
Brs,
- Xu Bingcan
^ permalink raw reply
* Re: [Bugme-new] [Bug 38032] New: default values of /proc/sys/net/ipv4/udp_mem does not consider huge page allocation
From: David Miller @ 2011-07-07 7:27 UTC (permalink / raw)
To: eric.dumazet; +Cc: starlight, akpm, linux-mm, netdev, bugme-daemon, aquini
In-Reply-To: <1310013490.2481.35.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 07 Jul 2011 06:38:10 +0200
> [PATCH] net: refine {udp|tcp|sctp}_mem limits
>
> Current tcp/udp/sctp global memory limits are not taking into account
> hugepages allocations, and allow 50% of ram to be used by buffers of a
> single protocol [ not counting space used by sockets / inodes ...]
>
> Lets use nr_free_buffer_pages() and allow a default of 1/8 of kernel ram
> per protocol, and a minimum of 128 pages.
> Heavy duty machines sysadmins probably need to tweak limits anyway.
>
>
> References: https://bugzilla.stlinux.com/show_bug.cgi?id=38032
> Reported-by: starlight <starlight@binnacle.cx>
> Suggested-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: [PATCH net-next] net: fix warning of versioncheck
From: David Miller @ 2011-07-07 7:26 UTC (permalink / raw)
To: shanwei; +Cc: netdev, eilong, sjur.brandeland
In-Reply-To: <4E152325.4050202@cn.fujitsu.com>
From: Shan Wei <shanwei@cn.fujitsu.com>
Date: Thu, 07 Jul 2011 11:08:21 +0800
>
> net-next-2.6/drivers/net/bnx2x/bnx2x_sp.c: 19 linux/version.h not needed.
> net-next-2.6/drivers/net/caif/caif_hsi.c: 9 linux/version.h not needed.
>
> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Applied.
^ permalink raw reply
* Re: [PATCHv2] vmxnet3: round down # of queues to power of two
From: David Miller @ 2011-07-07 7:26 UTC (permalink / raw)
To: sbhatewara; +Cc: pv-drivers, netdev, dtor, yongwang
In-Reply-To: <alpine.LRH.2.00.1107061813100.3509@sbhatewara-dev1.eng.vmware.com>
From: Shreyas Bhatewara <sbhatewara@vmware.com>
Date: Wed, 6 Jul 2011 18:16:53 -0700 (PDT)
>
> vmxnet3 device supports only power-of-two number of queues. The driver
> therefore needs to check this and rounds down the number of queues to the
> nearest power of two.
>
> Signed-off-by: Yong Wang <yongwang@vmware.com>
> Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
> Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
Applied.
^ permalink raw reply
* Re: [PATCH v3 4/4] packet: Add pre-defragmentation support for ipv4
From: David Miller @ 2011-07-07 7:25 UTC (permalink / raw)
To: eric.dumazet; +Cc: mika.penttila, netdev
In-Reply-To: <1309966077.2292.30.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 06 Jul 2011 17:27:57 +0200
> We probably need to add some atomic_inc(&sk->sk_drops) to at least
> warn the application.
I fully support adding some kind of statistics support to AF_PACKET
sockets.
^ permalink raw reply
* Re: [PATCH v2 net-next af-packet 1/2] Enhance af-packet to provide (near zero)lossless packet capture functionality.
From: David Miller @ 2011-07-07 7:13 UTC (permalink / raw)
To: loke.chetan
Cc: netdev, eric.dumazet, joe, bhutchings, shemminger, linux-kernel
In-Reply-To: <CAAsGZS67G8H5NLBxQTY88+T1cRQ3aiwBXK5qa8SJ_TbQ7xqvhw@mail.gmail.com>
From: chetan loke <loke.chetan@gmail.com>
Date: Wed, 6 Jul 2011 17:45:20 -0400
> new format:
>
> union bd_header_u {
> /* renamed struct bd_v1 to hdr_v1 */
> struct hdr_v1 h1;
> } __attribute__ ((__packed__));
>
> struct block_desc {
> __u16 version;
> __u16 offset_to_priv;
> union bd_header_u hdr;
> } __attribute__ ((__packed__));
>
> Is this ok with you?
Get rid of __packed__, it's going to kill performance on RISC
platforms. If you use __packed__, regardless of the actual alignment,
the compiler must assume that each part of the struct "might" be
unaligned. So on architectures such as sparc where alignment matters,
a word is going to be accessed by a sequence of byte loads/stores.
Do not use packed unless absolutely enforced by a protocol or hardware
data structure, it's evil.
^ permalink raw reply
* [PATCH net-next] net: doc: fix compile warning of no format arguments in ifenslave.c
From: Shan Wei @ 2011-07-07 7:04 UTC (permalink / raw)
To: rdunlap, David Miller, netdev, linux-doc
Fix following warning in ifenslave.c with gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4).
Documentation/networking/ifenslave.c:263:4: warning: format not a string literal and no format arguments
Documentation/networking/ifenslave.c:271:3: warning: format not a string literal and no format arguments
Documentation/networking/ifenslave.c:277:3: warning: format not a string literal and no format arguments
Documentation/networking/ifenslave.c:285:3: warning: format not a string literal and no format arguments
Documentation/networking/ifenslave.c:291:3: warning: format not a string literal and no format arguments
Documentation/networking/ifenslave.c:292:3: warning: format not a string literal and no format arguments
Documentation/networking/ifenslave.c:312:4: warning: format not a string literal and no format arguments
Documentation/networking/ifenslave.c:323:3: warning: format not a string literal and no format arguments
Documentation/networking/ifenslave.c:342:4: warning: format not a string literal and no format arguments
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
Documentation/networking/ifenslave.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/Documentation/networking/ifenslave.c b/Documentation/networking/ifenslave.c
index 2bac961..65968fb 100644
--- a/Documentation/networking/ifenslave.c
+++ b/Documentation/networking/ifenslave.c
@@ -260,7 +260,7 @@ int main(int argc, char *argv[])
case 'V': opt_V++; exclusive++; break;
case '?':
- fprintf(stderr, usage_msg);
+ fprintf(stderr, "%s", usage_msg);
res = 2;
goto out;
}
@@ -268,13 +268,13 @@ int main(int argc, char *argv[])
/* options check */
if (exclusive > 1) {
- fprintf(stderr, usage_msg);
+ fprintf(stderr, "%s", usage_msg);
res = 2;
goto out;
}
if (opt_v || opt_V) {
- printf(version);
+ printf("%s", version);
if (opt_V) {
res = 0;
goto out;
@@ -282,14 +282,14 @@ int main(int argc, char *argv[])
}
if (opt_u) {
- printf(usage_msg);
+ printf("%s", usage_msg);
res = 0;
goto out;
}
if (opt_h) {
- printf(usage_msg);
- printf(help_msg);
+ printf("%s", usage_msg);
+ printf("%s", help_msg);
res = 0;
goto out;
}
@@ -309,7 +309,7 @@ int main(int argc, char *argv[])
goto out;
} else {
/* Just show usage */
- fprintf(stderr, usage_msg);
+ fprintf(stderr, "%s", usage_msg);
res = 2;
goto out;
}
@@ -320,7 +320,7 @@ int main(int argc, char *argv[])
master_ifname = *spp++;
if (master_ifname == NULL) {
- fprintf(stderr, usage_msg);
+ fprintf(stderr, "%s", usage_msg);
res = 2;
goto out;
}
@@ -339,7 +339,7 @@ int main(int argc, char *argv[])
if (slave_ifname == NULL) {
if (opt_d || opt_c) {
- fprintf(stderr, usage_msg);
+ fprintf(stderr, "%s", usage_msg);
res = 2;
goto out;
}
--
1.7.4.1
^ permalink raw reply related
* Re: [PATCH linux-firmware] bnx2x: Adding FW 7.0.23.0
From: Ariel Elior @ 2011-07-07 6:59 UTC (permalink / raw)
To: dwmw2; +Cc: eilong, netdev
In-Reply-To: <1309795666.16026.22.camel@lb-tlvb-ariel.il.broadcom.com>
On Mon, 2011-07-04 at 19:07 +0300, Ariel Elior wrote:
> On Mon, 2011-07-04 at 18:59 +0300, Ariel Elior wrote:
> > This FW supports multiple concurrent classes of service in network traffic.
> >
> > Signed-off-by: Ariel Elior <ariele@broadcom.com>
> > Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> > ---
> in case you need it, the patch is also available under
> http://linux.broadcom.com/eilong/FW-7.0.23.0/0001-bnx2x-Adding-FW-7.0.23.0.patch
> thanks,
> Ariel
David, were you able to obtain the FW?
Thanks,
Ariel
^ permalink raw reply
* Re: [Bugme-new] [Bug 38102] New: BUG kmalloc-2048: Poison overwritten
From: Eric Dumazet @ 2011-07-07 6:48 UTC (permalink / raw)
To: Alexey Zaytsev
Cc: Michael Büsch, Neil Horman, Andrew Morton, netdev,
Gary Zambrano, bugme-daemon, David S. Miller, Pekka Pietikainen,
Florian Schirmer, Felix Fietkau, Michael Buesch
In-Reply-To: <CAB9v_DFmXS7_0Sx7VgVzViMSqOTtpaqiKrBABcfARigZabr5fA@mail.gmail.com>
Le jeudi 07 juillet 2011 à 10:32 +0400, Alexey Zaytsev a écrit :
> Sorry, been busy for the last couple days. Any patches I should test?
Please try :
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 6c4ef96..860b236 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -688,8 +688,8 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
ctrl |= DESC_CTRL_EOT;
dp = &bp->rx_ring[dest_idx];
- dp->ctrl = cpu_to_le32(ctrl);
dp->addr = cpu_to_le32((u32) mapping + bp->dma_offset);
+ dp->ctrl = cpu_to_le32(ctrl);
if (bp->flags & B44_FLAG_RX_RING_HACK)
b44_sync_dma_desc_for_device(bp->sdev, bp->rx_ring_dma,
@@ -725,13 +725,15 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
DMA_BIDIRECTIONAL);
ctrl = src_desc->ctrl;
+ src_desc->ctrl = (ctrl & cpu_to_le32(DESC_CTRL_EOT));
if (dest_idx == (B44_RX_RING_SIZE - 1))
ctrl |= cpu_to_le32(DESC_CTRL_EOT);
else
ctrl &= cpu_to_le32(~DESC_CTRL_EOT);
- dest_desc->ctrl = ctrl;
dest_desc->addr = src_desc->addr;
+ dest_desc->ctrl = ctrl;
+ src_desc->addr = 0;
src_map->skb = NULL;
@@ -1118,6 +1120,7 @@ static void b44_init_rings(struct b44 *bp)
if (b44_alloc_rx_skb(bp, -1, i) < 0)
break;
}
+ bp->rx_prod = i;
}
/*
@@ -1405,8 +1408,7 @@ static void b44_init_hw(struct b44 *bp, int reset_kind)
(RX_PKT_OFFSET << DMARX_CTRL_ROSHIFT)));
bw32(bp, B44_DMARX_ADDR, bp->rx_ring_dma + bp->dma_offset);
- bw32(bp, B44_DMARX_PTR, bp->rx_pending);
- bp->rx_prod = bp->rx_pending;
+ bw32(bp, B44_DMARX_PTR, 0);
bw32(bp, B44_MIB_CTRL, MIB_CTRL_CLR_ON_READ);
}
^ permalink raw reply related
* Re: [Bugme-new] [Bug 38102] New: BUG kmalloc-2048: Poison overwritten
From: Alexey Zaytsev @ 2011-07-07 6:32 UTC (permalink / raw)
To: Eric Dumazet
Cc: Michael Büsch, Neil Horman, Andrew Morton, netdev,
Gary Zambrano, bugme-daemon, David S. Miller, Pekka Pietikainen,
Florian Schirmer, Felix Fietkau, Michael Buesch
In-Reply-To: <1309971379.2292.64.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
Sorry, been busy for the last couple days. Any patches I should test?
^ permalink raw reply
* linux-next: manual merge of the staging tree with the net tree
From: Stephen Rothwell @ 2011-07-07 5:28 UTC (permalink / raw)
To: Greg KH; +Cc: linux-next, linux-kernel, Jesper Juhl, David Miller, netdev
Hi Greg,
Today's linux-next merge of the staging tree got a conflict in
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c between commit
219eb47e6f35 ("net/staging: add needed interrupt.h and hardirq.h
includes") from the net tree and commit 41134db17a7d ("Remove unneeded
version.h includes from drivers/staging/rtl*/") from the staging tree.
I fixed it up (see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
index 00ee02f,52a7386..0000000
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
@@@ -19,8 -19,6 +19,7 @@@
#include <linux/random.h>
#include <linux/delay.h>
#include <linux/slab.h>
- #include <linux/version.h>
+#include <linux/interrupt.h>
#include <asm/uaccess.h>
#include "dot11d.h"
^ permalink raw reply
* [PATCH 0/4] skge: driver update
From: Stephen Hemminger @ 2011-07-07 5:00 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
Add one pci id, and cleanup table.
Make support for really old hardware optional.
^ permalink raw reply
* [PATCH 3/4] skge: make support for old Genesis chips optional
From: Stephen Hemminger @ 2011-07-07 5:00 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
In-Reply-To: <20110707050003.998140428@vyatta.com>
[-- Attachment #1: skge-genesis-optional.patch --]
[-- Type: text/plain, Size: 11015 bytes --]
The GENESIS boards are really old PCI-X boards that are rare.
Marvell has dropped support for this hardware and there is no reason
for most users to have to have this code.
Rather than riddling code with ifdef's make one macro and let
the compiler do the dead code elimination. This saves about 15%
of the text size.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/Kconfig 2011-07-06 19:26:47.503999151 -0700
+++ b/drivers/net/Kconfig 2011-07-06 19:29:14.639999138 -0700
@@ -2303,6 +2303,15 @@ config SKGE_DEBUG
If unsure, say N.
+config SKGE_GENESIS
+ bool "Support for older SysKonnect Genesis boards"
+ depends on SKGE
+ help
+ This enables support for the older and uncommon SysKonnect Genesis
+ chips, which support MII via an external transceiver, instead of
+ an internal one. Disabling this option will save some memory
+ by making code smaller. If unsure say Y.
+
config SKY2
tristate "SysKonnect Yukon2 support"
depends on PCI
--- a/drivers/net/skge.c 2011-07-06 19:28:58.836000719 -0700
+++ b/drivers/net/skge.c 2011-07-06 19:29:14.639999138 -0700
@@ -85,6 +85,9 @@ MODULE_PARM_DESC(debug, "Debug level (0=
static DEFINE_PCI_DEVICE_TABLE(skge_id_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_3COM, 0x1700) }, /* 3Com 3C940 */
{ PCI_DEVICE(PCI_VENDOR_ID_3COM, 0x80EB) }, /* 3Com 3C940B */
+#ifdef CONFIG_SKGE_GENESIS
+ { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x4300) }, /* SK-9xx */
+#endif
{ PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x4320) }, /* SK-98xx V2.0 */
{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b01) }, /* D-Link DGE-530T (rev.B) */
{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4c00) }, /* D-Link DGE-530T */
@@ -119,6 +122,15 @@ static const u32 txirqmask[] = { IS_XA1_
static const u32 napimask[] = { IS_R1_F|IS_XA1_F, IS_R2_F|IS_XA2_F };
static const u32 portmask[] = { IS_PORT_1, IS_PORT_2 };
+static inline bool is_genesis(const struct skge_hw *hw)
+{
+#ifdef CONFIG_SKGE_GENESIS
+ return hw->chip_id == CHIP_ID_GENESIS;
+#else
+ return false;
+#endif
+}
+
static int skge_get_regs_len(struct net_device *dev)
{
return 0x4000;
@@ -146,7 +158,7 @@ static void skge_get_regs(struct net_dev
/* Wake on Lan only supported on Yukon chips with rev 1 or above */
static u32 wol_supported(const struct skge_hw *hw)
{
- if (hw->chip_id == CHIP_ID_GENESIS)
+ if (is_genesis(hw))
return 0;
if (hw->chip_id == CHIP_ID_YUKON && hw->chip_rev == 0)
@@ -270,7 +282,7 @@ static u32 skge_supported_modes(const st
SUPPORTED_Autoneg |
SUPPORTED_TP);
- if (hw->chip_id == CHIP_ID_GENESIS)
+ if (is_genesis(hw))
supported &= ~(SUPPORTED_10baseT_Half |
SUPPORTED_10baseT_Full |
SUPPORTED_100baseT_Half |
@@ -433,7 +445,7 @@ static void skge_get_ethtool_stats(struc
{
struct skge_port *skge = netdev_priv(dev);
- if (skge->hw->chip_id == CHIP_ID_GENESIS)
+ if (is_genesis(skge->hw))
genesis_get_stats(skge, data);
else
yukon_get_stats(skge, data);
@@ -448,7 +460,7 @@ static struct net_device_stats *skge_get
struct skge_port *skge = netdev_priv(dev);
u64 data[ARRAY_SIZE(skge_stats)];
- if (skge->hw->chip_id == CHIP_ID_GENESIS)
+ if (is_genesis(skge->hw))
genesis_get_stats(skge, data);
else
yukon_get_stats(skge, data);
@@ -589,7 +601,7 @@ static int skge_set_pauseparam(struct ne
/* Chip internal frequency for clock calculations */
static inline u32 hwkhz(const struct skge_hw *hw)
{
- return (hw->chip_id == CHIP_ID_GENESIS) ? 53125 : 78125;
+ return is_genesis(hw) ? 53125 : 78125;
}
/* Chip HZ to microseconds */
@@ -674,7 +686,7 @@ static void skge_led(struct skge_port *s
int port = skge->port;
spin_lock_bh(&hw->phy_lock);
- if (hw->chip_id == CHIP_ID_GENESIS) {
+ if (is_genesis(hw)) {
switch (mode) {
case LED_MODE_OFF:
if (hw->phy_type == SK_PHY_BCOM)
@@ -1053,7 +1065,6 @@ static void skge_link_down(struct skge_p
netif_info(skge, link, skge->netdev, "Link is down\n");
}
-
static void xm_link_down(struct skge_hw *hw, int port)
{
struct net_device *dev = hw->dev[port];
@@ -1172,7 +1183,6 @@ static void genesis_reset(struct skge_hw
xm_write32(hw, port, XM_MODE, reg | XM_MD_FRF);
}
-
/* Convert mode to MII values */
static const u16 phy_pause_map[] = {
[FLOW_MODE_NONE] = 0,
@@ -2405,7 +2415,7 @@ static void skge_phy_reset(struct skge_p
netif_carrier_off(skge->netdev);
spin_lock_bh(&hw->phy_lock);
- if (hw->chip_id == CHIP_ID_GENESIS) {
+ if (is_genesis(hw)) {
genesis_reset(hw, port);
genesis_mac_init(hw, port);
} else {
@@ -2436,7 +2446,8 @@ static int skge_ioctl(struct net_device
case SIOCGMIIREG: {
u16 val = 0;
spin_lock_bh(&hw->phy_lock);
- if (hw->chip_id == CHIP_ID_GENESIS)
+
+ if (is_genesis(hw))
err = __xm_phy_read(hw, skge->port, data->reg_num & 0x1f, &val);
else
err = __gm_phy_read(hw, skge->port, data->reg_num & 0x1f, &val);
@@ -2447,7 +2458,7 @@ static int skge_ioctl(struct net_device
case SIOCSMIIREG:
spin_lock_bh(&hw->phy_lock);
- if (hw->chip_id == CHIP_ID_GENESIS)
+ if (is_genesis(hw))
err = xm_phy_write(hw, skge->port, data->reg_num & 0x1f,
data->val_in);
else
@@ -2559,7 +2570,7 @@ static int skge_up(struct net_device *de
/* Initialize MAC */
spin_lock_bh(&hw->phy_lock);
- if (hw->chip_id == CHIP_ID_GENESIS)
+ if (is_genesis(hw))
genesis_mac_init(hw, port);
else
yukon_mac_init(hw, port);
@@ -2621,7 +2632,7 @@ static int skge_down(struct net_device *
netif_tx_disable(dev);
- if (hw->chip_id == CHIP_ID_GENESIS && hw->phy_type == SK_PHY_XMAC)
+ if (is_genesis(hw) && hw->phy_type == SK_PHY_XMAC)
del_timer_sync(&skge->link_timer);
napi_disable(&skge->napi);
@@ -2633,7 +2644,7 @@ static int skge_down(struct net_device *
spin_unlock_irq(&hw->hw_lock);
skge_write8(skge->hw, SK_REG(skge->port, LNK_LED_REG), LED_OFF);
- if (hw->chip_id == CHIP_ID_GENESIS)
+ if (is_genesis(hw))
genesis_stop(skge);
else
yukon_stop(skge);
@@ -2661,7 +2672,7 @@ static int skge_down(struct net_device *
skge_rx_stop(hw, port);
- if (hw->chip_id == CHIP_ID_GENESIS) {
+ if (is_genesis(hw)) {
skge_write8(hw, SK_REG(port, TX_MFF_CTRL2), MFF_RST_SET);
skge_write8(hw, SK_REG(port, RX_MFF_CTRL2), MFF_RST_SET);
} else {
@@ -2957,7 +2968,7 @@ static void yukon_set_multicast(struct n
static inline u16 phy_length(const struct skge_hw *hw, u32 status)
{
- if (hw->chip_id == CHIP_ID_GENESIS)
+ if (is_genesis(hw))
return status >> XMR_FS_LEN_SHIFT;
else
return status >> GMR_FS_LEN_SHIFT;
@@ -2965,7 +2976,7 @@ static inline u16 phy_length(const struc
static inline int bad_phy_status(const struct skge_hw *hw, u32 status)
{
- if (hw->chip_id == CHIP_ID_GENESIS)
+ if (is_genesis(hw))
return (status & (XMR_FS_ERR | XMR_FS_2L_VLAN)) != 0;
else
return (status & GMR_FS_ANY_ERR) ||
@@ -2975,9 +2986,8 @@ static inline int bad_phy_status(const s
static void skge_set_multicast(struct net_device *dev)
{
struct skge_port *skge = netdev_priv(dev);
- struct skge_hw *hw = skge->hw;
- if (hw->chip_id == CHIP_ID_GENESIS)
+ if (is_genesis(skge->hw))
genesis_set_multicast(dev);
else
yukon_set_multicast(dev);
@@ -3057,7 +3067,7 @@ error:
"rx err, slot %td control 0x%x status 0x%x\n",
e - skge->rx_ring.start, control, status);
- if (skge->hw->chip_id == CHIP_ID_GENESIS) {
+ if (is_genesis(skge->hw)) {
if (status & (XMR_FS_RUNT|XMR_FS_LNG_ERR))
dev->stats.rx_length_errors++;
if (status & XMR_FS_FRA_ERR)
@@ -3171,7 +3181,7 @@ static void skge_mac_parity(struct skge_
++dev->stats.tx_heartbeat_errors;
- if (hw->chip_id == CHIP_ID_GENESIS)
+ if (is_genesis(hw))
skge_write16(hw, SK_REG(port, TX_MFF_CTRL1),
MFF_CLR_PERR);
else
@@ -3183,7 +3193,7 @@ static void skge_mac_parity(struct skge_
static void skge_mac_intr(struct skge_hw *hw, int port)
{
- if (hw->chip_id == CHIP_ID_GENESIS)
+ if (is_genesis(hw))
genesis_mac_intr(hw, port);
else
yukon_mac_intr(hw, port);
@@ -3195,7 +3205,7 @@ static void skge_error_irq(struct skge_h
struct pci_dev *pdev = hw->pdev;
u32 hwstatus = skge_read32(hw, B0_HWE_ISRC);
- if (hw->chip_id == CHIP_ID_GENESIS) {
+ if (is_genesis(hw)) {
/* clear xmac errors */
if (hwstatus & (IS_NO_STAT_M1|IS_NO_TIST_M1))
skge_write16(hw, RX_MFF_CTRL1, MFF_CLR_INSTAT);
@@ -3278,7 +3288,7 @@ static void skge_extirq(unsigned long ar
struct skge_port *skge = netdev_priv(dev);
spin_lock(&hw->phy_lock);
- if (hw->chip_id != CHIP_ID_GENESIS)
+ if (!is_genesis(hw))
yukon_phy_intr(skge);
else if (hw->phy_type == SK_PHY_BCOM)
bcom_phy_intr(skge);
@@ -3397,7 +3407,7 @@ static int skge_set_mac_address(struct n
memcpy_toio(hw->regs + B2_MAC_1 + port*8, dev->dev_addr, ETH_ALEN);
memcpy_toio(hw->regs + B2_MAC_2 + port*8, dev->dev_addr, ETH_ALEN);
- if (hw->chip_id == CHIP_ID_GENESIS)
+ if (is_genesis(hw))
xm_outaddr(hw, port, XM_SA, dev->dev_addr);
else {
gma_set_addr(hw, port, GM_SRC_ADDR_1L, dev->dev_addr);
@@ -3473,6 +3483,7 @@ static int skge_reset(struct skge_hw *hw
switch (hw->chip_id) {
case CHIP_ID_GENESIS:
+#ifdef CONFIG_SKGE_GENESIS
switch (hw->phy_type) {
case SK_PHY_XMAC:
hw->phy_addr = PHY_ADDR_XMAC;
@@ -3486,6 +3497,10 @@ static int skge_reset(struct skge_hw *hw
return -EOPNOTSUPP;
}
break;
+#else
+ dev_err(&hw->pdev->dev, "Genesis chip detected but not configured\n");
+ return -EOPNOTSUPP;
+#endif
case CHIP_ID_YUKON:
case CHIP_ID_YUKON_LITE:
@@ -3508,7 +3523,7 @@ static int skge_reset(struct skge_hw *hw
/* read the adapters RAM size */
t8 = skge_read8(hw, B2_E_0);
- if (hw->chip_id == CHIP_ID_GENESIS) {
+ if (is_genesis(hw)) {
if (t8 == 3) {
/* special case: 4 x 64k x 36, offset = 0x80000 */
hw->ram_size = 0x100000;
@@ -3523,10 +3538,10 @@ static int skge_reset(struct skge_hw *hw
hw->intr_mask = IS_HW_ERR;
/* Use PHY IRQ for all but fiber based Genesis board */
- if (!(hw->chip_id == CHIP_ID_GENESIS && hw->phy_type == SK_PHY_XMAC))
+ if (!(is_genesis(hw) && hw->phy_type == SK_PHY_XMAC))
hw->intr_mask |= IS_EXT_REG;
- if (hw->chip_id == CHIP_ID_GENESIS)
+ if (is_genesis(hw))
genesis_init(hw);
else {
/* switch power to VCC (WA for VAUX problem) */
@@ -3591,7 +3606,7 @@ static int skge_reset(struct skge_hw *hw
skge_write32(hw, B0_IMSK, hw->intr_mask);
for (i = 0; i < hw->ports; i++) {
- if (hw->chip_id == CHIP_ID_GENESIS)
+ if (is_genesis(hw))
genesis_reset(hw, i);
else
yukon_reset(hw, i);
@@ -3802,9 +3817,9 @@ static struct net_device *skge_devinit(s
skge->port = port;
/* Only used for Genesis XMAC */
- setup_timer(&skge->link_timer, xm_link_timer, (unsigned long) skge);
-
- if (hw->chip_id != CHIP_ID_GENESIS) {
+ if (is_genesis(hw))
+ setup_timer(&skge->link_timer, xm_link_timer, (unsigned long) skge);
+ else {
dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG |
NETIF_F_RXCSUM;
dev->features |= dev->hw_features;
^ permalink raw reply
* [PATCH 1/4] skge: cleanup pci id table
From: Stephen Hemminger @ 2011-07-07 5:00 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
In-Reply-To: <20110707050003.998140428@vyatta.com>
[-- Attachment #1: skge-pci-id.patch --]
[-- Type: text/plain, Size: 2094 bytes --]
The PCI table was using mix of defines for device id and hard coded
hex values. This patch change it to all hex values. It also adds
comments based on the names provided in the vendor driver table.
There is NO CHANGE to the actual resulting table.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/skge.c 2011-06-08 09:08:33.000000000 -0700
+++ b/drivers/net/skge.c 2011-07-06 18:33:07.299999438 -0700
@@ -83,17 +83,16 @@ module_param(debug, int, 0);
MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
static DEFINE_PCI_DEVICE_TABLE(skge_id_table) = {
- { PCI_DEVICE(PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C940) },
- { PCI_DEVICE(PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C940B) },
- { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_GE) },
- { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_YU) },
- { PCI_DEVICE(PCI_VENDOR_ID_DLINK, PCI_DEVICE_ID_DLINK_DGE510T) },
- { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b01) }, /* DGE-530T */
- { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4320) },
- { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5005) }, /* Belkin */
- { PCI_DEVICE(PCI_VENDOR_ID_CNET, PCI_DEVICE_ID_CNET_GIGACARD) },
- { PCI_DEVICE(PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_LINKSYS_EG1064) },
- { PCI_VENDOR_ID_LINKSYS, 0x1032, PCI_ANY_ID, 0x0015 },
+ { PCI_DEVICE(PCI_VENDOR_ID_3COM, 0x1700) }, /* 3Com 3C940 */
+ { PCI_DEVICE(PCI_VENDOR_ID_3COM, 0x80EB) }, /* 3Com 3C940B */
+ { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x4320) }, /* SK-98xx V2.0 */
+ { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b01) }, /* D-Link DGE-530T (rev.B) */
+ { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4c00) }, /* D-Link DGE-530T */
+ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4320) }, /* Marvell Yukon 88E8001/8003/8010 */
+ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5005) }, /* Belkin */
+ { PCI_DEVICE(PCI_VENDOR_ID_CNET, 0x434E) }, /* CNet PowerG-2000 */
+ { PCI_DEVICE(PCI_VENDOR_ID_LINKSYS, 0x1064) }, /* Linksys EG1064 v2 */
+ { PCI_VENDOR_ID_LINKSYS, 0x1032, PCI_ANY_ID, 0x0015 }, /* Linksys EG1032 v2 */
{ 0 }
};
MODULE_DEVICE_TABLE(pci, skge_id_table);
^ permalink raw reply
* [PATCH 2/4] add pci-id for DGE-530T
From: Stephen Hemminger @ 2011-07-07 5:00 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
In-Reply-To: <20110707050003.998140428@vyatta.com>
[-- Attachment #1: skge-add-dlink.patch --]
[-- Type: text/plain, Size: 811 bytes --]
See also: https://bugzilla.kernel.org/show_bug.cgi?id=38862
Reported-by: jameshenderson@ruggedcom.com
--- a/drivers/net/skge.c 2011-07-06 19:27:02.459999149 -0700
+++ b/drivers/net/skge.c 2011-07-06 19:28:58.836000719 -0700
@@ -88,6 +88,7 @@ static DEFINE_PCI_DEVICE_TABLE(skge_id_t
{ PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x4320) }, /* SK-98xx V2.0 */
{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b01) }, /* D-Link DGE-530T (rev.B) */
{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4c00) }, /* D-Link DGE-530T */
+ { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4302) }, /* D-Link DGE-530T Rev C1 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4320) }, /* Marvell Yukon 88E8001/8003/8010 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5005) }, /* Belkin */
{ PCI_DEVICE(PCI_VENDOR_ID_CNET, 0x434E) }, /* CNet PowerG-2000 */
^ permalink raw reply
* [PATCH 4/4] skge: update version
From: Stephen Hemminger @ 2011-07-07 5:00 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
In-Reply-To: <20110707050003.998140428@vyatta.com>
[-- Attachment #1: skge-version.patch --]
[-- Type: text/plain, Size: 856 bytes --]
Update version number, and take "New" off the config information
since old sk98lin has been gone for a couple years.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/Kconfig 2011-07-06 21:58:12.139686271 -0700
+++ b/drivers/net/Kconfig 2011-07-06 21:58:30.071682326 -0700
@@ -2272,7 +2272,7 @@ config SIS190
will be called sis190. This is recommended.
config SKGE
- tristate "New SysKonnect GigaEthernet support"
+ tristate "SysKonnect GigaEthernet support"
depends on PCI
select CRC32
---help---
--- a/drivers/net/skge.c 2011-07-06 21:57:53.915690195 -0700
+++ b/drivers/net/skge.c 2011-07-06 21:58:06.675686411 -0700
@@ -50,7 +50,7 @@
#include "skge.h"
#define DRV_NAME "skge"
-#define DRV_VERSION "1.13"
+#define DRV_VERSION "1.14"
#define DEFAULT_TX_RING_SIZE 128
#define DEFAULT_RX_RING_SIZE 512
^ permalink raw reply
* Re: [Bugme-new] [Bug 38032] New: default values of /proc/sys/net/ipv4/udp_mem does not consider huge page allocation
From: Eric Dumazet @ 2011-07-07 4:38 UTC (permalink / raw)
To: starlight, David Miller
Cc: Andrew Morton, linux-mm, netdev, bugme-daemon, Rafael Aquini
In-Reply-To: <1310011173.2481.20.camel@edumazet-laptop>
Lets use following patch ?
[PATCH] net: refine {udp|tcp|sctp}_mem limits
Current tcp/udp/sctp global memory limits are not taking into account
hugepages allocations, and allow 50% of ram to be used by buffers of a
single protocol [ not counting space used by sockets / inodes ...]
Lets use nr_free_buffer_pages() and allow a default of 1/8 of kernel ram
per protocol, and a minimum of 128 pages.
Heavy duty machines sysadmins probably need to tweak limits anyway.
References: https://bugzilla.stlinux.com/show_bug.cgi?id=38032
Reported-by: starlight <starlight@binnacle.cx>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/ipv4/tcp.c | 10 ++--------
net/ipv4/udp.c | 10 ++--------
net/sctp/protocol.c | 11 +----------
3 files changed, 5 insertions(+), 26 deletions(-)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 054a59d..46febca 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3220,7 +3220,7 @@ __setup("thash_entries=", set_thash_entries);
void __init tcp_init(void)
{
struct sk_buff *skb = NULL;
- unsigned long nr_pages, limit;
+ unsigned long limit;
int i, max_share, cnt;
unsigned long jiffy = jiffies;
@@ -3277,13 +3277,7 @@ void __init tcp_init(void)
sysctl_tcp_max_orphans = cnt / 2;
sysctl_max_syn_backlog = max(128, cnt / 256);
- /* Set the pressure threshold to be a fraction of global memory that
- * is up to 1/2 at 256 MB, decreasing toward zero with the amount of
- * memory, with a floor of 128 pages.
- */
- nr_pages = totalram_pages - totalhigh_pages;
- limit = min(nr_pages, 1UL<<(28-PAGE_SHIFT)) >> (20-PAGE_SHIFT);
- limit = (limit * (nr_pages >> (20-PAGE_SHIFT))) >> (PAGE_SHIFT-11);
+ limit = nr_free_buffer_pages() / 8;
limit = max(limit, 128UL);
sysctl_tcp_mem[0] = limit / 4 * 3;
sysctl_tcp_mem[1] = limit;
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 48cd88e..198f75b 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -2209,16 +2209,10 @@ void __init udp_table_init(struct udp_table *table, const char *name)
void __init udp_init(void)
{
- unsigned long nr_pages, limit;
+ unsigned long limit;
udp_table_init(&udp_table, "UDP");
- /* Set the pressure threshold up by the same strategy of TCP. It is a
- * fraction of global memory that is up to 1/2 at 256 MB, decreasing
- * toward zero with the amount of memory, with a floor of 128 pages.
- */
- nr_pages = totalram_pages - totalhigh_pages;
- limit = min(nr_pages, 1UL<<(28-PAGE_SHIFT)) >> (20-PAGE_SHIFT);
- limit = (limit * (nr_pages >> (20-PAGE_SHIFT))) >> (PAGE_SHIFT-11);
+ limit = nr_free_buffer_pages() / 8;
limit = max(limit, 128UL);
sysctl_udp_mem[0] = limit / 4 * 3;
sysctl_udp_mem[1] = limit;
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 67380a2..207175b 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -1058,7 +1058,6 @@ SCTP_STATIC __init int sctp_init(void)
int status = -EINVAL;
unsigned long goal;
unsigned long limit;
- unsigned long nr_pages;
int max_share;
int order;
@@ -1148,15 +1147,7 @@ SCTP_STATIC __init int sctp_init(void)
/* Initialize handle used for association ids. */
idr_init(&sctp_assocs_id);
- /* Set the pressure threshold to be a fraction of global memory that
- * is up to 1/2 at 256 MB, decreasing toward zero with the amount of
- * memory, with a floor of 128 pages.
- * Note this initializes the data in sctpv6_prot too
- * Unabashedly stolen from tcp_init
- */
- nr_pages = totalram_pages - totalhigh_pages;
- limit = min(nr_pages, 1UL<<(28-PAGE_SHIFT)) >> (20-PAGE_SHIFT);
- limit = (limit * (nr_pages >> (20-PAGE_SHIFT))) >> (PAGE_SHIFT-11);
+ limit = nr_free_buffer_pages() / 8;
limit = max(limit, 128UL);
sysctl_sctp_mem[0] = limit / 4 * 3;
sysctl_sctp_mem[1] = limit;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related
* Re: [Bugme-new] [Bug 38032] New: default values of /proc/sys/net/ipv4/udp_mem does not consider huge page allocation
From: Eric Dumazet @ 2011-07-07 3:59 UTC (permalink / raw)
To: starlight; +Cc: Andrew Morton, linux-mm, netdev, bugme-daemon, Rafael Aquini
In-Reply-To: <6.2.5.6.2.20110706212254.05bff4c8@binnacle.cx>
Le mercredi 06 juillet 2011 à 21:31 -0400, starlight@binnacle.cx a
écrit :
> For anyone who may not have read the bugzilla, a
> possibly larger concern subsequently discovered is
> that actual kernel memory consumption is double the
> total of the values reported by 'netstat -nau', at
> least when mostly small packets are received and
> a RHEL 5 kernel is in use. The tunable enforces based
> on the 'netstat' value rather than the actual value
> in the RH kernel. Maybe not an issue in the
> mainline, but it took a few additional system
> hangs in the lab before we figured this out
> and divided the 'udm_mem' maximum value in half.
>
Several problems here
1) Hugepages can be setup after system boot, and udp_mem/tcp_mem not
updated accordingly.
2) Using SLUB debug or kmemcheck for instance adds lot of overhead, that
we dont take into account (it would probably be expensive to do so).
Even ksize(ptr) is not able to really report memory usage of an object.
3) What happens if both tcp and udp sockets are in use on the system,
shouls we half both udp_mem and tcp_mem just in case ?
Now if you also use SCTP sockets, UDP-Lite sockets, lot of file
mappings, huge pages, conntracking, posix timers (currently not
limited), threads, ..., what happens ? Should we then set udp_mem to 1%
of current limit just in case ?
What about fixing the real problem instead ?
When you say the system freezes, is it in the UDP stack, or elsewhere ?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* [PATCH net-next] net: fix warning of versioncheck
From: Shan Wei @ 2011-07-07 3:08 UTC (permalink / raw)
To: David Miller, netdev, eilong, sjur.brandeland
net-next-2.6/drivers/net/bnx2x/bnx2x_sp.c: 19 linux/version.h not needed.
net-next-2.6/drivers/net/caif/caif_hsi.c: 9 linux/version.h not needed.
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
drivers/net/bnx2x/bnx2x_sp.c | 1 -
drivers/net/caif/caif_hsi.c | 1 -
2 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x_sp.c b/drivers/net/bnx2x/bnx2x_sp.c
index 5bdf094..f6322a1 100644
--- a/drivers/net/bnx2x/bnx2x_sp.c
+++ b/drivers/net/bnx2x/bnx2x_sp.c
@@ -16,7 +16,6 @@
* Written by: Vladislav Zolotarov
*
*/
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/crc32.h>
#include <linux/netdevice.h>
diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
index 016108a..b41c2fc 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
@@ -6,7 +6,6 @@
* License terms: GNU General Public License (GPL) version 2.
*/
-#include <linux/version.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/device.h>
--
1.7.4.1
^ permalink raw reply related
* RE: [Pv-drivers] [PATCH] vmxnet3: round down # of queues to power of two
From: Yong Wang @ 2011-07-07 1:53 UTC (permalink / raw)
To: Dmitry Torokhov, pv-drivers@vmware.com
Cc: Shreyas Bhatewara, netdev@vger.kernel.org
In-Reply-To: <201107061808.39918.dtor@vmware.com>
I just want to point out that rounddown_pow_of_two() returns 0 when (1) the input is 1; and (2) the __buildin_constant_p(n) path is taken. In the vmxnet3 case, even if num_rx_queues is 1, we are safe as its value is not known to be constant at compile time and 1 will be returned by taking the other path (1UL << (fls_long(n) - 1)). The original check of power_of_two is there just to be on the safe side.
Related to this, I wonder if we should always return 1 when the input is 1 (1 is also a power of two as 2^0). I don't have the history of this API though and curious if there are any users of this API that depend on this behavior?
Thanks,
Yong
> -----Original Message-----
> From: Dmitry Torokhov [mailto:dtor@vmware.com]
> Sent: Wednesday, July 06, 2011 6:09 PM
> To: pv-drivers@vmware.com
> Cc: Shreyas Bhatewara; netdev@vger.kernel.org; Yong Wang
> Subject: Re: [Pv-drivers] [PATCH] vmxnet3: round down # of queues to power of
> two
>
> On Wednesday, July 06, 2011 05:58:51 PM Shreyas Bhatewara wrote:
>
> >
> > + if (!is_power_of_2(num_rx_queues))
> > + num_rx_queues = rounddown_pow_of_two(num_rx_queues);
> > +
>
> No need to do the check, just do:
>
> num_rx_queues = rounddown_pow_of_two(num_rx_queues);
>
> Thanks,
> Dmitry
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox