All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i40evf: Use le32_to_cpu before evaluating HW desc fields.
@ 2017-05-01 23:15 ` Tushar Dave
  0 siblings, 0 replies; 10+ messages in thread
From: Tushar Dave @ 2017-05-01 23:15 UTC (permalink / raw)
  To: jeffrey.t.kirsher, intel-wired-lan, netdev

i40e hardware descriptor fields are in little-endian format. Driver
must use le32_to_cpu while evaluating these fields otherwise on
big-endian arch we end up evaluating incorrect values, cause errors
like:

i40evf 0001:04:02.0: Expected response 0 from PF, received 285212672
i40evf 0001:04:02.1: Expected response 0 from PF, received 285212672

Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index f35dcaa..2c1dfaf 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1923,8 +1923,10 @@ static void i40evf_adminq_task(struct work_struct *work)
 		if (ret || !v_msg->v_opcode)
 			break; /* No event to process or error cleaning ARQ */
 
-		i40evf_virtchnl_completion(adapter, v_msg->v_opcode,
-					   v_msg->v_retval, event.msg_buf,
+		i40evf_virtchnl_completion(adapter,
+					   le32_to_cpu(v_msg->v_opcode),
+					   le32_to_cpu(v_msg->v_retval),
+					   event.msg_buf,
 					   event.msg_len);
 		if (pending != 0)
 			memset(event.msg_buf, 0, I40EVF_MAX_AQ_BUF_SIZE);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH] i40evf: Use le32_to_cpu before evaluating HW desc fields.
@ 2017-05-01 23:15 ` Tushar Dave
  0 siblings, 0 replies; 10+ messages in thread
From: Tushar Dave @ 2017-05-01 23:15 UTC (permalink / raw)
  To: intel-wired-lan

i40e hardware descriptor fields are in little-endian format. Driver
must use le32_to_cpu while evaluating these fields otherwise on
big-endian arch we end up evaluating incorrect values, cause errors
like:

i40evf 0001:04:02.0: Expected response 0 from PF, received 285212672
i40evf 0001:04:02.1: Expected response 0 from PF, received 285212672

Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index f35dcaa..2c1dfaf 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1923,8 +1923,10 @@ static void i40evf_adminq_task(struct work_struct *work)
 		if (ret || !v_msg->v_opcode)
 			break; /* No event to process or error cleaning ARQ */
 
-		i40evf_virtchnl_completion(adapter, v_msg->v_opcode,
-					   v_msg->v_retval, event.msg_buf,
+		i40evf_virtchnl_completion(adapter,
+					   le32_to_cpu(v_msg->v_opcode),
+					   le32_to_cpu(v_msg->v_retval),
+					   event.msg_buf,
 					   event.msg_len);
 		if (pending != 0)
 			memset(event.msg_buf, 0, I40EVF_MAX_AQ_BUF_SIZE);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH] i40evf: Use le32_to_cpu before evaluating HW desc fields.
  2017-05-01 23:15 ` [Intel-wired-lan] " Tushar Dave
  (?)
@ 2017-05-16 23:07 ` Jeff Kirsher
  2017-05-18 18:05   ` tndave
  2017-05-20  1:12   ` tndave
  -1 siblings, 2 replies; 10+ messages in thread
From: Jeff Kirsher @ 2017-05-16 23:07 UTC (permalink / raw)
  To: intel-wired-lan

On Mon, 2017-05-01 at 16:15 -0700, Tushar Dave wrote:
> i40e hardware descriptor fields are in little-endian format. Driver
> must use le32_to_cpu while evaluating these fields otherwise on
> big-endian arch we end up evaluating incorrect values, cause errors
> like:
> 
> i40evf 0001:04:02.0: Expected response 0 from PF, received 285212672
> i40evf 0001:04:02.1: Expected response 0 from PF, received 285212672
> 
> Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
> ---
> ?drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 ++++--
> ?1 file changed, 4 insertions(+), 2 deletions(-)

