Netdev List
 help / color / mirror / Atom feed
* [PATCH] bonding: fix to rejoin multicast groups immediately
From: Flavio Leitner @ 2010-09-29  7:12 UTC (permalink / raw)
  To: netdev; +Cc: Flavio Leitner

It should rejoin multicast groups immediately when
the failover happens to restore the multicast traffic.

Signed-off-by: Flavio Leitner <fleitner@redhat.com>
---
 net/ipv4/igmp.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 1fdcacd..b81d674 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -1257,14 +1257,14 @@ void ip_mc_rejoin_group(struct ip_mc_list *im)
 	if (im->multiaddr == IGMP_ALL_HOSTS)
 		return;
 
-	if (IGMP_V1_SEEN(in_dev) || IGMP_V2_SEEN(in_dev)) {
-		igmp_mod_timer(im, IGMP_Initial_Report_Delay);
-		return;
-	}
-	/* else, v3 */
-	im->crcount = in_dev->mr_qrv ? in_dev->mr_qrv :
-		IGMP_Unsolicited_Report_Count;
-	igmp_ifc_event(in_dev);
+	/* a failover is happening and switches
+	 * must be notified immediately */
+	if (IGMP_V1_SEEN(in_dev))
+		igmp_send_report(in_dev, im, IGMP_HOST_MEMBERSHIP_REPORT);
+	else if (IGMP_V2_SEEN(in_dev))
+		igmp_send_report(in_dev, im, IGMPV2_HOST_MEMBERSHIP_REPORT);
+	else
+		igmp_send_report(in_dev, im, IGMPV3_HOST_MEMBERSHIP_REPORT);
 #endif
 }
 EXPORT_SYMBOL(ip_mc_rejoin_group);
-- 
1.7.2.3


^ permalink raw reply related

* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support
From: Herbert Xu @ 2010-09-29  7:11 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: davem, netdev, Patrick McHardy
In-Reply-To: <1285741443.22570.27.camel@edumazet-laptop>

On Wed, Sep 29, 2010 at 08:24:03AM +0200, Eric Dumazet wrote:
.
> Well, sometimes people wants to :
> 
> /etc/modprobe.conf
> install ipv6 /bin/true
> 
> 
> Yet, be able to load ip_gre as a module
> 
> so IPV6=m, GRE=m,

I think if we cared about this we should provide ways to disable
IPv6 (if there aren't any already) even when the module is loaded
or the code is built-in.

BTW, I think the code isn't 100% safe as is as it tries to access
skb_dst unconditionally in the IPv6 case.  If the packet came via
a remote source (e.g., bridging and virt) it may not have an IPv6
skb_dst at all.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply

* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support
From: Eric Dumazet @ 2010-09-29  6:47 UTC (permalink / raw)
  To: David Miller; +Cc: herbert, netdev, kaber
In-Reply-To: <20100928.223850.104051485.davem@davemloft.net>

Le mardi 28 septembre 2010 à 22:38 -0700, David Miller a écrit :
> From: David Miller <davem@davemloft.net>
> Date: Tue, 28 Sep 2010 21:41:32 -0700 (PDT)
> 
> > Eric, please cook up a patch which does this, I think the
> > magic Kconfig dependency formula for this is:
> > 
> > 	depends on IPV6 || IPV6=n
> > 
> > Thanks!
> 
> Nevermind, I took care of it :-)
> 
> --------------------
> ip_gre: Fix dependencies wrt. ipv6.
> 
> The GRE tunnel driver needs to invoke icmpv6 helpers in the
> ipv6 stack when ipv6 support is enabled.
> 
> Therefore if IPV6 is enabled, we have to enforce that GRE's
> enabling (modular or static) matches that of ipv6.
> 
> Reported-by: Patrick McHardy <kaber@trash.net>
> Reported-by: Herbert Xu <herbert@gondor.apana.org.au>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
>  net/ipv4/Kconfig |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
> index 571f895..72380a3 100644
> --- a/net/ipv4/Kconfig
> +++ b/net/ipv4/Kconfig
> @@ -217,6 +217,7 @@ config NET_IPIP
>  
>  config NET_IPGRE
>  	tristate "IP: GRE tunnels over IP"
> +	depends on IPV6 || IPV6=n
>  	help
>  	  Tunneling means encapsulating data of one protocol type within
>  	  another protocol and sending it over a channel that understands the


Still, this does not solve the problem for people wanting to disable
ipv6 module load or disable it ?

install ipv6 /bin/true

or

options ipv6 disable=1

I tried both ways with my patch and could load ip_gre module. But in
both ways, register_icmpv6_send() was not called so ip_gre could not try
to use icmpv6_send()






^ permalink raw reply

* Re: [PATCH v2 1/2] Phonet: Implement Pipe Controller to support Nokia Slim Modems
From: Kumar SANGHVI @ 2010-09-29  6:32 UTC (permalink / raw)
  To: Rémi Denis-Courmont
  Cc: davem@davemloft.net, netdev@vger.kernel.org,
	STEricsson_nomadik_linux, Sudeep DIVAKARAN, Gulshan KARMANI,
	Linus WALLEIJ
In-Reply-To: <201009290125.07068.remi.denis-courmont@nokia.com>

Hi Rémi Denis-Courmontt

On Wed, Sep 29, 2010 at 00:25:06 +0200, Rémi Denis-Courmont wrote:
 
> As far as I know, you don't need to do that in kernel space. I don't know the 
> internals of the STE modem. Regardless of having or not having a pipe 
> controller, Linux userspace can send pipe messages using a plain Phonet 
> datagram socket. This avoids adding ioctl()'s and protocol stuff in kernel 
> space. Then, as far as kernel is concerned, only small changes to the data 
> path would be required.
>
Agreed partially. In fact, we initially followed the same approach.
However, following this approach, we faced problem situations which I
have described in detail in the mail '[PATCH 0/2] Phonet: Implement Pipe
Controller to support Nokia Slim Modems'.

We can introduce corrections in Phonet stack for the PS path which
would be minor. But then those changes look more like a hack. Further,
this change would be required at several places where PS communication
is happening with modem e.g. pep_reply, pipe_skb_send, pipe_snd_status,
etc.

Further, if a new function tomorrow is introduced for PS path
communication with modem then, that hack will have to be added to that
function also.
 
> Both the Nokia modem plugin for oFono, and the (closed-source) Nokia N900 CSD-
> GPRS service work that way. In other words, the pipe 'signaling' is done in 
> userspace, while the pipe 'data' is done in kernel space for optimal 
> performance.
>
 
I am not much aware of modem used in Nokia N900 but I guess N900 modem
has pipe controller implemented inside it. So, the pipe 'data' works
fine with kernel.

If we use the same approach for Nokia Slim modems, this approach
introduces the problem of PS data traversing two times the phonet stack.
Again I have described this problem in the mail '[PATCH 0/2] Phonet:
Implement Pipe Controller to support Nokia Slim Modems'.

> For some background - Phonet pipes work very much like FTP. There are two 
> endpoints exchaning data, and one client ('owner') deciding which endpoints 
> and when to establish a pipe between. In most case the client is also one of 
> the endpoint, but this is not required. With this patch, the client is tied to 
> being one of the endpoint. Arguably, this is not a problem for most usecases. 
> But I am not sure this belongs in *kernel* space.

Based on problems described above, we thought it would be better to
handle in kernel. Later on, any user-space can establish Pipe connection
with modem using this approach e.g. Video telephony socket can establish
its own pipe with modem, GPRS/3G socket can establish its own pipe with
modem.

Further, the pipe controller implementation allows the flexibility to
user-space of where it is sending the pipe 'data'.
Currently, the phonet stack by default is sending pipe 'data' to
dst_dev:dst_obj = 0x00:0x00 using the variable struct sockaddr_pn
pipe_srv.
Pipe controller implementation however maintains the remote-pep for any
particular user-space socket and always sends pipe data to that correct
destination remote-pep.

