All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
To: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"madalin.bucur@freescale.com" <madalin.bucur@freescale.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC 02/10] dpaa_eth: add support for DPAA Ethernet
Date: Mon, 20 Jul 2015 12:46:37 +0000	[thread overview]
Message-ID: <1437396397.10831.31.camel@transmode.se> (raw)
In-Reply-To: <BL2PR03MB5456302C77FAEC1AC60669CE6850@BL2PR03MB545.namprd03.prod.outlook.com>

On Mon, 2015-07-20 at 12:18 +0000, Madalin-Cristian Bucur wrote:
> Hi Joakim
>=20
> > -----Original Message-----
> > From: Joakim Tjernlund [mailto:joakim.tjernlund@transmode.se]
> > Sent: Monday, July 20, 2015 10:57 AM
> > To: linuxppc-dev@lists.ozlabs.org; netdev@vger.kernel.org; Bucur Madali=
n-
> > Cristian-B32716
> > Cc: linux-kernel@vger.kernel.org
> > Subject: Re: [PATCH RFC 02/10] dpaa_eth: add support for DPAA Ethernet
> >=20
> > On Mon, 2015-07-20 at 09:54 +0200, Joakim Tjernlund wrote:
> > > On Wed, 2015-04-01 at 19:19 +0300, Madalin Bucur wrote:
> > > > This introduces the Freescale Data Path Acceleration Architecture
> > > > (DPAA) Ethernet driver (dpaa_eth) that builds upon the DPAA QMan,
> > > > BMan, PAMU and FMan drivers to deliver Ethernet connectivity on
> > > > the Freescale DPAA QorIQ platforms.
> > > >=20
> > > > Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
> > > > ---
> > > ....
> > > > +	snprintf(net_dev->name, IFNAMSIZ, "fm%d-mac%d",
> > > > +		 dpa_mac_fman_index_get(pdev),
> > > > +		 dpa_mac_hw_index_get(pdev));
> > >=20
> > > Should ethernet drivers dictate interface name in user space nowadays=
?
> > > I would prefer if you didn't.
>=20
> The preformatted interface name was thought as a helper for quick interfa=
ce
> identification. It also ensures constant naming of the interfaces, i.e. i=
f you
> add/remove PCI network cards. One can make use of udev rules to override
> default interface names ("eth%d") in userspace.

I am not well versed in ethernet interface naming but I think you are just =
creating
another name space here. To me one either have the old eth%d names or let u=
dev do
the naming so there is some order w.r.t interface naming.

I also find it handy to be able to control which I/F is eth0 etc. just by c=
hanging
the order they are listed in the device tree. This makes our application ha=
ppy :)

>=20
> Another reason for using this is that the interface name was also used fo=
r the
> debugfs file name and when compiling dpaa_eth as a module there was a
> problem with udev concurrently renaming interfaces from eth0 to something
> like fmx-macy, making the next probed DPAA interface temporarily get the
> eth0 name (before being renamed fmx-macw). Subsequently,
> the debugfs_create_file(net_dev->name,...) call failed because of duplica=
ted
> names.
>=20
> If this is considered more of a bug than a feature, I can remove it and o=
nly change
> the naming of the debugfs entries to avoid the udev issue.

Perhaps netdev list can advise?

 Jocke=

WARNING: multiple messages have this Message-ID (diff)
From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
To: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"madalin.bucur@freescale.com" <madalin.bucur@freescale.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC 02/10] dpaa_eth: add support for DPAA Ethernet
Date: Mon, 20 Jul 2015 12:46:37 +0000	[thread overview]
Message-ID: <1437396397.10831.31.camel@transmode.se> (raw)
In-Reply-To: <BL2PR03MB5456302C77FAEC1AC60669CE6850@BL2PR03MB545.namprd03.prod.outlook.com>

On Mon, 2015-07-20 at 12:18 +0000, Madalin-Cristian Bucur wrote:
> Hi Joakim
> 
> > -----Original Message-----
> > From: Joakim Tjernlund [mailto:joakim.tjernlund@transmode.se]
> > Sent: Monday, July 20, 2015 10:57 AM
> > To: linuxppc-dev@lists.ozlabs.org; netdev@vger.kernel.org; Bucur Madalin-
> > Cristian-B32716
> > Cc: linux-kernel@vger.kernel.org
> > Subject: Re: [PATCH RFC 02/10] dpaa_eth: add support for DPAA Ethernet
> > 
> > On Mon, 2015-07-20 at 09:54 +0200, Joakim Tjernlund wrote:
> > > On Wed, 2015-04-01 at 19:19 +0300, Madalin Bucur wrote:
> > > > This introduces the Freescale Data Path Acceleration Architecture
> > > > (DPAA) Ethernet driver (dpaa_eth) that builds upon the DPAA QMan,
> > > > BMan, PAMU and FMan drivers to deliver Ethernet connectivity on
> > > > the Freescale DPAA QorIQ platforms.
> > > > 
> > > > Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
> > > > ---
> > > ....
> > > > +	snprintf(net_dev->name, IFNAMSIZ, "fm%d-mac%d",
> > > > +		 dpa_mac_fman_index_get(pdev),
> > > > +		 dpa_mac_hw_index_get(pdev));
> > > 
> > > Should ethernet drivers dictate interface name in user space nowadays?
> > > I would prefer if you didn't.
> 
> The preformatted interface name was thought as a helper for quick interface
> identification. It also ensures constant naming of the interfaces, i.e. if you
> add/remove PCI network cards. One can make use of udev rules to override
> default interface names ("eth%d") in userspace.