Due to recent patches already applied to my tree, this patch does not
apply cleanly.  Feel free to send an updated patch, if the change is
still needed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20170516/a2b82788/attachment.asc>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH] i40evf: Use le32_to_cpu before evaluating HW desc fields.
  2017-05-16 23:07 ` Jeff Kirsher
@ 2017-05-18 18:05   ` tndave
  2017-05-20  1:12   ` tndave
  1 sibling, 0 replies; 10+ messages in thread
From: tndave @ 2017-05-18 18:05 UTC (permalink / raw)
  To: intel-wired-lan



On 05/16/2017 04:07 PM, Jeff Kirsher wrote:
> On Mon, 2017-05-01 at 16:15 -0700, Tushar Dave wrote:
>> i40e hardware descriptor fields are in little-endian format. Driver
>> must use le32_to_cpu while evaluating these fields otherwise on
>> big-endian arch we end up evaluating incorrect values, cause errors
>> like:
>>
>> i40evf 0001:04:02.0: Expected response 0 from PF, received 285212672
>> i40evf 0001:04:02.1: Expected response 0 from PF, received 285212672
>>
>> Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
>> ---
>>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> Due to recent patches already applied to my tree, this patch does not
> apply cleanly.  Feel free to send an updated patch, if the change is
> still needed.
Okay. I will send v2.
Thanks.

-Tushar
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH] i40evf: Use le32_to_cpu before evaluating HW desc fields.
  2017-05-16 23:07 ` Jeff Kirsher
  2017-05-18 18:05   ` tndave
@ 2017-05-20  1:12   ` tndave
  2017-05-21 23:08     ` Alexander Duyck
  2017-05-22 19:36     ` Jeff Kirsher
  1 sibling, 2 replies; 10+ messages in thread
From: tndave @ 2017-05-20  1:12 UTC (permalink / raw)
  To: intel-wired-lan



On 05/16/2017 04:07 PM, Jeff Kirsher wrote:
> On Mon, 2017-05-01 at 16:15 -0700, Tushar Dave wrote:
>> i40e hardware descriptor fields are in little-endian format. Driver
>> must use le32_to_cpu while evaluating these fields otherwise on
>> big-endian arch we end up evaluating incorrect values, cause errors
>> like:
>>
>> i40evf 0001:04:02.0: Expected response 0 from PF, received 285212672
>> i40evf 0001:04:02.1: Expected response 0 from PF, received 285212672
>>
>> Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
>> ---
>>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> Due to recent patches already applied to my tree, this patch does not
> apply cleanly.  Feel free to send an updated patch, if the change is
> still needed.
Hi Jeff,

I just tried the same patch on Dave's latest linux-net and it applies
cleanly. Wondering if I should clone your tree and make sure it applies?
If so, I may need to do same for all my future patches as well, thats a
extra bit of work!

Most of the time, mine are bug fixes and I always use linux-net when
upstreaming my patches for Intel Ethernet drivers.

-Tushar
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH] i40evf: Use le32_to_cpu before evaluating HW desc fields.
  2017-05-20  1:12   ` tndave
@ 2017-05-21 23:08     ` Alexander Duyck
  2017-05-22 20:04       ` tndave
  2017-05-22 19:36     ` Jeff Kirsher
  1 sibling, 1 reply; 10+ messages in thread
From: Alexander Duyck @ 2017-05-21 23:08 UTC (permalink / raw)
  To: intel-wired-lan

On Fri, May 19, 2017 at 6:12 PM, tndave <tushar.n.dave@oracle.com> wrote:
>
>
> On 05/16/2017 04:07 PM, Jeff Kirsher wrote:
>>
>> On Mon, 2017-05-01 at 16:15 -0700, Tushar Dave wrote:
>>>
>>> i40e hardware descriptor fields are in little-endian format. Driver
>>> must use le32_to_cpu while evaluating these fields otherwise on
>>> big-endian arch we end up evaluating incorrect values, cause errors
>>> like:
>>>
>>> i40evf 0001:04:02.0: Expected response 0 from PF, received 285212672
>>> i40evf 0001:04:02.1: Expected response 0 from PF, received 285212672
>>>
>>> Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
>>> ---
>>>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 ++++--
>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>>
>> Due to recent patches already applied to my tree, this patch does not
>> apply cleanly.  Feel free to send an updated patch, if the change is
>> still needed.
>
> Hi Jeff,
>
> I just tried the same patch on Dave's latest linux-net and it applies
> cleanly. Wondering if I should clone your tree and make sure it applies?
> If so, I may need to do same for all my future patches as well, thats a
> extra bit of work!
>
> Most of the time, mine are bug fixes and I always use linux-net when
> upstreaming my patches for Intel Ethernet drivers.
>

You probably should just be cloning the dev-queue branch of Jeff's
tree. The issue is I believe he has some virtchnl changes from Jesse
and they are conflicting with your change.

- Alex

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH] i40evf: Use le32_to_cpu before evaluating HW desc fields.
  2017-05-20  1:12   ` tndave
  2017-05-21 23:08     ` Alexander Duyck
@ 2017-05-22 19:36     ` Jeff Kirsher
  2017-05-22 20:03       ` tndave
  2017-05-22 23:13       ` tndave
  1 sibling, 2 replies; 10+ messages in thread
From: Jeff Kirsher @ 2017-05-22 19:36 UTC (permalink / raw)
  To: intel-wired-lan

On Fri, 2017-05-19 at 18:12 -0700, tndave wrote:
> On 05/16/2017 04:07 PM, Jeff Kirsher wrote:
> > On Mon, 2017-05-01 at 16:15 -0700, Tushar Dave wrote:
> > > i40e hardware descriptor fields are in little-endian format. Driver
> > > must use le32_to_cpu while evaluating these fields otherwise on
> > > big-endian arch we end up evaluating incorrect values, cause errors
> > > like:
> > > 
> > > i40evf 0001:04:02.0: Expected response 0 from PF, received 285212672
> > > i40evf 0001:04:02.1: Expected response 0 from PF, received 285212672
> > > 
> > > Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
> > > ---
> > > ? drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 ++++--
> > > ? 1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > Due to recent patches already applied to my tree, this patch does not
> > apply cleanly.? Feel free to send an updated patch, if the change is
> > still needed.
> 
> Hi Jeff,
> 
> I just tried the same patch on Dave's latest linux-net and it applies
> cleanly. Wondering if I should clone your tree and make sure it applies?
> If so, I may need to do same for all my future patches as well, thats a
> extra bit of work!
> 
> Most of the time, mine are bug fixes and I always use linux-net when
> upstreaming my patches for Intel Ethernet drivers.

As Alex has already pointed out, yes, you should be using my dev-queue
branch on either next-queue or net-queue trees.  As you know, I have a
number of patches currently in the queue which won't show up on linux-net
until they get pushed to David Miller.

If you use my tree for the Intel drivers, you may find we already fix the
issue or your fix may need to be re-worked due to changes in the code which
are currently in the "queue".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20170522/1ec1b4a3/attachment.asc>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH] i40evf: Use le32_to_cpu before evaluating HW desc fields.
  2017-05-22 19:36     ` Jeff Kirsher
@ 2017-05-22 20:03       ` tndave
  2017-05-22 23:13       ` tndave
  1 sibling, 0 replies; 10+ messages in thread
From: tndave @ 2017-05-22 20:03 UTC (permalink / raw)
  To: intel-wired-lan



On 05/22/2017 12:36 PM, Jeff Kirsher wrote:
> On Fri, 2017-05-19 at 18:12 -0700, tndave wrote:
>> On 05/16/2017 04:07 PM, Jeff Kirsher wrote:
>>> On Mon, 2017-05-01 at 16:15 -0700, Tushar Dave wrote:
>>>> i40e hardware descriptor fields are in little-endian format. Driver
>>>> must use le32_to_cpu while evaluating these fields otherwise on
>>>> big-endian arch we end up evaluating incorrect values, cause errors
>>>> like:
>>>>
>>>> i40evf 0001:04:02.0: Expected response 0 from PF, received 285212672
>>>> i40evf 0001:04:02.1: Expected response 0 from PF, received 285212672
>>>>
>>>> Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
>>>> ---
>>>>   drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 ++++--
>>>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> Due to recent patches already applied to my tree, this patch does not
>>> apply cleanly.  Feel free to send an updated patch, if the change is
>>> still needed.
>>
>> Hi Jeff,
>>
>> I just tried the same patch on Dave's latest linux-net and it applies
>> cleanly. Wondering if I should clone your tree and make sure it applies?
>> If so, I may need to do same for all my future patches as well, thats a
>> extra bit of work!
>>
>> Most of the time, mine are bug fixes and I always use linux-net when
>> upstreaming my patches for Intel Ethernet drivers.
>
> As Alex has already pointed out, yes, you should be using my dev-queue
> branch on either next-queue or net-queue trees.  As you know, I have a
> number of patches currently in the queue which won't show up on linux-net
> until they get pushed to David Miller.
>
> If you use my tree for the Intel drivers, you may find we already fix the
> issue or your fix may need to be re-worked due to changes in the code which
> are currently in the "queue".
Sure, I will use your tree for Intel drivers going forward :)
Thanks.

-Tushar
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH] i40evf: Use le32_to_cpu before evaluating HW desc fields.
  2017-05-21 23:08     ` Alexander Duyck
@ 2017-05-22 20:04       ` tndave
  0 siblings, 0 replies; 10+ messages in thread
From: tndave @ 2017-05-22 20:04 UTC (permalink / raw)
  To: intel-wired-lan



