* Re: [PATCH] Phonet: sockets list through proc_fs
From: Rémi Denis-Courmont @ 2009-07-20 9:47 UTC (permalink / raw)
To: netdev@vger.kernel.org
In-Reply-To: <1248082487.4549.102.camel@violet>
On Monday 20 July 2009 12:34:47 ext Marcel Holtmann wrote:
> Hi Remi,
>
> > > > From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> > >
> > > isn't there are proper explaining commit message missing here?
> >
> > AFAIK, a one-liners stick to the Subject line.
> >
> > (I use explicit From: due to my broken Microsoft-provided MTA).
>
> the From: is not the problem here. However it would be nice to have a
> description of the change. Especially details like this is for debugging
> or this is a public API or etc.
It's just like most network protocols exposing their sockets list in
/proc/net. Debugging/monitoring indeed.
--
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki
^ permalink raw reply
* Re: [PATCH] Phonet: sockets list through proc_fs
From: Marcel Holtmann @ 2009-07-20 9:34 UTC (permalink / raw)
To: Rémi Denis-Courmont; +Cc: netdev@vger.kernel.org
In-Reply-To: <200907201228.47125.remi.denis-courmont@nokia.com>
Hi Remi,
> > > From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> >
> > isn't there are proper explaining commit message missing here?
>
> AFAIK, a one-liners stick to the Subject line.
>
> (I use explicit From: due to my broken Microsoft-provided MTA).
the From: is not the problem here. However it would be nice to have a
description of the change. Especially details like this is for debugging
or this is a public API or etc.
Regards
Marcel
^ permalink raw reply
* Re: [PATCH] Phonet: sockets list through proc_fs
From: Rémi Denis-Courmont @ 2009-07-20 9:28 UTC (permalink / raw)
To: netdev@vger.kernel.org
In-Reply-To: <1248079015.4549.101.camel@violet>
On Monday 20 July 2009 11:36:55 ext Marcel Holtmann wrote:
> Hi Remi,
>
> > From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
>
> isn't there are proper explaining commit message missing here?
AFAIK, a one-liners stick to the Subject line.
(I use explicit From: due to my broken Microsoft-provided MTA).
--
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki
^ permalink raw reply
* Re: [PATCH] Phonet: sockets list through proc_fs
From: Eric Dumazet @ 2009-07-20 9:05 UTC (permalink / raw)
To: Rémi Denis-Courmont; +Cc: netdev
In-Reply-To: <1248078849-7343-1-git-send-email-remi.denis-courmont@nokia.com>
Rémi Denis-Courmont a écrit :
> From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
>
> +static int pn_sock_seq_show(struct seq_file *seq, void *v)
> +{
> + int len;
> +
> + 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);
> + 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 %p %d%n",
> + sk->sk_protocol, pn->sobject, 0, pn->resource,
> + sk->sk_state,
> + atomic_read(&sk->sk_wmem_alloc),
> + atomic_read(&sk->sk_rmem_alloc),
Please use sk_wmem_alloc_get(sk) and sk_rmem_alloc_get(sk)
> + sock_i_uid(sk), sock_i_ino(sk),
> + atomic_read(&sk->sk_refcnt), sk,
> + atomic_read(&sk->sk_drops), &len);
> + }
> + seq_printf(seq, "%*s\n", 127 - len, "");
> + return 0;
> +}
^ permalink raw reply
* Re: [RFC] [PATCH 2/7] crypto: authenc - convert to ahash
From: Herbert Xu @ 2009-07-20 8:50 UTC (permalink / raw)
To: Steffen Klassert
Cc: David Miller, linux-crypto, netdev, Jens Axboe,
Linux Kernel Mailing List
In-Reply-To: <20090720083640.GD20288@secunet.com>
On Mon, Jul 20, 2009 at 10:36:40AM +0200, Steffen Klassert wrote:
>
> For the crypto-layer it's just scatterwalk_sg_chain() that removes the
> termination bit.
The history behind this is that the crypto layer has used chaining
way before generic chaining was invented. When the generic code
was added I tried to convert crypto over to that, however, that
failed because generic chaining was not ported to every architecture.
So that's why the crypto layer still retains its own chaining.
> For the block-layer it's blk_rq_map_integrity_sg() and two times in
> blk_rq_map_sg().
I suppose we should ask Jens whether he thinks this is worth adding
an interface over?
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: [PATCH] Phonet: sockets list through proc_fs
From: Marcel Holtmann @ 2009-07-20 8:36 UTC (permalink / raw)
To: Rémi Denis-Courmont; +Cc: netdev
In-Reply-To: <1248078849-7343-1-git-send-email-remi.denis-courmont@nokia.com>
Hi Remi,
> From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
isn't there are proper explaining commit message missing here?
> Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> ---
> include/net/phonet/pn_dev.h | 2 +
> net/phonet/pn_dev.c | 7 +++
> net/phonet/socket.c | 97 +++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 106 insertions(+), 0 deletions(-)
>
> diff --git a/include/net/phonet/pn_dev.h b/include/net/phonet/pn_dev.h
> index 29d1267..44c923c 100644
> --- a/include/net/phonet/pn_dev.h
> +++ b/include/net/phonet/pn_dev.h
> @@ -49,4 +49,6 @@ void phonet_address_notify(int event, struct net_device *dev, u8 addr);
>
> #define PN_NO_ADDR 0xff
>
> +extern const struct file_operations pn_sock_seq_fops;
> +
> #endif
> diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
> index b0d6ddd..5107b79 100644
> --- a/net/phonet/pn_dev.c
> +++ b/net/phonet/pn_dev.c
> @@ -218,6 +218,11 @@ static int phonet_init_net(struct net *net)
> if (!pnn)
> return -ENOMEM;
>
> + if (!proc_net_fops_create(net, "phonet", 0, &pn_sock_seq_fops)) {
> + kfree(pnn);
> + return -ENOMEM;
> + }
> +
> INIT_LIST_HEAD(&pnn->pndevs.list);
> spin_lock_init(&pnn->pndevs.lock);
> net_assign_generic(net, phonet_net_id, pnn);
> @@ -233,6 +238,8 @@ static void phonet_exit_net(struct net *net)
> for_each_netdev(net, dev)
> phonet_device_destroy(dev);
> rtnl_unlock();
> +
> + proc_net_remove(net, "phonet");
> kfree(pnn);
> }
>
> diff --git a/net/phonet/socket.c b/net/phonet/socket.c
> index ada2a35..2a99851 100644
> --- a/net/phonet/socket.c
> +++ b/net/phonet/socket.c
> @@ -412,3 +412,100 @@ found:
> return 0;
> }
> EXPORT_SYMBOL(pn_sock_get_port);
> +
> +static struct sock *pn_sock_get_idx(struct seq_file *seq, loff_t pos)
> +{
> + struct net *net = seq_file_net(seq);
> + struct hlist_node *node;
> + struct sock *sknode;
> +
> + sk_for_each(sknode, node, &pnsocks.hlist) {
> + if (!net_eq(net, sock_net(sknode)))
> + continue;
> + if (!pos)
> + return sknode;
> + pos--;
> + }
> + return NULL;
> +}
> +
> +static struct sock *pn_sock_get_next(struct seq_file *seq, struct sock *sk)
> +{
> + struct net *net = seq_file_net(seq);
> +
> + do
> + sk = sk_next(sk);
> + while (sk && !net_eq(net, sock_net(sk)));
> +
> + return sk;
> +}
> +
> +static void *pn_sock_seq_start(struct seq_file *seq, loff_t *pos)
> + __acquires(pnsocks.lock)
> +{
> + spin_lock_bh(&pnsocks.lock);
> + return *pos ? pn_sock_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
> +}
> +
> +static void *pn_sock_seq_next(struct seq_file *seq, void *v, loff_t *pos)
> +{
> + struct sock *sk;
> +
> + if (v == SEQ_START_TOKEN)
> + sk = pn_sock_get_idx(seq, 0);
> + else
> + sk = pn_sock_get_next(seq, v);
> + (*pos)++;
> + return sk;
> +}
> +
> +static void pn_sock_seq_stop(struct seq_file *seq, void *v)
> + __releases(pnsocks.lock)
> +{
> + spin_unlock_bh(&pnsocks.lock);
> +}
> +
> +static int pn_sock_seq_show(struct seq_file *seq, void *v)
> +{
> + int len;
> +
> + 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);
> + 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 %p %d%n",
> + sk->sk_protocol, pn->sobject, 0, pn->resource,
> + sk->sk_state,
> + atomic_read(&sk->sk_wmem_alloc),
> + atomic_read(&sk->sk_rmem_alloc),
> + sock_i_uid(sk), sock_i_ino(sk),
> + atomic_read(&sk->sk_refcnt), sk,
> + atomic_read(&sk->sk_drops), &len);
> + }
> + seq_printf(seq, "%*s\n", 127 - len, "");
> + return 0;
> +}
The more appropriate place for this would be debugfs.
Regards
Marcel
^ permalink raw reply
* Re: [RFC] [PATCH 2/7] crypto: authenc - convert to ahash
From: Steffen Klassert @ 2009-07-20 8:36 UTC (permalink / raw)
To: Herbert Xu; +Cc: David Miller, linux-crypto, netdev
In-Reply-To: <20090720082116.GA4797@gondor.apana.org.au>
On Mon, Jul 20, 2009 at 04:21:16PM +0800, Herbert Xu wrote:
>
> Can you point me to the existing code?
>
For the crypto-layer it's just scatterwalk_sg_chain() that removes the
termination bit.
For the block-layer it's blk_rq_map_integrity_sg() and two times in
blk_rq_map_sg().
^ permalink raw reply
* [PATCH] Phonet: sockets list through proc_fs
From: Rémi Denis-Courmont @ 2009-07-20 8:34 UTC (permalink / raw)
To: netdev
From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
---
include/net/phonet/pn_dev.h | 2 +
net/phonet/pn_dev.c | 7 +++
net/phonet/socket.c | 97 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 106 insertions(+), 0 deletions(-)
diff --git a/include/net/phonet/pn_dev.h b/include/net/phonet/pn_dev.h
index 29d1267..44c923c 100644
--- a/include/net/phonet/pn_dev.h
+++ b/include/net/phonet/pn_dev.h
@@ -49,4 +49,6 @@ void phonet_address_notify(int event, struct net_device *dev, u8 addr);
#define PN_NO_ADDR 0xff
+extern const struct file_operations pn_sock_seq_fops;
+
#endif
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
index b0d6ddd..5107b79 100644
--- a/net/phonet/pn_dev.c
+++ b/net/phonet/pn_dev.c
@@ -218,6 +218,11 @@ static int phonet_init_net(struct net *net)
if (!pnn)
return -ENOMEM;
+ if (!proc_net_fops_create(net, "phonet", 0, &pn_sock_seq_fops)) {
+ kfree(pnn);
+ return -ENOMEM;
+ }
+
INIT_LIST_HEAD(&pnn->pndevs.list);
spin_lock_init(&pnn->pndevs.lock);
net_assign_generic(net, phonet_net_id, pnn);
@@ -233,6 +238,8 @@ static void phonet_exit_net(struct net *net)
for_each_netdev(net, dev)
phonet_device_destroy(dev);
rtnl_unlock();
+
+ proc_net_remove(net, "phonet");
kfree(pnn);
}
diff --git a/net/phonet/socket.c b/net/phonet/socket.c
index ada2a35..2a99851 100644
--- a/net/phonet/socket.c
+++ b/net/phonet/socket.c
@@ -412,3 +412,100 @@ found:
return 0;
}
EXPORT_SYMBOL(pn_sock_get_port);
+
+static struct sock *pn_sock_get_idx(struct seq_file *seq, loff_t pos)
+{
+ struct net *net = seq_file_net(seq);
+ struct hlist_node *node;
+ struct sock *sknode;
+
+ sk_for_each(sknode, node, &pnsocks.hlist) {
+ if (!net_eq(net, sock_net(sknode)))
+ continue;
+ if (!pos)
+ return sknode;
+ pos--;
+ }
+ return NULL;
+}
+
+static struct sock *pn_sock_get_next(struct seq_file *seq, struct sock *sk)
+{
+ struct net *net = seq_file_net(seq);
+
+ do
+ sk = sk_next(sk);
+ while (sk && !net_eq(net, sock_net(sk)));
+
+ return sk;
+}
+
+static void *pn_sock_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(pnsocks.lock)
+{
+ spin_lock_bh(&pnsocks.lock);
+ return *pos ? pn_sock_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
+}
+
+static void *pn_sock_seq_next(struct seq_file *seq, void *v, loff_t *pos)
+{
+ struct sock *sk;
+
+ if (v == SEQ_START_TOKEN)
+ sk = pn_sock_get_idx(seq, 0);
+ else
+ sk = pn_sock_get_next(seq, v);
+ (*pos)++;
+ return sk;
+}
+
+static void pn_sock_seq_stop(struct seq_file *seq, void *v)
+ __releases(pnsocks.lock)
+{
+ spin_unlock_bh(&pnsocks.lock);
+}
+
+static int pn_sock_seq_show(struct seq_file *seq, void *v)
+{
+ int len;
+
+ 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);
+ 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 %p %d%n",
+ sk->sk_protocol, pn->sobject, 0, pn->resource,
+ sk->sk_state,
+ atomic_read(&sk->sk_wmem_alloc),
+ atomic_read(&sk->sk_rmem_alloc),
+ sock_i_uid(sk), sock_i_ino(sk),
+ atomic_read(&sk->sk_refcnt), sk,
+ atomic_read(&sk->sk_drops), &len);
+ }
+ seq_printf(seq, "%*s\n", 127 - len, "");
+ return 0;
+}
+
+static const struct seq_operations pn_sock_seq_ops = {
+ .start = pn_sock_seq_start,
+ .next = pn_sock_seq_next,
+ .stop = pn_sock_seq_stop,
+ .show = pn_sock_seq_show,
+};
+
+static int pn_sock_open(struct inode *inode, struct file *file)
+{
+ return seq_open(file, &pn_sock_seq_ops);
+}
+
+const struct file_operations pn_sock_seq_fops = {
+ .owner = THIS_MODULE,
+ .open = pn_sock_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
+};
--
1.6.0.4
^ permalink raw reply related
* Re: [RFC] [PATCH 2/7] crypto: authenc - convert to ahash
From: Herbert Xu @ 2009-07-20 8:21 UTC (permalink / raw)
To: Steffen Klassert; +Cc: David Miller, linux-crypto, netdev
In-Reply-To: <20090720075701.GC20288@secunet.com>
On Mon, Jul 20, 2009 at 09:57:01AM +0200, Steffen Klassert wrote:
>
> Agreed for this case. What about the existing code, should we create an
> interface for it?
Can you point me to the existing code?
Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* RE: SRIOV fails with "SR-IOV: bus number out of range"
From: Sivakumar Subramani @ 2009-07-20 8:16 UTC (permalink / raw)
To: Yu Zhao; +Cc: netdev
In-Reply-To: <4A3877EB.7020109@intel.com>
[-- Attachment #1: Type: text/plain, Size: 7811 bytes --]
Hi,
Our card supports 4 virtual function. And I am getting following error
message from srio_enable function. Any idea on this error message? I
have attached the lspci output for reference.
Thanks,
~Siva
Jul 20 01:11:58 SuSE11 kernel: vxge: Copyright(c) 2002-2009 Neterion Inc
Jul 20 01:11:58 SuSE11 kernel: vxge: Driver version: 0.0.0.0-svn
Jul 20 01:11:58 SuSE11 kernel: vxge 0000:03:00.0: PCI INT A -> GSI 16
(level, low) -> IRQ 16
Jul 20 01:11:58 SuSE11 kernel: vxge 0000:03:00.0: setting latency timer
to 64
Jul 20 01:11:58 SuSE11 kernel: virtfn_bus is 4
Jul 20 01:11:58 SuSE11 kernel: nr_virtfn is 4
Jul 20 01:11:58 SuSE11 kernel: dev->bus->subordinate is 3
Jul 20 01:11:58 SuSE11 kernel: vxge 0000:03:00.0: SR-IOV: bus number out
of range <<===============================Error
Jul 20 01:11:58 SuSE11 kernel: eth2: SERIAL NUMBER: SXJ0841025
Jul 20 01:11:58 SuSE11 kernel: eth2: PART NUMBER: X3110SR0001
Jul 20 01:11:58 SuSE11 kernel: eth2: Neterion PCIe 10 GbE Adapter,
single port, SFP+ SR Server Adapter
Jul 20 01:11:58 SuSE11 kernel: eth2: MAC ADDR: 00:0C:FC:00:B6:B5
Jul 20 01:11:58 SuSE11 kernel: eth2: Link Width x4
Jul 20 01:11:58 SuSE11 kernel: eth2: Firmware version : 1.1.0 Date :
06/17/2009
Jul 20 01:11:58 SuSE11 kernel: eth2: Single Root IOV Mode Enabled
Jul 20 01:11:58 SuSE11 kernel: eth2: 1 Vpath(s) opened
Jul 20 01:11:58 SuSE11 kernel: eth2: Interrupt type MSI-X
Jul 20 01:11:58 SuSE11 kernel: eth2: RTH steering disabled
Jul 20 01:11:58 SuSE11 kernel: eth2: Tx steering disabled
Jul 20 01:11:58 SuSE11 kernel: eth2: Large receive offload enabled
Jul 20 01:11:58 SuSE11 kernel: eth2: NAPI enabled
Jul 20 01:11:58 SuSE11 kernel: eth2: Rx doorbell mode enabled
Jul 20 01:11:58 SuSE11 kernel: eth2: VLAN tag stripping enabled
Jul 20 01:11:58 SuSE11 kernel: eth2: Ring blocks : 2
Jul 20 01:11:58 SuSE11 kernel: eth2: Fifo blocks : 12
Thanks,
~Siva
-----Original Message-----
From: Yu Zhao [mailto:yu.zhao@intel.com]
Sent: Wednesday, June 17, 2009 10:28 AM
To: Sivakumar Subramani
Cc: netdev@vger.kernel.org
Subject: Re: SRIOV fails with "not enough MMIO resources"
Sivakumar Subramani wrote:
> Sorry for the delay in reply. I got the setup back today. The PF BAR4
> size is 32M. BAR0 of each VF is 8M. I loading the driver with 4 VFs.
I
> am facing this problem, even if I load it with 3 VFs.
OK, I see the problem. The total VFs supported by your SR-IOV device is
8 (0a:00.0/1) and 16 (09:00.0). And the VF MMIO area is calculated by
size of VF BAR multiplied total VFs. Passing 3 or 4 to
pci_enable_sriov() can not reduce the VF MMIO area size.
So please hardcode the total VFs to 4 before you get a BIOS that
supports the SR-IOV:
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index b497daa..5ba6da0 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -430,6 +430,7 @@ static int sriov_init(struct pci_dev *dev, int pos)
if (!total)
return 0;
+ total = 4;
ctrl = 0;
list_for_each_entry(pdev, &dev->bus->devices, bus_list)
if (pdev->is_physfn)
> I have attached the code of sriov_init / sriov_enable /
quirk_vxge_sriov
> and the log of the debug statements that I have added in these
function.
> Please let you know your comments.
>
> </Siva>
>
> Thanks,
> ~Siva
> -----Original Message-----
> From: Yu Zhao [mailto:yu.zhao@intel.com]
> Sent: Tuesday, June 09, 2009 11:40 AM
> To: Sreenivasa Honnur
> Cc: netdev@vger.kernel.org; Sivakumar Subramani
> Subject: Re: SRIOV fails with "not enough MMIO resources"
>
> Sreenivasa Honnur wrote:
>> Hi,
>>
>> I added pci_enable_sriov / pci_disable_sriov in probe and remove
>> function for Neterion X3100 card to test SRIOV feature. While testing
> I
>> got following error.
>>
>> Jun 8 00:02:59 bethweidel kernel: vxge: Copyright(c) 2002-2009
> Neterion
>> Inc Jun 8 00:02:59 bethweidel kernel: vxge: Driver version:
>> 2.0.1.17129-k Jun 8 00:02:59 bethweidel kernel: vxge 0000:03:00.0:
PCI
>> INT A -> GSI 16 (level, low) -> IRQ 16 Jun 8 00:02:59 bethweidel
> kernel:
>> res->parent is ffff88013f129d28 for 2 Jun 8 00:02:59 bethweidel
> kernel:
>> res->parent is ffff88013f129d28 for 4 Jun 8 00:02:59 bethweidel
> kernel:
>> nres = 2 - iov->nres = 3 Jun 8 00:02:59 bethweidel kernel: vxge
>> 0000:03:00.0: not enough MMIO resources for SR-IOV ----> ERROR Jun 8
>> 00:02:59 bethweidel kernel: pci_enable_sriov returned -12 Jun 8
> 00:02:59
>> bethweidel kernel: eth2: SERIAL NUMBER: SXC0919196 Jun 8 00:02:59
>> bethweidel kernel: eth2: PART NUMBER: X3110SR0003
>>
>>
>>
>> When I dumped the config space of SRIOV Capability, I found BAR0 of
> VFs
>> was not configured by BIOS and it was zero. So I added following
>> "quirk_vxge_sriov" quirk function to configure the BAR2 of PF as BAR0
> of
>> VFs.
>>
>> Now lspci shows proper value. But I am still get same error. The code
>> that dumps this error is as follow. Here I trying to find out the
> reason
>> why res->parent is not updated for BAR0 of VF. From the above log, I
> can
>> see that Bar2 and BAR4's res->parent are update.
>>
>> Any possible reason why res->parent of VF's BAR0 is not updated?
>
> Is the size of the PF BAR 4 big enough to cover the VF MMIO area
> indicated by VF BAR 0? (size of the PF BAR 4 >= size of VF BAR 0 *
> NumVFs).
>
> Can you please post the whole dmesg? I might be able to root cause the
> problem after looking at it.
>
>> sriov_enable :
>>
>> --------------
>>
>> nres = 0;
>>
>> for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) {
>>
>> res = dev->resource + PCI_IOV_RESOURCES + i;
>>
>> if (res->parent) {
>>
>> printk("res->parent is %llx for %d \n", res->parent,i );
>>
>> nres++;
>>
>> }
>>
>> }
>>
>> printk("nres = %d - iov->nres = %d \n", nres, iov->nres);
>>
>> if (nres != iov->nres) {
>>
>> dev_err(&dev->dev, "not enough MMIO resources for SR-IOV\n");
>>
>> return -ENOMEM;
>>
>> }
>>
>>
>>
>> quirk_vxge_sriov:
>>
>> -----------------
>>
>> static void __devinit quirk_vxge_sriov(struct pci_dev *dev) {
>>
>> int pos, flags;
>>
>> u32 bar, start, size;
>>
>> printk("Entering quirk_vxge_sriov ...\n");
>>
>> if (PAGE_SIZE > 0x10000) {
>>
>> printk("Returning quirk_vxge_sriov @%d \n", __LINE__);
>>
>> return;
>>
>> }
>>
>> pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_SRIOV);
>>
>> printk("the pos is %d \n", pos);
>>
>> if (!pos) {
>>
>> printk("Returning quirk_vxge_sriov @%d \n", __LINE__);
>>
>> return;
>>
>> }
>>
>> pci_read_config_dword(dev, pos + PCI_SRIOV_BAR, &bar);
>>
>> if (bar & PCI_BASE_ADDRESS_MEM_MASK)
>>
>> {
>>
>> printk("Returning quirk_vxge_sriov @%d \n", __LINE__);
>>
>> return;
>>
>> }
>>
>> start = pci_resource_start(dev, 4);
>>
>> size = pci_resource_len(dev, 4);
>>
>> printk("Bar4 start %llx - size %llx \n", start, size);
>>
>> if (!start || size != 0x2000000 || start & (size - 1)) {
>>
>> printk("Returning quirk_vxge_sriov @%d \n", __LINE__);
>>
>> return;
>>
>> }
>>
>> pci_resource_flags(dev, 4) = 0;
>>
>> pci_write_config_dword(dev, PCI_BASE_ADDRESS_4, 0);
>>
>> pci_write_config_dword(dev, pos + PCI_SRIOV_BAR, start);
>>
>> pci_read_config_dword(dev, pos+PCI_SRIOV_BAR,&bar);
>>
>> printk("VF's Bar0 is %llx \n", bar);
>>
>> dev_info(&dev->dev, "use Flash Memory Space for SR-IOV BARs\n");
>>
>> printk("Exiting quirk_vxge_sriov ...\n"); }
>>
>>
>>
>> Thanks,
>>
>> ~Siva
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: lspci_log --]
[-- Type: application/octet-stream, Size: 16654 bytes --]
03:00.0 Ethernet controller: S2io Inc. Device 5833 (rev 01)
Subsystem: S2io Inc. Device 6030
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 16
Region 0: Memory at fa800000 (64-bit, prefetchable) [size=8M]
Region 2: Memory at fa7ff000 (64-bit, prefetchable) [size=4K]
Region 4: Memory at <unassigned> (64-bit, prefetchable)
Expansion ROM at fbd80000 [disabled] [size=512K]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [70] Express (v1) Endpoint, MSI 08
DevCap: MaxPayload 4096 bytes, PhantFunc 0, Latency L0s <2us, L1 <2us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x8, ASPM L0s L1, Latency L0 <256ns, L1 <4us
ClockPM- Suprise- LLActRep+ BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x4, TrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-
Capabilities: [a0] MSI-X: Enable- Mask- TabSize=4
Vector table: BAR=2 offset=00000000
PBA: BAR=2 offset=00000800
Capabilities: [c0] Vital Product Data <?>
Capabilities: [50] Message Signalled Interrupts: Mask+ 64bit+ Count=1/32 Enable-
Address: 0000000000000000 Data: 0000
Masking: 00000000 Pending: 00000000
Capabilities: [100] Alternative Routing-ID Interpretation (ARI)
ARICap: MFVC- ACS-, Next Function: 0
ARICtl: MFVC- ACS-, Function Group: 0
Capabilities: [110] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSVoil-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSVoil-
UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSVoil-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Device Serial Number b5-b6-00-00-00-fc-0c-00
Capabilities: [170] Single Root I/O Virtualization (SR-IOV)
IOVCap: Migration-, Interrupt Message Number: 000
IOVCtl: Enable- Migration- Interrupt- MSE- ARIHierarchy-
IOVSta: Migration-
Initial VFs: 4, Total VFs: 4, Number of VFs: 4, Function Dependency Link: 00
VF offset: 257, stride: 1, Device ID: 5833
Supported Page Size: 000007ff, System Page Size: 00000001
VF Migration: offset: 00000000, BIR: 1
Capabilities: [1b0] #11
Kernel driver in use: vxge
00: d5 17 33 58 46 01 10 00 01 00 00 02 10 00 00 00
10: 0c 00 80 fa 00 00 00 00 0c f0 7f fa 00 00 00 00
20: 0c 00 00 00 00 00 00 00 00 00 00 00 d5 17 30 60
30: 00 00 d8 fb 40 00 00 00 00 00 00 00 0a 01 00 00
40: 01 70 23 7e 00 00 00 00 00 00 00 00 00 00 00 00
50: 05 00 8a 01 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 10 a0 01 10 45 83 00 10 10 28 00 00 81 2c 11 00
80: 40 00 41 30 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 11 00 00 00 03 00 00 00 00 00 00 00
a0: 11 c0 03 00 02 00 00 00 02 08 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 03 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
100: 0e 00 01 11 00 00 00 00 00 00 00 00 00 00 00 00
110: 01 00 01 15 00 00 00 00 00 00 00 00 10 20 06 00
120: 00 20 00 00 00 20 00 00 a0 00 00 00 00 00 00 00
130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
150: 04 00 01 16 00 00 00 00 00 00 01 00 01 00 00 00
160: 03 00 01 17 b5 b6 00 00 00 fc 0c 00 00 00 00 00
170: 10 00 01 1b 00 00 00 00 00 00 00 00 04 00 04 00
180: 04 00 00 00 01 01 01 00 00 00 33 58 ff 07 00 00
190: 01 00 00 00 0c 00 00 f8 00 00 00 00 0c 00 00 fa
1a0: 00 00 00 00 0c 80 00 fa 00 00 00 00 00 00 00 00
1b0: 11 00 01 00 38 00 00 00 00 00 00 00 00 00 00 00
1c0: 00 00 00 00 00 00 00 00 00 00 10 00 00 00 00 00
1d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
220: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
230: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
240: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
250: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
260: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
270: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
290: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
350: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
360: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
370: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
390: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
3a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
3b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
3c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
3d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
3e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
3f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
410: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
420: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
430: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
440: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
450: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
460: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
470: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
490: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
4a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
4b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
4c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
4d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
4e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
4f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
510: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
520: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
530: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
540: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
560: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
570: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
590: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
5a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
5b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
5c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
5d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
5e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
5f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
610: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
620: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
630: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
640: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
650: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
660: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
670: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
690: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
6a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
6b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
6c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
6d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
6e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
6f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
700: 49 00 db 00 ff ff ff ff 04 00 00 00 01 56 00 13
710: 20 01 0f 00 00 00 00 00 aa 43 00 20 00 05 00 00
720: 00 00 00 00 00 00 00 00 11 6b 6b 02 10 00 00 08
730: 40 00 01 00 01 00 01 00 ff ff 0f 00 00 00 00 00
740: 0f 00 00 00 00 00 00 00 0d f2 27 00 59 f0 27 00
750: 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00
760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
790: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
7a0: 00 00 00 00 00 00 00 00 00 06 7f 00 b2 00 7f 00
7b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
7c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
7d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
7e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
7f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
810: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
820: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
830: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
840: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
850: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
860: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
870: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
890: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
8a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
8b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
8c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
8d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
8e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
8f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
910: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
920: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
930: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
940: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
950: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
960: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
970: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
990: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
9a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
9b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
9c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
9d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
9e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
9f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
aa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ab0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ac0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ad0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ae0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
af0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ba0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
bb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
bc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
bd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
be0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
bf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ca0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
cb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
cc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
cd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ce0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
cf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
da0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
db0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
dc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
dd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
de0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
df0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
eb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ec0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ed0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ee0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ef0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
fa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^ permalink raw reply related
* Re: zero features for a vlan over bond / vlan features
From: Or Gerlitz @ 2009-07-20 8:08 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: David Miller, netdev
In-Reply-To: <4A2CDB16.9030000@Voltaire.com>
Or Gerlitz wrote:
> Jay, I have tested with your patch and indeed now, vlan-over-bond (e.g bond0.4001) advertises features to the stack wheres before it didn't. Below is the patch you sent with the debugging prints removed and my signature added, I would be happy if you set the change-log && your signature and push it further to Dave. I'm also find if you prefer that I'll do that.
>
> Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
>
Hi Jay,
This (http://marc.info/?l=linux-netdev&m=124445367820790) is pending
quite a lot of time and already missed 2.6.31, please let me know if you
prefer that I will push it directly to Dave, or you want to do so, thanks
Or.
^ permalink raw reply
* Re: [RFC] [PATCH 2/7] crypto: authenc - convert to ahash
From: Steffen Klassert @ 2009-07-20 7:57 UTC (permalink / raw)
To: Herbert Xu; +Cc: David Miller, linux-crypto, netdev
In-Reply-To: <20090720065514.GB4026@gondor.apana.org.au>
On Mon, Jul 20, 2009 at 02:55:14PM +0800, Herbert Xu wrote:
>
> For the case at hand, as we've agreed to only do the chaining
> if there is only a single entry in the list, we don't need this
> at all. All you need to do is copy the page pointer, offset and
> length without copying the raw scatterlist entry.
>
Agreed for this case. What about the existing code, should we create an
interface for it?
^ permalink raw reply
* Re: getaddrinfo - too many recvmsg calls
From: Eric Dumazet @ 2009-07-20 7:55 UTC (permalink / raw)
To: Rémi Denis-Courmont; +Cc: ext Zsolt SZALAI, netdev@vger.kernel.org
In-Reply-To: <200907201014.18063.remi.denis-courmont@nokia.com>
Rémi Denis-Courmont a écrit :
> On Monday 20 July 2009 10:05:56 ext Zsolt SZALAI wrote:
>> The sanitycheck is now really simple, just a
>> addrinfo hints = { 0, AF_INET, 0, 0, 0, NULL, NULL, NULL };
>> int result = getaddrinfo(ipAddress, NULL, &hints, &addresses);
>> call.
>
> What the heck is this supposed to do?
> This piece of code tries to resolve <ipAddress> as numerical IPv4 address *or*
> a DNS hostname.
>
> If you want to check that a string is a valid IP address, call inet_pton(). If
> you want to check that an IP address is assigned to the system, create a
> socket and bind to that address.
>
Yes, but beware of ip_nonlocal_bind option (/proc/sys/net/ipv4/ip_nonlocal_bind).
If set to one, bind() will not tell you if address is assigned to the system.
^ permalink raw reply
* [RFC] [PATCH] Don't run __qdisc_run() on a stopped TX queue
From: Krishna Kumar @ 2009-07-20 7:46 UTC (permalink / raw)
To: davem, herbert; +Cc: netdev, Krishna Kumar
From: Krishna Kumar <krkumar2@in.ibm.com>
Driver sends an skb and stops the queue if no more space is
available on the device, and returns OK. When dev_queue_xmit
runs for the next skb, it enqueue's the skb & calls qdisc_run.
qdisc_run dequeue's the skb and finds the queue is stopped
after getting the HARD_LOCK_TX, and puts the skb back on
gso_skb (the next iteration fails faster at dequeue_skb).
This patch avoids calling __qdisc_run if the queue is stopped.
This also lets us remove the queue_stopped check in dequeue_skb
and in qdisc_restart. When the queue is re-enabled, it runs with
one less queue_stopped() check for every skb on the queue (we
still need to own the __QDISC_STATE_RUNNING bit to catch the
stopped condition correctly since stopped cannot be set without
holding this bit).
Results for 3 iteration testing for 1, 4, 8, 12 netperf sessions
running for 1 minute each:
-----------------------------------------------------------------
System-X P6
-----------------------------------------------------------------
Size ORG BW NEW BW ORG BW NEW BW
-----------------------------------------------------------------
16K 72183.05 74417.79 60775.76 63413.17
128K 69097.87 72447.12 61692.16 62251.07
256K 60456.21 61415.81 59694.03 61641.81
-----------------------------------------------------------------
Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
---
include/net/pkt_sched.h | 9 +++++++--
net/sched/sch_generic.c | 9 ++-------
2 files changed, 9 insertions(+), 9 deletions(-)
diff -ruNp org/include/net/pkt_sched.h new/include/net/pkt_sched.h
--- org/include/net/pkt_sched.h 2009-06-22 11:40:31.000000000 +0530
+++ new/include/net/pkt_sched.h 2009-07-20 13:09:18.000000000 +0530
@@ -92,8 +92,13 @@ extern void __qdisc_run(struct Qdisc *q)
static inline void qdisc_run(struct Qdisc *q)
{
- if (!test_and_set_bit(__QDISC_STATE_RUNNING, &q->state))
- __qdisc_run(q);
+ if (!test_and_set_bit(__QDISC_STATE_RUNNING, &q->state)) {
+ if (!netif_tx_queue_stopped(q->dev_queue))
+ __qdisc_run(q);
+ else
+ /* driver will wake us up anyway, just clear */
+ clear_bit(__QDISC_STATE_RUNNING, &q->state);
+ }
}
extern int tc_classify_compat(struct sk_buff *skb, struct tcf_proto *tp,
diff -ruNp org/net/sched/sch_generic.c new/net/sched/sch_generic.c
--- org/net/sched/sch_generic.c 2009-05-25 07:48:07.000000000 +0530
+++ new/net/sched/sch_generic.c 2009-07-20 13:09:18.000000000 +0530
@@ -56,12 +56,8 @@ static inline struct sk_buff *dequeue_sk
struct sk_buff *skb = q->gso_skb;
if (unlikely(skb)) {
- struct net_device *dev = qdisc_dev(q);
- struct netdev_queue *txq;
-
/* check the reason of requeuing without tx lock first */
- txq = netdev_get_tx_queue(dev, skb_get_queue_mapping(skb));
- if (!netif_tx_queue_stopped(txq) && !netif_tx_queue_frozen(txq))
+ if (!netif_tx_queue_frozen(q->dev_queue))
q->gso_skb = NULL;
else
skb = NULL;
@@ -142,8 +138,7 @@ static inline int qdisc_restart(struct Q
txq = netdev_get_tx_queue(dev, skb_get_queue_mapping(skb));
HARD_TX_LOCK(dev, txq, smp_processor_id());
- if (!netif_tx_queue_stopped(txq) &&
- !netif_tx_queue_frozen(txq))
+ if (!netif_tx_queue_frozen(txq))
ret = dev_hard_start_xmit(skb, dev, txq);
HARD_TX_UNLOCK(dev, txq);
^ permalink raw reply
* Re: getaddrinfo - too many recvmsg calls
From: Rémi Denis-Courmont @ 2009-07-20 7:14 UTC (permalink / raw)
To: ext Zsolt SZALAI; +Cc: netdev@vger.kernel.org
In-Reply-To: <dffc28000907200005p7effca1cif4060b15be99e84@mail.gmail.com>
On Monday 20 July 2009 10:05:56 ext Zsolt SZALAI wrote:
> The sanitycheck is now really simple, just a
> addrinfo hints = { 0, AF_INET, 0, 0, 0, NULL, NULL, NULL };
> int result = getaddrinfo(ipAddress, NULL, &hints, &addresses);
> call.
What the heck is this supposed to do?
This piece of code tries to resolve <ipAddress> as numerical IPv4 address *or*
a DNS hostname.
If you want to check that a string is a valid IP address, call inet_pton(). If
you want to check that an IP address is assigned to the system, create a
socket and bind to that address.
--
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki
^ permalink raw reply
* getaddrinfo - too many recvmsg calls
From: Zsolt SZALAI @ 2009-07-20 7:05 UTC (permalink / raw)
To: netdev
Hi!
I'm working with a host that contains sometimes thousands of virtual
ip address.
One of our third-party application calls getaddrinfo for
sanity-checking the given IP.
I've noticed that recvmsg calls inside getaddrinfo are proportioned to
the number of VIPs, causing high system load and "hanging" user
experience when there are lots of VIPs and also the sanitychecks may
have to happen 2-5 times in a second.
The sanitycheck is now really simple, just a
addrinfo hints = { 0, AF_INET, 0, 0, 0, NULL, NULL, NULL };
int result = getaddrinfo(ipAddress, NULL, &hints, &addresses);
call.
I've also noticed that when the vips are configured with `ip` and not
with `ifconfig`, the number of recvmsg calls drops down by a 0.5
multiplier.
Could you advise some other method or optimized execution for this
checks for the environment described?
Or should it be just skipped?
Thanks,
Zsolt Szalai
^ permalink raw reply
* Re: [RFC] [PATCH 2/7] crypto: authenc - convert to ahash
From: Herbert Xu @ 2009-07-20 6:55 UTC (permalink / raw)
To: Steffen Klassert; +Cc: David Miller, linux-crypto, netdev
In-Reply-To: <20090720062643.GA20288@secunet.com>
On Mon, Jul 20, 2009 at 08:26:43AM +0200, Steffen Klassert wrote:
>
> We have sg_mark_end() which sets the termination bit on a sg list entry,
> but we don't have an interface to remove the termination bit from a sg
> list entry.
For the case at hand, as we've agreed to only do the chaining
if there is only a single entry in the list, we don't need this
at all. All you need to do is copy the page pointer, offset and
length without copying the raw scatterlist entry.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: [PATCH] USB host CDC Phonet network interface driver
From: Oliver Neukum @ 2009-07-20 6:41 UTC (permalink / raw)
To: Rémi Denis-Courmont
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <200907200935.19103.remi.denis-courmont-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
Am Montag, 20. Juli 2009 08:35:18 schrieb Rémi Denis-Courmont:
> Recurrently:
> If usbpn_xmit() is called, then the queue was not stopped, so tx_queue <
> tx_queue_len. Then the queue is stopped. In the race free cases, either
> tx_queue is incremented up to the limit, and the queue remains stopped; the
> assertion is still valid.
> Alternatively tx_queue remains below limit and the queue gets woken again;
> the assertion is still valid.
Yes, you are correct. I find no flaws with the driver.
Regards
Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] USB host CDC Phonet network interface driver
From: Rémi Denis-Courmont @ 2009-07-20 6:35 UTC (permalink / raw)
To: ext Oliver Neukum
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <200907171547.39815.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
On Friday 17 July 2009 16:47:38 ext Oliver Neukum wrote:
> Am Freitag, 17. Juli 2009 11:56:06 schrieb Rémi Denis-Courmont:
> > + atomic_dec(&pnd->tx_queue);
> > + netif_wake_queue(dev);
>
> Now that I think about it this seems to be a race condition.
> What makes sure that your are still below the limit when you
> wake the queue?
The netif TX queue serializes usbpn_xmit() against itself. Then, at all times:
tx_queue + !netif_queue_stopped() <= tx_queue_len (in other words either
tx_queue = tx_queue_len and queue is stopped, or tx_queue < tx_queue_len).
Initially:
0 + 1 <= tx_queue_len, the assertion is initially true.
Recurrently:
If usbpn_xmit() is called, then the queue was not stopped, so tx_queue <
tx_queue_len. Then the queue is stopped. In the race free cases, either
tx_queue is incremented up to the limit, and the queue remains stopped; the
assertion is still valid.
Alternatively tx_queue remains below limit and the queue gets woken again; the
assertion is still valid.
In the racy case, tx_complete() fires, incrementation in usbpn_xmit() and
decrementation in tx_complete() will cancel each other. So, regardless of
their respective order, tx_queue will be unchanged, and the assertion remains
valid. A fortiori, it works fine if usbpn_xmit() races with more than one call
of tx_complete().
The cases that tx_complete() runs while the queue is not transmitting is
evident.
--
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [RFC] [PATCH 2/7] crypto: authenc - convert to ahash
From: Steffen Klassert @ 2009-07-20 6:26 UTC (permalink / raw)
To: David Miller; +Cc: herbert, linux-crypto, netdev
In-Reply-To: <20090717.100334.160030992.davem@davemloft.net>
On Fri, Jul 17, 2009 at 10:03:34AM -0700, David Miller wrote:
> From: Steffen Klassert <steffen.klassert@secunet.com>
> Date: Thu, 16 Jul 2009 13:17:47 +0200
>
> > + /*
> > + * head must be a scatterlist with two entries.
> > + * We remove a potentially set termination bit
> > + * on the first enty.
> > + */
> > + head->page_link &= ~0x02;
> > +
> > if (chain) {
> > head->length += sg->length;
>
> Isn't there some interface to do this, rather than revealing the
> implementation details of how the scatter list marking works?
We have sg_mark_end() which sets the termination bit on a sg list entry,
but we don't have an interface to remove the termination bit from a sg
list entry.
>
> If not, such an interface should be created and used here. Otherwise
> any change in that implementation will break this code.
A grep over the kernel tree showed that just the block and the
crypto-layer doing this to chain sg lists. So we could create
sg_unmark_end() and use it there. If desired, I would do it.
^ permalink raw reply
* [PATCH] 3c589_cs: re-initialize the multicast in the tc589_reset
From: Ken Kawasaki @ 2009-07-19 23:08 UTC (permalink / raw)
To: netdev
In-Reply-To: <20090405094907.5f6a5fea.ken_kawasaki@spring.nifty.jp>
3c589_cs:
re-initialize the multicast in the tc589_reset,
and spin_lock the set_multicast_list function.
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- linux-2.6.31-rc3/drivers/net/pcmcia/3c589_cs.c.orig 2009-07-19 19:13:10.000000000 +0900
+++ linux-2.6.31-rc3/drivers/net/pcmcia/3c589_cs.c 2009-07-19 19:26:40.000000000 +0900
@@ -156,6 +156,7 @@ static struct net_device_stats *el3_get_
static int el3_rx(struct net_device *dev);
static int el3_close(struct net_device *dev);
static void el3_tx_timeout(struct net_device *dev);
+static void set_rx_mode(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
static const struct ethtool_ops netdev_ethtool_ops;
@@ -488,8 +489,7 @@ static void tc589_reset(struct net_devic
/* Switch to register set 1 for normal use. */
EL3WINDOW(1);
- /* Accept b-cast and phys addr only. */
- outw(SetRxFilter | RxStation | RxBroadcast, ioaddr + EL3_CMD);
+ set_rx_mode(dev);
outw(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */
outw(RxEnable, ioaddr + EL3_CMD); /* Enable the receiver. */
outw(TxEnable, ioaddr + EL3_CMD); /* Enable transmitter. */
@@ -700,7 +700,7 @@ static irqreturn_t el3_interrupt(int irq
if (fifo_diag & 0x2000) {
/* Rx underrun */
tc589_wait_for_completion(dev, RxReset);
- set_multicast_list(dev);
+ set_rx_mode(dev);
outw(RxEnable, ioaddr + EL3_CMD);
}
outw(AckIntr | AdapterFailure, ioaddr + EL3_CMD);
@@ -905,14 +905,11 @@ static int el3_rx(struct net_device *dev
return 0;
}
-static void set_multicast_list(struct net_device *dev)
+static void set_rx_mode(struct net_device *dev)
{
- struct el3_private *lp = netdev_priv(dev);
- struct pcmcia_device *link = lp->p_dev;
unsigned int ioaddr = dev->base_addr;
u16 opts = SetRxFilter | RxStation | RxBroadcast;
- if (!pcmcia_dev_present(link)) return;
if (dev->flags & IFF_PROMISC)
opts |= RxMulticast | RxProm;
else if (dev->mc_count || (dev->flags & IFF_ALLMULTI))
@@ -920,6 +917,16 @@ static void set_multicast_list(struct ne
outw(opts, ioaddr + EL3_CMD);
}
+static void set_multicast_list(struct net_device *dev)
+{
+ struct el3_private *priv = netdev_priv(dev);
+ unsigned long flags;
+
+ spin_lock_irqsave(&priv->lock, flags);
+ set_rx_mode(dev);
+ spin_unlock_irqrestore(&priv->lock, flags);
+}
+
static int el3_close(struct net_device *dev)
{
struct el3_private *lp = netdev_priv(dev);
^ permalink raw reply
* Re: [PATCH] drivers/net/mlx4: Adjust constant
From: Julia Lawall @ 2009-07-19 19:08 UTC (permalink / raw)
To: Joe Perches; +Cc: netdev, linux-kernel, kernel-janitors
In-Reply-To: <1248027891.31365.17.camel@Joe-Laptop.home>
Thanks for pointing this out. I will look into it.
julia
On Sun, 19 Jul 2009, Joe Perches wrote:
> On Sun, 2009-07-19 at 18:09 +0200, Julia Lawall wrote:
> > From: Julia Lawall <julia@diku.dk>
> >
> > The values in the advertising field are typically ADVERTISED_xxx, not
> > SUPPORTED_xxx. Both SUPPORTED_10000baseT_Full and
> > ADVERTISED_1000baseT_Full have the same value.
>
> other possibles:
>
> drivers/net/sungem.c:#define ADVERTISE_MASK (SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | \
> SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | \
> SUPPORTED_1000baseT_Half | SUPPORTED_1000baseT_Full | \
> SUPPORTED_Pause | SUPPORTED_Autoneg)
> drivers/net/s2io.c: info->advertising = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);
> drivers/net/spider_net.c: advertise |= SUPPORTED_1000baseT_Full;
> drivers/net/spider_net.c: advertise |= SUPPORTED_1000baseT_Half;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* [PATCH 4/4] inet: in_route.h redefined macro
From: Gerrit Renker @ 2009-07-19 18:23 UTC (permalink / raw)
To: davem; +Cc: netdev, Gerrit Renker
In-Reply-To: <1248027819-23959-4-git-send-email-gerrit@erg.abdn.ac.uk>
linux/in_route.h declares RT_TOS(), which is the same as IPTOS_TOS() from
linux/ip.h. The files that use RT_TOS() all also include linux/ip.h.
The patch removes duplication, all it does is s/RT_TOS/IPTOS_TOS/g.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
include/linux/in_route.h | 2 --
include/net/ip_vs.h | 2 +-
include/net/route.h | 2 +-
net/bridge/br_netfilter.c | 2 +-
net/ipv4/icmp.c | 6 +++---
net/ipv4/ip_gre.c | 6 +++---
net/ipv4/ip_output.c | 2 +-
net/ipv4/ipip.c | 4 ++--
net/ipv4/ipmr.c | 4 ++--
net/ipv4/netfilter.c | 4 ++--
net/ipv4/udp.c | 2 +-
net/ipv6/ip6_tunnel.c | 2 +-
net/ipv6/sit.c | 4 ++--
net/netfilter/ipvs/ip_vs_xmit.c | 10 +++++-----
14 files changed, 25 insertions(+), 27 deletions(-)
--- a/include/linux/in_route.h
+++ b/include/linux/in_route.h
@@ -27,6 +27,4 @@
#define RTCF_NAT (RTCF_DNAT|RTCF_SNAT)
-#define RT_TOS(tos) ((tos)&IPTOS_TOS_MASK)
-
#endif /* _LINUX_IN_ROUTE_H */
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -45,7 +45,7 @@
/* RTO_CONN is not used (being alias for 0), but preserved not to break
* some modules referring to it. */
-#define RT_CONN_FLAGS(sk) (RT_TOS(inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
+#define RT_CONN_FLAGS(sk) (IPTOS_TOS(inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
struct fib_nh;
struct inet_peer;
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -484,7 +484,7 @@ struct ip_vs_dest {
/* for destination cache */
spinlock_t dst_lock; /* lock of dst_cache */
struct dst_entry *dst_cache; /* destination cache entry */
- u32 dst_rtos; /* RT_TOS(tos) for dst */
+ u32 dst_rtos; /* IPTOS_TOS(tos) for dst */
/* for virtual service */
struct ip_vs_service *svc; /* service it belongs to */
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -355,7 +355,7 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
.ip4_u = {
.daddr = iph->daddr,
.saddr = 0,
- .tos = RT_TOS(iph->tos) },
+ .tos = IPTOS_TOS(iph->tos) },
},
.proto = 0,
};
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -385,7 +385,7 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb)
struct flowi fl = { .nl_u = { .ip4_u =
{ .daddr = daddr,
.saddr = rt->rt_spec_dst,
- .tos = RT_TOS(ip_hdr(skb)->tos) } },
+ .tos = IPTOS_TOS(ip_hdr(skb)->tos) } },
.proto = IPPROTO_ICMP };
security_skb_classify_flow(skb, &fl);
if (ip_route_output_key(net, &rt, &fl))
@@ -543,7 +543,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
icmp_param.replyopts.faddr :
iph->saddr,
.saddr = saddr,
- .tos = RT_TOS(tos)
+ .tos = IPTOS_TOS(tos)
}
},
.proto = IPPROTO_ICMP,
@@ -593,7 +593,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
/* Ugh! */
odst = skb_dst(skb_in);
err = ip_route_input(skb_in, fl.fl4_dst, fl.fl4_src,
- RT_TOS(tos), rt2->u.dst.dev);
+ IPTOS_TOS(tos), rt2->u.dst.dev);
dst_release(&rt2->u.dst);
rt2 = skb_rtable(skb_in);
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -746,7 +746,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
.nl_u = { .ip4_u =
{ .daddr = dst,
.saddr = tiph->saddr,
- .tos = RT_TOS(tos) } },
+ .tos = IPTOS_TOS(tos) } },
.proto = IPPROTO_GRE };
if (ip_route_output_key(dev_net(dev), &rt, &fl)) {
stats->tx_carrier_errors++;
@@ -920,7 +920,7 @@ static int ipgre_tunnel_bind_dev(struct net_device *dev)
.nl_u = { .ip4_u =
{ .daddr = iph->daddr,
.saddr = iph->saddr,
- .tos = RT_TOS(iph->tos) } },
+ .tos = IPTOS_TOS(iph->tos) } },
.proto = IPPROTO_GRE };
struct rtable *rt;
if (!ip_route_output_key(dev_net(dev), &rt, &fl)) {
@@ -1181,7 +1181,7 @@ static int ipgre_open(struct net_device *dev)
.nl_u = { .ip4_u =
{ .daddr = t->parms.iph.daddr,
.saddr = t->parms.iph.saddr,
- .tos = RT_TOS(t->parms.iph.tos) } },
+ .tos = IPTOS_TOS(t->parms.iph.tos) } },
.proto = IPPROTO_GRE };
struct rtable *rt;
if (ip_route_output_key(dev_net(dev), &rt, &fl))
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1381,7 +1381,7 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *ar
.nl_u = { .ip4_u =
{ .daddr = daddr,
.saddr = rt->rt_spec_dst,
- .tos = RT_TOS(ip_hdr(skb)->tos) } },
+ .tos = IPTOS_TOS(ip_hdr(skb)->tos) } },
/* Not quite clean, but right. */
.uli_u = { .ports =
{ .sport = tcp_hdr(skb)->dest,
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -428,7 +428,7 @@ static int ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
.nl_u = { .ip4_u =
{ .daddr = dst,
.saddr = tiph->saddr,
- .tos = RT_TOS(tos) } },
+ .tos = IPTOS_TOS(tos) } },
.proto = IPPROTO_IPIP };
if (ip_route_output_key(dev_net(dev), &rt, &fl)) {
stats->tx_carrier_errors++;
@@ -549,7 +549,7 @@ static void ipip_tunnel_bind_dev(struct net_device *dev)
.nl_u = { .ip4_u =
{ .daddr = iph->daddr,
.saddr = iph->saddr,
- .tos = RT_TOS(iph->tos) } },
+ .tos = IPTOS_TOS(iph->tos) } },
.proto = IPPROTO_IPIP };
struct rtable *rt;
if (!ip_route_output_key(dev_net(dev), &rt, &fl)) {
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1245,7 +1245,7 @@ static void ipmr_queue_xmit(struct sk_buff *skb, struct mfc_cache *c, int vifi)
.nl_u = { .ip4_u =
{ .daddr = vif->remote,
.saddr = vif->local,
- .tos = RT_TOS(iph->tos) } },
+ .tos = IPTOS_TOS(iph->tos) } },
.proto = IPPROTO_IPIP };
if (ip_route_output_key(net, &rt, &fl))
goto out_free;
@@ -1254,7 +1254,7 @@ static void ipmr_queue_xmit(struct sk_buff *skb, struct mfc_cache *c, int vifi)
struct flowi fl = { .oif = vif->link,
.nl_u = { .ip4_u =
{ .daddr = iph->daddr,
- .tos = RT_TOS(iph->tos) } },
+ .tos = IPTOS_TOS(iph->tos) } },
.proto = IPPROTO_IPIP };
if (ip_route_output_key(net, &rt, &fl))
goto out_free;
--- a/net/ipv4/netfilter.c
+++ b/net/ipv4/netfilter.c
@@ -33,7 +33,7 @@ int ip_route_me_harder(struct sk_buff *skb, unsigned addr_type)
fl.nl_u.ip4_u.daddr = iph->daddr;
if (type == RTN_LOCAL)
fl.nl_u.ip4_u.saddr = iph->saddr;
- fl.nl_u.ip4_u.tos = RT_TOS(iph->tos);
+ fl.nl_u.ip4_u.tos = IPTOS_TOS(iph->tos);
fl.oif = skb->sk ? skb->sk->sk_bound_dev_if : 0;
fl.mark = skb->mark;
fl.flags = skb->sk ? inet_sk_flowi_flags(skb->sk) : 0;
@@ -52,7 +52,7 @@ int ip_route_me_harder(struct sk_buff *skb, unsigned addr_type)
odst = skb_dst(skb);
if (ip_route_input(skb, iph->daddr, iph->saddr,
- RT_TOS(iph->tos), rt->u.dst.dev) != 0) {
+ IPTOS_TOS(iph->tos), rt->u.dst.dev) != 0) {
dst_release(&rt->u.dst);
return -1;
}
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -667,7 +667,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
faddr = ipc.opt->faddr;
connected = 0;
}
- tos = RT_TOS(inet->tos);
+ tos = IPTOS_TOS(inet->tos);
if (sock_flag(sk, SOCK_LOCALROUTE) ||
(msg->msg_flags & MSG_DONTROUTE) ||
(ipc.opt && ipc.opt->is_strictroute)) {
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -541,7 +541,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
/* Try to guess incoming interface */
memset(&fl, 0, sizeof(fl));
fl.fl4_dst = eiph->saddr;
- fl.fl4_tos = RT_TOS(eiph->tos);
+ fl.fl4_tos = IPTOS_TOS(eiph->tos);
fl.proto = IPPROTO_IPIP;
if (ip_route_output_key(dev_net(skb->dev), &rt, &fl))
goto out;
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -689,7 +689,7 @@ static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
struct flowi fl = { .nl_u = { .ip4_u =
{ .daddr = dst,
.saddr = tiph->saddr,
- .tos = RT_TOS(tos) } },
+ .tos = IPTOS_TOS(tos) } },
.oif = tunnel->parms.link,
.proto = IPPROTO_IPV6 };
if (ip_route_output_key(dev_net(dev), &rt, &fl)) {
@@ -818,7 +818,7 @@ static void ipip6_tunnel_bind_dev(struct net_device *dev)
struct flowi fl = { .nl_u = { .ip4_u =
{ .daddr = iph->daddr,
.saddr = iph->saddr,
- .tos = RT_TOS(iph->tos) } },
+ .tos = IPTOS_TOS(iph->tos) } },
.oif = tunnel->parms.link,
.proto = IPPROTO_IPV6 };
struct rtable *rt;
--- a/net/netfilter/ipvs/ip_vs_xmit.c
+++ b/net/netfilter/ipvs/ip_vs_xmit.c
@@ -229,7 +229,7 @@ ip_vs_bypass_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
.ip4_u = {
.daddr = iph->daddr,
.saddr = 0,
- .tos = RT_TOS(tos), } },
+ .tos = IPTOS_TOS(tos), } },
};
EnterFunction(10);
@@ -368,7 +368,7 @@ ip_vs_nat_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
IP_VS_DBG(10, "filled cport=%d\n", ntohs(*p));
}
- if (!(rt = __ip_vs_get_out_rt(cp, RT_TOS(iph->tos))))
+ if (!(rt = __ip_vs_get_out_rt(cp, IPTOS_TOS(iph->tos))))
goto tx_error_icmp;
/* MTU checking */
@@ -542,7 +542,7 @@ ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
goto tx_error;
}
- if (!(rt = __ip_vs_get_out_rt(cp, RT_TOS(tos))))
+ if (!(rt = __ip_vs_get_out_rt(cp, IPTOS_TOS(tos))))
goto tx_error_icmp;
tdev = rt->u.dst.dev;
@@ -752,7 +752,7 @@ ip_vs_dr_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
EnterFunction(10);
- if (!(rt = __ip_vs_get_out_rt(cp, RT_TOS(iph->tos))))
+ if (!(rt = __ip_vs_get_out_rt(cp, IPTOS_TOS(iph->tos))))
goto tx_error_icmp;
/* MTU checking */
@@ -880,7 +880,7 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
* mangle and send the packet here (only for VS/NAT)
*/
- if (!(rt = __ip_vs_get_out_rt(cp, RT_TOS(ip_hdr(skb)->tos))))
+ if (!(rt = __ip_vs_get_out_rt(cp, IPTOS_TOS(ip_hdr(skb)->tos))))
goto tx_error_icmp;
/* MTU checking */
^ permalink raw reply
* [RFC][PATCH 1/2] mcastv6: Local variable shadows function argument
From: Gerrit Renker @ 2009-07-19 18:38 UTC (permalink / raw)
To: davem; +Cc: netdev, Gerrit Renker
In-Reply-To: <1248028721-24244-1-git-send-email-gerrit@erg.abdn.ac.uk>
The local variable 'idev' shadows the function argument 'idev' to
ip6_mc_add_src().
Reported-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/ipv6/mcast.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -2107,7 +2107,6 @@ static int ip6_mc_add_src(struct inet6_d
for (j=0; j<i; j++)
(void) ip6_mc_del1_src(pmc, sfmode, &psfsrc[i]);
} else if (isexclude != (pmc->mca_sfcount[MCAST_EXCLUDE] != 0)) {
- struct inet6_dev *idev = pmc->idev;
struct ip6_sf_list *psf;
/* filter mode change */
@@ -2117,11 +2116,11 @@ static int ip6_mc_add_src(struct inet6_d
pmc->mca_sfmode = MCAST_INCLUDE;
/* else no filters; keep old mode for reports */
- pmc->mca_crcount = idev->mc_qrv;
- idev->mc_ifc_count = pmc->mca_crcount;
+ pmc->mca_crcount = pmc->idev->mc_qrv;
+ pmc->idev->mc_ifc_count = pmc->mca_crcount;
for (psf=pmc->mca_sources; psf; psf = psf->sf_next)
psf->sf_crcount = 0;
- mld_ifc_event(idev);
+ mld_ifc_event(pmc->idev);
} else if (sf_setstate(pmc))
mld_ifc_event(idev);
spin_unlock_bh(&pmc->mca_lock);
^ permalink raw reply
* [RFC][PATCH 2/2] inet6: sysctl pointers shadow global pointer
From: Gerrit Renker @ 2009-07-19 18:38 UTC (permalink / raw)
To: davem; +Cc: netdev, Gerrit Renker
In-Reply-To: <1248028721-24244-2-git-send-email-gerrit@erg.abdn.ac.uk>
net/ipv6/sysctl_net_ipv6.c:64:19: warning: symbol 'ipv6_table' shadows an earlier one
net/ipv6/sysctl_net_ipv6.c:107:19: warning: symbol 'ipv6_table' shadows an earlier one
net/ipv6/sysctl_net_ipv6.c:43:18: originally declared here
The only place where 'ipv6_table' is not shadowed is in ipv6_sysctl_register().
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/ipv6/sysctl_net_ipv6.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -40,7 +40,7 @@ static ctl_table ipv6_table_template[] =
{ .ctl_name = 0 }
};
-static ctl_table ipv6_table[] = {
+static ctl_table ipv6_rotable[] = {
{
.ctl_name = NET_IPV6_MLD_MAX_MSF,
.procname = "mld_max_msf",
@@ -130,7 +130,7 @@ int ipv6_sysctl_register(void)
{
int err = -ENOMEM;
- ip6_header = register_net_sysctl_rotable(net_ipv6_ctl_path, ipv6_table);
+ ip6_header = register_net_sysctl_rotable(net_ipv6_ctl_path, ipv6_rotable);
if (ip6_header == NULL)
goto out;
^ 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