I am not well versed in ethernet interface naming but I think you are just creating
another name space here. To me one either have the old eth%d names or let udev do
the naming so there is some order w.r.t interface naming.

I also find it handy to be able to control which I/F is eth0 etc. just by changing
the order they are listed in the device tree. This makes our application happy :)

> 
> Another reason for using this is that the interface name was also used for the
> debugfs file name and when compiling dpaa_eth as a module there was a
> problem with udev concurrently renaming interfaces from eth0 to something
> like fmx-macy, making the next probed DPAA interface temporarily get the
> eth0 name (before being renamed fmx-macw). Subsequently,
> the debugfs_create_file(net_dev->name,...) call failed because of duplicated
> names.
> 
> If this is considered more of a bug than a feature, I can remove it and only change
> the naming of the debugfs entries to avoid the udev issue.

Perhaps netdev list can advise?

 Jocke

  reply	other threads:[~2015-07-20 12:46 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01 16:19 [PATCH RFC 02/10] dpaa_eth: add support for DPAA Ethernet Madalin Bucur
2015-04-01 16:19 ` Madalin Bucur
2015-04-01 16:19 ` [PATCH RFC 03/10] dpaa_eth: add configurable bpool thresholds Madalin Bucur
2015-04-01 16:19   ` Madalin Bucur
2015-04-01 16:19   ` [PATCH RFC 04/10] dpaa_eth: add support for S/G frames Madalin Bucur
2015-04-01 16:19     ` Madalin Bucur
2015-04-01 16:19     ` [PATCH RFC 05/10] dpaa_eth: add driver's Tx queue selection mechanism Madalin Bucur
2015-04-01 16:19       ` Madalin Bucur
2015-04-01 16:19       ` [PATCH RFC 06/10] dpaa_eth: add ethtool functionality Madalin Bucur
2015-04-01 16:19         ` Madalin Bucur
2015-04-01 16:19         ` [PATCH RFC 07/10] dpaa_eth: add sysfs exports Madalin Bucur
2015-04-01 16:19           ` Madalin Bucur
2015-04-01 16:19           ` [PATCH RFC 08/10] dpaa_eth: add debugfs counters Madalin Bucur
2015-04-01 16:19             ` Madalin Bucur
2015-04-01 16:19             ` [PATCH RFC 09/10] dpaa_eth: add debugfs entries Madalin Bucur
2015-04-01 16:19               ` Madalin Bucur
2015-04-01 16:19               ` [PATCH RFC 10/10] dpaa_eth: add trace points Madalin Bucur
2015-04-01 16:19                 ` Madalin Bucur
2015-04-03 16:47                 ` Joe Perches
2015-04-03 16:47                   ` Joe Perches
2015-04-03 17:29                   ` Madalin-Cristian Bucur
2015-04-03 17:29                     ` Madalin-Cristian Bucur
2015-04-03 17:53                     ` Joe Perches
2015-04-03 17:53                       ` Joe Perches
2015-04-03 18:36                       ` [PATCH] checkpatch: Add #define foo "string" long line exception Joe Perches
2015-04-01 17:11         ` [PATCH RFC 06/10] dpaa_eth: add ethtool functionality Joe Perches
2015-04-01 17:11 ` [PATCH RFC 02/10] dpaa_eth: add support for DPAA Ethernet Joe Perches
2015-04-02 10:44 ` Paul Bolle
2015-04-03  8:58   ` Madalin-Cristian Bucur
2015-04-03  8:58     ` Madalin-Cristian Bucur
2015-04-03  8:58     ` Madalin-Cristian Bucur
2015-07-20  7:54 ` Joakim Tjernlund
2015-07-20  7:54   ` Joakim Tjernlund
2015-07-20  7:57   ` Joakim Tjernlund
2015-07-20  7:57     ` Joakim Tjernlund
2015-07-20 12:18     ` Madalin-Cristian Bucur
2015-07-20 12:18       ` Madalin-Cristian Bucur
2015-07-20 12:46       ` Joakim Tjernlund [this message]
2015-07-20 12:46         ` Joakim Tjernlund
  -- strict thread matches above, loose matches on Subject: below --
2015-04-03  8:37 Madalin-Cristian Bucur
2015-04-03  8:37 ` Madalin-Cristian Bucur

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=1437396397.10831.31.camel@transmode.se \
    --to=joakim.tjernlund@transmode.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=madalin.bucur@freescale.com \
    --cc=netdev@vger.kernel.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 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.