* [PATCH] Add OF bindings to Micrel PHY
From: Sean Cross @ 2013-08-01 4:16 UTC (permalink / raw)
To: netdev, devicetree; +Cc: Sean Cross
Some boards require custom parameters be passed to the Micrel PHY.
Allow these boards to specify custom timing parameters in the device
tree node.
Sean Cross (1):
net/phy: micrel: Add OF configuration support
.../devicetree/bindings/net/micrel-phy.txt | 20 +++++++
drivers/net/phy/micrel.c | 57 ++++++++++++++++++++
2 files changed, 77 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/micrel-phy.txt
--
1.7.9.5
^ permalink raw reply
* Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma
From: Ming Lei @ 2013-08-01 4:41 UTC (permalink / raw)
To: Eric Dumazet
Cc: David S. Miller, Greg Kroah-Hartman, Oliver Neukum, Freddy Xin,
Ben Hutchings, Grant Grundler, netdev, linux-usb
In-Reply-To: <1375329066.10515.125.camel@edumazet-glaptop>
Hi Eric,
Thanks for your review.
On Thu, Aug 1, 2013 at 11:51 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Wed, 2013-07-31 at 18:51 +0800, Ming Lei wrote:
>> This patch enables 'can_dma_sg' flag for ax88179_178a device
>> if the attached host controller supports building packet from
>> discontinuous buffers(DMA SG is possible), so both frame header
>> and skb data buffers can be passed to usb stack via urb->sg,
>> then skb data copy can be saved.
>>
>> With the patch, CPU utilization decreased much in iperf test at
>> client mode.
>>
>> Signed-off-by: Ming Lei <ming.lei@canonical.com>
>> ---
>> drivers/net/usb/ax88179_178a.c | 30 ++++++++++++++++++++++++++++++
>> 1 file changed, 30 insertions(+)
>>
>> diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
>> index 5a468f3..c75bded 100644
>> --- a/drivers/net/usb/ax88179_178a.c
>> +++ b/drivers/net/usb/ax88179_178a.c
>> @@ -1031,12 +1031,20 @@ static int ax88179_bind(struct usbnet *dev, struct usb_interface *intf)
>> dev->mii.phy_id = 0x03;
>> dev->mii.supports_gmii = 1;
>>
>> + if (dev->udev->bus->no_sg_limit)
>> + dev->can_dma_sg = 1;
>> +
>> dev->net->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
>> NETIF_F_RXCSUM;
>>
>> dev->net->hw_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
>> NETIF_F_RXCSUM;
>>
>> + if (dev->can_dma_sg) {
>> + dev->net->features |= NETIF_F_SG | NETIF_F_TSO;
>> + dev->net->hw_features |= NETIF_F_SG | NETIF_F_TSO;
>> + }
>> +
>> /* Enable checksum offload */
>> *tmp = AX_RXCOE_IP | AX_RXCOE_TCP | AX_RXCOE_UDP |
>> AX_RXCOE_TCPV6 | AX_RXCOE_UDPV6;
>> @@ -1170,12 +1178,30 @@ ax88179_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
>> int mss = skb_shinfo(skb)->gso_size;
>> int headroom;
>> int tailroom;
>> + struct skb_data *entry = (struct skb_data *)skb->cb;
>>
>> tx_hdr1 = skb->len;
>> tx_hdr2 = mss;
>> if (((skb->len + 8) % frame_size) == 0)
>> tx_hdr2 |= 0x80008000; /* Enable padding */
>>
>> + if (dev->can_dma_sg) {
>
>
>
>> + if (!(entry->header = kmalloc(8, GFP_ATOMIC)))
>> + goto no_sg;
>> +
>> + entry->length = 8;
>> + cpu_to_le32s(&tx_hdr1);
>> + cpu_to_le32s(&tx_hdr2);
>
> You could do these cpu_to_le32s() calls before the if (dev->can_dma_sg)
> and remove them before the skb_copy_to_linear_data() calls.
OK.
>
>> + memcpy(entry->header, &tx_hdr1, 4);
>> + memcpy(entry->header + 4, &tx_hdr2, 4);
>> +
>> + return skb;
>> + } else {
>> +no_sg:
>> + entry->header = NULL;
>> + entry->length = 0;
>> + }
>> +
>> headroom = skb_headroom(skb);
>> tailroom = skb_tailroom(skb);
>>
>> @@ -1323,6 +1349,10 @@ static int ax88179_reset(struct usbnet *dev)
>>
>> dev->net->hw_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
>> NETIF_F_RXCSUM;
>> + if (dev->can_dma_sg) {
>> + dev->net->features |= NETIF_F_SG | NETIF_F_TSO;
>> + dev->net->hw_features |= NETIF_F_SG | NETIF_F_TSO;
>> + }
>
> Are you sure this part is needed ?
I add flags here because the part existed previously, and if you are sure
it isn't needed anymore, I can remove this part.
>
> Also it looks like that you are going through this sg allocation/setup
> even for linear skb ?
>
> For linear skb, with 8+ bytes of headroom, I guess this adds significant
> overhead (2 kmalloc() + sg setup)
>From my trace result, lots of linear SKBs are cloned or header-cloned, so
it needs skb copy too.
Is it normal in xmit path to see cloned SKBs for driver? If not, I can add check
to avoid allocation of 8 bytes header for non-cloned skb.
But for the kmalloc of urb->sg, I don't think there is one way to save that.
Thanks,
--
Ming Lei
^ permalink raw reply
* Re: [net-next PATCH 1/1] drivers: net: cpsw: Add support for new CPSW IP version
From: Richard Cochran @ 2013-08-01 4:43 UTC (permalink / raw)
To: Felipe Balbi; +Cc: Mugunthan V N, netdev, davem, linux-omap
In-Reply-To: <20130731211100.GC3737@radagast>
On Thu, Aug 01, 2013 at 12:11:00AM +0300, Felipe Balbi wrote:
>
> that's the point, there is no known V3. Once it has, surely we will add
> such macros, but until then, we let the driver assume the highest known
> revision if it finds a register with an unknown revision.
I am confused. The patch description says
The new IP version has a minor changes and the offsets are same as the previous
version,
but you are saying there is no new version?
Thanks,
Richard
^ permalink raw reply
* Re: [net-next PATCH 1/1] drivers: net: cpsw: Add support for new CPSW IP version
From: Richard Cochran @ 2013-08-01 4:46 UTC (permalink / raw)
To: Felipe Balbi; +Cc: Mugunthan V N, netdev, davem, linux-omap
In-Reply-To: <20130731194332.GA900@radagast>
On Wed, Jul 31, 2013 at 10:43:32PM +0300, Felipe Balbi wrote:
>
> right, now go check on the archives what Linus (and many others, for
> that matter) have said about version checking. If it's not the version
> you expect, you assume the latest.
If you are talking about his essay about user space checking the
kernel version, then that is another kettle of fish.
Thanks,
Richard
^ permalink raw reply
* Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma
From: Eric Dumazet @ 2013-08-01 5:04 UTC (permalink / raw)
To: Ming Lei
Cc: David S. Miller, Greg Kroah-Hartman, Oliver Neukum, Freddy Xin,
Ben Hutchings, Grant Grundler, netdev, linux-usb
In-Reply-To: <CACVXFVNSZJ+ojjBCwYDKsWWvs03aL8BugcX7u483MvBCQCH1sg@mail.gmail.com>
On Thu, 2013-08-01 at 12:41 +0800, Ming Lei wrote:
> From my trace result, lots of linear SKBs are cloned or header-cloned, so
> it needs skb copy too.
>
> Is it normal in xmit path to see cloned SKBs for driver? If not, I can add check
> to avoid allocation of 8 bytes header for non-cloned skb.
Existing code is not very friendly and very complex.
Sure TCP stack does a clone for every skb from socket write queue,
but header should be available for pushing 8 bytes.
The !skb_cloned(skb) test should be removed if the memmove() is not
needed.
Could you try following patch ?
drivers/net/usb/ax88179_178a.c | 21 ++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
index 2bc87e3..e2120d6 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -1166,31 +1166,18 @@ ax88179_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
int frame_size = dev->maxpacket;
int mss = skb_shinfo(skb)->gso_size;
int headroom;
- int tailroom;
tx_hdr1 = skb->len;
tx_hdr2 = mss;
if (((skb->len + 8) % frame_size) == 0)
tx_hdr2 |= 0x80008000; /* Enable padding */
- headroom = skb_headroom(skb);
- tailroom = skb_tailroom(skb);
+ headroom = skb_headroom(skb) - 8;
- if (!skb_header_cloned(skb) &&
- !skb_cloned(skb) &&
- (headroom + tailroom) >= 8) {
- if (headroom < 8) {
- skb->data = memmove(skb->head + 8, skb->data, skb->len);
- skb_set_tail_pointer(skb, skb->len);
- }
- } else {
- struct sk_buff *skb2;
-
- skb2 = skb_copy_expand(skb, 8, 0, flags);
+ if ((skb_header_cloned(skb) || headroom < 0) &&
+ pskb_expand_head(skb, headroom < 0 ? 8 : 0, 0, GFP_ATOMIC)) {
dev_kfree_skb_any(skb);
- skb = skb2;
- if (!skb)
- return NULL;
+ return NULL;
}
skb_push(skb, 4);
^ permalink raw reply related
* Question regarding failure utilizing bonding mode 5 (balance-tlb)
From: Yuval Mintz @ 2013-08-01 5:12 UTC (permalink / raw)
To: netdev@vger.kernel.org; +Cc: Ariel Elior
We've had reports that load/unload tests using bonding driver in
balance-tlb mode over bnx2x interfaces results in loss of traffic.
When investigating, we've found out that the bonding driver uses the ndo
(ndo_change_mac_addr()) during ifenslave to override the slaves' HW MAC
address. It then directly goes and changes the slaves netdevices'
dev_addr so that each network interface would posses a distinguish MAC
address (as seen in ifconfig), while the FW/HW of both interfaces is
still configured by the MAC passed by the ndo.
When the active slave is unloaded, the ifconfig MAC (dev_addr) is
swapped between the slaves directly, i.e., without calling the ndo. Once
the interface of the previously active slave will be reloaded, it will
configure it's HW MAC according to that dev_addr value (i.e., the
bonding driver takes no additional measures to force it's own MAC on the
interface when re-loading), causing it to have a configured MAC which
differs from the one that is held by the bonding driver.
If this is done an additional time (on the newly active slave), both
slave devices will be configured to a MAC which differs from the one
held by the bond interface (i.e., the bond interface holds the MAC of
the original active slave, while both interfaces configured the MAC of
the original inactive slave). This obviously prevents any traffic from
being successfully sent/received.
bnx2x uses dev_addr directly for MAC configuration, which I think is the
default behaviour for most network drivers - ixgbe has a shadow value
which it uses instead, but I think that's the exception and not the
rule.
As I see it, either:
1. The bonding driver is flawed in balance-tlb mode and should be
fixed.
2. bnx2x's behaviour is flawed - it should have some persistent
shadow MAC which should contain the last MAC set - either factory value
or what was configured by the ndo, and use it instead of dev_addr when
configuring the HW MAC.
This would probably indicate that other drivers are flawed as well.
3. The test itself is flawed, since user should not unload slave
interfaces.
What's the correct approach for fixing the issue?
Idea's will be welcomed.
Thanks,
Yuval
^ permalink raw reply
* linux-next: manual merge of the driver-core tree with the net-next tree
From: Stephen Rothwell @ 2013-08-01 5:21 UTC (permalink / raw)
To: Greg KH; +Cc: linux-next, linux-kernel, Jiri Pirko, David Miller, netdev
[-- Attachment #1: Type: text/plain, Size: 4226 bytes --]
Hi Greg,
Today's linux-next merge of the driver-core tree got a conflict in
net/core/net-sysfs.c between commit ff80e519ab1b ("net: export physical
port id via sysfs") from the net-next tree and commit 6be8aeef348a ("net:
core: convert class code to use dev_groups") from the driver-core tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc net/core/net-sysfs.c
index 8826b0d,707c313..0000000
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@@ -237,9 -250,9 +250,31 @@@ static ssize_t operstate_show(struct de
return sprintf(buf, "%s\n", operstates[operstate]);
}
+ static DEVICE_ATTR_RO(operstate);
+
++static ssize_t phys_port_id_show(struct device *dev,
++ struct device_attribute *attr, char *buf)
++{
++ struct net_device *netdev = to_net_dev(dev);
++ ssize_t ret = -EINVAL;
++
++ if (!rtnl_trylock())
++ return restart_syscall();
++
++ if (dev_isalive(netdev)) {
++ struct netdev_phys_port_id ppid;
++
++ ret = dev_get_phys_port_id(netdev, &ppid);
++ if (!ret)
++ ret = sprintf(buf, "%*phN\n", ppid.id_len, ppid.id);
++ }
++ rtnl_unlock();
++
++ return ret;
++}
++static DEVICE_ATTR_RO(phys_port_id);
+
/* read-write attributes */
- NETDEVICE_SHOW(mtu, fmt_dec);
static int change_mtu(struct net_device *net, unsigned long new_mtu)
{
@@@ -333,52 -344,32 +366,33 @@@ static ssize_t group_store(struct devic
{
return netdev_store(dev, attr, buf, len, change_group);
}
-
- static ssize_t show_phys_port_id(struct device *dev,
- struct device_attribute *attr, char *buf)
- {
- struct net_device *netdev = to_net_dev(dev);
- ssize_t ret = -EINVAL;
-
- if (!rtnl_trylock())
- return restart_syscall();
-
- if (dev_isalive(netdev)) {
- struct netdev_phys_port_id ppid;
-
- ret = dev_get_phys_port_id(netdev, &ppid);
- if (!ret)
- ret = sprintf(buf, "%*phN\n", ppid.id_len, ppid.id);
- }
- rtnl_unlock();
-
- return ret;
- }
-
- static struct device_attribute net_class_attributes[] = {
- __ATTR(addr_assign_type, S_IRUGO, show_addr_assign_type, NULL),
- __ATTR(addr_len, S_IRUGO, show_addr_len, NULL),
- __ATTR(dev_id, S_IRUGO, show_dev_id, NULL),
- __ATTR(ifalias, S_IRUGO | S_IWUSR, show_ifalias, store_ifalias),
- __ATTR(iflink, S_IRUGO, show_iflink, NULL),
- __ATTR(ifindex, S_IRUGO, show_ifindex, NULL),
- __ATTR(type, S_IRUGO, show_type, NULL),
- __ATTR(link_mode, S_IRUGO, show_link_mode, NULL),
- __ATTR(address, S_IRUGO, show_address, NULL),
- __ATTR(broadcast, S_IRUGO, show_broadcast, NULL),
- __ATTR(carrier, S_IRUGO | S_IWUSR, show_carrier, store_carrier),
- __ATTR(speed, S_IRUGO, show_speed, NULL),
- __ATTR(duplex, S_IRUGO, show_duplex, NULL),
- __ATTR(dormant, S_IRUGO, show_dormant, NULL),
- __ATTR(operstate, S_IRUGO, show_operstate, NULL),
- __ATTR(mtu, S_IRUGO | S_IWUSR, show_mtu, store_mtu),
- __ATTR(flags, S_IRUGO | S_IWUSR, show_flags, store_flags),
- __ATTR(tx_queue_len, S_IRUGO | S_IWUSR, show_tx_queue_len,
- store_tx_queue_len),
- __ATTR(netdev_group, S_IRUGO | S_IWUSR, show_group, store_group),
- __ATTR(phys_port_id, S_IRUGO, show_phys_port_id, NULL),
- {}
+ NETDEVICE_SHOW(group, fmt_dec);
+ static DEVICE_ATTR(netdev_group, S_IRUGO | S_IWUSR, group_show, group_store);
+
+ static struct attribute *net_class_attrs[] = {
+ &dev_attr_netdev_group.attr,
+ &dev_attr_type.attr,
+ &dev_attr_dev_id.attr,
+ &dev_attr_iflink.attr,
+ &dev_attr_ifindex.attr,
+ &dev_attr_addr_assign_type.attr,
+ &dev_attr_addr_len.attr,
+ &dev_attr_link_mode.attr,
+ &dev_attr_address.attr,
+ &dev_attr_broadcast.attr,
+ &dev_attr_speed.attr,
+ &dev_attr_duplex.attr,
+ &dev_attr_dormant.attr,
+ &dev_attr_operstate.attr,
++ &dev_attr_phys_port_id.attr,
+ &dev_attr_ifalias.attr,
+ &dev_attr_carrier.attr,
+ &dev_attr_mtu.attr,
+ &dev_attr_flags.attr,
+ &dev_attr_tx_queue_len.attr,
+ NULL,
};
+ ATTRIBUTE_GROUPS(net_class);
/* Show a given an attribute in the statistics group */
static ssize_t netstat_show(const struct device *d,
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* RE: [PATCH] net/phy: micrel: Add OF configuration support
From: Duan Fugang-B38611 @ 2013-08-01 5:31 UTC (permalink / raw)
To: Sean Cross, netdev@vger.kernel.org, devicetree@vger.kernel.org
Cc: David Miller, stephen@networkplumber.org, Steven Rostedt
In-Reply-To: <1375330601-3609-2-git-send-email-xobs@kosagi.com>
On Thu, Aug 01, 2013 at 12:17 PM, Sean Cross wrote:
> +/* Write/read to/from extended registers */
> +#define MII_KSZPHY_EXTREG 0x0b
> +#define KSZPHY_EXTREG_WRITE 0x8000
> +
> +#define MII_KSZPHY_EXTREG_WRITE 0x0c
> +#define MII_KSZPHY_EXTREG_READ 0x0d
> +
> +/* Write/read to/from extended registers */
> +#define MII_KSZPHY_EXTREG 0x0b
> +#define KSZPHY_EXTREG_WRITE 0x8000
> +
> +#define MII_KSZPHY_EXTREG_WRITE 0x0c
> +#define MII_KSZPHY_EXTREG_READ 0x0d
> +
Pls don't re-define the registers address and field.
> + if (!of_property_read_u32(of_node,
> + "micrel,clk-control-pad-skew",
> + &val))
> + kszphy_extended_write(phydev,
> + MII_KSZPHY_CLK_CONTROL_PAD_SKEW,
> + val);
When re-set rx/tx clock delay, rx/tx control delay, it is better to do dummy read the extended MII_KSZPHY_CLK_CONTROL_PAD_SKEW register one time.
Thanks,
Andy
^ permalink raw reply
* Re: [PATCH v4] fib_rules: add .suppress operation
From: Hannes Frederic Sowa @ 2013-08-01 5:35 UTC (permalink / raw)
To: Stefan Tomanek; +Cc: David Miller, netdev, bsderandrew
In-Reply-To: <20130801012621.GM10550@zirkel.wertarbyte.de>
On Thu, Aug 01, 2013 at 03:26:21AM +0200, Stefan Tomanek wrote:
> Dies schrieb David Miller (davem@davemloft.net):
>
> > Applied, thanks.
>
> Thank you very much; Hannes Frederic Sowa noted some irregularities with the
> error reporting in fib6_rules (message ID
> <20130727060802.GD20273@order.stressinduktion.org>) that might interfere with
> the function of my patch; perhaps his change should be applied as well? I've
> reposted his changes with git format-patch as message ID
> <20130730065258.GG13357@zirkel.wertarbyte.de> ("[PATCH v2 1/2] fib6_rules: make
> error handling consistent with IPv4").
I can take care of this and will repost the patch today.
Thank you,
Hannes
^ permalink raw reply
* Re: minimum ICMPv6 message size vs. RPL's DIS
From: Hannes Frederic Sowa @ 2013-08-01 5:48 UTC (permalink / raw)
To: Werner Almesberger, davem; +Cc: netdev
In-Reply-To: <20130725103048.GB29572@ws>
Hi Werner!
On Thu, Jul 25, 2013 at 07:30:49AM -0300, Werner Almesberger wrote:
> Hannes Frederic Sowa wrote:
> > Hmm, maybe we should update the icmp header to something like
>
> That would be quite clean. Is it okay to introduce new names
> like that in a uapi/ header (uapi/linux/icmpv6.h) ?
>
> > Hmm, there is a bug in this function, _hdr must not be a pointer.
>
> Oh, I didn't even notice that. Very good catch !
>
> So on 32 bit system, it would actually work even with "short"
> ICMPv6 messages. Two wrongs sometimes do make a right :-)
>
> I've attached a revised patch that, according to quick testing,
> still works and doesn't break anything else.
>
> Thanks,
> - Werner
>
> ---------------------------------- cut here -----------------------------------
>
> diff --git a/include/uapi/linux/icmpv6.h b/include/uapi/linux/icmpv6.h
> index e0133c7..11eb5ff 100644
> --- a/include/uapi/linux/icmpv6.h
> +++ b/include/uapi/linux/icmpv6.h
> @@ -5,11 +5,15 @@
> #include <asm/byteorder.h>
>
> struct icmp6hdr {
> -
> - __u8 icmp6_type;
> - __u8 icmp6_code;
> - __sum16 icmp6_cksum;
> -
> + struct icmp6hdr_head {
> + __u8 type;
> + __u8 code;
> + __sum16 cksum;
> + } icmpv6_head;
> +
> +#define icmp6_type icmpv6_head.type
> +#define icmp6_code icmpv6_head.code
> +#define icmp6_cksum icmpv6_head.cksum
>
> union {
> __be32 un_data32[1];
> diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
> index c45f7a5..99ab06f 100644
> --- a/net/ipv6/raw.c
> +++ b/net/ipv6/raw.c
> @@ -108,14 +108,14 @@ found:
> */
> static int icmpv6_filter(const struct sock *sk, const struct sk_buff *skb)
> {
> - struct icmp6hdr *_hdr;
> - const struct icmp6hdr *hdr;
> + struct icmp6hdr_head _head;
> + const struct icmp6hdr_head *head;
>
> - hdr = skb_header_pointer(skb, skb_transport_offset(skb),
> - sizeof(_hdr), &_hdr);
> - if (hdr) {
> + head = skb_header_pointer(skb, skb_transport_offset(skb),
> + sizeof(_head), &_head);
> + if (head) {
> const __u32 *data = &raw6_sk(sk)->filter.data[0];
> - unsigned int type = hdr->icmp6_type;
> + unsigned int type = head->type;
>
> return (data[type >> 5] & (1U << (type & 31))) != 0;
> }
I would go ahead and post this as an offical patch submission now and let
David Miller have a look.
Thanks,
Hannes
^ permalink raw reply
* [PATCH] vlan: cleanup the usage of *vlan in vlan_dev_hard_header
From: Wang Sheng-Hui @ 2013-08-01 6:10 UTC (permalink / raw)
To: Patrick McHardy, David S. Miller, netdev
We can use vlan directly after we get the pointer at the beginning
*vlan = vlan_dev_priv(dev)
and do not use vlan_dev_priv(dev) to access its fields afterwards.
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
net/8021q/vlan_dev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 1cd3d2a..9ab8a7e 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -107,10 +107,10 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
u16 vlan_tci = 0;
int rc;
- if (!(vlan_dev_priv(dev)->flags & VLAN_FLAG_REORDER_HDR)) {
+ if (!(vlan->flags & VLAN_FLAG_REORDER_HDR)) {
vhdr = (struct vlan_hdr *) skb_push(skb, VLAN_HLEN);
- vlan_tci = vlan_dev_priv(dev)->vlan_id;
+ vlan_tci = vlan->vlan_id;
vlan_tci |= vlan_dev_get_egress_qos_mask(dev, skb);
vhdr->h_vlan_TCI = htons(vlan_tci);
@@ -133,7 +133,7 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
saddr = dev->dev_addr;
/* Now make the underlying real hard header */
- dev = vlan_dev_priv(dev)->real_dev;
+ dev = vlan->real_dev;
rc = dev_hard_header(skb, dev, type, daddr, saddr, len + vhdrlen);
if (rc > 0)
rc += vhdrlen;
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH] net/phy: micrel: Add OF configuration support
From: Sean Cross @ 2013-08-01 6:23 UTC (permalink / raw)
To: Duan Fugang-B38611
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, David Miller,
stephen@networkplumber.org, Steven Rostedt
In-Reply-To: <9848F2DB572E5649BA045B288BE08FBE015E3F06@039-SN2MPN1-023.039d.mgd.msft.net>
On Thursday, August 1, 2013 at 1:31 PM, Duan Fugang-B38611 wrote:
> On Thu, Aug 01, 2013 at 12:17 PM, Sean Cross wrote:
>
> > +/* Write/read to/from extended registers */
> > +#define MII_KSZPHY_EXTREG 0x0b
> > +#define KSZPHY_EXTREG_WRITE 0x8000
> > +
> > +#define MII_KSZPHY_EXTREG_WRITE 0x0c
> > +#define MII_KSZPHY_EXTREG_READ 0x0d
> > +
> > +/* Write/read to/from extended registers */
> > +#define MII_KSZPHY_EXTREG 0x0b
> > +#define KSZPHY_EXTREG_WRITE 0x8000
> > +
> > +#define MII_KSZPHY_EXTREG_WRITE 0x0c
> > +#define MII_KSZPHY_EXTREG_READ 0x0d
> > +
>
>
>
> Pls don't re-define the registers address and field.
My fault. I'll remove this redundancy.
> > + if (!of_property_read_u32(of_node,
> > + "micrel,clk-control-pad-skew",
> > + &val))
> > + kszphy_extended_write(phydev,
> > + MII_KSZPHY_CLK_CONTROL_PAD_SKEW,
> > + val);
>
>
>
> When re-set rx/tx clock delay, rx/tx control delay, it is better to do dummy read the extended MII_KSZPHY_CLK_CONTROL_PAD_SKEW register one time.
Can you please explain this? I don't see anything in the datasheet I'm looking at (ksz9021rl) describing dummy reads. If both tx and rx skew are adjusted, should there be two dummy reads or just one?
^ permalink raw reply
* Re: [PATCH net-next 5/5] bonding: initial RCU conversion
From: Ding Tianhong @ 2013-08-01 6:46 UTC (permalink / raw)
To: Nikolay Aleksandrov; +Cc: netdev, andy, davem, fubar
In-Reply-To: <1375283553-32070-6-git-send-email-nikolay@redhat.com>
On 2013/7/31 23:12, Nikolay Aleksandrov wrote:
> This patch does the initial bonding conversion to RCU. After it the
> following modes are protected by RCU alone: roundrobin, active-backup,
> broadcast and xor. Modes ALB/TLB and 3ad still acquire bond->lock for
> reading, and will be dealt with later. curr_active_slave needs to be
> dereferenced via rcu in the converted modes because the only thing
> protecting the slave after this patch is rcu_read_lock, so we need the
> proper barrier for weakly ordered archs and to make sure we don't have
> stale pointer. It's not tagged with __rcu yet because there's still work
> to be done to remove the curr_slave_lock, so sparse will complain when
> rcu_assign_pointer and rcu_dereference are used, but the alternative to use
> rcu_dereference_protected would've created much bigger code churn which is
> more difficult to test and review. That will be converted in time.
>
> Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
great job! but I think you miss come place to replace by rcu protect.
example: bonding_show_active_slave() still has curr = bond->curr_active_slave,
so I think you could replace them all and send together.
^ permalink raw reply
* [PATCH net-next] ipv6: fib6_rules should return exact return value
From: Hannes Frederic Sowa @ 2013-08-01 6:48 UTC (permalink / raw)
To: netdev; +Cc: stefan.tomanek, yoshfuji
With the addition of the suppress operation
(7764a45a8f1fe74d4f7d301eaca2e558e7e2831a ("fib_rules: add .suppress
operation") we rely on accurate error reporting of the fib_rules.actions.
fib6_rule_action always returned -EAGAIN in case we could not find a
matching route and 0 if a rule was matched. This also included a match
for blackhole or prohibited rule actions which could get suppressed by
the new logic.
So adapt fib6_rule_action to always return the correct error code as
its counterpart fib4_rule_action does. This also fixes a possiblity of
nullptr-deref, where we don't match the rule, thus rt == NULL. Because
the condition rt != ip6_null_entry still holdes it seems we could later
on dereference rt->dst.
Cc: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
net/ipv6/fib6_rules.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index e64e6a5..554a4fb 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -55,26 +55,33 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,
struct fib6_table *table;
struct net *net = rule->fr_net;
pol_lookup_t lookup = arg->lookup_ptr;
+ int err = 0;
switch (rule->action) {
case FR_ACT_TO_TBL:
break;
case FR_ACT_UNREACHABLE:
+ err = -ENETUNREACH;
rt = net->ipv6.ip6_null_entry;
goto discard_pkt;
default:
case FR_ACT_BLACKHOLE:
+ err = -EINVAL;
rt = net->ipv6.ip6_blk_hole_entry;
goto discard_pkt;
case FR_ACT_PROHIBIT:
+ err = -EACCES;
rt = net->ipv6.ip6_prohibit_entry;
goto discard_pkt;
}
table = fib6_get_table(net, rule->table);
- if (table)
- rt = lookup(net, table, flp6, flags);
+ if (!table) {
+ err = -EAGAIN;
+ goto out;
+ }
+ rt = lookup(net, table, flp6, flags);
if (rt != net->ipv6.ip6_null_entry) {
struct fib6_rule *r = (struct fib6_rule *)rule;
@@ -101,6 +108,7 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,
}
again:
ip6_rt_put(rt);
+ err = -EAGAIN;
rt = NULL;
goto out;
@@ -108,7 +116,7 @@ discard_pkt:
dst_hold(&rt->dst);
out:
arg->result = rt;
- return rt == NULL ? -EAGAIN : 0;
+ return err;
}
static bool fib6_rule_suppress(struct fib_rule *rule, struct fib_lookup_arg *arg)
--
1.8.3.1
^ permalink raw reply related
* Re: [Patch net-next 1/2] net: fix a compile error when CONFIG_NET_LL_RX_POLL is not set
From: Eliezer Tamir @ 2013-08-01 6:54 UTC (permalink / raw)
To: Cong Wang; +Cc: netdev, David S. Miller
In-Reply-To: <1375326625-21427-1-git-send-email-amwang@redhat.com>
On 01/08/2013 06:10, Cong Wang wrote:
> From: Cong Wang <amwang@redhat.com>
>
> When CONFIG_NET_LL_RX_POLL is not set, I got:
>
> net/socket.c: In function ‘sock_poll’:
> net/socket.c:1165:4: error: implicit declaration of function ‘sk_busy_loop’ [-Werror=implicit-function-declaration]
>
> Fix this by adding a nop when !CONFIG_NET_LL_RX_POLL.
>
Good catch!
There is a placeholder function, but it has a typo in the name.
With all the renaming I made a mistake and called the do-nothing
function sk_busy_poll while the implemented function is called sk_busy_loop.
so what we need is to rename sk_busy_loop() into sk_busy_poll.
(sorry I'm out of the office so I can't do much more than look at the
code at the moment.)
Thanks,
Eliezer
^ permalink raw reply
* [PATCH net-next v2] ipv6: fib6_rules should return exact return value
From: Hannes Frederic Sowa @ 2013-08-01 6:54 UTC (permalink / raw)
To: netdev; +Cc: stefan.tomanek, yoshfuji
With the addition of the suppress operation
(7764a45a8f1fe74d4f7d301eaca2e558e7e2831a ("fib_rules: add .suppress
operation") we rely on accurate error reporting of the fib_rules.actions.
fib6_rule_action always returned -EAGAIN in case we could not find a
matching route and 0 if a rule was matched. This also included a match
for blackhole or prohibited rule actions which could get suppressed by
the new logic.
So adapt fib6_rule_action to always return the correct error code as
its counterpart fib4_rule_action does. This also fixes a possiblity of
nullptr-deref where we don't find a table, thus rt == NULL. Because
the condition rt != ip6_null_entry still holdes it seems we could later
get a nullptr bug on dereference rt->dst.
v2:
a) Fixed a brain fart in the commit msg (the rule => a table, etc). No
changes to the patch.
Cc: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
net/ipv6/fib6_rules.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index e64e6a5..554a4fb 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -55,26 +55,33 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,
struct fib6_table *table;
struct net *net = rule->fr_net;
pol_lookup_t lookup = arg->lookup_ptr;
+ int err = 0;
switch (rule->action) {
case FR_ACT_TO_TBL:
break;
case FR_ACT_UNREACHABLE:
+ err = -ENETUNREACH;
rt = net->ipv6.ip6_null_entry;
goto discard_pkt;
default:
case FR_ACT_BLACKHOLE:
+ err = -EINVAL;
rt = net->ipv6.ip6_blk_hole_entry;
goto discard_pkt;
case FR_ACT_PROHIBIT:
+ err = -EACCES;
rt = net->ipv6.ip6_prohibit_entry;
goto discard_pkt;
}
table = fib6_get_table(net, rule->table);
- if (table)
- rt = lookup(net, table, flp6, flags);
+ if (!table) {
+ err = -EAGAIN;
+ goto out;
+ }
+ rt = lookup(net, table, flp6, flags);
if (rt != net->ipv6.ip6_null_entry) {
struct fib6_rule *r = (struct fib6_rule *)rule;
@@ -101,6 +108,7 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,
}
again:
ip6_rt_put(rt);
+ err = -EAGAIN;
rt = NULL;
goto out;
@@ -108,7 +116,7 @@ discard_pkt:
dst_hold(&rt->dst);
out:
arg->result = rt;
- return rt == NULL ? -EAGAIN : 0;
+ return err;
}
static bool fib6_rule_suppress(struct fib_rule *rule, struct fib_lookup_arg *arg)
--
1.8.3.1
^ permalink raw reply related
* RE: [PATCH] net/phy: micrel: Add OF configuration support
From: Duan Fugang-B38611 @ 2013-08-01 6:52 UTC (permalink / raw)
To: Sean Cross
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, David Miller,
stephen@networkplumber.org, Steven Rostedt
In-Reply-To: <90629591B1A5485C845DAC6572F25924@kosagi.com>
On Thursday, August 1, 2013 at 2:23 PM, Sean Cross wrote:
>> When re-set rx/tx clock delay, rx/tx control delay, it is better to do dummy read the extended MII_KSZPHY_CLK_CONTROL_PAD_SKEW register one time.
> Can you please explain this? I don't see anything in the datasheet I'm looking at (ksz9021rl) describing dummy reads.
> If both tx and rx skew are adjusted, should there be >two dummy reads or just one?
When freescale engineers do the phy bring up, they add the dummy read. Pls refer the the patchwork: http://patchwork.ozlabs.org/patch/246616/
From ksz9021r1, there have no such condition. After I remove the dummy read, the imx6q sabrelite platform ethernet Gbps mode work fine.
For at91 micrel phy fixup, there have no dummy read: http://lists.infradead.org/pipermail/linux-arm-kernel/2013-July/183626.html
So, it just one confuse, and the dummy read is unnecessary.
^ permalink raw reply
* [PATCH][net-next] gianfar: Remove unused field grp_id from gfar_priv_grp
From: Claudiu Manoil @ 2013-08-01 7:07 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller
grp->grp_id is obsolete. It has no use in the current driver.
Remove it from gfar_priv_grp and put the 'rstat' member
in its place, in the 2nd cache line, as rstat needs fast access.
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
---
drivers/net/ethernet/freescale/gianfar.c | 1 -
drivers/net/ethernet/freescale/gianfar.h | 4 +---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 0f05b96..8bd4e39 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -593,7 +593,6 @@ static int gfar_parse_group(struct device_node *np,
return -EINVAL;
}
- grp->grp_id = priv->num_grps;
grp->priv = priv;
spin_lock_init(&grp->grplock);
if (priv->mode == MQ_MG_MODE) {
diff --git a/drivers/net/ethernet/freescale/gianfar.h b/drivers/net/ethernet/freescale/gianfar.h
index 04b552c..ee19f2c 100644
--- a/drivers/net/ethernet/freescale/gianfar.h
+++ b/drivers/net/ethernet/freescale/gianfar.h
@@ -1009,7 +1009,6 @@ struct gfar_irqinfo {
* @napi: the napi poll function
* @priv: back pointer to the priv structure
* @regs: the ioremapped register space for this group
- * @grp_id: group id for this group
* @irqinfo: TX/RX/ER irq data for this group
*/
@@ -1018,11 +1017,10 @@ struct gfar_priv_grp {
struct napi_struct napi;
struct gfar_private *priv;
struct gfar __iomem *regs;
- unsigned int grp_id;
+ unsigned int rstat;
unsigned long num_rx_queues;
unsigned long rx_bit_map;
/* cacheline 3 */
- unsigned int rstat;
unsigned int tstat;
unsigned long num_tx_queues;
unsigned long tx_bit_map;
--
1.7.11.7
^ permalink raw reply related
* [PATCH v2] Add OF bindings to Micrel PHY
From: Sean Cross @ 2013-08-01 6:53 UTC (permalink / raw)
To: Duan Fugang-B38611, netdev@vger.kernel.org,
devicetree@vger.kernel.org
Cc: David Miller, stephen@networkplumber.org, Steven Rostedt,
Sean Cross
Some boards require custom parameters be passed to the Micrel PHY.
Allow these boards to specify custom timing parameters in the device
tree node.
Changes since v1:
- removed redefinition of registers and addresses
Sean Cross (1):
net/phy: micrel: Add OF configuration support
.../devicetree/bindings/net/micrel-phy.txt | 20 ++++++++
drivers/net/phy/micrel.c | 50 ++++++++++++++++++++
2 files changed, 70 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/micrel-phy.txt
--
1.7.9.5
^ permalink raw reply
* [PATCH v2] net/phy: micrel: Add OF configuration support
From: Sean Cross @ 2013-08-01 6:53 UTC (permalink / raw)
To: Duan Fugang-B38611, netdev@vger.kernel.org,
devicetree@vger.kernel.org
Cc: David Miller, stephen@networkplumber.org, Steven Rostedt,
Sean Cross
In-Reply-To: <1375340034-23846-1-git-send-email-xobs@kosagi.com>
Some boards require custom PHY configuration, for example due to trace
length differences. Add the ability to configure these registers in
order to get the PHY to function on boards that need it.
Because PHYs are auto-detected based on MDIO device IDs, allow PHY
configuration to be specified in the parent Ethernet device node if no
PHY device node is present.
Signed-off-by: Sean Cross <xobs@kosagi.com>
---
.../devicetree/bindings/net/micrel-phy.txt | 20 ++++++++
drivers/net/phy/micrel.c | 50 ++++++++++++++++++++
2 files changed, 70 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/micrel-phy.txt
diff --git a/Documentation/devicetree/bindings/net/micrel-phy.txt b/Documentation/devicetree/bindings/net/micrel-phy.txt
new file mode 100644
index 0000000..97c1ef2
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/micrel-phy.txt
@@ -0,0 +1,20 @@
+Micrel KS8737, KSZ8041, KSZ8001, KS8721, KSZ8081, KSZ8091, KSZ8061, KSZ9021,
+KSZ9031, Ethernet PHYs, and KSZ8873MLL and KSZ886X Ethernet switches.
+
+Some boards require special tuning values, particularly when it comes to
+clock delays. You can specify clock delay values by adding
+micrel-specific properties to an Ethernet OF device node.
+
+Optional properties:
+- micrel,clk-control-pad-skew : Timing offset for the MII clock line
+- micrel,rx-data-pad-skew : Timing offset for the RX MII pad
+- micrel,tx-data-pad-skew : Timing offset for the TX MII pad
+
+Example:
+ &enet {
+ micrel,clk-control-pad-skew = <0xf0f0>;
+ micrel,rx-data-pad-skew = <0x0000>;
+ micrel,tx-data-pad-skew = <0xffff>;
+ status = "okay";
+ };
+
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 2510435..e20aeee 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -25,6 +25,7 @@
#include <linux/module.h>
#include <linux/phy.h>
#include <linux/micrel_phy.h>
+#include <linux/of.h>
/* Operation Mode Strap Override */
#define MII_KSZPHY_OMSO 0x16
@@ -53,6 +54,18 @@
#define KS8737_CTRL_INT_ACTIVE_HIGH (1 << 14)
#define KSZ8051_RMII_50MHZ_CLK (1 << 7)
+/* Write/read to/from extended registers */
+#define MII_KSZPHY_EXTREG 0x0b
+#define KSZPHY_EXTREG_WRITE 0x8000
+
+#define MII_KSZPHY_EXTREG_WRITE 0x0c
+#define MII_KSZPHY_EXTREG_READ 0x0d
+
+/* Extended registers */
+#define MII_KSZPHY_CLK_CONTROL_PAD_SKEW 0x104
+#define MII_KSZPHY_RX_DATA_PAD_SKEW 0x105
+#define MII_KSZPHY_TX_DATA_PAD_SKEW 0x106
+
static int ksz_config_flags(struct phy_device *phydev)
{
int regval;
@@ -65,6 +78,13 @@ static int ksz_config_flags(struct phy_device *phydev)
return 0;
}
+static int kszphy_extended_write(struct phy_device *phydev,
+ u32 regnum, u16 val)
+{
+ phy_write(phydev, MII_KSZPHY_EXTREG, KSZPHY_EXTREG_WRITE | regnum);
+ return phy_write(phydev, MII_KSZPHY_EXTREG_WRITE, val);
+}
+
static int kszphy_ack_interrupt(struct phy_device *phydev)
{
/* bit[7..0] int status, which is a read and clear register. */
@@ -121,6 +141,36 @@ static int ks8737_config_intr(struct phy_device *phydev)
static int kszphy_config_init(struct phy_device *phydev)
{
+ struct device *dev = &phydev->dev;
+ struct device_node *of_node = dev->of_node;
+
+ if (!of_node && dev->parent->of_node)
+ of_node = dev->parent->of_node;
+
+ if (of_node) {
+ u32 val;
+
+ if (!of_property_read_u32(of_node,
+ "micrel,clk-control-pad-skew",
+ &val))
+ kszphy_extended_write(phydev,
+ MII_KSZPHY_CLK_CONTROL_PAD_SKEW,
+ val);
+
+ if (!of_property_read_u32(of_node,
+ "micrel,rx-data-pad-skew",
+ &val))
+ kszphy_extended_write(phydev,
+ MII_KSZPHY_RX_DATA_PAD_SKEW,
+ val);
+
+ if (!of_property_read_u32(of_node,
+ "micrel,tx-data-pad-skew",
+ &val))
+ kszphy_extended_write(phydev,
+ MII_KSZPHY_TX_DATA_PAD_SKEW,
+ val);
+ }
return 0;
}
--
1.7.9.5
^ permalink raw reply related
* Re: [Patch net-next] tcp_metrics: rearrange fields to avoid holes
From: David Miller @ 2013-08-01 7:15 UTC (permalink / raw)
To: amwang; +Cc: eric.dumazet, netdev, edumazet, ycheng, ncardwell
In-Reply-To: <1375325311.7780.9.camel@cr0>
From: Cong Wang <amwang@redhat.com>
Date: Thu, 01 Aug 2013 10:48:31 +0800
> Please teach me how to do that?
struct inet_addr {
union {
u32 v4;
u32 v6[4];
};
};
ie. exactly what that code is using already.
And it's called called inetpeer_addr, we have it already, there is no
need to make something new.
Making this code use a structure with completely unnecessary and
unused members is pointless and a step backwards.
^ permalink raw reply
* Re: [Patch net-next 1/2] net: fix a compile error when CONFIG_NET_LL_RX_POLL is not set
From: David Miller @ 2013-08-01 7:18 UTC (permalink / raw)
To: amwang; +Cc: netdev, eliezer.tamir
In-Reply-To: <1375326625-21427-1-git-send-email-amwang@redhat.com>
From: Cong Wang <amwang@redhat.com>
Date: Thu, 1 Aug 2013 11:10:24 +0800
> From: Cong Wang <amwang@redhat.com>
>
> When CONFIG_NET_LL_RX_POLL is not set, I got:
>
> net/socket.c: In function ‘sock_poll’:
> net/socket.c:1165:4: error: implicit declaration of function ‘sk_busy_loop’ [-Werror=implicit-function-declaration]
>
> Fix this by adding a nop when !CONFIG_NET_LL_RX_POLL.
>
> Cc: Eliezer Tamir <eliezer.tamir@linux.intel.com>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Cong Wang <amwang@redhat.com>
Is this really a net-next specific problem? Doesn't it happen in
'net' too?
If so, it should be fixed in 'net', not just 'net-next'.
^ permalink raw reply
* Re: [PATCH net-next v2] ipv6: fib6_rules should return exact return value
From: David Miller @ 2013-08-01 7:26 UTC (permalink / raw)
To: hannes; +Cc: netdev, stefan.tomanek, yoshfuji
In-Reply-To: <20130801065447.GE3688@order.stressinduktion.org>
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
Date: Thu, 1 Aug 2013 08:54:47 +0200
> With the addition of the suppress operation
> (7764a45a8f1fe74d4f7d301eaca2e558e7e2831a ("fib_rules: add .suppress
> operation") we rely on accurate error reporting of the fib_rules.actions.
>
> fib6_rule_action always returned -EAGAIN in case we could not find a
> matching route and 0 if a rule was matched. This also included a match
> for blackhole or prohibited rule actions which could get suppressed by
> the new logic.
>
> So adapt fib6_rule_action to always return the correct error code as
> its counterpart fib4_rule_action does. This also fixes a possiblity of
> nullptr-deref where we don't find a table, thus rt == NULL. Because
> the condition rt != ip6_null_entry still holdes it seems we could later
> get a nullptr bug on dereference rt->dst.
>
> v2:
> a) Fixed a brain fart in the commit msg (the rule => a table, etc). No
> changes to the patch.
>
> Cc: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Looks good, applied, thanks.
^ permalink raw reply
* Re: [PATCH v2] mac80211: use oneshot blink API for LED triggers
From: Johannes Berg @ 2013-08-01 7:29 UTC (permalink / raw)
To: Fabio Baltieri; +Cc: John W. Linville, linux-wireless, netdev, linux-kernel
In-Reply-To: <1374746426-22030-1-git-send-email-fabio.baltieri@gmail.com>
On Thu, 2013-07-25 at 12:00 +0200, Fabio Baltieri wrote:
> Change mac80211 LED trigger code to use the generic
> led_trigger_blink_oneshot() API for transmit and receive activity
> indication.
>
> This gives a better feedback to the user, as with the new API each
> activity event results in a visible blink, while a constant traffic
> results in a continuous blink at constant rate.
Applied.
johannes
^ permalink raw reply
* Re: [Patch net-next 1/2] net: fix a compile error when CONFIG_NET_LL_RX_POLL is not set
From: Eliezer Tamir @ 2013-08-01 7:29 UTC (permalink / raw)
To: David Miller; +Cc: amwang, netdev
In-Reply-To: <20130801.001803.72283212544630263.davem@davemloft.net>
On 01/08/2013 10:18, David Miller wrote:
>> net/socket.c: In function ‘sock_poll’:
>> net/socket.c:1165:4: error: implicit declaration of function ‘sk_busy_loop’ [-Werror=implicit-function-declaration]
>>
>> Fix this by adding a nop when !CONFIG_NET_LL_RX_POLL.
>>
>> Cc: Eliezer Tamir <eliezer.tamir@linux.intel.com>
>> Cc: David S. Miller <davem@davemloft.net>
>> Signed-off-by: Cong Wang <amwang@redhat.com>
>
> Is this really a net-next specific problem? Doesn't it happen in
> 'net' too?
>
> If so, it should be fixed in 'net', not just 'net-next'.
Both issues are present in net.
And since these are bug fixes, IMHO both patches should go to net.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox