* Re: [PATCH 2/2] ksz884x: fix Endian
From: Joe Perches @ 2012-07-09 5:44 UTC (permalink / raw)
To: RongQing Li; +Cc: Ben Hutchings, netdev, Tristram.Ha
In-Reply-To: <CAJFZqHzm7=-PpsiNZJ9TgkDY2bt5WW7XwY6nBOa_E4eerRh1pg@mail.gmail.com>
On Mon, 2012-07-09 at 13:26 +0800, RongQing Li wrote:
> 2012/7/7, Ben Hutchings <bhutchings@solarflare.com>:
> > On Thu, 2012-07-05 at 10:06 +0800, roy.qing.li@gmail.com wrote:
> >> ETH_P_IP is host Endian, skb->protocol is big Endian, when
> >> compare them, we should change skb->protocol from big endian
> >> to host endian, ntohs, not htons.
[]
> >> diff --git a/drivers/net/ethernet/micrel/ksz884x.c
[]
> >> @@ -4882,7 +4882,7 @@ static netdev_tx_t netdev_tx(struct sk_buff *skb,
> >> struct net_device *dev)
> >> if (left) {
> >> if (left < num ||
> >> ((CHECKSUM_PARTIAL == skb->ip_summed) &&
> >> - (ETH_P_IPV6 == htons(skb->protocol)))) {
> >> + (ETH_P_IPV6 == ntohs(skb->protocol)))) {
> >
> > This should really be changed to the idiomatic 'skb->protocol ==
> > htons(ETH_P_IPV6)'. For the current code, the compiler will probably
> > generate a run-time byte-swap for little-endian systems.
True. Perhaps this would be better written as:
if (left) {
if (left < num ||
(ip->ip_summed == CHECKSUM_PARTIAL &&
skb->protocol == htons(ETH_P_IPV6))) {
etc...
^ permalink raw reply
* [PATCH] netns: correctly use per-netns ipv4 sysctl_tcp_mem
From: Huang Qiang @ 2012-07-09 6:05 UTC (permalink / raw)
To: davem, glommer; +Cc: netdev, containers, yangzhenzhang
From: Yang Zhenzhang <yangzhenzhang@huawei.com>
Now, kernel allows each net namespace to independently set up its levels
for tcp memory pressure thresholds.
But it seems there is a bug, as using the following steps:
[root@host socket]# lxc-start -n test -f config /bin/bash
[root@net-test socket]# ip route add default via 192.168.58.2
[root@net-test socket]# echo 0 0 0 > /proc/sys/net/ipv4/tcp_mem
[root@net-test socket]# scp root@192.168.58.174:/home/tcp_mem_test .
and it still can transport the "tcp_mem_test" file which we hope it
would not.
It's because inet_init() (net/ipv4/af_inet.c)initialize the
tcp_prot.sysctl_mem:
tcp_prot.sysctl_mem = init_net.ipv4.sysctl_tcp_mem;
So when the protocal is TCP, sk->sk_prot->sysctl_mem(following code)
always use the ipv4 sysctl_tcp_mem of init_net namespace rather than
it's own net namespace.
This patch simply set "prot" equal to net->ipv4.sysctl_tcp_mem when
the protocol type is TCP.
Signed-off-by: Yang Zhenzhang <yangzhenzhang@huawei.com>
---
include/net/sock.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/include/net/sock.h b/include/net/sock.h
index 4a45216..b62a8d9 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -59,6 +59,7 @@
#include <linux/static_key.h>
#include <linux/aio.h>
#include <linux/sched.h>
+#include <linux/in.h>
#include <linux/filter.h>
#include <linux/rculist_nulls.h>
@@ -1062,7 +1063,12 @@ static inline void sk_enter_memory_pressure(struct sock *sk)
static inline long sk_prot_mem_limits(const struct sock *sk, int index)
{
+ struct net *net = sock_net(sk);
long *prot = sk->sk_prot->sysctl_mem;
+
+ if (sk->protocol == IPPROTO_TCP)
+ prot = net->ipv4.sysctl_tcp_mem;
+
if (mem_cgroup_sockets_enabled && sk->sk_cgrp)
prot = sk->sk_cgrp->sysctl_mem;
return prot[index];
--
1.7.1
^ permalink raw reply related
* Re: [net-next PATCH 02/02] net/ipv4: VTI support new module for ip_vti.
From: David Miller @ 2012-07-09 6:47 UTC (permalink / raw)
To: saurabh.mohan; +Cc: netdev
In-Reply-To: <20120629013017.GA4649@debian-saurabh-64.vyatta.com>
From: Saurabh <saurabh.mohan@vyatta.com>
Date: Thu, 28 Jun 2012 18:30:17 -0700
> +#define HASH_SIZE 16
> +#define HASH(addr) (((__force u32)addr^((__force u32)addr>>4))&0xF)
Define HASH such that it masks with (HASH_SIZE - 1) instead of
0xf, so that if HASH_SIZE is changed everything automatically
still works without having to remember to update the value in
HASH()'s definition too.
> + if (skb->protocol != htons(ETH_P_IP))
> + goto tx_error;
We are really past the point where we can add major inet protocol
features without supporting ipv6 as well.
> + if (IS_ERR(rt)) {
> + dev->stats.tx_carrier_errors++;
> + goto tx_error_icmp;
> + }
> +#ifdef CONFIG_XFRM
> + /* if there is no transform then this tunnel is not functional.
> + * Or if the xfrm is not mode tunnel.
> + */
> + if (!rt->dst.xfrm ||
> + rt->dst.xfrm->props.mode != XFRM_MODE_TUNNEL) {
> + stats->tx_carrier_errors++;
> + goto tx_error_icmp;
> + }
> +#endif
This code in the CONFIG_XFRM block is not indented properly.
And this is a pointless CONFIG_* check, you can't even register
this tunnel outside of the XFRM code. In fact the code already
depends upon INET_XFRM_MODE_TUNNEL which therefore automatically
means that CONFIG_XFRM must be set for this code.
> + }
> +
> +
> + if (tunnel->err_count > 0) {
Get rid of these extra blank lines.
> + }
> +
> +
> + IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED |
Again.
The reason there are long periods of time between my attempts to
review your code (and probably the reason I'm the only person still
reviewing your work at all) is that I know there are going to be so
many problems to let you know about. It's really painful to review
your work and I've spent so much time on the coding style and the
simpler issues that I really haven't considered the high level issues
of what your code is trying to do.
^ permalink raw reply
* Re: [PATCH net-next 1/2] r8169: support RTL8106E
From: David Miller @ 2012-07-09 6:48 UTC (permalink / raw)
To: hayeswang; +Cc: romieu, netdev, linux-kernel, hayes
In-Reply-To: <1340966060-2749-1-git-send-email-hayeswang@realtek.com>
Francois, what would you like me to do with these two patches? I
haven't seen full ACKs from you yet.
Thanks.
^ permalink raw reply
* Re: [PATCH v3] ieee802154: verify packet size before trying to allocate it
From: David Miller @ 2012-07-09 6:50 UTC (permalink / raw)
To: levinsasha928
Cc: dbaryshkov, slapin, linux-zigbee-devel, netdev, linux-kernel
In-Reply-To: <1341228595-9883-1-git-send-email-levinsasha928@gmail.com>
From: Sasha Levin <levinsasha928@gmail.com>
Date: Mon, 2 Jul 2012 13:29:55 +0200
> Currently when sending data over datagram, the send function will attempt to
> allocate any size passed on from the userspace.
>
> We should make sure that this size is checked and limited. We'll limit it
> to the MTU of the device, which is checked later anyway.
>
> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Applied.
^ permalink raw reply
* Re: [patch] [SCSI] bnx2i: use strlcpy() instead of memcpy() for strings
From: David Miller @ 2012-07-09 6:51 UTC (permalink / raw)
To: mchan
Cc: dan.carpenter, David.Laight, JBottomley, barak, eddie.wai,
linux-scsi, netdev
In-Reply-To: <1341242018.7472.5.camel@LTIRV-MCHAN1.corp.ad.broadcom.com>
From: "Michael Chan" <mchan@broadcom.com>
Date: Mon, 2 Jul 2012 08:13:38 -0700
> This came from the net-next tree, so David is the right persion to apply
> this. Thanks.
>
> Acked-by: Michael Chan <mchan@broadcom.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] net: dont use __netdev_alloc_skb for bounce buffer
From: David Miller @ 2012-07-09 6:52 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, stefan.bader
In-Reply-To: <1341254172.22621.456.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 02 Jul 2012 20:36:12 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> commit a1c7fff7e1 (net: netdev_alloc_skb() use build_skb()) broke b44 on
> some 64bit machines.
>
> It appears b44 and b43 use __netdev_alloc_skb() instead of alloc_skb()
> for their bounce buffers.
>
> There is no need to add an extra NET_SKB_PAD reservation for bounce
> buffers :
>
> - In TX path, NET_SKB_PAD is useless
>
> - In RX path in b44, we force a copy of incoming frames if
> GFP_DMA allocations were needed.
>
> Reported-and-bisected-by: Stefan Bader <stefan.bader@canonical.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied, thanks Eric.
^ permalink raw reply
* Re: [PATCH] sctp: refactor sctp_packet_append_chunk and clenup some memory leaks
From: David Miller @ 2012-07-09 6:54 UTC (permalink / raw)
To: vyasevich; +Cc: nhorman, netdev, linux-sctp
In-Reply-To: <4FF30428.6070403@gmail.com>
From: Vlad Yasevich <vyasevich@gmail.com>
Date: Tue, 03 Jul 2012 10:39:36 -0400
> On 07/02/2012 03:59 PM, Neil Horman wrote:
>> While doing some recent work on sctp sack bundling I noted that
>> sctp_packet_append_chunk was pretty inefficient. Specifially, it was
>> called
>> recursively while trying to bundle auth and sack chunks. Because of
>> that we
>> call sctp_packet_bundle_sack and sctp_packet_bundle_auth a total of 4
>> times for
>> every call to sctp_packet_append_chunk, knowing that at least 3 of
>> those calls
>> will do nothing.
>>
>> So lets refactor sctp_packet_bundle_auth to have an outer part that
>> does the
>> attempted bundling, and an inner part that just does the chunk
>> appends. This
>> saves us several calls per iteration that we just don't need.
>>
>> Also, noticed that the auth and sack bundling fail to free the chunks
>> they
>> allocate if the append fails, so make sure we add that in
>>
>> Signed-off-by: Neil Horman<nhorman@tuxdriver.com>
>> CC: Vlad Yasevich<vyasevich@gmail.com>
>
> Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCH] etherdevice: introduce broadcast_ether_addr
From: David Miller @ 2012-07-09 6:58 UTC (permalink / raw)
To: johannes-cdvu00un1VgdHxzADdlk8Q
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-wireless-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1341310587.5131.2.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org>
From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
Date: Tue, 03 Jul 2012 12:16:27 +0200
> From: Johannes Berg <johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> A lot of code has either the memset or an
> inefficient copy from a static array that
> contains the all-ones broadcast address.
> Introduce broadcast_ether_addr() to fill
> an address with all ones, making the code
> clearer and allowing us to get rid of the
> various constant arrays.
>
> Signed-off-by: Johannes Berg <johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
I would prefer if this were named "eth_something()", thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] net/fsl_pq_mdio: use spin_event_timeout() to poll the indicator register
From: David Miller @ 2012-07-09 6:59 UTC (permalink / raw)
To: timur; +Cc: afleming, netdev
In-Reply-To: <1341357381-10861-1-git-send-email-timur@freescale.com>
From: Timur Tabi <timur@freescale.com>
Date: Tue, 3 Jul 2012 18:16:21 -0500
> Macro spin_event_timeout() was designed for simple polling of hardware
> registers with a timeout, so use it when we poll the MIIMIND register.
> This allows us to return an error code instead of polling indefinitely.
>
> Note that PHY_INIT_TIMEOUT is a count of loop iterations, so we can't use
> it for spin_event_timeout(), which asks for microseconds.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
Define a macro for the timeout value rather than use an arbitrary
constant.
> + status = spin_event_timeout(!(in_be32(®s->miimind) & MIIMIND_BUSY),
> + 1000, 0);
This indentation is absolutely terrible.
> + status = spin_event_timeout(!(in_be32(®s->miimind) &
> + (MIIMIND_NOTVALID | MIIMIND_BUSY)), 1000, 0);
Same here.
> + status = spin_event_timeout(!(in_be32(®s->miimind) & MIIMIND_BUSY),
> + 1000, 0);
And here too.
^ permalink raw reply
* Re: [PATCH 1/1] atl1c: fix issue of transmit queue 0 timed out
From: David Miller @ 2012-07-09 7:00 UTC (permalink / raw)
To: cjren; +Cc: netdev, linux-kernel, qca-linux-team, nic-devel
In-Reply-To: <1341370308-23233-1-git-send-email-cjren@qca.qualcomm.com>
From: <cjren@qca.qualcomm.com>
Date: Wed, 4 Jul 2012 10:51:48 +0800
> some people report atl1c could cause system hang with following
> kernel trace info:
> ---------------------------------------
> WARNING: at.../net/sched/sch_generic.c:258 dev_watchdog+0x1db/0x1d0()
> ...
> NETDEV WATCHDOG: eth0 (atl1c): transmit queue 0 timed out
> ...
> ---------------------------------------
> This is caused by netif_stop_queue calling when cable Link is down.
> So remove netif_stop_queue, because link_watch will take it over.
>
> Signed-off-by: xiong <xiong@qca.qualcomm.com>
> Cc: stable <stable@vger.kernel.org>
> Signed-off-by: Cloud Ren <cjren@qca.qualcomm.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] netem: add limitation to reordered packets
From: David Miller @ 2012-07-09 7:02 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, hagen, msg, aterzis, ycheng
In-Reply-To: <1341384921.2583.1462.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 04 Jul 2012 08:55:21 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> Fix two netem bugs :
>
> 1) When a frame was dropped by tfifo_enqueue(), drop counter
> was incremented twice.
>
> 2) When reordering is triggered, we enqueue a packet without
> checking queue limit. This can OOM pretty fast when this
> is repeated enough, since skbs are orphaned, no socket limit
> can help in this situation.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied, thanks Eric.
^ permalink raw reply
* Re: [PATCH] net/macb: manage carrier state with call to netif_carrier_{on|off}()
From: David Miller @ 2012-07-09 7:03 UTC (permalink / raw)
To: nicolas.ferre
Cc: netdev, bhutchings, Arvid.Brodin, kuznet, shemminger,
linux-arm-kernel
In-Reply-To: <1341393253-6531-1-git-send-email-nicolas.ferre@atmel.com>
From: Nicolas Ferre <nicolas.ferre@atmel.com>
Date: Wed, 4 Jul 2012 11:14:13 +0200
> OFF carrier state is setup in probe() open() and suspend() functions.
> The carrier ON state is managed in macb_handle_link_change().
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCH 0/2] [net-next] Marvell sky2 updates
From: David Miller @ 2012-07-09 7:06 UTC (permalink / raw)
To: mlindner; +Cc: shemminger, netdev
In-Reply-To: <1341394709.14972.39.camel@mlindner-lin.skd.de>
Applied, but you must put a "sky2: " prefix in the subject lines
of future patches.
Otherwise someone scanning the commit log summary has no idea what
driver your changes are for.
^ permalink raw reply
* Re: [RFC PATCH] tcp: limit data skbs in qdisc layer
From: David Miller @ 2012-07-09 7:08 UTC (permalink / raw)
To: eric.dumazet
Cc: ycheng, dave.taht, netdev, codel, therbert, mattmathis, nanditad,
ncardwell, andrewmcgr
In-Reply-To: <1341396687.2583.1757.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 04 Jul 2012 12:11:27 +0200
> sk->sk_wmem_alloc not allowed to grow above a given limit,
> allowing no more than ~4 segments [1] per tcp socket in qdisc layer at a
> given time. (if TSO is enabled, then a single TSO packet hits the limit)
I'm suspicious and anticipate that 10G will need more queueing than
you are able to get away with tg3 at 1G speeds. But it is an exciting
idea nonetheless :-)
^ permalink raw reply
* Re: [PATCH] bcm87xx: disable autonegotiation by default
From: David Miller @ 2012-07-09 7:09 UTC (permalink / raw)
To: jacmet; +Cc: netdev, david.daney
In-Reply-To: <1341398037-7591-1-git-send-email-jacmet@sunsite.dk>
From: Peter Korsgaard <jacmet@sunsite.dk>
Date: Wed, 4 Jul 2012 12:33:57 +0200
> The bcm87xx phys don't support autonegotiation, so don't use it by
> default, as otherwise phy_state_machine() will try to enable it (using
> c22 requests, which also don't make any sense for the bcm78xx).
>
> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Applied to net-next, thanks.
^ permalink raw reply
* Re: [net] ixgbe: DCB and SR-IOV can not co-exist and will cause hangs
From: David Miller @ 2012-07-09 7:10 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: alexander.h.duyck, netdev, gospo, sassmann
In-Reply-To: <1341403225-1326-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 4 Jul 2012 05:00:25 -0700
> From: Alexander Duyck <alexander.h.duyck@intel.com>
>
> DCB and SR-IOV cannot currently be enabled at the same time as the queueing
> schemes are incompatible. If they are both enabled it will result in Tx
> hangs since only the first Tx queue will be able to transmit any traffic.
>
> This simple fix for this is to block us from enabling TCs in ixgbe_setup_tc
> if SR-IOV is enabled. This change will be reverted once we can support
> SR-IOV and DCB coexistence.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Acked-by: John Fastabend <john.r.fastabend@intel.com>
> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
> Tested-by: Ross Brattain <ross.b.brattain@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] phylib: Support registering a bunch of drivers
From: David Miller @ 2012-07-09 7:11 UTC (permalink / raw)
To: chohnstaedt; +Cc: netdev
In-Reply-To: <20120704154434.GZ19422@elara.bln.innominate.local>
From: Christian Hohnstaedt <chohnstaedt@innominate.com>
Date: Wed, 4 Jul 2012 17:44:34 +0200
> If registering of one of them fails, all already registered drivers
> of this module will be unregistered.
>
> Use the new register/unregister functions in all drivers
> registering more than one driver.
>
> amd.c, realtek.c: Simplify: directly return registration result.
>
> Tested with broadcom.c
> All others compile-tested.
>
> Signed-off-by: Christian Hohnstaedt <chohnstaedt@innominate.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] bcm87xx: fix reg-init comment typo
From: David Miller @ 2012-07-09 7:12 UTC (permalink / raw)
To: ddaney.cavm; +Cc: jacmet, netdev, david.daney
In-Reply-To: <4FF47BDE.3010002@gmail.com>
From: David Daney <ddaney.cavm@gmail.com>
Date: Wed, 04 Jul 2012 10:22:38 -0700
> On 07/04/2012 08:05 AM, Peter Korsgaard wrote:
>> broadcom, not marvell.
>>
>> Signed-off-by: Peter Korsgaard<jacmet@sunsite.dk>
>
> Indeed, it was a cut-and-paste error. Thanks for fixing it...
>
> Acked-by: David Daney <david.daney@cavium.com>
Applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCH] netdev/phy: Fixup lockdep warnings in mdio-mux.c
From: David Miller @ 2012-07-09 7:13 UTC (permalink / raw)
To: ddaney.cavm; +Cc: netdev, linux-kernel, david.daney
In-Reply-To: <1341439576-1413-1-git-send-email-ddaney.cavm@gmail.com>
From: David Daney <ddaney.cavm@gmail.com>
Date: Wed, 4 Jul 2012 15:06:16 -0700
> From: David Daney <david.daney@cavium.com>
>
> With lockdep enabled we get:
...
> This is a false positive, since we are indeed using 'nested' locking,
> we need to use mutex_lock_nested().
>
> Now in theory we can stack multiple MDIO multiplexers, but that would
> require passing the nesting level (which is difficult to know) to
> mutex_lock_nested(). Instead we assume the simple case of a single
> level of nesting. Since these are only warning messages, it isn't so
> important to solve the general case.
>
> Signed-off-by: David Daney <david.daney@cavium.com>
Applied to 'net', thanks.
^ permalink raw reply
* [PATCH 0/2] stmmac: nfs reboot crash & jumbo frame handling fix
From: Deepak Sikri @ 2012-07-09 7:14 UTC (permalink / raw)
To: peppe.cavallaro; +Cc: spear--sw-devel, netdev, Deepak Sikri
This patch set handles in the fixes for following bugs that were
observed during testing.
1. On Multiple reboot operations using nfs, system crash were observed
with inconsistency in status of dma descriptors.
2. There were data losses observed whenever the jumbo frames were used
for data transfers.
Deepak Sikri (2):
stmmac: Fix for nfs hang on multiple reboot
stmmac: Fix for higher mtu size handling
drivers/net/ethernet/stmicro/stmmac/ring_mode.c | 3 ++-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
2 files changed, 5 insertions(+), 1 deletions(-)
--
1.7.2.2
^ permalink raw reply
* [PATCH 1/2] stmmac: Fix for nfs hang on multiple reboot
From: Deepak Sikri @ 2012-07-09 7:14 UTC (permalink / raw)
To: peppe.cavallaro; +Cc: spear--sw-devel, netdev, Deepak Sikri
In-Reply-To: <1341818086-28897-1-git-send-email-deepak.sikri@st.com>
It was observed that during multiple reboots nfs hangs. The status of
receive descriptors shows that all the descriptors were in control of
CPU, and none were assigned to DMA.
Also the DMA status register confirmed that the Rx buffer is
unavailable.
This patch adds the fix for the same by adding the memory barriers to
ascertain that the all instructions before enabling the Rx or Tx DMA are
completed which involves the proper setting of the ownership bit in DMA
descriptors.
Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 51b3b68..ea3003e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1212,6 +1212,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
priv->hw->desc->prepare_tx_desc(desc, 0, len, csum_insertion);
wmb();
priv->hw->desc->set_tx_owner(desc);
+ wmb();
}
/* Interrupt on completition only for the latest segment */
@@ -1227,6 +1228,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
/* To avoid raise condition */
priv->hw->desc->set_tx_owner(first);
+ wmb();
priv->cur_tx++;
@@ -1290,6 +1292,7 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv)
}
wmb();
priv->hw->desc->set_rx_owner(p + entry);
+ wmb();
}
}
--
1.7.2.2
^ permalink raw reply related
* Re: [PATCH 1/2] be2net: Fix Endian
From: David Miller @ 2012-07-09 7:14 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev, somnath.kotur
In-Reply-To: <1341453942-4198-1-git-send-email-roy.qing.li@gmail.com>
From: roy.qing.li@gmail.com
Date: Thu, 5 Jul 2012 10:05:42 +0800
> From: Li RongQing <roy.qing.li@gmail.com>
>
> ETH_P_IP is host Endian, skb->protocol is big Endian, when
> compare them, we should change ETH_P_IP from host endian
> to big endian, htons, not ntohs.
>
> CC: Somnath Kotur <somnath.kotur@emulex.com>
> Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Applied to net-next since this actually doesn't cause any real
problems winc htons() and ntohs() are implemented identically
and perform the same operation.
Thanks.
^ permalink raw reply
* [PATCH 2/2] stmmac: Fix for higher mtu size handling
From: Deepak Sikri @ 2012-07-09 7:14 UTC (permalink / raw)
To: peppe.cavallaro; +Cc: spear--sw-devel, netdev, Deepak Sikri
In-Reply-To: <1341818086-28897-2-git-send-email-deepak.sikri@st.com>
For the higher mtu sizes requiring the buffer size greater than 8192,
the buffers are sent or received using multiple dma descriptors/ same
descriptor with option of multi buffer handling.
It was observed during tests that the driver was missing on data
packets during the normal ping operations if the data buffers being used
catered to jumbo frame handling.
The memory barrriers are added in between preparation of dma descriptors
in the jumbo frame handling path to ensure all instructions before
enabling the dma are complete.
Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
---
drivers/net/ethernet/stmicro/stmmac/ring_mode.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/ring_mode.c b/drivers/net/ethernet/stmicro/stmmac/ring_mode.c
index fb8377d..4b785e1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/ring_mode.c
+++ b/drivers/net/ethernet/stmicro/stmmac/ring_mode.c
@@ -51,7 +51,7 @@ static unsigned int stmmac_jumbo_frm(void *p, struct sk_buff *skb, int csum)
desc->des3 = desc->des2 + BUF_SIZE_4KiB;
priv->hw->desc->prepare_tx_desc(desc, 1, bmax,
csum);
-
+ wmb();
entry = (++priv->cur_tx) % txsize;
desc = priv->dma_tx + entry;
@@ -59,6 +59,7 @@ static unsigned int stmmac_jumbo_frm(void *p, struct sk_buff *skb, int csum)
len, DMA_TO_DEVICE);
desc->des3 = desc->des2 + BUF_SIZE_4KiB;
priv->hw->desc->prepare_tx_desc(desc, 0, len, csum);
+ wmb();
priv->hw->desc->set_tx_owner(desc);
priv->tx_skbuff[entry] = NULL;
} else {
--
1.7.2.2
^ permalink raw reply related
* Re: [patch] [AX.25]: small cleanup in ax25_addr_parse()
From: David Miller @ 2012-07-09 7:16 UTC (permalink / raw)
To: dan.carpenter; +Cc: ralf, linux-hams, netdev, kernel-janitors
In-Reply-To: <20120705082718.GA14993@elgon.mountain>
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 5 Jul 2012 11:27:18 +0300
> The comments were wrong here because "AX25_MAX_DIGIS" is 8 but the
> comments say 6. Also I've changed the "7" to "AX25_ADDR_LEN".
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, thanks Dan.
^ 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