igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support.
Subsystems (2)
PATCH v6 1/11 igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support.
This patch adds the beginning framework onto which I am going to add the igc driver which supports the Intel(R) I225-LM/I225-V 2.5G Ethernet Controller.
Sasha Neftin (v2):
update module author, copyright and licence header cosmetic changes
Sasha Neftin (v3):
remove unused header files
Sasha Neftin (v4):
update brand name
fix syntax by input from community
replace e1000_ prefix with igc_ prefix
Sasha Neftin (v5):
no changes
Sasha Neftin (v6):
no changes
--- drivers/net/ethernet/intel/Kconfig | 16 +++ drivers/net/ethernet/intel/Makefile | 1 + drivers/net/ethernet/intel/igc/Makefile | 10 ++ drivers/net/ethernet/intel/igc/igc.h | 29 +++++ drivers/net/ethernet/intel/igc/igc_hw.h | 10 ++ drivers/net/ethernet/intel/igc/igc_main.c | 146 ++++++++++++++++++++++ 6 files changed, 212 insertions(+) create mode 100644 drivers/net/ethernet/intel/igc/Makefile create mode 100644 drivers/net/ethernet/intel/igc/igc.h create mode 100644 drivers/net/ethernet/intel/igc/igc_hw.h create mode 100644 drivers/net/ethernet/intel/igc/igc_main.c
drivers/net/ethernet/intel/Kconfig +16 -0
@@ -280,4 +280,20 @@ config FM10K To compile this driver as a module, choose M here. The module will be called fm10k. MSI-X interrupt support is required +config IGC + tristate "Intel(R) Ethernet Controller I225-LM/I225-V support" + default n + depends on PCI + ---help--- + This driver supports Intel(R) Ethernet Controller I225-LM/I225-V + family of adapters. + + For more information on how to identify your adapter, go + to the Adapter & Driver ID Guide that can be located at: + + <http://support.intel.com> + + To compile this driver as a module, choose M here. The module + will be called igc. + endif # NET_VENDOR_INTEL
drivers/net/ethernet/intel/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-$(CONFIG_E100) += e100.o obj-$(CONFIG_E1000) += e1000/ obj-$(CONFIG_E1000E) += e1000e/ obj-$(CONFIG_IGB) += igb/ +obj-$(CONFIG_IGC) += igc/ obj-$(CONFIG_IGBVF) += igbvf/ obj-$(CONFIG_IXGBE) += ixgbe/ obj-$(CONFIG_IXGBEVF) += ixgbevf/
drivers/net/ethernet/intel/igc/Makefile new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2018 Intel Corporation + +# +# Intel(R) I225-LM/I225-V 2.5G Ethernet Controller +# + +obj-$(CONFIG_IGC) += igc.o + +igc-objs := igc_main.o
drivers/net/ethernet/intel/igc/igc.h new file +29 -0
@@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (c) 2018 Intel Corporation */ + +#ifndef _IGC_H_ +#define _IGC_H_ + +#include <linux/kobject.h> + +#include <linux/pci.h> +#include <linux/netdevice.h> +#include <linux/vmalloc.h> + +#include <linux/ethtool.h> + +#include <linux/sctp.h> + +#define IGC_ERR(args...) pr_err("igc: " args) + +#define PFX "igc: " + +#include <linux/timecounter.h> +#include <linux/net_tstamp.h> +#include <linux/ptp_clock_kernel.h> + +/* main */ +extern char igc_driver_name[]; +extern char igc_driver_version[]; + +#endif /* _IGC_H_ */
drivers/net/ethernet/intel/igc/igc_hw.h new file +10 -0
@@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (c) 2018 Intel Corporation */ + +#ifndef _IGC_HW_H_ +#define _IGC_HW_H_ + +#define IGC_DEV_ID_I225_LM 0x15F2 +#define IGC_DEV_ID_I225_V 0x15F3 + +#endif /* _IGC_HW_H_ */
drivers/net/ethernet/intel/igc/igc_main.c new file +146 -0
146 lines not on this page · raw message
Signature · 1 line
2.18.0
PATCH v6 1/11 igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support.
Quoted 3 lines · Sasha Neftin
This patch adds the beginning framework onto which I am going to add the igc driver which supports the Intel(R) I225-LM/I225-V 2.5G Ethernet Controller.
I'm curious. The code looks very much like the igb code. Wouldn't it be simpler and less error prone to add these new NICs to igb, rather than creating a new driver by (mostly) copying the code from igb?
What's the idea behind this?
Quoted 11 lines
Sasha Neftin (v2):
update module author, copyright and licence header cosmetic changesSasha Neftin (v3):
remove unused header filesSasha Neftin (v4):
update brand name
fix syntax by input from community
replacee1000_prefix withigc_prefix
In theory this is neither necessary, nor does it actually help. By keeping the e1000 prefixes it's much easier to compare to the other, already existing drivers.
Quoted 5 lines
Sasha Neftin (v5):
no changesSasha Neftin (v6):
no changes
Is that an oversight? If there are no changes in v5 and v6, why do we have them?!?
Corinna
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20180823/a312b52b/attachment.asc>
PATCH v6 1/11 igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support.
Quoted 6 lines · Corinna Vinschen
Quoted 1 line · Sasha Neftin
This patch adds the beginning framework onto which I am going to
add
Quoted 2 lines
the igc driver which supports the Intel(R) I225-LM/I225-V 2.5G Ethernet Controller.
Quoted 6 lines
I'm curious. The code looks very much like the igb code. Wouldn't it
be simpler and less error prone to add these new NICs to igb, rather than creating a new driver by (mostly) copying the code from igb?What's the idea behind this?
This new driver is for a new upcoming client part, not server (which is the igb driver). Yes, the way that this new client part does resemble how the igb driver operates, but this new client part will not have many of the advance features (like SRIOV) that igb uses. We also want to keep the igb driver strictly for the 1GbE server devices.
Quoted 17 lines
Quoted 5 lines
Sasha Neftin (v2):
update module author, copyright and licence header cosmetic changesQuoted 7 lines
Sasha Neftin (v3):
remove unused header filesSasha Neftin (v4):
update brand name
fix syntax by input from community
replacee1000_prefix withigc_prefixIn theory this is neither necessary, nor does it actually help. By keeping the e1000 prefixes it's much easier to compare to the other, already existing drivers.
Quoted 8 lines
Quoted 5 lines
Sasha Neftin (v5):
no changesSasha Neftin (v6):
no changesIs that an oversight? If there are no changes in v5 and v6, why do we have them?!?
Sasha is just noting that this particular patch did not change in v6,
but other patches did have changes in this new version of the series.
-------------- 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/20180823/b52fee5c/attachment.asc>
PATCH v6 1/11 igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support.
Quoted 12 lines · Jeff Kirsher
Quoted 11 lines · Corinna Vinschen
Quoted 1 line · Sasha Neftin
This patch adds the beginning framework onto which I am going to
add
Quoted 2 lines
the igc driver which supports the Intel(R) I225-LM/I225-V 2.5G Ethernet Controller.
I'm curious. The code looks very much like the igb code. Wouldn't it
be simpler and less error prone to add these new NICs to igb, rather than creating a new driver by (mostly) copying the code from igb?
Quoted 7 lines
Quoted 1 line
What's the idea behind this?
This new driver is for a new upcoming client part, not server (which is the igb driver). Yes, the way that this new client part does resemble how the igb driver operates, but this new client part will not have many of the advance features (like SRIOV) that igb uses. We also want to keep the igb driver strictly for the 1GbE server devices.
Ok, thanks, but I'm still a bit puzzled.
What about E1000_DEV_ID_I354_BACKPLANE_2_5GBPS? The later supposedly already provides 2.5G within igb. Is that the server part compared to igc? Otherwise, what's the equivalent server part providing 2.5G?
Quoted 19 lines
Quoted 19 lines
Quoted 11 lines
Sasha Neftin (v2):
update module author, copyright and licence header cosmetic changesSasha Neftin (v3):
remove unused header filesSasha Neftin (v4):
update brand name
fix syntax by input from community
replacee1000_prefix withigc_prefixIn theory this is neither necessary, nor does it actually help. By keeping the e1000 prefixes it's much easier to compare to the other, already existing drivers.
Quoted 3 lines
Sasha Neftin (v5):
no changes
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Sasha Neftin (v6):
no changesIs that an oversight? If there are no changes in v5 and v6, why do we have them?!?
Sasha is just noting that this particular patch did not change in v6, but other patches did have changes in this new version of the series.
Oh, right, thanks for the clarification.
Corinna
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20180823/8490f85d/attachment.asc>
PATCH v6 1/11 igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support.
Quoted 24 lines · Corinna Vinschen
Quoted 3 lines · Jeff Kirsher
Quoted 2 lines · Corinna Vinschen
Quoted 1 line · Sasha Neftin
This patch adds the beginning framework onto which I am going
to
Quoted 5 lines
Quoted 5 lines
add
Quoted 2 lines
the igc driver which supports the Intel(R) I225-LM/I225-V 2.5G Ethernet Controller.
I'm curious. The code looks very much like the igb code.
Wouldn't
Quoted 2 lines
Quoted 2 lines
it
be simpler and less error prone to add these new NICs to igb,rather
Quoted 5 lines
Quoted 3 lines
than creating a new driver by (mostly) copying the code from igb?
What's the idea behind this?
This new driver is for a new upcoming client part, not server
(which is
Quoted 1 line
the igb driver). Yes, the way that this new client part does
resemble
Quoted 2 lines
how the igb driver operates, but this new client part will not have many of the advance features (like SRIOV) that igb uses. We also
Quoted 8 lines
want
Quoted 1 line
to keep the igb driver strictly for the 1GbE server devices.
Ok, thanks, but I'm still a bit puzzled.
What about
E1000_DEV_ID_I354_BACKPLANE_2_5GBPS? The later supposedly already provides 2.5G within igb. Is that the server part compared to igc? Otherwise, what's the equivalent server part providing 2.5G?
Yes, one of the last server devices we developed back in 2013 was I354 and that device did support 2.5 GbE. Again, this is a server part, which supports more advanced features that client parts do not.
There is not a 1:1 on server parts and client parts, sometimes there can be a server part that is similar to a client part or vice versa.
In this case, this new client part will be the next generation of client parts. So these will be essentially the new "e1000e" (our other client driver), but since this next generation of client parts will have MAC/PHY communications that are more similar to how some of our server parts did, that is why portions of the driver will resemble igb. But feature wise the igc driver will be more like e1000e than igb.
Hope that helps.
-------------- 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/20180823/9830e4dc/attachment-0001.asc>
PATCH v6 1/11 igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support.
Quoted 41 lines · Jeff Kirsher
Quoted 24 lines · Corinna Vinschen
Quoted 3 lines · Jeff Kirsher
Quoted 2 lines · Corinna Vinschen
Quoted 1 line · Sasha Neftin
This patch adds the beginning framework onto which I am going
to
Quoted 5 lines
Quoted 5 lines
add
Quoted 2 lines
the igc driver which supports the Intel(R) I225-LM/I225-V 2.5G Ethernet Controller.
I'm curious. The code looks very much like the igb code.
Wouldn't
Quoted 2 lines
Quoted 2 lines
it
be simpler and less error prone to add these new NICs to igb,rather
Quoted 5 lines
Quoted 3 lines
than creating a new driver by (mostly) copying the code from igb?
What's the idea behind this?
This new driver is for a new upcoming client part, not server
(which is
Quoted 1 line
the igb driver). Yes, the way that this new client part does
resemble
Quoted 2 lines
how the igb driver operates, but this new client part will not have many of the advance features (like SRIOV) that igb uses. We also
Quoted 8 lines
want
Quoted 1 line
to keep the igb driver strictly for the 1GbE server devices.
Ok, thanks, but I'm still a bit puzzled.
What about
E1000_DEV_ID_I354_BACKPLANE_2_5GBPS? The later supposedly already provides 2.5G within igb. Is that the server part compared to igc? Otherwise, what's the equivalent server part providing 2.5G?Yes, one of the last server devices we developed back in 2013 was I354 and that device did support 2.5 GbE. Again, this is a server part, which supports more advanced features that client parts do not.
There is not a 1:1 on server parts and client parts, sometimes there can be a server part that is similar to a client part or vice versa.
Quoted 8 lines
In this case, this new client part will be the next generation of client parts. So these will be essentially the new "e1000e" (our other client driver), but since this next generation of client parts will have MAC/PHY communications that are more similar to how some of our server parts did, that is why portions of the driver will resemble igb. But feature wise the igc driver will be more like e1000e than igb.
Hope that helps.
Yes, Jeff, this really helps.
But this just reinforces my doubts that changing the E1000 prefix to IGC is a good thing. The comparison of binary values only gets more complicated. In the end we have, for instance, this:
e1000: #define E1000_ERR_NVM 1 e1000e: #define E1000_ERR_NVM 1 igb: #define E1000_ERR_NVM 1
but
igc: #define IGC_ERR_NVM 1
This doesn't make sense.
Thanks,
Corinna
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20180823/f2087ca4/attachment.asc>
PATCH v6 1/11 igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support.
Quoted 75 lines · Corinna Vinschen
Quoted 5 lines · Jeff Kirsher
Quoted 4 lines · Corinna Vinschen
Quoted 3 lines · Jeff Kirsher
Quoted 2 lines · Corinna Vinschen
Quoted 1 line · Sasha Neftin
This patch adds the beginning framework onto which I am
going
Quoted 3 lines
Quoted 3 lines
to
Quoted 2 lines
Quoted 2 lines
add
Quoted 1 line
the igc driver which supports the Intel(R) I225-LM/I225-V
2.5G
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Ethernet Controller.
I'm curious. The code looks very much like the igb code.
Wouldn't
Quoted 2 lines
Quoted 2 lines
it
be simpler and less error prone to add these new NICs to igb,rather
Quoted 1 line
Quoted 1 line
than creating a new driver by (mostly) copying the code from
igb?
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
What's the idea behind this?
This new driver is for a new upcoming client part, not server
(which is
Quoted 1 line
the igb driver). Yes, the way that this new client part does
resemble
Quoted 1 line
how the igb driver operates, but this new client part will not
have
Quoted 1 line
Quoted 1 line
Quoted 1 line
many of the advance features (like SRIOV) that igb uses. We
also
Quoted 6 lines
Quoted 6 lines
want
Quoted 1 line
to keep the igb driver strictly for the 1GbE server devices.
Ok, thanks, but I'm still a bit puzzled.
What about
E1000_DEV_ID_I354_BACKPLANE_2_5GBPS? The latersupposedly
Quoted 1 line
Quoted 1 line
already provides 2.5G within igb. Is that the server part
compared
Quoted 1 line
Quoted 1 line
to igc? Otherwise, what's the equivalent server part providing
2.5G?
Quoted 2 lines
Yes, one of the last server devices we developed back in 2013 was
I354
Quoted 4 lines
and that device did support 2.5 GbE. Again, this is a server part, which supports more advanced features that client parts do not.
There is not a 1:1 on server parts and client parts, sometimes
there
Quoted 1 line
can be a server part that is similar to a client part or vice
versa.
Quoted 3 lines
In this case, this new client part will be the next generation of client parts. So these will be essentially the new "e1000e" (our
other
Quoted 2 lines
client driver), but since this next generation of client parts will have MAC/PHY communications that are more similar to how some of
our
Quoted 1 line
server parts did, that is why portions of the driver will resemble
igb.
Quoted 3 lines
But feature wise the igc driver will be more like e1000e than igb.
Hope that helps.
Yes, Jeff, this really helps.
But this just reinforces my doubts that changing the E1000 prefix to IGC is a good thing. The comparison of binary values only gets more complicated. In the end we have, for instance, this:
e1000: #define E1000_ERR_NVM 1 e1000e: #define E1000_ERR_NVM 1 igb: #define E1000_ERR_NVM 1
Quoted 5 lines
but
igc: #define
IGC_ERR_NVM1This doesn't make sense.
When naming functions/macros and defines, I can see pros and cons to both approaches. That particular code you referring to is "common code" shared amongst the various drivers e1000, e1000e and igb. The igc driver did start with this "common code" as a starting point, but this common code will be morphing to handle the future client parts. So we were looking to use the igc driver as the parent of this new common code, much like how e1000 was the "original" or parent driver to e1000e and igb.
It seemed right to break ties with the legacy naming of
functions/macros/defines, especially since this new generation of parts
and devices will have very little in common with the old e1000 devices. -------------- 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/20180823/6887dbd2/attachment.asc>
PATCH v6 1/11 igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support.
In reply to Sasha NeftinQuoted 16 lines · Sasha Neftin
This patch adds the beginning framework onto which I am going to add the igc driver which supports the Intel(R) I225-LM/I225-V 2.5G Ethernet Controller.
Sasha Neftin (v2):
update module author, copyright and licence header cosmetic changesSasha Neftin (v3):
remove unused header filesSasha Neftin (v4):
update brand name
fix syntax by input from community
replacee1000_prefix withigc_prefix
Quoted 5 lines
Sasha Neftin (v5):
no changesSasha Neftin (v6):
no changes
In all these patches, this version stuff will be removed from the commit message before pushing upstream, right?
Normally they appear after the "---" so as to not be a part of the formal commit message saved in git.
[...]
Quoted 7 lines
drivers/net/ethernet/intel/igc/igc.h new file +1
-0@@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0 */
[...]
Quoted 1 line
+MODULE_LICENSE("GPL");
Since you're using the SPDX "GPL-2.0", you might want to use the MODULE_LICENSE string "GPL v2" to match. since "GPL" means v2 or later. See include/linux/module.h for details.
By the way, this all looks much nicer with the "igc_" prefix - thanks.
sln
PATCH v6 1/11 igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support.
Quoted 24 lines · Shannon Nelson
Quoted 17 lines · Sasha Neftin
This patch adds the beginning framework onto which I am going to add
the igc driver which supports the Intel(R) I225-LM/I225-V 2.5G Ethernet Controller.Sasha Neftin (v2):
update module author, copyright and licence header cosmetic changesSasha Neftin (v3):
remove unused header filesSasha Neftin (v4):
update brand name
fix syntax by input from community
replacee1000_prefix withigc_prefixQuoted 5 lines
Sasha Neftin (v5):
no changesSasha Neftin (v6):
no changes
Quoted 6 lines
In all these patches, this version stuff will be removed from the commit
message before pushing upstream, right?Normally they appear after the "---" so as to not be a part of the formal commit message saved in git.
Yes, when this eventually gets pushed upstream, the changelog will be
stripped.
-------------- 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/20180823/2dd489bb/attachment.asc>
Neftin
PATCH v6 1/11 igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support.
In reply to Shannon NelsonQuoted 44 lines · Shannon Nelson
Quoted 16 lines · Sasha Neftin
This patch adds the beginning framework onto which I am going to add the igc driver which supports the Intel(R) I225-LM/I225-V 2.5G Ethernet Controller.
Sasha Neftin (v2):
update module author, copyright and licence header cosmetic changesSasha Neftin (v3):
remove unused header filesSasha Neftin (v4):
update brand name
fix syntax by input from community
replacee1000_prefix withigc_prefixQuoted 5 lines
Sasha Neftin (v5):
no changesSasha Neftin (v6):
no changesIn all these patches, this version stuff will be removed from the commit message before pushing upstream, right?
Normally they appear after the "---" so as to not be a part of the formal commit message saved in git.
[...]
Quoted 8 lines
drivers/net/ethernet/intel/igc/igc.h new file +1
-0@@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0 */ [...]
Quoted 1 line
+MODULE_LICENSE("GPL");
Quoted 8 lines
Since you're using the SPDX "GPL-2.0", you might want to use the
MODULE_LICENSEstring "GPL v2" to match. since "GPL" means v2 or later. Seeinclude/linux/module.hfor details.By the way, this all looks much nicer with the "
igc_" prefix - thanks.sln
Our new drivers, ice, i40e, fm10k used same convention for prefix
naming. We decided keep igc_ prefix.
Thanks,
Sasha