* Re: [PATCH v5] rfs: Receive Flow Steering
From: Eric Dumazet @ 2010-04-19 20:32 UTC (permalink / raw)
To: David Miller; +Cc: therbert, netdev
In-Reply-To: <20100419.132318.192086187.davem@davemloft.net>
Le lundi 19 avril 2010 à 13:23 -0700, David Miller a écrit :
> From: David Miller <davem@davemloft.net>
> Date: Mon, 19 Apr 2010 13:09:05 -0700 (PDT)
>
> > net-next-2.6 + Eric's port hashing patch, rps_cpus="ffffffff,ffffffff,ffffffff,ffffffff"
> >
> > tbench 64: Throughput 1593.13 MB/sec 64 procs
> > tbench 128: Throughput 2367.27 MB/sec 128 procs
>
> Eric, I think there is agreement that your patch is not a bad idea.
>
> Your original posting had whitespace damange in the patch plus I want
> to see a proper commit message and signoff, so could you please submit
> this formally?
Hmm, this was not a formal patch, just an information.
Problem is if hardware provides rxhash, will it be "consistent" too ?
^ permalink raw reply
* [PATCH] 8139too: Fix a typo in the function name.
From: Alexander Kuznetsov @ 2010-04-19 20:43 UTC (permalink / raw)
To: davem; +Cc: netdev, Alexander Kuznetsov
Signed-off-by: Alexander Kuznetsov <alr.kuznetsov@gmail.com>
---
drivers/net/8139too.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index a03d291..f0d23de 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -1944,7 +1944,7 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,
netif_dbg(tp, rx_status, dev, "%s() status %04x, size %04x, cur %04x\n",
__func__, rx_status, rx_size, cur_rx);
#if RTL8139_DEBUG > 2
- print_dump_hex(KERN_DEBUG, "Frame contents: ",
+ print_hex_dump(KERN_DEBUG, "Frame contents: ",
DUMP_PREFIX_OFFSET, 16, 1,
&rx_ring[ring_offset], 70, true);
#endif
--
1.6.4.4
^ permalink raw reply related
* Re: tip: origin tree build failure, [patch] fix isdn/gigaset build failure
From: Ingo Molnar @ 2010-04-19 21:01 UTC (permalink / raw)
To: David Miller; +Cc: torvalds, tilman, akpm, netdev, linux-kernel
In-Reply-To: <20100419.120600.82034948.davem@davemloft.net>
* David Miller <davem@davemloft.net> wrote:
> From: Linus Torvalds <torvalds@linux-foundation.org>
> Date: Mon, 19 Apr 2010 12:00:49 -0700 (PDT)
>
> > On Mon, 19 Apr 2010, Linus Torvalds wrote:
> >>
> >> Maybe add the #include <linux/sched.h> into gigaset.h, instead of
> >> common.c?
> >
> > This compiled for me, although the only thing I tried was just turning all
> > the gigaset options to 'y'. Maybe some other config doesn't work. So I
> > committed it as likely to fix things.
>
> Thanks Linus.
>
> Ingo, let us know if there is still some problems in your
> build tests.
I did a few tests and it looks good here!
Thanks,
Ingo
^ permalink raw reply
* Re: [PATCH] gianfar: Wait for both RX and TX to stop
From: Timur Tabi @ 2010-04-19 21:08 UTC (permalink / raw)
To: Andy Fleming; +Cc: davem, netdev
In-Reply-To: <1271632401-2472-1-git-send-email-afleming@freescale.com>
On Sun, Apr 18, 2010 at 6:13 PM, Andy Fleming <afleming@freescale.com> wrote:
> - while (!(gfar_read(®s->ievent) &
> - (IEVENT_GRSC | IEVENT_GTSC)))
> + while ((gfar_read(®s->ievent) &
> + (IEVENT_GRSC | IEVENT_GTSC)) !=
> + (IEVENT_GRSC | IEVENT_GTSC))
> cpu_relax();
How about using spin_event_timeout()? It streamlines this process and
includes a timeout.
The U-Boot version of this code doesn't have a timeout either, but
spin_event_timeout() is not available in U-Boot.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* Re: [PATCH] 8139too: Fix a typo in the function name.
From: David Miller @ 2010-04-19 21:17 UTC (permalink / raw)
To: alr.kuznetsov; +Cc: netdev
In-Reply-To: <1271709817-11169-1-git-send-email-alr.kuznetsov@gmail.com>
From: Alexander Kuznetsov <alr.kuznetsov@gmail.com>
Date: Mon, 19 Apr 2010 23:43:37 +0300
> Signed-off-by: Alexander Kuznetsov <alr.kuznetsov@gmail.com>
Applied, thank you.
^ permalink raw reply
* Re: [PATCH v5] rfs: Receive Flow Steering
From: David Miller @ 2010-04-19 21:19 UTC (permalink / raw)
To: eric.dumazet; +Cc: therbert, netdev
In-Reply-To: <1271709121.3845.94.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 19 Apr 2010 22:32:01 +0200
> Hmm, this was not a formal patch, just an information.
>
> Problem is if hardware provides rxhash, will it be "consistent" too ?
Yes, it is an issue. I am not aware of whether the Toeplitz
hash computed by cards is impervious to the order of the
input bits of not, probably it is.
I was thinking also about how we could compute rxhash in the
loopback driver :-)
^ permalink raw reply
* [PATCH net-next-2.6] rps: static functions
From: Eric Dumazet @ 2010-04-19 21:26 UTC (permalink / raw)
To: David Miller; +Cc: netdev
store_rps_map() & store_rps_dev_flow_table_cnt() are static.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 143052a..c57c4b2 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -550,7 +550,7 @@ static void rps_map_release(struct rcu_head *rcu)
kfree(map);
}
-ssize_t store_rps_map(struct netdev_rx_queue *queue,
+static ssize_t store_rps_map(struct netdev_rx_queue *queue,
struct rx_queue_attribute *attribute,
const char *buf, size_t len)
{
@@ -635,7 +635,7 @@ static void rps_dev_flow_table_release(struct rcu_head *rcu)
schedule_work(&table->free_work);
}
-ssize_t store_rps_dev_flow_table_cnt(struct netdev_rx_queue *queue,
+static ssize_t store_rps_dev_flow_table_cnt(struct netdev_rx_queue *queue,
struct rx_queue_attribute *attr,
const char *buf, size_t len)
{
^ permalink raw reply related
* Re: [net-next PATCH 0/2] iovnl netlink ops + enic dynamic vnics
From: Chris Wright @ 2010-04-19 21:35 UTC (permalink / raw)
To: Scott Feldman; +Cc: davem, netdev, chrisw
In-Reply-To: <20100419191425.10423.88005.stgit@savbu-pc100.cisco.com>
* Scott Feldman (scofeldm@cisco.com) wrote:
> Patch 1/2 adds new I/O Virtualization netlink ops:
>
> IOV netlink (IOVNL) adds I/O Virtualization control support to a master
> device (MD) netdev interface. The MD (e.g. SR-IOV PF) will set/get
> control settings on behalf of a slave netdevice (e.g. SR-IOV VF). The
> design allows for the case where master and slave are the
> same netdev interface.
>
> The ops currently defined are:
> set_mac_vlan: set mac+vlan on VF
> set_port_profile: set port-profile on VF
> unset_port_profile: unset port-profile on VF
>
> Patch 2/2 adds IOV netlink ops support to enic dynamic vnics:
>
> Add enic iovnl ops to support setting port-profile for dynamic vnics. Enic
> dynamic vnics are just like normal enic eth vnics except dynamic vnics require
> an extra configuration step to assign a port-profile identifier to the
> interface before the interface is useable. Once assigned, link comes up
> on the interface and is ready for I/O. The port-profile is used to configure
> the network port assigned to the interface. The network port configuration
> includes VLAN membership, QoS policies, and port security settings typical
> of a data center network.
Note that while these just enable enic, the framework should be generic
enough for other drivers and can deliver all the way to userspace daemon
for the case of VSI Discovery Protocol.
thanks,
-chris
^ permalink raw reply
* Re: [PATCH net-next-2.6] rps: static functions
From: David Miller @ 2010-04-19 21:41 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
In-Reply-To: <1271712395.3845.98.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 19 Apr 2010 23:26:35 +0200
> store_rps_map() & store_rps_dev_flow_table_cnt() are static.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks Eric.
^ permalink raw reply
* Re: tip: origin tree build failure, [patch] fix isdn/gigaset build failure
From: Tilman Schmidt @ 2010-04-19 21:52 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Ingo Molnar, David Miller, akpm, netdev, linux-kernel
In-Reply-To: <alpine.LFD.2.00.1004191112550.14500@i5.linux-foundation.org>
[-- Attachment #1: Type: text/plain, Size: 1422 bytes --]
Am 19.04.2010 20:14 schrieb Linus Torvalds:
> Maybe add the #include <linux/sched.h> into gigaset.h, instead of
> common.c?
Yes, that's the correct fix. Thanks a lot!
For the record, the cause of the build failure was my removal of
#include <linux/usb.h> from gigaset.h, entailing the loss of one
indirect inclusion of sched.h. There's another indirect inclusion
of sched.h from gigaset.h via interrupt.h, hardirq.h and
smp_lock.h, but that one only operates if CONFIG_PREEMPT is set.
So the reason I did not see the build failure myself was that I
only tested with CONFIG_PREEMPT=y.
> ---
> drivers/isdn/gigaset/gigaset.h | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h
> index d32efb6..05947f9 100644
> --- a/drivers/isdn/gigaset/gigaset.h
> +++ b/drivers/isdn/gigaset/gigaset.h
> @@ -20,6 +20,7 @@
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
> #include <linux/kernel.h>
> +#include <linux/sched.h>
> #include <linux/compiler.h>
> #include <linux/types.h>
> #include <linux/ctype.h>
Acked-by: Tilman Schmidt <tilman@imap.cc>
in case it still matters.
Thanks again,
Tilman
--
Tilman Schmidt E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
^ permalink raw reply
* Re: [PATCH v3 0/3] e1000e,igb,ixgbe: add registers etc. printout code just before resetting adapters
From: Jeff Kirsher @ 2010-04-19 22:44 UTC (permalink / raw)
To: Taku Izumi
Cc: Bruce Allan, David S. Miller, Jesse Brandeburg, John Ronciak,
netdev@vger.kernel.org, PJ Waskiewicz, Kenji Kaneshige, chavey
In-Reply-To: <4BCC3C9B.3000901@jp.fujitsu.com>
2010/4/19 Taku Izumi <izumi.taku@jp.fujitsu.com>:
> Hi Jeff,
>
> This patchset is the update version of "register etc. printout code" patch.
> The old ones are
> http://kerneltrap.org/mailarchive/linux-netdev/2010/1/7/6265865
> http://kerneltrap.org/mailarchive/linux-netdev/2010/1/22/6267176
>
> v2 -> v3:
> - avoid modifying headers
> - delete "dump_flag" module parameter and use msglvl instead.
>
> To enable the printout, it is necessary to specify msglvl like the following.
> # ethtool -s eth0 msglvl 0x2003
>
> Best regards,
> Taku Izumi
>
Thank you Taku. I have added the series of patches to my queue of
patches destined for net-next.
--
Cheers,
Jeff
^ permalink raw reply
* [PATCH] rndis_host: Poll status channel before control channel
From: Ben Hutchings @ 2010-04-19 23:08 UTC (permalink / raw)
To: David Brownell, David Miller, John Carr
Cc: netdev, Mark Glassberg, Herton Ronaldo Krzesinski
Some RNDIS devices don't respond on the control channel until polled
on the status channel. In particular, this was reported to be the
case for the 2Wire HomePortal 1000SW.
This is roughly based on a patch by John Carr <john.carr@unrouted.co.uk>
which is reported to be needed for use with some Windows Mobile devices
and which is currently applied by Mandriva.
Reported-by: Mark Glassberg <vzeeaxwl@myfairpoint.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Tested-by: Mark Glassberg <vzeeaxwl@myfairpoint.net>
---
Note that this change hasn't yet been tested with any other RNDIS
devices. John, can you confirm whether this also handles the WinMob
devices?
Ben.
drivers/net/usb/rndis_host.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index f56dec6..52faca1 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -103,8 +103,10 @@ static void rndis_msg_indicate(struct usbnet *dev, struct rndis_indicate *msg,
int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen)
{
struct cdc_state *info = (void *) &dev->data;
+ struct usb_cdc_notification notification;
int master_ifnum;
int retval;
+ int partial;
unsigned count;
__le32 rsp;
u32 xid = 0, msg_len, request_id;
@@ -132,13 +134,17 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen)
if (unlikely(retval < 0 || xid == 0))
return retval;
- // FIXME Seems like some devices discard responses when
- // we time out and cancel our "get response" requests...
- // so, this is fragile. Probably need to poll for status.
+ /* Some devices don't respond on the control channel until
+ * polled on the status channel, so do that first. */
+ retval = usb_interrupt_msg(
+ dev->udev,
+ usb_rcvintpipe(dev->udev, dev->status->desc.bEndpointAddress),
+ ¬ification, sizeof(notification), &partial,
+ RNDIS_CONTROL_TIMEOUT_MS);
+ if (unlikely(retval < 0))
+ return retval;
- /* ignore status endpoint, just poll the control channel;
- * the request probably completed immediately
- */
+ /* Poll the control channel; the request probably completed immediately */
rsp = buf->msg_type | RNDIS_MSG_COMPLETION;
for (count = 0; count < 10; count++) {
memset(buf, 0, CONTROL_BUFFER_SIZE);
--
1.7.0.3
^ permalink raw reply related
* [PATCHv2 1/7] X25: Add if_x25.h and x25 to device identifiers
From: Andrew Hendry @ 2010-04-19 23:28 UTC (permalink / raw)
To: netdev
V2 Feedback from John Hughes.
- Add header for userspace implementations such as xot/xoe to use
- Use explicit values for interface stability
- No changes to driver patches
V1
- Use identifiers instead of magic numbers for X25 layer 3 to device interface.
- Also fixed checkpatch notes on updated code.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
---
include/linux/if_x25.h | 26 ++++++++++++++++++++++++++
include/net/x25device.h | 1 +
net/x25/x25_dev.c | 36 ++++++++++++++++++++----------------
3 files changed, 47 insertions(+), 16 deletions(-)
create mode 100644 include/linux/if_x25.h
diff --git a/include/linux/if_x25.h b/include/linux/if_x25.h
new file mode 100644
index 0000000..897765f
--- /dev/null
+++ b/include/linux/if_x25.h
@@ -0,0 +1,26 @@
+/*
+ * Linux X.25 packet to device interface
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _IF_X25_H
+#define _IF_X25_H
+
+#include <linux/types.h>
+
+/* Documentation/networking/x25-iface.txt */
+#define X25_IFACE_DATA 0x00
+#define X25_IFACE_CONNECT 0x01
+#define X25_IFACE_DISCONNECT 0x02
+#define X25_IFACE_PARAMS 0x03
+
+#endif /* _IF_X25_H */
diff --git a/include/net/x25device.h b/include/net/x25device.h
index 1415bcf..1fa08b4 100644
--- a/include/net/x25device.h
+++ b/include/net/x25device.h
@@ -3,6 +3,7 @@
#include <linux/if_ether.h>
#include <linux/if_packet.h>
+#include <linux/if_x25.h>
#include <linux/skbuff.h>
static inline __be16 x25_type_trans(struct sk_buff *skb, struct net_device *dev)
diff --git a/net/x25/x25_dev.c b/net/x25/x25_dev.c
index b9ef682..9005f6d 100644
--- a/net/x25/x25_dev.c
+++ b/net/x25/x25_dev.c
@@ -24,6 +24,7 @@
#include <net/sock.h>
#include <linux/if_arp.h>
#include <net/x25.h>
+#include <net/x25device.h>
static int x25_receive_data(struct sk_buff *skb, struct x25_neigh *nb)
{
@@ -115,19 +116,22 @@ int x25_lapb_receive_frame(struct sk_buff *skb, struct net_device *dev,
}
switch (skb->data[0]) {
- case 0x00:
- skb_pull(skb, 1);
- if (x25_receive_data(skb, nb)) {
- x25_neigh_put(nb);
- goto out;
- }
- break;
- case 0x01:
- x25_link_established(nb);
- break;
- case 0x02:
- x25_link_terminated(nb);
- break;
+
+ case X25_IFACE_DATA:
+ skb_pull(skb, 1);
+ if (x25_receive_data(skb, nb)) {
+ x25_neigh_put(nb);
+ goto out;
+ }
+ break;
+
+ case X25_IFACE_CONNECT:
+ x25_link_established(nb);
+ break;
+
+ case X25_IFACE_DISCONNECT:
+ x25_link_terminated(nb);
+ break;
}
x25_neigh_put(nb);
drop:
@@ -148,7 +152,7 @@ void x25_establish_link(struct x25_neigh *nb)
return;
}
ptr = skb_put(skb, 1);
- *ptr = 0x01;
+ *ptr = X25_IFACE_CONNECT;
break;
#if defined(CONFIG_LLC) || defined(CONFIG_LLC_MODULE)
@@ -184,7 +188,7 @@ void x25_terminate_link(struct x25_neigh *nb)
}
ptr = skb_put(skb, 1);
- *ptr = 0x02;
+ *ptr = X25_IFACE_DISCONNECT;
skb->protocol = htons(ETH_P_X25);
skb->dev = nb->dev;
@@ -200,7 +204,7 @@ void x25_send_frame(struct sk_buff *skb, struct x25_neigh *nb)
switch (nb->dev->type) {
case ARPHRD_X25:
dptr = skb_push(skb, 1);
- *dptr = 0x00;
+ *dptr = X25_IFACE_DATA;
break;
#if defined(CONFIG_LLC) || defined(CONFIG_LLC_MODULE)
--
1.5.6.5
^ permalink raw reply related
* [PATCHv2 2/7] X25: Use identifiers for isdn device to x25 interface
From: Andrew Hendry @ 2010-04-19 23:29 UTC (permalink / raw)
To: netdev, isdn
Change magic numbers to identifiers for X25 interface.
also minor check patch formatting.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Acked-by: Karsten Keil <isdn@linux-pingi.de>
---
drivers/isdn/i4l/isdn_x25iface.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/isdn/i4l/isdn_x25iface.c b/drivers/isdn/i4l/isdn_x25iface.c
index efcf1f9..fd10d7c 100644
--- a/drivers/isdn/i4l/isdn_x25iface.c
+++ b/drivers/isdn/i4l/isdn_x25iface.c
@@ -194,7 +194,7 @@ static int isdn_x25iface_receive(struct concap_proto *cprot, struct sk_buff *skb
if ( ( (ix25_pdata_t*) (cprot->proto_data) )
-> state == WAN_CONNECTED ){
if( skb_push(skb, 1)){
- skb -> data[0]=0x00;
+ skb->data[0] = X25_IFACE_DATA;
skb->protocol = x25_type_trans(skb, cprot->net_dev);
netif_rx(skb);
return 0;
@@ -224,7 +224,7 @@ static int isdn_x25iface_connect_ind(struct concap_proto *cprot)
skb = dev_alloc_skb(1);
if( skb ){
- *( skb_put(skb, 1) ) = 0x01;
+ *(skb_put(skb, 1)) = X25_IFACE_CONNECT;
skb->protocol = x25_type_trans(skb, cprot->net_dev);
netif_rx(skb);
return 0;
@@ -253,7 +253,7 @@ static int isdn_x25iface_disconn_ind(struct concap_proto *cprot)
*state_p = WAN_DISCONNECTED;
skb = dev_alloc_skb(1);
if( skb ){
- *( skb_put(skb, 1) ) = 0x02;
+ *(skb_put(skb, 1)) = X25_IFACE_DISCONNECT;
skb->protocol = x25_type_trans(skb, cprot->net_dev);
netif_rx(skb);
return 0;
@@ -272,9 +272,10 @@ static int isdn_x25iface_xmit(struct concap_proto *cprot, struct sk_buff *skb)
unsigned char firstbyte = skb->data[0];
enum wan_states *state = &((ix25_pdata_t*)cprot->proto_data)->state;
int ret = 0;
- IX25DEBUG( "isdn_x25iface_xmit: %s first=%x state=%d \n", MY_DEVNAME(cprot -> net_dev), firstbyte, *state );
+ IX25DEBUG("isdn_x25iface_xmit: %s first=%x state=%d\n",
+ MY_DEVNAME(cprot->net_dev), firstbyte, *state);
switch ( firstbyte ){
- case 0x00: /* dl_data request */
+ case X25_IFACE_DATA:
if( *state == WAN_CONNECTED ){
skb_pull(skb, 1);
cprot -> net_dev -> trans_start = jiffies;
@@ -285,7 +286,7 @@ static int isdn_x25iface_xmit(struct concap_proto *cprot, struct sk_buff *skb)
}
illegal_state_warn( *state, firstbyte );
break;
- case 0x01: /* dl_connect request */
+ case X25_IFACE_CONNECT:
if( *state == WAN_DISCONNECTED ){
*state = WAN_CONNECTING;
ret = cprot -> dops -> connect_req(cprot);
@@ -298,7 +299,7 @@ static int isdn_x25iface_xmit(struct concap_proto *cprot, struct sk_buff *skb)
illegal_state_warn( *state, firstbyte );
}
break;
- case 0x02: /* dl_disconnect request */
+ case X25_IFACE_DISCONNECT:
switch ( *state ){
case WAN_DISCONNECTED:
/* Should not happen. However, give upper layer a
@@ -318,7 +319,7 @@ static int isdn_x25iface_xmit(struct concap_proto *cprot, struct sk_buff *skb)
illegal_state_warn( *state, firstbyte );
}
break;
- case 0x03: /* changing lapb parameters requested */
+ case X25_IFACE_PARAMS:
printk(KERN_WARNING "isdn_x25iface_xmit: setting of lapb"
" options not yet supported\n");
break;
--
1.5.6.5
^ permalink raw reply related
* [PATCHv2 3/7] X25: Use identifiers for x25 async device to x25 interface
From: Andrew Hendry @ 2010-04-19 23:29 UTC (permalink / raw)
To: netdev
Change magic numbers to identifiers for X25 interface.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
---
drivers/net/wan/x25_asy.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index 80d5c58..166e77d 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -29,12 +29,12 @@
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/if_arp.h>
-#include <linux/x25.h>
#include <linux/lapb.h>
#include <linux/init.h>
#include <linux/rtnetlink.h>
#include <linux/compat.h>
#include <linux/slab.h>
+#include <net/x25device.h>
#include "x25_asy.h"
#include <net/x25device.h>
@@ -315,15 +315,15 @@ static netdev_tx_t x25_asy_xmit(struct sk_buff *skb,
}
switch (skb->data[0]) {
- case 0x00:
+ case X25_IFACE_DATA:
break;
- case 0x01: /* Connection request .. do nothing */
+ case X25_IFACE_CONNECT: /* Connection request .. do nothing */
err = lapb_connect_request(dev);
if (err != LAPB_OK)
printk(KERN_ERR "x25_asy: lapb_connect_request error - %d\n", err);
kfree_skb(skb);
return NETDEV_TX_OK;
- case 0x02: /* Disconnect request .. do nothing - hang up ?? */
+ case X25_IFACE_DISCONNECT: /* do nothing - hang up ?? */
err = lapb_disconnect_request(dev);
if (err != LAPB_OK)
printk(KERN_ERR "x25_asy: lapb_disconnect_request error - %d\n", err);
@@ -411,7 +411,7 @@ static void x25_asy_connected(struct net_device *dev, int reason)
}
ptr = skb_put(skb, 1);
- *ptr = 0x01;
+ *ptr = X25_IFACE_CONNECT;
skb->protocol = x25_type_trans(skb, sl->dev);
netif_rx(skb);
@@ -430,7 +430,7 @@ static void x25_asy_disconnected(struct net_device *dev, int reason)
}
ptr = skb_put(skb, 1);
- *ptr = 0x02;
+ *ptr = X25_IFACE_DISCONNECT;
skb->protocol = x25_type_trans(skb, sl->dev);
netif_rx(skb);
--
1.5.6.5
^ permalink raw reply related
* [PATCHv2 7/7] X25: Update X25 interface documentation
From: Andrew Hendry @ 2010-04-19 23:30 UTC (permalink / raw)
To: netdev
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
---
Documentation/networking/x25-iface.txt | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Documentation/networking/x25-iface.txt b/Documentation/networking/x25-iface.txt
index 975cc87..78f662e 100644
--- a/Documentation/networking/x25-iface.txt
+++ b/Documentation/networking/x25-iface.txt
@@ -20,23 +20,23 @@ the rest of the skbuff, if any more information does exist.
Packet Layer to Device Driver
-----------------------------
-First Byte = 0x00
+First Byte = 0x00 (X25_IFACE_DATA)
This indicates that the rest of the skbuff contains data to be transmitted
over the LAPB link. The LAPB link should already exist before any data is
passed down.
-First Byte = 0x01
+First Byte = 0x01 (X25_IFACE_CONNECT)
Establish the LAPB link. If the link is already established then the connect
confirmation message should be returned as soon as possible.
-First Byte = 0x02
+First Byte = 0x02 (X25_IFACE_DISCONNECT)
Terminate the LAPB link. If it is already disconnected then the disconnect
confirmation message should be returned as soon as possible.
-First Byte = 0x03
+First Byte = 0x03 (X25_IFACE_PARAMS)
LAPB parameters. To be defined.
@@ -44,22 +44,22 @@ LAPB parameters. To be defined.
Device Driver to Packet Layer
-----------------------------
-First Byte = 0x00
+First Byte = 0x00 (X25_IFACE_DATA)
This indicates that the rest of the skbuff contains data that has been
received over the LAPB link.
-First Byte = 0x01
+First Byte = 0x01 (X25_IFACE_CONNECT)
LAPB link has been established. The same message is used for both a LAPB
link connect_confirmation and a connect_indication.
-First Byte = 0x02
+First Byte = 0x02 (X25_IFACE_DISCONNECT)
LAPB link has been terminated. This same message is used for both a LAPB
link disconnect_confirmation and a disconnect_indication.
-First Byte = 0x03
+First Byte = 0x03 (X25_IFACE_PARAMS)
LAPB parameters. To be defined.
--
1.5.6.5
^ permalink raw reply related
* [PATCHv2 5/7] X25: Use identifiers for cyclades device to x25 interface
From: Andrew Hendry @ 2010-04-19 23:30 UTC (permalink / raw)
To: netdev, acme
Change magic numbers to identifiers for X25 interface.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
---
drivers/net/wan/cycx_x25.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c
index cd8cb95..cf9e15f 100644
--- a/drivers/net/wan/cycx_x25.c
+++ b/drivers/net/wan/cycx_x25.c
@@ -634,11 +634,12 @@ static netdev_tx_t cycx_netdevice_hard_start_xmit(struct sk_buff *skb,
}
} else { /* chan->protocol == ETH_P_X25 */
switch (skb->data[0]) {
- case 0: break;
- case 1: /* Connect request */
+ case X25_IFACE_DATA:
+ break;
+ case X25_IFACE_CONNECT:
cycx_x25_chan_connect(dev);
goto free_packet;
- case 2: /* Disconnect request */
+ case X25_IFACE_DISCONNECT:
cycx_x25_chan_disconnect(dev);
goto free_packet;
default:
@@ -1406,7 +1407,8 @@ static void cycx_x25_set_chan_state(struct net_device *dev, u8 state)
reset_timer(dev);
if (chan->protocol == ETH_P_X25)
- cycx_x25_chan_send_event(dev, 1);
+ cycx_x25_chan_send_event(dev,
+ X25_IFACE_CONNECT);
break;
case WAN_CONNECTING:
@@ -1424,7 +1426,8 @@ static void cycx_x25_set_chan_state(struct net_device *dev, u8 state)
}
if (chan->protocol == ETH_P_X25)
- cycx_x25_chan_send_event(dev, 2);
+ cycx_x25_chan_send_event(dev,
+ X25_IFACE_DISCONNECT);
netif_wake_queue(dev);
break;
--
1.5.6.5
^ permalink raw reply related
* [PATCHv2 4/7] X25: Use identifiers for lapbether device to x25 interface
From: Andrew Hendry @ 2010-04-19 23:30 UTC (permalink / raw)
To: netdev
Change magic numbers to identifiers for X25 interface.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
---
drivers/net/wan/lapbether.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index 98e2f99..4d4dc38 100644
--- a/drivers/net/wan/lapbether.c
+++ b/drivers/net/wan/lapbether.c
@@ -139,7 +139,7 @@ static int lapbeth_data_indication(struct net_device *dev, struct sk_buff *skb)
return NET_RX_DROP;
ptr = skb->data;
- *ptr = 0x00;
+ *ptr = X25_IFACE_DATA;
skb->protocol = x25_type_trans(skb, dev);
return netif_rx(skb);
@@ -161,14 +161,14 @@ static netdev_tx_t lapbeth_xmit(struct sk_buff *skb,
goto drop;
switch (skb->data[0]) {
- case 0x00:
+ case X25_IFACE_DATA:
break;
- case 0x01:
+ case X25_IFACE_CONNECT:
if ((err = lapb_connect_request(dev)) != LAPB_OK)
printk(KERN_ERR "lapbeth: lapb_connect_request "
"error: %d\n", err);
goto drop;
- case 0x02:
+ case X25_IFACE_DISCONNECT:
if ((err = lapb_disconnect_request(dev)) != LAPB_OK)
printk(KERN_ERR "lapbeth: lapb_disconnect_request "
"err: %d\n", err);
@@ -225,7 +225,7 @@ static void lapbeth_connected(struct net_device *dev, int reason)
}
ptr = skb_put(skb, 1);
- *ptr = 0x01;
+ *ptr = X25_IFACE_CONNECT;
skb->protocol = x25_type_trans(skb, dev);
netif_rx(skb);
@@ -242,7 +242,7 @@ static void lapbeth_disconnected(struct net_device *dev, int reason)
}
ptr = skb_put(skb, 1);
- *ptr = 0x02;
+ *ptr = X25_IFACE_DISCONNECT;
skb->protocol = x25_type_trans(skb, dev);
netif_rx(skb);
--
1.5.6.5
^ permalink raw reply related
* [PATCHv2 6/7] X25: Use identifiers for hdlc x25 device to x25 interface
From: Andrew Hendry @ 2010-04-19 23:30 UTC (permalink / raw)
To: netdev, khc
Change magic numbers to identifiers for X25 interface.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
---
drivers/net/wan/hdlc_x25.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c
index c7adbb7..70527e5 100644
--- a/drivers/net/wan/hdlc_x25.c
+++ b/drivers/net/wan/hdlc_x25.c
@@ -49,14 +49,14 @@ static void x25_connect_disconnect(struct net_device *dev, int reason, int code)
static void x25_connected(struct net_device *dev, int reason)
{
- x25_connect_disconnect(dev, reason, 1);
+ x25_connect_disconnect(dev, reason, X25_IFACE_CONNECT);
}
static void x25_disconnected(struct net_device *dev, int reason)
{
- x25_connect_disconnect(dev, reason, 2);
+ x25_connect_disconnect(dev, reason, X25_IFACE_DISCONNECT);
}
@@ -71,7 +71,7 @@ static int x25_data_indication(struct net_device *dev, struct sk_buff *skb)
return NET_RX_DROP;
ptr = skb->data;
- *ptr = 0;
+ *ptr = X25_IFACE_DATA;
skb->protocol = x25_type_trans(skb, dev);
return netif_rx(skb);
@@ -94,13 +94,13 @@ static netdev_tx_t x25_xmit(struct sk_buff *skb, struct net_device *dev)
/* X.25 to LAPB */
switch (skb->data[0]) {
- case 0: /* Data to be transmitted */
+ case X25_IFACE_DATA: /* Data to be transmitted */
skb_pull(skb, 1);
if ((result = lapb_data_request(dev, skb)) != LAPB_OK)
dev_kfree_skb(skb);
return NETDEV_TX_OK;
- case 1:
+ case X25_IFACE_CONNECT:
if ((result = lapb_connect_request(dev))!= LAPB_OK) {
if (result == LAPB_CONNECTED)
/* Send connect confirm. msg to level 3 */
@@ -112,7 +112,7 @@ static netdev_tx_t x25_xmit(struct sk_buff *skb, struct net_device *dev)
}
break;
- case 2:
+ case X25_IFACE_DISCONNECT:
if ((result = lapb_disconnect_request(dev)) != LAPB_OK) {
if (result == LAPB_NOTCONNECTED)
/* Send disconnect confirm. msg to level 3 */
--
1.5.6.5
^ permalink raw reply related
* Re: [PATCH v5] rfs: Receive Flow Steering
From: Changli Gao @ 2010-04-19 23:38 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, therbert, netdev
In-Reply-To: <1271709121.3845.94.camel@edumazet-laptop>
On Tue, Apr 20, 2010 at 4:32 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> Hmm, this was not a formal patch, just an information.
>
> Problem is if hardware provides rxhash, will it be "consistent" too ?
>
>
Does this problem has relationship with your patch? No. If the rxhash
isn't provided by hardware, we can get more throughput from you patch,
and on the other side, we don't lose anything but potential more hash
collision.
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply
* Re: [PATCH net-next-2.6] rps: shortcut net_rps_action()
From: Changli Gao @ 2010-04-19 23:56 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, Tom Herbert, netdev
In-Reply-To: <1271689653.3845.73.camel@edumazet-laptop>
On Mon, Apr 19, 2010 at 11:07 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> +
> + /* Send pending IPI's to kick RPS processing on remote cpus. */
> + while (remqueue) {
> + struct softnet_data *next = remqueue->rps_ipi_next;
> + if (cpu_online(remqueue->cpu))
> + __smp_call_function_single(remqueue->cpu,
> + &remqueue->csd, 0);
> + remqueue = next;
> + }
It seems you prefetch rps_ipi_next. I think it isn't necessary, as the
list should be short. If you insist on this, is the macro prefetch()
better?
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply
* Re: [PATCH net-next-2.6] rps: shortcut net_rps_action()
From: Changli Gao @ 2010-04-20 0:32 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, Tom Herbert, netdev
In-Reply-To: <n2y412e6f7f1004191656qd53a8d77occ407ac288c53bbc@mail.gmail.com>
On Tue, Apr 20, 2010 at 7:56 AM, Changli Gao <xiaosuo@gmail.com> wrote:
>
> It seems you prefetch rps_ipi_next. I think it isn't necessary, as the
> list should be short. If you insist on this, is the macro prefetch()
> better?
Oh, I read the code again and got the answer. After the IPI is sent,
this softnet will be queued by the other CPUs. We prefetch the pointer
rps_ipi_next to avoid this race condition.
Sorry for noise :)
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply
* Re: 2.6.34-rc5: Reported regressions from 2.6.33
From: Andrew Morton @ 2010-04-20 0:57 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux Kernel Mailing List, Maciej Rutecki, Linus Torvalds,
Kernel Testers List, Network Development, Linux ACPI,
Linux PM List, Linux SCSI List, Linux Wireless List, DRI
In-Reply-To: <deuQKFRcc0B.A.3EG.BRSzLB@tosh>
On Tue, 20 Apr 2010 05:15:57 +0200 (CEST) "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=15812
> Subject : utsname.domainname not set in x86_32 processes (causing "YPBINDPROC_DOMAIN: domain not bound" errors)
> Submitter : <adi@hexapodia.org>
> Date : 2010-04-19 21:28 (1 days old)
I merged hch's fix for this twelve seconds ago.
^ permalink raw reply
* [PATCH] cxgb3: fix linkup issue
From: Hiroshi Shimamoto @ 2010-04-20 1:32 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel@vger.kernel.org
From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
I encountered an issue that not to link up on cxgb3 fabric.
I bisected and found that this regression was introduced by
0f07c4ee8c800923ae7918c231532a9256233eed.
Correct to pass phy_addr to cphy_init() at t3_xaui_direct_phy_prep().
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
---
drivers/net/cxgb3/ael1002.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/cxgb3/ael1002.c b/drivers/net/cxgb3/ael1002.c
index 5248f9e..35cd367 100644
--- a/drivers/net/cxgb3/ael1002.c
+++ b/drivers/net/cxgb3/ael1002.c
@@ -934,7 +934,7 @@ static struct cphy_ops xaui_direct_ops = {
int t3_xaui_direct_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops)
{
- cphy_init(phy, adapter, MDIO_PRTAD_NONE, &xaui_direct_ops, mdio_ops,
+ cphy_init(phy, adapter, phy_addr, &xaui_direct_ops, mdio_ops,
SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_TP,
"10GBASE-CX4");
return 0;
--
1.6.3.3
^ permalink raw reply related
* RE: [RFC][PATCH v2 0/3] Provide a zero-copy method on KVM virtio-net.
From: Xin, Xiaohui @ 2010-04-20 2:21 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: netdev@vger.kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, mingo@elte.hu,
jdike@linux.intel.com, davem@davemloft.net
In-Reply-To: <20100419102118.GA16198@redhat.com>
Michael,
>>>>>> What we have not done yet:
>>>>>> packet split support
>>>>>>
>>>>>What does this mean, exactly?
>>>> We can support 1500MTU, but for jumbo frame, since vhost driver before don't
>>>>support mergeable buffer, we cannot try it for multiple sg.
>>>>
>>>I do not see why, vhost currently supports 64K buffers with indirect
>>>descriptors.
>>>
>> The receive_skb() in guest virtio-net driver will merge the multiple sg to skb frags, how >>can indirect descriptors to that?
>See add_recvbuf_big.
I don't mean this, it's for buffer submission. I mean when packet is received, in receive_buf(), mergeable buffer knows which pages received can be hooked in skb frags, it's receive_mergeable() which do this.
When a NIC driver supports packet split mode, then each ring descriptor contains a skb and a page. When packet is received, if the status is not EOP, then hook the page of the next descriptor to the prev skb. We don't how many frags belongs to one skb. So when guest submit buffers, it should submit multiple pages, and when receive, the guest should know which pages are belongs to one skb and hook them together. I think receive_mergeable() can do this, but I don't see how big->packets handle this. May I miss something here?
Thanks
Xiaohui
^ 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