All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next v2] net/ixgbevf: fix a compilation error of skb_frag_t
@ 2019-07-24 16:17 Qian Cai
  2019-07-24 16:39 ` Jeff Kirsher
  0 siblings, 1 reply; 5+ messages in thread
From: Qian Cai @ 2019-07-24 16:17 UTC (permalink / raw)
  To: davem; +Cc: jeffrey.t.kirsher, netdev, linux-kernel, Qian Cai

The linux-next commit "net: Rename skb_frag_t size to bv_len" [1]
introduced a compilation error on powerpc as it forgot to deal with the
renaming from "size" to "bv_len" for ixgbevf.

[1] https://lore.kernel.org/netdev/20190723030831.11879-1-willy@infradead.org/T/#md052f1c7de965ccd1bdcb6f92e1990a52298eac5

In file included from ./include/linux/cache.h:5,
                 from ./include/linux/printk.h:9,
                 from ./include/linux/kernel.h:15,
                 from ./include/linux/list.h:9,
                 from ./include/linux/module.h:9,
                 from
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:12:
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c: In function
'ixgbevf_xmit_frame_ring':
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:4138:51: error:
'skb_frag_t' {aka 'struct bio_vec'} has no member named 'size'
   count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);
                                                   ^
./include/uapi/linux/kernel.h:13:40: note: in definition of macro
'__KERNEL_DIV_ROUND_UP'
 #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
                                        ^
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:4138:12: note: in
expansion of macro 'TXD_USE_COUNT'
   count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);

Signed-off-by: Qian Cai <cai@lca.pw>
---

v2: Use the fine accessor per Matthew.

 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index bdfccaf38edd..8c011d4ce7a9 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -4134,8 +4134,11 @@ static int ixgbevf_xmit_frame_ring(struct sk_buff *skb,
 	 * otherwise try next time
 	 */
 #if PAGE_SIZE > IXGBE_MAX_DATA_PER_TXD
-	for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
-		count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);
+	for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) {
+		skb_frag_t *frag = &skb_shinfo(skb)->frags[f];
+
+		count += TXD_USE_COUNT(skb_frag_size(frag));
+	}
 #else
 	count += skb_shinfo(skb)->nr_frags;
 #endif
-- 
1.8.3.1


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

* Re: [PATCH -next v2] net/ixgbevf: fix a compilation error of skb_frag_t
  2019-07-24 16:17 [PATCH -next v2] net/ixgbevf: fix a compilation error of skb_frag_t Qian Cai
@ 2019-07-24 16:39 ` Jeff Kirsher
  2019-07-24 21:41   ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Kirsher @ 2019-07-24 16:39 UTC (permalink / raw)
  To: Qian Cai, davem; +Cc: netdev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1727 bytes --]

On Wed, 2019-07-24 at 12:17 -0400, Qian Cai wrote:
> The linux-next commit "net: Rename skb_frag_t size to bv_len" [1]
> introduced a compilation error on powerpc as it forgot to deal with
> the
> renaming from "size" to "bv_len" for ixgbevf.
> 
> [1] 
> https://lore.kernel.org/netdev/20190723030831.11879-1-willy@infradead.org/T/#md052f1c7de965ccd1bdcb6f92e1990a52298eac5
> 
> In file included from ./include/linux/cache.h:5,
>                  from ./include/linux/printk.h:9,
>                  from ./include/linux/kernel.h:15,
>                  from ./include/linux/list.h:9,
>                  from ./include/linux/module.h:9,
>                  from
> drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:12:
> drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c: In function
> 'ixgbevf_xmit_frame_ring':
> drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:4138:51: error:
> 'skb_frag_t' {aka 'struct bio_vec'} has no member named 'size'
>    count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);
>                                                    ^
> ./include/uapi/linux/kernel.h:13:40: note: in definition of macro
> '__KERNEL_DIV_ROUND_UP'
>  #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
>                                         ^
> drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:4138:12: note: in
> expansion of macro 'TXD_USE_COUNT'
>    count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);
> 
> Signed-off-by: Qian Cai <cai@lca.pw>
> ---
> 
> v2: Use the fine accessor per Matthew.
> 
>  drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)

Dave I will pick this up and add it to my queue.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH -next v2] net/ixgbevf: fix a compilation error of skb_frag_t
  2019-07-24 16:39 ` Jeff Kirsher
@ 2019-07-24 21:41   ` David Miller
  2019-07-24 22:02     ` Jeff Kirsher
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2019-07-24 21:41 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: cai, netdev, linux-kernel

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 24 Jul 2019 09:39:26 -0700

> Dave I will pick this up and add it to my queue.

How soon will you get that to me?  The sooner this build fix is cured the
better.

Thanks.

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

* Re: [PATCH -next v2] net/ixgbevf: fix a compilation error of skb_frag_t
  2019-07-24 21:41   ` David Miller
@ 2019-07-24 22:02     ` Jeff Kirsher
  2019-07-24 22:29       ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Kirsher @ 2019-07-24 22:02 UTC (permalink / raw)
  To: David Miller; +Cc: cai, netdev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 482 bytes --]

On Wed, 2019-07-24 at 14:41 -0700, David Miller wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Wed, 24 Jul 2019 09:39:26 -0700
> 
> > Dave I will pick this up and add it to my queue.
> 
> How soon will you get that to me?  The sooner this build fix is cured
> the
> better.

Go ahead and pick it up, I was able to get it through an initial round
of testing with no issues.  No need to wait for me to re-send it, I
will go ahead and ACK Qian's patch.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH -next v2] net/ixgbevf: fix a compilation error of skb_frag_t
  2019-07-24 22:02     ` Jeff Kirsher
@ 2019-07-24 22:29       ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2019-07-24 22:29 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: cai, netdev, linux-kernel

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 24 Jul 2019 15:02:15 -0700

> On Wed, 2019-07-24 at 14:41 -0700, David Miller wrote:
>> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date: Wed, 24 Jul 2019 09:39:26 -0700
>> 
>> > Dave I will pick this up and add it to my queue.
>> 
>> How soon will you get that to me?  The sooner this build fix is cured
>> the
>> better.
> 
> Go ahead and pick it up, I was able to get it through an initial round
> of testing with no issues.  No need to wait for me to re-send it, I
> will go ahead and ACK Qian's patch.

Ok, done.

Thanks.

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

end of thread, other threads:[~2019-07-24 22:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24 16:17 [PATCH -next v2] net/ixgbevf: fix a compilation error of skb_frag_t Qian Cai
2019-07-24 16:39 ` Jeff Kirsher
2019-07-24 21:41   ` David Miller
2019-07-24 22:02     ` Jeff Kirsher
2019-07-24 22:29       ` David Miller

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.