* [PATCH 00/20] netfilter: netfilter update
From: kaber @ 2011-06-16 19:47 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev
Hi Dave,
following is a netfilter update for nf-next-2.6.git, containing
- IPVS cleanups from Hans
- a big ipset update from Jozsef
- support for more FTP PASV responses in the IPVS FTP helper, from Julian
Please apply or pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6.git master
Thanks!
^ permalink raw reply
* [PATCH 6/6] netfilter: nf_nat: avoid double seq_adjust for loopback
From: kaber @ 2011-06-16 19:41 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev
In-Reply-To: <1308253301-29894-1-git-send-email-kaber@trash.net>
From: Julian Anastasov <ja@ssi.bg>
Avoid double seq adjustment for loopback traffic
because it causes silent repetition of TCP data. One
example is passive FTP with DNAT rule and difference in the
length of IP addresses.
This patch adds check if packet is sent and
received via loopback device. As the same conntrack is
used both for outgoing and incoming direction, we restrict
seq adjustment to happen only in POSTROUTING.
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
include/net/netfilter/nf_conntrack.h | 6 ++++++
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 4 +++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index c7c42e7..5d4f8e5 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -307,6 +307,12 @@ static inline int nf_ct_is_untracked(const struct nf_conn *ct)
return test_bit(IPS_UNTRACKED_BIT, &ct->status);
}
+/* Packet is received from loopback */
+static inline bool nf_is_loopback_packet(const struct sk_buff *skb)
+{
+ return skb->dev && skb->skb_iif && skb->dev->flags & IFF_LOOPBACK;
+}
+
extern int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp);
extern unsigned int nf_conntrack_htable_size;
extern unsigned int nf_conntrack_max;
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
index db10075..de9da21 100644
--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
@@ -121,7 +121,9 @@ static unsigned int ipv4_confirm(unsigned int hooknum,
return ret;
}
- if (test_bit(IPS_SEQ_ADJUST_BIT, &ct->status)) {
+ /* adjust seqs for loopback traffic only in outgoing direction */
+ if (test_bit(IPS_SEQ_ADJUST_BIT, &ct->status) &&
+ !nf_is_loopback_packet(skb)) {
typeof(nf_nat_seq_adjust_hook) seq_adjust;
seq_adjust = rcu_dereference(nf_nat_seq_adjust_hook);
--
1.7.2.3
^ permalink raw reply related
* [PATCH 0/8] netfilter: netfilter fixes for -rc1
From: kaber @ 2011-06-16 19:41 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev
Hi Dave,
the following patches fix a couple of netfilter bugs:
- an IPVS/netns shutdown related crash in conntrack, from Hans
- avoidance of double sequence number adjustment on loopback with
NAT to fix data corruption issues, from Julian
- a fix for the protocol check in the ECN match: in addition to the
protocol it needs to check for inversion, from myself
- a fix for missing inversion in the ECN IP header matching, from
myself
- a compile for for ip_tables with debugging enabled, from
Sebastian Andrzej Siewior
Please apply or pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6.git master
Thanks!
^ permalink raw reply
* [PATCH 4/6] netfilter: ipt_ecn: fix inversion for IP header ECN match
From: kaber @ 2011-06-16 19:41 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev
In-Reply-To: <1308253301-29894-1-git-send-email-kaber@trash.net>
From: Patrick McHardy <kaber@trash.net>
Userspace allows to specify inversion for IP header ECN matches, the
kernel silently accepts it, but doesn't invert the match result.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
net/ipv4/netfilter/ipt_ecn.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/netfilter/ipt_ecn.c b/net/ipv4/netfilter/ipt_ecn.c
index aaa85be..2b57e52 100644
--- a/net/ipv4/netfilter/ipt_ecn.c
+++ b/net/ipv4/netfilter/ipt_ecn.c
@@ -25,7 +25,8 @@ MODULE_LICENSE("GPL");
static inline bool match_ip(const struct sk_buff *skb,
const struct ipt_ecn_info *einfo)
{
- return (ip_hdr(skb)->tos & IPT_ECN_IP_MASK) == einfo->ip_ect;
+ return ((ip_hdr(skb)->tos & IPT_ECN_IP_MASK) == einfo->ip_ect) ^
+ !!(einfo->invert & IPT_ECN_OP_MATCH_IP);
}
static inline bool match_tcp(const struct sk_buff *skb,
--
1.7.2.3
^ permalink raw reply related
* [PATCH 1/6] IPVS netns exit causes crash in conntrack
From: kaber @ 2011-06-16 19:41 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev
In-Reply-To: <1308253301-29894-1-git-send-email-kaber@trash.net>
From: Hans Schillstrom <hans.schillstrom@ericsson.com>
Quote from Patric Mc Hardy
"This looks like nfnetlink.c excited and destroyed the nfnl socket, but
ip_vs was still holding a reference to a conntrack. When the conntrack
got destroyed it created a ctnetlink event, causing an oops in
netlink_has_listeners when trying to use the destroyed nfnetlink
socket."
If nf_conntrack_netlink is loaded before ip_vs this is not a problem.
This patch simply avoids calling ip_vs_conn_drop_conntrack()
when netns is dying as suggested by Julian.
Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
net/netfilter/ipvs/ip_vs_conn.c | 10 +++++++++-
net/netfilter/ipvs/ip_vs_core.c | 1 +
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index bf28ac2..782db27 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -776,8 +776,16 @@ static void ip_vs_conn_expire(unsigned long data)
if (cp->control)
ip_vs_control_del(cp);
- if (cp->flags & IP_VS_CONN_F_NFCT)
+ if (cp->flags & IP_VS_CONN_F_NFCT) {
ip_vs_conn_drop_conntrack(cp);
+ /* Do not access conntracks during subsys cleanup
+ * because nf_conntrack_find_get can not be used after
+ * conntrack cleanup for the net.
+ */
+ smp_rmb();
+ if (ipvs->enable)
+ ip_vs_conn_drop_conntrack(cp);
+ }
ip_vs_pe_put(cp->pe);
kfree(cp->pe_data);
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index 55af224..24c28d2 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1945,6 +1945,7 @@ static void __net_exit __ip_vs_dev_cleanup(struct net *net)
{
EnterFunction(2);
net_ipvs(net)->enable = 0; /* Disable packet reception */
+ smp_wmb();
__ip_vs_sync_cleanup(net);
LeaveFunction(2);
}
--
1.7.2.3
^ permalink raw reply related
* [PATCH 2/6] netfilter: ip_tables: fix compile with debug
From: kaber @ 2011-06-16 19:41 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev
In-Reply-To: <1308253301-29894-1-git-send-email-kaber@trash.net>
From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
net/ipv4/netfilter/ip_tables.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 7647438..24e556e 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -566,7 +566,7 @@ check_entry(const struct ipt_entry *e, const char *name)
const struct xt_entry_target *t;
if (!ip_checkentry(&e->ip)) {
- duprintf("ip check failed %p %s.\n", e, par->match->name);
+ duprintf("ip check failed %p %s.\n", e, name);
return -EINVAL;
}
--
1.7.2.3
^ permalink raw reply related
* [PATCH 5/6] netfilter: fix looped (broad|multi)cast's MAC handling
From: kaber @ 2011-06-16 19:41 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev
In-Reply-To: <1308253301-29894-1-git-send-email-kaber@trash.net>
From: Nicolas Cavallari <cavallar@lri.fr>
By default, when broadcast or multicast packet are sent from a local
application, they are sent to the interface then looped by the kernel
to other local applications, going throught netfilter hooks in the
process.
These looped packet have their MAC header removed from the skb by the
kernel looping code. This confuse various netfilter's netlink queue,
netlink log and the legacy ip_queue, because they try to extract a
hardware address from these packets, but extracts a part of the IP
header instead.
This patch prevent NFQUEUE, NFLOG and ip_QUEUE to include a MAC header
if there is none in the packet.
Signed-off-by: Nicolas Cavallari <cavallar@lri.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
net/ipv4/netfilter/ip_queue.c | 3 ++-
net/ipv6/netfilter/ip6_queue.c | 3 ++-
net/netfilter/nfnetlink_log.c | 3 ++-
net/netfilter/nfnetlink_queue.c | 3 ++-
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
index f7f9bd7..5c9b9d9 100644
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -203,7 +203,8 @@ ipq_build_packet_message(struct nf_queue_entry *entry, int *errp)
else
pmsg->outdev_name[0] = '\0';
- if (entry->indev && entry->skb->dev) {
+ if (entry->indev && entry->skb->dev &&
+ entry->skb->mac_header != entry->skb->network_header) {
pmsg->hw_type = entry->skb->dev->type;
pmsg->hw_addrlen = dev_parse_header(entry->skb,
pmsg->hw_addr);
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index 065fe40..2493948 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -204,7 +204,8 @@ ipq_build_packet_message(struct nf_queue_entry *entry, int *errp)
else
pmsg->outdev_name[0] = '\0';
- if (entry->indev && entry->skb->dev) {
+ if (entry->indev && entry->skb->dev &&
+ entry->skb->mac_header != entry->skb->network_header) {
pmsg->hw_type = entry->skb->dev->type;
pmsg->hw_addrlen = dev_parse_header(entry->skb, pmsg->hw_addr);
}
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index e0ee010..2e7ccbb 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -456,7 +456,8 @@ __build_packet_message(struct nfulnl_instance *inst,
if (skb->mark)
NLA_PUT_BE32(inst->skb, NFULA_MARK, htonl(skb->mark));
- if (indev && skb->dev) {
+ if (indev && skb->dev &&
+ skb->mac_header != skb->network_header) {
struct nfulnl_msg_packet_hw phw;
int len = dev_parse_header(skb, phw.hw_addr);
if (len > 0) {
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index b83123f..fdd2faf 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -335,7 +335,8 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
if (entskb->mark)
NLA_PUT_BE32(skb, NFQA_MARK, htonl(entskb->mark));
- if (indev && entskb->dev) {
+ if (indev && entskb->dev &&
+ entskb->mac_header != entskb->network_header) {
struct nfqnl_msg_packet_hw phw;
int len = dev_parse_header(entskb, phw.hw_addr);
if (len) {
--
1.7.2.3
^ permalink raw reply related
* [PATCH 3/6] netfilter: ipt_ecn: fix protocol check in ecn_mt_check()
From: kaber @ 2011-06-16 19:41 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev
In-Reply-To: <1308253301-29894-1-git-send-email-kaber@trash.net>
From: Patrick McHardy <kaber@trash.net>
Check for protocol inversion in ecn_mt_check() and remove the
unnecessary runtime check for IPPROTO_TCP in ecn_mt().
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
net/ipv4/netfilter/ipt_ecn.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/netfilter/ipt_ecn.c b/net/ipv4/netfilter/ipt_ecn.c
index af6e9c7..aaa85be 100644
--- a/net/ipv4/netfilter/ipt_ecn.c
+++ b/net/ipv4/netfilter/ipt_ecn.c
@@ -76,8 +76,6 @@ static bool ecn_mt(const struct sk_buff *skb, struct xt_action_param *par)
return false;
if (info->operation & (IPT_ECN_OP_MATCH_ECE|IPT_ECN_OP_MATCH_CWR)) {
- if (ip_hdr(skb)->protocol != IPPROTO_TCP)
- return false;
if (!match_tcp(skb, info, &par->hotdrop))
return false;
}
@@ -97,7 +95,7 @@ static int ecn_mt_check(const struct xt_mtchk_param *par)
return -EINVAL;
if (info->operation & (IPT_ECN_OP_MATCH_ECE|IPT_ECN_OP_MATCH_CWR) &&
- ip->proto != IPPROTO_TCP) {
+ (ip->proto != IPPROTO_TCP || ip->invflags & IPT_INV_PROTO)) {
pr_info("cannot match TCP bits in rule for non-tcp packets\n");
return -EINVAL;
}
--
1.7.2.3
^ permalink raw reply related
* Re: software iwarp stack update
From: Bart Van Assche @ 2011-06-16 18:06 UTC (permalink / raw)
To: Roland Dreier
Cc: Bernard Metzler, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <BANLkTi=2woNzF=GL3cT3NB_hye5JHfodMA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Thu, Jun 16, 2011 at 7:20 PM, Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org> wrote:
> It does seem we are missing an IB_MANDATORY_FUNC
> entry for modify_port in ib_device_check_mandatory; or on
> the flip side we are missing a check of modify_port and a
> -ENOSYS return... I guess modify_port does not really make
> sense for iWARP so probably the second option is better.
It's not just ib_modify_port() - there are several other functions in
the amso and cxgb* drivers that do nothing more than returning either
-ENOSYS or ERR_PTR(-ENOSYS).
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" 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: software iwarp stack update
From: Roland Dreier @ 2011-06-16 17:20 UTC (permalink / raw)
To: Bernard Metzler
Cc: Bart Van Assche, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <OFB7458EEB.BFB8A4EE-ONC12578B1.004026D1-C12578B1.0041190E-Xeyd2O9EBijQT0dZR+AlfA@public.gmane.org>
> I was expecting there is an ib_device->uverbs_cmd_mask
> flag which siw does not set... Unfortunately, it is not
> completely clear to me when a command mask bit is available
> and when the OFA core strictly expects a function pointer.
> Maybe there is some redundancy/inconsistency?
The uverbs_cmd_mask controls which commands userspace
can send down. A kernel consumer does not go through the
code that checks this mask.
It does seem we are missing an IB_MANDATORY_FUNC
entry for modify_port in ib_device_check_mandatory; or on
the flip side we are missing a check of modify_port and a
-ENOSYS return... I guess modify_port does not really make
sense for iWARP so probably the second option is better.
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" 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
* [PATCH] e1000: remove unnecessary code
From: Greg Dietsche @ 2011-06-16 17:09 UTC (permalink / raw)
To: jeffrey.t.kirsher, jesse.brandeburg, bruce.w.allan,
carolyn.wyborny, donald.c.skidmore, gregory.v.rose,
peter.p.waskiewicz.
Cc: e1000-devel, netdev, kernel-janitors, Greg Dietsche
Compile tested.
remove unnecessary code that matches this coccinelle pattern
if (...)
return ret;
return ret;
Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
---
drivers/net/e1000/e1000_hw.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 7501d97..1698622 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -3080,7 +3080,6 @@ s32 e1000_phy_hw_reset(struct e1000_hw *hw)
{
u32 ctrl, ctrl_ext;
u32 led_ctrl;
- s32 ret_val;
e_dbg("e1000_phy_hw_reset");
@@ -3126,11 +3125,7 @@ s32 e1000_phy_hw_reset(struct e1000_hw *hw)
}
/* Wait for FW to finish PHY configuration. */
- ret_val = e1000_get_phy_cfg_done(hw);
- if (ret_val != E1000_SUCCESS)
- return ret_val;
-
- return ret_val;
+ return e1000_get_phy_cfg_done(hw);
}
/**
--
1.7.2.5
^ permalink raw reply related
* [PATCH] net: icplus: remove unnecessary code
From: Greg Dietsche @ 2011-06-16 17:04 UTC (permalink / raw)
To: netdev
Cc: kernel-janitors, davem, peppe.cavallaro, u.kleine-koenig,
Greg Dietsche
Compile tested.
remove unnecessary code that matches this coccinelle pattern
if (...)
return ret;
return ret;
Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
---
drivers/net/phy/icplus.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c
index 9a09e24..d4cbc29 100644
--- a/drivers/net/phy/icplus.c
+++ b/drivers/net/phy/icplus.c
@@ -109,11 +109,7 @@ static int ip1001_config_init(struct phy_device *phydev)
value = phy_read(phydev, 16);
value |= 0x3;
- err = phy_write(phydev, 16, value);
- if (err < 0)
- return err;
-
- return err;
+ return phy_write(phydev, 16, value);
}
static int ip175c_read_status(struct phy_device *phydev)
--
1.7.2.5
^ permalink raw reply related
* Re: software iwarp stack update
From: Bart Van Assche @ 2011-06-16 16:54 UTC (permalink / raw)
To: Bernard Metzler; +Cc: linux-rdma, linux-rdma-owner, netdev
In-Reply-To: <OFB7458EEB.BFB8A4EE-ONC12578B1.004026D1-C12578B1.0041190E@ch.ibm.com>
On Thu, Jun 16, 2011 at 1:51 PM, Bernard Metzler <BMT@zurich.ibm.com> wrote:
> > Also, the following statement in siw_main.c:
> >
> > ibdev->modify_port = NULL;
>
> I was expecting there is an ib_device->uverbs_cmd_mask
> flag which siw does not set... Unfortunately, it is not
> completely clear to me when a command mask bit is available
> and when the OFA core strictly expects a function pointer.
> Maybe there is some redundancy/inconsistency?
If other iWARP drivers (amso, cxgb3) have a modify_port method, why
doesn't the siw driver have such a method ? I see this as a blocking
issue.
Bart.
^ permalink raw reply
* Re: [PATCH 06/11] drivers/net: use printk_ratelimited() instead of printk_ratelimit()
From: Joe Perches @ 2011-06-16 16:43 UTC (permalink / raw)
To: Manuel Zerpies
Cc: David S. Miller, David Decotigny, Hans J. Koch, Jiri Kosina,
Ben Pfaff, netdev, linux-kernel, christian.dietrich
In-Reply-To: <bbe5954082599bcf65e9fdf565df8b9646ec3e3b.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de>
On Thu, 2011-06-16 at 14:12 +0200, Manuel Zerpies wrote:
> Since printk_ratelimit() shouldn't be used anymore (see comment in
> include/linux/printk.h), replace it with printk_ratelimited()
[]
> diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c
[]
> @@ -536,8 +537,7 @@ static bool _sc92031_check_media(struct net_device *dev)
>
> netif_carrier_on(dev);
>
> - if (printk_ratelimit())
> - printk(KERN_INFO "%s: link up, %sMbps, %s-duplex\n",
> + printk_ratelimited(KERN_INFO "%s: link up, %sMbps, %s-duplex\n",
> dev->name,
> speed_100 ? "100" : "10",
> duplex_full ? "full" : "half");
All these might be better using net_ratelimit and netdev_<level>
if (net_ratelimit())
netdev_info(dev, "link up, %uMbps, %s-duplex\n",
speed_100 ? 100 : 10,
duplex_full ? "full" : "half");
> @@ -549,8 +549,7 @@ static bool _sc92031_check_media(struct net_device *dev)
>
> _sc92031_disable_tx_rx(dev);
>
> - if (printk_ratelimit())
> - printk(KERN_INFO "%s: link down\n", dev->name);
> + printk_ratelimited(KERN_INFO "%s: link down\n", dev->name);
etc...
netdev_<level>_ratelimited (and netdev_<level>_once)
could instead be added and used I suppose.
^ permalink raw reply
* Re: [PATCH 14/14] SIWv2: Documentation: siw.txt
From: Randy Dunlap @ 2011-06-16 16:10 UTC (permalink / raw)
To: Bernard Metzler; +Cc: netdev, linux-rdma
In-Reply-To: <1308228174-22788-1-git-send-email-bmt@zurich.ibm.com>
On Thu, 16 Jun 2011 14:42:54 +0200 Bernard Metzler wrote:
> ---
> Documentation/networking/siw.txt | 156 ++++++++++++++++++++++++++++++++++++++
> 1 files changed, 156 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/networking/siw.txt
>
> diff --git a/Documentation/networking/siw.txt b/Documentation/networking/siw.txt
> new file mode 100644
> index 0000000..805e21b
> --- /dev/null
> +++ b/Documentation/networking/siw.txt
> @@ -0,0 +1,156 @@
> +SoftiWARP: Software iWARP kernel driver module.
> +
> +General
> +-------
> +SoftiWARP (siw) implements the iWARP protocol suite (MPA/DDP/RDMAP,
> +IETF-RFC 5044/5041/5040) completely in software as a Linux kernel module.
> +siw runs on top of TCP kernel sockets and exports the Linux kernel ibverbs
> +RDMA interface. siw interfaces with the iwcm connection manager.
> +
> +
> +Transmit Path
> +-------------
> +If a send queue (SQ) work queue element gets posted, siw tries to send
> +it directly out of the application context. If the SQ was non-empty,
> +SQ processing is done asynchronously by a kernel worker thread. This
> +thread gets scheduled if the TCP socket signals new write space to
s/gets/is/
> +be available. If during send operation the socket send space becomes
> +exhausted, SQ processing is abandoned until new socket write space
> +becomes available.
> +
> +
> +Receive Path
> +------------
> +All application data is placed into target buffers within softirq
> +socket callback. Application notification is asynchronous.
> +
> +
> +User Interface
> +--------------
> +All user space fast path operations such as posting of work requests and
> +reaping of work completions currently involve a isynchronous call into
If you really mean "isynchronous", then it should be: an isynchronous call
but what is isynchronous?
> +the siw kernel module via ib_uverbs interface. Kernel/user-mapped send
> +and receive as well as completion queues are not part of the current code.
> +In particular, mapped completion queues may improve performance,
> +since reaping completion queue entries as well as re-arming
> +the completion queue could be done more efficiently.
> +
> +
> +Kernel Client Support
> +---------------------
> +To guarantee non-blocking fast path operations, for kernel clients
> +all work queue elements (send/receive/shared-receive queue) are
> +pre-allocated during connection resource setup.
> +
> +
> +Memory Management
> +-----------------
> +siw currently uses the ib_umem_get() function of the ib_core module
> +to pin memory for later use in data transfer operations. Transmit
> +and receive memory are checked against correct access permissions only
> +in the moment of access by the network input path or before pushing it
at the moment
> +to the TCP socket for transmission.
> +ib_umem_get() provides DMA mappings for the requested address space which
> +are not used by siw.
> +
> +
> +Module Parameters
> +-----------------
> +The following siw module parameters are recognized.
> +
> +loopback_enabled:
> + If set, siw attaches also to the looback device. Checked only
> + during module insertion.
> +
> +mpa_crc_required:
> + If set, the MPA CRC gets generated and checked both in tx and rx
s/gets/is/
> + path. Without hardware support, setting this flag will severely
> + hurt throughput. Default setting is 0 (off).
> +
> +mpa_crc_strict:
> + If set, MPA CRC will not be enabled, even if peer requests
> + it. If the peer requests CRC generation, the connection setup
> + will be aborted. Default setting is 1 (on).
> +
> +zcopy_tx:
> + If set, payload of non-signalled work requests
payloads ... are transferred
> + (such as non-signalled WRITE or SEND as well as all READ
> + responses) are transferred using the TCP sockets
> + sendpage interface. This parameter can be switched on and
> + off dynamically (echo 1 >> /sys/module/siw/parameters/zcopy_tx
> + for enablement, 0 for disabling). System load may benefits from
may benefit
> + using 0copy data transmission. 0copy is not enabled if
"0copy" is fugly (IMO).
> + mpa_crc_enabled is set. Default setting is 1 (on).
> +
> +tcp_nodelay:
> + If set, on the TCP socket the TCP_NODELAY option is set.
> + Default setting is 1 (on).
> +
> +iface_list:
> + Comma separated list of interfaces siw should attach to.
Comma-separated
> + If no list is given, siw attaches to all available devices.
> + If a list is given, siw skips those devices not listed.
> + Currently, the list is restricted to 12 entries. If needed,
> + the 'SIW_MAX_IF' #define in siw_main.c can be adaped.
adapted. ? (or modified)
> + This parameter might be usefull to skip devices which are
useful
> + attached to a real RNIC device. Default setting is an empty list.
> +
> +
> +Compile Time Flags:
> +-------------------
> +-DCHECK_DMA_CAPABILITIES
> + Checks if the device siw wants to attach to provides
> + DMA capabilities. While DMA capabilities are currently not
> + needed (siw works on top of a kernel TCP socket), siw
> + uses ib_umem_get() which performs a (not used) DMA address
> + translation. Writing a siw private memory reservation and
> + pinning routine would solve the issue.
> +
> +-DSIW_TX_FULLSEGS
> + Experimental, not enabled by default. If set,
> + siw tries not to overrun the socket (not sending until
> + -EAGAIN return), but stops sending if the current segment
> + would not fit into the socket's estimated tx buffer. With that,
> + wire FPDUs may get truncated by the TCP stack far less often.
> + Since this feature manipulates the sock's SOCK_NOSPACE
> + bit, it violates strict layering and is therefore considered
> + proprietary.
> + Since TCP is a byte stream protocol, no guarantee can be given
> + if FPDU's are not fragmented.
or FPDUs
> +
> +
> +Debugging SIW:
> +--------------
> +The siw_debug.h file defines a 'dprint' macro which is used to debug
> +siw at runtime. Verbosity of debugging is controlled at compile time
> +via setting the 'DPRINT_MASK' to a or'd list of know value as defined
to an or'd list of known value
> +in siw_debug.h, e.g. '#define DPRINT_MASK (DBG_ON|DBG_CM)' to debug
> +errors and connection management. Defining DPRINT_MASK to '0' avoids
> +to compile any runtime debugging code.
compiling any
> +
> +To track siw's useage of its objects (connection endpoints, tcp sockets,
usage
> +protection domains, queue pairs, shared receive queues, completion queues,
> +memory registrations, work queue elements), the /sys/class/infiniband/siw*
> +directory contains siw interface specific objects, which can be read to
> +gather simple statistics:
> +
> +/sys/class/infiniband/siw*/stats:
> + Summary of allocated WQE's, PD's, QP's, CQ's, SRQ's, MR's, CEP's.
All of those single quote/apostrophe marks are not needed.
> + WQE statistics are not gathered if 'DPRINT_MASK' is set to '0'
> + (see above).
> +
> +/sys/class/infiniband/siw*/qp:
> + Summary of allocated queue pairs. If queue pairs are allocated,
> + after reading 'qp' a more detailed status of all queue pairs has
> + been printed to the kernel syslog and can be retrieved via
> + 'dmesg' command.
> +
> +/sys/class/infiniband/siw*/cep:
> + Summary of allocated connection end points. If connection endpoints
> + are allocated, after reading 'cep' a more detailed status of all
> + CEP's is printed to the kernel syslog and can be retrieved via
ditto
> + 'dmesg' command.
> +
> +Using the sysfs to gather siw's object allocations is considered a
> +tentative aid during further driver development and should disappear
> +in a stable version of siw.
> --
HTH.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply
* Re: [PATCH 05/14] SIWv2: User interface: siw_verbs.h, siw_verbs.c, siw_user.h, siw_ae.c
From: Steve Wise @ 2011-06-16 15:53 UTC (permalink / raw)
To: Bernard Metzler
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1308228127-22634-1-git-send-email-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
<snip>
> +
> +/*
> + * siw_create_qp()
> + *
> + * Create QP of requested size on given device.
> + *
> + * @ofa_pd: OFA PD contained in siw PD
> + * @attrs: Initial QP attributes.
> + * @udata: used to provide QP ID, SQ and RQ size back to user.
> + */
> +
> +struct ib_qp *siw_create_qp(struct ib_pd *ofa_pd,
> + struct ib_qp_init_attr *attrs,
> + struct ib_udata *udata)
> +{
> + struct siw_qp *qp = NULL;
> + struct siw_pd *pd = siw_pd_ofa2siw(ofa_pd);
> + struct ib_device *ofa_dev = ofa_pd->device;
> + struct siw_dev *dev = siw_dev_ofa2siw(ofa_dev);
> + struct siw_cq *scq = NULL, *rcq = NULL;
> + struct siw_iwarp_tx *c_tx;
> + struct siw_iwarp_rx *c_rx;
> + struct siw_uresp_create_qp uresp;
> +
> + unsigned long flags;
> + int kernel_verbs = ofa_pd->uobject ? 0 : 1;
> + int rv = 0;
> +
> + dprint(DBG_OBJ|DBG_CM, ": new QP on device %s\n",
> + ofa_dev->name);
> +
> + if (atomic_inc_return(&dev->num_qp)> SIW_MAX_QP) {
> + dprint(DBG_ON, ": Out of QP's\n");
> + rv = -ENOMEM;
> + goto err_out;
> + }
> + if (attrs->qp_type != IB_QPT_RC) {
> + dprint(DBG_ON, ": Only RC QP's supported\n");
> + rv = -EINVAL;
> + goto err_out;
> + }
> + if ((attrs->cap.max_send_wr> SIW_MAX_QP_WR) ||
> + (attrs->cap.max_recv_wr> SIW_MAX_QP_WR) ||
> + (attrs->cap.max_send_sge> SIW_MAX_SGE) ||
> + (attrs->cap.max_recv_sge> SIW_MAX_SGE)) {
> + dprint(DBG_ON, ": QP Size!\n");
> + rv = -EINVAL;
> + goto err_out;
> + }
> + if (attrs->cap.max_inline_data> SIW_MAX_INLINE ||
> + (kernel_verbs&& attrs->cap.max_inline_data != 0)) {
> + dprint(DBG_ON, ": Max Inline Send %d> %d!\n",
> + attrs->cap.max_inline_data, SIW_MAX_INLINE);
> + rv = -EINVAL;
> + goto err_out;
Why no inline support for kernel users?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" 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: tc match MAC destination - nothing matches on protocol 802_3
From: Stephen Hemminger @ 2011-06-16 15:51 UTC (permalink / raw)
To: Doru Theodor Petrescu; +Cc: ierdnah, linux-kernel, netdev
In-Reply-To: <1308211012.12982.36365.camel@u.evox.ro>
On Thu, 16 Jun 2011 10:56:52 +0300
Doru Theodor Petrescu <pdoru.kernel@evox.ro> wrote:
>
>
> I updated my scripts to use the 'tc filter ... match ether src/dst'
> syntax. it really makes reading the script easier. thanks for the tip!
>
> however the problem persists. I changed the rule to match ANY pachet of
> type 802_3 and redirect it to ifb1. but nothing arrives on ifb1.
>
> I tried to redirect ARP pachets using 'protocol arp' filter and it works
> perfectly as expected.
>
> so at this point the problem is no longer 'how to match ethernet header'
> but rather 'how to match a pachet of type 802_3'. My feeling is that
> there is a bug somewhere in kernel where the 'protocol 802_3' matching
> happens.
>
>
> I attach part of the script I use to generate the filters and classes. I
> removed everything related to HTB and IP pachets because there is no
> problem there. in case the formating is lost, you can download it from
> here: http://evox.ro/kernel_netdev_tc_protocol_802.3/
>
>
> Thx for any help,
> Doru Theodor Petrescu
> CTO, Evox Solutions SRL
> http://evox.ro/
>
>
>
> for DEV in bond0.2199 bond1.2199 bond0.3000 bond1.3001 ; do
>
>
> tc qdisc del dev $DEV root
>
> tc qdisc add dev $DEV root handle 1: htb default 2
> tc class add dev $DEV parent 1: classid 1:1 htb rate 930000kbit ceil
> 930000kbit quantum 1600
>
> tc filter add dev $DEV parent 1: prio 5 protocol ip u32
> # ==> 800:
>
> tc filter add dev $DEV parent 1: prio 1 protocol 0x0806 u32
> # ==> 801: protocol ARP
> tc filter add dev $DEV parent 1: prio 1 handle 801:0:7 protocol
> 0x0806 u32 match u32 0 0 flowid 1:3
>
> tc filter add dev $DEV parent 1: prio 2 protocol 802_3 u32
> # ==> 802:
>
> tc filter add dev $DEV parent 1: prio 6 protocol ip u32
> # ==> 803:
>
>
> tc filter replace dev $DEV parent 1: prio 2 handle 802:0:3 protocol
> 802_3 u32 match u16 0 0 at 0 flowid 1:3 action mirred egress mirror dev
> ifb1
> tc filter replace dev $DEV parent 1: prio 2 handle 802:0:9 protocol
> 802_3 u32 match ether src 01:00:0c:cc:cc:cd flowid 1:3 action mirred
> egress mirror dev ifb1
> tc filter replace dev $DEV parent 1: prio 2 handle 802:0:10 protocol
> 802_3 u32 match ether dst 01:00:0c:cc:cc:cd flowid 1:3 action mirred
> egress mirror dev ifb1
>
> done
>
>
> # the 802_3 pachet filter:
> #
> # 802:0:3 should match ANY pachet of type 802_3 and mirror it to ifb1
> # 802:0:9 and 802:0:10 should match any pachet with src/dst
> 01:00:0c:cc:cc:cd and mirror it to ifb1
> #
> # however NOTHING is going to ifb1 try 'tcpdump -nltve -i ifb1'
> # at the same time 'tcpdump -nltve -i bond1.2199 ether host
> 0100.0ccc.cccd' will show about one pachet every second
> #
>
>
> # at the same time the ARP filter works. you can mirror all ARP trafic
> to IFB1 like this:
> # tc filter replace dev $DEV parent 1: prio 1 handle 801:0:7 protocol
> 0x0806 u32 match u32 0 0 flowid 1:3 action mirred egress mirror dev
> ifb1
I think you want 802_2 to match STP frames. 802_3 is a dummy value
for the old Novell IPX encapsulation
^ permalink raw reply
* Re: [PATCH 001/001] forcedeth: Don't enable hardware vlan support on hardware that doesn't support it
From: Stephen Hemminger @ 2011-06-16 15:42 UTC (permalink / raw)
To: Antoine Reversat; +Cc: Stephen Hemminger, netdev
In-Reply-To: <BANLkTimqAXLDZ8cev5dgUTDR3pg-_Y3XUA@mail.gmail.com>
On Wed, 15 Jun 2011 17:08:18 -0400
Antoine Reversat <a.reversat@gmail.com> wrote:
> On Wed, Jun 15, 2011 at 4:53 PM, Stephen Hemminger
> <stephen.hemminger@vyatta.com> wrote:
> >
> > This shouldn't be necessary. rx_register should not be called
> > unless NETIF_F_HW_VLAN_RX is set; and device should not be setting
> > NETIF_F_HW_VLAN_RX unless DEV_HAS_VLAN is set.
>
> I can confirm that rx_register gets called on hardware that doesn't
> have vlan support (namely MCP79).
>
> From what I can see in vlan.c (in register_vlan_dev) there is no check
> on the features of the device before calling the register function :
>
> if (ngrp) {
> if (ops->ndo_vlan_rx_register)
> ops->ndo_vlan_rx_register(real_dev, ngrp);
> rcu_assign_pointer(real_dev->vlgrp, ngrp);
> }
>
> If the function exists, it's called. Should I send a patch to call the
> function only if the hardware supports it ?
>
> >
> > The real problem is vlan_dev.c, and applies to all devices.
That is was suggesting because other drivers may have the same issue
where they need to define rx_register for some hardware and control
usage of vlan by the feature bits.
^ permalink raw reply
* Re: [PATCH v2] netfilter: avoid double seq_adjust for loopback
From: Patrick McHardy @ 2011-06-16 15:30 UTC (permalink / raw)
To: Julian Anastasov; +Cc: Pablo Neira Ayuso, netfilter-devel, netdev
In-Reply-To: <alpine.LFD.2.00.1106080926320.1457@ja.ssi.bg>
On 08.06.2011 08:31, Julian Anastasov wrote:
> Avoid double seq adjustment for loopback traffic
> because it causes silent repetition of TCP data. One
> example is passive FTP with DNAT rule and difference in the
> length of IP addresses.
>
> This patch adds check if packet is sent and
> received via loopback device. As the same conntrack is
> used both for outgoing and incoming direction, we restrict
> seq adjustment to happen only in POSTROUTING.
>
> Signed-off-by: Julian Anastasov <ja@ssi.bg>
Applied, thanks Julian.
^ permalink raw reply
* Re: [PATCH] netfilter: fix looped (broad|multi)cast's MAC handling.
From: Patrick McHardy @ 2011-06-16 15:27 UTC (permalink / raw)
To: Nicolas Cavallari; +Cc: fw, netfilter-devel, netdev, Nicolas Cavallari
In-Reply-To: <1307690440-18760-1-git-send-email-cavallar@lri.fr>
On 10.06.2011 09:20, Nicolas Cavallari wrote:
> By default, when broadcast or multicast packet are sent from a local
> application, they are sent to the interface then looped by the kernel
> to other local applications, going throught netfilter hooks in the process.
>
> These looped packet have their MAC header removed from the skb by the kernel
> looping code.
> This confuse various netfilter's netlink queue, netlink log and the
> legacy ip_queue, because they try to extract a hardware
> address from these packets, but extracts a part of the IP header instead.
>
> This patch prevent NFQUEUE, NFLOG and ip_QUEUE to include a MAC header
> if there is none in the packet.
Applied, thanks Nicolas.
^ permalink raw reply
* Re: [PATCH net-next 2/2] drivers/net: Remove casts of void *
From: Jon Mason @ 2011-06-16 15:23 UTC (permalink / raw)
To: Joe Perches
Cc: netdev, Arnaldo Carvalho de Melo, Jay Cliburn, Chris Snook,
Jie Yang, Sathya Perla, Subbu Seetharaman, Ajit Khaparde,
Rasesh Mody, Debashis Dutt, Sjur Braendeland, Divy Le Ray,
Breno Leitao, Amit Kumar Salecha, Ron Mercer, linux-driver,
Anirban Chakraborty, Solarflare linux maintainers, Steve Hodgson,
Ben Hutchings, Daniele Venzano, David Dillow
In-Reply-To: <486a21b708a9dce0c1c0059a21a2f9b66dac9e3c.1308024069.git.joe@perches.com>
On Mon, Jun 13, 2011 at 11:02 PM, Joe Perches <joe@perches.com> wrote:
> Unnecessary casts of void * clutter the code.
>
> These are the remainder casts after several specific
> patches to remove netdev_priv and dev_priv.
>
> Done via coccinelle script:
>
> $ cat cast_void_pointer.cocci
> @@
> type T;
> T *pt;
> void *pv;
> @@
>
> - pt = (T *)pv;
> + pt = pv;
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/net/a2065.c | 2 +-
> drivers/net/appletalk/ltpc.c | 8 +++---
> drivers/net/atl1e/atl1e_main.c | 5 +--
> drivers/net/atlx/atl2.c | 3 +-
> drivers/net/benet/be_cmds.c | 3 +-
> drivers/net/benet/be_ethtool.c | 4 +-
> drivers/net/bna/bfa_cee.c | 2 +-
> drivers/net/bna/cna.h | 2 +-
> drivers/net/caif/caif_shmcore.c | 2 +-
> drivers/net/cnic.c | 4 +-
> drivers/net/cxgb3/cxgb3_offload.c | 2 +-
> drivers/net/davinci_cpdma.c | 2 +-
> drivers/net/declance.c | 38 +++++++++++++++++------------
> drivers/net/depca.c | 4 +-
> drivers/net/dl2k.c | 4 +-
> drivers/net/ehea/ehea_qmr.c | 2 +-
> drivers/net/epic100.c | 4 +-
> drivers/net/fealnx.c | 4 +-
> drivers/net/gianfar.c | 4 +-
> drivers/net/hamachi.c | 4 +-
> drivers/net/macmace.c | 2 +-
> drivers/net/mlx4/en_rx.c | 2 +-
> drivers/net/mlx4/en_tx.c | 5 +--
> drivers/net/myri_sbus.c | 3 +-
> drivers/net/netxen/netxen_nic_ctx.c | 16 ++++++------
> drivers/net/pxa168_eth.c | 2 +-
> drivers/net/qla3xxx.c | 5 +--
> drivers/net/qlcnic/qlcnic_ctx.c | 26 ++++++++++----------
> drivers/net/qlcnic/qlcnic_ethtool.c | 2 +-
> drivers/net/qlcnic/qlcnic_hw.c | 3 +-
> drivers/net/qlcnic/qlcnic_main.c | 2 +-
> drivers/net/qlge/qlge_main.c | 4 +-
> drivers/net/s2io.c | 18 +++++--------
> drivers/net/sfc/siena.c | 2 +-
> drivers/net/sis900.c | 4 +-
> drivers/net/tokenring/madgemc.c | 2 +-
> drivers/net/typhoon.c | 2 +-
> drivers/net/vxge/vxge-config.c | 44 ++++++++++++-----------------------
> drivers/net/vxge/vxge-traffic.c | 6 ++--
> drivers/net/wan/pc300_tty.c | 2 +-
> drivers/net/xilinx_emaclite.c | 4 +-
> drivers/net/yellowfin.c | 6 ++--
> 42 files changed, 123 insertions(+), 142 deletions(-)
>
> diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c
> index deaa8bc..0230fc2 100644
> --- a/drivers/net/a2065.c
> +++ b/drivers/net/a2065.c
> @@ -426,7 +426,7 @@ static irqreturn_t lance_interrupt (int irq, void *dev_id)
> volatile struct lance_regs *ll;
> int csr0;
>
> - dev = (struct net_device *) dev_id;
> + dev = dev_id;
>
> lp = netdev_priv(dev);
> ll = lp->ll;
> diff --git a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c
> index e69eead..34ffb54 100644
> --- a/drivers/net/appletalk/ltpc.c
> +++ b/drivers/net/appletalk/ltpc.c
> @@ -652,9 +652,9 @@ static int do_write(struct net_device *dev, void *cbuf, int cbuflen,
> int ret;
>
> if(i) {
> - qels[i].cbuf = (unsigned char *) cbuf;
> + qels[i].cbuf = cbuf;
> qels[i].cbuflen = cbuflen;
> - qels[i].dbuf = (unsigned char *) dbuf;
> + qels[i].dbuf = dbuf;
> qels[i].dbuflen = dbuflen;
> qels[i].QWrite = 1;
> qels[i].mailbox = i; /* this should be initted rather */
> @@ -676,9 +676,9 @@ static int do_read(struct net_device *dev, void *cbuf, int cbuflen,
> int ret;
>
> if(i) {
> - qels[i].cbuf = (unsigned char *) cbuf;
> + qels[i].cbuf = cbuf;
> qels[i].cbuflen = cbuflen;
> - qels[i].dbuf = (unsigned char *) dbuf;
> + qels[i].dbuf = dbuf;
> qels[i].dbuflen = dbuflen;
> qels[i].QWrite = 0;
> qels[i].mailbox = i; /* this should be initted rather */
> diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
> index 86a9122..c3c5db1 100644
> --- a/drivers/net/atl1e/atl1e_main.c
> +++ b/drivers/net/atl1e/atl1e_main.c
> @@ -800,8 +800,7 @@ static int atl1e_setup_ring_resources(struct atl1e_adapter *adapter)
> /* Init TPD Ring */
> tx_ring->dma = roundup(adapter->ring_dma, 8);
> offset = tx_ring->dma - adapter->ring_dma;
> - tx_ring->desc = (struct atl1e_tpd_desc *)
> - (adapter->ring_vir_addr + offset);
> + tx_ring->desc = adapter->ring_vir_addr + offset;
> size = sizeof(struct atl1e_tx_buffer) * (tx_ring->count);
> tx_ring->tx_buffer = kzalloc(size, GFP_KERNEL);
> if (tx_ring->tx_buffer == NULL) {
> @@ -827,7 +826,7 @@ static int atl1e_setup_ring_resources(struct atl1e_adapter *adapter)
>
> /* Init CMB dma address */
> tx_ring->cmb_dma = adapter->ring_dma + offset;
> - tx_ring->cmb = (u32 *)(adapter->ring_vir_addr + offset);
> + tx_ring->cmb = adapter->ring_vir_addr + offset;
> offset += sizeof(u32);
>
> for (i = 0; i < adapter->num_rx_queues; i++) {
> diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
> index 16249e9..24e1592 100644
> --- a/drivers/net/atlx/atl2.c
> +++ b/drivers/net/atlx/atl2.c
> @@ -311,8 +311,7 @@ static s32 atl2_setup_ring_resources(struct atl2_adapter *adapter)
> adapter->txd_dma = adapter->ring_dma ;
> offset = (adapter->txd_dma & 0x7) ? (8 - (adapter->txd_dma & 0x7)) : 0;
> adapter->txd_dma += offset;
> - adapter->txd_ring = (struct tx_pkt_header *) (adapter->ring_vir_addr +
> - offset);
> + adapter->txd_ring = adapter->ring_vir_addr + offset;
>
> /* Init TXS Ring */
> adapter->txs_dma = adapter->txd_dma + adapter->txd_ring_size;
> diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
> index 0c12c2d..30719f5 100644
> --- a/drivers/net/benet/be_cmds.c
> +++ b/drivers/net/benet/be_cmds.c
> @@ -2334,8 +2334,7 @@ int be_cmd_get_cntl_attributes(struct be_adapter *adapter)
>
> status = be_mbox_notify_wait(adapter);
> if (!status) {
> - attribs = (struct mgmt_controller_attrib *)( attribs_cmd.va +
> - sizeof(struct be_cmd_resp_hdr));
> + attribs = attribs_cmd.va + sizeof(struct be_cmd_resp_hdr);
> adapter->hba_port_num = attribs->hba_attribs.phy_port;
> }
>
> diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c
> index facfe3c..5572c78 100644
> --- a/drivers/net/benet/be_ethtool.c
> +++ b/drivers/net/benet/be_ethtool.c
> @@ -386,7 +386,7 @@ static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
> }
> status = be_cmd_get_phy_info(adapter, &phy_cmd);
> if (!status) {
> - resp = (struct be_cmd_resp_get_phy_info *) phy_cmd.va;
> + resp = phy_cmd.va;
> intf_type = le16_to_cpu(resp->interface_type);
>
> switch (intf_type) {
> @@ -690,7 +690,7 @@ be_read_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom,
> status = be_cmd_get_seeprom_data(adapter, &eeprom_cmd);
>
> if (!status) {
> - resp = (struct be_cmd_resp_seeprom_read *) eeprom_cmd.va;
> + resp = eeprom_cmd.va;
> memcpy(data, resp->seeprom_data + eeprom->offset, eeprom->len);
> }
> dma_free_coherent(&adapter->pdev->dev, eeprom_cmd.size, eeprom_cmd.va,
> diff --git a/drivers/net/bna/bfa_cee.c b/drivers/net/bna/bfa_cee.c
> index f7b789a..dcfbf08 100644
> --- a/drivers/net/bna/bfa_cee.c
> +++ b/drivers/net/bna/bfa_cee.c
> @@ -236,7 +236,7 @@ static void
> bfa_cee_hbfail(void *arg)
> {
> struct bfa_cee *cee;
> - cee = (struct bfa_cee *) arg;
> + cee = arg;
>
> if (cee->get_attr_pending == true) {
> cee->get_attr_status = BFA_STATUS_FAILED;
> diff --git a/drivers/net/bna/cna.h b/drivers/net/bna/cna.h
> index bbd39dc..3c47dc5 100644
> --- a/drivers/net/bna/cna.h
> +++ b/drivers/net/bna/cna.h
> @@ -74,7 +74,7 @@ typedef struct mac { u8 mac[MAC_ADDRLEN]; } mac_t;
> bfa_q_next(_q) = bfa_q_next(*((struct list_head **) _qe)); \
> bfa_q_qe_init(*((struct list_head **) _qe)); \
> } else { \
> - *((struct list_head **) (_qe)) = (struct list_head *) NULL; \
> + *((struct list_head **)(_qe)) = NULL; \
> } \
> }
>
> diff --git a/drivers/net/caif/caif_shmcore.c b/drivers/net/caif/caif_shmcore.c
> index 731aa11..d4b26fb 100644
> --- a/drivers/net/caif/caif_shmcore.c
> +++ b/drivers/net/caif/caif_shmcore.c
> @@ -134,7 +134,7 @@ int caif_shmdrv_rx_cb(u32 mbx_msg, void *priv)
> u32 avail_emptybuff = 0;
> unsigned long flags = 0;
>
> - pshm_drv = (struct shmdrv_layer *)priv;
> + pshm_drv = priv;
>
> /* Check for received buffers. */
> if (mbx_msg & SHM_FULL_MASK) {
> diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
> index 363c7f3..8548cbe 100644
> --- a/drivers/net/cnic.c
> +++ b/drivers/net/cnic.c
> @@ -4290,7 +4290,7 @@ static void cnic_init_bnx2_tx_ring(struct cnic_dev *dev)
> val = BNX2_L2CTX_CMD_TYPE_TYPE_L2 | (8 << 16);
> cnic_ctx_wr(dev, cid_addr, offset1, val);
>
> - txbd = (struct tx_bd *) udev->l2_ring;
> + txbd = udev->l2_ring;
>
> buf_map = udev->l2_buf_map;
> for (i = 0; i < MAX_TX_DESC_CNT; i++, txbd++) {
> @@ -4349,7 +4349,7 @@ static void cnic_init_bnx2_rx_ring(struct cnic_dev *dev)
> val = BNX2_L2CTX_L2_STATUSB_NUM(sb_id);
> cnic_ctx_wr(dev, cid_addr, BNX2_L2CTX_HOST_BDIDX, val);
>
> - rxbd = (struct rx_bd *) (udev->l2_ring + BCM_PAGE_SIZE);
> + rxbd = udev->l2_ring + BCM_PAGE_SIZE;
> for (i = 0; i < MAX_RX_DESC_CNT; i++, rxbd++) {
> dma_addr_t buf_map;
> int n = (i % cp->l2_rx_ring_size) + 1;
> diff --git a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c
> index 862804f..9db9068 100644
> --- a/drivers/net/cxgb3/cxgb3_offload.c
> +++ b/drivers/net/cxgb3/cxgb3_offload.c
> @@ -567,7 +567,7 @@ static void t3_process_tid_release_list(struct work_struct *work)
> while (td->tid_release_list) {
> struct t3c_tid_entry *p = td->tid_release_list;
>
> - td->tid_release_list = (struct t3c_tid_entry *)p->ctx;
> + td->tid_release_list = p->ctx;
> spin_unlock_bh(&td->tid_release_lock);
>
> skb = alloc_skb(sizeof(struct cpl_tid_release),
> diff --git a/drivers/net/davinci_cpdma.c b/drivers/net/davinci_cpdma.c
> index ae47f23..dca9d33 100644
> --- a/drivers/net/davinci_cpdma.c
> +++ b/drivers/net/davinci_cpdma.c
> @@ -167,7 +167,7 @@ cpdma_desc_pool_create(struct device *dev, u32 phys, u32 hw_addr,
> } else {
> pool->cpumap = dma_alloc_coherent(dev, size, &pool->phys,
> GFP_KERNEL);
> - pool->iomap = (void __force __iomem *)pool->cpumap;
> + pool->iomap = pool->cpumap;
> pool->hw_addr = pool->phys;
> }
>
> diff --git a/drivers/net/declance.c b/drivers/net/declance.c
> index 219eb5a..cabd3a5 100644
> --- a/drivers/net/declance.c
> +++ b/drivers/net/declance.c
> @@ -326,15 +326,18 @@ static void load_csrs(struct lance_private *lp)
> */
> static void cp_to_buf(const int type, void *to, const void *from, int len)
> {
> - unsigned short *tp, *fp, clen;
> - unsigned char *rtp, *rfp;
> + unsigned short *tp;
> + const unsigned short *fp;
> + unsigned short clen;
> + unsigned char *rtp;
> + const unsigned char *rfp;
>
> if (type == PMAD_LANCE) {
> memcpy(to, from, len);
> } else if (type == PMAX_LANCE) {
> clen = len >> 1;
> - tp = (unsigned short *) to;
> - fp = (unsigned short *) from;
> + tp = to;
> + fp = from;
>
> while (clen--) {
> *tp++ = *fp++;
> @@ -342,8 +345,8 @@ static void cp_to_buf(const int type, void *to, const void *from, int len)
> }
>
> clen = len & 1;
> - rtp = (unsigned char *) tp;
> - rfp = (unsigned char *) fp;
> + rtp = tp;
> + rfp = fp;
> while (clen--) {
> *rtp++ = *rfp++;
> }
> @@ -352,8 +355,8 @@ static void cp_to_buf(const int type, void *to, const void *from, int len)
> * copy 16 Byte chunks
> */
> clen = len >> 4;
> - tp = (unsigned short *) to;
> - fp = (unsigned short *) from;
> + tp = to;
> + fp = from;
> while (clen--) {
> *tp++ = *fp++;
> *tp++ = *fp++;
> @@ -382,15 +385,18 @@ static void cp_to_buf(const int type, void *to, const void *from, int len)
>
> static void cp_from_buf(const int type, void *to, const void *from, int len)
> {
> - unsigned short *tp, *fp, clen;
> - unsigned char *rtp, *rfp;
> + unsigned short *tp;
> + const unsigned short *fp;
> + unsigned short clen;
> + unsigned char *rtp;
> + const unsigned char *rfp;
>
> if (type == PMAD_LANCE) {
> memcpy(to, from, len);
> } else if (type == PMAX_LANCE) {
> clen = len >> 1;
> - tp = (unsigned short *) to;
> - fp = (unsigned short *) from;
> + tp = to;
> + fp = from;
> while (clen--) {
> *tp++ = *fp++;
> fp++;
> @@ -398,8 +404,8 @@ static void cp_from_buf(const int type, void *to, const void *from, int len)
>
> clen = len & 1;
>
> - rtp = (unsigned char *) tp;
> - rfp = (unsigned char *) fp;
> + rtp = tp;
> + rfp = fp;
>
> while (clen--) {
> *rtp++ = *rfp++;
> @@ -410,8 +416,8 @@ static void cp_from_buf(const int type, void *to, const void *from, int len)
> * copy 16 Byte chunks
> */
> clen = len >> 4;
> - tp = (unsigned short *) to;
> - fp = (unsigned short *) from;
> + tp = to;
> + fp = from;
> while (clen--) {
> *tp++ = *fp++;
> *tp++ = *fp++;
> diff --git a/drivers/net/depca.c b/drivers/net/depca.c
> index 8b0084d..d54a0e9 100644
> --- a/drivers/net/depca.c
> +++ b/drivers/net/depca.c
> @@ -708,11 +708,11 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
>
> /* Tx & Rx descriptors (aligned to a quadword boundary) */
> offset = (offset + DEPCA_ALIGN) & ~DEPCA_ALIGN;
> - lp->rx_ring = (struct depca_rx_desc __iomem *) (lp->sh_mem + offset);
> + lp->rx_ring = lp->sh_mem + offset;
> lp->rx_ring_offset = offset;
>
> offset += (sizeof(struct depca_rx_desc) * NUM_RX_DESC);
> - lp->tx_ring = (struct depca_tx_desc __iomem *) (lp->sh_mem + offset);
> + lp->tx_ring = lp->sh_mem + offset;
> lp->tx_ring_offset = offset;
>
> offset += (sizeof(struct depca_tx_desc) * NUM_TX_DESC);
> diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c
> index c445457..05e64b2 100644
> --- a/drivers/net/dl2k.c
> +++ b/drivers/net/dl2k.c
> @@ -221,13 +221,13 @@ rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent)
> ring_space = pci_alloc_consistent (pdev, TX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_iounmap;
> - np->tx_ring = (struct netdev_desc *) ring_space;
> + np->tx_ring = ring_space;
> np->tx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent (pdev, RX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_unmap_tx;
> - np->rx_ring = (struct netdev_desc *) ring_space;
> + np->rx_ring = ring_space;
> np->rx_ring_dma = ring_dma;
>
> /* Parse eeprom data */
> diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c
> index cd44bb8..95b9f4f 100644
> --- a/drivers/net/ehea/ehea_qmr.c
> +++ b/drivers/net/ehea/ehea_qmr.c
> @@ -331,7 +331,7 @@ struct ehea_eqe *ehea_poll_eq(struct ehea_eq *eq)
> unsigned long flags;
>
> spin_lock_irqsave(&eq->spinlock, flags);
> - eqe = (struct ehea_eqe *)hw_eqit_eq_get_inc_valid(&eq->hw_queue);
> + eqe = hw_eqit_eq_get_inc_valid(&eq->hw_queue);
> spin_unlock_irqrestore(&eq->spinlock, flags);
>
> return eqe;
> diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c
> index c353bf3..814c187 100644
> --- a/drivers/net/epic100.c
> +++ b/drivers/net/epic100.c
> @@ -391,13 +391,13 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
> ring_space = pci_alloc_consistent(pdev, TX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_iounmap;
> - ep->tx_ring = (struct epic_tx_desc *)ring_space;
> + ep->tx_ring = ring_space;
> ep->tx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pdev, RX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_unmap_tx;
> - ep->rx_ring = (struct epic_rx_desc *)ring_space;
> + ep->rx_ring = ring_space;
> ep->rx_ring_dma = ring_dma;
>
> if (dev->mem_start) {
> diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c
> index dd54abe..fa8677c 100644
> --- a/drivers/net/fealnx.c
> +++ b/drivers/net/fealnx.c
> @@ -566,7 +566,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
> err = -ENOMEM;
> goto err_out_free_dev;
> }
> - np->rx_ring = (struct fealnx_desc *)ring_space;
> + np->rx_ring = ring_space;
> np->rx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pdev, TX_TOTAL_SIZE, &ring_dma);
> @@ -574,7 +574,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
> err = -ENOMEM;
> goto err_out_free_rx;
> }
> - np->tx_ring = (struct fealnx_desc *)ring_space;
> + np->tx_ring = ring_space;
> np->tx_ring_dma = ring_dma;
>
> /* find the connected MII xcvrs */
> diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
> index ff60b23..3564551 100644
> --- a/drivers/net/gianfar.c
> +++ b/drivers/net/gianfar.c
> @@ -266,7 +266,7 @@ static int gfar_alloc_skb_resources(struct net_device *ndev)
>
> for (i = 0; i < priv->num_tx_queues; i++) {
> tx_queue = priv->tx_queue[i];
> - tx_queue->tx_bd_base = (struct txbd8 *) vaddr;
> + tx_queue->tx_bd_base = vaddr;
> tx_queue->tx_bd_dma_base = addr;
> tx_queue->dev = ndev;
> /* enet DMA only understands physical addresses */
> @@ -277,7 +277,7 @@ static int gfar_alloc_skb_resources(struct net_device *ndev)
> /* Start the rx descriptor ring where the tx ring leaves off */
> for (i = 0; i < priv->num_rx_queues; i++) {
> rx_queue = priv->rx_queue[i];
> - rx_queue->rx_bd_base = (struct rxbd8 *) vaddr;
> + rx_queue->rx_bd_base = vaddr;
> rx_queue->rx_bd_dma_base = addr;
> rx_queue->dev = ndev;
> addr += sizeof (struct rxbd8) * rx_queue->rx_ring_size;
> diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c
> index a09041a..c274b3d 100644
> --- a/drivers/net/hamachi.c
> +++ b/drivers/net/hamachi.c
> @@ -648,13 +648,13 @@ static int __devinit hamachi_init_one (struct pci_dev *pdev,
> ring_space = pci_alloc_consistent(pdev, TX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_cleardev;
> - hmp->tx_ring = (struct hamachi_desc *)ring_space;
> + hmp->tx_ring = ring_space;
> hmp->tx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pdev, RX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_unmap_tx;
> - hmp->rx_ring = (struct hamachi_desc *)ring_space;
> + hmp->rx_ring = ring_space;
> hmp->rx_ring_dma = ring_dma;
>
> /* Check for options being passed in */
> diff --git a/drivers/net/macmace.c b/drivers/net/macmace.c
> index c685a46..4286e67 100644
> --- a/drivers/net/macmace.c
> +++ b/drivers/net/macmace.c
> @@ -221,7 +221,7 @@ static int __devinit mace_probe(struct platform_device *pdev)
> SET_NETDEV_DEV(dev, &pdev->dev);
>
> dev->base_addr = (u32)MACE_BASE;
> - mp->mace = (volatile struct mace *) MACE_BASE;
> + mp->mace = MACE_BASE;
>
> dev->irq = IRQ_MAC_MACE;
> mp->dma_intr = IRQ_MAC_MACE_DMA;
> diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c
> index 277215f..5197b50 100644
> --- a/drivers/net/mlx4/en_rx.c
> +++ b/drivers/net/mlx4/en_rx.c
> @@ -859,7 +859,7 @@ int mlx4_en_config_rss_steer(struct mlx4_en_priv *priv)
> priv->rx_ring[0].cqn, &context);
>
> ptr = ((void *) &context) + 0x3c;
> - rss_context = (struct mlx4_en_rss_context *) ptr;
> + rss_context = ptr;
> rss_context->base_qpn = cpu_to_be32(ilog2(priv->rx_ring_num) << 24 |
> (rss_map->base_qpn));
> rss_context->default_qpn = cpu_to_be32(rss_map->base_qpn);
> diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c
> index b229acf..6e03de0 100644
> --- a/drivers/net/mlx4/en_tx.c
> +++ b/drivers/net/mlx4/en_tx.c
> @@ -238,8 +238,7 @@ static u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv,
> } else {
> if (!tx_info->inl) {
> if ((void *) data >= end) {
> - data = (struct mlx4_wqe_data_seg *)
> - (ring->buf + ((void *) data - end));
> + data = ring->buf + ((void *)data - end);
> }
>
> if (tx_info->linear) {
> @@ -253,7 +252,7 @@ static u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv,
> for (i = 0; i < frags; i++) {
> /* Check for wraparound before unmapping */
> if ((void *) data >= end)
> - data = (struct mlx4_wqe_data_seg *) ring->buf;
> + data = ring->buf;
> frag = &skb_shinfo(skb)->frags[i];
> pci_unmap_page(mdev->pdev,
> (dma_addr_t) be64_to_cpu(data->addr),
> diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c
> index 53aeea4..0f4cb88 100644
> --- a/drivers/net/myri_sbus.c
> +++ b/drivers/net/myri_sbus.c
> @@ -1041,8 +1041,7 @@ static int __devinit myri_sbus_probe(struct platform_device *op)
>
> DET(("Shared memory base is %04x, ", mp->shmem_base));
>
> - mp->shmem = (struct myri_shmem __iomem *)
> - (mp->lanai + (mp->shmem_base * 2));
> + mp->shmem = mp->lanai + (mp->shmem_base * 2);
> DET(("shmem mapped at %p\n", mp->shmem));
>
> mp->rqack = &mp->shmem->channel.recvqa;
> diff --git a/drivers/net/netxen/netxen_nic_ctx.c b/drivers/net/netxen/netxen_nic_ctx.c
> index f16966a..a925392 100644
> --- a/drivers/net/netxen/netxen_nic_ctx.c
> +++ b/drivers/net/netxen/netxen_nic_ctx.c
> @@ -163,7 +163,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_adapter *adapter)
> rq_size, &hostrq_phys_addr);
> if (addr == NULL)
> return -ENOMEM;
> - prq = (nx_hostrq_rx_ctx_t *)addr;
> + prq = addr;
>
> addr = pci_alloc_consistent(adapter->pdev,
> rsp_size, &cardrsp_phys_addr);
> @@ -171,7 +171,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_adapter *adapter)
> err = -ENOMEM;
> goto out_free_rq;
> }
> - prsp = (nx_cardrsp_rx_ctx_t *)addr;
> + prsp = addr;
>
> prq->host_rsp_dma_addr = cpu_to_le64(cardrsp_phys_addr);
>
> @@ -318,10 +318,10 @@ nx_fw_cmd_create_tx_ctx(struct netxen_adapter *adapter)
> }
>
> memset(rq_addr, 0, rq_size);
> - prq = (nx_hostrq_tx_ctx_t *)rq_addr;
> + prq = rq_addr;
>
> memset(rsp_addr, 0, rsp_size);
> - prsp = (nx_cardrsp_tx_ctx_t *)rsp_addr;
> + prsp = rsp_addr;
>
> prq->host_rsp_dma_addr = cpu_to_le64(rsp_phys_addr);
>
> @@ -629,7 +629,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
> }
>
> memset(addr, 0, sizeof(struct netxen_ring_ctx));
> - recv_ctx->hwctx = (struct netxen_ring_ctx *)addr;
> + recv_ctx->hwctx = addr;
> recv_ctx->hwctx->ctx_id = cpu_to_le32(port);
> recv_ctx->hwctx->cmd_consumer_offset =
> cpu_to_le64(recv_ctx->phys_addr +
> @@ -648,7 +648,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
> goto err_out_free;
> }
>
> - tx_ring->desc_head = (struct cmd_desc_type0 *)addr;
> + tx_ring->desc_head = addr;
>
> for (ring = 0; ring < adapter->max_rds_rings; ring++) {
> rds_ring = &recv_ctx->rds_rings[ring];
> @@ -662,7 +662,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
> err = -ENOMEM;
> goto err_out_free;
> }
> - rds_ring->desc_head = (struct rcv_desc *)addr;
> + rds_ring->desc_head = addr;
>
> if (NX_IS_REVISION_P2(adapter->ahw.revision_id))
> rds_ring->crb_rcv_producer =
> @@ -683,7 +683,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
> err = -ENOMEM;
> goto err_out_free;
> }
> - sds_ring->desc_head = (struct status_desc *)addr;
> + sds_ring->desc_head = addr;
>
> if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) {
> sds_ring->crb_sts_consumer =
> diff --git a/drivers/net/pxa168_eth.c b/drivers/net/pxa168_eth.c
> index 89f7540..abd1693 100644
> --- a/drivers/net/pxa168_eth.c
> +++ b/drivers/net/pxa168_eth.c
> @@ -502,7 +502,7 @@ static int add_del_hash_entry(struct pxa168_eth_private *pep,
> * Pick the appropriate table, start scanning for free/reusable
> * entries at the index obtained by hashing the specified MAC address
> */
> - start = (struct addr_table_entry *)(pep->htpr);
> + start = pep->htpr;
> entry = start + hash_function(mac_addr);
> for (i = 0; i < HOP_NUMBER; i++) {
> if (!(le32_to_cpu(entry->lo) & HASH_ENTRY_VALID)) {
> diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
> index 771bb61..2f69140 100644
> --- a/drivers/net/qla3xxx.c
> +++ b/drivers/net/qla3xxx.c
> @@ -2873,7 +2873,7 @@ static int ql_alloc_mem_resources(struct ql3_adapter *qdev)
> PAGE_SIZE, &qdev->shadow_reg_phy_addr);
>
> if (qdev->shadow_reg_virt_addr != NULL) {
> - qdev->preq_consumer_index = (u16 *) qdev->shadow_reg_virt_addr;
> + qdev->preq_consumer_index = qdev->shadow_reg_virt_addr;
> qdev->req_consumer_index_phy_addr_high =
> MS_64BITS(qdev->shadow_reg_phy_addr);
> qdev->req_consumer_index_phy_addr_low =
> @@ -3114,8 +3114,7 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
> qdev->small_buf_release_cnt = 8;
> qdev->lrg_buf_q_producer_index = qdev->num_lbufq_entries - 1;
> qdev->lrg_buf_release_cnt = 8;
> - qdev->lrg_buf_next_free =
> - (struct bufq_addr_element *)qdev->lrg_buf_q_virt_addr;
> + qdev->lrg_buf_next_free = qdev->lrg_buf_q_virt_addr;
> qdev->small_buf_index = 0;
> qdev->lrg_buf_index = 0;
> qdev->lrg_buf_free_count = 0;
> diff --git a/drivers/net/qlcnic/qlcnic_ctx.c b/drivers/net/qlcnic/qlcnic_ctx.c
> index bab041a..c77024f 100644
> --- a/drivers/net/qlcnic/qlcnic_ctx.c
> +++ b/drivers/net/qlcnic/qlcnic_ctx.c
> @@ -126,7 +126,7 @@ int qlcnic_fw_cmd_get_minidump_temp(struct qlcnic_adapter *adapter)
> err = -EIO;
> goto error;
> }
> - tmp_tmpl = (struct qlcnic_dump_template_hdr *) tmp_addr;
> + tmp_tmpl = tmp_addr;
> csum = qlcnic_temp_checksum((uint32_t *) tmp_addr, temp_size);
> if (csum) {
> dev_err(&adapter->pdev->dev,
> @@ -139,7 +139,7 @@ int qlcnic_fw_cmd_get_minidump_temp(struct qlcnic_adapter *adapter)
> err = -EIO;
> goto error;
> }
> - tmp_buf = (u32 *) tmp_addr;
> + tmp_buf = tmp_addr;
> template = (u32 *) ahw->fw_dump.tmpl_hdr;
> for (i = 0; i < temp_size/sizeof(u32); i++)
> *template++ = __le32_to_cpu(*tmp_buf++);
> @@ -214,7 +214,7 @@ qlcnic_fw_cmd_create_rx_ctx(struct qlcnic_adapter *adapter)
> &hostrq_phys_addr, GFP_KERNEL);
> if (addr == NULL)
> return -ENOMEM;
> - prq = (struct qlcnic_hostrq_rx_ctx *)addr;
> + prq = addr;
>
> addr = dma_alloc_coherent(&adapter->pdev->dev, rsp_size,
> &cardrsp_phys_addr, GFP_KERNEL);
> @@ -222,7 +222,7 @@ qlcnic_fw_cmd_create_rx_ctx(struct qlcnic_adapter *adapter)
> err = -ENOMEM;
> goto out_free_rq;
> }
> - prsp = (struct qlcnic_cardrsp_rx_ctx *)addr;
> + prsp = addr;
>
> prq->host_rsp_dma_addr = cpu_to_le64(cardrsp_phys_addr);
>
> @@ -380,10 +380,10 @@ qlcnic_fw_cmd_create_tx_ctx(struct qlcnic_adapter *adapter)
> }
>
> memset(rq_addr, 0, rq_size);
> - prq = (struct qlcnic_hostrq_tx_ctx *)rq_addr;
> + prq = rq_addr;
>
> memset(rsp_addr, 0, rsp_size);
> - prsp = (struct qlcnic_cardrsp_tx_ctx *)rsp_addr;
> + prsp = rsp_addr;
>
> prq->host_rsp_dma_addr = cpu_to_le64(rsp_phys_addr);
>
> @@ -493,7 +493,7 @@ int qlcnic_alloc_hw_resources(struct qlcnic_adapter *adapter)
> goto err_out_free;
> }
>
> - tx_ring->desc_head = (struct cmd_desc_type0 *)addr;
> + tx_ring->desc_head = addr;
>
> for (ring = 0; ring < adapter->max_rds_rings; ring++) {
> rds_ring = &recv_ctx->rds_rings[ring];
> @@ -506,7 +506,7 @@ int qlcnic_alloc_hw_resources(struct qlcnic_adapter *adapter)
> err = -ENOMEM;
> goto err_out_free;
> }
> - rds_ring->desc_head = (struct rcv_desc *)addr;
> + rds_ring->desc_head = addr;
>
> }
>
> @@ -522,7 +522,7 @@ int qlcnic_alloc_hw_resources(struct qlcnic_adapter *adapter)
> err = -ENOMEM;
> goto err_out_free;
> }
> - sds_ring->desc_head = (struct status_desc *)addr;
> + sds_ring->desc_head = addr;
> }
>
> return 0;
> @@ -662,7 +662,7 @@ int qlcnic_get_nic_info(struct qlcnic_adapter *adapter,
> return -ENOMEM;
> memset(nic_info_addr, 0, nic_size);
>
> - nic_info = (struct qlcnic_info *) nic_info_addr;
> + nic_info = nic_info_addr;
> err = qlcnic_issue_cmd(adapter,
> adapter->ahw->pci_func,
> adapter->fw_hal_version,
> @@ -720,7 +720,7 @@ int qlcnic_set_nic_info(struct qlcnic_adapter *adapter, struct qlcnic_info *nic)
> return -ENOMEM;
>
> memset(nic_info_addr, 0, nic_size);
> - nic_info = (struct qlcnic_info *)nic_info_addr;
> + nic_info = nic_info_addr;
>
> nic_info->pci_func = cpu_to_le16(nic->pci_func);
> nic_info->op_mode = cpu_to_le16(nic->op_mode);
> @@ -769,7 +769,7 @@ int qlcnic_get_pci_info(struct qlcnic_adapter *adapter,
> return -ENOMEM;
> memset(pci_info_addr, 0, pci_size);
>
> - npar = (struct qlcnic_pci_info *) pci_info_addr;
> + npar = pci_info_addr;
> err = qlcnic_issue_cmd(adapter,
> adapter->ahw->pci_func,
> adapter->fw_hal_version,
> @@ -877,7 +877,7 @@ int qlcnic_get_port_stats(struct qlcnic_adapter *adapter, const u8 func,
> QLCNIC_CDRP_CMD_GET_ESWITCH_STATS);
>
> if (!err) {
> - stats = (struct __qlcnic_esw_statistics *)stats_addr;
> + stats = stats_addr;
> esw_stats->context_id = le16_to_cpu(stats->context_id);
> esw_stats->version = le16_to_cpu(stats->version);
> esw_stats->size = le16_to_cpu(stats->size);
> diff --git a/drivers/net/qlcnic/qlcnic_ethtool.c b/drivers/net/qlcnic/qlcnic_ethtool.c
> index 9efc690..8ea8001 100644
> --- a/drivers/net/qlcnic/qlcnic_ethtool.c
> +++ b/drivers/net/qlcnic/qlcnic_ethtool.c
> @@ -996,7 +996,7 @@ qlcnic_get_dump_data(struct net_device *netdev, struct ethtool_dump *dump,
> /* Copy template header first */
> copy_sz = fw_dump->tmpl_hdr->size;
> hdr_ptr = (u32 *) fw_dump->tmpl_hdr;
> - data = (u32 *) buffer;
> + data = buffer;
> for (i = 0; i < copy_sz/sizeof(u32); i++)
> *data++ = cpu_to_le32(*hdr_ptr++);
>
> diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c
> index e965661..ea0f11e 100644
> --- a/drivers/net/qlcnic/qlcnic_hw.c
> +++ b/drivers/net/qlcnic/qlcnic_hw.c
> @@ -1672,8 +1672,7 @@ int qlcnic_dump_fw(struct qlcnic_adapter *adapter)
> tmpl_hdr->sys_info[1] = adapter->fw_version;
>
> for (i = 0; i < no_entries; i++) {
> - entry = (struct qlcnic_dump_entry *) ((void *) tmpl_hdr +
> - entry_offset);
> + entry = (void *)tmpl_hdr + entry_offset;
> if (!(entry->hdr.mask & tmpl_hdr->drv_cap_mask)) {
> entry->hdr.flags |= QLCNIC_DUMP_SKIP;
> entry_offset += entry->hdr.offset;
> diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
> index 3ab7d2c..0a6c1c9 100644
> --- a/drivers/net/qlcnic/qlcnic_main.c
> +++ b/drivers/net/qlcnic/qlcnic_main.c
> @@ -1861,7 +1861,7 @@ qlcnic_alloc_lb_filters_mem(struct qlcnic_adapter *adapter)
> return;
>
> adapter->fhash.fmax = QLCNIC_LB_MAX_FILTERS;
> - adapter->fhash.fhead = (struct hlist_head *)head;
> + adapter->fhash.fhead = head;
>
> for (i = 0; i < adapter->fhash.fmax; i++)
> INIT_HLIST_HEAD(&adapter->fhash.fhead[i]);
> diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
> index 930ae45..be89610 100644
> --- a/drivers/net/qlge/qlge_main.c
> +++ b/drivers/net/qlge/qlge_main.c
> @@ -3096,7 +3096,7 @@ static int ql_start_rx_ring(struct ql_adapter *qdev, struct rx_ring *rx_ring)
> if (rx_ring->lbq_len) {
> cqicb->flags |= FLAGS_LL; /* Load lbq values */
> tmp = (u64)rx_ring->lbq_base_dma;
> - base_indirect_ptr = (__le64 *) rx_ring->lbq_base_indirect;
> + base_indirect_ptr = rx_ring->lbq_base_indirect;
> page_entries = 0;
> do {
> *base_indirect_ptr = cpu_to_le64(tmp);
> @@ -3120,7 +3120,7 @@ static int ql_start_rx_ring(struct ql_adapter *qdev, struct rx_ring *rx_ring)
> if (rx_ring->sbq_len) {
> cqicb->flags |= FLAGS_LS; /* Load sbq values */
> tmp = (u64)rx_ring->sbq_base_dma;
> - base_indirect_ptr = (__le64 *) rx_ring->sbq_base_indirect;
> + base_indirect_ptr = rx_ring->sbq_base_indirect;
> page_entries = 0;
> do {
> *base_indirect_ptr = cpu_to_le64(tmp);
> diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
> index df0d2c8..f4d80f9 100644
> --- a/drivers/net/s2io.c
> +++ b/drivers/net/s2io.c
> @@ -841,7 +841,7 @@ static int init_shared_mem(struct s2io_nic *nic)
> tmp_p_addr = ring->rx_blocks[j].block_dma_addr;
> tmp_p_addr_next = ring->rx_blocks[next].block_dma_addr;
>
> - pre_rxd_blk = (struct RxD_block *)tmp_v_addr;
> + pre_rxd_blk = tmp_v_addr;
> pre_rxd_blk->reserved_2_pNext_RxD_block =
> (unsigned long)tmp_v_addr_next;
> pre_rxd_blk->pNext_RxD_Blk_physical =
> @@ -918,7 +918,7 @@ static int init_shared_mem(struct s2io_nic *nic)
> mac_control->stats_mem_sz = size;
>
> tmp_v_addr = mac_control->stats_mem;
> - mac_control->stats_info = (struct stat_block *)tmp_v_addr;
> + mac_control->stats_info = tmp_v_addr;
> memset(tmp_v_addr, 0, size);
> DBG_PRINT(INIT_DBG, "%s: Ring Mem PHY: 0x%llx\n",
> dev_name(&nic->pdev->dev), (unsigned long long)tmp_p_addr);
> @@ -2439,7 +2439,7 @@ static void free_tx_buffers(struct s2io_nic *nic)
>
> spin_lock_irqsave(&fifo->tx_lock, flags);
> for (j = 0; j < tx_cfg->fifo_len; j++) {
> - txdp = (struct TxD *)fifo->list_info[j].list_virt_addr;
> + txdp = fifo->list_info[j].list_virt_addr;
> skb = s2io_txdl_getskb(&mac_control->fifos[i], txdp, j);
> if (skb) {
> swstats->mem_freed += skb->truesize;
> @@ -3075,8 +3075,7 @@ static void tx_intr_handler(struct fifo_info *fifo_data)
>
> get_info = fifo_data->tx_curr_get_info;
> memcpy(&put_info, &fifo_data->tx_curr_put_info, sizeof(put_info));
> - txdlp = (struct TxD *)
> - fifo_data->list_info[get_info.offset].list_virt_addr;
> + txdlp = fifo_data->list_info[get_info.offset].list_virt_addr;
> while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) &&
> (get_info.offset != put_info.offset) &&
> (txdlp->Host_Control)) {
> @@ -3129,8 +3128,7 @@ static void tx_intr_handler(struct fifo_info *fifo_data)
> get_info.offset++;
> if (get_info.offset == get_info.fifo_len + 1)
> get_info.offset = 0;
> - txdlp = (struct TxD *)
> - fifo_data->list_info[get_info.offset].list_virt_addr;
> + txdlp = fifo_data->list_info[get_info.offset].list_virt_addr;
> fifo_data->tx_curr_get_info.offset = get_info.offset;
> }
>
> @@ -4163,7 +4161,7 @@ static netdev_tx_t s2io_xmit(struct sk_buff *skb, struct net_device *dev)
>
> put_off = (u16)fifo->tx_curr_put_info.offset;
> get_off = (u16)fifo->tx_curr_get_info.offset;
> - txdp = (struct TxD *)fifo->list_info[put_off].list_virt_addr;
> + txdp = fifo->list_info[put_off].list_virt_addr;
>
> queue_len = fifo->tx_curr_put_info.fifo_len + 1;
> /* Avoid "put" pointer going beyond "get" pointer */
> @@ -7972,9 +7970,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
>
> /* Initializing the BAR1 address as the start of the FIFO pointer. */
> for (j = 0; j < MAX_TX_FIFOS; j++) {
> - mac_control->tx_FIFO_start[j] =
> - (struct TxFIFO_element __iomem *)
> - (sp->bar1 + (j * 0x00020000));
> + mac_control->tx_FIFO_start[j] = sp->bar1 + (j * 0x00020000);
> }
>
> /* Driver entry points */
> diff --git a/drivers/net/sfc/siena.c b/drivers/net/sfc/siena.c
> index fb4721f..a66818e 100644
> --- a/drivers/net/sfc/siena.c
> +++ b/drivers/net/sfc/siena.c
> @@ -400,7 +400,7 @@ static int siena_try_update_nic_stats(struct efx_nic *efx)
> u64 generation_end;
>
> mac_stats = &efx->mac_stats;
> - dma_stats = (u64 *)efx->stats_buffer.addr;
> + dma_stats = efx->stats_buffer.addr;
>
> generation_end = dma_stats[MC_CMD_MAC_GENERATION_END];
> if (generation_end == STATS_GENERATION_INVALID)
> diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
> index 484f795..658a192 100644
> --- a/drivers/net/sis900.c
> +++ b/drivers/net/sis900.c
> @@ -482,7 +482,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
> ret = -ENOMEM;
> goto err_out_cleardev;
> }
> - sis_priv->tx_ring = (BufferDesc *)ring_space;
> + sis_priv->tx_ring = ring_space;
> sis_priv->tx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pci_dev, RX_TOTAL_SIZE, &ring_dma);
> @@ -490,7 +490,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
> ret = -ENOMEM;
> goto err_unmap_tx;
> }
> - sis_priv->rx_ring = (BufferDesc *)ring_space;
> + sis_priv->rx_ring = ring_space;
> sis_priv->rx_ring_dma = ring_dma;
>
> /* The SiS900-specific entries in the device structure. */
> diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
> index 2bedc0a..6153cfd 100644
> --- a/drivers/net/tokenring/madgemc.c
> +++ b/drivers/net/tokenring/madgemc.c
> @@ -418,7 +418,7 @@ static irqreturn_t madgemc_interrupt(int irq, void *dev_id)
> return IRQ_NONE;
> }
>
> - dev = (struct net_device *)dev_id;
> + dev = dev_id;
>
> /* Make sure its really us. -- the Madge way */
> pending = inb(dev->base_addr + MC_CONTROL_REG0);
> diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
> index 3de4283..1d5091a 100644
> --- a/drivers/net/typhoon.c
> +++ b/drivers/net/typhoon.c
> @@ -2367,7 +2367,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>
> dev->irq = pdev->irq;
> tp = netdev_priv(dev);
> - tp->shared = (struct typhoon_shared *) shared;
> + tp->shared = shared;
> tp->shared_dma = shared_dma;
> tp->pdev = pdev;
> tp->tx_pdev = pdev;
> diff --git a/drivers/net/vxge/vxge-config.c b/drivers/net/vxge/vxge-config.c
> index 32763b2..857618a 100644
> --- a/drivers/net/vxge/vxge-config.c
> +++ b/drivers/net/vxge/vxge-config.c
> @@ -582,7 +582,7 @@ __vxge_hw_device_toc_get(void __iomem *bar0)
> goto exit;
>
> val64 = readq(&legacy_reg->toc_first_pointer);
> - toc = (struct vxge_hw_toc_reg __iomem *)(bar0+val64);
> + toc = bar0 + val64;
> exit:
> return toc;
> }
> @@ -600,7 +600,7 @@ __vxge_hw_device_reg_addr_get(struct __vxge_hw_device *hldev)
> u32 i;
> enum vxge_hw_status status = VXGE_HW_OK;
>
> - hldev->legacy_reg = (struct vxge_hw_legacy_reg __iomem *)hldev->bar0;
> + hldev->legacy_reg = hldev->bar0;
>
> hldev->toc_reg = __vxge_hw_device_toc_get(hldev->bar0);
> if (hldev->toc_reg == NULL) {
> @@ -609,39 +609,31 @@ __vxge_hw_device_reg_addr_get(struct __vxge_hw_device *hldev)
> }
>
> val64 = readq(&hldev->toc_reg->toc_common_pointer);
> - hldev->common_reg =
> - (struct vxge_hw_common_reg __iomem *)(hldev->bar0 + val64);
> + hldev->common_reg = hldev->bar0 + val64;
>
> val64 = readq(&hldev->toc_reg->toc_mrpcim_pointer);
> - hldev->mrpcim_reg =
> - (struct vxge_hw_mrpcim_reg __iomem *)(hldev->bar0 + val64);
> + hldev->mrpcim_reg = hldev->bar0 + val64;
>
> for (i = 0; i < VXGE_HW_TITAN_SRPCIM_REG_SPACES; i++) {
> val64 = readq(&hldev->toc_reg->toc_srpcim_pointer[i]);
> - hldev->srpcim_reg[i] =
> - (struct vxge_hw_srpcim_reg __iomem *)
> - (hldev->bar0 + val64);
> + hldev->srpcim_reg[i] = hldev->bar0 + val64;
> }
>
> for (i = 0; i < VXGE_HW_TITAN_VPMGMT_REG_SPACES; i++) {
> val64 = readq(&hldev->toc_reg->toc_vpmgmt_pointer[i]);
> - hldev->vpmgmt_reg[i] =
> - (struct vxge_hw_vpmgmt_reg __iomem *)(hldev->bar0 + val64);
> + hldev->vpmgmt_reg[i] = hldev->bar0 + val64;
> }
>
> for (i = 0; i < VXGE_HW_TITAN_VPATH_REG_SPACES; i++) {
> val64 = readq(&hldev->toc_reg->toc_vpath_pointer[i]);
> - hldev->vpath_reg[i] =
> - (struct vxge_hw_vpath_reg __iomem *)
> - (hldev->bar0 + val64);
> + hldev->vpath_reg[i] = hldev->bar0 + val64;
> }
>
> val64 = readq(&hldev->toc_reg->toc_kdfc);
>
> switch (VXGE_HW_TOC_GET_KDFC_INITIAL_BIR(val64)) {
> case 0:
> - hldev->kdfc = (u8 __iomem *)(hldev->bar0 +
> - VXGE_HW_TOC_GET_KDFC_INITIAL_OFFSET(val64));
> + hldev->kdfc = hldev->bar0 + VXGE_HW_TOC_GET_KDFC_INITIAL_OFFSET(val64) ;
> break;
> default:
> break;
> @@ -1024,7 +1016,7 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
> }
>
> val64 = readq(&toc->toc_common_pointer);
> - common_reg = (struct vxge_hw_common_reg __iomem *)(bar0 + val64);
> + common_reg = bar0 + val64;
>
> status = __vxge_hw_device_vpath_reset_in_prog_check(
> (u64 __iomem *)&common_reg->vpath_rst_in_prog);
> @@ -1044,8 +1036,7 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
>
> val64 = readq(&toc->toc_vpmgmt_pointer[i]);
>
> - vpmgmt_reg = (struct vxge_hw_vpmgmt_reg __iomem *)
> - (bar0 + val64);
> + vpmgmt_reg = bar0 + val64;
>
> hw_info->func_id = __vxge_hw_vpath_func_id_get(vpmgmt_reg);
> if (__vxge_hw_device_access_rights_get(hw_info->host_type,
> @@ -1054,8 +1045,7 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
>
> val64 = readq(&toc->toc_mrpcim_pointer);
>
> - mrpcim_reg = (struct vxge_hw_mrpcim_reg __iomem *)
> - (bar0 + val64);
> + mrpcim_reg = bar0 + val64;
>
> writeq(0, &mrpcim_reg->xgmac_gen_fw_memo_mask);
> wmb();
> @@ -1064,8 +1054,7 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
> val64 = readq(&toc->toc_vpath_pointer[i]);
>
> spin_lock_init(&vpath.lock);
> - vpath.vp_reg = (struct vxge_hw_vpath_reg __iomem *)
> - (bar0 + val64);
> + vpath.vp_reg = bar0 + val64;
> vpath.vp_open = VXGE_HW_VP_NOT_OPEN;
>
> status = __vxge_hw_vpath_pci_func_mode_get(&vpath, hw_info);
> @@ -1088,8 +1077,7 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
> continue;
>
> val64 = readq(&toc->toc_vpath_pointer[i]);
> - vpath.vp_reg = (struct vxge_hw_vpath_reg __iomem *)
> - (bar0 + val64);
> + vpath.vp_reg = bar0 + val64;
> vpath.vp_open = VXGE_HW_VP_NOT_OPEN;
>
> status = __vxge_hw_vpath_addr_get(&vpath,
> @@ -2140,8 +2128,7 @@ __vxge_hw_ring_mempool_item_alloc(struct vxge_hw_mempool *mempoolh,
> memblock_index, item,
> &memblock_item_idx);
>
> - rxdp = (struct vxge_hw_ring_rxd_1 *)
> - ring->channel.reserve_arr[reserve_index];
> + rxdp = ring->channel.reserve_arr[reserve_index];
>
> uld_priv = ((u8 *)rxdblock_priv + ring->rxd_priv_size * i);
>
> @@ -4880,8 +4867,7 @@ vxge_hw_vpath_open(struct __vxge_hw_device *hldev,
> goto vpath_open_exit8;
> }
>
> - vpath->hw_stats = (struct vxge_hw_vpath_stats_hw_info *)vpath->
> - stats_block->memblock;
> + vpath->hw_stats = vpath->stats_block->memblock;
> memset(vpath->hw_stats, 0,
> sizeof(struct vxge_hw_vpath_stats_hw_info));
>
> diff --git a/drivers/net/vxge/vxge-traffic.c b/drivers/net/vxge/vxge-traffic.c
> index f935170..ad64ce0 100644
> --- a/drivers/net/vxge/vxge-traffic.c
> +++ b/drivers/net/vxge/vxge-traffic.c
> @@ -1309,7 +1309,7 @@ enum vxge_hw_status vxge_hw_ring_rxd_next_completed(
>
> vxge_hw_channel_dtr_try_complete(channel, rxdh);
>
> - rxdp = (struct vxge_hw_ring_rxd_1 *)*rxdh;
> + rxdp = *rxdh;
> if (rxdp == NULL) {
> status = VXGE_HW_INF_NO_MORE_COMPLETED_DESCRIPTORS;
> goto exit;
> @@ -1565,7 +1565,7 @@ void vxge_hw_fifo_txdl_post(struct __vxge_hw_fifo *fifo, void *txdlh)
> channel = &fifo->channel;
>
> txdl_priv = __vxge_hw_fifo_txdl_priv(fifo, txdlh);
> - txdp_first = (struct vxge_hw_fifo_txd *)txdlh;
> + txdp_first = txdlh;
>
> txdp_last = (struct vxge_hw_fifo_txd *)txdlh + (txdl_priv->frags - 1);
> txdp_last->control_0 |=
> @@ -1631,7 +1631,7 @@ enum vxge_hw_status vxge_hw_fifo_txdl_next_completed(
>
> vxge_hw_channel_dtr_try_complete(channel, txdlh);
>
> - txdp = (struct vxge_hw_fifo_txd *)*txdlh;
> + txdp = *txdlh;
> if (txdp == NULL) {
> status = VXGE_HW_INF_NO_MORE_COMPLETED_DESCRIPTORS;
> goto exit;
Thanks so much!
Acked-by: Jon Mason <jdmason@kudzu.us>
> diff --git a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c
> index 1c65d1c..850fc84 100644
> --- a/drivers/net/wan/pc300_tty.c
> +++ b/drivers/net/wan/pc300_tty.c
> @@ -755,7 +755,7 @@ void cpc_tty_receive(pc300dev_t *pc300dev)
>
> dsr_rx = cpc_readb(card->hw.scabase + DSR_RX(ch));
>
> - cpc_tty = (st_cpc_tty_area *)pc300dev->cpc_tty;
> + cpc_tty = pc300dev->cpc_tty;
>
> while (1) {
> rx_len = 0;
> diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
> index 9cb4cdc..bbb8c65 100644
> --- a/drivers/net/xilinx_emaclite.c
> +++ b/drivers/net/xilinx_emaclite.c
> @@ -252,11 +252,11 @@ static void xemaclite_aligned_write(void *src_ptr, u32 *dest_ptr,
> u16 *from_u16_ptr, *to_u16_ptr;
>
> to_u32_ptr = dest_ptr;
> - from_u16_ptr = (u16 *) src_ptr;
> + from_u16_ptr = src_ptr;
> align_buffer = 0;
>
> for (; length > 3; length -= 4) {
> - to_u16_ptr = (u16 *) ((void *) &align_buffer);
> + to_u16_ptr = (u16 *)&align_buffer;
> *to_u16_ptr++ = *from_u16_ptr++;
> *to_u16_ptr++ = *from_u16_ptr++;
>
> diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c
> index ec47e22..3e5ac60 100644
> --- a/drivers/net/yellowfin.c
> +++ b/drivers/net/yellowfin.c
> @@ -442,19 +442,19 @@ static int __devinit yellowfin_init_one(struct pci_dev *pdev,
> ring_space = pci_alloc_consistent(pdev, TX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_cleardev;
> - np->tx_ring = (struct yellowfin_desc *)ring_space;
> + np->tx_ring = ring_space;
> np->tx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pdev, RX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_unmap_tx;
> - np->rx_ring = (struct yellowfin_desc *)ring_space;
> + np->rx_ring = ring_space;
> np->rx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pdev, STATUS_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_unmap_rx;
> - np->tx_status = (struct tx_status_words *)ring_space;
> + np->tx_status = ring_space;
> np->tx_status_dma = ring_dma;
>
> if (dev->mem_start)
> --
> 1.7.6.rc0
>
>
^ permalink raw reply
* Re: [PATCH] iptables: document IPv6 TOS mangling bug in old Linux kernels
From: Patrick McHardy @ 2011-06-16 15:15 UTC (permalink / raw)
To: Jan Engelhardt
Cc: Fernando Luis Vazquez Cao, Maciej, Pablo Neira Aysuo,
Netfilter Developer Mailing List,
Linux Networking Developer Mailing List
In-Reply-To: <alpine.LNX.2.01.1106161705300.10015@frira.zrqbmnf.qr>
On 16.06.2011 17:06, Jan Engelhardt wrote:
> On Thursday 2011-06-16 10:36, Fernando Luis Vazquez Cao wrote:
>
>> Jan, Patrick,
>>
>> I would like to get this bug in old Linux kernels documented in the
>> iptables man page, since it is pretty serious. The fix made into 2.6.39
>> and I would like to have it backported to 2.6.32-longterm and
>> 2.6.33-longterm. If you disagree with the backport to -longterm please
>> let me know, I would update the patch accordingly.
That's fine with me.
>> .SH BUGS
>> Bugs? What's this? ;-)
>> +.PP
>> Well... the counters are not reliable on sparc64.
>> +.PP
>> +In Linux kernels up to and including 2.6.38, with the exception of longterm
>> +releases 2.6.32.42 (or later) and 2.6.33.15 (or later), there is a bug whereby
>> +IPv6 TOS mangling does not behave as documented and differs from the IPv4
>> +version. The TOS mask indicates the bits one wants to zero out, so it needs to
>> +be inverted before applying it to the original TOS field. However, the
>> +aformentioned kernels forgo the inversion which breaks --set-tos and its
>> +mnemonics.
>> +.PP
>> +You might also want to have a look at http://bugzilla.netfilter.org/
>> .SH COMPATIBILITY WITH IPCHAINS
>> This \fBip6tables\fP
>> is very similar to ipchains by Rusty Russell. The main difference is
>
> I feel this should be listed in the TOS page, to avoid duplication.
I agree with Jan, just the TOS man page seems fine.
^ permalink raw reply
* Re: [GIT PULL nf-2.6] IPVS
From: Patrick McHardy @ 2011-06-16 15:11 UTC (permalink / raw)
To: Simon Horman
Cc: lvs-devel, netdev, netfilter-devel, netfilter, Wensong Zhang,
Julian Anastasov, Pablo Neira Ayuso
In-Reply-To: <1307954861-21592-1-git-send-email-horms@verge.net.au>
On 13.06.2011 10:47, Simon Horman wrote:
> Hi Pablo,
>
> please consider pulling
> git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-2.6.git master
> to get the following fix from Hans.
>
> I believe this change should be considered for -stable.
Just send it to the stable people once it hits upstream. I'll
send it to Dave tonight.
> Hans Schillstrom (1):
> IPVS netns exit causes crash in conntrac
Pulled, thanks Simon.
^ permalink raw reply
* Re: [PATCH] iptables: document IPv6 TOS mangling bug in old Linux kernels
From: Jan Engelhardt @ 2011-06-16 15:06 UTC (permalink / raw)
To: Fernando Luis Vazquez Cao
Cc: Patrick McHardy, Maciej, Pablo Neira Aysuo,
Netfilter Developer Mailing List,
Linux Networking Developer Mailing List
In-Reply-To: <1308213411.4062.22.camel@nausicaa>
On Thursday 2011-06-16 10:36, Fernando Luis Vazquez Cao wrote:
>Jan, Patrick,
>
>I would like to get this bug in old Linux kernels documented in the
>iptables man page, since it is pretty serious. The fix made into 2.6.39
>and I would like to have it backported to 2.6.32-longterm and
>2.6.33-longterm. If you disagree with the backport to -longterm please
>let me know, I would update the patch accordingly.
> .SH BUGS
> Bugs? What's this? ;-)
>+.PP
> Well... the counters are not reliable on sparc64.
>+.PP
>+In Linux kernels up to and including 2.6.38, with the exception of longterm
>+releases 2.6.32.42 (or later) and 2.6.33.15 (or later), there is a bug whereby
>+IPv6 TOS mangling does not behave as documented and differs from the IPv4
>+version. The TOS mask indicates the bits one wants to zero out, so it needs to
>+be inverted before applying it to the original TOS field. However, the
>+aformentioned kernels forgo the inversion which breaks --set-tos and its
>+mnemonics.
>+.PP
>+You might also want to have a look at http://bugzilla.netfilter.org/
> .SH COMPATIBILITY WITH IPCHAINS
> This \fBip6tables\fP
> is very similar to ipchains by Rusty Russell. The main difference is
I feel this should be listed in the TOS page, to avoid duplication.
^ permalink raw reply
* Re: [GIT PULL net-next-2.6] IPVS
From: Patrick McHardy @ 2011-06-16 15:05 UTC (permalink / raw)
To: Simon Horman
Cc: lvs-devel, netdev, netfilter-devel, netfilter, Wensong Zhang,
Julian Anastasov, Pablo Neira Ayuso
In-Reply-To: <1308095001-21002-1-git-send-email-horms@verge.net.au>
On 15.06.2011 01:43, Simon Horman wrote:
> Hi Patrick, Hi Pablo,
>
> please consider pulling
> git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next-2.6.git
> master
>
> It includes four clean-ups by Hans
> and an enhancement of the FTP helper by Julian.
>
> I have based the pull request on next-2.6 as
> nf-next-2.6 seems to be a little old. Please let me
> know if a different base would suit you better.
>
> Hans Schillstrom (4):
> IPVS remove unused var from migration to netns
> IPVS: rename of netns init and cleanup functions.
> IPVS: labels at pos 0
> IPVS: remove unused init and cleanup functions.
>
> Julian Anastasov (1):
> ipvs: support more FTP PASV responses
>
Pulled, thanks Simon.
^ 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