* [PATCH 03/10] adi: Remove extern from function prototypes
From: Joe Perches @ 2013-09-23 22:11 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, linux-kernel, uclinux-dist-devel
In-Reply-To: <5570169a078375fa8662adeb2a7f24c1ae718bfb.1379974101.git.joe@perches.com>
There are a mix of function prototypes with and without extern
in the kernel sources. Standardize on not using extern for
function prototypes.
Function prototypes don't need to be written with extern.
extern is assumed by the compiler. Its use is as unnecessary as
using auto to declare automatic/local variables in a block.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ethernet/adi/bfin_mac.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/adi/bfin_mac.h b/drivers/net/ethernet/adi/bfin_mac.h
index 7a07ee0..6dec86a 100644
--- a/drivers/net/ethernet/adi/bfin_mac.h
+++ b/drivers/net/ethernet/adi/bfin_mac.h
@@ -104,6 +104,6 @@ struct bfin_mac_local {
#endif
};
-extern int bfin_get_ether_addr(char *addr);
+int bfin_get_ether_addr(char *addr);
#endif
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related
* [PATCH 02/10] 8390: Remove extern from function prototypes
From: Joe Perches @ 2013-09-23 22:11 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, linux-kernel
In-Reply-To: <5570169a078375fa8662adeb2a7f24c1ae718bfb.1379974101.git.joe@perches.com>
There are a mix of function prototypes with and without extern
in the kernel sources. Standardize on not using extern for
function prototypes.
Function prototypes don't need to be written with extern.
extern is assumed by the compiler. Its use is as unnecessary as
using auto to declare automatic/local variables in a block.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ethernet/8390/8390.h | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/drivers/net/ethernet/8390/8390.h b/drivers/net/ethernet/8390/8390.h
index ef325ff..2923c51 100644
--- a/drivers/net/ethernet/8390/8390.h
+++ b/drivers/net/ethernet/8390/8390.h
@@ -28,42 +28,42 @@ extern int ei_debug;
#endif
#ifdef CONFIG_NET_POLL_CONTROLLER
-extern void ei_poll(struct net_device *dev);
-extern void eip_poll(struct net_device *dev);
+void ei_poll(struct net_device *dev);
+void eip_poll(struct net_device *dev);
#endif
/* Without I/O delay - non ISA or later chips */
-extern void NS8390_init(struct net_device *dev, int startp);
-extern int ei_open(struct net_device *dev);
-extern int ei_close(struct net_device *dev);
-extern irqreturn_t ei_interrupt(int irq, void *dev_id);
-extern void ei_tx_timeout(struct net_device *dev);
-extern netdev_tx_t ei_start_xmit(struct sk_buff *skb, struct net_device *dev);
-extern void ei_set_multicast_list(struct net_device *dev);
-extern struct net_device_stats *ei_get_stats(struct net_device *dev);
+void NS8390_init(struct net_device *dev, int startp);
+int ei_open(struct net_device *dev);
+int ei_close(struct net_device *dev);
+irqreturn_t ei_interrupt(int irq, void *dev_id);
+void ei_tx_timeout(struct net_device *dev);
+netdev_tx_t ei_start_xmit(struct sk_buff *skb, struct net_device *dev);
+void ei_set_multicast_list(struct net_device *dev);
+struct net_device_stats *ei_get_stats(struct net_device *dev);
extern const struct net_device_ops ei_netdev_ops;
-extern struct net_device *__alloc_ei_netdev(int size);
+struct net_device *__alloc_ei_netdev(int size);
static inline struct net_device *alloc_ei_netdev(void)
{
return __alloc_ei_netdev(0);
}
/* With I/O delay form */
-extern void NS8390p_init(struct net_device *dev, int startp);
-extern int eip_open(struct net_device *dev);
-extern int eip_close(struct net_device *dev);
-extern irqreturn_t eip_interrupt(int irq, void *dev_id);
-extern void eip_tx_timeout(struct net_device *dev);
-extern netdev_tx_t eip_start_xmit(struct sk_buff *skb, struct net_device *dev);
-extern void eip_set_multicast_list(struct net_device *dev);
-extern struct net_device_stats *eip_get_stats(struct net_device *dev);
+void NS8390p_init(struct net_device *dev, int startp);
+int eip_open(struct net_device *dev);
+int eip_close(struct net_device *dev);
+irqreturn_t eip_interrupt(int irq, void *dev_id);
+void eip_tx_timeout(struct net_device *dev);
+netdev_tx_t eip_start_xmit(struct sk_buff *skb, struct net_device *dev);
+void eip_set_multicast_list(struct net_device *dev);
+struct net_device_stats *eip_get_stats(struct net_device *dev);
extern const struct net_device_ops eip_netdev_ops;
-extern struct net_device *__alloc_eip_netdev(int size);
+struct net_device *__alloc_eip_netdev(int size);
static inline struct net_device *alloc_eip_netdev(void)
{
return __alloc_eip_netdev(0);
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related
* [PATCH 01/10] can: Remove extern from function prototypes
From: Joe Perches @ 2013-09-23 22:11 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, linux-kernel, Wolfgang Grandegger,
Marc Kleine-Budde, linux-can
There are a mix of function prototypes with and without extern
in the kernel sources. Standardize on not using extern for
function prototypes.
Function prototypes don't need to be written with extern.
extern is assumed by the compiler. Its use is as unnecessary as
using auto to declare automatic/local variables in a block.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/can/mscan/mscan.h | 6 +++---
drivers/net/can/softing/softing.h | 24 ++++++++++++------------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/net/can/mscan/mscan.h b/drivers/net/can/mscan/mscan.h
index 9c24d60..e98abb9 100644
--- a/drivers/net/can/mscan/mscan.h
+++ b/drivers/net/can/mscan/mscan.h
@@ -297,8 +297,8 @@ struct mscan_priv {
struct napi_struct napi;
};
-extern struct net_device *alloc_mscandev(void);
-extern int register_mscandev(struct net_device *dev, int mscan_clksrc);
-extern void unregister_mscandev(struct net_device *dev);
+struct net_device *alloc_mscandev(void);
+int register_mscandev(struct net_device *dev, int mscan_clksrc);
+void unregister_mscandev(struct net_device *dev);
#endif /* __MSCAN_H__ */
diff --git a/drivers/net/can/softing/softing.h b/drivers/net/can/softing/softing.h
index afd7d85..35f0622 100644
--- a/drivers/net/can/softing/softing.h
+++ b/drivers/net/can/softing/softing.h
@@ -71,34 +71,34 @@ struct softing {
} id;
};
-extern int softing_default_output(struct net_device *netdev);
+int softing_default_output(struct net_device *netdev);
-extern ktime_t softing_raw2ktime(struct softing *card, u32 raw);
+ktime_t softing_raw2ktime(struct softing *card, u32 raw);
-extern int softing_chip_poweron(struct softing *card);
+int softing_chip_poweron(struct softing *card);
-extern int softing_bootloader_command(struct softing *card, int16_t cmd,
- const char *msg);
+int softing_bootloader_command(struct softing *card, int16_t cmd,
+ const char *msg);
/* Load firmware after reset */
-extern int softing_load_fw(const char *file, struct softing *card,
- __iomem uint8_t *virt, unsigned int size, int offset);
+int softing_load_fw(const char *file, struct softing *card,
+ __iomem uint8_t *virt, unsigned int size, int offset);
/* Load final application firmware after bootloader */
-extern int softing_load_app_fw(const char *file, struct softing *card);
+int softing_load_app_fw(const char *file, struct softing *card);
/*
* enable or disable irq
* only called with fw.lock locked
*/
-extern int softing_enable_irq(struct softing *card, int enable);
+int softing_enable_irq(struct softing *card, int enable);
/* start/stop 1 bus on card */
-extern int softing_startstop(struct net_device *netdev, int up);
+int softing_startstop(struct net_device *netdev, int up);
/* netif_rx() */
-extern int softing_netdev_rx(struct net_device *netdev,
- const struct can_frame *msg, ktime_t ktime);
+int softing_netdev_rx(struct net_device *netdev, const struct can_frame *msg,
+ ktime_t ktime);
/* SOFTING DPRAM mappings */
#define DPRAM_RX 0x0000
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related
* Re: BUG: 32 bit net stats
From: Eric Dumazet @ 2013-09-23 22:04 UTC (permalink / raw)
To: Jamal Hadi Salim; +Cc: netdev, Eric Dumazet
In-Reply-To: <5240B771.8040307@mojatatu.com>
On Mon, 2013-09-23 at 17:49 -0400, Jamal Hadi Salim wrote:
> Something broke in sending of 32 bit version of netstat around the
> time 64 bit version was improved. I went back as far as 3.8.0 to recent
> kernels. Could have been earlier.
> The work around in user space is when you see 64 bit stats just ignore
> the 32 bit version (which iproute2 does and so am i;->).
>
> But assumming there are tools out there that know only of 32 bit
> variant they will get bad stats. Here's a compile tested only patch.
> Wont have to test anything for at least another day.
>
> cheers,
> jamal
>
Hi Jamal
Sorry, this doesnt make sense to me.
Existing code seems to be fine.
Which driver do you use ?
^ permalink raw reply
* BUG: 32 bit net stats
From: Jamal Hadi Salim @ 2013-09-23 21:49 UTC (permalink / raw)
To: netdev; +Cc: Eric Dumazet
[-- Attachment #1: Type: text/plain, Size: 506 bytes --]
Something broke in sending of 32 bit version of netstat around the
time 64 bit version was improved. I went back as far as 3.8.0 to recent
kernels. Could have been earlier.
The work around in user space is when you see 64 bit stats just ignore
the 32 bit version (which iproute2 does and so am i;->).
But assumming there are tools out there that know only of 32 bit
variant they will get bad stats. Here's a compile tested only patch.
Wont have to test anything for at least another day.
cheers,
jamal
[-- Attachment #2: p-untested --]
[-- Type: text/plain, Size: 1339 bytes --]
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 2a0e21d..005be70 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -659,7 +659,7 @@ static unsigned int rtnl_dev_combine_flags(const struct net_device *dev,
}
static void copy_rtnl_link_stats(struct rtnl_link_stats *a,
- const struct rtnl_link_stats64 *b)
+ const struct net_device_stats *b)
{
a->rx_packets = b->rx_packets;
a->tx_packets = b->tx_packets;
@@ -876,6 +876,8 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
struct nlattr *attr, *af_spec;
struct rtnl_af_ops *af_ops;
struct net_device *upper_dev = netdev_master_upper_dev_get(dev);
+ const struct net_device_stats *stats32 = &dev->stats;
+ const struct net_device_ops *ops = dev->netdev_ops;
ASSERT_RTNL();
nlh = nlmsg_put(skb, pid, seq, type, sizeof(*ifm), flags);
@@ -940,9 +942,11 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
if (attr == NULL)
goto nla_put_failure;
- stats = dev_get_stats(dev, &temp);
- copy_rtnl_link_stats(nla_data(attr), stats);
+ if (ops->ndo_get_stats)
+ stats32 = ops->ndo_get_stats(dev);
+ copy_rtnl_link_stats(nla_data(attr), stats32);
+ stats = dev_get_stats(dev, &temp);
attr = nla_reserve(skb, IFLA_STATS64,
sizeof(struct rtnl_link_stats64));
if (attr == NULL)
^ permalink raw reply related
* GOOD DAY
From: Mr. Alpha Isoko @ 2013-09-23 21:39 UTC (permalink / raw)
Greetings From Mr Alpha Isoko.
Dear Friend,
For your kind attention. I will be very glad if you do assist me to relocate this sum of (US$10.5M) to your account for the benefit of our both families.
This is a genuine business,only i cannot operate it alone without using a Foreigner who will stand as a beneficiary to the money, that is why i decided to contact you in a good manner to assist me and also to share the benefit together with me.
By indicating your interest I will send you the full details on how the business will be executed.
Please keep this proposal as a top secret.
Regards,
Mr.Alpha Isoko.
^ permalink raw reply
* Re: [PATCH 09/19] net: Change variable type to bool
From: David Miller @ 2013-09-23 21:38 UTC (permalink / raw)
To: peter.senna; +Cc: eilong, netdev, linux-kernel, kernel-janitors
In-Reply-To: <1379802471-30252-9-git-send-email-peter.senna@gmail.com>
Using the same prefix, "net: " for several patches gives no information
to the person reading the shortlog.
Use more specific subsystem prefixes, such as "bnx2x: "myri10ge: ",
"ipv6: ", etc.
^ permalink raw reply
* Re: [PATCH v2.39 7/7] datapath: Add basic MPLS support to kernel
From: Jesse Gross @ 2013-09-23 21:24 UTC (permalink / raw)
To: Pravin Shelar
Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org, Ravi K, netdev,
Isaku Yamahata
In-Reply-To: <CALnjE+o_bcNbU6kv2eUBaNS4tincV+BmrFyJtZZRTaMPMVv8gw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Mon, Sep 23, 2013 at 12:47 PM, Pravin Shelar <pshelar-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org> wrote:
> This patch does not work since vport-netdev does not include compat
> gso header. after including gso.h it gives me compiler error.
> Can you post combined patch with fixes?
I think it's probably because of this:
+#if 1 // LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
+#define dev_queue_xmit rpl_dev_queue_xmit
+#endif
But otherwise, I agree the approach is much nicer than what is currently there.
^ permalink raw reply
* Re: [PATCH 1/2] remove all uses of printf's %n
From: Kees Cook @ 2013-09-23 21:24 UTC (permalink / raw)
To: Tetsuo Handa, Andrew Morton
Cc: Jiri Slaby, Al Viro, Pavel Emelyanov, LKML, netdev, linux-sctp,
George Spelvin, Dan Carpenter, Geert Uytterhoeven, Jan Beulich,
Joe Perches, Motohiro KOSAKI
In-Reply-To: <201309201309.GFB52620.OQOtSFLMJVHOFF@I-love.SAKURA.ne.jp>
[-remi (bouncing), +akpm]
On Thu, Sep 19, 2013 at 9:09 PM, Tetsuo Handa
<penguin-kernel@i-love.sakura.ne.jp> wrote:
> Hello.
>
> We are discussing about removal of %n support from vsnprintf() at
> https://lkml.org/lkml/2013/9/16/52 , and you are using %n in seq_printf().
>
> I posted https://lkml.org/lkml/diff/2013/9/19/53/1 which introduces
> seq_setwidth() / seq_pad() which can avoid use of %n in seq_printf().
> Assuming that this patch is merged, would you confirm that I didn't break
> your code with below patch?
As mentioned in the thread, I think we should carry this with the
patch that adds seq_pad and drops %n. It's the cleanest of the
solutions, adds no CPU overhead to other seq_file users, addresses the
basic need (seq_printf padding) while providing expanded functionality
(tracking padding for any seq_file writes, not just seq_printf).
Acked-by: Kees Cook <keescook@chromium.org>
-Kees
>
> Regards.
> ----------------------------------------
> >From f8b60ebe3971901b93dedb8eee0f85b60d0fdc5f Mon Sep 17 00:00:00 2001
> From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Date: Fri, 20 Sep 2013 12:01:07 +0900
> Subject: [PATCH] Remove "%n" usage from seq_file users.
>
> All seq_printf() users are using "%n" for calculating padding size, convert
> them to use seq_setwidth() / seq_pad() pair.
>
> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> ---
> fs/proc/consoles.c | 10 ++++------
> fs/proc/nommu.c | 12 +++++-------
> fs/proc/task_mmu.c | 20 ++++++--------------
> fs/proc/task_nommu.c | 19 ++++++-------------
> net/ipv4/fib_trie.c | 13 +++++++------
> net/ipv4/ping.c | 15 +++++++--------
> net/ipv4/tcp_ipv4.c | 33 +++++++++++++++------------------
> net/ipv4/udp.c | 15 +++++++--------
> net/phonet/socket.c | 24 +++++++++++-------------
> net/sctp/objcnt.c | 9 +++++----
> 10 files changed, 73 insertions(+), 97 deletions(-)
>
> diff --git a/fs/proc/consoles.c b/fs/proc/consoles.c
> index b701eaa..51942d5 100644
> --- a/fs/proc/consoles.c
> +++ b/fs/proc/consoles.c
> @@ -29,7 +29,6 @@ static int show_console_dev(struct seq_file *m, void *v)
> char flags[ARRAY_SIZE(con_flags) + 1];
> struct console *con = v;
> unsigned int a;
> - int len;
> dev_t dev = 0;
>
> if (con->device) {
> @@ -47,11 +46,10 @@ static int show_console_dev(struct seq_file *m, void *v)
> con_flags[a].name : ' ';
> flags[a] = 0;
>
> - seq_printf(m, "%s%d%n", con->name, con->index, &len);
> - len = 21 - len;
> - if (len < 1)
> - len = 1;
> - seq_printf(m, "%*c%c%c%c (%s)", len, ' ', con->read ? 'R' : '-',
> + seq_setwidth(m, 21 - 1);
> + seq_printf(m, "%s%d", con->name, con->index);
> + seq_pad(m, ' ');
> + seq_printf(m, "%c%c%c (%s)", con->read ? 'R' : '-',
> con->write ? 'W' : '-', con->unblank ? 'U' : '-',
> flags);
> if (dev)
> diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
> index ccfd99b..5f9bc8a 100644
> --- a/fs/proc/nommu.c
> +++ b/fs/proc/nommu.c
> @@ -39,7 +39,7 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
> unsigned long ino = 0;
> struct file *file;
> dev_t dev = 0;
> - int flags, len;
> + int flags;
>
> flags = region->vm_flags;
> file = region->vm_file;
> @@ -50,8 +50,9 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
> ino = inode->i_ino;
> }
>
> + seq_setwidth(m, 25 + sizeof(void *) * 6 - 1);
> seq_printf(m,
> - "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n",
> + "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu ",
> region->vm_start,
> region->vm_end,
> flags & VM_READ ? 'r' : '-',
> @@ -59,13 +60,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
> flags & VM_EXEC ? 'x' : '-',
> flags & VM_MAYSHARE ? flags & VM_SHARED ? 'S' : 's' : 'p',
> ((loff_t)region->vm_pgoff) << PAGE_SHIFT,
> - MAJOR(dev), MINOR(dev), ino, &len);
> + MAJOR(dev), MINOR(dev), ino);
>
> if (file) {
> - len = 25 + sizeof(void *) * 6 - len;
> - if (len < 1)
> - len = 1;
> - seq_printf(m, "%*c", len, ' ');
> + seq_pad(m, ' ');
> seq_path(m, &file->f_path, "");
> }
>
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index 7366e9d..cc24165 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -83,14 +83,6 @@ unsigned long task_statm(struct mm_struct *mm,
> return mm->total_vm;
> }
>
> -static void pad_len_spaces(struct seq_file *m, int len)
> -{
> - len = 25 + sizeof(void*) * 6 - len;
> - if (len < 1)
> - len = 1;
> - seq_printf(m, "%*c", len, ' ');
> -}
> -
> #ifdef CONFIG_NUMA
> /*
> * These functions are for numa_maps but called in generic **maps seq_file
> @@ -268,7 +260,6 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
> unsigned long long pgoff = 0;
> unsigned long start, end;
> dev_t dev = 0;
> - int len;
> const char *name = NULL;
>
> if (file) {
> @@ -286,7 +277,8 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
> if (stack_guard_page_end(vma, end))
> end -= PAGE_SIZE;
>
> - seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n",
> + seq_setwidth(m, 25 + sizeof(void *) * 6 - 1);
> + seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu ",
> start,
> end,
> flags & VM_READ ? 'r' : '-',
> @@ -294,14 +286,14 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
> flags & VM_EXEC ? 'x' : '-',
> flags & VM_MAYSHARE ? 's' : 'p',
> pgoff,
> - MAJOR(dev), MINOR(dev), ino, &len);
> + MAJOR(dev), MINOR(dev), ino);
>
> /*
> * Print the dentry name for named mappings, and a
> * special [heap] marker for the heap:
> */
> if (file) {
> - pad_len_spaces(m, len);
> + seq_pad(m, ' ');
> seq_path(m, &file->f_path, "\n");
> goto done;
> }
> @@ -333,7 +325,7 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
> name = "[stack]";
> } else {
> /* Thread stack in /proc/PID/maps */
> - pad_len_spaces(m, len);
> + seq_pad(m, ' ');
> seq_printf(m, "[stack:%d]", tid);
> }
> }
> @@ -341,7 +333,7 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
>
> done:
> if (name) {
> - pad_len_spaces(m, len);
> + seq_pad(m, ' ');
> seq_puts(m, name);
> }
> seq_putc(m, '\n');
> diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
> index 56123a6..678455d 100644
> --- a/fs/proc/task_nommu.c
> +++ b/fs/proc/task_nommu.c
> @@ -123,14 +123,6 @@ unsigned long task_statm(struct mm_struct *mm,
> return size;
> }
>
> -static void pad_len_spaces(struct seq_file *m, int len)
> -{
> - len = 25 + sizeof(void*) * 6 - len;
> - if (len < 1)
> - len = 1;
> - seq_printf(m, "%*c", len, ' ');
> -}
> -
> /*
> * display a single VMA to a sequenced file
> */
> @@ -142,7 +134,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
> unsigned long ino = 0;
> struct file *file;
> dev_t dev = 0;
> - int flags, len;
> + int flags;
> unsigned long long pgoff = 0;
>
> flags = vma->vm_flags;
> @@ -155,8 +147,9 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
> pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
> }
>
> + seq_setwidth(m, 25 + sizeof(void *) * 6 - 1);
> seq_printf(m,
> - "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n",
> + "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu ",
> vma->vm_start,
> vma->vm_end,
> flags & VM_READ ? 'r' : '-',
> @@ -164,16 +157,16 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
> flags & VM_EXEC ? 'x' : '-',
> flags & VM_MAYSHARE ? flags & VM_SHARED ? 'S' : 's' : 'p',
> pgoff,
> - MAJOR(dev), MINOR(dev), ino, &len);
> + MAJOR(dev), MINOR(dev), ino);
>
> if (file) {
> - pad_len_spaces(m, len);
> + seq_pad(m, ' ');
> seq_path(m, &file->f_path, "");
> } else if (mm) {
> pid_t tid = vm_is_stack(priv->task, vma, is_pid);
>
> if (tid != 0) {
> - pad_len_spaces(m, len);
> + seq_pad(m, ' ');
> /*
> * Thread stack in /proc/PID/task/TID/maps or
> * the main process stack.
> diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
> index 3df6d3e..b1af50e 100644
> --- a/net/ipv4/fib_trie.c
> +++ b/net/ipv4/fib_trie.c
> @@ -2530,16 +2530,17 @@ static int fib_route_seq_show(struct seq_file *seq, void *v)
> list_for_each_entry_rcu(fa, &li->falh, fa_list) {
> const struct fib_info *fi = fa->fa_info;
> unsigned int flags = fib_flag_trans(fa->fa_type, mask, fi);
> - int len;
>
> if (fa->fa_type == RTN_BROADCAST
> || fa->fa_type == RTN_MULTICAST)
> continue;
>
> + seq_setwidth(seq, 127);
> +
> if (fi)
> seq_printf(seq,
> "%s\t%08X\t%08X\t%04X\t%d\t%u\t"
> - "%d\t%08X\t%d\t%u\t%u%n",
> + "%d\t%08X\t%d\t%u\t%u",
> fi->fib_dev ? fi->fib_dev->name : "*",
> prefix,
> fi->fib_nh->nh_gw, flags, 0, 0,
> @@ -2548,15 +2549,15 @@ static int fib_route_seq_show(struct seq_file *seq, void *v)
> (fi->fib_advmss ?
> fi->fib_advmss + 40 : 0),
> fi->fib_window,
> - fi->fib_rtt >> 3, &len);
> + fi->fib_rtt >> 3);
> else
> seq_printf(seq,
> "*\t%08X\t%08X\t%04X\t%d\t%u\t"
> - "%d\t%08X\t%d\t%u\t%u%n",
> + "%d\t%08X\t%d\t%u\t%u",
> prefix, 0, flags, 0, 0, 0,
> - mask, 0, 0, 0, &len);
> + mask, 0, 0, 0);
>
> - seq_printf(seq, "%*s\n", 127 - len, "");
> + seq_pad(seq, '\n');
> }
> }
>
> diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
> index d7d9882..94cc685 100644
> --- a/net/ipv4/ping.c
> +++ b/net/ipv4/ping.c
> @@ -1073,7 +1073,7 @@ void ping_seq_stop(struct seq_file *seq, void *v)
> EXPORT_SYMBOL_GPL(ping_seq_stop);
>
> static void ping_v4_format_sock(struct sock *sp, struct seq_file *f,
> - int bucket, int *len)
> + int bucket)
> {
> struct inet_sock *inet = inet_sk(sp);
> __be32 dest = inet->inet_daddr;
> @@ -1082,7 +1082,7 @@ static void ping_v4_format_sock(struct sock *sp, struct seq_file *f,
> __u16 srcp = ntohs(inet->inet_sport);
>
> seq_printf(f, "%5d: %08X:%04X %08X:%04X"
> - " %02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %d%n",
> + " %02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %d",
> bucket, src, srcp, dest, destp, sp->sk_state,
> sk_wmem_alloc_get(sp),
> sk_rmem_alloc_get(sp),
> @@ -1090,23 +1090,22 @@ static void ping_v4_format_sock(struct sock *sp, struct seq_file *f,
> from_kuid_munged(seq_user_ns(f), sock_i_uid(sp)),
> 0, sock_i_ino(sp),
> atomic_read(&sp->sk_refcnt), sp,
> - atomic_read(&sp->sk_drops), len);
> + atomic_read(&sp->sk_drops));
> }
>
> static int ping_v4_seq_show(struct seq_file *seq, void *v)
> {
> + seq_setwidth(seq, 127);
> if (v == SEQ_START_TOKEN)
> - seq_printf(seq, "%-127s\n",
> - " sl local_address rem_address st tx_queue "
> + seq_puts(seq, " sl local_address rem_address st tx_queue "
> "rx_queue tr tm->when retrnsmt uid timeout "
> "inode ref pointer drops");
> else {
> struct ping_iter_state *state = seq->private;
> - int len;
>
> - ping_v4_format_sock(v, seq, state->bucket, &len);
> - seq_printf(seq, "%*s\n", 127 - len, "");
> + ping_v4_format_sock(v, seq, state->bucket);
> }
> + seq_pad(seq, '\n');
> return 0;
> }
>
> diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
> index b14266b..2948b76 100644
> --- a/net/ipv4/tcp_ipv4.c
> +++ b/net/ipv4/tcp_ipv4.c
> @@ -2598,13 +2598,13 @@ void tcp_proc_unregister(struct net *net, struct tcp_seq_afinfo *afinfo)
> EXPORT_SYMBOL(tcp_proc_unregister);
>
> static void get_openreq4(const struct sock *sk, const struct request_sock *req,
> - struct seq_file *f, int i, kuid_t uid, int *len)
> + struct seq_file *f, int i, kuid_t uid)
> {
> const struct inet_request_sock *ireq = inet_rsk(req);
> long delta = req->expires - jiffies;
>
> seq_printf(f, "%4d: %08X:%04X %08X:%04X"
> - " %02X %08X:%08X %02X:%08lX %08X %5u %8d %u %d %pK%n",
> + " %02X %08X:%08X %02X:%08lX %08X %5u %8d %u %d %pK",
> i,
> ireq->loc_addr,
> ntohs(inet_sk(sk)->inet_sport),
> @@ -2619,11 +2619,10 @@ static void get_openreq4(const struct sock *sk, const struct request_sock *req,
> 0, /* non standard timer */
> 0, /* open_requests have no inode */
> atomic_read(&sk->sk_refcnt),
> - req,
> - len);
> + req);
> }
>
> -static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len)
> +static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i)
> {
> int timer_active;
> unsigned long timer_expires;
> @@ -2662,7 +2661,7 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len)
> rx_queue = max_t(int, tp->rcv_nxt - tp->copied_seq, 0);
>
> seq_printf(f, "%4d: %08X:%04X %08X:%04X %02X %08X:%08X %02X:%08lX "
> - "%08X %5u %8d %lu %d %pK %lu %lu %u %u %d%n",
> + "%08X %5u %8d %lu %d %pK %lu %lu %u %u %d",
> i, src, srcp, dest, destp, sk->sk_state,
> tp->write_seq - tp->snd_una,
> rx_queue,
> @@ -2679,12 +2678,11 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len)
> tp->snd_cwnd,
> sk->sk_state == TCP_LISTEN ?
> (fastopenq ? fastopenq->max_qlen : 0) :
> - (tcp_in_initial_slowstart(tp) ? -1 : tp->snd_ssthresh),
> - len);
> + (tcp_in_initial_slowstart(tp) ? -1 : tp->snd_ssthresh));
> }
>
> static void get_timewait4_sock(const struct inet_timewait_sock *tw,
> - struct seq_file *f, int i, int *len)
> + struct seq_file *f, int i)
> {
> __be32 dest, src;
> __u16 destp, srcp;
> @@ -2696,10 +2694,10 @@ static void get_timewait4_sock(const struct inet_timewait_sock *tw,
> srcp = ntohs(tw->tw_sport);
>
> seq_printf(f, "%4d: %08X:%04X %08X:%04X"
> - " %02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d %pK%n",
> + " %02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d %pK",
> i, src, srcp, dest, destp, tw->tw_substate, 0, 0,
> 3, jiffies_delta_to_clock_t(delta), 0, 0, 0, 0,
> - atomic_read(&tw->tw_refcnt), tw, len);
> + atomic_read(&tw->tw_refcnt), tw);
> }
>
> #define TMPSZ 150
> @@ -2707,11 +2705,10 @@ static void get_timewait4_sock(const struct inet_timewait_sock *tw,
> static int tcp4_seq_show(struct seq_file *seq, void *v)
> {
> struct tcp_iter_state *st;
> - int len;
>
> + seq_setwidth(seq, TMPSZ - 1);
> if (v == SEQ_START_TOKEN) {
> - seq_printf(seq, "%-*s\n", TMPSZ - 1,
> - " sl local_address rem_address st tx_queue "
> + seq_puts(seq, " sl local_address rem_address st tx_queue "
> "rx_queue tr tm->when retrnsmt uid timeout "
> "inode");
> goto out;
> @@ -2721,17 +2718,17 @@ static int tcp4_seq_show(struct seq_file *seq, void *v)
> switch (st->state) {
> case TCP_SEQ_STATE_LISTENING:
> case TCP_SEQ_STATE_ESTABLISHED:
> - get_tcp4_sock(v, seq, st->num, &len);
> + get_tcp4_sock(v, seq, st->num);
> break;
> case TCP_SEQ_STATE_OPENREQ:
> - get_openreq4(st->syn_wait_sk, v, seq, st->num, st->uid, &len);
> + get_openreq4(st->syn_wait_sk, v, seq, st->num, st->uid);
> break;
> case TCP_SEQ_STATE_TIME_WAIT:
> - get_timewait4_sock(v, seq, st->num, &len);
> + get_timewait4_sock(v, seq, st->num);
> break;
> }
> - seq_printf(seq, "%*s\n", TMPSZ - 1 - len, "");
> out:
> + seq_pad(seq, '\n');
> return 0;
> }
>
> diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
> index 74d2c95..31c132c 100644
> --- a/net/ipv4/udp.c
> +++ b/net/ipv4/udp.c
> @@ -2150,7 +2150,7 @@ EXPORT_SYMBOL(udp_proc_unregister);
>
> /* ------------------------------------------------------------------------ */
> static void udp4_format_sock(struct sock *sp, struct seq_file *f,
> - int bucket, int *len)
> + int bucket)
> {
> struct inet_sock *inet = inet_sk(sp);
> __be32 dest = inet->inet_daddr;
> @@ -2159,7 +2159,7 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f,
> __u16 srcp = ntohs(inet->inet_sport);
>
> seq_printf(f, "%5d: %08X:%04X %08X:%04X"
> - " %02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %d%n",
> + " %02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %d",
> bucket, src, srcp, dest, destp, sp->sk_state,
> sk_wmem_alloc_get(sp),
> sk_rmem_alloc_get(sp),
> @@ -2167,23 +2167,22 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f,
> from_kuid_munged(seq_user_ns(f), sock_i_uid(sp)),
> 0, sock_i_ino(sp),
> atomic_read(&sp->sk_refcnt), sp,
> - atomic_read(&sp->sk_drops), len);
> + atomic_read(&sp->sk_drops));
> }
>
> int udp4_seq_show(struct seq_file *seq, void *v)
> {
> + seq_setwidth(seq, 127);
> if (v == SEQ_START_TOKEN)
> - seq_printf(seq, "%-127s\n",
> - " sl local_address rem_address st tx_queue "
> + seq_puts(seq, " sl local_address rem_address st tx_queue "
> "rx_queue tr tm->when retrnsmt uid timeout "
> "inode ref pointer drops");
> else {
> struct udp_iter_state *state = seq->private;
> - int len;
>
> - udp4_format_sock(v, seq, state->bucket, &len);
> - seq_printf(seq, "%*s\n", 127 - len, "");
> + udp4_format_sock(v, seq, state->bucket);
> }
> + seq_pad(seq, '\n');
> return 0;
> }
>
> diff --git a/net/phonet/socket.c b/net/phonet/socket.c
> index 77e38f7..008214a 100644
> --- a/net/phonet/socket.c
> +++ b/net/phonet/socket.c
> @@ -595,26 +595,25 @@ static void pn_sock_seq_stop(struct seq_file *seq, void *v)
>
> static int pn_sock_seq_show(struct seq_file *seq, void *v)
> {
> - int len;
> -
> + seq_setwidth(seq, 127);
> if (v == SEQ_START_TOKEN)
> - seq_printf(seq, "%s%n", "pt loc rem rs st tx_queue rx_queue "
> - " uid inode ref pointer drops", &len);
> + seq_puts(seq, "pt loc rem rs st tx_queue rx_queue "
> + " uid inode ref pointer drops");
> else {
> struct sock *sk = v;
> struct pn_sock *pn = pn_sk(sk);
>
> seq_printf(seq, "%2d %04X:%04X:%02X %02X %08X:%08X %5d %lu "
> - "%d %pK %d%n",
> + "%d %pK %d",
> sk->sk_protocol, pn->sobject, pn->dobject,
> pn->resource, sk->sk_state,
> sk_wmem_alloc_get(sk), sk_rmem_alloc_get(sk),
> from_kuid_munged(seq_user_ns(seq), sock_i_uid(sk)),
> sock_i_ino(sk),
> atomic_read(&sk->sk_refcnt), sk,
> - atomic_read(&sk->sk_drops), &len);
> + atomic_read(&sk->sk_drops));
> }
> - seq_printf(seq, "%*s\n", 127 - len, "");
> + seq_pad(seq, '\n');
> return 0;
> }
>
> @@ -785,20 +784,19 @@ static void pn_res_seq_stop(struct seq_file *seq, void *v)
>
> static int pn_res_seq_show(struct seq_file *seq, void *v)
> {
> - int len;
> -
> + seq_setwidth(seq, 63);
> if (v == SEQ_START_TOKEN)
> - seq_printf(seq, "%s%n", "rs uid inode", &len);
> + seq_puts(seq, "rs uid inode");
> else {
> struct sock **psk = v;
> struct sock *sk = *psk;
>
> - seq_printf(seq, "%02X %5u %lu%n",
> + seq_printf(seq, "%02X %5u %lu",
> (int) (psk - pnres.sk),
> from_kuid_munged(seq_user_ns(seq), sock_i_uid(sk)),
> - sock_i_ino(sk), &len);
> + sock_i_ino(sk));
> }
> - seq_printf(seq, "%*s\n", 63 - len, "");
> + seq_pad(seq, '\n');
> return 0;
> }
>
> diff --git a/net/sctp/objcnt.c b/net/sctp/objcnt.c
> index 5ea573b..647396b 100644
> --- a/net/sctp/objcnt.c
> +++ b/net/sctp/objcnt.c
> @@ -79,12 +79,13 @@ static sctp_dbg_objcnt_entry_t sctp_dbg_objcnt[] = {
> */
> static int sctp_objcnt_seq_show(struct seq_file *seq, void *v)
> {
> - int i, len;
> + int i;
>
> i = (int)*(loff_t *)v;
> - seq_printf(seq, "%s: %d%n", sctp_dbg_objcnt[i].label,
> - atomic_read(sctp_dbg_objcnt[i].counter), &len);
> - seq_printf(seq, "%*s\n", 127 - len, "");
> + seq_setwidth(seq, 127);
> + seq_printf(seq, "%s: %d", sctp_dbg_objcnt[i].label,
> + atomic_read(sctp_dbg_objcnt[i].counter));
> + seq_pad(seq, '\n');
> return 0;
> }
>
> --
> 1.7.1
--
Kees Cook
Chrome OS Security
^ permalink raw reply
* Re: [PATCH v2.39 7/7] datapath: Add basic MPLS support to kernel
From: Jesse Gross @ 2013-09-23 21:17 UTC (permalink / raw)
To: Simon Horman
Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org, Ravi K, netdev,
Isaku Yamahata
In-Reply-To: <20130922053156.GA4849-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
On Sat, Sep 21, 2013 at 10:34 PM, Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> wrote:
> On Thu, Sep 19, 2013 at 12:21:33PM -0500, Jesse Gross wrote:
>> On Thu, Sep 19, 2013 at 10:57 AM, Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> wrote:
>> > On Mon, Sep 16, 2013 at 03:38:21PM -0500, Jesse Gross wrote:
>> >> On Mon, Sep 9, 2013 at 12:20 AM, Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> wrote:
>> >> > @@ -616,6 +736,13 @@ int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb)
>> >> > goto out_loop;
>> >> > }
>> >> >
>> >> > + /* Needed to initialise inner protocol on kernels older
>> >> > + * than v3.11 where skb->inner_protocol is not present
>> >> > + * and compatibility code uses the OVS_CB(skb) to store
>> >> > + * the inner protocol.
>> >> > + */
>> >> > + ovs_skb_set_inner_protocol(skb, skb->protocol);
>> >>
>> >> The comment makes it sound like this code should just be deleted when
>> >> upstreaming. However, I believe that we still need to initialize this
>> >> field, right? Is this the best place do it or should it be conditional
>> >> on adding a first MPLS header? (i.e. what happens if inner_protocol is
>> >> already set and the packet simply passes through OVS?)
>> >
>> > I believe there are several problems here.
>> >
>> > The first one, which my comment was written around is that I think that if
>> > inner_protocol is a field of struct sk_buff then we can rely on it already
>> > being initialised. However, if we are using compatibility code, where
>> > inner_protcol is called in the callback field of struct sk_buff then I
>> > think that OVS needs to initialise it.
>>
>> I'm not sure that it's true that inner_protocol is already initialized
>> - I grepped the tree and the only assignment that I found is in
>> skbuff.c in __copy_skb_header().
>
> My assumption was that it would be initialised to zero,
> primarily due to the behaviour of __alloc_skb_head().
> Perhaps the core code should be fixed to make my assumption true?
I misunderstood then - I think you can assume that it is initialized
to zero, I though you meant that it was initialized to a protocol
value. However, I then still have my original question - don't we need
to set it here in both cases since we're not just 'initializing' it
but actually setting a protocol?
>> One other consideration in the OVS case - with recirculation we may
>> hit this code multiple times and the difference in behavior could be
>> surprising. However, on the other hand, we need to be careful because
>> skb->cb is not guaranteed to be initialized to zero.
>
> Thanks, that is also not something that I had considered.
>
> I'm not sure, but I think that we can rely on skb->cb
> not being clobbered between rounds of recirculation.
> Or at the very least I think we could save and restore it
> as necessary.
Yes, it should be safe to assume this.
> So I think if we could be careful to make sure that inner_protocol
> is in a sane state the first time we see the skb but not
> each time it is recirculated then I think things should work out.
>
> In my current implementation of recirculation the datapath
> side is driven ovs_dp_process_received_packet(). So by my reasoning
> above I think it would make sense to reset the inner_protocol there
> and in ovs_packet_cmd_execute() rather than in ovs_execute_actions()
> which each of those functions call.
I think that would work, however, I wonder if it's the right place in
general, independent of this compatibility issue. I guess it still
seems like the ideal thing to do is to move this as close to where it
is necessary as possible, specifically in mpls_push(). Is there a
reason to not put it there (again, other than the out-of-tree
compatibility issues)?
^ permalink raw reply
* Re: [PATCH] igbvf: add missing iounmap() on error in igbvf_probe()
From: Jeff Kirsher @ 2013-09-23 21:11 UTC (permalink / raw)
To: Wei Yongjun
Cc: netdev, kaber, e1000-devel, bruce.w.allan, jesse.brandeburg,
davem, yongjun_wei, john.ronciak, gregkh
In-Reply-To: <CAPgLHd913mcS89QxCc8G5dDPmq5jY1CChdj9gGUPq0RH204gHw@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 430 bytes --]
On Mon, 2013-09-23 at 21:50 +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Add the missing iounmap() before return from igbvf_probe()
> in the error handling case.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/net/ethernet/intel/igbvf/netdev.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Thanks! I have added the patch to my queue.
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 416 bytes --]
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
[-- Attachment #3: Type: text/plain, Size: 257 bytes --]
_______________________________________________
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
* Re: [PATCH net-next] igb: fix driver reload with VF assigned to guest
From: Jeff Kirsher @ 2013-09-23 21:10 UTC (permalink / raw)
To: Stefan Assmann
Cc: netdev, e1000-devel, davem, alexander.h.duyck, carolyn.wyborny,
gregory.v.rose
In-Reply-To: <1379941611-19605-1-git-send-email-sassmann@kpanic.de>
[-- Attachment #1: Type: text/plain, Size: 2498 bytes --]
On Mon, 2013-09-23 at 15:06 +0200, Stefan Assmann wrote:
> commit fa44f2f185f7f9da19d331929bb1b56c1ccd1d93 broke reloading of
> igb, when
> VFs are assigned to a guest, in several ways.
> 1. on module load adapter->vf_data does not get properly allocated,
> resulting in a null pointer exception when accessing adapter->vf_data
> in
> igb_reset() on module reload.
> modprobe -r igb ; modprobe igb max_vfs=7
> [ 215.215837] igb 0000:01:00.1: removed PHC on eth1
> [ 216.932072] igb 0000:01:00.1: IOV Disabled
> [ 216.937038] igb 0000:01:00.0: removed PHC on eth0
> [ 217.127032] igb 0000:01:00.0: Cannot deallocate SR-IOV virtual
> functions while they are assigned - VFs will not be deallocated
> [ 217.146178] igb: Intel(R) Gigabit Ethernet Network Driver - version
> 5.0.5-k
> [ 217.154050] igb: Copyright (c) 2007-2013 Intel Corporation.
> [ 217.160688] igb 0000:01:00.0: Enabling SR-IOV VFs using the module
> parameter is deprecated - please use the pci sysfs interface.
> [ 217.173703] igb 0000:01:00.0: irq 103 for MSI/MSI-X
> [ 217.179227] igb 0000:01:00.0: irq 104 for MSI/MSI-X
> [ 217.184735] igb 0000:01:00.0: irq 105 for MSI/MSI-X
> [ 217.220082] BUG: unable to handle kernel NULL pointer dereference
> at 0000000000000048
> [ 217.228846] IP: [<ffffffffa007c5e5>] igb_reset+0xc5/0x4b0 [igb]
> [ 217.235472] PGD 3607ec067 PUD 36170b067 PMD 0
> [ 217.240461] Oops: 0002 [#1] SMP
> [ 217.244085] Modules linked in: igb(+) igbvf mptsas mptscsih mptbase
> scsi_transport_sas [last unloaded: igb]
> [ 217.255040] CPU: 4 PID: 4833 Comm: modprobe Not tainted 3.11.0+ #46
> [...]
> [ 217.390007] [<ffffffffa007fab2>] igb_probe+0x892/0xfd0 [igb]
> [ 217.396422] [<ffffffff81470b3e>] local_pci_probe+0x1e/0x40
> [ 217.402641] [<ffffffff81472029>] pci_device_probe+0xf9/0x110
> [...]
> 2. A follow up issue, pci_enable_sriov() should only be called if no
> VFs were
> still allocated on module unload. Otherwise pci_enable_sriov() gets
> called
> multiple times in a row rendering the NIC unusable until reset.
> 3. simply calling igb_enable_sriov() in igb_probe_vfs() is not enough
> as the
> interrupts need to be re-setup. Switching that to
> igb_pci_enable_sriov().
>
> Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
> ---
> drivers/net/ethernet/intel/igb/igb_main.c | 37
> +++++++++++++------------------
> 1 file changed, 16 insertions(+), 21 deletions(-)
Thanks Stefan! I have added the patch to my queue.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH] i40e: using for_each_set_bit to simplify the code
From: Jeff Kirsher @ 2013-09-23 21:10 UTC (permalink / raw)
To: Wei Yongjun
Cc: jesse.brandeburg, bruce.w.allan, carolyn.wyborny,
donald.c.skidmore, gregory.v.rose, peter.p.waskiewicz.jr,
alexander.h.duyck, john.ronciak, tushar.n.dave, shannon.nelson,
mitch.a.williams, yongjun_wei, e1000-devel, netdev
In-Reply-To: <CAPgLHd8MsmVDONTENFNcRNf=7xWPGE5LJD7Z+0oNS5Lkscr4Xg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 422 bytes --]
On Mon, 2013-09-23 at 11:39 +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Using for_each_set_bit() to simplify the code.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 64
> ++++------------------
> 1 file changed, 12 insertions(+), 52 deletions(-)
Thanks! I have added the patch to my queue.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH] i40e: remove unused including <linux/version.h>
From: Jeff Kirsher @ 2013-09-23 21:09 UTC (permalink / raw)
To: Wei Yongjun
Cc: jesse.brandeburg, bruce.w.allan, carolyn.wyborny,
donald.c.skidmore, gregory.v.rose, peter.p.waskiewicz.jr,
alexander.h.duyck, john.ronciak, tushar.n.dave, shannon.nelson,
yongjun_wei, e1000-devel, netdev
In-Reply-To: <CAPgLHd9B7h-w7sXPep5baH9XV=Yb1zNAU539hLm+Zx+6PRnejg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 373 bytes --]
On Mon, 2013-09-23 at 11:39 +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Remove including <linux/version.h> that don't need it.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/net/ethernet/intel/i40e/i40e.h | 1 -
> 1 file changed, 1 deletion(-)
Thanks! I have added the patch to my queue.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH] i40e: fix error return code in i40e_probe()
From: Jeff Kirsher @ 2013-09-23 21:09 UTC (permalink / raw)
To: Wei Yongjun
Cc: jesse.brandeburg, bruce.w.allan, carolyn.wyborny,
donald.c.skidmore, gregory.v.rose, peter.p.waskiewicz.jr,
alexander.h.duyck, john.ronciak, tushar.n.dave, shannon.nelson,
yongjun_wei, e1000-devel, netdev
In-Reply-To: <CAPgLHd8qwuJ4ry-DVExF7mv83FBqYts_7wMO8xikdeL+3e+yUw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 458 bytes --]
On Mon, 2013-09-23 at 10:47 +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Fix to return -ENOMEM in the memory alloc error handling
> case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/net/ethernet/intel/i40e/i40e_main.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Thanks! I have added the patch to my queue.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH 1/1] mrp: add periodictimer to allow retries when packets get lost
From: David Miller @ 2013-09-23 20:54 UTC (permalink / raw)
To: david.ward; +Cc: noel, netdev, joe
In-Reply-To: <523CF71D.3090002@ll.mit.edu>
From: "Ward, David - 0663 - MITLL" <david.ward@ll.mit.edu>
Date: Fri, 20 Sep 2013 21:32:13 -0400
> Noel, thanks for your patch. This timer was apparently not in the GARP
> standard but added in the MRP standard and I missed it. Looks good to
> me.
>
> Acked-by: David Ward <david.ward@ll.mit.edu>
Applied, thanks everyone.
^ permalink raw reply
* Re: [PATCH] net/lapb: re-send packets on timeout
From: David Miller @ 2013-09-23 20:53 UTC (permalink / raw)
To: josselin.costanzi; +Cc: netdev, maxime.jayat
In-Reply-To: <1379498435-28860-1-git-send-email-josselin.costanzi@mobile-devices.fr>
From: Josselin Costanzi <josselin.costanzi@mobile-devices.fr>
Date: Wed, 18 Sep 2013 12:00:35 +0200
> Actually re-send packets when the T1 timer runs out. This fixes a bug
> where packets are waiting on the write queue until disconnection when
> no other traffic is outstanding.
>
> Signed-off-by: Josselin Costanzi <josselin.costanzi@mobile-devices.fr>
> Signed-off-by: Maxime Jayat <maxime.jayat@mobile-devices.fr>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next v4] ptp: add the PTP_SYS_OFFSET ioctl to the testptp program
From: David Miller @ 2013-09-23 20:46 UTC (permalink / raw)
To: bluezhudong; +Cc: richardcochran, rob, netdev, linux-doc, linux-kernel
In-Reply-To: <20130917073235.GG23682@zhudong.nay.redhat.com>
From: Dong Zhu <bluezhudong@gmail.com>
Date: Tue, 17 Sep 2013 15:32:35 +0800
> This patch add a method into testptp.c to measure the time offset
> between phc and system clock through the ioctl PTP_SYS_OFFSET.
>
> Signed-off-by: Dong Zhu <bluezhudong@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH 01/12] tcp.h: Remove extern from function prototypes
From: David Miller @ 2013-09-23 20:45 UTC (permalink / raw)
To: joe; +Cc: netdev, linux-kernel
In-Reply-To: <1379969042.3575.65.camel@joe-AO722>
From: Joe Perches <joe@perches.com>
Date: Mon, 23 Sep 2013 13:44:02 -0700
> On Mon, 2013-09-23 at 16:30 -0400, David Miller wrote:
>> Series applied,
>
> How about the same changes for the .h files in drivers/net ?
>
> (slowly of course, and by maintained subsystem)
>
> $ git grep -E "^\s*\bextern(\s+\w+){1,4}\s*\(\s*[^\*]" drivers/net/ | wc -l
> 1445
>
> Maybe something like groups of:
> $ git grep -E --name-only "^\s*\bextern(\s+\w+){1,4}\s*\(\s*[^\*]" drivers/net/ | \
> cut -f3- -d"/" | cut -f1,2 -d"/" | uniq | \
> while read file ; do if [ -d drivers/net/$file ] ; then echo $file ; fi ; done
Sure.
^ permalink raw reply
* Re: [PATCH 01/12] tcp.h: Remove extern from function prototypes
From: Joe Perches @ 2013-09-23 20:44 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-kernel
In-Reply-To: <20130923.163010.976299939444640897.davem@davemloft.net>
On Mon, 2013-09-23 at 16:30 -0400, David Miller wrote:
> Series applied,
How about the same changes for the .h files in drivers/net ?
(slowly of course, and by maintained subsystem)
$ git grep -E "^\s*\bextern(\s+\w+){1,4}\s*\(\s*[^\*]" drivers/net/ | wc -l
1445
Maybe something like groups of:
$ git grep -E --name-only "^\s*\bextern(\s+\w+){1,4}\s*\(\s*[^\*]" drivers/net/ | \
cut -f3- -d"/" | cut -f1,2 -d"/" | uniq | \
while read file ; do if [ -d drivers/net/$file ] ; then echo $file ; fi ; done
can/mscan
can/softing
ethernet/8390
ethernet/adi
ethernet/amd
ethernet/atheros
ethernet/broadcom
ethernet/brocade
ethernet/chelsio
ethernet/cirrus
ethernet/emulex
ethernet/freescale
ethernet/ibm
ethernet/intel
ethernet/mellanox
ethernet/natsemi
ethernet/octeon
ethernet/oki-semi
ethernet/qlogic
ethernet/sfc
ethernet/stmicro
ethernet/ti
ethernet/toshiba
fddi/skfp
wimax/i2400m
wireless/ath
wireless/brcm80211
wireless/ipw2x00
wireless/iwlegacy
wireless/iwlwifi
wireless/mwifiex
wireless/orinoco
wireless/rtlwifi
^ permalink raw reply
* Re: [PATCH -next] openvswitch: remove duplicated include from vport-gre.c
From: Jesse Gross @ 2013-09-23 20:41 UTC (permalink / raw)
To: Wei Yongjun; +Cc: David Miller, yongjun_wei, dev@openvswitch.org, netdev
In-Reply-To: <CAPgLHd9a3ShUcYKn9Z4ES=AcAXUmRnHBNMMpni_Ot=zZekc7kw@mail.gmail.com>
On Mon, Sep 23, 2013 at 6:56 AM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Remove duplicated include.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Also applied.
^ permalink raw reply
* Re: [PATCH -next] openvswitch: remove duplicated include from vport-vxlan.c
From: Jesse Gross @ 2013-09-23 20:41 UTC (permalink / raw)
To: Wei Yongjun
Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org, netdev,
yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY, David Miller
In-Reply-To: <CAPgLHd_r4p2hYiL9nnwK64vck=f=sbhWrRZr32BdeW14ae63KQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Mon, Sep 23, 2013 at 6:55 AM, Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
>
> Remove duplicated include.
>
> Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
Applied.
^ permalink raw reply
* Re: [PATCH 12/12] sctp: Remove extern from function prototypes
From: Neil Horman @ 2013-09-23 20:39 UTC (permalink / raw)
To: Joe Perches
Cc: netdev, David S. Miller, linux-kernel, Vlad Yasevich, linux-sctp
In-Reply-To: <6738b115d30d40f33c688863f5421d84d2aa706c.1379961014.git.joe@perches.com>
On Mon, Sep 23, 2013 at 11:37:59AM -0700, Joe Perches wrote:
> There are a mix of function prototypes with and without extern
> in the kernel sources. Standardize on not using extern for
> function prototypes.
>
> Function prototypes don't need to be written with extern.
> extern is assumed by the compiler. Its use is as unnecessary as
> using auto to declare automatic/local variables in a block.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> include/net/sctp/sctp.h | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
> index 3794c5a..c5fe806 100644
> --- a/include/net/sctp/sctp.h
> +++ b/include/net/sctp/sctp.h
> @@ -90,12 +90,11 @@
> /*
> * sctp/protocol.c
> */
> -extern int sctp_copy_local_addr_list(struct net *, struct sctp_bind_addr *,
> - sctp_scope_t, gfp_t gfp,
> - int flags);
> -extern struct sctp_pf *sctp_get_pf_specific(sa_family_t family);
> -extern int sctp_register_pf(struct sctp_pf *, sa_family_t);
> -extern void sctp_addr_wq_mgmt(struct net *, struct sctp_sockaddr_entry *, int);
> +int sctp_copy_local_addr_list(struct net *, struct sctp_bind_addr *,
> + sctp_scope_t, gfp_t gfp, int flags);
> +struct sctp_pf *sctp_get_pf_specific(sa_family_t family);
> +int sctp_register_pf(struct sctp_pf *, sa_family_t);
> +void sctp_addr_wq_mgmt(struct net *, struct sctp_sockaddr_entry *, int);
>
> /*
> * sctp/socket.c
> @@ -110,7 +109,7 @@ void sctp_sock_rfree(struct sk_buff *skb);
> void sctp_copy_sock(struct sock *newsk, struct sock *sk,
> struct sctp_association *asoc);
> extern struct percpu_counter sctp_sockets_allocated;
> -extern int sctp_asconf_mgmt(struct sctp_sock *, struct sctp_sockaddr_entry *);
> +int sctp_asconf_mgmt(struct sctp_sock *, struct sctp_sockaddr_entry *);
>
> /*
> * sctp/primitive.c
> --
> 1.8.1.2.459.gbcd45b4.dirty
>
>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply
* Re: [PATCH] stable_kernel_rules.txt: Exclude networking from stable rules
From: Joe Perches @ 2013-09-23 20:34 UTC (permalink / raw)
To: Christoph Hellwig
Cc: linux-doc, netdev, LKML, xfs, stephen, Mikulas Patocka,
Rob Landley, Greg Kroah-Hartman, David Miller
In-Reply-To: <20130922185104.GA7515@infradead.org>
On Sun, 2013-09-22 at 11:51 -0700, Christoph Hellwig wrote:
> This is also the preferred way to do it for XFS. Maybe word it in a way
> that we can easily add subsystems.
>
> To me it generally seems to be the best way to do it - having random Ccs
> and lots of stable trees doesn't seem like a very good way of handling
> it.
Maybe adding a mechanism to MAINTAINERS would be better.
Maybe a default B: (backport?) of stable@vger.kernel.org
with a per-subsystem override?
SUBSYSTEM TYPE
M: maintainer@email.address
L: list@email.address
S: Supported
F: file/pattern/
B: stable@email.address
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply
* Re: [Xen-devel] [PATCH net-next] xen-netfront: convert to GRO API and advertise this feature
From: Anirban Chakraborty @ 2013-09-23 20:32 UTC (permalink / raw)
To: annie li
Cc: Jason Wang, Wei Liu, <netdev@vger.kernel.org>, Ian Campbell,
<xen-devel@lists.xen.org>
In-Reply-To: <523FDE24.5060902@oracle.com>
On Sep 22, 2013, at 11:22 PM, annie li <annie.li@oracle.com> wrote:
>
> On 2013-9-23 13:02, Jason Wang wrote:
>> On 09/23/2013 07:04 AM, Anirban Chakraborty wrote:
>>> On Sep 22, 2013, at 5:09 AM, Wei Liu <wei.liu2@citrix.com> wrote:
>>>
>>>> On Sun, Sep 22, 2013 at 02:29:15PM +0800, Jason Wang wrote:
>>>>> On 09/22/2013 12:05 AM, Wei Liu wrote:
>>>>>> Anirban was seeing netfront received MTU size packets, which downgraded
>>>>>> throughput. The following patch makes netfront use GRO API which
>>>>>> improves throughput for that case.
>>>>>>
>>>>>> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
>>>>>> Signed-off-by: Anirban Chakraborty <abchak@juniper.net>
>>>>>> Cc: Ian Campbell <ian.campbell@citrix.com>
>>>>> Maybe a dumb question: doesn't Xen depends on the driver of host card to
>>>>> do GRO and pass it to netfront? What the case that netfront can receive
>>>> The would be the ideal situation. Netback pushes large packets to
>>>> netfront and netfront sees large packets.
>>>>
>>>>> a MTU size packet, for a card that does not support GRO in host? Doing
>>>> However Anirban saw the case when backend interface receives large
>>>> packets but netfront sees MTU size packets, so my thought is there is
>>>> certain configuration that leads to this issue. As we cannot tell
>>>> users what to enable and what not to enable so I would like to solve
>>>> this within our driver.
>>>>
>>>>> GRO twice may introduce extra overheads.
>>>>>
>>>> AIUI if the packet that frontend sees is large already then the GRO path
>>>> is quite short which will not introduce heavy penalty, while on the
>>>> other hand if packet is segmented doing GRO improves throughput.
>>>>
>>> Thanks Wei, for explaining and submitting the patch. I would like add following to what you have already mentioned.
>>> In my configuration, I was seeing netback was pushing large packets to the guest (Centos 6.4) but the netfront was receiving MTU sized packets. With this patch on, I do see large packets received on the guest interface. As a result there was substantial throughput improvement in the guest side (2.8 Gbps to 3.8 Gbps). Also, note that the host NIC driver was enabled for GRO already.
>>>
>>> -Anirban
>> In this case, even if you still want to do GRO. It's better to find the
>> root cause of why the GSO packet were segmented
>
> Totally agree, we need to find the cause why large packets is segmented only in different host case.
It appears (from looking at the netback code) that although GSO is turned on at the netback, the guest receives large packet:
1. if it is a local packet (vm to vm on the same host), in which case netfront does a LRO or,
2. via turning on GRO explicitly (with this patch).
-Anirban
^ 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