On 05/21/2017 04:08 PM, Alexander Duyck wrote:
> On Fri, May 19, 2017 at 6:12 PM, tndave <tushar.n.dave@oracle.com> wrote:
>>
>>
>> On 05/16/2017 04:07 PM, Jeff Kirsher wrote:
>>>
>>> On Mon, 2017-05-01 at 16:15 -0700, Tushar Dave wrote:
>>>>
>>>> i40e hardware descriptor fields are in little-endian format. Driver
>>>> must use le32_to_cpu while evaluating these fields otherwise on
>>>> big-endian arch we end up evaluating incorrect values, cause errors
>>>> like:
>>>>
>>>> i40evf 0001:04:02.0: Expected response 0 from PF, received 285212672
>>>> i40evf 0001:04:02.1: Expected response 0 from PF, received 285212672
>>>>
>>>> Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
>>>> ---
>>>>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 ++++--
>>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>>
>>> Due to recent patches already applied to my tree, this patch does not
>>> apply cleanly.  Feel free to send an updated patch, if the change is
>>> still needed.
>>
>> Hi Jeff,
>>
>> I just tried the same patch on Dave's latest linux-net and it applies
>> cleanly. Wondering if I should clone your tree and make sure it applies?
>> If so, I may need to do same for all my future patches as well, thats a
>> extra bit of work!
>>
>> Most of the time, mine are bug fixes and I always use linux-net when
>> upstreaming my patches for Intel Ethernet drivers.
>>
>
> You probably should just be cloning the dev-queue branch of Jeff's
> tree. The issue is I believe he has some virtchnl changes from Jesse
> and they are conflicting with your change.\
Okay.
Thanks.

-Tushar
>
> - Alex
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH] i40evf: Use le32_to_cpu before evaluating HW desc fields.
  2017-05-22 19:36     ` Jeff Kirsher
  2017-05-22 20:03       ` tndave
@ 2017-05-22 23:13       ` tndave
  1 sibling, 0 replies; 10+ messages in thread
From: tndave @ 2017-05-22 23:13 UTC (permalink / raw)
  To: intel-wired-lan



On 05/22/2017 12:36 PM, Jeff Kirsher wrote:
> On Fri, 2017-05-19 at 18:12 -0700, tndave wrote:
>> On 05/16/2017 04:07 PM, Jeff Kirsher wrote:
>>> On Mon, 2017-05-01 at 16:15 -0700, Tushar Dave wrote:
>>>> i40e hardware descriptor fields are in little-endian format. Driver
>>>> must use le32_to_cpu while evaluating these fields otherwise on
>>>> big-endian arch we end up evaluating incorrect values, cause errors
>>>> like:
>>>>
>>>> i40evf 0001:04:02.0: Expected response 0 from PF, received 285212672
>>>> i40evf 0001:04:02.1: Expected response 0 from PF, received 285212672
>>>>
>>>> Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
>>>> ---
>>>>   drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 ++++--
>>>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> Due to recent patches already applied to my tree, this patch does not
>>> apply cleanly.  Feel free to send an updated patch, if the change is
>>> still needed.
>>
>> Hi Jeff,
>>
>> I just tried the same patch on Dave's latest linux-net and it applies
>> cleanly. Wondering if I should clone your tree and make sure it applies?
>> If so, I may need to do same for all my future patches as well, thats a
>> extra bit of work!
>>
>> Most of the time, mine are bug fixes and I always use linux-net when
>> upstreaming my patches for Intel Ethernet drivers.
>
> As Alex has already pointed out, yes, you should be using my dev-queue
> branch on either next-queue or net-queue trees.  As you know, I have a
> number of patches currently in the queue which won't show up on linux-net
> until they get pushed to David Miller.
>
> If you use my tree for the Intel drivers, you may find we already fix the
> issue or your fix may need to be re-worked due to changes in the code which
> are currently in the "queue".
Jeff,

Tried the same patch (using git am) on your net-queue tree
branch:dev-queue and the patch applies cleanly.

FYI, right now 
https://kernel.googlesource.com/pub/scm/linux/kernel/git/jkirsher/net-queue.git:dev-queue 
has top commit:
  "i40e/i40evf: proper update of the page_offset field"

My system has:  patch --version
GNU patch 2.7.1

Thanks.
-Tushar
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-05-22 23:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-01 23:15 [PATCH] i40evf: Use le32_to_cpu before evaluating HW desc fields Tushar Dave
2017-05-01 23:15 ` [Intel-wired-lan] " Tushar Dave
2017-05-16 23:07 ` Jeff Kirsher
2017-05-18 18:05   ` tndave
2017-05-20  1:12   ` tndave
2017-05-21 23:08     ` Alexander Duyck
2017-05-22 20:04       ` tndave
2017-05-22 19:36     ` Jeff Kirsher
2017-05-22 20:03       ` tndave
2017-05-22 23:13       ` tndave

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.