* [PATCH] i40e: limit client interface to X722 hardware
@ 2017-04-04 14:34 ` Stefan Assmann
0 siblings, 0 replies; 10+ messages in thread
From: Stefan Assmann @ 2017-04-04 14:34 UTC (permalink / raw)
To: intel-wired-lan; +Cc: netdev, davem, jeffrey.t.kirsher, sassmann
The client interface is meant for X722 iWARP support. Modprobing i40iw
on systems with X710/XL710 NICs currently may crash the system. Adding a
check which limits client interface access to the appropriate hardware.
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
---
drivers/net/ethernet/intel/i40e/i40e_client.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.c b/drivers/net/ethernet/intel/i40e/i40e_client.c
index 191028b..6f873449 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_client.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_client.c
@@ -525,15 +525,17 @@ static void i40e_client_release(struct i40e_client *client)
static void i40e_client_prepare(struct i40e_client *client)
{
struct i40e_device *ldev;
- struct i40e_pf *pf;
mutex_lock(&i40e_device_mutex);
list_for_each_entry(ldev, &i40e_devices, list) {
- pf = ldev->pf;
- i40e_client_add_instance(pf);
- /* Start the client subtask */
- pf->flags |= I40E_FLAG_SERVICE_CLIENT_REQUESTED;
- i40e_service_event_schedule(pf);
+ struct i40e_pf *pf = ldev->pf;
+
+ if (pf->hw.mac.type == I40E_MAC_X722) {
+ i40e_client_add_instance(pf);
+ /* Start the client subtask */
+ pf->flags |= I40E_FLAG_SERVICE_CLIENT_REQUESTED;
+ i40e_service_event_schedule(pf);
+ }
}
mutex_unlock(&i40e_device_mutex);
}
--
2.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Intel-wired-lan] [PATCH] i40e: limit client interface to X722 hardware
@ 2017-04-04 14:34 ` Stefan Assmann
0 siblings, 0 replies; 10+ messages in thread
From: Stefan Assmann @ 2017-04-04 14:34 UTC (permalink / raw)
To: intel-wired-lan
The client interface is meant for X722 iWARP support. Modprobing i40iw
on systems with X710/XL710 NICs currently may crash the system. Adding a
check which limits client interface access to the appropriate hardware.
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
---
drivers/net/ethernet/intel/i40e/i40e_client.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.c b/drivers/net/ethernet/intel/i40e/i40e_client.c
index 191028b..6f873449 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_client.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_client.c
@@ -525,15 +525,17 @@ static void i40e_client_release(struct i40e_client *client)
static void i40e_client_prepare(struct i40e_client *client)
{
struct i40e_device *ldev;
- struct i40e_pf *pf;
mutex_lock(&i40e_device_mutex);
list_for_each_entry(ldev, &i40e_devices, list) {
- pf = ldev->pf;
- i40e_client_add_instance(pf);
- /* Start the client subtask */
- pf->flags |= I40E_FLAG_SERVICE_CLIENT_REQUESTED;
- i40e_service_event_schedule(pf);
+ struct i40e_pf *pf = ldev->pf;
+
+ if (pf->hw.mac.type == I40E_MAC_X722) {
+ i40e_client_add_instance(pf);
+ /* Start the client subtask */
+ pf->flags |= I40E_FLAG_SERVICE_CLIENT_REQUESTED;
+ i40e_service_event_schedule(pf);
+ }
}
mutex_unlock(&i40e_device_mutex);
}
--
2.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* RE: [PATCH] i40e: limit client interface to X722 hardware
2017-04-04 14:34 ` [Intel-wired-lan] " Stefan Assmann
@ 2017-04-04 16:33 ` Williams, Mitch A
-1 siblings, 0 replies; 10+ messages in thread
From: Williams, Mitch A @ 2017-04-04 16:33 UTC (permalink / raw)
To: 'Stefan Assmann', intel-wired-lan
Cc: netdev, davem, Kirsher, Jeffrey T
> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On
> Behalf Of Stefan Assmann
> Sent: Tuesday, April 04, 2017 7:35 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; davem@davemloft.net; Kirsher, Jeffrey T
> <jeffrey.t.kirsher@intel.com>; sassmann@kpanic.de
> Subject: [PATCH] i40e: limit client interface to X722 hardware
>
> The client interface is meant for X722 iWARP support. Modprobing i40iw
> on systems with X710/XL710 NICs currently may crash the system. Adding a
> check which limits client interface access to the appropriate hardware.
>
> Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
> ---
> drivers/net/ethernet/intel/i40e/i40e_client.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.c
> b/drivers/net/ethernet/intel/i40e/i40e_client.c
> index 191028b..6f873449 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_client.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_client.c
> @@ -525,15 +525,17 @@ static void i40e_client_release(struct i40e_client
> *client)
> static void i40e_client_prepare(struct i40e_client *client)
> {
> struct i40e_device *ldev;
> - struct i40e_pf *pf;
>
> mutex_lock(&i40e_device_mutex);
> list_for_each_entry(ldev, &i40e_devices, list) {
> - pf = ldev->pf;
> - i40e_client_add_instance(pf);
> - /* Start the client subtask */
> - pf->flags |= I40E_FLAG_SERVICE_CLIENT_REQUESTED;
> - i40e_service_event_schedule(pf);
> + struct i40e_pf *pf = ldev->pf;
> +
> + if (pf->hw.mac.type == I40E_MAC_X722) {
> + i40e_client_add_instance(pf);
> + /* Start the client subtask */
> + pf->flags |= I40E_FLAG_SERVICE_CLIENT_REQUESTED;
> + i40e_service_event_schedule(pf);
> + }
> }
> mutex_unlock(&i40e_device_mutex);
> }
> --
> 2.9.3
Thanks for pointing this out, Stephan. I think that's not exactly the right way to do this check. Instead, we need to look at the IWARP flag. I'll get a patch out today to take care of it.
So consider this a thankful NAK.
-Mitch
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Intel-wired-lan] [PATCH] i40e: limit client interface to X722 hardware
@ 2017-04-04 16:33 ` Williams, Mitch A
0 siblings, 0 replies; 10+ messages in thread
From: Williams, Mitch A @ 2017-04-04 16:33 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: netdev-owner at vger.kernel.org [mailto:netdev-owner at vger.kernel.org] On
> Behalf Of Stefan Assmann
> Sent: Tuesday, April 04, 2017 7:35 AM
> To: intel-wired-lan at lists.osuosl.org
> Cc: netdev at vger.kernel.org; davem at davemloft.net; Kirsher, Jeffrey T
> <jeffrey.t.kirsher@intel.com>; sassmann at kpanic.de
> Subject: [PATCH] i40e: limit client interface to X722 hardware
>
> The client interface is meant for X722 iWARP support. Modprobing i40iw
> on systems with X710/XL710 NICs currently may crash the system. Adding a
> check which limits client interface access to the appropriate hardware.
>
> Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
> ---
> drivers/net/ethernet/intel/i40e/i40e_client.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.c
> b/drivers/net/ethernet/intel/i40e/i40e_client.c
> index 191028b..6f873449 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_client.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_client.c
> @@ -525,15 +525,17 @@ static void i40e_client_release(struct i40e_client
> *client)
> static void i40e_client_prepare(struct i40e_client *client)
> {
> struct i40e_device *ldev;
> - struct i40e_pf *pf;
>
> mutex_lock(&i40e_device_mutex);
> list_for_each_entry(ldev, &i40e_devices, list) {
> - pf = ldev->pf;
> - i40e_client_add_instance(pf);
> - /* Start the client subtask */
> - pf->flags |= I40E_FLAG_SERVICE_CLIENT_REQUESTED;
> - i40e_service_event_schedule(pf);
> + struct i40e_pf *pf = ldev->pf;
> +
> + if (pf->hw.mac.type == I40E_MAC_X722) {
> + i40e_client_add_instance(pf);
> + /* Start the client subtask */
> + pf->flags |= I40E_FLAG_SERVICE_CLIENT_REQUESTED;
> + i40e_service_event_schedule(pf);
> + }
> }
> mutex_unlock(&i40e_device_mutex);
> }
> --
> 2.9.3
Thanks for pointing this out, Stephan. I think that's not exactly the right way to do this check. Instead, we need to look at the IWARP flag. I'll get a patch out today to take care of it.
So consider this a thankful NAK.
-Mitch
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] i40e: limit client interface to X722 hardware
2017-04-04 14:34 ` [Intel-wired-lan] " Stefan Assmann
@ 2017-04-04 16:56 ` Or Gerlitz
-1 siblings, 0 replies; 10+ messages in thread
From: Or Gerlitz @ 2017-04-04 16:56 UTC (permalink / raw)
To: Stefan Assmann
Cc: intel-wired-lan, Linux Netdev List, David Miller, Jeff Kirsher
On Tue, Apr 4, 2017 at 5:34 PM, Stefan Assmann <sassmann@kpanic.de> wrote:
> The client interface is meant for X722 iWARP support. Modprobing i40iw
> on systems with X710/XL710 NICs currently may crash the system.
just curious may or crash? and why?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Intel-wired-lan] [PATCH] i40e: limit client interface to X722 hardware
@ 2017-04-04 16:56 ` Or Gerlitz
0 siblings, 0 replies; 10+ messages in thread
From: Or Gerlitz @ 2017-04-04 16:56 UTC (permalink / raw)
To: intel-wired-lan
On Tue, Apr 4, 2017 at 5:34 PM, Stefan Assmann <sassmann@kpanic.de> wrote:
> The client interface is meant for X722 iWARP support. Modprobing i40iw
> on systems with X710/XL710 NICs currently may crash the system.
just curious may or crash? and why?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] i40e: limit client interface to X722 hardware
2017-04-04 16:56 ` [Intel-wired-lan] " Or Gerlitz
@ 2017-04-04 19:51 ` Stefan Assmann
-1 siblings, 0 replies; 10+ messages in thread
From: Stefan Assmann @ 2017-04-04 19:51 UTC (permalink / raw)
To: Or Gerlitz; +Cc: intel-wired-lan, Linux Netdev List, David Miller, Jeff Kirsher
On 04.04.2017 18:56, Or Gerlitz wrote:
> On Tue, Apr 4, 2017 at 5:34 PM, Stefan Assmann <sassmann@kpanic.de> wrote:
>> The client interface is meant for X722 iWARP support. Modprobing i40iw
>> on systems with X710/XL710 NICs currently may crash the system.
>
> just curious may or crash? and why?
The backtrace I got was not really conclusive. The code is not meant to
be run on that hardware so I didn't bother to dig deeper.
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Intel-wired-lan] [PATCH] i40e: limit client interface to X722 hardware
@ 2017-04-04 19:51 ` Stefan Assmann
0 siblings, 0 replies; 10+ messages in thread
From: Stefan Assmann @ 2017-04-04 19:51 UTC (permalink / raw)
To: intel-wired-lan
On 04.04.2017 18:56, Or Gerlitz wrote:
> On Tue, Apr 4, 2017 at 5:34 PM, Stefan Assmann <sassmann@kpanic.de> wrote:
>> The client interface is meant for X722 iWARP support. Modprobing i40iw
>> on systems with X710/XL710 NICs currently may crash the system.
>
> just curious may or crash? and why?
The backtrace I got was not really conclusive. The code is not meant to
be run on that hardware so I didn't bother to dig deeper.
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] i40e: limit client interface to X722 hardware
2017-04-04 19:51 ` [Intel-wired-lan] " Stefan Assmann
@ 2017-04-04 22:51 ` Williams, Mitch A
-1 siblings, 0 replies; 10+ messages in thread
From: Williams, Mitch A @ 2017-04-04 22:51 UTC (permalink / raw)
To: 'Stefan Assmann', Or Gerlitz
Cc: intel-wired-lan, Linux Netdev List, David Miller, Kirsher, Jeffrey T
> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On
> Behalf Of Stefan Assmann
> Sent: Tuesday, April 04, 2017 12:52 PM
> To: Or Gerlitz <gerlitz.or@gmail.com>
> Cc: intel-wired-lan@lists.osuosl.org; Linux Netdev List
> <netdev@vger.kernel.org>; David Miller <davem@davemloft.net>; Kirsher,
> Jeffrey T <jeffrey.t.kirsher@intel.com>
> Subject: Re: [PATCH] i40e: limit client interface to X722 hardware
>
> On 04.04.2017 18:56, Or Gerlitz wrote:
> > On Tue, Apr 4, 2017 at 5:34 PM, Stefan Assmann <sassmann@kpanic.de> wrote:
> >> The client interface is meant for X722 iWARP support. Modprobing i40iw
> >> on systems with X710/XL710 NICs currently may crash the system.
> >
> > just curious may or crash? and why?
>
> The backtrace I got was not really conclusive. The code is not meant to
> be run on that hardware so I didn't bother to dig deeper.
>
> Stefan
The i40iw module can't easily determine which hardware its loaded upon. So it assumes that we (i40e, that is) have handed it a handle to valid hardware. When the interface is opened, it starts reading and writing registers that are nonexistent on X710/XL710.
-Mitch
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Intel-wired-lan] [PATCH] i40e: limit client interface to X722 hardware
@ 2017-04-04 22:51 ` Williams, Mitch A
0 siblings, 0 replies; 10+ messages in thread
From: Williams, Mitch A @ 2017-04-04 22:51 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: netdev-owner at vger.kernel.org [mailto:netdev-owner at vger.kernel.org] On
> Behalf Of Stefan Assmann
> Sent: Tuesday, April 04, 2017 12:52 PM
> To: Or Gerlitz <gerlitz.or@gmail.com>
> Cc: intel-wired-lan at lists.osuosl.org; Linux Netdev List
> <netdev@vger.kernel.org>; David Miller <davem@davemloft.net>; Kirsher,
> Jeffrey T <jeffrey.t.kirsher@intel.com>
> Subject: Re: [PATCH] i40e: limit client interface to X722 hardware
>
> On 04.04.2017 18:56, Or Gerlitz wrote:
> > On Tue, Apr 4, 2017 at 5:34 PM, Stefan Assmann <sassmann@kpanic.de> wrote:
> >> The client interface is meant for X722 iWARP support. Modprobing i40iw
> >> on systems with X710/XL710 NICs currently may crash the system.
> >
> > just curious may or crash? and why?
>
> The backtrace I got was not really conclusive. The code is not meant to
> be run on that hardware so I didn't bother to dig deeper.
>
> Stefan
The i40iw module can't easily determine which hardware its loaded upon. So it assumes that we (i40e, that is) have handed it a handle to valid hardware. When the interface is opened, it starts reading and writing registers that are nonexistent on X710/XL710.
-Mitch
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2017-04-04 22:51 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-04 14:34 [PATCH] i40e: limit client interface to X722 hardware Stefan Assmann
2017-04-04 14:34 ` [Intel-wired-lan] " Stefan Assmann
2017-04-04 16:33 ` Williams, Mitch A
2017-04-04 16:33 ` [Intel-wired-lan] " Williams, Mitch A
2017-04-04 16:56 ` Or Gerlitz
2017-04-04 16:56 ` [Intel-wired-lan] " Or Gerlitz
2017-04-04 19:51 ` Stefan Assmann
2017-04-04 19:51 ` [Intel-wired-lan] " Stefan Assmann
2017-04-04 22:51 ` Williams, Mitch A
2017-04-04 22:51 ` [Intel-wired-lan] " Williams, Mitch A
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.