From: Jakub Kicinski <kuba@kernel.org>
To: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
intel-wired-lan@lists.osuosl.org, jesse.brandeburg@intel.com
Subject: Re: [PATCH v2] netdevice: use ifmap instead of plain fields
Date: Fri, 3 Mar 2023 17:35:19 -0800 [thread overview]
Message-ID: <20230303173519.72c2d236@kernel.org> (raw)
In-Reply-To: <20230303180926.142107-1-vincenzopalazzodev@gmail.com>
On Fri, 3 Mar 2023 19:09:26 +0100 Vincenzo Palazzo wrote:
> diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> index e1eb1de88bf9..059ff8bcdbbc 100644
> --- a/drivers/net/ethernet/intel/e1000e/netdev.c
> +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
> @@ -7476,8 +7476,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> netif_napi_add(netdev, &adapter->napi, e1000e_poll);
> strscpy(netdev->name, pci_name(pdev), sizeof(netdev->name));
>
> - netdev->mem_start = mmio_start;
> - netdev->mem_end = mmio_start + mmio_len;
> + netdev->dev_mapping.mem_start = mmio_start;
> + netdev->dev_mapping.mem_end = mmio_start + mmio_len;
>
> adapter->bd_number = cards_found++;
That's not the only driver that'd need to be changed.
Try building the kernel with allmodconfig.
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 6a14b7b11766..c5987e90a078 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -2031,13 +2031,7 @@ struct net_device {
> char name[IFNAMSIZ];
> struct netdev_name_node *name_node;
> struct dev_ifalias __rcu *ifalias;
> - /*
> - * I/O specific fields
> - * FIXME: Merge these and struct ifmap into one
> - */
> - unsigned long mem_end;
> - unsigned long mem_start;
> - unsigned long base_addr;
> + struct ifmap dev_mapping;
base_addr was unsigned long now its unsigned short.
IDK if that matters.
I'd rather we didn't mess with this code - it's only used by ancient
drivers. We can wait until those drivers are no longer used and delete
this instead.
next prev parent reply other threads:[~2023-03-04 1:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-03 18:09 [PATCH v2] netdevice: use ifmap instead of plain fields Vincenzo Palazzo
2023-03-04 1:35 ` Jakub Kicinski [this message]
2023-03-04 10:16 ` kernel test robot
2023-03-04 10:16 ` kernel test robot
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=20230303173519.72c2d236@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
--cc=vincenzopalazzodev@gmail.com \
/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).