netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "René van Dorst" <opensource@vdorst.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: kbuild-all@01.org, netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [net-next:master 13/14] drivers/net/ethernet/faraday/ftgmac100.c:777:13: error: 'skb_frag_t {aka struct bio_vec}' has no member named 'size'
Date: Tue, 23 Jul 2019 12:45:42 +0000	[thread overview]
Message-ID: <20190723124542.Horde.V1atRU6HCQ6ct8dJCXossTs@www.vdorst.com> (raw)
In-Reply-To: <20190723115238.GJ363@bombadil.infradead.org>

Quoting Matthew Wilcox <willy@infradead.org>:

> On Tue, Jul 23, 2019 at 08:58:44AM +0000, René van Dorst wrote:
>> Hi Matthew,
>>
>> I see the same issue for the mediatek/mtk_eth_soc driver.
>
> Thanks, Rene.  The root problem for both of these drivers is that neither
> are built on x86 with CONFIG_COMPILE_TEST.  Is it possible to fix this?
>
> An untested patch to fix both of these problems (and two more that I
> spotted):

Hi Matthew,

Your patch fixes the build error.

I am not sure if iperf3 also triggers this code on my mt7621 device.
iperf3 results seems normal.

Greats,

René


>
> diff --git a/drivers/atm/he.c b/drivers/atm/he.c
> index 211607986134..70b00ae4ec38 100644
> --- a/drivers/atm/he.c
> +++ b/drivers/atm/he.c
> @@ -2580,10 +2580,9 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
>  			slot = 0;
>  		}
>
> -		tpd->iovec[slot].addr = dma_map_single(&he_dev->pci_dev->dev,
> -			(void *) page_address(frag->page) + frag->page_offset,
> -				frag->size, DMA_TO_DEVICE);
> -		tpd->iovec[slot].len = frag->size;
> +		tpd->iovec[slot].addr = skb_frag_dma_map(&he_dev->pci_dev->dev,
> +				frag, 0, skb_frag_size(frag), DMA_TO_DEVICE);
> +		tpd->iovec[slot].len = skb_frag_size(frag);
>  		++slot;
>
>  	}
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c  
> b/drivers/net/ethernet/faraday/ftgmac100.c
> index 030fed65393e..dc8d3e726e75 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.c
> +++ b/drivers/net/ethernet/faraday/ftgmac100.c
> @@ -774,7 +774,7 @@ static netdev_tx_t  
> ftgmac100_hard_start_xmit(struct sk_buff *skb,
>  	for (i = 0; i < nfrags; i++) {
>  		skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
>
> -		len = frag->size;
> +		len = skb_frag_size(frag);
>
>  		/* Map it */
>  		map = skb_frag_dma_map(priv->dev, frag, 0, len,
> diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c  
> b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> index f38c3fa7d705..9c4d1afa34e5 100644
> --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> @@ -1958,7 +1958,7 @@ static int skb_to_sg_fd(struct dpaa_priv *priv,
>  	/* populate the rest of SGT entries */
>  	for (i = 0; i < nr_frags; i++) {
>  		frag = &skb_shinfo(skb)->frags[i];
> -		frag_len = frag->size;
> +		frag_len = skb_frag_size(frag);
>  		WARN_ON(!skb_frag_page(frag));
>  		addr = skb_frag_dma_map(dev, frag, 0,
>  					frag_len, dma_dir);
> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c  
> b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> index 00991df44ed6..e529d86468b8 100644
> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> @@ -787,7 +787,8 @@ static inline int mtk_cal_txd_req(struct sk_buff *skb)
>  	if (skb_is_gso(skb)) {
>  		for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
>  			frag = &skb_shinfo(skb)->frags[i];
> -			nfrags += DIV_ROUND_UP(frag->size, MTK_TX_DMA_BUF_LEN);
> +			nfrags += DIV_ROUND_UP(skb_frag_size(frag),
> +						MTK_TX_DMA_BUF_LEN);
>  		}
>  	} else {
>  		nfrags += skb_shinfo(skb)->nr_frags;




  reply	other threads:[~2019-07-23 12:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23  6:22 [net-next:master 13/14] drivers/net/ethernet/faraday/ftgmac100.c:777:13: error: 'skb_frag_t {aka struct bio_vec}' has no member named 'size' kbuild test robot
2019-07-23  8:58 ` René van Dorst
2019-07-23 11:52   ` Matthew Wilcox
2019-07-23 12:45     ` René van Dorst [this message]
2019-07-23 18:50     ` David Miller
2019-07-23 18:46   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190723124542.Horde.V1atRU6HCQ6ct8dJCXossTs@www.vdorst.com \
    --to=opensource@vdorst.com \
    --cc=davem@davemloft.net \
    --cc=kbuild-all@01.org \
    --cc=netdev@vger.kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).