* Re: [PATCH 54/62] rds: remove the second argument of k[un]map_atomic()
From: David Miller @ 2011-11-27 6:13 UTC (permalink / raw)
To: amwang; +Cc: linux-kernel, akpm, venkat.x.venkatsubra, rds-devel, netdev
In-Reply-To: <1322371662-26166-55-git-send-email-amwang@redhat.com>
From: Cong Wang <amwang@redhat.com>
Date: Sun, 27 Nov 2011 13:27:34 +0800
> Signed-off-by: Cong Wang <amwang@redhat.com>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply
* Re: [PATCH 53/62] net: remove the second argument of k[un]map_atomic()
From: David Miller @ 2011-11-27 6:12 UTC (permalink / raw)
To: amwang; +Cc: linux-kernel, akpm, ian.campbell, netdev
In-Reply-To: <1322371662-26166-54-git-send-email-amwang@redhat.com>
From: Cong Wang <amwang@redhat.com>
Date: Sun, 27 Nov 2011 13:27:33 +0800
> Signed-off-by: Cong Wang <amwang@redhat.com>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply
* Re: [PATCH 21/62] net: remove the second argument of k[un]map_atomic()
From: David Miller @ 2011-11-27 6:12 UTC (permalink / raw)
To: amwang
Cc: ian.campbell, jpirko, e1000-devel, dnelson, bruce.w.allan,
jesse.brandeburg, linux-kernel, john.ronciak, netdev, akpm
In-Reply-To: <1322371662-26166-22-git-send-email-amwang@redhat.com>
From: Cong Wang <amwang@redhat.com>
Date: Sun, 27 Nov 2011 13:27:01 +0800
> Signed-off-by: Cong Wang <amwang@redhat.com>
Acked-by: David S. Miller <davem@davemloft.net>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply
* [PATCH 54/62] rds: remove the second argument of k[un]map_atomic()
From: Cong Wang @ 2011-11-27 5:27 UTC (permalink / raw)
To: linux-kernel
Cc: akpm, Cong Wang, Venkat Venkatsubra, David S. Miller, rds-devel,
netdev
In-Reply-To: <1322371662-26166-1-git-send-email-amwang@redhat.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
net/rds/ib_recv.c | 7 +++----
net/rds/info.c | 6 +++---
net/rds/iw_recv.c | 7 +++----
net/rds/loop.c | 2 +-
net/rds/rds.h | 2 +-
net/rds/recv.c | 2 +-
net/rds/tcp_recv.c | 11 ++++-------
7 files changed, 16 insertions(+), 21 deletions(-)
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index e29e0ca..744a00d 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -763,7 +763,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn,
to_copy = min(RDS_FRAG_SIZE - frag_off, PAGE_SIZE - map_off);
BUG_ON(to_copy & 7); /* Must be 64bit aligned. */
- addr = kmap_atomic(sg_page(&frag->f_sg), KM_SOFTIRQ0);
+ addr = kmap_atomic(sg_page(&frag->f_sg));
src = addr + frag_off;
dst = (void *)map->m_page_addrs[map_page] + map_off;
@@ -773,7 +773,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn,
uncongested |= ~(*src) & *dst;
*dst++ = *src++;
}
- kunmap_atomic(addr, KM_SOFTIRQ0);
+ kunmap_atomic(addr);
copied += to_copy;
@@ -919,8 +919,7 @@ static void rds_ib_process_recv(struct rds_connection *conn,
rds_ib_cong_recv(conn, ibinc);
else {
rds_recv_incoming(conn, conn->c_faddr, conn->c_laddr,
- &ibinc->ii_inc, GFP_ATOMIC,
- KM_SOFTIRQ0);
+ &ibinc->ii_inc, GFP_ATOMIC);
state->ack_next = be64_to_cpu(hdr->h_sequence);
state->ack_next_valid = 1;
}
diff --git a/net/rds/info.c b/net/rds/info.c
index f1c016c..9a6b4f6 100644
--- a/net/rds/info.c
+++ b/net/rds/info.c
@@ -104,7 +104,7 @@ EXPORT_SYMBOL_GPL(rds_info_deregister_func);
void rds_info_iter_unmap(struct rds_info_iterator *iter)
{
if (iter->addr) {
- kunmap_atomic(iter->addr, KM_USER0);
+ kunmap_atomic(iter->addr);
iter->addr = NULL;
}
}
@@ -119,7 +119,7 @@ void rds_info_copy(struct rds_info_iterator *iter, void *data,
while (bytes) {
if (!iter->addr)
- iter->addr = kmap_atomic(*iter->pages, KM_USER0);
+ iter->addr = kmap_atomic(*iter->pages);
this = min(bytes, PAGE_SIZE - iter->offset);
@@ -134,7 +134,7 @@ void rds_info_copy(struct rds_info_iterator *iter, void *data,
iter->offset += this;
if (iter->offset == PAGE_SIZE) {
- kunmap_atomic(iter->addr, KM_USER0);
+ kunmap_atomic(iter->addr);
iter->addr = NULL;
iter->offset = 0;
iter->pages++;
diff --git a/net/rds/iw_recv.c b/net/rds/iw_recv.c
index 5e57347..0bd9b5e 100644
--- a/net/rds/iw_recv.c
+++ b/net/rds/iw_recv.c
@@ -598,7 +598,7 @@ static void rds_iw_cong_recv(struct rds_connection *conn,
to_copy = min(RDS_FRAG_SIZE - frag_off, PAGE_SIZE - map_off);
BUG_ON(to_copy & 7); /* Must be 64bit aligned. */
- addr = kmap_atomic(frag->f_page, KM_SOFTIRQ0);
+ addr = kmap_atomic(frag->f_page);
src = addr + frag_off;
dst = (void *)map->m_page_addrs[map_page] + map_off;
@@ -608,7 +608,7 @@ static void rds_iw_cong_recv(struct rds_connection *conn,
uncongested |= ~(*src) & *dst;
*dst++ = *src++;
}
- kunmap_atomic(addr, KM_SOFTIRQ0);
+ kunmap_atomic(addr);
copied += to_copy;
@@ -754,8 +754,7 @@ static void rds_iw_process_recv(struct rds_connection *conn,
rds_iw_cong_recv(conn, iwinc);
else {
rds_recv_incoming(conn, conn->c_faddr, conn->c_laddr,
- &iwinc->ii_inc, GFP_ATOMIC,
- KM_SOFTIRQ0);
+ &iwinc->ii_inc, GFP_ATOMIC);
state->ack_next = be64_to_cpu(hdr->h_sequence);
state->ack_next_valid = 1;
}
diff --git a/net/rds/loop.c b/net/rds/loop.c
index bca6761..87ff2a8 100644
--- a/net/rds/loop.c
+++ b/net/rds/loop.c
@@ -79,7 +79,7 @@ static int rds_loop_xmit(struct rds_connection *conn, struct rds_message *rm,
rds_message_addref(rm);
rds_recv_incoming(conn, conn->c_laddr, conn->c_faddr, &rm->m_inc,
- GFP_KERNEL, KM_USER0);
+ GFP_KERNEL);
rds_send_drop_acked(conn, be64_to_cpu(rm->m_inc.i_hdr.h_sequence),
NULL);
diff --git a/net/rds/rds.h b/net/rds/rds.h
index 7eaba18..ec1d731 100644
--- a/net/rds/rds.h
+++ b/net/rds/rds.h
@@ -704,7 +704,7 @@ void rds_inc_init(struct rds_incoming *inc, struct rds_connection *conn,
__be32 saddr);
void rds_inc_put(struct rds_incoming *inc);
void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr,
- struct rds_incoming *inc, gfp_t gfp, enum km_type km);
+ struct rds_incoming *inc, gfp_t gfp);
int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
size_t size, int msg_flags);
void rds_clear_recv_queue(struct rds_sock *rs);
diff --git a/net/rds/recv.c b/net/rds/recv.c
index bc3f8cd..5c6e9f1 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -155,7 +155,7 @@ static void rds_recv_incoming_exthdrs(struct rds_incoming *inc, struct rds_sock
* tell us which roles the addrs in the conn are playing for this message.
*/
void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr,
- struct rds_incoming *inc, gfp_t gfp, enum km_type km)
+ struct rds_incoming *inc, gfp_t gfp)
{
struct rds_sock *rs = NULL;
struct sock *sk;
diff --git a/net/rds/tcp_recv.c b/net/rds/tcp_recv.c
index 78205e2..6243258 100644
--- a/net/rds/tcp_recv.c
+++ b/net/rds/tcp_recv.c
@@ -169,7 +169,6 @@ static void rds_tcp_cong_recv(struct rds_connection *conn,
struct rds_tcp_desc_arg {
struct rds_connection *conn;
gfp_t gfp;
- enum km_type km;
};
static int rds_tcp_data_recv(read_descriptor_t *desc, struct sk_buff *skb,
@@ -255,7 +254,7 @@ static int rds_tcp_data_recv(read_descriptor_t *desc, struct sk_buff *skb,
else
rds_recv_incoming(conn, conn->c_faddr,
conn->c_laddr, &tinc->ti_inc,
- arg->gfp, arg->km);
+ arg->gfp);
tc->t_tinc_hdr_rem = sizeof(struct rds_header);
tc->t_tinc_data_rem = 0;
@@ -272,8 +271,7 @@ out:
}
/* the caller has to hold the sock lock */
-static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp,
- enum km_type km)
+static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp)
{
struct rds_tcp_connection *tc = conn->c_transport_data;
struct socket *sock = tc->t_sock;
@@ -283,7 +281,6 @@ static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp,
/* It's like glib in the kernel! */
arg.conn = conn;
arg.gfp = gfp;
- arg.km = km;
desc.arg.data = &arg;
desc.error = 0;
desc.count = 1; /* give more than one skb per call */
@@ -311,7 +308,7 @@ int rds_tcp_recv(struct rds_connection *conn)
rdsdebug("recv worker conn %p tc %p sock %p\n", conn, tc, sock);
lock_sock(sock->sk);
- ret = rds_tcp_read_sock(conn, GFP_KERNEL, KM_USER0);
+ ret = rds_tcp_read_sock(conn, GFP_KERNEL);
release_sock(sock->sk);
return ret;
@@ -336,7 +333,7 @@ void rds_tcp_data_ready(struct sock *sk, int bytes)
ready = tc->t_orig_data_ready;
rds_tcp_stats_inc(s_tcp_data_ready_calls);
- if (rds_tcp_read_sock(conn, GFP_ATOMIC, KM_SOFTIRQ0) == -ENOMEM)
+ if (rds_tcp_read_sock(conn, GFP_ATOMIC) == -ENOMEM)
queue_delayed_work(rds_wq, &conn->c_recv_w, 0);
out:
read_unlock_bh(&sk->sk_callback_lock);
--
1.7.4.4
^ permalink raw reply related
* [PATCH 55/62] sunrpc: remove the second argument of k[un]map_atomic()
From: Cong Wang @ 2011-11-27 5:27 UTC (permalink / raw)
To: linux-kernel
Cc: akpm, Cong Wang, J. Bruce Fields, Neil Brown, Trond Myklebust,
David S. Miller, Tom Tucker, linux-nfs, netdev
In-Reply-To: <1322371662-26166-1-git-send-email-amwang@redhat.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
net/sunrpc/auth_gss/gss_krb5_wrap.c | 4 ++--
net/sunrpc/socklib.c | 4 ++--
net/sunrpc/xdr.c | 20 ++++++++++----------
net/sunrpc/xprtrdma/rpc_rdma.c | 8 ++++----
4 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/net/sunrpc/auth_gss/gss_krb5_wrap.c b/net/sunrpc/auth_gss/gss_krb5_wrap.c
index 2763e3e..38f388c 100644
--- a/net/sunrpc/auth_gss/gss_krb5_wrap.c
+++ b/net/sunrpc/auth_gss/gss_krb5_wrap.c
@@ -82,9 +82,9 @@ gss_krb5_remove_padding(struct xdr_buf *buf, int blocksize)
>>PAGE_CACHE_SHIFT;
unsigned int offset = (buf->page_base + len - 1)
& (PAGE_CACHE_SIZE - 1);
- ptr = kmap_atomic(buf->pages[last], KM_USER0);
+ ptr = kmap_atomic(buf->pages[last]);
pad = *(ptr + offset);
- kunmap_atomic(ptr, KM_USER0);
+ kunmap_atomic(ptr);
goto out;
} else
len -= buf->page_len;
diff --git a/net/sunrpc/socklib.c b/net/sunrpc/socklib.c
index 145e6784..0a648c5 100644
--- a/net/sunrpc/socklib.c
+++ b/net/sunrpc/socklib.c
@@ -114,7 +114,7 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct
}
len = PAGE_CACHE_SIZE;
- kaddr = kmap_atomic(*ppage, KM_SKB_SUNRPC_DATA);
+ kaddr = kmap_atomic(*ppage);
if (base) {
len -= base;
if (pglen < len)
@@ -127,7 +127,7 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct
ret = copy_actor(desc, kaddr, len);
}
flush_dcache_page(*ppage);
- kunmap_atomic(kaddr, KM_SKB_SUNRPC_DATA);
+ kunmap_atomic(kaddr);
copied += ret;
if (ret != len || !desc->count)
goto out;
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index 277ebd4..c04aff8 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -122,9 +122,9 @@ xdr_terminate_string(struct xdr_buf *buf, const u32 len)
{
char *kaddr;
- kaddr = kmap_atomic(buf->pages[0], KM_USER0);
+ kaddr = kmap_atomic(buf->pages[0]);
kaddr[buf->page_base + len] = '\0';
- kunmap_atomic(kaddr, KM_USER0);
+ kunmap_atomic(kaddr);
}
EXPORT_SYMBOL_GPL(xdr_terminate_string);
@@ -232,12 +232,12 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base,
pgto_base -= copy;
pgfrom_base -= copy;
- vto = kmap_atomic(*pgto, KM_USER0);
- vfrom = kmap_atomic(*pgfrom, KM_USER1);
+ vto = kmap_atomic(*pgto);
+ vfrom = kmap_atomic(*pgfrom);
memmove(vto + pgto_base, vfrom + pgfrom_base, copy);
flush_dcache_page(*pgto);
- kunmap_atomic(vfrom, KM_USER1);
- kunmap_atomic(vto, KM_USER0);
+ kunmap_atomic(vfrom);
+ kunmap_atomic(vto);
} while ((len -= copy) != 0);
}
@@ -267,9 +267,9 @@ _copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len)
if (copy > len)
copy = len;
- vto = kmap_atomic(*pgto, KM_USER0);
+ vto = kmap_atomic(*pgto);
memcpy(vto + pgbase, p, copy);
- kunmap_atomic(vto, KM_USER0);
+ kunmap_atomic(vto);
len -= copy;
if (len == 0)
@@ -311,9 +311,9 @@ _copy_from_pages(char *p, struct page **pages, size_t pgbase, size_t len)
if (copy > len)
copy = len;
- vfrom = kmap_atomic(*pgfrom, KM_USER0);
+ vfrom = kmap_atomic(*pgfrom);
memcpy(p, vfrom + pgbase, copy);
- kunmap_atomic(vfrom, KM_USER0);
+ kunmap_atomic(vfrom);
pgbase += copy;
if (pgbase == PAGE_CACHE_SIZE) {
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c
index 554d081..1776e57 100644
--- a/net/sunrpc/xprtrdma/rpc_rdma.c
+++ b/net/sunrpc/xprtrdma/rpc_rdma.c
@@ -338,9 +338,9 @@ rpcrdma_inline_pullup(struct rpc_rqst *rqst, int pad)
curlen = copy_len;
dprintk("RPC: %s: page %d destp 0x%p len %d curlen %d\n",
__func__, i, destp, copy_len, curlen);
- srcp = kmap_atomic(ppages[i], KM_SKB_SUNRPC_DATA);
+ srcp = kmap_atomic(ppages[i]);
memcpy(destp, srcp+page_base, curlen);
- kunmap_atomic(srcp, KM_SKB_SUNRPC_DATA);
+ kunmap_atomic(srcp);
rqst->rq_svec[0].iov_len += curlen;
destp += curlen;
copy_len -= curlen;
@@ -639,10 +639,10 @@ rpcrdma_inline_fixup(struct rpc_rqst *rqst, char *srcp, int copy_len, int pad)
dprintk("RPC: %s: page %d"
" srcp 0x%p len %d curlen %d\n",
__func__, i, srcp, copy_len, curlen);
- destp = kmap_atomic(ppages[i], KM_SKB_SUNRPC_DATA);
+ destp = kmap_atomic(ppages[i]);
memcpy(destp + page_base, srcp, curlen);
flush_dcache_page(ppages[i]);
- kunmap_atomic(destp, KM_SKB_SUNRPC_DATA);
+ kunmap_atomic(destp);
srcp += curlen;
copy_len -= curlen;
if (copy_len == 0)
--
1.7.4.4
^ permalink raw reply related
* [PATCH 53/62] net: remove the second argument of k[un]map_atomic()
From: Cong Wang @ 2011-11-27 5:27 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, Cong Wang, David S. Miller, Ian Campbell, netdev
In-Reply-To: <1322371662-26166-1-git-send-email-amwang@redhat.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
net/core/kmap_skb.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/kmap_skb.h b/net/core/kmap_skb.h
index 81e1ed7..52d0a44 100644
--- a/net/core/kmap_skb.h
+++ b/net/core/kmap_skb.h
@@ -7,12 +7,12 @@ static inline void *kmap_skb_frag(const skb_frag_t *frag)
local_bh_disable();
#endif
- return kmap_atomic(skb_frag_page(frag), KM_SKB_DATA_SOFTIRQ);
+ return kmap_atomic(skb_frag_page(frag));
}
static inline void kunmap_skb_frag(void *vaddr)
{
- kunmap_atomic(vaddr, KM_SKB_DATA_SOFTIRQ);
+ kunmap_atomic(vaddr);
#ifdef CONFIG_HIGHMEM
local_bh_enable();
#endif
--
1.7.4.4
^ permalink raw reply related
* [PATCH 28/62] vhost: remove the second argument of k[un]map_atomic()
From: Cong Wang @ 2011-11-27 5:27 UTC (permalink / raw)
To: linux-kernel
Cc: akpm, Cong Wang, Michael S. Tsirkin, kvm, virtualization, netdev
In-Reply-To: <1322371662-26166-1-git-send-email-amwang@redhat.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
drivers/vhost/vhost.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index c14c42b..bdb2d64 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -937,9 +937,9 @@ static int set_bit_to_user(int nr, void __user *addr)
if (r < 0)
return r;
BUG_ON(r != 1);
- base = kmap_atomic(page, KM_USER0);
+ base = kmap_atomic(page);
set_bit(bit, base);
- kunmap_atomic(base, KM_USER0);
+ kunmap_atomic(base);
set_page_dirty_lock(page);
put_page(page);
return 0;
--
1.7.4.4
^ permalink raw reply related
* [PATCH 21/62] net: remove the second argument of k[un]map_atomic()
From: Cong Wang @ 2011-11-27 5:27 UTC (permalink / raw)
To: linux-kernel
Cc: Cong Wang, Jiri Pirko, e1000-devel, Dean Nelson, Bruce Allan,
Jesse Brandeburg, David S. Miller, John Ronciak, netdev, akpm,
Ian Campbell
In-Reply-To: <1322371662-26166-1-git-send-email-amwang@redhat.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
drivers/net/ethernet/intel/e1000/e1000_main.c | 6 ++----
drivers/net/ethernet/intel/e1000e/netdev.c | 10 ++++------
drivers/net/ethernet/sun/cassini.c | 4 ++--
3 files changed, 8 insertions(+), 12 deletions(-)
create mode 100644 drivers/net/team/Module.symvers
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index cf480b5..b194beb 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -3878,11 +3878,9 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
if (length <= copybreak &&
skb_tailroom(skb) >= length) {
u8 *vaddr;
- vaddr = kmap_atomic(buffer_info->page,
- KM_SKB_DATA_SOFTIRQ);
+ vaddr = kmap_atomic(buffer_info->page);
memcpy(skb_tail_pointer(skb), vaddr, length);
- kunmap_atomic(vaddr,
- KM_SKB_DATA_SOFTIRQ);
+ kunmap_atomic(vaddr);
/* re-use the page, so don't erase
* buffer_info->page */
skb_put(skb, length);
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index a855db1..8603c87 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -1272,9 +1272,9 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
*/
dma_sync_single_for_cpu(&pdev->dev, ps_page->dma,
PAGE_SIZE, DMA_FROM_DEVICE);
- vaddr = kmap_atomic(ps_page->page, KM_SKB_DATA_SOFTIRQ);
+ vaddr = kmap_atomic(ps_page->page);
memcpy(skb_tail_pointer(skb), vaddr, l1);
- kunmap_atomic(vaddr, KM_SKB_DATA_SOFTIRQ);
+ kunmap_atomic(vaddr);
dma_sync_single_for_device(&pdev->dev, ps_page->dma,
PAGE_SIZE, DMA_FROM_DEVICE);
@@ -1465,12 +1465,10 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
if (length <= copybreak &&
skb_tailroom(skb) >= length) {
u8 *vaddr;
- vaddr = kmap_atomic(buffer_info->page,
- KM_SKB_DATA_SOFTIRQ);
+ vaddr = kmap_atomic(buffer_info->page);
memcpy(skb_tail_pointer(skb), vaddr,
length);
- kunmap_atomic(vaddr,
- KM_SKB_DATA_SOFTIRQ);
+ kunmap_atomic(vaddr);
/* re-use the page, so don't erase
* buffer_info->page */
skb_put(skb, length);
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c
index fd40988..c22a195 100644
--- a/drivers/net/ethernet/sun/cassini.c
+++ b/drivers/net/ethernet/sun/cassini.c
@@ -104,8 +104,8 @@
#include <asm/byteorder.h>
#include <asm/uaccess.h>
-#define cas_page_map(x) kmap_atomic((x), KM_SKB_DATA_SOFTIRQ)
-#define cas_page_unmap(x) kunmap_atomic((x), KM_SKB_DATA_SOFTIRQ)
+#define cas_page_map(x) kmap_atomic((x))
+#define cas_page_unmap(x) kunmap_atomic((x))
#define CAS_NCPUS num_online_cpus()
#define cas_skb_release(x) netif_rx(x)
diff --git a/drivers/net/team/Module.symvers b/drivers/net/team/Module.symvers
new file mode 100644
index 0000000..e69de29
--
1.7.4.4
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related
* Re: [PATCH 8/8] staging: octeon_ethernet: Convert to use device tree.
From: Greg KH @ 2011-11-27 2:04 UTC (permalink / raw)
To: ddaney.cavm
Cc: linux-mips, ralf, devicetree-discuss, grant.likely, linux-kernel,
David Daney, David S. Miller, netdev, Greg Kroah-Hartman, devel
In-Reply-To: <1320978124-13042-9-git-send-email-ddaney.cavm@gmail.com>
On Thu, Nov 10, 2011 at 06:22:04PM -0800, ddaney.cavm@gmail.com wrote:
> From: David Daney <david.daney@cavium.com>
>
> Get MAC address and PHY connection from the device tree.
>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: netdev@vger.kernel.org
> Cc: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
This usually goes through the MIPS tree, so I'll let Ralf take it.
thanks,
greg k-h
^ permalink raw reply
* Re: sky2 tx watchdog timeout with 1Gb speed
From: Stephen Hemminger @ 2011-11-27 1:03 UTC (permalink / raw)
To: Milan Kocian; +Cc: netdev
In-Reply-To: <20111126161513.GA5299@ntm.wq.cz>
On Sat, 26 Nov 2011 17:15:20 +0100
Milan Kocian <milon@wq.cz> wrote:
> On Tue, Nov 22, 2011 at 10:42:34AM +0100, Milan Kocian wrote:
> > hi stephen,
> >
> > many thanks for reply.
> >
> > On Mon, Nov 21, 2011 at 04:05:43PM -0800, Stephen Hemminger wrote:
> > > On Mon, 21 Nov 2011 00:21:18 +0100
> > > Milan Kocian <milon@wq.cz> wrote:
> > >
> > > > hi all,
> > > >
> > > > I switched my home pc from 100Mb/s to 1000Mb/s and I see
> > > > this warning below.
> > > >
> > > > The original kernel was 2.6.39.4 then I tested 3.1.1 with the same
> > > > result. (self compiled 32bit vanilla). The workaround is to force 10/100 speed
> > > > on my new switch (hp).
> > > >
> > > > lspci:
> > > >
> > > > 03:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 13)
> > > > Subsystem: Giga-byte Technology Device e000
> > > > Flags: bus master, fast devsel, latency 0, IRQ 45
> > > > Memory at f5000000 (64-bit, non-prefetchable) [size=16K]
> > > > I/O ports at 9000 [size=256]
> > > > [virtual] Expansion ROM at 80300000 [disabled] [size=128K]
> > > > Capabilities: [48] Power Management version 3
> > > > Capabilities: [50] Vital Product Data
> > > > Capabilities: [5c] MSI: Enable+ Count=1/1 Maskable- 64bit+
> > > > Capabilities: [e0] Express Legacy Endpoint, MSI 00
> > > > Capabilities: [100] Advanced Error Reporting
> > > > Kernel driver in use: sky2
> > > >
> > > >
> > > > Nov 20 21:32:54 milu kernel: sky2 0000:03:00.0: eth0: Link is up at 1000 Mbps, full duplex, flow control both
> > > > Nov 20 21:35:29 milu kernel: ------------[ cut here ]------------
> > > > Nov 20 21:35:29 milu kernel: WARNING: at net/sched/sch_generic.c:255 dev_watchdog+0x1fa/0x206()
> > > > Nov 20 21:35:29 milu kernel: Hardware name: 965GM-S2
> > > > Nov 20 21:35:29 milu kernel: NETDEV WATCHDOG: eth0 (sky2): transmit queue 0 timed out
> > > > Nov 20 21:35:29 milu kernel: Modules linked in: parport_pc parport fuse nfsd ipv6 nfs lockd auth_rpcgss nfs_acl sunrpc usbhid snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_intel8x0 sg snd_ac97_codec sr_mod ac97_bus cdrom sky2 snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss intel_agp snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device snd bitrev i2c_i801 crc32 intel_gtt uhci_hcd i2c_core ehci_hcd soundcore usbcore agpgart evdev snd_page_alloc
> > > > Nov 20 21:35:29 milu kernel: Pid: 0, comm: swapper Not tainted 3.1.1 #2
> > > > Nov 20 21:35:29 milu kernel: Call Trace:
> > > > Nov 20 21:35:29 milu kernel: [<c102cd5d>] ? warn_slowpath_common+0x6c/0x94
> > > > Nov 20 21:35:29 milu kernel: [<c1254deb>] ? dev_watchdog+0x1fa/0x206
> > > > Nov 20 21:35:29 milu kernel: [<c1254deb>] ? dev_watchdog+0x1fa/0x206
> > > > Nov 20 21:35:29 milu kernel: [<c102ce0e>] ? warn_slowpath_fmt+0x33/0x37
> > > > Nov 20 21:35:29 milu kernel: [<c1254deb>] ? dev_watchdog+0x1fa/0x206
> > > > Nov 20 21:35:29 milu kernel: [<c1254bf1>] ? qdisc_reset+0x2d/0x2d
> > > > Nov 20 21:35:29 milu kernel: [<c1036434>] ? run_timer_softirq+0xc6/0x1c4
> > > > Nov 20 21:35:29 milu kernel: [<c1027e9b>] ? run_rebalance_domains+0x148/0x169
> > > > Nov 20 21:35:29 milu kernel: [<c103163b>] ? __do_softirq+0x6e/0xea
> > > > Nov 20 21:35:29 milu kernel: [<c10315cd>] ? remote_softirq_receive+0x11/0x11
> > > > Nov 20 21:35:29 milu kernel: <IRQ> [<c1031906>] ? irq_exit+0x5b/0x67
> > > > Nov 20 21:35:29 milu kernel: [<c101631f>] ? smp_apic_timer_interrupt+0x51/0x81
> > > > Nov 20 21:35:29 milu kernel: [<c12ccd96>] ? apic_timer_interrupt+0x2a/0x30
> > > > Nov 20 21:35:29 milu kernel: [<c13f007b>] ? asus_hides_smbus_hostbridge+0xcb/0x249
> > > > Nov 20 21:35:29 milu kernel: [<c1008732>] ? mwait_idle+0x41/0x51
> > > > Nov 20 21:35:29 milu kernel: [<c10015d8>] ? cpu_idle+0x74/0x84
> > > > Nov 20 21:35:29 milu kernel: [<c13d6638>] ? start_kernel+0x28a/0x28f
> > > > Nov 20 21:35:29 milu kernel: [<c13d615e>] ? loglevel+0x2b/0x2b
> > > > Nov 20 21:35:29 milu kernel: ---[ end trace ef84175f674c7842 ]---
> > > > Nov 20 21:35:29 milu kernel: sky2 0000:03:00.0: eth0: tx timeout
> > > > Nov 20 21:35:29 milu kernel: sky2 0000:03:00.0: eth0: transmit ring 52 .. 30 report=52 done=52
> > > > Nov 20 21:35:32 milu kernel: sky2 0000:03:00.0: eth0: Link is up at 1000 Mbps, full duplex, flow control both
> > > > Nov 20 21:37:13 milu kernel: sky2 0000:03:00.0: eth0: tx timeout
> > > > Nov 20 21:37:13 milu kernel: sky2 0000:03:00.0: eth0: transmit ring 37 .. 15 report=37 done=37
> > > > Nov 20 21:37:16 milu kernel: sky2 0000:03:00.0: eth0: Link is up at 1000 Mbps, full duplex, flow control both
> > > >
> > > > Any suggestion ? As I said its home machine so I can test what you want :-).
> > >
> > > I haven't seen this, is it under heavy or light traffic.
> >
> > Imho heavy traffic is not needed (will do more tests). After boot all seems ok,
> > ping is working. But when I start something to do, net is freezing. It's not possible
> > to copy something over net.
> >
> > > Are you running something that might cause device to miss interrupts?
> > >
> >
> > Imho no. In pc is nvidia card but the warning happens without nvidia driver
> > loaded (i tested sending data over net without X, no nvidia driver loaded
> > with the same result). For sure I'm sending /proc/interrupts and list of all devices.
> >
> > I noticed one thing, when 1Gb is set I see this in kerne.log too:
> >
> > Nov 20 21:49:31 milu kernel: ata1.00: exception Emask 0x10 SAct 0x0 SErr 0x400100 action 0x6 frozen
> > Nov 20 21:49:31 milu kernel: ata1.00: irq_stat 0x08000000, interface fatal error
> > Nov 20 21:49:31 milu kernel: ata1: SError: { UnrecovData Handshk }
> > Nov 20 21:49:31 milu kernel: ata1.00: failed command: WRITE DMA EXT
> > Nov 20 21:49:31 milu kernel: ata1.00: cmd 35/00:00:4f:d3:04/00:03:00:00:00/e0 tag 0 dma 393216 out
> > Nov 20 21:49:31 milu kernel: res 50/00:00:f6:0c:e6/00:00:06:00:00/e6 Emask 0x10 (ATA bus error)
> > Nov 20 21:49:31 milu kernel: ata1.00: status: { DRDY }
> > Nov 20 21:49:31 milu kernel: ata1: hard resetting link
> > Nov 20 21:49:31 milu kernel: ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
> > Nov 20 21:49:31 milu kernel: ata1.00: configured for UDMA/133
> > Nov 20 21:49:31 milu kernel: ata1: EH complete
> > Nov 20 21:50:12 milu kernel: ata1.00: exception Emask 0x10 SAct 0x0 SErr 0x400100 action 0x6 frozen
> > Nov 20 21:50:12 milu kernel: ata1.00: irq_stat 0x08000000, interface fatal error
> > Nov 20 21:50:12 milu kernel: ata1: SError: { UnrecovData Handshk }
> > Nov 20 21:50:12 milu kernel: ata1.00: failed command: WRITE DMA EXT
> > Nov 20 21:50:12 milu kernel: ata1.00: cmd 35/00:e0:17:a2:15/00:03:08:00:00/e0 tag 0 dma 507904 out
> > Nov 20 21:50:12 milu kernel: res 50/00:00:16:a2:15/00:00:08:00:00/e0 Emask 0x10 (ATA bus error)
> > Nov 20 21:50:12 milu kernel: ata1.00: status: { DRDY }
> > Nov 20 21:50:12 milu kernel: ata1: hard resetting link
> > Nov 20 21:50:12 milu kernel: ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
> > Nov 20 21:50:12 milu kernel: ata1.00: configured for UDMA/133
> > Nov 20 21:50:12 milu kernel: ata1: EH complete
> > Nov 20 21:50:12 milu kernel: ata1.00: exception Emask 0x10 SAct 0x0 SErr 0x400100 action 0x6 frozen
> > Nov 20 21:50:12 milu kernel: ata1.00: irq_stat 0x08000000, interface fatal error
> > Nov 20 21:50:12 milu kernel: ata1: SError: { UnrecovData Handshk }
> > Nov 20 21:50:12 milu kernel: ata1.00: failed command: WRITE DMA EXT
> > Nov 20 21:50:12 milu kernel: ata1.00: cmd 35/00:e0:c7:95:a9/00:03:08:00:00/e0 tag 0 dma 507904 out
> > Nov 20 21:50:12 milu kernel: res 50/00:00:c6:95:a9/00:00:08:00:00/e0 Emask 0x10 (ATA bus error)
> >
> >
> > milu:~# cat /proc/interrupts
> > CPU0 CPU1
> > 0: 555 0 IO-APIC-edge timer
> > 1: 58816 0 IO-APIC-edge i8042
> > 8: 1 0 IO-APIC-edge rtc0
> > 9: 0 0 IO-APIC-fasteoi acpi
> > 16: 2757269 0 IO-APIC-fasteoi uhci_hcd:usb3, nvidia
> > 18: 206547 0 IO-APIC-fasteoi ahci, ehci_hcd:usb1, uhci_hcd:usb7
> > 19: 770339 0 IO-APIC-fasteoi pata_jmicron, uhci_hcd:usb6
> > 21: 0 0 IO-APIC-fasteoi uhci_hcd:usb4
> > 23: 2 0 IO-APIC-fasteoi ehci_hcd:usb2, uhci_hcd:usb5
> > 44: 1606 50210 PCI-MSI-edge ahci
> > 45: 1092296 0 PCI-MSI-edge sky2@pci:0000:03:00.0
> > 46: 377 0 PCI-MSI-edge snd_hda_intel
> > NMI: 0 0 Non-maskable interrupts
> > LOC: 133229573 133104650 Local timer interrupts
> > SPU: 0 0 Spurious interrupts
> > PMI: 0 0 Performance monitoring interrupts
> > IWI: 0 0 IRQ work interrupts
> > RES: 1719676 2541118 Rescheduling interrupts
> > CAL: 72289 222200 Function call interrupts
> > TLB: 69670 53360 TLB shootdowns
> > TRM: 0 0 Thermal event interrupts
> > THR: 0 0 Threshold APIC interrupts
> > MCE: 0 0 Machine check exceptions
> > MCP: 438 438 Machine check polls
> > ERR: 0
> > MIS: 0
> >
> > milu:~# lspci
> > 00:00.0 Host bridge: Intel Corporation 82P965/G965 Memory Controller Hub (rev 02)
> > 00:01.0 PCI bridge: Intel Corporation 82P965/G965 PCI Express Root Port (rev 02)
> > 00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 02)
> > 00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 02)
> > 00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 02)
> > 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)
> > 00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02)
> > 00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 02)
> > 00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 02)
> > 00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 02)
> > 00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 02)
> > 00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 02)
> > 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 02)
> > 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev f2)
> > 00:1f.0 ISA bridge: Intel Corporation 82801HB/HR (ICH8/R) LPC Interface Controller (rev 02)
> > 00:1f.2 SATA controller: Intel Corporation 82801HB (ICH8) 4 port SATA AHCI Controller (rev 02)
> > 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02)
> > 01:00.0 VGA compatible controller: nVidia Corporation G94 [GeForce 9600 GT] (rev a1)
> > 03:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 13)
> > 04:00.0 SATA controller: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 02)
> > 04:00.1 IDE interface: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 02)
> > 05:07.0 FireWire (IEEE 1394): Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)
> >
> > Best regards,
> >
>
> I have more info:
>
> After boot, when there is no traffic, net seems working
> (pure icmp is working eg. ping -s 1500 -i 0.01)
> But sending something over ssh freeze network after few seconds.
> I saw this errors (with warnings in previous mail):
>
> milu:/var/log# grep sky2 kern.log | grep error
> Nov 24 23:20:08 milu kernel: sky2 0000:03:00.0: error interrupt status=0x1
> Nov 24 23:20:08 milu kernel: sky2 0000:03:00.0: eth0: descriptor error q=0x280 get=16 put=16
> Nov 24 23:54:40 milu kernel: sky2 0000:03:00.0: error interrupt status=0x80000000
> Nov 24 23:54:40 milu kernel: sky2 0000:03:00.0: eth0: hw error interrupt status 0x1
> Nov 24 23:54:40 milu kernel: sky2 0000:03:00.0: eth0: TCP segmentation error
> Nov 25 00:02:02 milu kernel: sky2 0000:03:00.0: error interrupt status=0x1
> Nov 25 00:02:02 milu kernel: sky2 0000:03:00.0: eth0: descriptor error q=0x280 get=44 put=44
> Nov 25 00:13:20 milu kernel: sky2 0000:03:00.0: error interrupt status=0x1
> Nov 25 00:13:20 milu kernel: sky2 0000:03:00.0: eth0: descriptor error q=0x280 get=92 put=92
> Nov 25 00:25:29 milu kernel: sky2 0000:03:00.0: error interrupt status=0x1
> Nov 25 00:25:29 milu kernel: sky2 0000:03:00.0: eth0: descriptor error q=0x280 get=88 put=88
>
> I tested MSI disabled, 'ethtool -K' all params off, 'ethtool -C' adaptive-rx/tx
> off, new BIOS with the same result.
>
> After this tests I added one NIC to PCI slot yet (NIC is surely working)
> and it was not detected. So it seems that there is hw problem on the mainboard.
>
> Best regards,
>
I think the problem might be that the board doesn't really have all the DMA pins
wired. You might try enabling iommu, or limiting to <4G of memory.
^ permalink raw reply
* Re: [PATCH net/stable] gro: reset vlan_tci on reuse
From: Benjamin Poirier @ 2011-11-27 1:01 UTC (permalink / raw)
To: Greg KH; +Cc: David S. Miller, netdev, stable, Jesse Gross
In-Reply-To: <20111126155202.GA8467@kroah.com>
On 11/11/26 07:52, Greg KH wrote:
> On Sat, Nov 26, 2011 at 10:19:09AM -0500, Benjamin Poirier wrote:
> > This one liner is part of upstream
> > commit 3701e51382a026cba10c60b03efabe534fba4ca4
> >
> > and it is in the same vein as
> > commit 66c46d741e2e60f0e8b625b80edb0ab820c46d7a
> > commit 6d152e23ad1a7a5b40fef1f42e017d66e6115159
> >
> > which are already in -stable.
> >
> > For drivers using the vlan_gro_frags() interface, a packet with invalid tci
> > leads to GRO_DROP and napi_reuse_skb(). The skb has to be sanitized before
> > being reused or we'll send skb's with invalid vlan_tci up the stack where
> > they're not expected.
> >
> > Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
> > Cc: Jesse Gross <jesse@nicira.com>
> >
> > ---
> >
> > Please note, reusing skb's with an invalid vlan_tci can cause panics on
> > 2.6.32.y -stable kernels.
>
> You forgot to mention what stable kernel tree(s) you want this patch
> applied to. And why can't I just take all of
> 3701e51382a026cba10c60b03efabe534fba4ca4? (hint, when refering to git
> commit ids, please put the description of what they are in () after them
> so we have a hint and don't have to dig through a git tree to find
> them.)
Ah, thank you for spelling it out, I was clueless after re-reading
kernel_stable_rules.txt
> > This one liner is part of upstream
> > commit 3701e51382a026cba10c60b03efabe534fba4ca4
Author: Jesse Gross <jesse@nicira.com>
vlan: Centralize handling of hardware acceleration.
> >
> > and it is in the same vein as
> > commit 66c46d741e2e60f0e8b625b80edb0ab820c46d7a
Author: Herbert Xu <herbert@gondor.apana.org.au>
gro: Reset dev pointer on reuse
> > commit 6d152e23ad1a7a5b40fef1f42e017d66e6115159
Author: Andy Gospodarek <andy@greyhouse.net>
gro: reset skb_iif on reuse
Jesse's upstream commit is a rework of the hardware assisted vlan
tagging driver interface, and as such doesn't classify for -stable
inclusion. The fix that is needed just happens to be part of that commit
but can work independently of the rest -- I guess they could've been
separate commits from the start.
The vlan_gro_frags() interface was introduced in 2.6.29 and Jesse's
commit went in 2.6.37. -stable kernels in between can make use of the
fix which I believe makes it applicable to 2.6.32.y and .33.y given the
-stable branches that seem to be getting updates at this time.
>
> Also, I need David's ack before I can take this, or any other network
> patch, for the stable tree.
cc'ed.
Thanks,
-Benjamin
^ permalink raw reply
* Re: [PATCH] inet:
From: David Miller @ 2011-11-27 0:17 UTC (permalink / raw)
To: eric.dumazet; +Cc: a.miskiewicz, netdev
In-Reply-To: <1322345790.10212.23.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 26 Nov 2011 23:16:30 +0100
> Le samedi 26 novembre 2011 à 23:13 +0100, Eric Dumazet a écrit :
>> Now inetpeer is the place where we cache redirect information for ipv4
>> destinations, we must be able to invalidate informations when a route is
>> added/removed on host.
>>
>> As inetpeer is not yet namespace aware, this patch adds a shared
>> redirect_genid, and a per inetpeer redirect_genid. This might be changed
>> later if inetpeer becomes ns aware.
>>
>> Cache information for one inerpeer is valid as long as its
>> redirect_genid has the same value than global redirect_genid.
>>
>> Reported-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com>
>> Tested-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com>
>> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>> ---
>
> Arg, patch title was not complete, it could be :
>
> [PATCH] inet: add a redirect generation id in inetpeer
It happens :-) Applied, thanks Eric.
^ permalink raw reply
* Re: [PATCH] inet:
From: Eric Dumazet @ 2011-11-26 22:16 UTC (permalink / raw)
To: Arkadiusz Miśkiewicz; +Cc: David Miller, netdev
In-Reply-To: <1322345624.10212.21.camel@edumazet-laptop>
Le samedi 26 novembre 2011 à 23:13 +0100, Eric Dumazet a écrit :
> Now inetpeer is the place where we cache redirect information for ipv4
> destinations, we must be able to invalidate informations when a route is
> added/removed on host.
>
> As inetpeer is not yet namespace aware, this patch adds a shared
> redirect_genid, and a per inetpeer redirect_genid. This might be changed
> later if inetpeer becomes ns aware.
>
> Cache information for one inerpeer is valid as long as its
> redirect_genid has the same value than global redirect_genid.
>
> Reported-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com>
> Tested-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
Arg, patch title was not complete, it could be :
[PATCH] inet: add a redirect generation id in inetpeer
Sorry :(
^ permalink raw reply
* [PATCH] inet:
From: Eric Dumazet @ 2011-11-26 22:13 UTC (permalink / raw)
To: Arkadiusz Miśkiewicz, David Miller; +Cc: netdev
In-Reply-To: <201111251853.19551.a.miskiewicz@gmail.com>
Now inetpeer is the place where we cache redirect information for ipv4
destinations, we must be able to invalidate informations when a route is
added/removed on host.
As inetpeer is not yet namespace aware, this patch adds a shared
redirect_genid, and a per inetpeer redirect_genid. This might be changed
later if inetpeer becomes ns aware.
Cache information for one inerpeer is valid as long as its
redirect_genid has the same value than global redirect_genid.
Reported-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com>
Tested-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
include/net/inetpeer.h | 1 +
net/ipv4/route.c | 10 +++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index 78c83e6..e9ff3fc 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -35,6 +35,7 @@ struct inet_peer {
u32 metrics[RTAX_MAX];
u32 rate_tokens; /* rate limiting for ICMP */
+ int redirect_genid;
unsigned long rate_last;
unsigned long pmtu_expires;
u32 pmtu_orig;
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index fb47c8f..5c28472 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -131,6 +131,7 @@ static int ip_rt_mtu_expires __read_mostly = 10 * 60 * HZ;
static int ip_rt_min_pmtu __read_mostly = 512 + 20 + 20;
static int ip_rt_min_advmss __read_mostly = 256;
static int rt_chain_length_max __read_mostly = 20;
+static int redirect_genid;
/*
* Interface to generic destination cache.
@@ -837,6 +838,7 @@ static void rt_cache_invalidate(struct net *net)
get_random_bytes(&shuffle, sizeof(shuffle));
atomic_add(shuffle + 1U, &net->ipv4.rt_genid);
+ redirect_genid++;
}
/*
@@ -1391,8 +1393,10 @@ void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 new_gw,
peer = rt->peer;
if (peer) {
- if (peer->redirect_learned.a4 != new_gw) {
+ if (peer->redirect_learned.a4 != new_gw ||
+ peer->redirect_genid != redirect_genid) {
peer->redirect_learned.a4 = new_gw;
+ peer->redirect_genid = redirect_genid;
atomic_inc(&__rt_peer_genid);
}
check_peer_redir(&rt->dst, peer);
@@ -1701,6 +1705,8 @@ static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie)
if (peer) {
check_peer_pmtu(dst, peer);
+ if (peer->redirect_genid != redirect_genid)
+ peer->redirect_learned.a4 = 0;
if (peer->redirect_learned.a4 &&
peer->redirect_learned.a4 != rt->rt_gateway) {
if (check_peer_redir(dst, peer))
@@ -1857,6 +1863,8 @@ static void rt_init_metrics(struct rtable *rt, const struct flowi4 *fl4,
dst_init_metrics(&rt->dst, peer->metrics, false);
check_peer_pmtu(&rt->dst, peer);
+ if (peer->redirect_genid != redirect_genid)
+ peer->redirect_learned.a4 = 0;
if (peer->redirect_learned.a4 &&
peer->redirect_learned.a4 != rt->rt_gateway) {
rt->rt_gateway = peer->redirect_learned.a4;
^ permalink raw reply related
* Re: cache forver in 3.2.0-rc2-00400-g866d43c ?
From: Eric Dumazet @ 2011-11-26 22:10 UTC (permalink / raw)
To: Arkadiusz Miśkiewicz; +Cc: netdev
In-Reply-To: <201111251853.19551.a.miskiewicz@gmail.com>
Le vendredi 25 novembre 2011 à 18:53 +0100, Arkadiusz Miśkiewicz a
> Two days and no problems. More tests possible in next week.
>
> Thanks!
Thansk to you, I'll send official submission in a couple of minutes
then.
^ permalink raw reply
* [PATCH] ifenslave: Fix unused variable warnings.
From: David Miller @ 2011-11-26 21:54 UTC (permalink / raw)
To: netdev
Documentation/networking/ifenslave.c: In function ‘if_getconfig’:
Documentation/networking/ifenslave.c:508:14: warning: variable ‘mtu’ set but not used [-Wunused-but-set-variable]
Documentation/networking/ifenslave.c:508:6: warning: variable ‘metric’ set but not used [-Wunused-but-set-variable]
The purpose of this function is to simply print out the values
it probes, so...
Signed-off-by: David S. Miller <davem@davemloft.net>
---
More annoying warnings, committed to net-next.
Documentation/networking/ifenslave.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Documentation/networking/ifenslave.c b/Documentation/networking/ifenslave.c
index 65968fb..ac5debb 100644
--- a/Documentation/networking/ifenslave.c
+++ b/Documentation/networking/ifenslave.c
@@ -539,12 +539,14 @@ static int if_getconfig(char *ifname)
metric = 0;
} else
metric = ifr.ifr_metric;
+ printf("The result of SIOCGIFMETRIC is %d\n", metric);
strcpy(ifr.ifr_name, ifname);
if (ioctl(skfd, SIOCGIFMTU, &ifr) < 0)
mtu = 0;
else
mtu = ifr.ifr_mtu;
+ printf("The result of SIOCGIFMTU is %d\n", mtu);
strcpy(ifr.ifr_name, ifname);
if (ioctl(skfd, SIOCGIFDSTADDR, &ifr) < 0) {
--
1.7.6.4
^ permalink raw reply related
* Re: [PATCH net-next-2.6] atm: eliminate atm_guess_pdu2truesize()
From: David Miller @ 2011-11-26 21:41 UTC (permalink / raw)
To: chas; +Cc: netdev
In-Reply-To: <201111222251.pAMMpujb007390@cmf.nrl.navy.mil>
From: "chas williams - CONTRACTOR" <chas@cmf.nrl.navy.mil>
Date: Tue, 22 Nov 2011 17:51:56 -0500
> From: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
>
> Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH 1/1] AF_UNIX: Fix poll locking problem when reading from a stream socket
From: David Miller @ 2011-11-26 21:35 UTC (permalink / raw)
To: eric.dumazet; +Cc: himeraster, netdev, linux-kernel
In-Reply-To: <1321939381.27077.7.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 22 Nov 2011 06:23:01 +0100
> Le mardi 22 novembre 2011 à 03:35 +0400, Alexey Moiseytsev a écrit :
>> poll() call may be locked by concurrent reading from the same stream
>> socket.
>>
>> Signed-off-by: Alexey Moiseytsev <himeraster@gmail.com>
..
> Fine, the fix is technically correct since we own u->readlock mutex,
> another thread cannot consume the just requeued skb.
>
> Small note : the words "locking" and "locked" are more used to describe
> the action of taking a spinlock/mutex/rwlock or something, while the bug
> you fixed is more about poll() system call being blocked/frozen forever.
>
> Thanks !
>
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, with 'lock{ing,ed}' adjusted to 'block{ing,ed}'.
^ permalink raw reply
* Re: [PATCH] dm9000: Fix check for disabled wake on LAN
From: David Miller @ 2011-11-26 20:58 UTC (permalink / raw)
To: broonie; +Cc: netdev, patches
In-Reply-To: <1321897916-5030-1-git-send-email-broonie@opensource.wolfsonmicro.com>
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
Date: Mon, 21 Nov 2011 17:51:56 +0000
> We're trying to check if any options are defined which isn't wha the
> existing code does due to confusing & and &&.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Good catch, applied, thanks.
^ permalink raw reply
* Re: [PATCH] l2tp: ensure sk->dst is still valid
From: David Miller @ 2011-11-26 20:57 UTC (permalink / raw)
To: eric.dumazet; +Cc: fw, netdev, jchapman
In-Reply-To: <1322281801.10212.7.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 26 Nov 2011 05:30:01 +0100
> Le vendredi 25 novembre 2011 à 17:47 +0100, Florian Westphal a écrit :
>> When using l2tp over ipsec, the tunnel will hang when rekeying
>> occurs. Reason is that the transformer bundle attached to the dst entry
>> is now in STATE_DEAD and thus xfrm_output_one() drops all packets
>> (XfrmOutStateExpired increases).
>>
>> Fix this by calling __sk_dst_check (which drops the stale dst
>> if xfrm dst->check callback finds that the bundle is no longer valid).
>>
>> Cc: James Chapman <jchapman@katalix.com>
>> Signed-off-by: Florian Westphal <fw@strlen.de>
>> ---
>> net/l2tp/l2tp_core.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
>> index cf0f308..89ff8c6 100644
>> --- a/net/l2tp/l2tp_core.c
>> +++ b/net/l2tp/l2tp_core.c
>> @@ -1072,7 +1072,7 @@ int l2tp_xmit_skb(struct l2tp_session *session, struct sk_buff *skb, int hdr_len
>>
>> /* Get routing info from the tunnel socket */
>> skb_dst_drop(skb);
>> - skb_dst_set(skb, dst_clone(__sk_dst_get(sk)));
>> + skb_dst_set(skb, dst_clone(__sk_dst_check(sk, 0)));
>>
>> inet = inet_sk(sk);
>> fl = &inet->cork.fl;
>
> Seems good to me, although we could use RCU and skb_dst_set_noref() to
> avoid dirtying dst refcount. I'll send a patch for net-next later.
>
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks everyone.
^ permalink raw reply
* Re: [BUG] 3.2-rc2: BUG kmalloc-8: Redzone overwritten
From: David Miller @ 2011-11-26 20:50 UTC (permalink / raw)
To: swhiteho
Cc: eric.dumazet, levinsasha928, mpm, cl, penberg, linux-mm,
linux-kernel, netdev, ccaulfie
In-Reply-To: <1321873110.2710.13.camel@menhir>
From: Steven Whitehouse <swhiteho@redhat.com>
Date: Mon, 21 Nov 2011 10:58:30 +0000
> I have to say that I've been wondering lately whether it has got to the
> point where it is no longer useful. Has anybody actually tested it
> lately against "real" DEC implementations?
I doubt it :-)
If we can't think of any real reason to keep it around, let's try
to reach a quirk consensus and I'll toss it from the net-next tree.
Thanks.
--
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: [BUG] 3.2-rc2: BUG kmalloc-8: Redzone overwritten
From: David Miller @ 2011-11-26 20:49 UTC (permalink / raw)
To: eric.dumazet
Cc: levinsasha928, mpm, cl, penberg, linux-mm, linux-kernel, netdev
In-Reply-To: <1322305162.10212.8.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 26 Nov 2011 11:59:22 +0100
> Le samedi 26 novembre 2011 à 12:54 +0200, Sasha Levin a écrit :
>> > On Mon, 2011-11-21 at 11:21 +0100, Eric Dumazet wrote:
>> > >
>> > > Hmm, I forgot to remove the sock_hold(sk) call from dn_slow_timer(),
>> > > here is V2 :
>> > >
>> > > [PATCH] decnet: proper socket refcounting
>> > >
>> > > Better use sk_reset_timer() / sk_stop_timer() helpers to make sure we
>> > > dont access already freed/reused memory later.
>> > >
>> > > Reported-by: Sasha Levin <levinsasha928@gmail.com>
>> > > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>> > > ---
>> >
>> >
>> > Applied locally and running same tests as before, will update with
>> > results.
>> >
>>
>> Looks ok after a couple days of testing.
>>
>> Tested-by: Sasha Levin <levinsasha928@gmail.com>
>>
>
> Thanks Sasha !
Applied and queued up for -stable, thanks everyone.
--
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] vhost-net: Acquire device lock when releasing device
From: David Miller @ 2011-11-26 20:45 UTC (permalink / raw)
To: levinsasha928; +Cc: linux-kernel, mst, kvm, virtualization, netdev
In-Reply-To: <1321607982-16283-1-git-send-email-levinsasha928@gmail.com>
From: Sasha Levin <levinsasha928@gmail.com>
Date: Fri, 18 Nov 2011 11:19:42 +0200
> Device lock should be held when releasing a device, and specifically
> when calling vhost_dev_cleanup(). Otherwise, RCU complains about it:
...
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: kvm@vger.kernel.org
> Cc: virtualization@lists.linux-foundation.org
> Cc: netdev@vger.kernel.org
> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Michael et al., are you guys going to gather this fix or should I
apply it directly to thet net tree?
Thanks.
^ permalink raw reply
* [PATCH] ray_cs: Fix array bounds warnings.
From: David Miller @ 2011-11-26 20:42 UTC (permalink / raw)
To: linux-wireless; +Cc: netdev
rx_msg is defined to have a 1 entry array at the end, so gcc warns:
drivers/net/wireless/ray_cs.c: In function ‘rx_authenticate’:
drivers/net/wireless/ray_cs.c:2436:3: warning: array subscript is above array bounds [-Warray-bounds]
drivers/net/wireless/ray_cs.c:2436:3: warning: array subscript is above array bounds [-Warray-bounds]
drivers/net/wireless/ray_cs.c:2436:3: warning: array subscript is above array bounds [-Warray-bounds]
drivers/net/wireless/ray_cs.c:2436:3: warning: array subscript is above array bounds [-Warray-bounds]
drivers/net/wireless/ray_cs.c:2436:3: warning: array subscript is above array bounds [-Warray-bounds]
drivers/net/wireless/ray_cs.c:2439:15: warning: array subscript is above array bounds [-Warray-bounds]
drivers/net/wireless/ray_cs.c:2452:16: warning: array subscript is above array bounds [-Warray-bounds]
drivers/net/wireless/ray_cs.c:2453:18: warning: array subscript is above array bounds [-Warray-bounds]
drivers/net/wireless/ray_cs.c:2453:32: warning: array subscript is above array bounds [-Warray-bounds]
Use a zero length array and rename to "ray_rx_msg" to make sure we hit all
of the necessary cases.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
Another warning spew that's been driving me bananas for a while, committed
to net-next.
drivers/net/wireless/ray_cs.c | 4 ++--
drivers/net/wireless/rayctl.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 0021e49..04fec1f 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -2426,7 +2426,7 @@ static void rx_authenticate(ray_dev_t *local, struct rcs __iomem *prcs,
unsigned int pkt_addr, int rx_len)
{
UCHAR buff[256];
- struct rx_msg *msg = (struct rx_msg *)buff;
+ struct ray_rx_msg *msg = (struct ray_rx_msg *) buff;
del_timer(&local->timer);
@@ -2513,7 +2513,7 @@ static void rx_deauthenticate(ray_dev_t *local, struct rcs __iomem *prcs,
unsigned int pkt_addr, int rx_len)
{
/* UCHAR buff[256];
- struct rx_msg *msg = (struct rx_msg *)buff;
+ struct ray_rx_msg *msg = (struct ray_rx_msg *) buff;
*/
pr_debug("Deauthentication frame received\n");
local->authentication_state = UNAUTHENTICATED;
diff --git a/drivers/net/wireless/rayctl.h b/drivers/net/wireless/rayctl.h
index d7646f2..3c3b98b 100644
--- a/drivers/net/wireless/rayctl.h
+++ b/drivers/net/wireless/rayctl.h
@@ -566,9 +566,9 @@ struct phy_header {
UCHAR hdr_3;
UCHAR hdr_4;
};
-struct rx_msg {
+struct ray_rx_msg {
struct mac_header mac;
- UCHAR var[1];
+ UCHAR var[0];
};
struct tx_msg {
--
1.7.6.4
^ permalink raw reply related
* [PATCH] airo: Fix array bounds warning when moving packet payload.
From: David Miller @ 2011-11-26 20:36 UTC (permalink / raw)
To: linux-wireless-u79uwXL29TY76Z2rM5mHXA; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA
drivers/net/wireless/airo.c: In function ‘encapsulate’:
drivers/net/wireless/airo.c:1421:15: warning: array subscript is above array bounds [-Warray-bounds]
drivers/net/wireless/airo.c: In function ‘decapsulate’:
drivers/net/wireless/airo.c:1509:16: warning: array subscript is above array bounds [-Warray-bounds]
Signed-off-by: David S. Miller <davem@davemloft.net>
---
I was simply tired of seeing these warnings all the time, committed to net-next.
drivers/net/wireless/airo.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index ac1176a..1c008c6 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -1418,7 +1418,7 @@ static int encapsulate(struct airo_info *ai ,etherHead *frame, MICBuffer *mic, i
emmh32_update(&context->seed,frame->da,ETH_ALEN * 2); // DA,SA
emmh32_update(&context->seed,(u8*)&mic->typelen,10); // Type/Length and Snap
emmh32_update(&context->seed,(u8*)&mic->seq,sizeof(mic->seq)); //SEQ
- emmh32_update(&context->seed,frame->da + ETH_ALEN * 2,payLen); //payload
+ emmh32_update(&context->seed,(u8*)(frame + 1),payLen); //payload
emmh32_final(&context->seed, (u8*)&mic->mic);
/* New Type/length ?????????? */
@@ -1506,7 +1506,7 @@ static int decapsulate(struct airo_info *ai, MICBuffer *mic, etherHead *eth, u16
emmh32_update(&context->seed, eth->da, ETH_ALEN*2);
emmh32_update(&context->seed, (u8 *)&mic->typelen, sizeof(mic->typelen)+sizeof(mic->u.snap));
emmh32_update(&context->seed, (u8 *)&mic->seq,sizeof(mic->seq));
- emmh32_update(&context->seed, eth->da + ETH_ALEN*2,payLen);
+ emmh32_update(&context->seed, (u8 *)(eth + 1),payLen);
//Calculate MIC
emmh32_final(&context->seed, digest);
--
1.7.6.4
^ permalink raw reply related
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