* [PATCH net-next 2/2] be2net: update driver version
From: Padmanabh Ratnakar @ 2012-07-13 12:46 UTC (permalink / raw)
To: netdev; +Cc: Padmanabh Ratnakar
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
---
drivers/net/ethernet/emulex/benet/be.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
index 330d59a..d266c86 100644
--- a/drivers/net/ethernet/emulex/benet/be.h
+++ b/drivers/net/ethernet/emulex/benet/be.h
@@ -34,7 +34,7 @@
#include "be_hw.h"
#include "be_roce.h"
-#define DRV_VER "4.2.248.0u"
+#define DRV_VER "4.4.31.0u"
#define DRV_NAME "be2net"
#define BE_NAME "ServerEngines BladeEngine2 10Gbps NIC"
#define BE3_NAME "ServerEngines BladeEngine3 10Gbps NIC"
--
1.6.0.2
^ permalink raw reply related
* [PATCH net-next 1/2] be2net: Add description about various RSS hash types
From: Padmanabh Ratnakar @ 2012-07-13 12:45 UTC (permalink / raw)
To: netdev; +Cc: Padmanabh Ratnakar
Incorporated review comment from Eric Dumazet. Added description
about different RSS hash types which adapter is capable of.
Will add support for ETHTOOL_GRXFH and ETHTOOL_SRXFX as suggested
by Ben Hutchings in a later patch.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
---
drivers/net/ethernet/emulex/benet/be_cmds.h | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.h b/drivers/net/ethernet/emulex/benet/be_cmds.h
index 45d70de..d5a4ded 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.h
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.h
@@ -1082,8 +1082,18 @@ struct be_cmd_resp_query_fw_cfg {
u32 function_caps;
};
-/******************** RSS Config *******************/
-/* RSS types */
+/******************** RSS Config ****************************************/
+/* RSS type Input parameters used to compute RX hash
+ * RSS_ENABLE_IPV4 SRC IPv4, DST IPv4
+ * RSS_ENABLE_TCP_IPV4 SRC IPv4, DST IPv4, TCP SRC PORT, TCP DST PORT
+ * RSS_ENABLE_IPV6 SRC IPv6, DST IPv6
+ * RSS_ENABLE_TCP_IPV6 SRC IPv6, DST IPv6, TCP SRC PORT, TCP DST PORT
+ * RSS_ENABLE_UDP_IPV4 SRC IPv4, DST IPv4, UDP SRC PORT, UDP DST PORT
+ * RSS_ENABLE_UDP_IPV6 SRC IPv6, DST IPv6, UDP SRC PORT, UDP DST PORT
+ *
+ * When multiple RSS types are enabled, HW picks the best hash policy
+ * based on the type of the received packet.
+ */
#define RSS_ENABLE_NONE 0x0
#define RSS_ENABLE_IPV4 0x1
#define RSS_ENABLE_TCP_IPV4 0x2
--
1.6.0.2
^ permalink raw reply related
* RE: [PATCH] ixgbevf - Prevent RX/TX statistics getting reset to zero
From: Narendra_K @ 2012-07-13 12:36 UTC (permalink / raw)
To: jeffrey.t.kirsher, gregory.v.rose; +Cc: netdev
In-Reply-To: <4FFF16CA.1090705@gmail.com>
> -----Original Message-----
> From: Jeff Kirsher [mailto:tarbal@gmail.com]
> Sent: Thursday, July 12, 2012 11:56 PM
> To: K, Narendra; gregory.v.rose@intel.com
> Cc: netdev@vger.kernel.org
> Subject: Re: [PATCH] ixgbevf - Prevent RX/TX statistics getting reset to zero
>
> On 07/12/2012 06:55 AM, Narendra_K@Dell.com wrote:
> > Hello,
> >
> > [Apologies if you are receiving this message twice. I am resending the
> message, as I got message delivery failure note].
> >
> > While exploring SR-IOV on Intel 82599EB 10-Gigabit SFP+ adapter, I had the
> following observation. I enabled two VFs by passing 'max_vfs=2' to ixgbe
> driver. One of the VFs was assigned to a guest.
> > In the guest, the ifconfig and ip tools reported 'RX packets' and 'TX packets'
> as zero, after pinging to a remote host. Looking into it further, the commit
> 4197aa7bb81877ebb06e4f2cc1b5fea2da23a7bd implements 64 bit per ring
> statistics. It seemed like the 'total_bytes' and 'total_packets' of RX and TX
> ring were being reset to zero by the RX and TX interrupt handlers, resulting in
> the user space tools reporting zero RX and TX bytes.
> >
> > The attached patch addresses the issue by preventing the resetting of RX
> and TX ring statistics to zero. The patch was taken against latest mainline 3.5-
> rc6 kernel.
> >
> > I tested the patch by pinging from the guest OS to a remote host.
> >
> > ping -f <remote host> -c 10000
> >
> > The ip and ifcofig showed the statistics increased by 10000 packets.
> >
> > # lspci | grep 82599
> > 04:00.0 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFP+
> Network Connection (rev 01)
> > 04:00.1 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFP+
> Network Connection (rev 01)
> > 04:10.0 Ethernet controller: Intel Corporation 82599 Ethernet Controller
> Virtual Function (rev 01)
> > 04:10.1 Ethernet controller: Intel Corporation 82599 Ethernet Controller
> Virtual Function (rev 01)
> > 04:10.2 Ethernet controller: Intel Corporation 82599 Ethernet Controller
> Virtual Function (rev 01)
> > 04:10.3 Ethernet controller: Intel Corporation 82599 Ethernet Controller
> Virtual Function (rev 01)
> >
> > # lspci -s 04:00.0 -n
> > 04:00.0 0200: 8086:154d (rev 01)
> > # lspci -s 04:10.0 -n
> > 04:10.0 0200: 8086:10ed (rev 01)
> >
> > Please let me know if additional details and logs are required.[>]
> >
> > With regards,
> > Narendra K
> >
> >
> >
>
> Thanks, I will add the patch to my queue
>
[>]
Hi Greg,
I was re-looking at why ' rx_ring->total_packets' and ' rx_ring->total_bytes' were being set to zero in ' ixgbevf_msix_clean_rx'. It looks like ' rx_ring->total_packets' and ' rx_ring->total_packets' are computed per one run of 'ixgbevf_clean_rx_irq' . Then in 'ixgbevf_clean_rxonly' if 'adapter->itr_setting & 1' is true, the count is used in 'ixgbevf_set_itr_msix'. When the interrupts are enabled, the
' rx_ring->total_packets' and ' rx_ring->total_bytes' are set to zero so that they can be re-computed in the poll function and fed to the 'ixgbevf_set_itr_msix'.
This results in statistics reported by 'ip' and 'ifconfig' as zero. The patch addresses the scenario. But it seems it would change the intended behavior in the scenario when 'adapter->itr_setting & 1' is true. It could be addressed by storing the 'total_rx_packets' and 'total_rx_bytes' computed every time in the poll function in 'struct ixgbevf_adapter' . Then the interrupt handler could reset them to zero instead of resetting ' rx_ring->total_packets' and ' rx_ring->total_bytes'.
Also, I observed that 'adapter->itr_setting & 1' was not true by default. I tried setting it by 'ethtool -C eth0 adaptive-rx on', and it returned 'operation not supported'.
I could be missing something here, please let me know.
With regards,
Narendra K
^ permalink raw reply
* Re: [DANGER 8/7]: ipv4: Cache output routes in fib_info nexthops.
From: David Miller @ 2012-07-13 11:10 UTC (permalink / raw)
To: subramanian.vijay; +Cc: netdev
In-Reply-To: <CAGK4HS_-fQYnmcbBwEE=JywzAO7_nnE8QAOCXk3-WQOjCimPiA@mail.gmail.com>
From: Vijay Subramanian <subramanian.vijay@gmail.com>
Date: Thu, 12 Jul 2012 17:52:54 -0700
> I did not get a chance to see why it suddenly starts working. Hope
> this helps. I will dig around more.
The problem is the setting of ->rt_gateway for local subnet routes.
In order for this to work with fib_info cached routes we have to
convert rt_gateway to be set to zero when there is no explicit nexthop
(local subnet) and to the non-zero gateway address otherwise.
This would be applied right before the "DANGER" patch:
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index c38293f..672d6f3 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -476,7 +476,8 @@ int arp_find(unsigned char *haddr, struct sk_buff *skb)
}
paddr = skb_rtable(skb)->rt_gateway;
-
+ if (!paddr)
+ paddr = ip_hdr(skb)->daddr;
if (arp_set_predefined(inet_addr_type(dev_net(dev), paddr), haddr,
paddr, dev))
return 0;
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 76825be..18f9854 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -389,7 +389,7 @@ struct dst_entry *inet_csk_route_req(struct sock *sk,
rt = ip_route_output_flow(net, fl4, sk);
if (IS_ERR(rt))
goto no_route;
- if (opt && opt->opt.is_strictroute && fl4->daddr != rt->rt_gateway)
+ if (opt && opt->opt.is_strictroute && rt->rt_gateway)
goto route_err;
return &rt->dst;
@@ -422,7 +422,7 @@ struct dst_entry *inet_csk_route_child_sock(struct sock *sk,
rt = ip_route_output_flow(net, fl4, sk);
if (IS_ERR(rt))
goto no_route;
- if (opt && opt->opt.is_strictroute && fl4->daddr != rt->rt_gateway)
+ if (opt && opt->opt.is_strictroute && rt->rt_gateway)
goto route_err;
return &rt->dst;
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 0c31235..5b77c2c 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -767,6 +767,8 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
if (skb->protocol == htons(ETH_P_IP)) {
rt = skb_rtable(skb);
dst = rt->rt_gateway;
+ if (!dst)
+ dst = old_iph->daddr;
}
#if IS_ENABLED(CONFIG_IPV6)
else if (skb->protocol == htons(ETH_P_IPV6)) {
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index cc52679..6b805e0 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -371,7 +371,7 @@ int ip_queue_xmit(struct sk_buff *skb, struct flowi *fl)
skb_dst_set_noref(skb, &rt->dst);
packet_routed:
- if (inet_opt && inet_opt->opt.is_strictroute && fl4->daddr != rt->rt_gateway)
+ if (inet_opt && inet_opt->opt.is_strictroute && rt->rt_gateway)
goto no_route;
/* OK, we know where to send it, allocate and build IP header. */
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index c2d0e6d..095fec0 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -488,6 +488,8 @@ static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
goto tx_error;
}
dst = rt->rt_gateway;
+ if (!dst)
+ dst = old_iph->daddr;
}
rt = ip_route_output_ports(dev_net(dev), &fl4, NULL,
diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c
index 2f210c7..b99746b 100644
--- a/net/ipv4/netfilter/ipt_MASQUERADE.c
+++ b/net/ipv4/netfilter/ipt_MASQUERADE.c
@@ -52,7 +52,7 @@ masquerade_tg(struct sk_buff *skb, const struct xt_action_param *par)
struct nf_nat_ipv4_range newrange;
const struct nf_nat_ipv4_multi_range_compat *mr;
const struct rtable *rt;
- __be32 newsrc;
+ __be32 newsrc, nh;
NF_CT_ASSERT(par->hooknum == NF_INET_POST_ROUTING);
@@ -70,7 +70,10 @@ masquerade_tg(struct sk_buff *skb, const struct xt_action_param *par)
mr = par->targinfo;
rt = skb_rtable(skb);
- newsrc = inet_select_addr(par->out, rt->rt_gateway, RT_SCOPE_UNIVERSE);
+ nh = rt->rt_gateway;
+ if (!nh)
+ nh = ip_hdr(skb)->daddr;
+ newsrc = inet_select_addr(par->out, nh, RT_SCOPE_UNIVERSE);
if (!newsrc) {
pr_info("%s ate my IP address\n", par->out->name);
return NF_DROP;
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index c4b2df6..f594e4a 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -904,8 +904,10 @@ void ip_rt_get_source(u8 *addr, struct sk_buff *skb, struct rtable *rt)
if (fib_lookup(dev_net(rt->dst.dev), &fl4, &res) == 0)
src = FIB_RES_PREFSRC(dev_net(rt->dst.dev), res);
else
- src = inet_select_addr(rt->dst.dev, rt->rt_gateway,
- RT_SCOPE_UNIVERSE);
+ src = inet_select_addr(rt->dst.dev, (rt->rt_gateway ?
+ rt->rt_gateway :
+ iph->daddr),
+ RT_SCOPE_UNIVERSE);
rcu_read_unlock();
}
memcpy(addr, &src, 4);
@@ -951,7 +953,7 @@ static unsigned int ipv4_mtu(const struct dst_entry *dst)
mtu = dst->dev->mtu;
if (unlikely(dst_metric_locked(dst, RTAX_MTU))) {
- if (rt->rt_gateway != 0 && mtu > 576)
+ if (rt->rt_gateway && mtu > 576)
mtu = 576;
}
@@ -1050,7 +1052,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
rth->rt_iif = dev->ifindex;
rth->rt_oif = 0;
rth->rt_pmtu = 0;
- rth->rt_gateway = daddr;
+ rth->rt_gateway = 0;
rth->fi = NULL;
if (our) {
rth->dst.input= ip_local_deliver;
@@ -1168,7 +1170,7 @@ static int __mkroute_input(struct sk_buff *skb,
rth->rt_iif = in_dev->dev->ifindex;
rth->rt_oif = 0;
rth->rt_pmtu = 0;
- rth->rt_gateway = daddr;
+ rth->rt_gateway = 0;
rth->fi = NULL;
rth->dst.input = ip_forward;
@@ -1333,7 +1335,7 @@ local_input:
rth->rt_iif = dev->ifindex;
rth->rt_oif = 0;
rth->rt_pmtu = 0;
- rth->rt_gateway = daddr;
+ rth->rt_gateway = 0;
rth->fi = NULL;
if (res.type == RTN_UNREACHABLE) {
rth->dst.input= ip_error;
@@ -1483,7 +1485,7 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
rth->rt_iif = orig_oif ? : dev_out->ifindex;
rth->rt_oif = orig_oif;
rth->rt_pmtu = 0;
- rth->rt_gateway = fl4->daddr;
+ rth->rt_gateway = 0;
rth->fi = NULL;
RT_CACHE_STAT_INC(out_slow_tot);
@@ -1845,7 +1847,7 @@ static int rt_fill_info(struct net *net, __be32 dst, __be32 src,
if (nla_put_be32(skb, RTA_PREFSRC, fl4->saddr))
goto nla_put_failure;
}
- if (fl4->daddr != rt->rt_gateway &&
+ if (rt->rt_gateway &&
nla_put_be32(skb, RTA_GATEWAY, rt->rt_gateway))
goto nla_put_failure;
^ permalink raw reply related
* Re: [PATCH v3] tg3: add device id of Apple Thunderbolt Ethernet device
From: David Miller @ 2012-07-13 10:00 UTC (permalink / raw)
To: mchan; +Cc: gregkh, mcarlson, netdev
In-Reply-To: <1342163198.7472.73.camel@LTIRV-MCHAN1.corp.ad.broadcom.com>
From: "Michael Chan" <mchan@broadcom.com>
Date: Fri, 13 Jul 2012 00:06:38 -0700
> On Thu, 2012-07-12 at 18:39 -0700, Greg KH wrote:
>> The Apple Thunderbolt ethernet device is already listed in the driver,
>> but not hooked up in the MODULE_DEVICE_TABLE(). This fixes that and
>> allows it to work properly.
>>
>> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>
>> ---
>> Resent to Cc: the proper developers this time.
>>
>> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
>> index e47ff8b..3721833 100644
>> --- a/drivers/net/ethernet/broadcom/tg3.c
>> +++ b/drivers/net/ethernet/broadcom/tg3.c
>> @@ -298,6 +298,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = {
>> {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57795)},
>> {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5719)},
>> {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5720)},
>> + {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57762)},
>> {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
>> {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
>> {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},
>>
>
> ACK for net-next. I don't know why Matt added everything to support
> this chip except the entry in the PCI ID table.
>
> Acked-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] tcp: add LAST_ACK as a valid state for TSQ
From: David Miller @ 2012-07-13 9:59 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, ycheng, mattmathis, maheshb
In-Reply-To: <1342169169.3265.8338.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 13 Jul 2012 10:46:09 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> Socket state LAST_ACK should allow TSQ to send additional frames,
> or else we rely on incoming ACKS or timers to send them.
>
> Reported-by: Yuchung Cheng <ycheng@google.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [v2 PATCH] net: Update alloc frag to reduce get/put page usage and recycle pages
From: David Miller @ 2012-07-13 9:59 UTC (permalink / raw)
To: eric.dumazet
Cc: alexander.h.duyck, netdev, jeffrey.t.kirsher, edumazet,
alexander.duyck
In-Reply-To: <1342170394.3265.8339.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 13 Jul 2012 11:06:34 +0200
> On Thu, 2012-07-12 at 17:23 -0700, Alexander Duyck wrote:
>> This patch is meant to help improve performance by reducing the number of
>> locked operations required to allocate a frag on x86 and other platforms.
>> This is accomplished by using atomic_set operations on the page count
>> instead of calling get_page and put_page. It is based on work originally
>> provided by Eric Dumazet.
>>
>> In addition it also helps to reduce memory overhead when using TCP. This
>> is done by recycling the page if the only holder of the frame is the
>> netdev_alloc_frag call itself. This can occur when skb heads are stolen by
>> either GRO or TCP and the driver providing the packets is using paged frags
>> to store all of the data for the packets.
>>
>> Cc: Eric Dumazet <edumazet@google.com>
>> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
...
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [v2 PATCH] net: Update alloc frag to reduce get/put page usage and recycle pages
From: Eric Dumazet @ 2012-07-13 9:06 UTC (permalink / raw)
To: Alexander Duyck
Cc: netdev, davem, jeffrey.t.kirsher, edumazet, alexander.duyck
In-Reply-To: <20120713001922.27393.1358.stgit@gitlad.jf.intel.com>
On Thu, 2012-07-12 at 17:23 -0700, Alexander Duyck wrote:
> This patch is meant to help improve performance by reducing the number of
> locked operations required to allocate a frag on x86 and other platforms.
> This is accomplished by using atomic_set operations on the page count
> instead of calling get_page and put_page. It is based on work originally
> provided by Eric Dumazet.
>
> In addition it also helps to reduce memory overhead when using TCP. This
> is done by recycling the page if the only holder of the frame is the
> netdev_alloc_frag call itself. This can occur when skb heads are stolen by
> either GRO or TCP and the driver providing the packets is using paged frags
> to store all of the data for the packets.
>
> Cc: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> ---
>
> v2: Reverted back to something closer to the patch that Eric originally
> submitted. The main goal in all this is to get the removal of expensive
> atomic ops and recycling added for now while Eric is still working on
> an approach that uses larger pages.
>
> net/core/skbuff.c | 28 ++++++++++++++++++++--------
> 1 files changed, 20 insertions(+), 8 deletions(-)
Signed-off-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply
* [PATCH ISDN] Add check for usb_alloc_urb() result
From: Karsten Keil @ 2012-07-13 8:59 UTC (permalink / raw)
To: David Miller; +Cc: netdev, rucsoftsec, m.bachem
usb_alloc_urb() return value needs to be checked to avoid
later NULL pointer access.
Reported by rucsoftsec@gmail.com via bugzilla.kernel.org #44601.
Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
---
drivers/isdn/hardware/mISDN/hfcsusb.c | 18 +++++++++++++-----
drivers/isdn/hisax/hfc_usb.c | 18 +++++++++++++-----
2 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c
index c65c344..114f3bc 100644
--- a/drivers/isdn/hardware/mISDN/hfcsusb.c
+++ b/drivers/isdn/hardware/mISDN/hfcsusb.c
@@ -2084,13 +2084,21 @@ hfcsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
/* create the control pipes needed for register access */
hw->ctrl_in_pipe = usb_rcvctrlpipe(hw->dev, 0);
hw->ctrl_out_pipe = usb_sndctrlpipe(hw->dev, 0);
+
+ driver_info = (struct hfcsusb_vdata *)
+ hfcsusb_idtab[vend_idx].driver_info;
+
hw->ctrl_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!hw->ctrl_urb) {
+ pr_warn("%s: No memory for control urb\n",
+ driver_info->vend_name);
+ kfree(hw);
+ return -ENOMEM;
+ }
- driver_info =
- (struct hfcsusb_vdata *)hfcsusb_idtab[vend_idx].driver_info;
- printk(KERN_DEBUG "%s: %s: detected \"%s\" (%s, if=%d alt=%d)\n",
- hw->name, __func__, driver_info->vend_name,
- conf_str[small_match], ifnum, alt_used);
+ pr_info("%s: %s: detected \"%s\" (%s, if=%d alt=%d)\n",
+ hw->name, __func__, driver_info->vend_name,
+ conf_str[small_match], ifnum, alt_used);
if (setup_instance(hw, dev->dev.parent))
return -EIO;
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c
index 84f9c81..849a807 100644
--- a/drivers/isdn/hisax/hfc_usb.c
+++ b/drivers/isdn/hisax/hfc_usb.c
@@ -1483,13 +1483,21 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
usb_rcvctrlpipe(context->dev, 0);
context->ctrl_out_pipe =
usb_sndctrlpipe(context->dev, 0);
+
+ driver_info = (hfcsusb_vdata *)
+ hfcusb_idtab[vend_idx].driver_info;
+
context->ctrl_urb = usb_alloc_urb(0, GFP_KERNEL);
- driver_info =
- (hfcsusb_vdata *) hfcusb_idtab[vend_idx].
- driver_info;
- printk(KERN_INFO "HFC-S USB: detected \"%s\"\n",
- driver_info->vend_name);
+ if (!context->ctrl_urb) {
+ pr_warn("%s: No memory for control urb\n",
+ driver_info->vend_name);
+ kfree(context);
+ return -ENOMEM;
+ }
+
+ pr_info("HFC-S USB: detected \"%s\"\n",
+ driver_info->vend_name);
DBG(HFCUSB_DBG_INIT,
"HFC-S USB: Endpoint-Config: %s (if=%d alt=%d), E-Channel(%d)",
--
1.7.7
^ permalink raw reply related
* [PATCH net-next] tcp: add LAST_ACK as a valid state for TSQ
From: Eric Dumazet @ 2012-07-13 8:46 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Yuchung Cheng, Matt Mathis, Mahesh Bandewar
From: Eric Dumazet <edumazet@google.com>
Socket state LAST_ACK should allow TSQ to send additional frames,
or else we rely on incoming ACKS or timers to send them.
Reported-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Matt Mathis <mattmathis@google.com>
Cc: Mahesh Bandewar <maheshb@google.com>
---
net/ipv4/tcp_output.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 03854ab..15a7c7b 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -838,7 +838,7 @@ static void tcp_tasklet_func(unsigned long data)
if (!sock_owned_by_user(sk)) {
if ((1 << sk->sk_state) &
(TCPF_ESTABLISHED | TCPF_FIN_WAIT1 |
- TCPF_CLOSING | TCPF_CLOSE_WAIT))
+ TCPF_CLOSING | TCPF_CLOSE_WAIT | TCPF_LAST_ACK))
tcp_write_xmit(sk,
tcp_current_mss(sk),
0, 0,
@@ -868,7 +868,7 @@ void tcp_release_cb(struct sock *sk)
if (test_and_clear_bit(TSQ_OWNED, &tp->tsq_flags)) {
if ((1 << sk->sk_state) &
(TCPF_ESTABLISHED | TCPF_FIN_WAIT1 |
- TCPF_CLOSING | TCPF_CLOSE_WAIT))
+ TCPF_CLOSING | TCPF_CLOSE_WAIT | TCPF_LAST_ACK))
tcp_write_xmit(sk,
tcp_current_mss(sk),
0, 0,
^ permalink raw reply related
* Re: [PATCH net-next] net: ftgmac100/ftmac100: dont pull too much data
From: Andrew Yan-Pai Chen @ 2012-07-13 8:31 UTC (permalink / raw)
To: Po-Yu Chuang
Cc: David Miller, eric.dumazet, netdev,
Andrew Yan-Pai Chen(陳彥百), kernel.jason
In-Reply-To: <CANutaR8xeMJpNpFoErw_sT9KfMUsX0wk7A31PGOgO=b7cUow3A@mail.gmail.com>
On Fri, Jul 13, 2012 at 10:21 AM, Po-Yu Chuang <ratbert.chuang@gmail.com> wrote:
> On Thu, Jul 12, 2012 at 10:38 PM, David Miller <davem@davemloft.net> wrote:
>> From: Po-Yu Chuang <ratbert.chuang@gmail.com>
>> Date: Thu, 12 Jul 2012 22:35:18 +0800
>>
>>> Thank you Eric. :-)
>>
>> You can thank him by providing an "Acked-by: ..." tag in your
>> reply.
>
> I don't have hardware to test this patch now.
> CC the current maintainer.
>
> regards,
> Po-Yu Chuang
Acked-by: Yan-Pai Chen <yanpai.chen@gmail.com>
--
Regards,
Andrew
^ permalink raw reply
* Re: [RFC PATCH 1/2] net: Add new network device function to allow for MMIO batching
From: Eric Dumazet @ 2012-07-13 7:38 UTC (permalink / raw)
To: Alexander Duyck
Cc: netdev, davem, jeffrey.t.kirsher, edumazet, bhutchings, therbert,
alexander.duyck
In-Reply-To: <4FFEEF99.7030707@intel.com>
On Thu, 2012-07-12 at 08:39 -0700, Alexander Duyck wrote:
> The problem is in both of the cases where I have seen the issue the
> qdisc is actually empty.
>
You mean a router workload, with links of same bandwidth.
(BQL doesnt trigger)
Frankly what percentage of linux powered machines act as high perf
routers ?
> In the case of pktgen it does not use the qdisc layer at all. It just
> directly calls ndo_start_xmit.
pktgen is in kernel, adding a complete() call in it is certainly ok,
if we can avoid kernel bloat.
I mean, pktgen represents less than 0.000001 % of real workloads.
>
> In the standard networking case we never fill the qdisc because the MMIO
> write stalls the entire CPU so the application never gets a chance to
> get ahead of the hardware. From what I can tell the only case in which
> the qdisc_run solution would work is if the ndo_start_xmit was called on
> a different CPU from the application that is doing the transmitting.
Hey, I can tell that qdisc is not empty on many workloads.
But BQL and TSO mean we only send one or two packets per qdisc run.
I understand this MMIO batching helps routers workloads, or workloads
using many small packets.
But on other workloads, this adds a significant latency source
(NET_TX_SOFTIRQ)
It would be good to instrument the extra delay on a single UDP send.
(entering do_softirq() path is not a few instructions...)
^ permalink raw reply
* Re: resurrecting tcphealth
From: Piotr Sawuk @ 2012-07-13 7:33 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel
On Do, 12.07.2012, 23:35, Stephen Hemminger wrote:
> On Thu, 12 Jul 2012 22:55:57 +0200
> "Piotr Sawuk" <a9702387@unet.univie.ac.at> wrote:
>
>> + * Federico D. Sacerdoti: Added TCP health monitoring.
>
> Please don't do this.
> The kernel community no longer maintains a list of contributors
> in the comments. The history is maintained in the git commit log.
>
thanks for the proof-reading, to Randy Dunlap too. now I have tested the
patch against mainline.
so, anyone has a comment on my actual question about the need for a read-lock?
currently my patch looks like this (again comments are welcome):
diff -rub A/include/linux/tcp.h B/include/linux/tcp.h
--- A/include/linux/tcp.h 2012-06-22 20:37:50.000000000 +0200
+++ B/include/linux/tcp.h 2012-07-06 10:23:13.000000000 +0200
@@ -472,6 +474,15 @@
* contains related tcp_cookie_transactions fields.
*/
struct tcp_cookie_values *cookie_values;
+
+ /*
+ * TCP health monitoring counters.
+ */
+ __u32 dup_acks_sent;
+ __u32 dup_pkts_recv;
+ __u32 acks_sent;
+ __u32 pkts_recv;
+ __u32 last_ack_sent; /* Sequence number of the last ack we sent. */
};
static inline struct tcp_sock *tcp_sk(const struct sock *sk)
diff -rub A/net/ipv4/tcp_input.c B/net/ipv4/tcp_input.c
--- A/net/ipv4/tcp_input.c 2012-06-22 20:37:50.000000000 +0200
+++ B/net/ipv4/tcp_input.c 2012-07-06 10:12:12.000000000 +0200
@@ -4414,6 +4415,8 @@
}
if (!after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt)) {
+ /* Course retransmit inefficiency- this packet has been received twice. */
+ tp->dup_pkts_recv++;
SOCK_DEBUG(sk, "ofo packet was already received\n");
__skb_unlink(skb, &tp->out_of_order_queue);
__kfree_skb(skb);
@@ -4664,6 +4667,10 @@
return;
}
+ /* A packet is a "duplicate" if it contains bytes we have already
received. */
+ if (before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt))
+ tp->dup_pkts_recv++;
+
if (!after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt)) {
/* A retransmit, 2nd most common case. Force an immediate ack. */
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_DELAYEDACKLOST);
@@ -5375,6 +5382,13 @@
tp->rx_opt.saw_tstamp = 0;
+ /*
+ * Tcp health monitoring is interested in
+ * total per-connection packet arrivals.
+ * This is in the fast path, but is quick.
+ */
+ tp->pkts_recv++;
+
/* pred_flags is 0xS?10 << 16 + snd_wnd
* if header_prediction is to be made
* 'S' will always be tp->tcp_header_len >> 2
diff -rub A/net/ipv4/tcp_ipv4.c B/net/ipv4/tcp_ipv4.c
--- A/net/ipv4/tcp_ipv4.c 2012-06-22 20:37:50.000000000 +0200
+++ B/net/ipv4/tcp_ipv4.c 2012-07-11 09:34:22.000000000 +0200
@@ -2533,6 +2533,82 @@
return 0;
}
+
+/*
+ * Output /proc/net/tcphealth
+ */
+#define LINESZ 128
+
+int tcp_health_seq_show(struct seq_file *seq, void *v)
+{
+ int len, num;
+ char srcIP[32], destIP[32];
+
+ unsigned long SmoothedRttEstimate,
+ AcksSent, DupAcksSent, PktsRecv, DupPktsRecv;
+ struct tcp_iter_state *st;
+
+ if (v == SEQ_START_TOKEN) {
+ seq_printf(seq,
+ "TCP Health Monitoring (established connections only)\n"
+ " -Duplicate ACKs indicate lost or reordered packets on the
connection.\n"
+ " -Duplicate Packets Received signal a slow and badly inefficient
connection.\n"
+ " -RttEst estimates how long future packets will take on a round trip
over the connection.\n"
+ "id Local Address Remote Address RttEst(ms) AcksSent "
+ "DupAcksSent PktsRecv DupPktsRecv\n");
+ goto out;
+ }
+
+ /* Loop through established TCP connections */
+ st = seq->private;
+
+
+ if (st->state == TCP_SEQ_STATE_ESTABLISHED)
+ {
+/* ; //insert read-lock here */
+ const struct tcp_sock *tp = tcp_sk(v);
+ const struct inet_sock *inet = inet_sk(v);
+ __be32 dest = inet->inet_daddr;
+ __be32 src = inet->inet_rcv_saddr;
+ __u16 destp = ntohs(inet->inet_dport);
+ __u16 srcp = ntohs(inet->inet_sport);
+
+ num = st->num;
+ SmoothedRttEstimate = (tp->srtt >> 3);
+ AcksSent = tp->acks_sent;
+ DupAcksSent = tp->dup_acks_sent;
+ PktsRecv = tp->pkts_recv;
+ DupPktsRecv = tp->dup_pkts_recv;
+
+ sprintf(srcIP, "%lu.%lu.%lu.%lu:%u",
+ ((src >> 24) & 0xFF), ((src >> 16) & 0xFF), ((src >> 8) & 0xFF), (src &
0xFF),
+ srcp);
+ sprintf(destIP, "%3d.%3d.%3d.%3d:%u",
+ ((dest >> 24) & 0xFF), ((dest >> 16) & 0xFF), ((dest >> 8) & 0xFF),
(dest & 0xFF),
+ destp);
+
+ seq_printf(seq, "%d: %-21s %-21s "
+ "%8lu %8lu %8lu %8lu %8lu%n",
+ num,
+ srcIP,
+ destIP,
+ SmoothedRttEstimate,
+ AcksSent,
+ DupAcksSent,
+ PktsRecv,
+ DupPktsRecv,
+
+ &len
+ );
+
+ seq_printf(seq, "%*s\n", LINESZ - 1 - len, "");
+/* ; //insert read-unlock here */
+ }
+
+out:
+ return 0;
+}
+
static const struct file_operations tcp_afinfo_seq_fops = {
.owner = THIS_MODULE,
.open = tcp_seq_open,
@@ -2541,6 +2617,15 @@
.release = seq_release_net
};
+static struct tcp_seq_afinfo tcphealth_seq_afinfo = {
+ .name = "tcphealth",
+ .family = AF_INET,
+ .seq_fops = &tcp_afinfo_seq_fops,
+ .seq_ops = {
+ .show = tcp_health_seq_show,
+ },
+};
+
static struct tcp_seq_afinfo tcp4_seq_afinfo = {
.name = "tcp",
.family = AF_INET,
@@ -2552,12 +2637,16 @@
static int __net_init tcp4_proc_init_net(struct net *net)
{
- return tcp_proc_register(net, &tcp4_seq_afinfo);
+ int ret = tcp_proc_register(net, &tcp4_seq_afinfo);
+ if(ret == 0)
+ ret = tcp_proc_register(net, &tcphealth_seq_afinfo);
+ return ret;
}
static void __net_exit tcp4_proc_exit_net(struct net *net)
{
tcp_proc_unregister(net, &tcp4_seq_afinfo);
+ tcp_proc_unregister(net, &tcphealth_seq_afinfo);
}
static struct pernet_operations tcp4_net_ops = {
diff -rub A/net/ipv4/tcp_output.c B/net/ipv4/tcp_output.c
--- A/net/ipv4/tcp_output.c 2012-06-22 20:37:50.000000000 +0200
+++ B/net/ipv4/tcp_output.c 2012-07-06 17:15:14.000000000 +0200
@@ -2754,8 +2755,15 @@
skb_reserve(buff, MAX_TCP_HEADER);
tcp_init_nondata_skb(buff, tcp_acceptable_seq(sk), TCPHDR_ACK);
+ /* If the rcv_nxt has not advanced since sending our last ACK, this is a
duplicate. */
+ if (tcp_sk(sk)->rcv_nxt == tcp_sk(sk)->last_ack_sent)
+ tcp_sk(sk)->dup_acks_sent++;
+ /* Record the total number of acks sent on this connection. */
+ tcp_sk(sk)->acks_sent++;
+
/* Send it off, this clears delayed acks for us. */
TCP_SKB_CB(buff)->when = tcp_time_stamp;
+ tcp_sk(sk)->last_ack_sent = tcp_sk(sk)->rcv_nxt;
tcp_transmit_skb(sk, buff, 0, GFP_ATOMIC);
}
^ permalink raw reply
* Re: [PATCH v3] tg3: add device id of Apple Thunderbolt Ethernet device
From: Michael Chan @ 2012-07-13 7:19 UTC (permalink / raw)
To: Roland Dreier; +Cc: Greg KH, Matt Carlson, netdev
In-Reply-To: <CAL1RGDUK=q+_d2hnWbALde6602d92=x7+T7FUY1zPL8AtUcXcQ@mail.gmail.com>
On Thu, 2012-07-12 at 22:33 -0700, Roland Dreier wrote:
> On Thu, Jul 12, 2012 at 6:39 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
> > The Apple Thunderbolt ethernet device is already listed in the driver,
> > but not hooked up in the MODULE_DEVICE_TABLE(). This fixes that and
> > allows it to work properly.
> >
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >
> > ---
> > Resent to Cc: the proper developers this time.
> >
> > diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> > index e47ff8b..3721833 100644
> > --- a/drivers/net/ethernet/broadcom/tg3.c
> > +++ b/drivers/net/ethernet/broadcom/tg3.c
> > @@ -298,6 +298,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = {
> > {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57795)},
> > {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5719)},
> > {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5720)},
> > + {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57762)},
> > {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
> > {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
> > {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},
>
> I realize there's no way Greg can know the answer to this or test the
> corresponding change...
>
> But for the Broadcom guys:
> it looks like there simiarly is code in the driver for at least
>
> TG3PCI_DEVICE_TIGON3_57766
> TG3PCI_DEVICE_TIGON3_57782
> TG3PCI_DEVICE_TIGON3_57786
>
> without entries in the PCI device table. Should those similarly be added?
>
Yeah we need to add these as well, but there may be missing code to
support these chips besides the PCI ID table entries. We will get these
chips tested and send the complete patches to support these chips.
^ permalink raw reply
* Re: [RFC PATCH 1/2] net: Add new network device function to allow for MMIO batching
From: Eric Dumazet @ 2012-07-13 7:19 UTC (permalink / raw)
To: Alexander Duyck
Cc: netdev, davem, jeffrey.t.kirsher, edumazet, bhutchings, therbert,
alexander.duyck
In-Reply-To: <20120712002603.27846.23752.stgit@gitlad.jf.intel.com>
On Wed, 2012-07-11 at 17:26 -0700, Alexander Duyck wrote:
> +static inline void netdev_complete_xmit(struct netdev_queue *txq)
> +{
> + struct net_device *dev = txq->dev;
> + const struct net_device_ops *ops = dev->netdev_ops;
> +
> + if (txq->dispatch_pending < txq->dispatch_limit) {
> + if (netif_tx_queue_delayed(txq)) {
> + txq->dispatch_pending++;
> + return;
> + }
> +
> + /* start of delayed write sequence */
> + netif_tx_delay_queue(txq);
I dont understand this part. Isnt a return missing here ?
> + }
> +
> + txq->dispatch_pending = 0;
> +
> + ops->ndo_complete_xmit(dev, txq - &dev->_tx[0]);
> +}
> +
^ permalink raw reply
* Re: [PATCH net-next 4/8] wireless: Use eth_random_addr
From: Gertjan van Wingerde @ 2012-07-13 7:15 UTC (permalink / raw)
To: Joe Perches
Cc: users-poMEt7QlJxcwIE2E9O76wjtx2kNaKg5H,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-wireless-u79uwXL29TY76Z2rM5mHXA, Christian Lamparter,
Hin-Tak Leung, Johannes Berg, Herton Ronaldo Krzesinski,
David Miller, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Larry Finger
In-Reply-To: <93ab9a323e85d1b0d8c7eac4db7ab7835e61efe6.1342157022.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
On Fri, Jul 13, 2012 at 7:33 AM, Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org> wrote:
> Convert the existing uses of random_ether_addr to
> the new eth_random_addr.
>
> Signed-off-by: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
For the rt2x00 parts:
Acked-by: Gertjan van Wingerde <gwingerde-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/net/wireless/adm8211.c | 2 +-
> drivers/net/wireless/p54/eeprom.c | 2 +-
> drivers/net/wireless/rt2x00/rt2400pci.c | 2 +-
> drivers/net/wireless/rt2x00/rt2500pci.c | 2 +-
> drivers/net/wireless/rt2x00/rt2500usb.c | 2 +-
> drivers/net/wireless/rt2x00/rt2800lib.c | 2 +-
> drivers/net/wireless/rt2x00/rt61pci.c | 2 +-
> drivers/net/wireless/rt2x00/rt73usb.c | 2 +-
> drivers/net/wireless/rtl818x/rtl8180/dev.c | 2 +-
> drivers/net/wireless/rtl818x/rtl8187/dev.c | 2 +-
> 10 files changed, 10 insertions(+), 10 deletions(-)
>
---
Gertjan
^ permalink raw reply
* [PATCH] tc-bfifo: man: Add parameter value range.
From: Li Wei @ 2012-07-13 7:08 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
Add value range for 'limit' parameter.
---
man/man8/tc-bfifo.8 | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/man/man8/tc-bfifo.8 b/man/man8/tc-bfifo.8
index 8dda4bb..417e45c 100644
--- a/man/man8/tc-bfifo.8
+++ b/man/man8/tc-bfifo.8
@@ -40,8 +40,12 @@ to the interface txqueuelen, as specified with
.BR ifconfig (8)
or
.BR ip (8).
+The range for this parameter is [0, UINT32_MAX].
For bfifo, it defaults to the txqueuelen multiplied by the interface MTU.
+The range for this parameter is [0, UINT32_MAX] bytes.
+
+Note: The link layer header was considered when couting packets length.
.SH OUTPUT
The output of
--
1.7.1
^ permalink raw reply related
* Re: [PATCH v3] tg3: add device id of Apple Thunderbolt Ethernet device
From: Michael Chan @ 2012-07-13 7:06 UTC (permalink / raw)
To: Greg KH; +Cc: Matt Carlson, netdev
In-Reply-To: <20120713013944.GB6445@kroah.com>
On Thu, 2012-07-12 at 18:39 -0700, Greg KH wrote:
> The Apple Thunderbolt ethernet device is already listed in the driver,
> but not hooked up in the MODULE_DEVICE_TABLE(). This fixes that and
> allows it to work properly.
>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> ---
> Resent to Cc: the proper developers this time.
>
> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> index e47ff8b..3721833 100644
> --- a/drivers/net/ethernet/broadcom/tg3.c
> +++ b/drivers/net/ethernet/broadcom/tg3.c
> @@ -298,6 +298,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = {
> {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57795)},
> {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5719)},
> {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5720)},
> + {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57762)},
> {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
> {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
> {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},
>
ACK for net-next. I don't know why Matt added everything to support
this chip except the entry in the PCI ID table.
Acked-by: Michael Chan <mchan@broadcom.com>
^ permalink raw reply
* Is TCP vulneribility patch (as in RFC 5961) done in linux?
From: Kiran (Kiran Kumar) Kella @ 2012-07-13 6:18 UTC (permalink / raw)
To: netdev@vger.kernel.org
Hi,
I just now checked in the kernel archives if the patch in section 3.2 mentioned in RFC 5961 for RST attacks with predictable sequence numbers.
I see some discussion happened in 2004 timeframe.
I was just wondering if in the latest linux source, the patch is made available.
Appreciate your quick response in this regard.
Thanks,
Kiran
^ permalink raw reply
* Re: [PATCH net-next 4/8] wireless: Use eth_random_addr
From: Hin-Tak Leung @ 2012-07-13 5:54 UTC (permalink / raw)
To: John W. Linville, Herton Ronaldo Krzesinski, Larry Finger,
Joe Perches
Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <93ab9a323e85d1b0d8c7eac4db7ab7835e61efe6.1342157022.git.joe@perches.com>
--- On Fri, 13/7/12, Joe Perches <joe@perches.com> wrote:
> From: Joe Perches <joe@perches.com>
> Subject: [PATCH net-next 4/8] wireless: Use eth_random_addr
> To: "David Miller" <davem@davemloft.net>, "John W. Linville" <linville@tuxdriver.com>, "Christian Lamparter" <chunkeey@googlemail.com>, "Ivo van Doorn" <IvDoorn@gmail.com>, "Gertjan van Wingerde" <gwingerde@gmail.com>, "Helmut Schaa" <helmut.schaa@googlemail.com>, "Herton Ronaldo Krzesinski" <herton@canonical.com>, "Hin-Tak Leung" <htl10@users.sourceforge.net>, "Larry Finger" <Larry.Finger@lwfinger.net>
> Cc: "Johannes Berg" <johannes@sipsolutions.net>, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, users@rt2x00.serialmonkey.com
> Date: Friday, 13 July, 2012, 6:33
> Convert the existing uses of
> random_ether_addr to
> the new eth_random_addr.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Would it make sense to have a "check & set" macro?
> ---
> drivers/net/wireless/adm8211.c
> | 2 +-
> drivers/net/wireless/p54/eeprom.c
> | 2 +-
> drivers/net/wireless/rt2x00/rt2400pci.c
> | 2 +-
> drivers/net/wireless/rt2x00/rt2500pci.c
> | 2 +-
> drivers/net/wireless/rt2x00/rt2500usb.c
> | 2 +-
> drivers/net/wireless/rt2x00/rt2800lib.c
> | 2 +-
> drivers/net/wireless/rt2x00/rt61pci.c
> | 2 +-
> drivers/net/wireless/rt2x00/rt73usb.c
> | 2 +-
> drivers/net/wireless/rtl818x/rtl8180/dev.c | 2
> +-
> drivers/net/wireless/rtl818x/rtl8187/dev.c | 2
> +-
> 10 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/wireless/adm8211.c
> b/drivers/net/wireless/adm8211.c
> index 97afcec..689a71c 100644
> --- a/drivers/net/wireless/adm8211.c
> +++ b/drivers/net/wireless/adm8211.c
> @@ -1854,7 +1854,7 @@ static int __devinit
> adm8211_probe(struct pci_dev *pdev,
> if (!is_valid_ether_addr(perm_addr)) {
> printk(KERN_WARNING
> "%s (adm8211): Invalid hwaddr in EEPROM!\n",
>
> pci_name(pdev));
> -
> random_ether_addr(perm_addr);
> +
> eth_random_addr(perm_addr);
> }
> SET_IEEE80211_PERM_ADDR(dev,
> perm_addr);
>
> diff --git a/drivers/net/wireless/p54/eeprom.c
> b/drivers/net/wireless/p54/eeprom.c
> index 636daf2..1403709 100644
> --- a/drivers/net/wireless/p54/eeprom.c
> +++ b/drivers/net/wireless/p54/eeprom.c
> @@ -857,7 +857,7 @@ good_eeprom:
>
>
> wiphy_warn(dev->wiphy,
>
> "Invalid hwaddr! Using randomly generated
> MAC addr\n");
> -
> random_ether_addr(perm_addr);
> +
> eth_random_addr(perm_addr);
>
> SET_IEEE80211_PERM_ADDR(dev, perm_addr);
> }
>
> diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c
> b/drivers/net/wireless/rt2x00/rt2400pci.c
> index 5e6b501..8b9dbd7 100644
> --- a/drivers/net/wireless/rt2x00/rt2400pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2400pci.c
> @@ -1455,7 +1455,7 @@ static int
> rt2400pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
> */
> mac = rt2x00_eeprom_addr(rt2x00dev,
> EEPROM_MAC_ADDR_0);
> if (!is_valid_ether_addr(mac)) {
> -
> random_ether_addr(mac);
> +
> eth_random_addr(mac);
> EEPROM(rt2x00dev,
> "MAC: %pM\n", mac);
> }
>
> diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c
> b/drivers/net/wireless/rt2x00/rt2500pci.c
> index 136b849..d2cf8a4 100644
> --- a/drivers/net/wireless/rt2x00/rt2500pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2500pci.c
> @@ -1585,7 +1585,7 @@ static int
> rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
> */
> mac = rt2x00_eeprom_addr(rt2x00dev,
> EEPROM_MAC_ADDR_0);
> if (!is_valid_ether_addr(mac)) {
> -
> random_ether_addr(mac);
> +
> eth_random_addr(mac);
> EEPROM(rt2x00dev,
> "MAC: %pM\n", mac);
> }
>
> diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c
> b/drivers/net/wireless/rt2x00/rt2500usb.c
> index 669aecd..3aae36b 100644
> --- a/drivers/net/wireless/rt2x00/rt2500usb.c
> +++ b/drivers/net/wireless/rt2x00/rt2500usb.c
> @@ -1352,7 +1352,7 @@ static int
> rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
> */
> mac = rt2x00_eeprom_addr(rt2x00dev,
> EEPROM_MAC_ADDR_0);
> if (!is_valid_ether_addr(mac)) {
> -
> random_ether_addr(mac);
> +
> eth_random_addr(mac);
> EEPROM(rt2x00dev,
> "MAC: %pM\n", mac);
> }
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c
> b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 068276e..d857d55 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -4340,7 +4340,7 @@ int rt2800_validate_eeprom(struct
> rt2x00_dev *rt2x00dev)
> */
> mac = rt2x00_eeprom_addr(rt2x00dev,
> EEPROM_MAC_ADDR_0);
> if (!is_valid_ether_addr(mac)) {
> -
> random_ether_addr(mac);
> +
> eth_random_addr(mac);
> EEPROM(rt2x00dev,
> "MAC: %pM\n", mac);
> }
>
> diff --git a/drivers/net/wireless/rt2x00/rt61pci.c
> b/drivers/net/wireless/rt2x00/rt61pci.c
> index ee22bd7..f322596 100644
> --- a/drivers/net/wireless/rt2x00/rt61pci.c
> +++ b/drivers/net/wireless/rt2x00/rt61pci.c
> @@ -2415,7 +2415,7 @@ static int
> rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
> */
> mac = rt2x00_eeprom_addr(rt2x00dev,
> EEPROM_MAC_ADDR_0);
> if (!is_valid_ether_addr(mac)) {
> -
> random_ether_addr(mac);
> +
> eth_random_addr(mac);
> EEPROM(rt2x00dev,
> "MAC: %pM\n", mac);
> }
>
> diff --git a/drivers/net/wireless/rt2x00/rt73usb.c
> b/drivers/net/wireless/rt2x00/rt73usb.c
> index 77ccbbc..ba6e434 100644
> --- a/drivers/net/wireless/rt2x00/rt73usb.c
> +++ b/drivers/net/wireless/rt2x00/rt73usb.c
> @@ -1770,7 +1770,7 @@ static int
> rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
> */
> mac = rt2x00_eeprom_addr(rt2x00dev,
> EEPROM_MAC_ADDR_0);
> if (!is_valid_ether_addr(mac)) {
> -
> random_ether_addr(mac);
> +
> eth_random_addr(mac);
> EEPROM(rt2x00dev,
> "MAC: %pM\n", mac);
> }
>
> diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c
> b/drivers/net/wireless/rtl818x/rtl8180/dev.c
> index 3b50539..aceaf68 100644
> --- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
> +++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
> @@ -1078,7 +1078,7 @@ static int __devinit
> rtl8180_probe(struct pci_dev *pdev,
> if (!is_valid_ether_addr(mac_addr)) {
> printk(KERN_WARNING
> "%s (rtl8180): Invalid hwaddr! Using"
>
> " randomly generated MAC addr\n",
> pci_name(pdev));
> -
> random_ether_addr(mac_addr);
> +
> eth_random_addr(mac_addr);
> }
> SET_IEEE80211_PERM_ADDR(dev, mac_addr);
>
> diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c
> b/drivers/net/wireless/rtl818x/rtl8187/dev.c
> index 4fb1ca1..71a30b0 100644
> --- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
> +++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
> @@ -1486,7 +1486,7 @@ static int __devinit
> rtl8187_probe(struct usb_interface *intf,
> if (!is_valid_ether_addr(mac_addr)) {
> printk(KERN_WARNING
> "rtl8187: Invalid hwaddr! Using randomly "
>
> "generated MAC address\n");
> -
> random_ether_addr(mac_addr);
> +
> eth_random_addr(mac_addr);
> }
> SET_IEEE80211_PERM_ADDR(dev, mac_addr);
>
> --
> 1.7.8.111.gad25c.dirty
>
>
^ permalink raw reply
* Re: [PATCH v3] tg3: add device id of Apple Thunderbolt Ethernet device
From: Roland Dreier @ 2012-07-13 5:33 UTC (permalink / raw)
To: Greg KH; +Cc: Matt Carlson, Michael Chan, netdev
In-Reply-To: <20120713013944.GB6445@kroah.com>
On Thu, Jul 12, 2012 at 6:39 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
> The Apple Thunderbolt ethernet device is already listed in the driver,
> but not hooked up in the MODULE_DEVICE_TABLE(). This fixes that and
> allows it to work properly.
>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> ---
> Resent to Cc: the proper developers this time.
>
> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> index e47ff8b..3721833 100644
> --- a/drivers/net/ethernet/broadcom/tg3.c
> +++ b/drivers/net/ethernet/broadcom/tg3.c
> @@ -298,6 +298,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = {
> {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57795)},
> {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5719)},
> {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5720)},
> + {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57762)},
> {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
> {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
> {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},
I realize there's no way Greg can know the answer to this or test the
corresponding change...
But for the Broadcom guys:
it looks like there simiarly is code in the driver for at least
TG3PCI_DEVICE_TIGON3_57766
TG3PCI_DEVICE_TIGON3_57782
TG3PCI_DEVICE_TIGON3_57786
without entries in the PCI device table. Should those similarly be added?
- R.
^ permalink raw reply
* [PATCH net-next 5/8] drivers/net: Use eth_random_addr
From: Joe Perches @ 2012-07-13 5:33 UTC (permalink / raw)
To: David Miller, Inaky Perez-Gonzalez, linux-wimax
Cc: Johannes Berg, netdev, linux-kernel, wimax
In-Reply-To: <cover.1342157022.git.joe@perches.com>
Convert the existing uses of random_ether_addr to
the new eth_random_addr.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/tun.c | 2 +-
drivers/net/wimax/i2400m/driver.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 987aeef..961fad1 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -22,7 +22,7 @@
* Add TUNSETLINK ioctl to set the link encapsulation
*
* Mark Smith <markzzzsmith@yahoo.com.au>
- * Use random_ether_addr() for tap MAC address.
+ * Use eth_random_addr() for tap MAC address.
*
* Harald Roelle <harald.roelle@ifi.lmu.de> 2004/04/20
* Fixes in packet dropping, queue length setting and queue wakeup.
diff --git a/drivers/net/wimax/i2400m/driver.c b/drivers/net/wimax/i2400m/driver.c
index 47cae71..01d400d 100644
--- a/drivers/net/wimax/i2400m/driver.c
+++ b/drivers/net/wimax/i2400m/driver.c
@@ -897,7 +897,7 @@ int i2400m_setup(struct i2400m *i2400m, enum i2400m_bri bm_flags)
result = i2400m_read_mac_addr(i2400m);
if (result < 0)
goto error_read_mac_addr;
- random_ether_addr(i2400m->src_mac_addr);
+ eth_random_addr(i2400m->src_mac_addr);
i2400m->pm_notifier.notifier_call = i2400m_pm_notifier;
register_pm_notifier(&i2400m->pm_notifier);
--
1.7.8.111.gad25c.dirty
^ permalink raw reply related
* [PATCH net-next 4/8] wireless: Use eth_random_addr
From: Joe Perches @ 2012-07-13 5:33 UTC (permalink / raw)
To: David Miller, John W. Linville, Christian Lamparter,
Ivo van Doorn, Gertjan van Wingerde, Helmut Schaa,
Herton Ronaldo Krzesinski, Hin-Tak Leung, Larry Finger
Cc: Johannes Berg, linux-wireless, netdev, linux-kernel, users
In-Reply-To: <cover.1342157022.git.joe@perches.com>
Convert the existing uses of random_ether_addr to
the new eth_random_addr.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/wireless/adm8211.c | 2 +-
drivers/net/wireless/p54/eeprom.c | 2 +-
drivers/net/wireless/rt2x00/rt2400pci.c | 2 +-
drivers/net/wireless/rt2x00/rt2500pci.c | 2 +-
drivers/net/wireless/rt2x00/rt2500usb.c | 2 +-
drivers/net/wireless/rt2x00/rt2800lib.c | 2 +-
drivers/net/wireless/rt2x00/rt61pci.c | 2 +-
drivers/net/wireless/rt2x00/rt73usb.c | 2 +-
drivers/net/wireless/rtl818x/rtl8180/dev.c | 2 +-
drivers/net/wireless/rtl818x/rtl8187/dev.c | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index 97afcec..689a71c 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1854,7 +1854,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
if (!is_valid_ether_addr(perm_addr)) {
printk(KERN_WARNING "%s (adm8211): Invalid hwaddr in EEPROM!\n",
pci_name(pdev));
- random_ether_addr(perm_addr);
+ eth_random_addr(perm_addr);
}
SET_IEEE80211_PERM_ADDR(dev, perm_addr);
diff --git a/drivers/net/wireless/p54/eeprom.c b/drivers/net/wireless/p54/eeprom.c
index 636daf2..1403709 100644
--- a/drivers/net/wireless/p54/eeprom.c
+++ b/drivers/net/wireless/p54/eeprom.c
@@ -857,7 +857,7 @@ good_eeprom:
wiphy_warn(dev->wiphy,
"Invalid hwaddr! Using randomly generated MAC addr\n");
- random_ether_addr(perm_addr);
+ eth_random_addr(perm_addr);
SET_IEEE80211_PERM_ADDR(dev, perm_addr);
}
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 5e6b501..8b9dbd7 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1455,7 +1455,7 @@ static int rt2400pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) {
- random_ether_addr(mac);
+ eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac);
}
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index 136b849..d2cf8a4 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -1585,7 +1585,7 @@ static int rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) {
- random_ether_addr(mac);
+ eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac);
}
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 669aecd..3aae36b 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -1352,7 +1352,7 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) {
- random_ether_addr(mac);
+ eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac);
}
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 068276e..d857d55 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4340,7 +4340,7 @@ int rt2800_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) {
- random_ether_addr(mac);
+ eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac);
}
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index ee22bd7..f322596 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -2415,7 +2415,7 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) {
- random_ether_addr(mac);
+ eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac);
}
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 77ccbbc..ba6e434 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1770,7 +1770,7 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) {
- random_ether_addr(mac);
+ eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac);
}
diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c
index 3b50539..aceaf68 100644
--- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
@@ -1078,7 +1078,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
if (!is_valid_ether_addr(mac_addr)) {
printk(KERN_WARNING "%s (rtl8180): Invalid hwaddr! Using"
" randomly generated MAC addr\n", pci_name(pdev));
- random_ether_addr(mac_addr);
+ eth_random_addr(mac_addr);
}
SET_IEEE80211_PERM_ADDR(dev, mac_addr);
diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
index 4fb1ca1..71a30b0 100644
--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
@@ -1486,7 +1486,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
if (!is_valid_ether_addr(mac_addr)) {
printk(KERN_WARNING "rtl8187: Invalid hwaddr! Using randomly "
"generated MAC address\n");
- random_ether_addr(mac_addr);
+ eth_random_addr(mac_addr);
}
SET_IEEE80211_PERM_ADDR(dev, mac_addr);
--
1.7.8.111.gad25c.dirty
^ permalink raw reply related
* [PATCH net-next 3/8] net: usb: Use eth_random_addr
From: Joe Perches @ 2012-07-13 5:33 UTC (permalink / raw)
To: David Miller, Greg Kroah-Hartman, Steve Glendinning,
Oliver Neukum
Cc: Johannes Berg, linux-usb, netdev, linux-kernel
In-Reply-To: <cover.1342157022.git.joe@perches.com>
Convert the existing uses of random_ether_addr to
the new eth_random_addr.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/usb/smsc75xx.c | 2 +-
drivers/net/usb/smsc95xx.c | 2 +-
drivers/net/usb/usbnet.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c
index 1c6e515..6c0c5b7 100644
--- a/drivers/net/usb/smsc75xx.c
+++ b/drivers/net/usb/smsc75xx.c
@@ -616,7 +616,7 @@ static void smsc75xx_init_mac_address(struct usbnet *dev)
/* no eeprom, or eeprom values are invalid. generate random MAC */
eth_hw_addr_random(dev->net);
- netif_dbg(dev, ifup, dev->net, "MAC address set to random_ether_addr");
+ netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr");
}
static int smsc75xx_set_mac_address(struct usbnet *dev)
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index bd7cbaa..25cc3a1 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -647,7 +647,7 @@ static void smsc95xx_init_mac_address(struct usbnet *dev)
/* no eeprom, or eeprom values are invalid. generate random MAC */
eth_hw_addr_random(dev->net);
- netif_dbg(dev, ifup, dev->net, "MAC address set to random_ether_addr\n");
+ netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n");
}
static int smsc95xx_set_mac_address(struct usbnet *dev)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index e92c057..8531c1c 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1593,7 +1593,7 @@ static int __init usbnet_init(void)
BUILD_BUG_ON(
FIELD_SIZEOF(struct sk_buff, cb) < sizeof(struct skb_data));
- random_ether_addr(node_id);
+ eth_random_addr(node_id);
return 0;
}
module_init(usbnet_init);
--
1.7.8.111.gad25c.dirty
^ permalink raw reply related
* [PATCH net-next 2/8] ethernet: Use eth_random_addr
From: Joe Perches @ 2012-07-13 5:33 UTC (permalink / raw)
To: David Miller, Steve Glendinning, Chris Metcalf, Anirudha Sarangi,
John Linn
Cc: Jay Cliburn, netdev, e1000-devel, Chris Snook, Bruce Allan,
Jesse Brandeburg, linux-kernel, John Ronciak, Johannes Berg
In-Reply-To: <cover.1342157022.git.joe@perches.com>
Convert the existing uses of random_ether_addr to
the new eth_random_addr.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ethernet/atheros/atl1c/atl1c_hw.c | 2 +-
drivers/net/ethernet/atheros/atlx/atl1.c | 2 +-
drivers/net/ethernet/atheros/atlx/atl2.c | 2 +-
drivers/net/ethernet/ethoc.c | 2 +-
drivers/net/ethernet/intel/igb/igb_main.c | 4 ++--
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +-
drivers/net/ethernet/lantiq_etop.c | 2 +-
drivers/net/ethernet/micrel/ks8851.c | 2 +-
drivers/net/ethernet/micrel/ks8851_mll.c | 2 +-
drivers/net/ethernet/smsc/smsc911x.c | 2 +-
drivers/net/ethernet/ti/cpsw.c | 2 +-
drivers/net/ethernet/tile/tilegx.c | 2 +-
drivers/net/ethernet/wiznet/w5100.c | 2 +-
drivers/net/ethernet/wiznet/w5300.c | 2 +-
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +-
15 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
index 801f012..21e261f 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
@@ -199,7 +199,7 @@ int atl1c_read_mac_addr(struct atl1c_hw *hw)
err = atl1c_get_permanent_address(hw);
if (err)
- random_ether_addr(hw->perm_mac_addr);
+ eth_random_addr(hw->perm_mac_addr);
memcpy(hw->mac_addr, hw->perm_mac_addr, sizeof(hw->perm_mac_addr));
return err;
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
index f2402f3..7bae2ad 100644
--- a/drivers/net/ethernet/atheros/atlx/atl1.c
+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
@@ -538,7 +538,7 @@ static s32 atl1_read_mac_addr(struct atl1_hw *hw)
u16 i;
if (atl1_get_permanent_address(hw)) {
- random_ether_addr(hw->perm_mac_addr);
+ eth_random_addr(hw->perm_mac_addr);
ret = 1;
}
diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c
index 7c0b7e2..57d64b8 100644
--- a/drivers/net/ethernet/atheros/atlx/atl2.c
+++ b/drivers/net/ethernet/atheros/atlx/atl2.c
@@ -2346,7 +2346,7 @@ static s32 atl2_read_mac_addr(struct atl2_hw *hw)
{
if (get_permanent_address(hw)) {
/* for test */
- /* FIXME: shouldn't we use random_ether_addr() here? */
+ /* FIXME: shouldn't we use eth_random_addr() here? */
hw->perm_mac_addr[0] = 0x00;
hw->perm_mac_addr[1] = 0x13;
hw->perm_mac_addr[2] = 0x74;
diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c
index 2029788..94b7bfc 100644
--- a/drivers/net/ethernet/ethoc.c
+++ b/drivers/net/ethernet/ethoc.c
@@ -1057,7 +1057,7 @@ static int __devinit ethoc_probe(struct platform_device *pdev)
/* Check the MAC again for validity, if it still isn't choose and
* program a random one. */
if (!is_valid_ether_addr(netdev->dev_addr)) {
- random_ether_addr(netdev->dev_addr);
+ eth_random_addr(netdev->dev_addr);
random_mac = true;
}
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 60e3075..8adeca9 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -5008,7 +5008,7 @@ static int igb_vf_configure(struct igb_adapter *adapter, int vf)
unsigned int device_id;
u16 thisvf_devfn;
- random_ether_addr(mac_addr);
+ eth_random_addr(mac_addr);
igb_set_vf_mac(adapter, vf, mac_addr);
switch (adapter->hw.mac.type) {
@@ -5417,7 +5417,7 @@ static void igb_vf_reset_event(struct igb_adapter *adapter, u32 vf)
/* generate a new mac address as we were hotplug removed/added */
if (!(adapter->vf_data[vf].flags & IGB_VF_FLAG_PF_SET_MAC))
- random_ether_addr(vf_mac);
+ eth_random_addr(vf_mac);
/* process remaining reset events */
igb_vf_reset(adapter, vf);
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index 2d971d1..eb3f67c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -467,7 +467,7 @@ int ixgbe_vf_configuration(struct pci_dev *pdev, unsigned int event_mask)
bool enable = ((event_mask & 0x10000000U) != 0);
if (enable) {
- random_ether_addr(vf_mac_addr);
+ eth_random_addr(vf_mac_addr);
e_info(probe, "IOV: VF %d is enabled MAC %pM\n",
vfn, vf_mac_addr);
/*
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index 9fa39eb..003c5bc 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -645,7 +645,7 @@ ltq_etop_init(struct net_device *dev)
memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr));
if (!is_valid_ether_addr(mac.sa_data)) {
pr_warn("etop: invalid MAC, using random\n");
- random_ether_addr(mac.sa_data);
+ eth_random_addr(mac.sa_data);
random_mac = true;
}
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
index 5e313e9..1540ebe 100644
--- a/drivers/net/ethernet/micrel/ks8851.c
+++ b/drivers/net/ethernet/micrel/ks8851.c
@@ -422,7 +422,7 @@ static void ks8851_read_mac_addr(struct net_device *dev)
*
* Get or create the initial mac address for the device and then set that
* into the station address register. If there is an EEPROM present, then
- * we try that. If no valid mac address is found we use random_ether_addr()
+ * we try that. If no valid mac address is found we use eth_random_addr()
* to create a new one.
*/
static void ks8851_init_mac(struct ks8851_net *ks)
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c
index 59ef568..38529ed 100644
--- a/drivers/net/ethernet/micrel/ks8851_mll.c
+++ b/drivers/net/ethernet/micrel/ks8851_mll.c
@@ -1609,7 +1609,7 @@ static int __devinit ks8851_probe(struct platform_device *pdev)
memcpy(ks->mac_addr, pdata->mac_addr, 6);
if (!is_valid_ether_addr(ks->mac_addr)) {
/* Use random MAC address if none passed */
- random_ether_addr(ks->mac_addr);
+ eth_random_addr(ks->mac_addr);
netdev_info(netdev, "Using random mac address\n");
}
netdev_info(netdev, "Mac address is: %pM\n", ks->mac_addr);
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
index 54ca99d..62d1baf 100644
--- a/drivers/net/ethernet/smsc/smsc911x.c
+++ b/drivers/net/ethernet/smsc/smsc911x.c
@@ -2488,7 +2488,7 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
eth_hw_addr_random(dev);
smsc911x_set_hw_mac_address(pdata, dev->dev_addr);
SMSC_TRACE(pdata, probe,
- "MAC Address is set to random_ether_addr");
+ "MAC Address is set to eth_random_addr");
}
}
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 6685bbb..ca381d3 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -748,7 +748,7 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
memcpy(priv->mac_addr, data->slave_data[0].mac_addr, ETH_ALEN);
pr_info("Detected MACID = %pM", priv->mac_addr);
} else {
- random_ether_addr(priv->mac_addr);
+ eth_random_addr(priv->mac_addr);
pr_info("Random MACID = %pM", priv->mac_addr);
}
diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c
index 83b4b38..7f50028 100644
--- a/drivers/net/ethernet/tile/tilegx.c
+++ b/drivers/net/ethernet/tile/tilegx.c
@@ -1844,7 +1844,7 @@ static void tile_net_dev_init(const char *name, const uint8_t *mac)
memcpy(dev->dev_addr, mac, 6);
dev->addr_len = 6;
} else {
- random_ether_addr(dev->dev_addr);
+ eth_random_addr(dev->dev_addr);
}
/* Register the network device. */
diff --git a/drivers/net/ethernet/wiznet/w5100.c b/drivers/net/ethernet/wiznet/w5100.c
index a75e9ef..a5826a3 100644
--- a/drivers/net/ethernet/wiznet/w5100.c
+++ b/drivers/net/ethernet/wiznet/w5100.c
@@ -637,7 +637,7 @@ static int __devinit w5100_hw_probe(struct platform_device *pdev)
if (data && is_valid_ether_addr(data->mac_addr)) {
memcpy(ndev->dev_addr, data->mac_addr, ETH_ALEN);
} else {
- random_ether_addr(ndev->dev_addr);
+ eth_random_addr(ndev->dev_addr);
ndev->addr_assign_type |= NET_ADDR_RANDOM;
}
diff --git a/drivers/net/ethernet/wiznet/w5300.c b/drivers/net/ethernet/wiznet/w5300.c
index 3306a20..bdd8891 100644
--- a/drivers/net/ethernet/wiznet/w5300.c
+++ b/drivers/net/ethernet/wiznet/w5300.c
@@ -557,7 +557,7 @@ static int __devinit w5300_hw_probe(struct platform_device *pdev)
if (data && is_valid_ether_addr(data->mac_addr)) {
memcpy(ndev->dev_addr, data->mac_addr, ETH_ALEN);
} else {
- random_ether_addr(ndev->dev_addr);
+ eth_random_addr(ndev->dev_addr);
ndev->addr_assign_type |= NET_ADDR_RANDOM;
}
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index 9c365e1..0793299 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -312,7 +312,7 @@ static void axienet_set_mac_address(struct net_device *ndev, void *address)
if (address)
memcpy(ndev->dev_addr, address, ETH_ALEN);
if (!is_valid_ether_addr(ndev->dev_addr))
- random_ether_addr(ndev->dev_addr);
+ eth_random_addr(ndev->dev_addr);
/* Set up unicast MAC address filter set its mac address */
axienet_iow(lp, XAE_UAW0_OFFSET,
--
1.7.8.111.gad25c.dirty
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related
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