> 
> > @@ -791,6 +1171,48 @@ static int pep_setsockopt(struct sock *sk, int level,
> > int optname,
> > 
> >         lock_sock(sk);
> >         switch (optname) {
> > +#ifdef CONFIG_PHONET_PIPECTRLR
> > +       case PNPIPE_CREATE:
> > +               if (val) {
> > +                       if (pn->pipe_state > PIPE_IDLE) {
> > +                               err = -EFAULT;
> 
> Why EFAULT here? I can't see any user-space memory access failure.

Agreed. I think I should rather use -EAGAIN.
I will correct this in all the rest of places where you have indicated
-EFAULT should not be used.
I will send out a correction patch since phonet pipe controller patch is already merged
by David.

> 
> > @@ -877,11 +1313,11 @@ static int pipe_skb_send(struct sock *sk, struct
> > sk_buff *skb) } else
> >                 ph->message_id = PNS_PIPE_DATA;
> >         ph->pipe_handle = pn->pipe_handle;
> > -
> > -       err = pn_skb_send(sk, skb, &pipe_srv);
> > -       if (err && pn_flow_safe(pn->tx_fc))
> > -               atomic_inc(&pn->tx_credits);
> > -       return err;
> > +#ifdef CONFIG_PHONET_PIPECTRLR
> > +       return pn_skb_send(sk, skb, &spn);
> > +#else
> > +       return pn_skb_send(sk, skb, &pipe_srv);
> > +#endif
> >  }
> 
> This reintroduces the bug that I fixed in 
> 1a98214feef2221cd7c24b17cd688a5a9d85b2ea :-(

I apologise here as I accidently lost your commit here.
I will restore your commit here by sending patch.

> 
> -- 
> Rémi Denis-Courmont
> Nokia Devices R&D, Maemo Software, Helsinki

Thanks & regards,
Kumar.

^ permalink raw reply

* Re: [PATCH linux-2.6 v2] IPv6: Temp addresses are immediately deleted.
From: David Miller @ 2010-09-29  6:30 UTC (permalink / raw)
  To: gwurster
  Cc: kuznet, pekkas, jmorris, yoshfuji, kaber, shemminger,
	eric.dumazet, herbert, ebiederm, netdev, linux-kernel
In-Reply-To: <20100927171010.GB7106@adams.ccsl.carleton.ca>

From: Glenn Wurster <gwurster@scs.carleton.ca>
Date: Mon, 27 Sep 2010 13:10:10 -0400

> There is a bug in the interaction between ipv6_create_tempaddr and 
> addrconf_verify.  Because ipv6_create_tempaddr uses the cstamp and tstamp 
> from the public address in creating a private address, if we have not 
> received a router advertisement in a while, tstamp + temp_valid_lft might be 
> < now.  If this happens, the new address is created inside 
> ipv6_create_tempaddr, then the loop within addrconf_verify starts again and 
> the address is immediately deleted.  We are left with no temporary addresses 
> on the interface, and no more will be created until the public IP address is 
> updated.  To avoid this, set the expiry time to be the minimum of the time 
> left on the public address or the config option PLUS the current age of the 
> public interface.
> 
> Version 2, now with 100% fewer line wraps.  Thanks to David Miller for
> pointing out the line wrapping issue.
> 
> Signed-off-by: Glenn Wurster <gwurster@scs.carleton.ca>

This can only happen if we apply your other patch, which I showed
was incorrect as per RFCs.

We only create temporary address when public addresses are created,
and this is the point where we are handling a router advertisement
with non-zero Valid Lifetime.

Therefore I'm not applying this patch either.


^ permalink raw reply

* [PATCH net-next 1/2] enic: remove dead code
From: Stephen Hemminger @ 2010-09-29  6:29 UTC (permalink / raw)
  To: Scott Feldman, Vasanthy Kolluri, Roopa Prabhu, David Miller; +Cc: netdev

This driver seems to have lots of leftover dead code that is defined
globally but never used.

Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

---
 drivers/net/enic/enic_res.c  |   16 -----
 drivers/net/enic/enic_res.h  |    2 
 drivers/net/enic/vnic_dev.c  |  128 -------------------------------------------
 drivers/net/enic/vnic_dev.h  |   10 ---
 drivers/net/enic/vnic_intr.c |    5 -
 5 files changed, 161 deletions(-)

--- a/drivers/net/enic/enic_res.c	2010-09-29 15:21:47.983306313 +0900
+++ b/drivers/net/enic/enic_res.c	2010-09-29 15:26:29.273306571 +0900
@@ -149,22 +149,6 @@ int enic_set_nic_cfg(struct enic *enic, 
 	return vnic_dev_cmd(enic->vdev, CMD_NIC_CFG, &a0, &a1, wait);
 }
 
-int enic_set_rss_key(struct enic *enic, dma_addr_t key_pa, u64 len)
-{
-	u64 a0 = (u64)key_pa, a1 = len;
-	int wait = 1000;
-
-	return vnic_dev_cmd(enic->vdev, CMD_RSS_KEY, &a0, &a1, wait);
-}
-
-int enic_set_rss_cpu(struct enic *enic, dma_addr_t cpu_pa, u64 len)
-{
-	u64 a0 = (u64)cpu_pa, a1 = len;
-	int wait = 1000;
-
-	return vnic_dev_cmd(enic->vdev, CMD_RSS_CPU, &a0, &a1, wait);
-}
-
 void enic_free_vnic_resources(struct enic *enic)
 {
 	unsigned int i;
--- a/drivers/net/enic/enic_res.h	2010-09-29 15:21:47.993306327 +0900
+++ b/drivers/net/enic/enic_res.h	2010-09-29 15:26:29.273306571 +0900
@@ -137,8 +137,6 @@ int enic_del_vlan(struct enic *enic, u16
 int enic_set_nic_cfg(struct enic *enic, u8 rss_default_cpu, u8 rss_hash_type,
 	u8 rss_hash_bits, u8 rss_base_cpu, u8 rss_enable, u8 tso_ipid_split_en,
 	u8 ig_vlan_strip_en);
-int enic_set_rss_key(struct enic *enic, dma_addr_t key_pa, u64 len);
-int enic_set_rss_cpu(struct enic *enic, dma_addr_t cpu_pa, u64 len);
 void enic_get_res_counts(struct enic *enic);
 void enic_init_vnic_resources(struct enic *enic);
 int enic_alloc_vnic_resources(struct enic *);
--- a/drivers/net/enic/vnic_dev.c	2010-09-29 15:21:48.003304595 +0900
+++ b/drivers/net/enic/vnic_dev.c	2010-09-29 15:27:22.315218464 +0900
@@ -186,21 +186,6 @@ void __iomem *vnic_dev_get_res(struct vn
 	}
 }
 
-dma_addr_t vnic_dev_get_res_bus_addr(struct vnic_dev *vdev,
-	enum vnic_res_type type, unsigned int index)
-{
-	switch (type) {
-	case RES_TYPE_WQ:
-	case RES_TYPE_RQ:
-	case RES_TYPE_CQ:
-	case RES_TYPE_INTR_CTRL:
-		return vdev->res[type].bus_addr +
-			index * VNIC_RES_STRIDE;
-	default:
-		return vdev->res[type].bus_addr;
-	}
-}
-
 unsigned int vnic_dev_desc_ring_size(struct vnic_dev_ring *ring,
 	unsigned int desc_count, unsigned int desc_size)
 {
@@ -384,18 +369,6 @@ static int vnic_dev_cmd_no_proxy(struct 
 	return err;
 }
 
-void vnic_dev_cmd_proxy_by_bdf_start(struct vnic_dev *vdev, u16 bdf)
-{
-	vdev->proxy = PROXY_BY_BDF;
-	vdev->proxy_index = bdf;
-}
-
-void vnic_dev_cmd_proxy_end(struct vnic_dev *vdev)
-{
-	vdev->proxy = PROXY_NONE;
-	vdev->proxy_index = 0;
-}
-
 int vnic_dev_cmd(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd,
 	u64 *a0, u64 *a1, int wait)
 {
@@ -488,13 +461,6 @@ int vnic_dev_spec(struct vnic_dev *vdev,
 	return err;
 }
 
-int vnic_dev_stats_clear(struct vnic_dev *vdev)
-{
-	u64 a0 = 0, a1 = 0;
-	int wait = 1000;
-	return vnic_dev_cmd(vdev, CMD_STATS_CLEAR, &a0, &a1, wait);
-}
-
 int vnic_dev_stats_dump(struct vnic_dev *vdev, struct vnic_stats **stats)
 {
 	u64 a0, a1;
@@ -528,19 +494,6 @@ int vnic_dev_enable(struct vnic_dev *vde
 	return vnic_dev_cmd(vdev, CMD_ENABLE, &a0, &a1, wait);
 }
 
-int vnic_dev_enable_wait(struct vnic_dev *vdev)
-{
-	u64 a0 = 0, a1 = 0;
-	int wait = 1000;
-	int err;
-
-	err = vnic_dev_cmd(vdev, CMD_ENABLE_WAIT, &a0, &a1, wait);
-	if (err == ERR_ECMDUNKNOWN)
-		return vnic_dev_cmd(vdev, CMD_ENABLE, &a0, &a1, wait);
-
-	return err;
-}
-
 int vnic_dev_disable(struct vnic_dev *vdev)
 {
 	u64 a0 = 0, a1 = 0;
@@ -572,30 +525,6 @@ int vnic_dev_open_done(struct vnic_dev *
 	return 0;
 }
 
-int vnic_dev_soft_reset(struct vnic_dev *vdev, int arg)
-{
-	u64 a0 = (u32)arg, a1 = 0;
-	int wait = 1000;
-	return vnic_dev_cmd(vdev, CMD_SOFT_RESET, &a0, &a1, wait);
-}
-
-int vnic_dev_soft_reset_done(struct vnic_dev *vdev, int *done)
-{
-	u64 a0 = 0, a1 = 0;
-	int wait = 1000;
-	int err;
-
-	*done = 0;
-
-	err = vnic_dev_cmd(vdev, CMD_SOFT_RESET_STATUS, &a0, &a1, wait);
-	if (err)
-		return err;
-
-	*done = (a0 == 0);
-
-	return 0;
-}
-
 int vnic_dev_hang_reset(struct vnic_dev *vdev, int arg)
 {
 	u64 a0 = (u32)arg, a1 = 0;
@@ -680,26 +609,6 @@ int vnic_dev_packet_filter(struct vnic_d
 	return err;
 }
 
-int vnic_dev_packet_filter_all(struct vnic_dev *vdev, int directed,
-	int multicast, int broadcast, int promisc, int allmulti)
-{
-	u64 a0, a1 = 0;
-	int wait = 1000;
-	int err;
-
-	a0 = (directed ? CMD_PFILTER_DIRECTED : 0) |
-	     (multicast ? CMD_PFILTER_MULTICAST : 0) |
-	     (broadcast ? CMD_PFILTER_BROADCAST : 0) |
-	     (promisc ? CMD_PFILTER_PROMISCUOUS : 0) |
-	     (allmulti ? CMD_PFILTER_ALL_MULTICAST : 0);
-
-	err = vnic_dev_cmd(vdev, CMD_PACKET_FILTER_ALL, &a0, &a1, wait);
-	if (err)
-		pr_err("Can't set packet filter\n");
-
-	return err;
-}
-
 int vnic_dev_add_addr(struct vnic_dev *vdev, u8 *addr)
 {
 	u64 a0 = 0, a1 = 0;
@@ -748,19 +657,6 @@ int vnic_dev_set_ig_vlan_rewrite_mode(st
 	return err;
 }
 
-int vnic_dev_raise_intr(struct vnic_dev *vdev, u16 intr)
-{
-	u64 a0 = intr, a1 = 0;
-	int wait = 1000;
-	int err;
-
-	err = vnic_dev_cmd(vdev, CMD_IAR, &a0, &a1, wait);
-	if (err)
-		pr_err("Failed to raise INTR[%d], err %d\n", intr, err);
-
-	return err;
-}
-
 int vnic_dev_notify_setcmd(struct vnic_dev *vdev,
 	void *notify_addr, dma_addr_t notify_pa, u16 intr)
 {
@@ -954,30 +850,6 @@ u32 vnic_dev_mtu(struct vnic_dev *vdev)
 	return vdev->notify_copy.mtu;
 }
 
-u32 vnic_dev_link_down_cnt(struct vnic_dev *vdev)
-{
-	if (!vnic_dev_notify_ready(vdev))
-		return 0;
-
-	return vdev->notify_copy.link_down_cnt;
-}
-
-u32 vnic_dev_notify_status(struct vnic_dev *vdev)
-{
-	if (!vnic_dev_notify_ready(vdev))
-		return 0;
-
-	return vdev->notify_copy.status;
-}
-
-u32 vnic_dev_uif(struct vnic_dev *vdev)
-{
-	if (!vnic_dev_notify_ready(vdev))
-		return 0;
-
-	return vdev->notify_copy.uif;
-}
-
 void vnic_dev_set_intr_mode(struct vnic_dev *vdev,
 	enum vnic_dev_intr_mode intr_mode)
 {
--- a/drivers/net/enic/vnic_dev.h	2010-09-29 15:21:48.013306844 +0900
+++ b/drivers/net/enic/vnic_dev.h	2010-09-29 15:26:29.273306571 +0900
@@ -84,8 +84,6 @@ unsigned int vnic_dev_get_res_count(stru
 	enum vnic_res_type type);
 void __iomem *vnic_dev_get_res(struct vnic_dev *vdev, enum vnic_res_type type,
 	unsigned int index);
-dma_addr_t vnic_dev_get_res_bus_addr(struct vnic_dev *vdev,
-	enum vnic_res_type type, unsigned int index);
 unsigned int vnic_dev_desc_ring_size(struct vnic_dev_ring *ring,
 	unsigned int desc_count, unsigned int desc_size);
 void vnic_dev_clear_desc_ring(struct vnic_dev_ring *ring);
@@ -95,21 +93,16 @@ void vnic_dev_free_desc_ring(struct vnic
 	struct vnic_dev_ring *ring);
 int vnic_dev_cmd(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd,
 	u64 *a0, u64 *a1, int wait);
-void vnic_dev_cmd_proxy_by_bdf_start(struct vnic_dev *vdev, u16 bdf);
-void vnic_dev_cmd_proxy_end(struct vnic_dev *vdev);
 int vnic_dev_fw_info(struct vnic_dev *vdev,
 	struct vnic_devcmd_fw_info **fw_info);
 int vnic_dev_hw_version(struct vnic_dev *vdev,
 	enum vnic_dev_hw_version *hw_ver);
 int vnic_dev_spec(struct vnic_dev *vdev, unsigned int offset, unsigned int size,
 	void *value);
-int vnic_dev_stats_clear(struct vnic_dev *vdev);
 int vnic_dev_stats_dump(struct vnic_dev *vdev, struct vnic_stats **stats);
 int vnic_dev_hang_notify(struct vnic_dev *vdev);
 int vnic_dev_packet_filter(struct vnic_dev *vdev, int directed, int multicast,
 	int broadcast, int promisc, int allmulti);
-int vnic_dev_packet_filter_all(struct vnic_dev *vdev, int directed,
-	int multicast, int broadcast, int promisc, int allmulti);
 int vnic_dev_add_addr(struct vnic_dev *vdev, u8 *addr);
 int vnic_dev_del_addr(struct vnic_dev *vdev, u8 *addr);
 int vnic_dev_mac_addr(struct vnic_dev *vdev, u8 *mac_addr);
@@ -124,11 +117,8 @@ u32 vnic_dev_port_speed(struct vnic_dev 
 u32 vnic_dev_msg_lvl(struct vnic_dev *vdev);
 u32 vnic_dev_mtu(struct vnic_dev *vdev);
 u32 vnic_dev_link_down_cnt(struct vnic_dev *vdev);
-u32 vnic_dev_notify_status(struct vnic_dev *vdev);
-u32 vnic_dev_uif(struct vnic_dev *vdev);
 int vnic_dev_close(struct vnic_dev *vdev);
 int vnic_dev_enable(struct vnic_dev *vdev);
-int vnic_dev_enable_wait(struct vnic_dev *vdev);
 int vnic_dev_disable(struct vnic_dev *vdev);
 int vnic_dev_open(struct vnic_dev *vdev, int arg);
 int vnic_dev_open_done(struct vnic_dev *vdev, int *done);
--- a/drivers/net/enic/vnic_intr.c	2010-09-29 15:21:48.033303590 +0900
+++ b/drivers/net/enic/vnic_intr.c	2010-09-29 15:26:29.273306571 +0900
@@ -65,8 +65,3 @@ void vnic_intr_clean(struct vnic_intr *i
 {
 	iowrite32(0, &intr->ctrl->int_credits);
 }
-
-void vnic_intr_raise(struct vnic_intr *intr)
-{
-	vnic_dev_raise_intr(intr->vdev, (u16)intr->index);
-}

^ permalink raw reply

* [PATCH net-next 2/2] enic: make local functions static
From: Stephen Hemminger @ 2010-09-29  6:29 UTC (permalink / raw)
  To: Scott Feldman, Vasanthy Kolluri, Roopa Prabhu; +Cc: David Miller, netdev
In-Reply-To: <20100929151959.6a09a269@s6510>

Lots of functions in this driver are only used in one file and should
be static. Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

---
 drivers/net/enic/enic_main.c |    6 +++---
 drivers/net/enic/vnic_dev.c  |    6 +++---
 drivers/net/enic/vnic_dev.h  |    7 -------
 drivers/net/enic/vnic_rq.c   |    2 +-
 drivers/net/enic/vnic_rq.h   |    4 ----
 drivers/net/enic/vnic_wq.c   |    2 +-
 drivers/net/enic/vnic_wq.h   |    4 ----
 7 files changed, 8 insertions(+), 23 deletions(-)

--- a/drivers/net/enic/enic_main.c	2010-09-29 15:21:47.173306644 +0900
+++ b/drivers/net/enic/enic_main.c	2010-09-29 15:27:30.223305739 +0900
@@ -1972,7 +1972,7 @@ static int enic_dev_hang_notify(struct e
 	return err;
 }
 
-int enic_dev_set_ig_vlan_rewrite_mode(struct enic *enic)
+static int enic_dev_set_ig_vlan_rewrite_mode(struct enic *enic)
 {
 	int err;
 
@@ -2147,14 +2147,14 @@ static const struct net_device_ops enic_
 #endif
 };
 
-void enic_dev_deinit(struct enic *enic)
+static void enic_dev_deinit(struct enic *enic)
 {
 	netif_napi_del(&enic->napi);
 	enic_free_vnic_resources(enic);
 	enic_clear_intr_mode(enic);
 }
 
-int enic_dev_init(struct enic *enic)
+static int enic_dev_init(struct enic *enic)
 {
 	struct device *dev = enic_get_dev(enic);
 	struct net_device *netdev = enic->netdev;
--- a/drivers/net/enic/vnic_dev.c	2010-09-29 15:27:22.315218464 +0900
+++ b/drivers/net/enic/vnic_dev.c	2010-09-29 15:27:30.233306032 +0900
@@ -186,7 +186,7 @@ void __iomem *vnic_dev_get_res(struct vn
 	}
 }
 
-unsigned int vnic_dev_desc_ring_size(struct vnic_dev_ring *ring,
+static unsigned int vnic_dev_desc_ring_size(struct vnic_dev_ring *ring,
 	unsigned int desc_count, unsigned int desc_size)
 {
 	/* The base address of the desc rings must be 512 byte aligned.
@@ -657,7 +657,7 @@ int vnic_dev_set_ig_vlan_rewrite_mode(st
 	return err;
 }
 
-int vnic_dev_notify_setcmd(struct vnic_dev *vdev,
+static int vnic_dev_notify_setcmd(struct vnic_dev *vdev,
 	void *notify_addr, dma_addr_t notify_pa, u16 intr)
 {
 	u64 a0, a1;
@@ -696,7 +696,7 @@ int vnic_dev_notify_set(struct vnic_dev 
 	return vnic_dev_notify_setcmd(vdev, notify_addr, notify_pa, intr);
 }
 
-int vnic_dev_notify_unsetcmd(struct vnic_dev *vdev)
+static int vnic_dev_notify_unsetcmd(struct vnic_dev *vdev)
 {
 	u64 a0, a1;
 	int wait = 1000;
--- a/drivers/net/enic/vnic_rq.c	2010-09-29 15:21:47.203305569 +0900
+++ b/drivers/net/enic/vnic_rq.c	2010-09-29 15:27:30.233306032 +0900
@@ -115,7 +115,7 @@ int vnic_rq_alloc(struct vnic_dev *vdev,
 	return 0;
 }
 
-void vnic_rq_init_start(struct vnic_rq *rq, unsigned int cq_index,
+static void vnic_rq_init_start(struct vnic_rq *rq, unsigned int cq_index,
 	unsigned int fetch_index, unsigned int posted_index,
 	unsigned int error_interrupt_enable,
 	unsigned int error_interrupt_offset)
--- a/drivers/net/enic/vnic_wq.c	2010-09-29 15:21:47.213306002 +0900
+++ b/drivers/net/enic/vnic_wq.c	2010-09-29 15:27:30.233306032 +0900
@@ -115,7 +115,7 @@ int vnic_wq_alloc(struct vnic_dev *vdev,
 	return 0;
 }
 
-void vnic_wq_init_start(struct vnic_wq *wq, unsigned int cq_index,
+static void vnic_wq_init_start(struct vnic_wq *wq, unsigned int cq_index,
 	unsigned int fetch_index, unsigned int posted_index,
 	unsigned int error_interrupt_enable,
 	unsigned int error_interrupt_offset)
--- a/drivers/net/enic/vnic_dev.h	2010-09-29 15:26:29.273306571 +0900
+++ b/drivers/net/enic/vnic_dev.h	2010-09-29 15:27:30.233306032 +0900
@@ -84,8 +84,6 @@ unsigned int vnic_dev_get_res_count(stru
 	enum vnic_res_type type);
 void __iomem *vnic_dev_get_res(struct vnic_dev *vdev, enum vnic_res_type type,
 	unsigned int index);
-unsigned int vnic_dev_desc_ring_size(struct vnic_dev_ring *ring,
-	unsigned int desc_count, unsigned int desc_size);
 void vnic_dev_clear_desc_ring(struct vnic_dev_ring *ring);
 int vnic_dev_alloc_desc_ring(struct vnic_dev *vdev, struct vnic_dev_ring *ring,
 	unsigned int desc_count, unsigned int desc_size);
@@ -106,17 +104,12 @@ int vnic_dev_packet_filter(struct vnic_d
 int vnic_dev_add_addr(struct vnic_dev *vdev, u8 *addr);
 int vnic_dev_del_addr(struct vnic_dev *vdev, u8 *addr);
 int vnic_dev_mac_addr(struct vnic_dev *vdev, u8 *mac_addr);
-int vnic_dev_raise_intr(struct vnic_dev *vdev, u16 intr);
-int vnic_dev_notify_setcmd(struct vnic_dev *vdev,
-	void *notify_addr, dma_addr_t notify_pa, u16 intr);
 int vnic_dev_notify_set(struct vnic_dev *vdev, u16 intr);
-int vnic_dev_notify_unsetcmd(struct vnic_dev *vdev);
 int vnic_dev_notify_unset(struct vnic_dev *vdev);
 int vnic_dev_link_status(struct vnic_dev *vdev);
 u32 vnic_dev_port_speed(struct vnic_dev *vdev);
 u32 vnic_dev_msg_lvl(struct vnic_dev *vdev);
 u32 vnic_dev_mtu(struct vnic_dev *vdev);
-u32 vnic_dev_link_down_cnt(struct vnic_dev *vdev);
 int vnic_dev_close(struct vnic_dev *vdev);
 int vnic_dev_enable(struct vnic_dev *vdev);
 int vnic_dev_disable(struct vnic_dev *vdev);
--- a/drivers/net/enic/vnic_rq.h	2010-09-29 15:21:47.243305555 +0900
+++ b/drivers/net/enic/vnic_rq.h	2010-09-29 15:27:30.233306032 +0900
@@ -202,10 +202,6 @@ static inline int vnic_rq_fill(struct vn
 void vnic_rq_free(struct vnic_rq *rq);
 int vnic_rq_alloc(struct vnic_dev *vdev, struct vnic_rq *rq, unsigned int index,
 	unsigned int desc_count, unsigned int desc_size);
-void vnic_rq_init_start(struct vnic_rq *rq, unsigned int cq_index,
-	unsigned int fetch_index, unsigned int posted_index,
-	unsigned int error_interrupt_enable,
-	unsigned int error_interrupt_offset);
 void vnic_rq_init(struct vnic_rq *rq, unsigned int cq_index,
 	unsigned int error_interrupt_enable,
 	unsigned int error_interrupt_offset);
--- a/drivers/net/enic/vnic_wq.h	2010-09-29 15:21:47.263307399 +0900
+++ b/drivers/net/enic/vnic_wq.h	2010-09-29 15:27:30.233306032 +0900
@@ -153,10 +153,6 @@ static inline void vnic_wq_service(struc
 void vnic_wq_free(struct vnic_wq *wq);
 int vnic_wq_alloc(struct vnic_dev *vdev, struct vnic_wq *wq, unsigned int index,
 	unsigned int desc_count, unsigned int desc_size);
-void vnic_wq_init_start(struct vnic_wq *wq, unsigned int cq_index,
-	unsigned int fetch_index, unsigned int posted_index,
-	unsigned int error_interrupt_enable,
-	unsigned int error_interrupt_offset);
 void vnic_wq_init(struct vnic_wq *wq, unsigned int cq_index,
 	unsigned int error_interrupt_enable,
 	unsigned int error_interrupt_offset);

^ permalink raw reply

* Re: [PATCH 4/7] net: emaclite: Add support for little-endian platforms
From: David Miller @ 2010-09-29  6:27 UTC (permalink / raw)
  To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ
  Cc: eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w,
	microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, duyl-gjFFaj9aHVfQT0dZR+AlfA,
	netdev-u79uwXL29TY76Z2rM5mHXA, linnj-gjFFaj9aHVfQT0dZR+AlfA,
	edgar.iglesias-Re5JQEeQqe8AvxtiuMwx3w,
	john.williams-g5w7nrANp4BDPfheJLI6IQ
In-Reply-To: <20100929061146.GA2439-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>

From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Date: Wed, 29 Sep 2010 15:11:46 +0900

> On Wed, Sep 29, 2010 at 03:52:15PM +1000, Michal Simek wrote:
>> Upcomming Microblaze is little endian that's why is necessary
>> to fix protocol and length loading.
>> 
>> Signed-off-by: Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
>> CC: "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
>> CC: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
>> CC: Eric Dumazet <eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> CC: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> CC: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> CC: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> 
> This should go via davem, but it looks correct to me.
> 
> Acked-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>

It doesn't need to, the microblaze guys can integrate this directly:

Acked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

^ permalink raw reply

* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support
From: Eric Dumazet @ 2010-09-29  6:24 UTC (permalink / raw)
  To: Herbert Xu; +Cc: davem, netdev, Patrick McHardy
In-Reply-To: <20100929043642.GA3660@gondor.apana.org.au>

Le mercredi 29 septembre 2010 à 13:36 +0900, Herbert Xu a écrit :
> On Wed, Sep 29, 2010 at 06:24:55AM +0200, Eric Dumazet wrote:
> >
> > Well, we all know icmpv6_cleanup() is not really called (or can we
> > really unload ipv6 ?).
> > 
> > But unregister_icmpv6_send() should be the first call in it.
> 
> Do we really need to support IPV6=m and GRE=y? It might be simpler
> to just behave as if IPv6 is off when this combination is given.
> 
> Cheers,

Well, sometimes people wants to :

/etc/modprobe.conf
install ipv6 /bin/true


Yet, be able to load ip_gre as a module

so IPV6=m, GRE=m,




^ permalink raw reply

* Re: [PATCH 4/7] net: emaclite: Add support for little-endian platforms
From: Grant Likely @ 2010-09-29  6:11 UTC (permalink / raw)
  To: Michal Simek
  Cc: linux-kernel, john.williams, edgar.iglesias, duyl, linnj,
	microblaze-uclinux, David S. Miller, Eric Dumazet, netdev,
	devicetree-discuss
In-Reply-To: <1285739538-29058-5-git-send-email-monstr@monstr.eu>

On Wed, Sep 29, 2010 at 03:52:15PM +1000, Michal Simek wrote:
> Upcomming Microblaze is little endian that's why is necessary
> to fix protocol and length loading.
> 
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> CC: "David S. Miller" <davem@davemloft.net>
> CC: Grant Likely <grant.likely@secretlab.ca>
> CC: Eric Dumazet <eric.dumazet@gmail.com>
> CC: netdev@vger.kernel.org
> CC: linux-kernel@vger.kernel.org
> CC: devicetree-discuss@lists.ozlabs.org

This should go via davem, but it looks correct to me.

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
>  drivers/net/xilinx_emaclite.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
> index 71122ee..533ebb1 100644
> --- a/drivers/net/xilinx_emaclite.c
> +++ b/drivers/net/xilinx_emaclite.c
> @@ -430,8 +430,8 @@ static u16 xemaclite_recv_data(struct net_local *drvdata, u8 *data)
>  	}
>  
>  	/* Get the protocol type of the ethernet frame that arrived */
> -	proto_type = ((in_be32(addr + XEL_HEADER_OFFSET +
> -			XEL_RXBUFF_OFFSET) >> XEL_HEADER_SHIFT) &
> +	proto_type = ((ntohl(in_be32(addr + XEL_HEADER_OFFSET +
> +			XEL_RXBUFF_OFFSET)) >> XEL_HEADER_SHIFT) &
>  			XEL_RPLR_LENGTH_MASK);
>  
>  	/* Check if received ethernet frame is a raw ethernet frame
> @@ -439,9 +439,9 @@ static u16 xemaclite_recv_data(struct net_local *drvdata, u8 *data)
>  	if (proto_type > (ETH_FRAME_LEN + ETH_FCS_LEN)) {
>  
>  		if (proto_type == ETH_P_IP) {
> -			length = ((in_be32(addr +
> +			length = ((ntohl(in_be32(addr +
>  					XEL_HEADER_IP_LENGTH_OFFSET +
> -					XEL_RXBUFF_OFFSET) >>
> +					XEL_RXBUFF_OFFSET)) >>
>  					XEL_HEADER_SHIFT) &
>  					XEL_RPLR_LENGTH_MASK);
>  			length += ETH_HLEN + ETH_FCS_LEN;
> -- 
> 1.5.5.1
> 

^ permalink raw reply

* [PATCH 4/7] net: emaclite: Add support for little-endian platforms
From: Michal Simek @ 2010-09-29  5:52 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Eric Dumazet, microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	duyl-gjFFaj9aHVfQT0dZR+AlfA, netdev-u79uwXL29TY76Z2rM5mHXA,
	linnj-gjFFaj9aHVfQT0dZR+AlfA,
	edgar.iglesias-Re5JQEeQqe8AvxtiuMwx3w, David S. Miller,
	john.williams-g5w7nrANp4BDPfheJLI6IQ
In-Reply-To: <1285739538-29058-4-git-send-email-monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>

Upcomming Microblaze is little endian that's why is necessary
to fix protocol and length loading.

Signed-off-by: Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
CC: "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
CC: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
CC: Eric Dumazet <eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
CC: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
CC: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
CC: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
---
 drivers/net/xilinx_emaclite.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 71122ee..533ebb1 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -430,8 +430,8 @@ static u16 xemaclite_recv_data(struct net_local *drvdata, u8 *data)
 	}
 
 	/* Get the protocol type of the ethernet frame that arrived */
-	proto_type = ((in_be32(addr + XEL_HEADER_OFFSET +
-			XEL_RXBUFF_OFFSET) >> XEL_HEADER_SHIFT) &
+	proto_type = ((ntohl(in_be32(addr + XEL_HEADER_OFFSET +
+			XEL_RXBUFF_OFFSET)) >> XEL_HEADER_SHIFT) &
 			XEL_RPLR_LENGTH_MASK);
 
 	/* Check if received ethernet frame is a raw ethernet frame
@@ -439,9 +439,9 @@ static u16 xemaclite_recv_data(struct net_local *drvdata, u8 *data)
 	if (proto_type > (ETH_FRAME_LEN + ETH_FCS_LEN)) {
 
 		if (proto_type == ETH_P_IP) {
-			length = ((in_be32(addr +
+			length = ((ntohl(in_be32(addr +
 					XEL_HEADER_IP_LENGTH_OFFSET +
-					XEL_RXBUFF_OFFSET) >>
+					XEL_RXBUFF_OFFSET)) >>
 					XEL_HEADER_SHIFT) &
 					XEL_RPLR_LENGTH_MASK);
 			length += ETH_HLEN + ETH_FCS_LEN;
-- 
1.5.5.1

^ permalink raw reply related

* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support
From: David Miller @ 2010-09-29  5:38 UTC (permalink / raw)
  To: herbert; +Cc: eric.dumazet, netdev, kaber
In-Reply-To: <20100928.214132.226782961.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Tue, 28 Sep 2010 21:41:32 -0700 (PDT)

> Eric, please cook up a patch which does this, I think the
> magic Kconfig dependency formula for this is:
> 
> 	depends on IPV6 || IPV6=n
> 
> Thanks!

Nevermind, I took care of it :-)

--------------------
ip_gre: Fix dependencies wrt. ipv6.

The GRE tunnel driver needs to invoke icmpv6 helpers in the
ipv6 stack when ipv6 support is enabled.

Therefore if IPV6 is enabled, we have to enforce that GRE's
enabling (modular or static) matches that of ipv6.

Reported-by: Patrick McHardy <kaber@trash.net>
Reported-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/ipv4/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index 571f895..72380a3 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -217,6 +217,7 @@ config NET_IPIP
 
 config NET_IPGRE
 	tristate "IP: GRE tunnels over IP"
+	depends on IPV6 || IPV6=n
 	help
 	  Tunneling means encapsulating data of one protocol type within
 	  another protocol and sending it over a channel that understands the
-- 
1.7.3


^ permalink raw reply related

* [PATCH net-next] tcp: tcp_enter_quickack_mode can be static
From: Stephen Hemminger @ 2010-09-29  5:30 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

Function only used in tcp_input.c

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

---
 include/net/tcp.h    |    2 --
 net/ipv4/tcp_input.c |    2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

--- a/net/ipv4/tcp_input.c	2010-09-29 14:00:54.145805254 +0900
+++ b/net/ipv4/tcp_input.c	2010-09-29 14:24:27.595831651 +0900
@@ -182,7 +182,7 @@ static void tcp_incr_quickack(struct soc
 		icsk->icsk_ack.quick = min(quickacks, TCP_MAX_QUICKACKS);
 }
 
-void tcp_enter_quickack_mode(struct sock *sk)
+static void tcp_enter_quickack_mode(struct sock *sk)
 {
 	struct inet_connection_sock *icsk = inet_csk(sk);
 	tcp_incr_quickack(sk);
--- a/include/net/tcp.h	2010-09-29 14:27:53.543307029 +0900
+++ b/include/net/tcp.h	2010-09-29 14:28:10.435891279 +0900
@@ -346,8 +346,6 @@ static inline void tcp_dec_quickack_mode
 	}
 }
 
-extern void tcp_enter_quickack_mode(struct sock *sk);
-
 #define	TCP_ECN_OK		1
 #define	TCP_ECN_QUEUE_CWR	2
 #define	TCP_ECN_DEMAND_CWR	4

^ permalink raw reply

* Re: [PATCH linux-2.6 v2] IPv6: Create temporary address if none exists.
From: David Miller @ 2010-09-29  5:25 UTC (permalink / raw)
  To: gwurster
  Cc: kuznet, pekkas, jmorris, yoshfuji, kaber, shemminger,
	eric.dumazet, herbert, ebiederm, netdev, linux-kernel
In-Reply-To: <20100927170430.GA7106@adams.ccsl.carleton.ca>

From: Glenn Wurster <gwurster@scs.carleton.ca>
Date: Mon, 27 Sep 2010 13:04:30 -0400

> If privacy extentions are enabled, but no current temporary address exists,
> then create one when we get a router advertisement.
> 
> Version 2, now with 100% fewer line wraps.  Thanks to David Miller for
> pointing out the line wrapping issue.
> 
> Signed-off-by: Glenn Wurster <gwurster@scs.carleton.ca>

The existing code is correct from what I can tell.

Variable "create" is true when "ifp == NULL" and "valid_lft != 0"

And RFC 3041 explicitly states in section 3.3:

	When a new public address is created as described in [ADDRCONF]
	(because the prefix advertised does not match the prefix of any
	address already assigned to the interface, and Valid Lifetime
	in the option is not zero), also create a new temporary address.

Your patch is going to cause us to create a temporary address even
when valid_lft is zero, which the RFC says we should not do.

That goes against what the RFC tells us to do, so I can only conclude
that your patch is not correct.

I'm not applying this, sorry.

^ permalink raw reply

* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support
From: David Miller @ 2010-09-29  4:41 UTC (permalink / raw)
  To: herbert; +Cc: eric.dumazet, netdev, kaber
In-Reply-To: <20100929043642.GA3660@gondor.apana.org.au>

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 29 Sep 2010 13:36:42 +0900

> On Wed, Sep 29, 2010 at 06:24:55AM +0200, Eric Dumazet wrote:
>>
>> Well, we all know icmpv6_cleanup() is not really called (or can we
>> really unload ipv6 ?).
>> 
>> But unregister_icmpv6_send() should be the first call in it.
> 
> Do we really need to support IPV6=m and GRE=y? It might be simpler
> to just behave as if IPv6 is off when this combination is given.

I think we should make it so that the Kconfig rule only allows
"m" or "n" for IP_GRE when IPV6=m

That's how we handle this kind of situation elsewhere, f.e. see
bonding.

Eric, please cook up a patch which does this, I think the
magic Kconfig dependency formula for this is:

	depends on IPV6 || IPV6=n

Thanks!

^ permalink raw reply

* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support
From: Herbert Xu @ 2010-09-29  4:36 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: davem, netdev, Patrick McHardy
In-Reply-To: <1285734295.22570.25.camel@edumazet-laptop>

On Wed, Sep 29, 2010 at 06:24:55AM +0200, Eric Dumazet wrote:
>
> Well, we all know icmpv6_cleanup() is not really called (or can we
> really unload ipv6 ?).
> 
> But unregister_icmpv6_send() should be the first call in it.

Do we really need to support IPV6=m and GRE=y? It might be simpler
to just behave as if IPv6 is off when this combination is given.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply

* Re: WiMAX linux firmware pull request
From: Inaky Perez-Gonzalez @ 2010-09-29  4:27 UTC (permalink / raw)
  To: David Woodhouse; +Cc: wimax@linuxwimax.org, netdev@vger.kernel.org
In-Reply-To: <1285728768.814.74.camel@macbook.infradead.org>

On Tue, 2010-09-28 at 19:52 -0700, David Woodhouse wrote: 
> On Tue, 2010-09-28 at 11:46 -0700, Inaky Perez-Gonzalez wrote:    
> >    The 1.3 version is purged as it is not supported anymore.
> 
> Not supported by newer kernels? Or "if you are using something that
> requires the 1.3 firmware, you can just fuck off and die", along the
> lines of what we say to users of the 2.4 kernel?

Along those lines -- basically 1.3 was an experimental release and if
you have that firmware, you won't be able to connect to anything than a
very specific test setup in a lab. The code is still there because it is
just two perfectly isolated paths (if curious, check what goes with the
i2400m_le_v1_3() test) that I forgot to excise out.

> We shouldn't drop stuff from linux-firmware.git until there really is
> *no* reason to need it any more. We shouldn't force people to keep
> linux-firmware in step with their kernel; they should always be able to
> use the latest.

Yes, I am aware of that. That's why 1.4 is kept there -- 1.3 is an
special case because as I said above, it can't be used in the real world
of WiMAX, 

> When I get home from Tokyo I'll be working on a way to specify min/max
> kernel versions for each firmware image, along with a 'make install'
> target which lets you say "drop anything which is only relevant to
> kernels < 2.6.35' or whatever.

That looks pretty sensible :)




^ permalink raw reply

* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support
From: Eric Dumazet @ 2010-09-29  4:24 UTC (permalink / raw)
  To: Herbert Xu; +Cc: davem, netdev, Patrick McHardy
In-Reply-To: <1285733911.22570.20.camel@edumazet-laptop>

Le mercredi 29 septembre 2010 à 06:18 +0200, Eric Dumazet a écrit :

> diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
> index 03e62f9..25e9ad6 100644
> --- a/net/ipv6/icmp.c
> +++ b/net/ipv6/icmp.c
> @@ -862,6 +862,7 @@ int __init icmpv6_init(void)
>  	err = -EAGAIN;
>  	if (inet6_add_protocol(&icmpv6_protocol, IPPROTO_ICMPV6) < 0)
>  		goto fail;
> +	register_icmpv6_send(icmpv6_send);
>  	return 0;
>  
>  fail:
> @@ -874,6 +875,7 @@ void icmpv6_cleanup(void)
>  {
>  	unregister_pernet_subsys(&icmpv6_sk_ops);
>  	inet6_del_protocol(&icmpv6_protocol, IPPROTO_ICMPV6);
> +	unregister_icmpv6_send();
>  }

Well, we all know icmpv6_cleanup() is not really called (or can we
really unload ipv6 ?).

But unregister_icmpv6_send() should be the first call in it.

Updated patch :

[PATCH v2] ipv6: introduce call_icmpv6_send()

ip_gre module has a dependency against IPv6:

It needs to call icmpv6_send(), while this symbol is available only if
IPv6 module is loaded (or static)

Introduce call_icmpv6_send(), provided in core network, to indirectly
call icmpv6_send() function if available.

Reported-by: Patrick McHardy <kaber@trash.net>
Reported-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 include/net/icmp.h |    6 ++++++
 net/ipv4/icmp.c    |   33 +++++++++++++++++++++++++++++++++
 net/ipv4/ip_gre.c  |    2 +-
 net/ipv6/icmp.c    |    2 ++
 4 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/include/net/icmp.h b/include/net/icmp.h
index 6e991e0..ec45a4f 100644
--- a/include/net/icmp.h
+++ b/include/net/icmp.h
@@ -48,4 +48,10 @@ extern void	icmp_out_count(struct net *net, unsigned char type);
 /* Move into dst.h ? */
 extern int 	xrlim_allow(struct dst_entry *dst, int timeout);
 
+extern int register_icmpv6_send(void (*func)(struct sk_buff *skb, u8 type,
+					     u8 code, __u32 info));
+extern int unregister_icmpv6_send(void);
+extern void call_icmpv6_send(struct sk_buff *skb, u8 type,
+			     u8 code, __u32 info);
+
 #endif	/* _ICMP_H */
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index a0d847c..4c5b817 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -1217,3 +1217,36 @@ int __init icmp_init(void)
 {
 	return register_pernet_subsys(&icmp_sk_ops);
 }
+
+
+/* wrappers to call icmpv6_send() if ipv6 module is loaded */
+
+static void __rcu (*icmpv6_send_ptr)(struct sk_buff *skb, u8 type, u8 code,
+				     __u32 info);
+
+int register_icmpv6_send(void (*func)(struct sk_buff *skb, u8 type, u8 code,
+				      __u32 info))
+{
+	rcu_assign_pointer(icmpv6_send_ptr, func);
+	return 0;
+}
+EXPORT_SYMBOL(register_icmpv6_send);
+
+int unregister_icmpv6_send(void)
+{
+	rcu_assign_pointer(icmpv6_send_ptr, NULL);
+	synchronize_rcu();
+	return 0;
+}
+EXPORT_SYMBOL(unregister_icmpv6_send);
+
+/* called with rcu_read_lock */
+void call_icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info)
+{
+	void (*func)(struct sk_buff *skb, u8 type, u8 code, __u32 info);
+
+	func = rcu_dereference(icmpv6_send_ptr);
+	if (func)
+		(*func)(skb, type, code, info);
+}
+EXPORT_SYMBOL(call_icmpv6_send);
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 35c93e8..6cbd37c 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -788,7 +788,7 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
 		}
 
 		if (mtu >= IPV6_MIN_MTU && mtu < skb->len - tunnel->hlen + gre_hlen) {
-			icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
+			call_icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
 			ip_rt_put(rt);
 			goto tx_error;
 		}
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 03e62f9..2d0f56b 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -862,6 +862,7 @@ int __init icmpv6_init(void)
 	err = -EAGAIN;
 	if (inet6_add_protocol(&icmpv6_protocol, IPPROTO_ICMPV6) < 0)
 		goto fail;
+	register_icmpv6_send(icmpv6_send);
 	return 0;
 
 fail:
@@ -872,6 +873,7 @@ fail:
 
 void icmpv6_cleanup(void)
 {
+	unregister_icmpv6_send();
 	unregister_pernet_subsys(&icmpv6_sk_ops);
 	inet6_del_protocol(&icmpv6_protocol, IPPROTO_ICMPV6);
 }



^ permalink raw reply related

* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support
From: Eric Dumazet @ 2010-09-29  4:18 UTC (permalink / raw)
  To: Herbert Xu; +Cc: davem, netdev, Patrick McHardy
In-Reply-To: <1285663738.2607.30.camel@edumazet-laptop>

Le mardi 28 septembre 2010 à 10:48 +0200, Eric Dumazet a écrit :
> Le mardi 28 septembre 2010 à 17:41 +0900, Herbert Xu a écrit :
> > Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > > ipv6 can be a module, we should test CONFIG_IPV6 and CONFIG_IPV6_MODULE
> > > to enable ipv6 bits in ip_gre.
> > > 
> > > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> > 
> > To do this safely, we also need to disallow IPV6=m and GRE=y.
> > 
> > Cheers,
> 

I even remember Patrick warned about this 30 months ago.... Doh...

http://www.kerneltrap.com/mailarchive/linux-netdev/2008/1/22/590393

Given its now rare ipv6 is not loaded, what about following patch ?

Thanks !

Tested here, with a non loaded ipv6 module.


[PATCH] ipv6: introduce call_icmpv6_send()

ip_gre module has a dependency against IPv6:

It needs to call icmpv6_send(), while this symbol is available only if
IPv6 module is loaded (or static)

Introduce call_icmpv6_send(), provided in core network, to indirectly
call icmpv6_send() function if available.

Reported-by: Patrick McHardy <kaber@trash.net>
Reported-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 include/net/icmp.h |    6 ++++++
 net/ipv4/icmp.c    |   33 +++++++++++++++++++++++++++++++++
 net/ipv4/ip_gre.c  |    2 +-
 net/ipv6/icmp.c    |    2 ++
 4 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/include/net/icmp.h b/include/net/icmp.h
index 6e991e0..ec45a4f 100644
--- a/include/net/icmp.h
+++ b/include/net/icmp.h
@@ -48,4 +48,10 @@ extern void	icmp_out_count(struct net *net, unsigned char type);
 /* Move into dst.h ? */
 extern int 	xrlim_allow(struct dst_entry *dst, int timeout);
 
+extern int register_icmpv6_send(void (*func)(struct sk_buff *skb, u8 type,
+					     u8 code, __u32 info));
+extern int unregister_icmpv6_send(void);
+extern void call_icmpv6_send(struct sk_buff *skb, u8 type,
+			     u8 code, __u32 info);
+
 #endif	/* _ICMP_H */
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index a0d847c..4c5b817 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -1217,3 +1217,36 @@ int __init icmp_init(void)
 {
 	return register_pernet_subsys(&icmp_sk_ops);
 }
+
+
+/* wrappers to call icmpv6_send() if ipv6 module is loaded */
+
+static void __rcu (*icmpv6_send_ptr)(struct sk_buff *skb, u8 type, u8 code,
+				     __u32 info);
+
+int register_icmpv6_send(void (*func)(struct sk_buff *skb, u8 type, u8 code,
+				      __u32 info))
+{
+	rcu_assign_pointer(icmpv6_send_ptr, func);
+	return 0;
+}
+EXPORT_SYMBOL(register_icmpv6_send);
+
+int unregister_icmpv6_send(void)
+{
+	rcu_assign_pointer(icmpv6_send_ptr, NULL);
+	synchronize_rcu();
+	return 0;
+}
+EXPORT_SYMBOL(unregister_icmpv6_send);
+
+/* called with rcu_read_lock */
+void call_icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info)
+{
+	void (*func)(struct sk_buff *skb, u8 type, u8 code, __u32 info);
+
+	func = rcu_dereference(icmpv6_send_ptr);
+	if (func)
+		(*func)(skb, type, code, info);
+}
+EXPORT_SYMBOL(call_icmpv6_send);
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 35c93e8..6cbd37c 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -788,7 +788,7 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
 		}
 
 		if (mtu >= IPV6_MIN_MTU && mtu < skb->len - tunnel->hlen + gre_hlen) {
-			icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
+			call_icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
 			ip_rt_put(rt);
 			goto tx_error;
 		}
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 03e62f9..25e9ad6 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -862,6 +862,7 @@ int __init icmpv6_init(void)
 	err = -EAGAIN;
 	if (inet6_add_protocol(&icmpv6_protocol, IPPROTO_ICMPV6) < 0)
 		goto fail;
+	register_icmpv6_send(icmpv6_send);
 	return 0;
 
 fail:
@@ -874,6 +875,7 @@ void icmpv6_cleanup(void)
 {
 	unregister_pernet_subsys(&icmpv6_sk_ops);
 	inet6_del_protocol(&icmpv6_protocol, IPPROTO_ICMPV6);
+	unregister_icmpv6_send();
 }
 
 



^ permalink raw reply related

* Re: [RFC PATCH 2/2] macvtap: TX zero copy between guest and host kernel
From: Shirley Ma @ 2010-09-29  3:24 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Arnd Bergmann, Avi Kivity, Xin, Xiaohui, David Miller, netdev,
	kvm, linux-kernel
In-Reply-To: <1284562354.2573.12.camel@localhost.localdomain>

Hello Michael,

On Wed, 2010-09-15 at 07:52 -0700, Shirley Ma wrote:
> > >  Don't you think once I address vhost_add_used_and_signal update
> > > issue, it is a simple and complete patch for macvtap TX zero copy?
> > > 
> > > Thanks
> > > Shirley
> > 
> > I like the fact that the patch is simple. Unfortunately
> > I suspect it'll stop being simple by the time it's complete :) 
> 
> I can make a try. :)

I compared several approaches for addressing the issue being raised here
on how/when to update vhost_add_used_and_signal. The simple approach I
have found is:

1. Adding completion field in struct virtqueue;
2. when it is a zero copy packet, put vhost thread wait for completion
to update vhost_add_used_and_signal;
3. passing vq from vhost to macvtap as skb destruct_arg;
4. when skb is freed for the last reference, signal vq completion

The test results show same performance as the original patch. How do you
think? If it sounds good to you. I will resubmit this reversion patch.
The patch still keeps as simple as it was before. :)

Thanks
Shirley

^ permalink raw reply

* Re: [ABI REVIEW][PATCH 0/8] Namespace file descriptors
From: Rémi Denis-Courmont @ 2010-09-29  3:09 UTC (permalink / raw)
  To: Eric W. Biederman, Linux Containers; +Cc: netdev
In-Reply-To: <m1ocborgq7.fsf@fess.ebiederm.org>

(Trimming To/Cc heavily)

   Hello,

On Thursday 23 September 2010, Eric W. Biederman wrote:
> Introduce file for manipulating namespaces and related syscalls.
> files:
> /proc/self/ns/<nstype>
> 
> syscalls:
> int setns(unsigned long nstype, int fd);
> socketat(int nsfd, int family, int type, int protocol);
> 
> Netlink attribute:
> IFLA_NS_FD int fd.

I have not reviewed the code, but that seems quite nice. At Nokia, we already 
use network namespaces to implement the Multimedia Message Service. 
Inconveniently enough, that is HTTP/TCP/IP in a dedicated IP namespace. 
Similarly, I expect this could be useful to implement the IMS, if/when mobile 
operators start using it (that does not mean Nokia will or will not do it).

Using netns, we avoided overlapping with the normal Internet connectivity. 
setns() would be much more convenient than fork()+unshare().

-- 
Rémi Denis-Courmont
http://www.remlab.net/

^ permalink raw reply

* [PATCH 3] drivers/net/usb/qcusbnet: Spelling and extern int debug cleanups
From: Joe Perches @ 2010-09-29  3:09 UTC (permalink / raw)
  To: Elly Jones; +Cc: netdev, dbrownell, mjg59, jglasgow, msb, olofj
In-Reply-To: <0aa502d0e385f2333f8bc12dafdcde88e5ca0262.1285727642.git.joe@perches.com>

Some miscellaneous typo cleanups.
Add missing newlines to DBG messages.
"debug" is not a good global variable name, use qcusbnet_debug instead.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/usb/qcusbnet/qcusbnet.c  |   10 +++++-----
 drivers/net/usb/qcusbnet/qmidevice.c |    6 +++---
 drivers/net/usb/qcusbnet/structs.h   |    2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/usb/qcusbnet/qcusbnet.c b/drivers/net/usb/qcusbnet/qcusbnet.c
index 54a354e..7e218a8 100644
--- a/drivers/net/usb/qcusbnet/qcusbnet.c
+++ b/drivers/net/usb/qcusbnet/qcusbnet.c
@@ -25,7 +25,7 @@
 #define DRIVER_AUTHOR "Qualcomm Innovation Center"
 #define DRIVER_DESC "QCUSBNet2k"
 
-int debug;
+int qcusbnet_debug;
 static struct class *devclass;
 
 int qc_suspend(struct usb_interface *iface, pm_message_t event)
@@ -558,7 +558,7 @@ int qcnet_probe(struct usb_interface *iface, const struct usb_device_id *vidpids
 
 	dev = kmalloc(sizeof(struct qcusbnet), GFP_KERNEL);
 	if (!dev) {
-		DBG("falied to allocate device buffers");
+		DBG("failed to allocate device buffers\n");
 		return -ENOMEM;
 	}
 
@@ -568,7 +568,7 @@ int qcnet_probe(struct usb_interface *iface, const struct usb_device_id *vidpids
 
 	netdevops = kmalloc(sizeof(struct net_device_ops), GFP_KERNEL);
 	if (!netdevops) {
-		DBG("falied to allocate net device ops");
+		DBG("failed to allocate net device ops\n");
 		return -ENOMEM;
 	}
 	memcpy(netdevops, usbnet->net->netdev_ops, sizeof(struct net_device_ops));
@@ -645,5 +645,5 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("Dual BSD/GPL");
 
-module_param(debug, bool, S_IRUGO | S_IWUSR);
-MODULE_PARM_DESC(debug, "Debuging enabled or not");
+module_param(qcusbnet_debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(qcusbnet_debug, "Debugging enabled or not");
diff --git a/drivers/net/usb/qcusbnet/qmidevice.c b/drivers/net/usb/qcusbnet/qmidevice.c
index 5150453..d1cb341 100755
--- a/drivers/net/usb/qcusbnet/qmidevice.c
+++ b/drivers/net/usb/qcusbnet/qmidevice.c
@@ -54,7 +54,7 @@ struct qmihandle {
 	struct qcusbnet *dev;
 };
 
-extern int debug;
+extern int qcusbnet_debug;
 static int qcusbnet2k_fwdelay;
 
 static bool device_valid(struct qcusbnet *dev);
@@ -339,12 +339,12 @@ int qc_startread(struct qcusbnet *dev)
 void qc_stopread(struct qcusbnet *dev)
 {
 	if (dev->qmi.readurb) {
-		DBG("Killng read URB\n");
+		DBG("Killing read URB\n");
 		usb_kill_urb(dev->qmi.readurb);
 	}
 
 	if (dev->qmi.inturb) {
-		DBG("Killng int URB\n");
+		DBG("Killing int URB\n");
 		usb_kill_urb(dev->qmi.inturb);
 	}
 
diff --git a/drivers/net/usb/qcusbnet/structs.h b/drivers/net/usb/qcusbnet/structs.h
index 2999e62..7a89c5c 100755
--- a/drivers/net/usb/qcusbnet/structs.h
+++ b/drivers/net/usb/qcusbnet/structs.h
@@ -33,7 +33,7 @@
 
 #define DBG(fmt, arg...)						\
 do {									\
-	if (debug == 1)							\
+	if (qcusbnet_debug == 1)					\
 		printk(KERN_INFO "QCUSBNet2k::%s " fmt, __func__, ##arg); \
 } while (0)
 



^ permalink raw reply related

* [PATCH net-next] arp: remove unnecessary export of arp_broken_ops
From: Stephen Hemminger @ 2010-09-29  3:08 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

arp_broken_ops is only used in arp.c

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


--- a/include/net/arp.h	2010-09-29 10:36:46.125871462 +0900
+++ b/include/net/arp.h	2010-09-29 10:36:51.195923872 +0900
@@ -26,6 +26,4 @@ extern struct sk_buff *arp_create(int ty
 				  const unsigned char *target_hw);
 extern void arp_xmit(struct sk_buff *skb);
 
-extern const struct neigh_ops arp_broken_ops;
-
 #endif	/* _ARP_H */
--- a/net/ipv4/arp.c	2010-09-29 10:36:46.135874409 +0900
+++ b/net/ipv4/arp.c	2010-09-29 10:37:15.985915408 +0900
@@ -161,7 +161,7 @@ static const struct neigh_ops arp_direct
 	.queue_xmit =		dev_queue_xmit,
 };
 
-const struct neigh_ops arp_broken_ops = {
+static const struct neigh_ops arp_broken_ops = {
 	.family =		AF_INET,
 	.solicit =		arp_solicit,
 	.error_report =		arp_error_report,
@@ -170,7 +170,6 @@ const struct neigh_ops arp_broken_ops = 
 	.hh_output =		dev_queue_xmit,
 	.queue_xmit =		dev_queue_xmit,
 };
-EXPORT_SYMBOL(arp_broken_ops);
 
 struct neigh_table arp_tbl = {
 	.family		= AF_INET,

^ permalink raw reply

* Re: WiMAX linux firmware pull request
From: David Woodhouse @ 2010-09-29  2:52 UTC (permalink / raw)
  To: Inaky Perez-Gonzalez; +Cc: wimax, netdev
In-Reply-To: <1285699570.3136.307.camel@localhost.localdomain>

On Tue, 2010-09-28 at 11:46 -0700, Inaky Perez-Gonzalez wrote:    
>    The 1.3 version is purged as it is not supported anymore.

Not supported by newer kernels? Or "if you are using something that
requires the 1.3 firmware, you can just fuck off and die", along the
lines of what we say to users of the 2.4 kernel?

We shouldn't drop stuff from linux-firmware.git until there really is
*no* reason to need it any more. We shouldn't force people to keep
linux-firmware in step with their kernel; they should always be able to
use the latest.

When I get home from Tokyo I'll be working on a way to specify min/max
kernel versions for each firmware image, along with a 'make install'
target which lets you say "drop anything which is only relevant to
kernels < 2.6.35' or whatever.

-- 
dwmw2


^ permalink raw reply

* [PATCH 2/2] drivers/net/usb/qcusbnet/qmidevice: Remove printhex, use print_hex_dump
From: Joe Perches @ 2010-09-29  2:39 UTC (permalink / raw)
  To: Elly Jones; +Cc: netdev, dbrownell, mjg59, jglasgow, msb, olofj
In-Reply-To: <cover.1285727642.git.joe@perches.com>

Just use the normal kernel facility.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/usb/qcusbnet/qmidevice.c |   34 ++++++++--------------------------
 drivers/net/usb/qcusbnet/qmidevice.h |    1 -
 2 files changed, 8 insertions(+), 27 deletions(-)

diff --git a/drivers/net/usb/qcusbnet/qmidevice.c b/drivers/net/usb/qcusbnet/qmidevice.c
index da7e42d..5150453 100755
--- a/drivers/net/usb/qcusbnet/qmidevice.c
+++ b/drivers/net/usb/qcusbnet/qmidevice.c
@@ -113,29 +113,6 @@ static bool device_valid(struct qcusbnet *dev)
 	return dev && dev->valid;
 }
 
-void printhex(const void *data, size_t size)
-{
-	const u8 *cdata = data;
-	char *buf;
-	size_t pos;
-
-	buf = kmalloc(size * 3 + 1, GFP_ATOMIC);
-	if (!buf) {
-		DBG("Unable to allocate buffer\n");
-		return;
-	}
-
-	memset(buf, 0 , size * 3 + 1);
-
-	for (pos = 0; pos < size; pos++) {
-		snprintf(buf + (pos * 3), 4, "%02X ", cdata[pos]);
-	}
-
-	DBG("   : %s\n", buf);
-
-	kfree(buf);
-}
-
 void qc_setdown(struct qcusbnet *dev, u8 reason)
 {
 	set_bit(reason, &dev->down);
@@ -188,7 +165,8 @@ static void read_callback(struct urb *urb)
 	data = urb->transfer_buffer;
 	size = urb->actual_length;
 
-	printhex(data, size);
+	print_hex_dump(KERN_INFO, "QCUSBNet2k: ", DUMP_PREFIX_OFFSET,
+		       16, 1, data, size, true);
 
 	result = qmux_parse(&cid, data, size);
 	if (result < 0) {
@@ -276,7 +254,10 @@ static void int_callback(struct urb *urb)
 			}
 		} else {
 			DBG("ignoring invalid interrupt in packet\n");
-			printhex(urb->transfer_buffer, urb->actual_length);
+			print_hex_dump(KERN_INFO, "QCUSBNet2k: ",
+				       DUMP_PREFIX_OFFSET, 16, 1,
+				       urb->transfer_buffer,
+				       urb->actual_length, true);
 		}
 	}
 
@@ -541,7 +522,8 @@ static int write_sync(struct qcusbnet *dev, char *buf, int size, u16 cid)
 			     NULL, dev);
 
 	DBG("Actual Write:\n");
-	printhex(buf, size);
+	print_hex_dump(KERN_INFO,  "QCUSBNet2k: ", DUMP_PREFIX_OFFSET,
+		       16, 1, buf, size, true);
 
 	sema_init(&sem, 0);
 
diff --git a/drivers/net/usb/qcusbnet/qmidevice.h b/drivers/net/usb/qcusbnet/qmidevice.h
index 39a4b7f..5274a0d 100755
--- a/drivers/net/usb/qcusbnet/qmidevice.h
+++ b/drivers/net/usb/qcusbnet/qmidevice.h
@@ -22,7 +22,6 @@
 #include "structs.h"
 #include "qmi.h"
 
-void printhex(const void *data, size_t size);
 void qc_setdown(struct qcusbnet *dev, u8 reason);
 void qc_cleardown(struct qcusbnet *dev, u8 reason);
 bool qc_isdown(struct qcusbnet *dev, u8 reason);
-- 
1.7.3.1.g432b3.dirty


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox