From 932c3301d77b2896495476cf5d2a0fc26a5855d8 Mon Sep 17 00:00:00 2001 From: wangkaiyuan Date: Fri, 4 Jul 2025 15:12:41 +0800 Subject: [PATCH] ice: init 1.16.3.1 for 6.6 kernel Signed-off-by: wangkaiyuan --- COPYING | 319 + README | 4070 +++++ README.en.md | 36 - README.md | 39 - SUMS | 213 + ddp/LICENSE | 41 + ddp/README | 451 + ddp/ice-1.3.39.1.pkg | Bin 0 -> 1352580 bytes ice.7 | 5835 +++++++ ice.spec | 485 + .../kcompat_generated_keep_flags_ice.mk | 223 + kmod-ice.spec | 500 + licenses/GPL-2.0 | 359 + pci.updates | 101 + scripts/adqsetup/LICENSE | 28 + scripts/adqsetup/README.md | 232 + scripts/adqsetup/adqsetup.py | 3947 +++++ scripts/check_aux_bus | 235 + scripts/set_arfs | 86 + scripts/set_irq_affinity | 336 + scripts/set_xps_rxqs | 56 + security.md | 5 + src/Makefile | 292 + src/Module.supported | 2 + src/auxiliary.c | 284 + src/auxiliary_compat.h | 122 + src/common.mk | 462 + src/devlink/ice_devlink_health.c | 519 + src/devlink/ice_devlink_health.h | 54 + src/ice.h | 1879 +++ src/ice_acl.c | 591 + src/ice_acl.h | 202 + src/ice_acl_ctrl.c | 1168 ++ src/ice_acl_main.c | 367 + src/ice_adminq_cmd.h | 4469 ++++++ src/ice_arfs.c | 737 + src/ice_arfs.h | 85 + src/ice_aux_support.c | 41 + src/ice_aux_support.h | 8 + src/ice_base.c | 1183 ++ src/ice_base.h | 35 + src/ice_bst_tcam.c | 297 + src/ice_bst_tcam.h | 34 + src/ice_common.c | 8260 ++++++++++ src/ice_common.h | 405 + src/ice_controlq.c | 1243 ++ src/ice_controlq.h | 188 + src/ice_cpi.c | 474 + src/ice_cpi.h | 152 + src/ice_dcb.c | 1837 +++ src/ice_dcb.h | 233 + src/ice_dcb_lib.c | 1180 ++ src/ice_dcb_lib.h | 146 + src/ice_dcb_nl.c | 1278 ++ src/ice_dcb_nl.h | 20 + src/ice_dcf.c | 1195 ++ src/ice_dcf.h | 118 + src/ice_ddp.c | 2605 +++ src/ice_ddp.h | 466 + src/ice_debugfs.c | 1702 ++ src/ice_defs.h | 12 + src/ice_devids.h | 92 + src/ice_devlink.c | 3414 ++++ src/ice_devlink.h | 72 + src/ice_dpll.c | 2618 ++++ src/ice_dpll.h | 142 + src/ice_eswitch.c | 566 + src/ice_eswitch.h | 93 + src/ice_ethtool.c | 6668 ++++++++ src/ice_ethtool.h | 595 + src/ice_ethtool_common.h | 13 + src/ice_ethtool_fdir.c | 2338 +++ src/ice_fdir.c | 5008 ++++++ src/ice_fdir.h | 355 + src/ice_flex_pipe.c | 4879 ++++++ src/ice_flex_pipe.h | 104 + src/ice_flex_type.h | 765 + src/ice_flg_rd.c | 75 + src/ice_flg_rd.h | 16 + src/ice_flow.c | 4648 ++++++ src/ice_flow.h | 617 + src/ice_fltr.c | 595 + src/ice_fltr.h | 53 + src/ice_fw_update.c | 1100 ++ src/ice_fw_update.h | 16 + src/ice_fwlog.c | 470 + src/ice_fwlog.h | 79 + src/ice_gnss.c | 442 + src/ice_gnss.h | 46 + src/ice_hw_autogen.h | 743 + src/ice_hwmon.c | 129 + src/ice_hwmon.h | 12 + src/ice_idc.c | 1178 ++ src/ice_idc_int.h | 25 + src/ice_ieps.c | 1263 ++ src/ice_ieps.h | 23 + src/ice_ieps_lm.c | 900 ++ src/ice_imem.c | 250 + src/ice_imem.h | 108 + src/ice_irq.c | 702 + src/ice_irq.h | 34 + src/ice_lag.c | 1906 +++ src/ice_lag.h | 81 + src/ice_lan_tx_rx.h | 1449 ++ src/ice_lib.c | 5108 ++++++ src/ice_lib.h | 172 + src/ice_main.c | 13065 ++++++++++++++++ src/ice_metainit.c | 155 + src/ice_metainit.h | 45 + src/ice_migration.c | 701 + src/ice_migration.h | 45 + src/ice_migration_private.h | 29 + src/ice_mk_grp.c | 54 + src/ice_mk_grp.h | 14 + src/ice_nvm.c | 1862 +++ src/ice_nvm.h | 127 + src/ice_osdep.h | 199 + src/ice_parser.c | 595 + src/ice_parser.h | 114 + src/ice_parser_rt.c | 864 + src/ice_parser_rt.h | 47 + src/ice_parser_util.h | 35 + src/ice_pf_vsi_vlan_ops.c | 38 + src/ice_pf_vsi_vlan_ops.h | 13 + src/ice_pg_cam.c | 376 + src/ice_pg_cam.h | 73 + src/ice_phy_regs.h | 83 + src/ice_proto_grp.c | 105 + src/ice_proto_grp.h | 23 + src/ice_protocol_type.h | 537 + src/ice_ptp.c | 6101 ++++++++ src/ice_ptp.h | 520 + src/ice_ptp_consts.h | 432 + src/ice_ptp_hw.c | 6178 ++++++++ src/ice_ptp_hw.h | 790 + src/ice_ptype_mk.c | 75 + src/ice_ptype_mk.h | 20 + src/ice_repr.c | 651 + src/ice_repr.h | 44 + src/ice_sbq_cmd.h | 93 + src/ice_sched.c | 6057 +++++++ src/ice_sched.h | 274 + src/ice_siov.c | 1316 ++ src/ice_siov.h | 25 + src/ice_sriov.c | 2410 +++ src/ice_sriov.h | 247 + src/ice_switch.c | 9112 +++++++++++ src/ice_switch.h | 586 + src/ice_tc_lib.c | 2713 ++++ src/ice_tc_lib.h | 275 + src/ice_tmatch.h | 43 + src/ice_trace.h | 420 + src/ice_tspll.c | 1253 ++ src/ice_tspll.h | 114 + src/ice_txrx.c | 4102 +++++ src/ice_txrx.h | 599 + src/ice_txrx_lib.c | 448 + src/ice_txrx_lib.h | 100 + src/ice_type.h | 1890 +++ src/ice_vdcm.c | 1599 ++ src/ice_vdcm.h | 120 + src/ice_vf_adq.c | 1484 ++ src/ice_vf_adq.h | 25 + src/ice_vf_lib.c | 1969 +++ src/ice_vf_lib.h | 467 + src/ice_vf_lib_private.h | 44 + src/ice_vf_mbx.c | 413 + src/ice_vf_mbx.h | 62 + src/ice_vf_vsi_vlan_ops.c | 283 + src/ice_vf_vsi_vlan_ops.h | 21 + src/ice_vfio_pci.c | 825 + src/ice_virtchnl.c | 8679 ++++++++++ src/ice_virtchnl.h | 178 + src/ice_virtchnl_allowlist.c | 265 + src/ice_virtchnl_allowlist.h | 14 + src/ice_virtchnl_fdir.c | 4316 +++++ src/ice_virtchnl_fdir.h | 58 + src/ice_virtchnl_fsub.c | 864 + src/ice_virtchnl_fsub.h | 25 + src/ice_vlan.h | 19 + src/ice_vlan_mode.c | 443 + src/ice_vlan_mode.h | 15 + src/ice_vsi_vlan_lib.c | 768 + src/ice_vsi_vlan_lib.h | 33 + src/ice_vsi_vlan_ops.c | 104 + src/ice_vsi_vlan_ops.h | 30 + src/ice_xlt_kb.c | 221 + src/ice_xlt_kb.h | 33 + src/ice_xsk.c | 1583 ++ src/ice_xsk.h | 137 + src/idc_generic.h | 191 + src/ieps_peer.h | 327 + src/iidc.h | 314 + src/kcompat-generator.sh | 563 + src/kcompat-lib.sh | 416 + src/kcompat.c | 1508 ++ src/kcompat.h | 3061 ++++ src/kcompat_cleanup.h | 377 + src/kcompat_defs.h | 39 + src/kcompat_dim.c | 82 + src/kcompat_dim.h | 339 + src/kcompat_gcc.h | 138 + src/kcompat_gnss.c | 454 + src/kcompat_gnss.h | 88 + src/kcompat_impl.h | 3023 ++++ src/kcompat_kthread.h | 48 + src/kcompat_net_dim.c | 251 + src/kcompat_overflow.h | 493 + src/kcompat_pldmfw.c | 1134 ++ src/kcompat_pldmfw.h | 178 + src/kcompat_rhel_defs.h | 142 + src/kcompat_sles_defs.h | 169 + src/kcompat_std_defs.h | 230 + src/kcompat_ubuntu_defs.h | 35 + src/kcompat_xarray.h | 1889 +++ src/linux/auxiliary_bus.h | 103 + src/siov_regs.h | 38 + src/virtchnl.h | 4091 +++++ 218 files changed, 212734 insertions(+), 75 deletions(-) create mode 100644 COPYING create mode 100644 README delete mode 100644 README.en.md delete mode 100644 README.md create mode 100644 SUMS create mode 100755 ddp/LICENSE create mode 100755 ddp/README create mode 100755 ddp/ice-1.3.39.1.pkg create mode 100644 ice.7 create mode 100644 ice.spec create mode 100644 kcompat-gen/kcompat_generated_keep_flags_ice.mk create mode 100644 kmod-ice.spec create mode 100644 licenses/GPL-2.0 create mode 100644 pci.updates create mode 100644 scripts/adqsetup/LICENSE create mode 100644 scripts/adqsetup/README.md create mode 100755 scripts/adqsetup/adqsetup.py create mode 100755 scripts/check_aux_bus create mode 100755 scripts/set_arfs create mode 100755 scripts/set_irq_affinity create mode 100755 scripts/set_xps_rxqs create mode 100644 security.md create mode 100644 src/Makefile create mode 100644 src/Module.supported create mode 100644 src/auxiliary.c create mode 100644 src/auxiliary_compat.h create mode 100644 src/common.mk create mode 100644 src/devlink/ice_devlink_health.c create mode 100644 src/devlink/ice_devlink_health.h create mode 100644 src/ice.h create mode 100644 src/ice_acl.c create mode 100644 src/ice_acl.h create mode 100644 src/ice_acl_ctrl.c create mode 100644 src/ice_acl_main.c create mode 100644 src/ice_adminq_cmd.h create mode 100644 src/ice_arfs.c create mode 100644 src/ice_arfs.h create mode 100644 src/ice_aux_support.c create mode 100644 src/ice_aux_support.h create mode 100644 src/ice_base.c create mode 100644 src/ice_base.h create mode 100644 src/ice_bst_tcam.c create mode 100644 src/ice_bst_tcam.h create mode 100644 src/ice_common.c create mode 100644 src/ice_common.h create mode 100644 src/ice_controlq.c create mode 100644 src/ice_controlq.h create mode 100644 src/ice_cpi.c create mode 100644 src/ice_cpi.h create mode 100644 src/ice_dcb.c create mode 100644 src/ice_dcb.h create mode 100644 src/ice_dcb_lib.c create mode 100644 src/ice_dcb_lib.h create mode 100644 src/ice_dcb_nl.c create mode 100644 src/ice_dcb_nl.h create mode 100644 src/ice_dcf.c create mode 100644 src/ice_dcf.h create mode 100644 src/ice_ddp.c create mode 100644 src/ice_ddp.h create mode 100644 src/ice_debugfs.c create mode 100644 src/ice_defs.h create mode 100644 src/ice_devids.h create mode 100644 src/ice_devlink.c create mode 100644 src/ice_devlink.h create mode 100644 src/ice_dpll.c create mode 100644 src/ice_dpll.h create mode 100644 src/ice_eswitch.c create mode 100644 src/ice_eswitch.h create mode 100644 src/ice_ethtool.c create mode 100644 src/ice_ethtool.h create mode 100644 src/ice_ethtool_common.h create mode 100644 src/ice_ethtool_fdir.c create mode 100644 src/ice_fdir.c create mode 100644 src/ice_fdir.h create mode 100644 src/ice_flex_pipe.c create mode 100644 src/ice_flex_pipe.h create mode 100644 src/ice_flex_type.h create mode 100644 src/ice_flg_rd.c create mode 100644 src/ice_flg_rd.h create mode 100644 src/ice_flow.c create mode 100644 src/ice_flow.h create mode 100644 src/ice_fltr.c create mode 100644 src/ice_fltr.h create mode 100644 src/ice_fw_update.c create mode 100644 src/ice_fw_update.h create mode 100644 src/ice_fwlog.c create mode 100644 src/ice_fwlog.h create mode 100644 src/ice_gnss.c create mode 100644 src/ice_gnss.h create mode 100644 src/ice_hw_autogen.h create mode 100644 src/ice_hwmon.c create mode 100644 src/ice_hwmon.h create mode 100644 src/ice_idc.c create mode 100644 src/ice_idc_int.h create mode 100644 src/ice_ieps.c create mode 100644 src/ice_ieps.h create mode 100644 src/ice_ieps_lm.c create mode 100644 src/ice_imem.c create mode 100644 src/ice_imem.h create mode 100644 src/ice_irq.c create mode 100644 src/ice_irq.h create mode 100644 src/ice_lag.c create mode 100644 src/ice_lag.h create mode 100644 src/ice_lan_tx_rx.h create mode 100644 src/ice_lib.c create mode 100644 src/ice_lib.h create mode 100644 src/ice_main.c create mode 100644 src/ice_metainit.c create mode 100644 src/ice_metainit.h create mode 100644 src/ice_migration.c create mode 100644 src/ice_migration.h create mode 100644 src/ice_migration_private.h create mode 100644 src/ice_mk_grp.c create mode 100644 src/ice_mk_grp.h create mode 100644 src/ice_nvm.c create mode 100644 src/ice_nvm.h create mode 100644 src/ice_osdep.h create mode 100644 src/ice_parser.c create mode 100644 src/ice_parser.h create mode 100644 src/ice_parser_rt.c create mode 100644 src/ice_parser_rt.h create mode 100644 src/ice_parser_util.h create mode 100644 src/ice_pf_vsi_vlan_ops.c create mode 100644 src/ice_pf_vsi_vlan_ops.h create mode 100644 src/ice_pg_cam.c create mode 100644 src/ice_pg_cam.h create mode 100644 src/ice_phy_regs.h create mode 100644 src/ice_proto_grp.c create mode 100644 src/ice_proto_grp.h create mode 100644 src/ice_protocol_type.h create mode 100644 src/ice_ptp.c create mode 100644 src/ice_ptp.h create mode 100644 src/ice_ptp_consts.h create mode 100644 src/ice_ptp_hw.c create mode 100644 src/ice_ptp_hw.h create mode 100644 src/ice_ptype_mk.c create mode 100644 src/ice_ptype_mk.h create mode 100644 src/ice_repr.c create mode 100644 src/ice_repr.h create mode 100644 src/ice_sbq_cmd.h create mode 100644 src/ice_sched.c create mode 100644 src/ice_sched.h create mode 100644 src/ice_siov.c create mode 100644 src/ice_siov.h create mode 100644 src/ice_sriov.c create mode 100644 src/ice_sriov.h create mode 100644 src/ice_switch.c create mode 100644 src/ice_switch.h create mode 100644 src/ice_tc_lib.c create mode 100644 src/ice_tc_lib.h create mode 100644 src/ice_tmatch.h create mode 100644 src/ice_trace.h create mode 100644 src/ice_tspll.c create mode 100644 src/ice_tspll.h create mode 100644 src/ice_txrx.c create mode 100644 src/ice_txrx.h create mode 100644 src/ice_txrx_lib.c create mode 100644 src/ice_txrx_lib.h create mode 100644 src/ice_type.h create mode 100644 src/ice_vdcm.c create mode 100644 src/ice_vdcm.h create mode 100644 src/ice_vf_adq.c create mode 100644 src/ice_vf_adq.h create mode 100644 src/ice_vf_lib.c create mode 100644 src/ice_vf_lib.h create mode 100644 src/ice_vf_lib_private.h create mode 100644 src/ice_vf_mbx.c create mode 100644 src/ice_vf_mbx.h create mode 100644 src/ice_vf_vsi_vlan_ops.c create mode 100644 src/ice_vf_vsi_vlan_ops.h create mode 100644 src/ice_vfio_pci.c create mode 100644 src/ice_virtchnl.c create mode 100644 src/ice_virtchnl.h create mode 100644 src/ice_virtchnl_allowlist.c create mode 100644 src/ice_virtchnl_allowlist.h create mode 100644 src/ice_virtchnl_fdir.c create mode 100644 src/ice_virtchnl_fdir.h create mode 100644 src/ice_virtchnl_fsub.c create mode 100644 src/ice_virtchnl_fsub.h create mode 100644 src/ice_vlan.h create mode 100644 src/ice_vlan_mode.c create mode 100644 src/ice_vlan_mode.h create mode 100644 src/ice_vsi_vlan_lib.c create mode 100644 src/ice_vsi_vlan_lib.h create mode 100644 src/ice_vsi_vlan_ops.c create mode 100644 src/ice_vsi_vlan_ops.h create mode 100644 src/ice_xlt_kb.c create mode 100644 src/ice_xlt_kb.h create mode 100644 src/ice_xsk.c create mode 100644 src/ice_xsk.h create mode 100644 src/idc_generic.h create mode 100644 src/ieps_peer.h create mode 100644 src/iidc.h create mode 100644 src/kcompat-generator.sh create mode 100644 src/kcompat-lib.sh create mode 100644 src/kcompat.c create mode 100644 src/kcompat.h create mode 100644 src/kcompat_cleanup.h create mode 100644 src/kcompat_defs.h create mode 100644 src/kcompat_dim.c create mode 100644 src/kcompat_dim.h create mode 100644 src/kcompat_gcc.h create mode 100644 src/kcompat_gnss.c create mode 100644 src/kcompat_gnss.h create mode 100644 src/kcompat_impl.h create mode 100644 src/kcompat_kthread.h create mode 100644 src/kcompat_net_dim.c create mode 100644 src/kcompat_overflow.h create mode 100644 src/kcompat_pldmfw.c create mode 100644 src/kcompat_pldmfw.h create mode 100644 src/kcompat_rhel_defs.h create mode 100644 src/kcompat_sles_defs.h create mode 100644 src/kcompat_std_defs.h create mode 100644 src/kcompat_ubuntu_defs.h create mode 100644 src/kcompat_xarray.h create mode 100644 src/linux/auxiliary_bus.h create mode 100644 src/siov_regs.h create mode 100644 src/virtchnl.h diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..a953f51 --- /dev/null +++ b/COPYING @@ -0,0 +1,319 @@ +GNU GENERAL PUBLIC LICENSE + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to most +of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you can +do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a +fee, you must give the recipients all the rights that you have. You must make +sure that they, too, receive or can get the source code. And you must show them +these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer +you this license which gives you legal permission to copy, distribute and/or +modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced by +others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish +to avoid the danger that redistributors of a free program will individually +obtain patent licenses, in effect making the program proprietary. To prevent +this, we have made it clear that any patent must be licensed for everyone's free +use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included without +limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is not +restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the Program +a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at +your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such +modifications or work under the terms of Section 1 above, provided that you +also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices stating that + you changed the files and the date of any change. + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + c) If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, +and its terms, do not apply to those sections when you distribute them as +separate works. But when you distribute the same sections as part of a whole +which is a work based on the Program, the distribution of the whole must be on +the terms of this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on the +Program. + +In addition, mere aggregation of another work not based on the Program with +the Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and 2 +above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only for + noncommercial distribution and only if you received the program in object + code or executable form with such an offer, in accord with Subsection b + above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all the +source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code distributed +need not include anything that is normally distributed (in either source or +binary form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component itself +accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source code +from the same place counts as distribution of the source code, even though third +parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the +Program or its derivative works. These actions are prohibited by law if you do +not accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by third +parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement +or for any other reason (not limited to patent issues), conditions are imposed +on you (whether by court order, agreement or otherwise) that contradict the +conditions of this License, they do not excuse you from the conditions of this +License. If you cannot distribute so as to satisfy simultaneously your +obligations under this License and any other pertinent obligations, then as a +consequence you may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by all those +who receive copies directly or indirectly through you, then the only way you +could satisfy both it and this License would be to refrain entirely from +distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and the +section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original copyright +holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In such +case, this License incorporates the limitation as if written in the body of this +License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program specifies +a version number of this License which applies to it and "any later version", +you have the option of following the terms and conditions either of that version +or of any later version published by the Free Software Foundation. If the +Program does not specify a version number of this License, you may choose any +version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE +PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED +IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM +"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, +SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY +TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF +THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER +PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use +to the public, the best way to achieve this is to make it free software which +everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + one line to give the program's name and an idea of what it does. + Copyright (C) yyyy name of author + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details + type `show w'. This is free software, and you are welcome + to redistribute it under certain conditions; type `show c' + for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than `show w' and `show c' ; they could even be mouse- +clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here is +a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright + interest in the program `Gnomovision' + (which makes passes at compilers) written + by James Hacker. + + signature of Ty Coon, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may consider +it more useful to permit linking proprietary applications with the library. If +this is what you want to do, use the GNU Lesser General Public License instead +of this License. diff --git a/README b/README new file mode 100644 index 0000000..93b9868 --- /dev/null +++ b/README @@ -0,0 +1,4070 @@ +ice Linux* Base Driver for the Intel(R) Ethernet 800 Series +*********************************************************** + +December 09, 2024 + + +Contents +^^^^^^^^ + +* ice Linux* Base Driver for the Intel(R) Ethernet 800 Series + + * Overview + + * Related Documentation + + * Identifying Your Adapter + + * Important Notes + + * Building and Installation + + * Command Line Parameters + + * Additional Features and Configurations + + * Performance Optimization + + * Known Issues/Troubleshooting + + * Support + + * License + + * Trademarks + + +Overview +======== + +This driver supports Linux* kernel versions 3.10.0 and newer. However, +some features may require a newer kernel version. The associated +Virtual Function (VF) driver for this driver is iavf. The associated +RDMA driver for this driver is irdma. + +Driver information can be obtained using ethtool, devlink, lspci, and +ip. Instructions on updating ethtool can be found in the section +Additional Configurations later in this document. + +This driver is only supported as a loadable module at this time. Intel +is not supplying patches against the kernel source to allow for static +linking of the drivers. + +For questions related to hardware requirements, refer to the +documentation supplied with your Intel adapter. All hardware +requirements listed apply to use with Linux. + +This driver supports XDP (Express Data Path) on kernel 4.14 and later +and AF_XDP zero-copy on kernel 4.18 and later. Note that XDP is +blocked for frame sizes larger than 3KB. + + +Related Documentation +===================== + +See the "Intel(R) Ethernet Adapters and Devices User Guide" for +additional information on features. It is available on the Intel +website at https://cdrdv2.intel.com/v1/dl/getContent/705831. + + +Identifying Your Adapter +======================== + +The driver is compatible with devices based on the following: + +* Intel(R) Ethernet Controller E810-C + +* Intel(R) Ethernet Controller E810-XXV + +* Intel(R) Ethernet Connection E822-C + +* Intel(R) Ethernet Connection E822-L + +* Intel(R) Ethernet Connection E823-C + +* Intel(R) Ethernet Connection E823-L + +* Intel(R) Ethernet Controller E830 + +For information on how to identify your adapter, and for the latest +Intel network drivers, refer to the Intel Support website at +https://www.intel.com/support. + + +Important Notes +=============== + + +Configuring SR-IOV for improved network security +------------------------------------------------ + +In a virtualized environment, on Intel(R) Ethernet Network Adapters +that support SR-IOV, the virtual function (VF) may be subject to +malicious behavior. Software-generated layer two frames, like IEEE +802.3x (link flow control), IEEE 802.1Qbb (priority based flow- +control), and others of this type, are not expected and can throttle +traffic between the host and the virtual switch, reducing performance. +To resolve this issue, and to ensure isolation from unintended traffic +streams, configure all SR-IOV enabled ports for VLAN tagging from the +administrative interface on the PF. This configuration allows +unexpected, and potentially malicious, frames to be dropped. + +See Configuring VLAN Tagging on SR-IOV Enabled Adapter Ports later in +this README for configuration instructions. + + +Do not unload port driver if VF with active VM is bound to it +------------------------------------------------------------- + +Do not unload a port's driver if a Virtual Function (VF) with an +active Virtual Machine (VM) is bound to it. Doing so will cause the +port to appear to hang. Once the VM shuts down, or otherwise releases +the VF, the command will complete. + + +Firmware Recovery Mode +---------------------- + +A device will enter Firmware Recovery mode if it detects a problem +that requires the firmware to be reprogrammed. When a device is in +Firmware Recovery mode it will not pass traffic or allow any +configuration; you can only attempt to recover the device's firmware. +Refer to the "Intel(R) Ethernet Adapters and Devices User Guide" for +details on Firmware Recovery Mode and how to recover from it. + + +Important Notes for SR-IOV, RDMA, and Link Aggregation +------------------------------------------------------ + +The VF driver will not block teaming/bonding/link aggregation, but +this is not a supported feature. Do not expect failover or load +balancing on the VF interface. + +LAG and RDMA are compatible only in certain conditions. See the RDMA +(Remote Direct Memory Access) section later in this README for more +information. + +Bridging and MACVLAN are also affected by this. If you wish to use +bridging or MACVLAN with RDMA/SR-IOV, you must set up bridging or +MACVLAN before enabling RDMA or SR-IOV. If you are using bridging or +MACVLAN in conjunction with SR-IOV and/or RDMA, and you want to remove +the interface from the bridge or MACVLAN, you must follow these steps: + +1. Remove RDMA if it is active + +2. Destroy SR-IOV VFs if they exist + +3. Remove the interface from the bridge or MACVLAN + +4. Reactivate RDMA and recreate SR-IOV VFs as needed + + +Building and Installation +========================= + +The ice driver requires the Dynamic Device Personalization (DDP) +package file to enable advanced features (such as dynamic tunneling, +Intel(R) Ethernet Flow Director, RSS, and ADQ, or others). The driver +installation process installs the default DDP package file and creates +a soft link "ice.pkg" to the physical package "ice-x.x.x.x.pkg" in the +firmware root directory (typically "/lib/firmware/" or +"/lib/firmware/updates/"). The driver install process also puts both +the driver module and the DDP file in the "initramfs/initrd" image. + +Note: + + When the driver loads, it looks for "intel/ice/ddp/ice.pkg" in the + firmware root. If this file exists, the driver will download it into + the device. If not, the driver will go into Safe Mode where it will + use the configuration contained in the device's NVM. This is NOT a + supported configuration and many advanced features will not be + functional. See Dynamic Device Personalization later for more + information. + + +To manually build the driver +---------------------------- + +1. Move the base driver tar file to the directory of your choice. For + example, use "/home/username/ice" or "/usr/local/src/ice". + +2. Untar/unzip the archive, where "" is the version number for + the driver tar file: + + tar zxf ice-.tar.gz + +3. Change to the driver src directory, where "" is the version + number for the driver tar: + + cd ice-/src/ + +4. Compile the driver module: + + make install + + The binary will be installed as: + + /lib/modules//updates/drivers/net/ethernet/intel/ice/ice.ko + + The install location listed above is the default location. This may + differ for various Linux distributions. + + Note: + + To build the driver using the schema for unified ethtool + statistics, use the following command: + + make CFLAGS_EXTRA='-DUNIFIED_STATS' install + + Note: + + To compile the driver with ADQ (Application Device Queues) flags + set, use the following command, where "" is the number of + logical cores: + + make -j CFLAGS_EXTRA='-DADQ_PERF_COUNTERS' install + + (This will also apply the above "make install" command.) + + Note: + + You may see warnings from depmod related to unknown RDMA symbols + during the make of the out-of-tree base driver. These warnings + are normal and appear because the in-tree RDMA driver will not + work with the out-of-tree base driver. To address the issue, you + need to install the latest out-of-tree versions of the base and + RDMA drivers. + + Note: + + Some Linux distributions require you to manually regenerate + initramfs/initrd after installing the driver to allow the driver + to properly load with the firmware at boot time. Please refer to + the distribution documentation for instructions. + +5. Load the module using the modprobe command. + + To check the version of the driver and then load it: + + modinfo ice + modprobe ice + + Alternately, make sure that any older ice drivers are removed from + the kernel before loading the new module: + + rmmod ice; modprobe ice + + Note: + + To enable verbose debug messages in the kernel log, use the + dynamic debug feature (dyndbg). See Dynamic Debug later in this + README for more information. + +6. Assign an IP address to the interface by entering the following, + where "" is the interface name that was shown in dmesg after + modprobe: + + ip address add / dev + +7. Verify that the interface works. Enter the following, where + "IP_address" is the IP address for another machine on the same + subnet as the interface that is being tested: + + ping + + +To build a binary RPM package of this driver +-------------------------------------------- + +Note: + + RPM functionality has only been tested in Red Hat distributions. + +1. Run the following command, where "" is the version number + for the driver tar file: + + rpmbuild -tb ice-.tar.gz + + Note: + + For the build to work properly, the currently running kernel MUST + match the version and configuration of the installed kernel + sources. If you have just recompiled the kernel, reboot the + system before building. + +2. After building the RPM, the last few lines of the tool output + contain the location of the RPM file that was built. Install the + RPM with one of the following commands, where "" is the + location of the RPM file: + + rpm -Uvh + + or: + + dnf/yum localinstall + +3. If your distribution or kernel does not contain inbox support for + auxiliary bus, you must also install the auxiliary RPM: + + rpm -Uvh + + or: + + dnf/yum localinstall + + Note: + + On some distributions, the auxiliary RPM may fail to install due + to missing kernel-devel headers. To workaround this issue, + specify "--excludepath" during installation. For example: + + rpm -Uvh auxiliary-1.0.0-1.x86_64.rpm --excludepath=/lib/modules/3.10.0-957.el7.x86_64/source/include/linux/auxiliary_bus.h + +Note: + + * To compile the driver on some kernel/arch combinations, you may + need to install a package with the development version of libelf + (e.g. libelf-dev, libelf-devel, elfutils-libelf-devel). + + * When compiling an out-of-tree driver, details will vary by + distribution. However, you will usually need a kernel-devel RPM or + some RPM that provides the kernel headers at a minimum. The RPM + kernel-devel will usually fill in the link at "/lib/modules/'uname + -r'/build". + + +Command Line Parameters +======================= + +The only command line parameter the ice driver supports is the debug +parameter that can control the default logging verbosity of the +driver. (Note: dyndbg also provides dynamic debug information.) + +In general, use ethtool and other OS-specific commands to configure +user-changeable parameters after the driver is loaded. + + +Additional Features and Configurations +====================================== + + +ethtool +------- + +The driver utilizes the ethtool interface for driver configuration and +diagnostics, as well as displaying statistical information. The latest +ethtool version is required for this functionality. Download it at +https://kernel.org/pub/software/network/ethtool/. + + +Viewing Link Messages +--------------------- + +Link messages will not be displayed to the console if the distribution +is restricting system messages. In order to see network driver link +messages on your console, set dmesg to eight by entering the +following: + + dmesg -n 8 + +Note: + + This setting is not saved across reboots. + + +Dynamic Device Personalization +------------------------------ + +Dynamic Device Personalization (DDP) allows you to change the packet +processing pipeline of a device by applying a profile package to the +device at runtime. Profiles can be used to, for example, add support +for new protocols, change existing protocols, or change default +settings. DDP profiles can also be rolled back without rebooting the +system. + +The ice driver automatically installs the default DDP package file +during driver installation. + +Note: + + It's important to do "make install" during initial ice driver + installation so that the driver loads the DDP package automatically. + +The DDP package loads during device initialization. The driver looks +for "intel/ice/ddp/ice.pkg" in your firmware root (typically +"/lib/firmware/" or "/lib/firmware/updates/") and checks that it +contains a valid DDP package file. + +If the driver is unable to load the DDP package, the device will enter +Safe Mode. Safe Mode disables advanced and performance features and +supports only basic traffic and minimal functionality, such as +updating the NVM or downloading a new driver or DDP package. Safe Mode +only applies to the affected physical function and does not impact any +other PFs. See the "Intel(R) Ethernet Adapters and Devices User Guide" +for more details on DDP and Safe Mode. + +Note: + + * If you encounter issues with the DDP package file, you may need to + download an updated driver or DDP package file. See the log + messages for more information. + + * The "ice.pkg" file is a symbolic link to the default DDP package + file installed by the Linux-firmware software package or the ice + out-of-tree driver installation. + + * You cannot update the DDP package if any PF drivers are already + loaded. To overwrite a package, unload all PFs and then reload the + driver with the new package. + + * Only the first loaded PF per device can download a package for + that device. + +You can install specific DDP package files for different physical +devices in the same system. To install a specific DDP package file: + +1. Download the DDP package file you want for your device. + +2. Rename the file "ice-xxxxxxxxxxxxxxxx.pkg", where + "xxxxxxxxxxxxxxxx" is the unique 64-bit PCI Express device serial + number (in hex) of the device you want the package downloaded on. + The file name must include the complete serial number (including + leading zeros) and be all lowercase. For example, if the 64-bit + serial number is b887a3ffffca0568, then the file name would be + "ice-b887a3ffffca0568.pkg". + + To find the serial number from the PCI bus address, you can use the + following command: + + lspci -vv -s af:00.0 | grep -i Serial + + Capabilities: [150 v1] Device Serial Number b8-87-a3-ff-ff-ca-05-68 + + You can use the following command to format the serial number + without the dashes: + + lspci -vv -s af:00.0 | grep -i Serial | awk '{print $7}' | sed s/-//g b887a3ffffca0568 + +3. Copy the renamed DDP package file to + "/lib/firmware/updates/intel/ice/ddp/". If the directory does not + yet exist, create it before copying the file. + +4. Unload all of the PFs on the device. + +5. Reload the driver with the new package. + +Note: + + The presence of a device-specific DDP package file overrides the + loading of the default DDP package file ("ice.pkg"). + + +RDMA (Remote Direct Memory Access) +---------------------------------- + +Remote Direct Memory Access, or RDMA, allows a network device to +transfer data directly to and from application memory on another +system, increasing throughput and lowering latency in certain +networking environments. + +The ice driver supports the following RDMA protocols: + +* iWARP (Internet Wide Area RDMA Protocol) + +* RoCEv2 (RDMA over Converged Ethernet) + +The major difference is that iWARP performs RDMA over TCP, while +RoCEv2 uses UDP. + +RDMA requires auxiliary bus support. Refer to Auxiliary Bus in this +README for more information. + +Devices based on the Intel(R) Ethernet 800 Series do not support RDMA +when operating in multiport mode with more than 4 ports. + +For detailed installation and configuration information for RDMA, see +the README file in the irdma driver tarball. + + +RDMA in the VF +-------------- + +Devices based on the Intel(R) Ethernet 800 Series support RDMA in a +Linux VF, on supported Windows or Linux hosts. + +The iavf driver supports the following RDMA protocols in the VF: + +* iWARP (Internet Wide Area RDMA Protocol) + +* RoCEv2 (RDMA over Converged Ethernet) + +Refer to the README inside the irdma driver tarball for details on +configuring RDMA in the VF. + +Note: + + To support VF RDMA, load the irdma driver on the host before + creating VFs. Otherwise VF RDMA support may not be negotiated + between the VF and PF driver. + + +Auxiliary Bus +------------- + +Inter-Driver Communication (IDC) is the mechanism in which LAN drivers +(such as ice) communicate with peer drivers (such as irdma). Starting +in kernel 5.11, Intel LAN and RDMA drivers use an auxiliary bus +mechanism for IDC. + +RDMA functionality requires use of the auxiliary bus. + +If your kernel supports the auxiliary bus, the LAN and RDMA drivers +will use the inbox auxiliary bus for IDC. For kernels lower than 5.11, +the base driver will automatically install an out-of-tree auxiliary +bus module. + + +NVM Express* (NVMe) over TCP and Fabrics +---------------------------------------- + +RDMA provides a high throughput, low latency means to directly access +NVM Express* (NVMe*) drives on a remote server. + +Refer to the following configuration guides for details on supported +operating systems and how to set up and configure your server and +client systems: + +* NVM Express over TCP for Intel(R) Ethernet Products Configuration + Guide + +* NVM Express over Fabrics for Intel(R) Ethernet Products with RDMA + Configuration Guide + +Both guides are available on the Intel Technical Library at: +https://www.intel.com/content/www/us/en/design/products-and-solutions +/networking-and-io/ethernet-controller-e810/technical-library.html + + +Link Aggregation and RDMA +------------------------- + +Link aggregation (LAG) and RDMA are compatible only if all the +following are true: + +* You are using an Intel Ethernet 810 Series device with the latest + drivers and NVM installed. + +* RDMA technology is set to RoCEv2. + +* LAG configuration is either active-backup or active-active. + +* Bonding is between two ports within the same device. + +* The QoS configuration of the two ports matches prior to the bonding + of the devices. + +If the above conditions are not met: + +* The PF driver will not enable RDMA. + +* RDMA peers will not be able to register with the PF. + +Note: + + The first interface added to an aggregate (bond) is assigned as the + "primary" interface for RDMA and LAG functionality. If LAN + interfaces are assigned to the bond and you remove the primary + interface from the bond, RDMA will not function properly over the + bonded interface. To address the issue, remove all interfaces from + the bond and add them again. Interfaces that are not assigned to the + bond will operate normally. + +If the ice driver is configured for active-backup or active-active +LAG: + +* The ice driver will block any DCB/hardware QoS configuration changes + on the bonded ports. + +* Only the primary port is available for the RDMA driver. + +* The ice driver will forward RoCEv2 traffic from the secondary port + to the primary port by creating an appropriate switch rule. + +If the ice driver is configured for active-active LAG: + +* The ice driver will allow the RDMA driver to configure QSets for + both active ports. + +* A port failure on the active port will trigger a failover mechanism + and move the queue pairs to the currently active port. Once the port + has recovered, the RDMA driver will move RDMA QSets back to the + originally allocated port. + + +Application Device Queues (ADQ) +------------------------------- + +Application Device Queues (ADQ) allow you to dedicate one or more +queues to a specific application. This can reduce latency for the +specified application, and allow Tx traffic to be rate limited per +application. + +The ADQ information contained here is specific to the ice driver. For +more details, refer to the E810 ADQ Configuration Guide at +https://cdrdv2.intel.com/v1/dl/getContent/609008. + +Requirements: + +* Kernel version: Varies by feature. Refer to the E810 ADQ + Configuration Guide for more information on required kernel versions + for different ADQ features. + +* Operating system: Red Hat* Enterprise Linux* 7.5+ or SUSE* Linux + Enterprise Server* 12+ + +* The latest ice driver and NVM image (Note: You must compile the ice + driver with the ADQ flag as shown in the Building and Installation + section.) + +* The "sch_mqprio", "act_mirred", and "cls_flower" modules must be + loaded. For example: + + modprobe sch_mqprio + modprobe act_mirred + modprobe cls_flower + +* The latest version of iproute2 + + We recommend the following installation method: + + cd iproute2 + ./configure + make DESTDIR=/opt/iproute2 install + ln -s /opt/iproute2/sbin/tc /usr/local/sbin/tc + +When ADQ is enabled: + +* You cannot change RSS parameters, the number of queues, or the MAC + address in the PF or VF. Delete the ADQ configuration before + changing these settings. + +* The driver supports subnet masks for IP addresses in the PF and VF. + When you add a subnet mask filter, the driver forwards packets to + the ADQ VSI instead of the main VSI. + +* When the PF adds or deletes a port VLAN filter for the VF, it will + extend to all the VSIs within that VF. + +* The driver supports ADQ and GTP filters in the PF. Note: You must + have a DDP package that supports GTP; the default OS package does + not. Download the appropriate package from your hardware vendor and + load it on your device. + +* ADQ allows tc ingress filters that include any destination MAC + address. + +* You can configure up to 256 queue pairs (256 MSI-X interrupts) per + PF. + +See Creating Traffic Class Filters in this README for more information +on configuring filters, including examples. See the E810 ADQ +Configuration Guide for detailed instructions. + +ADQ KNOWN ISSUES: + +* The latest RHEL and SLES distros have kernels with back-ported + support for ADQ. For all other Linux distributions, you must use LTS + Linux kernel v4.19.58 or higher to use ADQ. The latest out-of-tree + driver is required for ADQ on all operating systems. + +* You must clear ADQ configuration in the reverse order of the initial + configuration steps. Issues may result if you do not execute the + steps to clear ADQ configuration in the correct order. + +* ADQ configuration is not supported on a bonded or teamed ice + interface. Issuing the ethtool or tc commands to a bonded ice + interface will result in error messages from the ice driver to + indicate the operation is not supported. + +* If the application stalls, the application-specific queues may stall + for up to two seconds. Configuring only one application per Traffic + Class (TC) channel may resolve the issue. + +* DCB and ADQ cannot coexist. A switch with DCB enabled might remove + the ADQ configuration from the device. To resolve the issue, do not + enable DCB on the switch ports being used for ADQ. You must disable + LLDP on the interface and stop the firmware LLDP agent using the + following command: + + ethtool --set-priv-flags fw-lldp-agent off + +* MACVLAN offloads and ADQ are mutually exclusive. System instability + may occur if you enable "l2-fwd-offload" and then set up ADQ, or if + you set up ADQ and then enable "l2-fwd-offload". + +* Note (unrelated to Intel drivers): The version 5.8.0 Linux kernel + introduced a bug that broke the interrupt affinity setting + mechanism, which breaks the ability to pin interrupts to ADQ + hardware queues. Use an earlier or later version of the Linux + kernel. + +* A core-level reset of an ADQ-configured PF port (rare events usually + triggered by other failures in the device or ice driver) results in + loss of ADQ configuration. To recover, reapply the ADQ configuration + to the PF interface. + +* Commands such as "tc qdisc add" and "ethtool -L" will cause the + driver to close the associated RDMA interface and reopen it. This + will disrupt RDMA traffic for 3-5 seconds until the RDMA interface + is available again for traffic. + +* Commands such as "tc qdisc add" and "ethtool -L" will clear other + tuning settings such as interrupt affinity. These tuning settings + will need to be reapplied. When the number of queues are increased + using "ethtool -L", the new queues will have the same interrupt + moderation settings as queue 0 (i.e., Tx queue 0 for new Tx queues + and Rx queue 0 for new Rx queues). You can change this using the + ethtool per-queue coalesce commands. + +* TC filters may not get offloaded in hardware if you apply them + immediately after issuing the "tc qdisc add" command. We recommend + you wait 5 seconds after issuing "tc qdisc add" before adding TC + filters. Dmesg will report the error if TC filters fail to add + properly. + + +Setting Up ADQ +~~~~~~~~~~~~~~ + +To set up the adapter for ADQ, where "" is the interface in use: + +1. Reload the ice driver to remove any previous TC configuration: + + rmmod ice + modprobe ice + +2. Enable hardware TC offload on the interface: + + ethtool -K hw-tc-offload on + +3. Disable LLDP on the interface, if it isn't already: + + ethtool --set-priv-flags fw-lldp-agent off + +4. Verify settings: + + ethtool -k | grep "hw-tc" + ethtool --show-priv-flags + + +ADQ Configuration Script +~~~~~~~~~~~~~~~~~~~~~~~~ + +Intel also provides a script to configure ADQ. This script allows you +configure ADQ-specific parameters such as traffic classes, priority, +filters, and ethtool parameters. + +Refer to the "README.md" file in "scripts/adqsetup" inside the driver +tarball for more information. + +The script and README are also available as part of the Python Package +Index at https://pypi.org/project/adqsetup. + + +Using ADQ with Independent Pollers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ice driver supports ADQ acceleration using independent pollers. +Independent pollers are kernel threads invoked by interrupts and are +used for busy polling on behalf of the application. + +You can configure the number of queues per poller and poller timeout +per ADQ traffic class (TC) or queue group using the "devlink dev +param" interface. + +To set the number of queue pairs per poller, use the following: + + devlink dev param set name tc_qps_per_poller value cmode runtime + +Where: + +: + The PCI address of the device (pci/Domain:bus:device.function). + +tc: + The traffic class number. + +: + The number of queues of the corresponding traffic class that each + poller would poll. + +To set the timeout for the independent poller, use the following: + + devlink dev param set name tc_poller_timeout value cmode runtime + +Where: + +: + The PCI address of the device (pci/Domain:bus:device.function). + +tc: + The traffic class number. + +: + A nonzero integer value in jiffies. + +For example: + +* To configure 3 queues of TC1 to be polled by each independent + poller: + + devlink dev param set pci/0000:3b:00.0 name tc1_qps_per_poller value 3 cmode runtime + +* To set the timeout value in jiffies for TC1 when no traffic is + flowing: + + devlink dev param set pci/0000:3b:00.0 name tc1_poller_timeout value 1000 cmode runtime + + +Configuring ADQ Flows per Traffic Class +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ice out-of-tree driver allows you to configure inline Intel(R) +Ethernet Flow Director (Intel(R) Ethernet FD) filters per traffic +class (TC) using the devlink interface. Inline Intel Ethernet FD +allows uniform distribution of flows among queues in a TC. + +Note: + + * This functionality requires Linux kernel version 5.6 or newer and + is supported only with the out-of-tree ice driver. + + * You must enable Transmit Packet Steering (XPS) using receive + queues for this feature to work correctly. + + * Per-TC filters set with devlink are not compatible with Intel + Ethernet FD filters set via ethtool. + +Use the following to configure inline Intel Ethernet FD filters per +TC: + + devlink dev param set name tc_inline_fd value cmode runtime + +Where: + +: + The PCI address of the device (pci/Domain:bus:device.function). + +tc: + The traffic class number. + +: + Set to true to enable inline per-TC Intel Ethernet FD, or false to + disable it. + +For example, to enable inline Intel Ethernet FD for TC1: + + devlink dev param set pci/0000:af:00.0 name tc1_inline_fd value true cmode runtime + +To show the current inline Intel Ethernet FD setting: + + devlink dev param show name tc_inline_fd + +For example, to show the inline Intel Ethernet FD setting for TC2 for +the specified device: + + devlink dev param show pci/0000:af:00.0 name tc2_inline_fd + + +Creating Traffic Classes +------------------------ + +Note: + + These instructions are not specific to ADQ configuration. Refer to + the tc and tc-flower man pages for more information on creating + traffic classes (TCs). + +To create traffic classes on the interface: + +1. Use the tc command to create traffic classes. You can create a + maximum of 16 TCs per interface: + + tc qdisc add dev root mqprio num_tc map + queues hw 1 mode channel shaper bw_rlimit + min_rate max_rate + + Where: + + num_tc : + The number of TCs to use. + + map : + The map of priorities to TCs. You can map up to 16 priorities to + TCs. + + queues : + For each TC, "\@". The max total number of + queues for all TCs is the number of cores. + + hw 1 mode channel: + "channel" with "hw" set to 1 is a new hardware offload mode in + mqprio that makes full use of the mqprio options, the TCs, the + queue configurations, and the QoS parameters. + + shaper bw_rlimit: + For each TC, sets the minimum and maximum bandwidth rates. The + totals must be equal to or less than the port speed. This + parameter is optional and is required only to set up the Tx + rates. + + min_rate : + Sets the minimum bandwidth rate limit for each TC. + + max_rate : + Sets the maximum bandwidth rate limit for each TC. You can set a + min and max rate together. + + Note: + + * If you set "max_rate" to less than 50Mbps, then "max_rate" is + rounded up to 50Mbps and a warning is logged in dmesg. + + * See the mqprio man page and the examples below for more + information. + +2. Verify the bandwidth limit using network monitoring tools such as + "ifstat" or "sar -n DEV [interval] [number of samples]". + + Note: + + Setting up channels via ethtool ("ethtool -L") is not supported + when the TCs are configured using mqprio. + +3. Enable hardware TC offload on the interface: + + ethtool -K hw-tc-offload on + +2. Add clsact qdisc to enable adding ingress/egress filters for Rx/Tx: + + tc qdisc add dev clsact + +3. Verify successful TC creation after qdisc is created: + + tc qdisc show dev ingress + +TRAFFIC CLASS EXAMPLES: + +See the tc and tc-flower man pages for more information on traffic +control and TC flower filters. + +* To set up two TCs (tc0 and tc1), with 16 queues each, priorities 0-3 + for tc0 and 4-7 for tc1, and max Tx rate set to 1Gbit for tc0 and + 3Gbit for tc1: + + tc qdisc add dev ens4f0 root mqprio num_tc 2 map 0 0 0 0 1 1 1 1 queues + 16@0 16@16 hw 1 mode channel shaper bw_rlimit max_rate 1Gbit 3Gbit + + Where: + + map 0 0 0 0 1 1 1 1: + Sets priorities 0-3 to use tc0 and 4-7 to use tc1 + + queues 16@0 16@16: + Assigns 16 queues to tc0 at offset 0 and 16 queues to tc1 at + offset 16 + +* To create 8 TCs with 256 queues spread across all the TCs, when ADQ + is enabled: + + tc qdisc add dev root mqprio num_tc 8 map 0 1 2 3 4 5 6 7 + queues 2@0 4@2 8@6 16@14 32@30 64@62 128@126 2@254 hw 1 mode channel + +* To set a minimum rate for a TC: + + tc qdisc add dev ens4f0 root mqprio num_tc 2 map 0 0 0 0 1 1 1 1 queues + 4@0 8@4 hw 1 mode channel shaper bw_rlimit min_rate 25Gbit 50Gbit + +* To set a maximum data rate for a TC: + + tc qdisc add dev ens4f0 root mqprio num_tc 2 map 0 0 0 0 1 1 1 1 queues + 4@0 8@4 hw 1 mode channel shaper bw_rlimit max_rate 25Gbit 50Gbit + +* To set both minimum and maximum data rates together: + + tc qdisc add dev ens4f0 root mqprio num_tc 2 map 0 0 0 0 1 1 1 1 queues + 4@0 8@4 hw 1 mode channel shaper bw_rlimit min_rate 10Gbit 20Gbit + max_rate 25Gbit 50Gbit + + +Creating Traffic Class Filters +------------------------------ + +Note: + + These instructions are not specific to ADQ configuration. + +After creating traffic classes, use the tc command to create filters +for traffic. Refer to the tc and tc-flower man pages for more +information. + +To view all TC filters: + + tc filter show dev ingress + tc filter show dev egress + +For detailed configuration information, supported fields, and example +code for switchdev mode on Intel Ethernet 800 Series devices, refer to +the configuration guide at https://edc.intel.com/content/www/us/en/de +sign/products/ethernet/appnote-e810-eswitch-switchdev-mode-config- +guide/. + +TC FILTER EXAMPLES: + +To configure TCP TC filters, where: + +protocol: + Encapsulation protocol (valid options are IP and 802.1Q). + +prio: + Priority. + +flower: + Flow-based traffic control filter. + +dst_ip: + IP address of the device. + +ip_proto: + IP protocol to use (TCP or UDP). + +dst_port: + Destination port. + +src_port: + Source port. + +skip_sw: + Flag to add the rule only in hardware. + +hw_tc: + Route incoming traffic flow to this hardware TC. The TC count + starts at 0. For example, "hw_tc 1" indicates that the filter is on + the second TC. + +vlan_id: + VLAN ID. + +* TCP: Destination IP + L4 Destination Port + + To route incoming TCP traffic with a matching destination IP address + and destination port to the given TC: + + tc filter add dev protocol ip ingress prio 1 flower dst_ip + ip_proto tcp dst_port skip_sw hw_tc 1 + +* TCP: Source IP + L4 Source Port + + To route outgoing TCP traffic with a matching source IP address and + source port to the given TC associated with the given priority: + + tc filter add dev protocol ip egress prio 1 flower src_ip + ip_proto tcp src_port action skbedit priority 1 + +* TCP: Destination IP + L4 Destination Port + VLAN Protocol + + To route incoming TCP traffic with a matching destination IP address + and destination port to the given TC using the VLAN protocol + (802.1Q): + + tc filter add dev protocol 802.1Q ingress prio 1 flower + dst_ip eth_type ipv4 ip_proto tcp dst_port + vlan_id skip_sw hw_tc 1 + +* To add a GTP filter: + + tc filter add dev protocol ip parent ffff: prio 1 flower + src_ip 16.0.0.0/16 ip_proto udp dst_port 5678 enc_dst_port 2152 + enc_key_id skip_sw hw_tc 1 + + Where: + + dst_port: + inner destination port of application (5678) + + enc_dst_port: + outer destination port (for GTP user data tunneling occurs on UDP + port 2152) + + enc_key_id: + tunnel ID (vxlan ID) + +Note: + + You can add multiple filters to the device, using the same recipe + (and requires no additional recipe resources), either on the same + interface or on different interfaces. Each filter uses the same + fields for matching, but can have different match values. + + tc filter add dev protocol ip ingress prio 1 flower ip_proto + tcp dst_port skip_sw hw_tc 1 + + tc filter add dev protocol ip egress prio 1 flower ip_proto tcp + src_port action skbedit priority 1 + + For example: + + tc filter add dev ens4f0 protocol ip ingress prio 1 flower ip_proto + tcp dst_port 5555 skip_sw hw_tc 1 + + tc filter add dev ens4f0 protocol ip egress prio 1 flower ip_proto + tcp src_port 5555 action skbedit priority 1 + + +Using TC Filters to Forward to a Queue +-------------------------------------- + +The ice driver supports directing traffic based on L2/L3/L4 fields in +the packet to specific Rx queues, using the TC filter's class ID. + +Note: + + This functionality can be used with or without ADQ. + +To add filters for the desired queue, use the following tc command: + + tc filter add dev ingress prio 1 protocol all flower src_mac + skip_sw classid ffff: + +Where: + +: + the MAC address(es) you want to direct to the Rx queue + +: + the Rx queue ID number in hexadecimal + +For example, to direct a single MAC address to queue 10: + + ethtool -K ens801 hw-tc-offload on + tc qdisc add dev ens801 clsact + tc filter add dev ens801 ingress prio 1 protocol all flower src_mac + 68:dd:ac:dc:19:00 skip_sw classid ffff:b + +To direct 4 source MAC addresses to Rx queues 10-13: + + ethtool -K ens801 hw-tc-offload on + tc qdisc add dev ens801 clsact + tc filter add dev ens801 ingress prio 1 protocol all flower src_mac + 68:dd:ac:dc:19:00 skip_sw classid ffff:b + tc filter add dev ens801 ingress prio 1 protocol all flower src_mac + 68:dd:ac:dc:19:01 skip_sw classid ffff:c + tc filter add dev ens801 ingress prio 1 protocol all flower src_mac + 68:dd:ac:dc:19:02 skip_sw classid ffff:d + tc filter add dev ens801 ingress prio 1 protocol all flower src_mac + 68:dd:ac:dc:19:03 skip_sw classid ffff:e + + +Intel(R) Ethernet Flow Director +------------------------------- + +The Intel(R) Ethernet Flow Director (Intel(R) Ethernet FD) performs +the following tasks: + +* Directs receive packets according to their flows to different queues + +* Enables tight control on routing a flow in the platform + +* Matches flows and CPU cores for flow affinity + +Note: + + An included script ("set_irq_affinity") automates setting the IRQ to + CPU affinity. + +This driver supports the following flow types: + +* IPv4 + +* TCPv4 + +* UDPv4 + +* SCTPv4 + +* IPv6 + +* TCPv6 + +* UDPv6 + +* SCTPv6 + +Each flow type supports valid combinations of IP addresses (source or +destination) and UDP/TCP/SCTP ports (source and destination). You can +supply only a source IP address, a source IP address and a destination +port, or any combination of one or more of these four parameters. + +Note: + + This driver allows you to filter traffic based on a user-defined + flexible two-byte pattern and offset by using the ethtool user-def + and mask fields. Only L3 and L4 flow types are supported for user- + defined flexible filters. For a given flow type, you must clear all + Intel Ethernet Flow Director filters before changing the input set + (for that flow type). + +Intel Ethernet Flow Director filters impact only LAN traffic. RDMA +filtering occurs before Intel Ethernet Flow Director, so Intel +Ethernet Flow Director filters will not impact RDMA. + +See the Intel(R) Ethernet Adapters and Devices User Guide for a table +that summarizes supported Intel Ethernet Flow Director features across +Intel(R) Ethernet controllers. + + +Intel Ethernet Flow Director Filters +------------------------------------ + +Intel Ethernet Flow Director filters are used to direct traffic that +matches specified characteristics. They are enabled through ethtool's +ntuple interface. To enable or disable the Intel Ethernet Flow +Director and these filters: + + ethtool -K ntuple + +Note: + + When you disable ntuple filters, all the user programmed filters are + flushed from the driver cache and hardware. All needed filters must + be re-added when ntuple is re-enabled. + +To display all of the active filters: + + ethtool -u + +To add a new filter: + + ethtool -U flow-type src-ip [m ] dst-ip + [m ] src-port [m ] dst-port [m ] + action + +Where: + +: + The Ethernet device to program + +: + Can be ip4, tcp4, udp4, sctp4, ip6, tcp6, udp6, sctp6 + +: + The IP address to match on + +: + The IPv4 address to mask on + + Note: + + These filters use inverted masks. An inverted mask with 0 means + exactly match while with 0xF means DON'T CARE. Please refer to + the examples for more details about inverted masks. + +: + The port number to match on + +: + The 16-bit integer for masking + + Note: + + These filters use inverted masks. + +: + The queue to direct traffic toward (-1 discards the matched + traffic) + +To delete a filter: + + ethtool -U delete + +Where "" is the filter ID displayed when printing all the active +filters, and may also have been specified using "loc " when adding +the filter. + +EXAMPLES: + +To add a filter that directs packet to queue 2: + + ethtool -U flow-type tcp4 src-ip 192.168.10.1 dst-ip \ + 192.168.10.2 src-port 2000 dst-port 2001 action 2 [loc 1] + +To set a filter using only the source and destination IP address: + + ethtool -U flow-type tcp4 src-ip 192.168.10.1 dst-ip \ + 192.168.10.2 action 2 [loc 1] + +To set a filter based on a user-defined pattern and offset, where the +value of the "user-def" field contains the offset (4 bytes) and the +pattern (0xffff): + + ethtool -U flow-type tcp4 src-ip 192.168.10.1 dst-ip \ + 192.168.10.2 user-def 0x4FFFF action 2 [loc 1] + +To match TCP traffic sent from 192.168.0.1, port 5300, directed to +192.168.0.5, port 80, and then send it to queue 7: + + ethtool -U enp130s0 flow-type tcp4 src-ip 192.168.0.1 dst-ip 192.168.0.5 \ + src-port 5300 dst-port 80 action 7 + +To add a TCPv4 filter with a partial mask for a source IP subnet. Here +the matched src-ip is 192.*.*.* (inverted mask): + + ethtool -U flow-type tcp4 src-ip 192.168.0.0 m 0.255.255.255 dst-ip \ + 192.168.5.12 src-port 12600 dst-port 31 action 12 + +Note: + + For each flow-type, the programmed filters must all have the same + matching input set. For example, issuing the following two commands + is acceptable: + + ethtool -U enp130s0 flow-type ip4 src-ip 192.168.0.1 src-port 5300 action 7 + ethtool -U enp130s0 flow-type ip4 src-ip 192.168.0.5 src-port 55 action 10 + + Issuing the next two commands, however, is not acceptable, since the + first specifies "src-ip" and the second specifies "dst-ip": + + ethtool -U enp130s0 flow-type ip4 src-ip 192.168.0.1 src-port 5300 action 7 + ethtool -U enp130s0 flow-type ip4 dst-ip 192.168.0.5 src-port 55 action 10 + + The second command will fail with an error. You may program multiple + filters with the same fields, using different values, but, on one + device, you may not program two tcp4 filters with different matching + fields.The ice driver does not support matching on a subportion of a + field, thus partial mask fields are not supported.The IPv4 filter + type will not match TCP, UDP or SCTP traffic. To match those types + of traffic, create separate filters for TCP, UDP and SCTP as desired + or use a different type of filtering. + + +Flex Byte Intel Ethernet Flow Director Filters +---------------------------------------------- + +The driver also supports matching user-defined data within the packet +payload. This flexible data is specified using the "user-def" field of +the ethtool command in the following way: + + +----------------------------+--------------------------+ + | 31 28 24 20 16 | 15 12 8 4 0 | + +----------------------------+--------------------------+ + | offset into packet payload | 2 bytes of flexible data | + +----------------------------+--------------------------+ + +For example: + + ... user-def 0x4FFFF ... + +tells the filter to look 4 bytes into the payload and match that value +against 0xFFFF. The offset is based on the beginning of the payload, +and not the beginning of the packet. Thus: + + flow-type tcp4 ... user-def 0x8BEAF ... + +would match TCP/IPv4 packets which have the value 0xBEAF 8 bytes into +the TCP/IPv4 payload. + +Note that ICMP headers are parsed as 4 bytes of header and 4 bytes of +payload. Thus to match the first byte of the payload, you must +actually add 4 bytes to the offset. Also note that ip4 filters match +both ICMP frames as well as raw (unknown) ip4 frames, where the +payload will be the L3 payload of the IP4 frame. + +The maximum offset is 64. The hardware will only read up to 64 bytes +of data from the payload. The offset must be even because the flexible +data is 2 bytes long and must be aligned to byte 0 of the packet +payload. + +The user-defined flexible offset is also considered part of the input +set and cannot be programmed separately for multiple filters of the +same type. However, the flexible data is not part of the input set and +multiple filters may use the same offset but match against different +data. + + +RSS Hash Flow +------------- + +Allows you to set the hash bytes per flow type and any combination of +one or more options for Receive Side Scaling (RSS) hash byte +configuration. + + ethtool -N rx-flow-hash