diff --git a/ChangeLog b/ChangeLog old mode 100644 new mode 100755 index 7d0baa079d6ff3a7607c9b57b7dedc69fe35cc45..6ee0d13cf774e099753ee6b39246020cdb345726 --- a/ChangeLog +++ b/ChangeLog @@ -1,110 +1,110 @@ -- Moved some data structures in the '.text' segment. -- Update the PortId printout for portmap fields -=============================================================================== -Version 1.3.2 (requires Switch API Version: 1.1.8.6) -- Update the Switch API help text regarding some flow table programming - metering action details. -- Corrected the implementation for IFX_ETHSW_QOS_SHAPER_QUEUE_GET. - This correction requires also a Switch API update to be newer than - version 1.1.8.6, because the ioctl command read-write flags needed - to be corrected. -=============================================================================== -Version 1.3.1 (requires Switch API Version: 1.1.8.5) -- Added regular metering action for flow table action part -=============================================================================== -Version 1.3.0 (requires Switch API Version: 1.1.8.5) -- Corrected IFX_ETHSW_MAC_TABLE_ENTRY_READ to not printout wrong entries when - portmap bit is set in 'PortId' field. Previously Port 31 got printed out - wrongly. -- Corrected generate portmap bit printout routine (used by many commands) - to not printout port id 31, which is the portmap indication bit and not - a port id. -- The decimal and hex value printout is only done for values > 9. -- Corrected IFX_ETHSW_VLAN_PORT_MEMBER_READ printout to support portmap output - parameter. -- Corrected IFX_ETHSW_MULTICAST_TABLE_ENTRY_READ printout to support portmap - output parameter. -- The Switch CLI also contains function that are dedicated for the selected - platform only (e.g. TANTOS). Cleanup the code to not compile functions that - are meant for another platform. -- Add "dev" parameter help text printout for all command help text printout, - which is triggered by the command parameter "--help". -- Shrink down the size of helptext table by removing trailing spaces. -- IFX_ETHSW_QOS_QUEUE_PORT_GET enhancement printing unused queues and all - port queues. -- Corrected help text typos. -=============================================================================== -Version 1.2.0 (requires Switch API Version: 1.1.8.4) -- Correct IFX_ETHSW_MAC_TABLE_ENTRY_READ implementation to printout entries - for physical/virtual ports which are greater than port 6. -- Accept boolean "IFX_TRUE"/"IFX_FALSE" parameter values. -- Accept short API command format, where the "IFX_ETHSW_" prefix is missing. - For instance, user could use the command "CFG_SET" instead - of "IFX_ETHSW_CFG_SET". -=============================================================================== -Version 1.1.2 (requires Switch API Version: 1.1.8.1) -- Adapt IFX_ETHSW_MAC_TABLE_ENTRY_READ implementation to printout - static- or learned- entries when the MAC address is 00:00:00:00:00:00. -=============================================================================== -Version 1.1.1 (requires Switch API Version: 1.1.7.1) -- Remove "bSpecialTagEgressSuppress" parameter from the IFX_ETHSW_CPU_CFG_SET - command. -=============================================================================== -Version 1.1.0 (requires Switch API Version: 1.1.7) -- Add implementation for IFX_ETHSW_WOL_CFG_GET and IFX_ETHSW_WOL_CFG_SET -=============================================================================== -Version 1.0.4 (requires Switch API Version: 1.1.7) -- Update the IFX_ETHSW_MAC_TABLE_ENTRY_QUERY and IFX_ETHSW_CFG_GET printout - displaying the MAC address information. -- Enhance the PortId parameter printout to also display the portmap bits, in - case the PortId MSB bit is set. This MSB bit indicated that the PortId field - carries a portmap information instead of port index value. -=============================================================================== -Version 1.0.3 (requires Switch API Version: 1.1.7) -- Extend the Register set commands be bit -set and -clear parameter, for bit - manipulation -- Corrected the help description for IFX_ETHSW_QOS_METER_PORT_ASSIGN - (Jira ticket SWITCHPHY_SW-295). -- Add flow table programming parameter support for bFlowID_Action & nFlowID - (SWITCHPHY_SW-307) -- Corrected switch_cli IFX_ETHSW_MAC_TABLE_ENTRY_READ (SWITCHPHY_SW-304) -- Corrected help text parameter support for IFX_ETHSW_MAC_TABLE_ENTRY_QUERY - (SWITCHPHY_SW-303) -- Enhance CPU port configuration (SWITCHPHY_SW-302) -=============================================================================== -Version 1.0.2 (requires Switch API Version: 1.1.6.7) -- Update the interface help text -=============================================================================== -Version 1.0.1 -- Update the description of the GSWIP flow table snooping parameter -=============================================================================== -Version 1.0.0 -- Add '--enable-dumpparam' to generate a test CLI application that dumps out - the ioctl parameter instead of calling the SWAPI driver. - This feature is only for testing purposes and not used inside the UGW - package. -- Update based on API interface parameter changes -=============================================================================== -Version 0.0.9 -- Regenerated the source code based on the Switch API interface changes and - extensions. -- Corrected some bugs regarding the MAC table printout algorithm -=============================================================================== -Version 0.0.7 -- Changed the IPv4 Address printout to full-up leading zeros. For instance, - print out "010.168.100.002" instead of "10.168.100.2". -- Add the automake build environment -- Corrected implementation for "IFX_ETHSW_QOS_QUEUE_PORT_GET/SET". It now - takes the "nPortId" and "nTrafficClassId" as input parameter. -- Update and corrected the help text -=============================================================================== -Version 0.0.6 -- Bug fix in the command parameter scanning function - (Jira ticket SWITCHPHY_SW-206) -- Change printout format for IFX_ETHSW_VERSION_GET -=============================================================================== -Version 0.0.5 -- Help text updated and enhanced -- Enhance usage information printout by Switch CLI version printout -- Reformated parameter printout improving readability -=============================================================================== +- Moved some data structures in the '.text' segment. +- Update the PortId printout for portmap fields +=============================================================================== +Version 1.3.2 (requires Switch API Version: 1.1.8.6) +- Update the Switch API help text regarding some flow table programming + metering action details. +- Corrected the implementation for IFX_ETHSW_QOS_SHAPER_QUEUE_GET. + This correction requires also a Switch API update to be newer than + version 1.1.8.6, because the ioctl command read-write flags needed + to be corrected. +=============================================================================== +Version 1.3.1 (requires Switch API Version: 1.1.8.5) +- Added regular metering action for flow table action part +=============================================================================== +Version 1.3.0 (requires Switch API Version: 1.1.8.5) +- Corrected IFX_ETHSW_MAC_TABLE_ENTRY_READ to not printout wrong entries when + portmap bit is set in 'PortId' field. Previously Port 31 got printed out + wrongly. +- Corrected generate portmap bit printout routine (used by many commands) + to not printout port id 31, which is the portmap indication bit and not + a port id. +- The decimal and hex value printout is only done for values > 9. +- Corrected IFX_ETHSW_VLAN_PORT_MEMBER_READ printout to support portmap output + parameter. +- Corrected IFX_ETHSW_MULTICAST_TABLE_ENTRY_READ printout to support portmap + output parameter. +- The Switch CLI also contains function that are dedicated for the selected + platform only (e.g. TANTOS). Cleanup the code to not compile functions that + are meant for another platform. +- Add "dev" parameter help text printout for all command help text printout, + which is triggered by the command parameter "--help". +- Shrink down the size of helptext table by removing trailing spaces. +- IFX_ETHSW_QOS_QUEUE_PORT_GET enhancement printing unused queues and all + port queues. +- Corrected help text typos. +=============================================================================== +Version 1.2.0 (requires Switch API Version: 1.1.8.4) +- Correct IFX_ETHSW_MAC_TABLE_ENTRY_READ implementation to printout entries + for physical/virtual ports which are greater than port 6. +- Accept boolean "IFX_TRUE"/"IFX_FALSE" parameter values. +- Accept short API command format, where the "IFX_ETHSW_" prefix is missing. + For instance, user could use the command "CFG_SET" instead + of "IFX_ETHSW_CFG_SET". +=============================================================================== +Version 1.1.2 (requires Switch API Version: 1.1.8.1) +- Adapt IFX_ETHSW_MAC_TABLE_ENTRY_READ implementation to printout + static- or learned- entries when the MAC address is 00:00:00:00:00:00. +=============================================================================== +Version 1.1.1 (requires Switch API Version: 1.1.7.1) +- Remove "bSpecialTagEgressSuppress" parameter from the IFX_ETHSW_CPU_CFG_SET + command. +=============================================================================== +Version 1.1.0 (requires Switch API Version: 1.1.7) +- Add implementation for IFX_ETHSW_WOL_CFG_GET and IFX_ETHSW_WOL_CFG_SET +=============================================================================== +Version 1.0.4 (requires Switch API Version: 1.1.7) +- Update the IFX_ETHSW_MAC_TABLE_ENTRY_QUERY and IFX_ETHSW_CFG_GET printout + displaying the MAC address information. +- Enhance the PortId parameter printout to also display the portmap bits, in + case the PortId MSB bit is set. This MSB bit indicated that the PortId field + carries a portmap information instead of port index value. +=============================================================================== +Version 1.0.3 (requires Switch API Version: 1.1.7) +- Extend the Register set commands be bit -set and -clear parameter, for bit + manipulation +- Corrected the help description for IFX_ETHSW_QOS_METER_PORT_ASSIGN + (Jira ticket SWITCHPHY_SW-295). +- Add flow table programming parameter support for bFlowID_Action & nFlowID + (SWITCHPHY_SW-307) +- Corrected switch_cli IFX_ETHSW_MAC_TABLE_ENTRY_READ (SWITCHPHY_SW-304) +- Corrected help text parameter support for IFX_ETHSW_MAC_TABLE_ENTRY_QUERY + (SWITCHPHY_SW-303) +- Enhance CPU port configuration (SWITCHPHY_SW-302) +=============================================================================== +Version 1.0.2 (requires Switch API Version: 1.1.6.7) +- Update the interface help text +=============================================================================== +Version 1.0.1 +- Update the description of the GSWIP flow table snooping parameter +=============================================================================== +Version 1.0.0 +- Add '--enable-dumpparam' to generate a test CLI application that dumps out + the ioctl parameter instead of calling the SWAPI driver. + This feature is only for testing purposes and not used inside the UGW + package. +- Update based on API interface parameter changes +=============================================================================== +Version 0.0.9 +- Regenerated the source code based on the Switch API interface changes and + extensions. +- Corrected some bugs regarding the MAC table printout algorithm +=============================================================================== +Version 0.0.7 +- Changed the IPv4 Address printout to full-up leading zeros. For instance, + print out "010.168.100.002" instead of "10.168.100.2". +- Add the automake build environment +- Corrected implementation for "IFX_ETHSW_QOS_QUEUE_PORT_GET/SET". It now + takes the "nPortId" and "nTrafficClassId" as input parameter. +- Update and corrected the help text +=============================================================================== +Version 0.0.6 +- Bug fix in the command parameter scanning function + (Jira ticket SWITCHPHY_SW-206) +- Change printout format for IFX_ETHSW_VERSION_GET +=============================================================================== +Version 0.0.5 +- Help text updated and enhanced +- Enhance usage information printout by Switch CLI version printout +- Reformated parameter printout improving readability +=============================================================================== diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 index 53e0189f7b12408f4d10e59261654e1ae2ca7273..a38c93d432a09dc3b9fbfdedd65af63e665b2727 --- a/LICENSE +++ b/LICENSE @@ -1,368 +1,368 @@ -This source code is distributed under a dual license of GPL and BSD (2-clause). -Please choose the appropriate license for your intended usage. - -1. BSD license (2-clause BSD license) - -Copyright (c) 2009, Lantiq Deutschland GmbH -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -2. 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. - - GNU GENERAL PUBLIC LICENSE - 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 a brief idea of what it does.> - Copyright (C) <year> <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. +This source code is distributed under a dual license of GPL and BSD (2-clause). +Please choose the appropriate license for your intended usage. + +1. BSD license (2-clause BSD license) + +Copyright (c) 2009, Lantiq Deutschland GmbH +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +2. 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. + + GNU GENERAL PUBLIC LICENSE + 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 a brief idea of what it does.> + Copyright (C) <year> <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/Makefile.am b/Makefile.am old mode 100644 new mode 100755 index a43c6171e7655b9c5141351355e82897d77e1352..f1f611fee056f2c7e7e7611de42ea315cbb4f70b --- a/Makefile.am +++ b/Makefile.am @@ -1,79 +1,79 @@ -# -# Copyright (c) 2010 -# Lantiq Deutschland GmbH -# Am Campeon 3; 85579 Neubiberg, Germany -# -# For licensing information, see the file 'LICENSE' in the root folder of -# this software module. -# - - -AUTOMAKE_OPTIONS = foreign 1.6 nostdinc -ACLOCAL_AMFLAGS = -I m4 - -SUBDIRS = src - -# set distcheck options - see configure.in for list of modifications -DISTCHECK_CONFIGURE_FLAGS=@CONFIGURE_OPTIONS@ - -#switch_cli_docdir = ${prefix}/doc/switch_cli - -#switch_cli_doc_DATA = \ -# ChangeLog \ -# LICENSE - -#EXTRA_DIST = \ -# $(switch_cli_doc_DATA) \ -# autogen.sh - -# Copy all the spec files. Of cource, only one is actually used. -dist-hook: - for specfile in *.spec; do \ - if test -f $$specfile; then \ - cp -p $$specfile $(distdir); \ - fi \ - done - -# Create self extracting linux distribution -distcheck-hook: - @echo -n "Checking for the line ending style... "; \ - failure_list="`find $(distdir) -path '$(distdir)/doc' -prune -o -type f -exec grep -Pqsc $$'\r\n' {} \; -printf '\tDOS line ending style: %p\n'`"; \ - if test -z "$$failure_list"; then \ - echo "Ok"; \ - else \ - echo "Fail"; \ - echo "$$failure_list"; \ - exit -1; \ - fi - makeself.sh --gzip --notemp $(distdir) switch_cli-${PACKAGE_VERSION}.sh \ - "${PACKAGE_NAME}" - -lint: - @target=lint; \ - list='$(SUBDIRS)'; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; - -rsm: - @target=rsm; \ - list='$(SUBDIRS)'; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; +# +# Copyright (c) 2010 +# Lantiq Deutschland GmbH +# Am Campeon 3; 85579 Neubiberg, Germany +# +# For licensing information, see the file 'LICENSE' in the root folder of +# this software module. +# + + +AUTOMAKE_OPTIONS = foreign 1.6 nostdinc +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = src + +# set distcheck options - see configure.in for list of modifications +DISTCHECK_CONFIGURE_FLAGS=@CONFIGURE_OPTIONS@ + +#switch_cli_docdir = ${prefix}/doc/switch_cli + +#switch_cli_doc_DATA = \ +# ChangeLog \ +# LICENSE + +#EXTRA_DIST = \ +# $(switch_cli_doc_DATA) \ +# autogen.sh + +# Copy all the spec files. Of cource, only one is actually used. +dist-hook: + for specfile in *.spec; do \ + if test -f $$specfile; then \ + cp -p $$specfile $(distdir); \ + fi \ + done + +# Create self extracting linux distribution +distcheck-hook: + @echo -n "Checking for the line ending style... "; \ + failure_list="`find $(distdir) -path '$(distdir)/doc' -prune -o -type f -exec grep -Pqsc $$'\r\n' {} \; -printf '\tDOS line ending style: %p\n'`"; \ + if test -z "$$failure_list"; then \ + echo "Ok"; \ + else \ + echo "Fail"; \ + echo "$$failure_list"; \ + exit -1; \ + fi + makeself.sh --gzip --notemp $(distdir) switch_cli-${PACKAGE_VERSION}.sh \ + "${PACKAGE_NAME}" + +lint: + @target=lint; \ + list='$(SUBDIRS)'; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; + +rsm: + @target=rsm; \ + list='$(SUBDIRS)'; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; diff --git a/autogen.sh b/autogen.sh old mode 100644 new mode 100755 index 5ea26484e7db93c02444d1228fdfc3594b981f69..3535e45afc1a6e65a2c41c7f4417514ce823403e --- a/autogen.sh +++ b/autogen.sh @@ -1,148 +1,148 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. - -srcdir=`dirname $0`/ -PKG_NAME="the package." - -DIE=0 - -(autoconf --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`autoconf' installed to." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 -} - -(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && { - (libtool --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`libtool' installed." - echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 - } -} - -# grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && { -# grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ -# (gettext --version) < /dev/null > /dev/null 2>&1 || { -# echo -# echo "**Error**: You must have \`gettext' installed." -# echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" -# echo "(or a newer version if it is available)" -# DIE=1 -# } -# } - -# grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && { -# grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ -# (gettext --version) < /dev/null > /dev/null 2>&1 || { -# echo -# echo "**Error**: You must have \`gettext' installed." -# echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" -# echo "(or a newer version if it is available)" -# DIE=1 -# } -# } - -(automake --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`automake' installed." - echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.6.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 - NO_AUTOMAKE=yes -} - - -# if no automake, don't bother testing for aclocal -test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: Missing \`aclocal'. The version of \`automake'" - echo "installed doesn't appear recent enough." - echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.6.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 -} - -if test "$DIE" -eq 1; then - exit 1 -fi - -if test -z "$*"; then - echo "**Warning**: I am going to run \`configure' with no arguments." - echo "If you wish to pass any to it, please specify them on the" - echo \`$0\'" command line." - echo -fi - -case $CC in -xlc ) - am_opt=--include-deps;; -esac - -for coin in `find $srcdir -name configure.in -print` -do - dr=`dirname $coin` - if test -f $dr/NO-AUTO-GEN; then - echo skipping $dr -- flagged as no auto-gen - else - echo processing $dr - macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin` - ( cd $dr - aclocalinclude="$ACLOCAL_FLAGS" - for k in $macrodirs; do - if test -d $k; then - aclocalinclude="$aclocalinclude -I $k" - ##else - ## echo "**Warning**: No such directory \`$k'. Ignored." - fi - done - if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then - if grep "sed.*POTFILES" configure.in >/dev/null; then - : do nothing -- we still have an old unmodified configure.in - else - echo "Creating $dr/aclocal.m4 ..." - test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 - echo "Running gettextize... Ignore non-fatal messages." - ./setup-gettext - echo "Making $dr/aclocal.m4 writable ..." - test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 - fi - fi - if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then - echo "Creating $dr/aclocal.m4 ..." - test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 - echo "Running gettextize... Ignore non-fatal messages." - ./setup-gettext - echo "Making $dr/aclocal.m4 writable ..." - test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 - fi - if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then - echo "Running libtoolize..." - libtoolize --force --copy - fi - echo "Running aclocal $aclocalinclude ..." - aclocal $aclocalinclude - if grep "^A[CM]_CONFIG_HEADER" configure.in >/dev/null; then - echo "Running autoheader..." - autoheader - fi - echo "Running automake $am_opt ..." - automake --add-missing $am_opt - echo "Running autoconf ..." - autoconf - ) - fi -done - -#conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c - -if test x$NOCONFIGURE = x; then - echo Running $srcdir/configure $conf_flags "$@" ... - $srcdir/configure $conf_flags "$@" \ - && echo Now type \`make\' to compile $PKG_NAME -else - echo Skipping configure process. -fi +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +srcdir=`dirname $0`/ +PKG_NAME="the package." + +DIE=0 + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`autoconf' installed to." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && { + (libtool --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`libtool' installed." + echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + } +} + +# grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && { +# grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ +# (gettext --version) < /dev/null > /dev/null 2>&1 || { +# echo +# echo "**Error**: You must have \`gettext' installed." +# echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" +# echo "(or a newer version if it is available)" +# DIE=1 +# } +# } + +# grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && { +# grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ +# (gettext --version) < /dev/null > /dev/null 2>&1 || { +# echo +# echo "**Error**: You must have \`gettext' installed." +# echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" +# echo "(or a newer version if it is available)" +# DIE=1 +# } +# } + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`automake' installed." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.6.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + NO_AUTOMAKE=yes +} + + +# if no automake, don't bother testing for aclocal +test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: Missing \`aclocal'. The version of \`automake'" + echo "installed doesn't appear recent enough." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.6.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +if test -z "$*"; then + echo "**Warning**: I am going to run \`configure' with no arguments." + echo "If you wish to pass any to it, please specify them on the" + echo \`$0\'" command line." + echo +fi + +case $CC in +xlc ) + am_opt=--include-deps;; +esac + +for coin in `find $srcdir -name configure.in -print` +do + dr=`dirname $coin` + if test -f $dr/NO-AUTO-GEN; then + echo skipping $dr -- flagged as no auto-gen + else + echo processing $dr + macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin` + ( cd $dr + aclocalinclude="$ACLOCAL_FLAGS" + for k in $macrodirs; do + if test -d $k; then + aclocalinclude="$aclocalinclude -I $k" + ##else + ## echo "**Warning**: No such directory \`$k'. Ignored." + fi + done + if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then + if grep "sed.*POTFILES" configure.in >/dev/null; then + : do nothing -- we still have an old unmodified configure.in + else + echo "Creating $dr/aclocal.m4 ..." + test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 + echo "Running gettextize... Ignore non-fatal messages." + ./setup-gettext + echo "Making $dr/aclocal.m4 writable ..." + test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 + fi + fi + if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then + echo "Creating $dr/aclocal.m4 ..." + test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 + echo "Running gettextize... Ignore non-fatal messages." + ./setup-gettext + echo "Making $dr/aclocal.m4 writable ..." + test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 + fi + if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then + echo "Running libtoolize..." + libtoolize --force --copy + fi + echo "Running aclocal $aclocalinclude ..." + aclocal $aclocalinclude + if grep "^A[CM]_CONFIG_HEADER" configure.in >/dev/null; then + echo "Running autoheader..." + autoheader + fi + echo "Running automake $am_opt ..." + automake --add-missing $am_opt + echo "Running autoconf ..." + autoconf + ) + fi +done + +#conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c + +if test x$NOCONFIGURE = x; then + echo Running $srcdir/configure $conf_flags "$@" ... + $srcdir/configure $conf_flags "$@" \ + && echo Now type \`make\' to compile $PKG_NAME +else + echo Skipping configure process. +fi diff --git a/configure.in b/configure.in old mode 100644 new mode 100755 index 1c7f9b847891ed5765592edf51215d2f52ebf1e1..2678c0401b31bf53fe7513831b1e7c5c142e6435 --- a/configure.in +++ b/configure.in @@ -1,206 +1,206 @@ -# -# Copyright (c) 2010 -# Lantiq Deutschland GmbH -# Am Campeon 3; 85579 Neubiberg, Germany -# -# For licensing information, see the file 'LICENSE' in the root folder of -# this software module. -# -# - -AC_PREREQ(2.59) -AC_COPYRIGHT([Copyright (C) 2010, Lantiq Deutschland GmbH -For licensing information please see the file 'LICENSE' in the root folder of -this software module.]) - -#AC_INIT([switch_cli - Ethernet Switch API Command Line Utility],[2.0.2],[],[switch_cli]) -AC_INIT([switch_cli - Ethernet Switch API Command Line Utility],[2.1.1],[],[switch_cli]) -AC_CONFIG_SRCDIR([src/swapi_cli.c]) -AM_INIT_AUTOMAKE - -# save the configure arguments -# remove the install dir from the distcheck configure line to avoid that the -# installed binaries are deleted on distcheck. The regex will remove -# --prefix and all subsequent "non-space" chars from the configure options -# as well as the internal features. -# Note: The escaped \' are important. -# Note: Don't lin* - it would match also --enable-linux-26 (!) -CONFIGURE_OPTIONS='' -for c_arg in $ac_configure_args; do - case $c_arg in - \'--prefix=*) - #echo "skipping configure option for distcheck: $c_arg" - ;; - *) - CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $c_arg" - ;; - esac -done -AC_SUBST(CONFIGURE_OPTIONS) - -AC_CONFIG_HEADER(switch_cli_config.h) - -AC_PROG_CC -AM_PROG_CC_C_O - -AH_TOP( -[/****************************************************************************** - - Copyright (c) 2010 - Lantiq Deutschland GmbH - Am Campeon 3; 85579 Neubiberg, Germany - - For licensing information, see the file 'LICENSE' in the root folder of - this software module. - - ****************************************************************************/ -#ifndef _SWITCHCLI_CONFIG_H_ -#define _SWITCHCLI_CONFIG_H_] -) - -AH_BOTTOM([ -#endif /* _SWITCHCLI_CONFIG_H_ */ -]) - -AC_DEFINE_UNQUOTED([SWITCHCLI_CONFIGURE_STR], ["$ac_configure_args"], [configure options string]) - -dnl Set kernel include path (new flag) -DEFAULT_SYS_INCL_PATH= -AC_ARG_ENABLE(kernelincl, - AS_HELP_STRING( - [--enable-kernelincl=x], - [set the kernel include path] - ), - [ - if test -n $enableval; then - echo enable including of system headers from $enableval - AC_SUBST([SYSTEM_INCL_PATH],[$enableval]) - else - AC_SUBST([SYSTEM_INCL_PATH],[$DEFAULT_SYS_INCL_PATH]) - fi - ], - [ - AC_SUBST([SYSTEM_INCL_PATH],[$DEFAULT_SYS_INCL_PATH]) - ] -) - -dnl Enable Warnings -AC_ARG_ENABLE(warnings, - AS_HELP_STRING( - [--enable-warnings], - [enable Warnings] - ), - [ - AC_MSG_RESULT(enable Warnings) - CFLAGS="$CFLAGS -Wall -Wunused -Wpointer-arith" - ] -) - -dnl GSWIP support -AC_ARG_ENABLE(gswip, - AS_HELP_STRING( - [--enable-gswip], - [enable Add GSWIP specific feature support] - ), - [ - AC_MSG_RESULT(enable Add GSWIP feature support) - AM_CONDITIONAL(SWITCHAPI_GSWIP_SUPPORT, true) - ], - [ - AM_CONDITIONAL(SWITCHAPI_GSWIP_SUPPORT, false) - ] -) - -dnl TANTOS support -AC_ARG_ENABLE(tantos, - AS_HELP_STRING( - [--enable-tantos], - [enable Add TANTOS/AR9 specific feature support] - ), - [ - AC_MSG_RESULT(enable Add TANTOS/AR9 feature support) - AM_CONDITIONAL(SWITCHAPI_TANTOS_SUPPORT, true) - ], - [ - AM_CONDITIONAL(SWITCHAPI_TANTOS_SUPPORT, false) - ] -) - -dnl help text printout support -AC_ARG_ENABLE(printhelp, - AS_HELP_STRING( - [--enable-printhelp], - [enable Add help text printout for every command] - ), - [ - AC_MSG_RESULT(enable Add help text printout for every command) - AC_DEFINE([SWITCHAPI_HELP_TEXT],[1],[enable add help text printout for every command]) - ] -) - -dnl enable warnings as error -AC_ARG_ENABLE(werror, - AS_HELP_STRING( - [--enable-werror], - [enable warnings as error] - ), - [ - if test $enableval = 'yes'; then - AM_CONDITIONAL(WERROR, true) - CFLAGS="$CFLAGS -Werror" - else - AM_CONDITIONAL(WERROR, false) - fi - ], - [ - AM_CONDITIONAL(WERROR, false) - ] -) - -dnl Dump ioctl parameter instead of driver call (Debug feature) -AC_ARG_ENABLE(dumpparam, - AS_HELP_STRING( - [--enable-dumpparam], - [enable Dump ioctl parameter instead of driver call (Debug feature)] - ), - [ - AC_MSG_RESULT(enable Dump ioctl parameter instead of driver call (Debug feature)) - AM_CONDITIONAL(CLI_DUMP_CALL, true) - ], - [ - AM_CONDITIONAL(CLI_DUMP_CALL, false) - ] -) - -dnl set additional (device specific) CFLAGS -AC_ARG_WITH(cflags, - AS_HELP_STRING( - [--with-cflags=val], - [pass additional CFLAGS, not required for Linux 2.6] - ), - [ - if test "$withval" = yes; then - AC_MSG_ERROR([Please provide a value for the maximum devices]); - fi - AC_MSG_RESULT([passing additional CFLAGS $withval]) - CFLAGS="$CFLAGS $withval" - ] -) - -AC_CONFIG_FILES([Makefile src/Makefile]) - -AC_OUTPUT - -echo \ -"------------------------------------------------------------------------ -Configuration: - - Source code location: ${srcdir} - System path: ${SYSTEM_INCL_PATH} - Compiler: ${CC} - Compiler flags: ${CFLAGS} - Host System Type: ${host} - Install path: ${prefix} -------------------------------------------------------------------------" - - +# +# Copyright (c) 2010 +# Lantiq Deutschland GmbH +# Am Campeon 3; 85579 Neubiberg, Germany +# +# For licensing information, see the file 'LICENSE' in the root folder of +# this software module. +# +# + +AC_PREREQ(2.59) +AC_COPYRIGHT([Copyright (C) 2010, Lantiq Deutschland GmbH +For licensing information please see the file 'LICENSE' in the root folder of +this software module.]) + +#AC_INIT([switch_cli - Ethernet Switch API Command Line Utility],[2.0.2],[],[switch_cli]) +AC_INIT([switch_cli - Ethernet Switch API Command Line Utility],[2.1.1],[],[switch_cli]) +AC_CONFIG_SRCDIR([src/swapi_cli.c]) +AM_INIT_AUTOMAKE + +# save the configure arguments +# remove the install dir from the distcheck configure line to avoid that the +# installed binaries are deleted on distcheck. The regex will remove +# --prefix and all subsequent "non-space" chars from the configure options +# as well as the internal features. +# Note: The escaped \' are important. +# Note: Don't lin* - it would match also --enable-linux-26 (!) +CONFIGURE_OPTIONS='' +for c_arg in $ac_configure_args; do + case $c_arg in + \'--prefix=*) + #echo "skipping configure option for distcheck: $c_arg" + ;; + *) + CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $c_arg" + ;; + esac +done +AC_SUBST(CONFIGURE_OPTIONS) + +AC_CONFIG_HEADER(switch_cli_config.h) + +AC_PROG_CC +AM_PROG_CC_C_O + +AH_TOP( +[/****************************************************************************** + + Copyright (c) 2010 + Lantiq Deutschland GmbH + Am Campeon 3; 85579 Neubiberg, Germany + + For licensing information, see the file 'LICENSE' in the root folder of + this software module. + + ****************************************************************************/ +#ifndef _SWITCHCLI_CONFIG_H_ +#define _SWITCHCLI_CONFIG_H_] +) + +AH_BOTTOM([ +#endif /* _SWITCHCLI_CONFIG_H_ */ +]) + +AC_DEFINE_UNQUOTED([SWITCHCLI_CONFIGURE_STR], ["$ac_configure_args"], [configure options string]) + +dnl Set kernel include path (new flag) +DEFAULT_SYS_INCL_PATH= +AC_ARG_ENABLE(kernelincl, + AS_HELP_STRING( + [--enable-kernelincl=x], + [set the kernel include path] + ), + [ + if test -n $enableval; then + echo enable including of system headers from $enableval + AC_SUBST([SYSTEM_INCL_PATH],[$enableval]) + else + AC_SUBST([SYSTEM_INCL_PATH],[$DEFAULT_SYS_INCL_PATH]) + fi + ], + [ + AC_SUBST([SYSTEM_INCL_PATH],[$DEFAULT_SYS_INCL_PATH]) + ] +) + +dnl Enable Warnings +AC_ARG_ENABLE(warnings, + AS_HELP_STRING( + [--enable-warnings], + [enable Warnings] + ), + [ + AC_MSG_RESULT(enable Warnings) + CFLAGS="$CFLAGS -Wall -Wunused -Wpointer-arith" + ] +) + +dnl GSWIP support +AC_ARG_ENABLE(gswip, + AS_HELP_STRING( + [--enable-gswip], + [enable Add GSWIP specific feature support] + ), + [ + AC_MSG_RESULT(enable Add GSWIP feature support) + AM_CONDITIONAL(SWITCHAPI_GSWIP_SUPPORT, true) + ], + [ + AM_CONDITIONAL(SWITCHAPI_GSWIP_SUPPORT, false) + ] +) + +dnl TANTOS support +AC_ARG_ENABLE(tantos, + AS_HELP_STRING( + [--enable-tantos], + [enable Add TANTOS/AR9 specific feature support] + ), + [ + AC_MSG_RESULT(enable Add TANTOS/AR9 feature support) + AM_CONDITIONAL(SWITCHAPI_TANTOS_SUPPORT, true) + ], + [ + AM_CONDITIONAL(SWITCHAPI_TANTOS_SUPPORT, false) + ] +) + +dnl help text printout support +AC_ARG_ENABLE(printhelp, + AS_HELP_STRING( + [--enable-printhelp], + [enable Add help text printout for every command] + ), + [ + AC_MSG_RESULT(enable Add help text printout for every command) + AC_DEFINE([SWITCHAPI_HELP_TEXT],[1],[enable add help text printout for every command]) + ] +) + +dnl enable warnings as error +AC_ARG_ENABLE(werror, + AS_HELP_STRING( + [--enable-werror], + [enable warnings as error] + ), + [ + if test $enableval = 'yes'; then + AM_CONDITIONAL(WERROR, true) + CFLAGS="$CFLAGS -Werror" + else + AM_CONDITIONAL(WERROR, false) + fi + ], + [ + AM_CONDITIONAL(WERROR, false) + ] +) + +dnl Dump ioctl parameter instead of driver call (Debug feature) +AC_ARG_ENABLE(dumpparam, + AS_HELP_STRING( + [--enable-dumpparam], + [enable Dump ioctl parameter instead of driver call (Debug feature)] + ), + [ + AC_MSG_RESULT(enable Dump ioctl parameter instead of driver call (Debug feature)) + AM_CONDITIONAL(CLI_DUMP_CALL, true) + ], + [ + AM_CONDITIONAL(CLI_DUMP_CALL, false) + ] +) + +dnl set additional (device specific) CFLAGS +AC_ARG_WITH(cflags, + AS_HELP_STRING( + [--with-cflags=val], + [pass additional CFLAGS, not required for Linux 2.6] + ), + [ + if test "$withval" = yes; then + AC_MSG_ERROR([Please provide a value for the maximum devices]); + fi + AC_MSG_RESULT([passing additional CFLAGS $withval]) + CFLAGS="$CFLAGS $withval" + ] +) + +AC_CONFIG_FILES([Makefile src/Makefile]) + +AC_OUTPUT + +echo \ +"------------------------------------------------------------------------ +Configuration: + + Source code location: ${srcdir} + System path: ${SYSTEM_INCL_PATH} + Compiler: ${CC} + Compiler flags: ${CFLAGS} + Host System Type: ${host} + Install path: ${prefix} +------------------------------------------------------------------------" + + diff --git a/src/Makefile.am b/src/Makefile.am old mode 100644 new mode 100755 index 9e7bb390e496bc9e258f115e7cda2e8d520dc6e5..a51f1bf6e04c891134deca9019370d76afcb6a8a --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,68 +1,74 @@ -# -# Copyright (c) 2010 -# Lantiq Deutschland GmbH -# Am Campeon 3; 85579 Neubiberg, Germany -# -# For licensing information, see the file 'LICENSE' in the root folder of -# this software module. -# - -bin_PROGRAMS = switch_cli -switch_cli_prgdir=../ - -#todo: include Makefile.inc - -# nodist_switch_cli_SOURCES = - -AM_CFLAGS = -Wall - -switch_cli_SOURCES = @srcdir@/swapi_cli.c \ - @srcdir@/ltq_cli_lib.c \ - @srcdir@/gsw_cli_fkts.c \ - @srcdir@/gsw_cli_fkts_common.c \ - @srcdir@/gsw_tbl.c \ - @srcdir@/gsw_cli_fkts_flow.c - - -#if SWAPI_PAE_SUPPORT -# switch_cli_SOURCES += @srcdir@/gsw_cli_pae.c -# AM_CFLAGS += -DSWAPI_PAE_SUPPORT -#endif - -if CLI_DUMP_CALL - AM_CFLAGS += -DCLI_DUMP_CALL - switch_cli_SOURCES += @srcdir@/ltq_cli_dump_call.c -endif - -EXTRA_DIST = \ - @srcdir@/ltq_cli_lib.h \ - @srcdir@/gsw_cli_fkts.h \ - @srcdir@/gsw_tbl.h \ - @srcdir@/ltq_cli_lib.c \ - @srcdir@/ltq_cli_dump_call.c \ - @srcdir@/gsw_cli_fkts.c \ - @srcdir@/gsw_cli_fkts_common.c \ - @srcdir@/gsw_cli_fkts_flow.c \ - @srcdir@/gsw_tbl.c \ - @srcdir@/swapi_cli.c - - -INCLUDES = \ - -I@srcdir@ \ - -I@abs_top_builddir@ \ - -I@top_srcdir@ \ - -I@srcdir@/../include \ - -I@SYSTEM_INCL_PATH@ - -lint: - @flint @srcdir@/../std_lx.lnt $(INCLUDES) \ - $(switch_cli_SOURCES) - -rsm: - rsm -fa -n -s -Ta $(switch_cli_SOURCES) $(EXTRA_DIST) - -install-exec-hook: $(bin_PROGRAMS) - @for p in $(bin_PROGRAMS); do \ - $(STRIP) $(DESTDIR)$(bindir)/$$p; \ - echo " $(STRIP) $(DESTDIR)$(bindir)/$$p"; \ - done +# +# Copyright (c) 2010 +# Lantiq Deutschland GmbH +# Am Campeon 3; 85579 Neubiberg, Germany +# +# For licensing information, see the file 'LICENSE' in the root folder of +# this software module. +# + +bin_PROGRAMS = switch_cli +switch_cli_prgdir=../ + +#todo: include Makefile.inc + +# nodist_switch_cli_SOURCES = + +AM_CFLAGS = -Wall + +switch_cli_SOURCES = @srcdir@/swapi_cli.c \ + @srcdir@/ltq_cli_lib.c \ + @srcdir@/gsw_cli_fkts.c \ + @srcdir@/gsw_cli_fkts_common.c \ + @srcdir@/gsw_tbl.c \ + @srcdir@/gsw_cli_fkts_flow.c \ + @srcdir@/gsw_cli_mac.c \ + @srcdir@/gsw_cli_lmac.c \ + @srcdir@/gsw_cli_adap.c + + +#if SWAPI_PAE_SUPPORT +# switch_cli_SOURCES += @srcdir@/gsw_cli_pae.c +# AM_CFLAGS += -DSWAPI_PAE_SUPPORT +#endif + +if CLI_DUMP_CALL + AM_CFLAGS += -DCLI_DUMP_CALL + switch_cli_SOURCES += @srcdir@/ltq_cli_dump_call.c +endif + +EXTRA_DIST = \ + @srcdir@/ltq_cli_lib.h \ + @srcdir@/gsw_cli_fkts.h \ + @srcdir@/gsw_tbl.h \ + @srcdir@/ltq_cli_lib.c \ + @srcdir@/ltq_cli_dump_call.c \ + @srcdir@/gsw_cli_fkts.c \ + @srcdir@/gsw_cli_mac.c \ + @srcdir@/gsw_cli_lmac.c \ + @srcdir@/gsw_cli_adap.c \ + @srcdir@/gsw_cli_fkts_common.c \ + @srcdir@/gsw_cli_fkts_flow.c \ + @srcdir@/gsw_tbl.c \ + @srcdir@/swapi_cli.c + + +INCLUDES = \ + -I@srcdir@ \ + -I@abs_top_builddir@ \ + -I@top_srcdir@ \ + -I@srcdir@/../include \ + -I@SYSTEM_INCL_PATH@ + +lint: + @flint @srcdir@/../std_lx.lnt $(INCLUDES) \ + $(switch_cli_SOURCES) + +rsm: + rsm -fa -n -s -Ta $(switch_cli_SOURCES) $(EXTRA_DIST) + +install-exec-hook: $(bin_PROGRAMS) + @for p in $(bin_PROGRAMS); do \ + $(STRIP) $(DESTDIR)$(bindir)/$$p; \ + echo " $(STRIP) $(DESTDIR)$(bindir)/$$p"; \ + done diff --git a/src/Makefile.in b/src/Makefile.in old mode 100644 new mode 100755 index e9428eba16cac05ab1757dafde342be37fbc7855..e8769b0e83f05363b52bdaf1364e568330c1c4af --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,732 +1,721 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# Copyright (c) 2010 -# Lantiq Deutschland GmbH -# Am Campeon 3; 85579 Neubiberg, Germany -# -# For licensing information, see the file 'LICENSE' in the root folder of -# this software module. -# - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -bin_PROGRAMS = switch_cli$(EXEEXT) - -#if SWAPI_PAE_SUPPORT -# switch_cli_SOURCES += @srcdir@/gsw_cli_pae.c -# AM_CFLAGS += -DSWAPI_PAE_SUPPORT -#endif -@CLI_DUMP_CALL_TRUE@am__append_1 = -DCLI_DUMP_CALL -@CLI_DUMP_CALL_TRUE@am__append_2 = @srcdir@/ltq_cli_dump_call.c -subdir = src -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/switch_cli_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am__switch_cli_SOURCES_DIST = @srcdir@/swapi_cli.c \ - @srcdir@/ltq_cli_lib.c @srcdir@/gsw_cli_fkts.c \ - @srcdir@/gsw_cli_fkts_common.c @srcdir@/gsw_tbl.c \ - @srcdir@/gsw_cli_fkts_flow.c @srcdir@/ltq_cli_dump_call.c -@CLI_DUMP_CALL_TRUE@am__objects_1 = ltq_cli_dump_call.$(OBJEXT) -am_switch_cli_OBJECTS = swapi_cli.$(OBJEXT) ltq_cli_lib.$(OBJEXT) \ - gsw_cli_fkts.$(OBJEXT) gsw_cli_fkts_common.$(OBJEXT) \ - gsw_tbl.$(OBJEXT) gsw_cli_fkts_flow.$(OBJEXT) $(am__objects_1) -switch_cli_OBJECTS = $(am_switch_cli_OBJECTS) -switch_cli_LDADD = $(LDADD) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(switch_cli_SOURCES) -DIST_SOURCES = $(am__switch_cli_SOURCES_DIST) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EXEEXT = @EXEEXT@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SYSTEM_INCL_PATH = @SYSTEM_INCL_PATH@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build_alias = @build_alias@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -switch_cli_prgdir = ../ - -#todo: include Makefile.inc - -# nodist_switch_cli_SOURCES = -AM_CFLAGS = -Wall $(am__append_1) -switch_cli_SOURCES = @srcdir@/swapi_cli.c @srcdir@/ltq_cli_lib.c \ - @srcdir@/gsw_cli_fkts.c @srcdir@/gsw_cli_fkts_common.c \ - @srcdir@/gsw_tbl.c @srcdir@/gsw_cli_fkts_flow.c \ - $(am__append_2) -EXTRA_DIST = \ - @srcdir@/ltq_cli_lib.h \ - @srcdir@/gsw_cli_fkts.h \ - @srcdir@/gsw_tbl.h \ - @srcdir@/ltq_cli_lib.c \ - @srcdir@/ltq_cli_dump_call.c \ - @srcdir@/gsw_cli_fkts.c \ - @srcdir@/gsw_cli_fkts_common.c \ - @srcdir@/gsw_cli_fkts_flow.c \ - @srcdir@/gsw_tbl.c \ - @srcdir@/swapi_cli.c - -INCLUDES = \ - -I@srcdir@ \ - -I@abs_top_builddir@ \ - -I@top_srcdir@ \ - -I@srcdir@/../include \ - -I@SYSTEM_INCL_PATH@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) - -switch_cli$(EXEEXT): $(switch_cli_OBJECTS) $(switch_cli_DEPENDENCIES) $(EXTRA_switch_cli_DEPENDENCIES) - @rm -f switch_cli$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(switch_cli_OBJECTS) $(switch_cli_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsw_cli_fkts.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsw_cli_fkts_common.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsw_cli_fkts_flow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsw_tbl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltq_cli_dump_call.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltq_cli_lib.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swapi_cli.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -swapi_cli.o: @srcdir@/swapi_cli.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT swapi_cli.o -MD -MP -MF $(DEPDIR)/swapi_cli.Tpo -c -o swapi_cli.o `test -f '@srcdir@/swapi_cli.c' || echo '$(srcdir)/'`@srcdir@/swapi_cli.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/swapi_cli.Tpo $(DEPDIR)/swapi_cli.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/swapi_cli.c' object='swapi_cli.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o swapi_cli.o `test -f '@srcdir@/swapi_cli.c' || echo '$(srcdir)/'`@srcdir@/swapi_cli.c - -swapi_cli.obj: @srcdir@/swapi_cli.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT swapi_cli.obj -MD -MP -MF $(DEPDIR)/swapi_cli.Tpo -c -o swapi_cli.obj `if test -f '@srcdir@/swapi_cli.c'; then $(CYGPATH_W) '@srcdir@/swapi_cli.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/swapi_cli.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/swapi_cli.Tpo $(DEPDIR)/swapi_cli.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/swapi_cli.c' object='swapi_cli.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o swapi_cli.obj `if test -f '@srcdir@/swapi_cli.c'; then $(CYGPATH_W) '@srcdir@/swapi_cli.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/swapi_cli.c'; fi` - -ltq_cli_lib.o: @srcdir@/ltq_cli_lib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltq_cli_lib.o -MD -MP -MF $(DEPDIR)/ltq_cli_lib.Tpo -c -o ltq_cli_lib.o `test -f '@srcdir@/ltq_cli_lib.c' || echo '$(srcdir)/'`@srcdir@/ltq_cli_lib.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ltq_cli_lib.Tpo $(DEPDIR)/ltq_cli_lib.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/ltq_cli_lib.c' object='ltq_cli_lib.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltq_cli_lib.o `test -f '@srcdir@/ltq_cli_lib.c' || echo '$(srcdir)/'`@srcdir@/ltq_cli_lib.c - -ltq_cli_lib.obj: @srcdir@/ltq_cli_lib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltq_cli_lib.obj -MD -MP -MF $(DEPDIR)/ltq_cli_lib.Tpo -c -o ltq_cli_lib.obj `if test -f '@srcdir@/ltq_cli_lib.c'; then $(CYGPATH_W) '@srcdir@/ltq_cli_lib.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/ltq_cli_lib.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ltq_cli_lib.Tpo $(DEPDIR)/ltq_cli_lib.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/ltq_cli_lib.c' object='ltq_cli_lib.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltq_cli_lib.obj `if test -f '@srcdir@/ltq_cli_lib.c'; then $(CYGPATH_W) '@srcdir@/ltq_cli_lib.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/ltq_cli_lib.c'; fi` - -gsw_cli_fkts.o: @srcdir@/gsw_cli_fkts.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_cli_fkts.o -MD -MP -MF $(DEPDIR)/gsw_cli_fkts.Tpo -c -o gsw_cli_fkts.o `test -f '@srcdir@/gsw_cli_fkts.c' || echo '$(srcdir)/'`@srcdir@/gsw_cli_fkts.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_cli_fkts.Tpo $(DEPDIR)/gsw_cli_fkts.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_cli_fkts.c' object='gsw_cli_fkts.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_cli_fkts.o `test -f '@srcdir@/gsw_cli_fkts.c' || echo '$(srcdir)/'`@srcdir@/gsw_cli_fkts.c - -gsw_cli_fkts.obj: @srcdir@/gsw_cli_fkts.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_cli_fkts.obj -MD -MP -MF $(DEPDIR)/gsw_cli_fkts.Tpo -c -o gsw_cli_fkts.obj `if test -f '@srcdir@/gsw_cli_fkts.c'; then $(CYGPATH_W) '@srcdir@/gsw_cli_fkts.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_cli_fkts.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_cli_fkts.Tpo $(DEPDIR)/gsw_cli_fkts.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_cli_fkts.c' object='gsw_cli_fkts.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_cli_fkts.obj `if test -f '@srcdir@/gsw_cli_fkts.c'; then $(CYGPATH_W) '@srcdir@/gsw_cli_fkts.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_cli_fkts.c'; fi` - -gsw_cli_fkts_common.o: @srcdir@/gsw_cli_fkts_common.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_cli_fkts_common.o -MD -MP -MF $(DEPDIR)/gsw_cli_fkts_common.Tpo -c -o gsw_cli_fkts_common.o `test -f '@srcdir@/gsw_cli_fkts_common.c' || echo '$(srcdir)/'`@srcdir@/gsw_cli_fkts_common.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_cli_fkts_common.Tpo $(DEPDIR)/gsw_cli_fkts_common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_cli_fkts_common.c' object='gsw_cli_fkts_common.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_cli_fkts_common.o `test -f '@srcdir@/gsw_cli_fkts_common.c' || echo '$(srcdir)/'`@srcdir@/gsw_cli_fkts_common.c - -gsw_cli_fkts_common.obj: @srcdir@/gsw_cli_fkts_common.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_cli_fkts_common.obj -MD -MP -MF $(DEPDIR)/gsw_cli_fkts_common.Tpo -c -o gsw_cli_fkts_common.obj `if test -f '@srcdir@/gsw_cli_fkts_common.c'; then $(CYGPATH_W) '@srcdir@/gsw_cli_fkts_common.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_cli_fkts_common.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_cli_fkts_common.Tpo $(DEPDIR)/gsw_cli_fkts_common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_cli_fkts_common.c' object='gsw_cli_fkts_common.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_cli_fkts_common.obj `if test -f '@srcdir@/gsw_cli_fkts_common.c'; then $(CYGPATH_W) '@srcdir@/gsw_cli_fkts_common.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_cli_fkts_common.c'; fi` - -gsw_tbl.o: @srcdir@/gsw_tbl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_tbl.o -MD -MP -MF $(DEPDIR)/gsw_tbl.Tpo -c -o gsw_tbl.o `test -f '@srcdir@/gsw_tbl.c' || echo '$(srcdir)/'`@srcdir@/gsw_tbl.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_tbl.Tpo $(DEPDIR)/gsw_tbl.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_tbl.c' object='gsw_tbl.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_tbl.o `test -f '@srcdir@/gsw_tbl.c' || echo '$(srcdir)/'`@srcdir@/gsw_tbl.c - -gsw_tbl.obj: @srcdir@/gsw_tbl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_tbl.obj -MD -MP -MF $(DEPDIR)/gsw_tbl.Tpo -c -o gsw_tbl.obj `if test -f '@srcdir@/gsw_tbl.c'; then $(CYGPATH_W) '@srcdir@/gsw_tbl.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_tbl.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_tbl.Tpo $(DEPDIR)/gsw_tbl.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_tbl.c' object='gsw_tbl.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_tbl.obj `if test -f '@srcdir@/gsw_tbl.c'; then $(CYGPATH_W) '@srcdir@/gsw_tbl.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_tbl.c'; fi` - -gsw_cli_fkts_flow.o: @srcdir@/gsw_cli_fkts_flow.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_cli_fkts_flow.o -MD -MP -MF $(DEPDIR)/gsw_cli_fkts_flow.Tpo -c -o gsw_cli_fkts_flow.o `test -f '@srcdir@/gsw_cli_fkts_flow.c' || echo '$(srcdir)/'`@srcdir@/gsw_cli_fkts_flow.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_cli_fkts_flow.Tpo $(DEPDIR)/gsw_cli_fkts_flow.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_cli_fkts_flow.c' object='gsw_cli_fkts_flow.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_cli_fkts_flow.o `test -f '@srcdir@/gsw_cli_fkts_flow.c' || echo '$(srcdir)/'`@srcdir@/gsw_cli_fkts_flow.c - -gsw_cli_fkts_flow.obj: @srcdir@/gsw_cli_fkts_flow.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_cli_fkts_flow.obj -MD -MP -MF $(DEPDIR)/gsw_cli_fkts_flow.Tpo -c -o gsw_cli_fkts_flow.obj `if test -f '@srcdir@/gsw_cli_fkts_flow.c'; then $(CYGPATH_W) '@srcdir@/gsw_cli_fkts_flow.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_cli_fkts_flow.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_cli_fkts_flow.Tpo $(DEPDIR)/gsw_cli_fkts_flow.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_cli_fkts_flow.c' object='gsw_cli_fkts_flow.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_cli_fkts_flow.obj `if test -f '@srcdir@/gsw_cli_fkts_flow.c'; then $(CYGPATH_W) '@srcdir@/gsw_cli_fkts_flow.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_cli_fkts_flow.c'; fi` - -ltq_cli_dump_call.o: @srcdir@/ltq_cli_dump_call.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltq_cli_dump_call.o -MD -MP -MF $(DEPDIR)/ltq_cli_dump_call.Tpo -c -o ltq_cli_dump_call.o `test -f '@srcdir@/ltq_cli_dump_call.c' || echo '$(srcdir)/'`@srcdir@/ltq_cli_dump_call.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ltq_cli_dump_call.Tpo $(DEPDIR)/ltq_cli_dump_call.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/ltq_cli_dump_call.c' object='ltq_cli_dump_call.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltq_cli_dump_call.o `test -f '@srcdir@/ltq_cli_dump_call.c' || echo '$(srcdir)/'`@srcdir@/ltq_cli_dump_call.c - -ltq_cli_dump_call.obj: @srcdir@/ltq_cli_dump_call.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltq_cli_dump_call.obj -MD -MP -MF $(DEPDIR)/ltq_cli_dump_call.Tpo -c -o ltq_cli_dump_call.obj `if test -f '@srcdir@/ltq_cli_dump_call.c'; then $(CYGPATH_W) '@srcdir@/ltq_cli_dump_call.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/ltq_cli_dump_call.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ltq_cli_dump_call.Tpo $(DEPDIR)/ltq_cli_dump_call.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/ltq_cli_dump_call.c' object='ltq_cli_dump_call.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltq_cli_dump_call.obj `if test -f '@srcdir@/ltq_cli_dump_call.c'; then $(CYGPATH_W) '@srcdir@/ltq_cli_dump_call.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/ltq_cli_dump_call.c'; fi` - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-exec-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ - clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ - distclean distclean-compile distclean-generic distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-binPROGRAMS install-data install-data-am \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-exec-hook install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am uninstall-binPROGRAMS - -.PRECIOUS: Makefile - - -lint: - @flint @srcdir@/../std_lx.lnt $(INCLUDES) \ - $(switch_cli_SOURCES) - -rsm: - rsm -fa -n -s -Ta $(switch_cli_SOURCES) $(EXTRA_DIST) - -install-exec-hook: $(bin_PROGRAMS) - @for p in $(bin_PROGRAMS); do \ - $(STRIP) $(DESTDIR)$(bindir)/$$p; \ - echo " $(STRIP) $(DESTDIR)$(bindir)/$$p"; \ - done - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Copyright (c) 2010 +# Lantiq Deutschland GmbH +# Am Campeon 3; 85579 Neubiberg, Germany +# +# For licensing information, see the file 'LICENSE' in the root folder of +# this software module. +# + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +bin_PROGRAMS = switch_cli$(EXEEXT) + +#if SWAPI_PAE_SUPPORT +# switch_cli_SOURCES += @srcdir@/gsw_cli_pae.c +# AM_CFLAGS += -DSWAPI_PAE_SUPPORT +#endif +@CLI_DUMP_CALL_TRUE@am__append_1 = -DCLI_DUMP_CALL +@CLI_DUMP_CALL_TRUE@am__append_2 = @srcdir@/ltq_cli_dump_call.c +subdir = src +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/switch_cli_config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am__switch_cli_SOURCES_DIST = @srcdir@/swapi_cli.c \ + @srcdir@/ltq_cli_lib.c @srcdir@/gsw_cli_fkts.c \ + @srcdir@/gsw_cli_fkts_common.c @srcdir@/gsw_tbl.c \ + @srcdir@/gsw_cli_fkts_flow.c @srcdir@/ltq_cli_dump_call.c +@CLI_DUMP_CALL_TRUE@am__objects_1 = ltq_cli_dump_call.$(OBJEXT) +am_switch_cli_OBJECTS = swapi_cli.$(OBJEXT) ltq_cli_lib.$(OBJEXT) \ + gsw_cli_fkts.$(OBJEXT) gsw_cli_fkts_common.$(OBJEXT) \ + gsw_tbl.$(OBJEXT) gsw_cli_fkts_flow.$(OBJEXT) $(am__objects_1) +switch_cli_OBJECTS = $(am_switch_cli_OBJECTS) +switch_cli_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(switch_cli_SOURCES) +DIST_SOURCES = $(am__switch_cli_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EXEEXT = @EXEEXT@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSTEM_INCL_PATH = @SYSTEM_INCL_PATH@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +switch_cli_prgdir = ../ + +#todo: include Makefile.inc + +# nodist_switch_cli_SOURCES = +AM_CFLAGS = -Wall $(am__append_1) +switch_cli_SOURCES = @srcdir@/swapi_cli.c @srcdir@/ltq_cli_lib.c \ + @srcdir@/gsw_cli_fkts.c @srcdir@/gsw_cli_fkts_common.c \ + @srcdir@/gsw_tbl.c @srcdir@/gsw_cli_fkts_flow.c \ + $(am__append_2) +EXTRA_DIST = \ + @srcdir@/ltq_cli_lib.h \ + @srcdir@/gsw_cli_fkts.h \ + @srcdir@/gsw_tbl.h \ + @srcdir@/ltq_cli_lib.c \ + @srcdir@/ltq_cli_dump_call.c \ + @srcdir@/gsw_cli_fkts.c \ + @srcdir@/gsw_cli_fkts_common.c \ + @srcdir@/gsw_cli_fkts_flow.c \ + @srcdir@/gsw_tbl.c \ + @srcdir@/swapi_cli.c + +INCLUDES = \ + -I@srcdir@ \ + -I@abs_top_builddir@ \ + -I@top_srcdir@ \ + -I@srcdir@/../include \ + -I@SYSTEM_INCL_PATH@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +switch_cli$(EXEEXT): $(switch_cli_OBJECTS) $(switch_cli_DEPENDENCIES) $(EXTRA_switch_cli_DEPENDENCIES) + @rm -f switch_cli$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(switch_cli_OBJECTS) $(switch_cli_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsw_cli_fkts.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsw_cli_fkts_common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsw_cli_fkts_flow.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsw_tbl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltq_cli_dump_call.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltq_cli_lib.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swapi_cli.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +swapi_cli.o: @srcdir@/swapi_cli.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT swapi_cli.o -MD -MP -MF $(DEPDIR)/swapi_cli.Tpo -c -o swapi_cli.o `test -f '@srcdir@/swapi_cli.c' || echo '$(srcdir)/'`@srcdir@/swapi_cli.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/swapi_cli.Tpo $(DEPDIR)/swapi_cli.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/swapi_cli.c' object='swapi_cli.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o swapi_cli.o `test -f '@srcdir@/swapi_cli.c' || echo '$(srcdir)/'`@srcdir@/swapi_cli.c + +swapi_cli.obj: @srcdir@/swapi_cli.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT swapi_cli.obj -MD -MP -MF $(DEPDIR)/swapi_cli.Tpo -c -o swapi_cli.obj `if test -f '@srcdir@/swapi_cli.c'; then $(CYGPATH_W) '@srcdir@/swapi_cli.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/swapi_cli.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/swapi_cli.Tpo $(DEPDIR)/swapi_cli.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/swapi_cli.c' object='swapi_cli.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o swapi_cli.obj `if test -f '@srcdir@/swapi_cli.c'; then $(CYGPATH_W) '@srcdir@/swapi_cli.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/swapi_cli.c'; fi` + +ltq_cli_lib.o: @srcdir@/ltq_cli_lib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltq_cli_lib.o -MD -MP -MF $(DEPDIR)/ltq_cli_lib.Tpo -c -o ltq_cli_lib.o `test -f '@srcdir@/ltq_cli_lib.c' || echo '$(srcdir)/'`@srcdir@/ltq_cli_lib.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ltq_cli_lib.Tpo $(DEPDIR)/ltq_cli_lib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/ltq_cli_lib.c' object='ltq_cli_lib.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltq_cli_lib.o `test -f '@srcdir@/ltq_cli_lib.c' || echo '$(srcdir)/'`@srcdir@/ltq_cli_lib.c + +ltq_cli_lib.obj: @srcdir@/ltq_cli_lib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltq_cli_lib.obj -MD -MP -MF $(DEPDIR)/ltq_cli_lib.Tpo -c -o ltq_cli_lib.obj `if test -f '@srcdir@/ltq_cli_lib.c'; then $(CYGPATH_W) '@srcdir@/ltq_cli_lib.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/ltq_cli_lib.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ltq_cli_lib.Tpo $(DEPDIR)/ltq_cli_lib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/ltq_cli_lib.c' object='ltq_cli_lib.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltq_cli_lib.obj `if test -f '@srcdir@/ltq_cli_lib.c'; then $(CYGPATH_W) '@srcdir@/ltq_cli_lib.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/ltq_cli_lib.c'; fi` + +gsw_cli_fkts.o: @srcdir@/gsw_cli_fkts.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_cli_fkts.o -MD -MP -MF $(DEPDIR)/gsw_cli_fkts.Tpo -c -o gsw_cli_fkts.o `test -f '@srcdir@/gsw_cli_fkts.c' || echo '$(srcdir)/'`@srcdir@/gsw_cli_fkts.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_cli_fkts.Tpo $(DEPDIR)/gsw_cli_fkts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_cli_fkts.c' object='gsw_cli_fkts.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_cli_fkts.o `test -f '@srcdir@/gsw_cli_fkts.c' || echo '$(srcdir)/'`@srcdir@/gsw_cli_fkts.c + +gsw_cli_fkts.obj: @srcdir@/gsw_cli_fkts.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_cli_fkts.obj -MD -MP -MF $(DEPDIR)/gsw_cli_fkts.Tpo -c -o gsw_cli_fkts.obj `if test -f '@srcdir@/gsw_cli_fkts.c'; then $(CYGPATH_W) '@srcdir@/gsw_cli_fkts.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_cli_fkts.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_cli_fkts.Tpo $(DEPDIR)/gsw_cli_fkts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_cli_fkts.c' object='gsw_cli_fkts.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_cli_fkts.obj `if test -f '@srcdir@/gsw_cli_fkts.c'; then $(CYGPATH_W) '@srcdir@/gsw_cli_fkts.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_cli_fkts.c'; fi` + +gsw_cli_fkts_common.o: @srcdir@/gsw_cli_fkts_common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_cli_fkts_common.o -MD -MP -MF $(DEPDIR)/gsw_cli_fkts_common.Tpo -c -o gsw_cli_fkts_common.o `test -f '@srcdir@/gsw_cli_fkts_common.c' || echo '$(srcdir)/'`@srcdir@/gsw_cli_fkts_common.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_cli_fkts_common.Tpo $(DEPDIR)/gsw_cli_fkts_common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_cli_fkts_common.c' object='gsw_cli_fkts_common.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_cli_fkts_common.o `test -f '@srcdir@/gsw_cli_fkts_common.c' || echo '$(srcdir)/'`@srcdir@/gsw_cli_fkts_common.c + +gsw_cli_fkts_common.obj: @srcdir@/gsw_cli_fkts_common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_cli_fkts_common.obj -MD -MP -MF $(DEPDIR)/gsw_cli_fkts_common.Tpo -c -o gsw_cli_fkts_common.obj `if test -f '@srcdir@/gsw_cli_fkts_common.c'; then $(CYGPATH_W) '@srcdir@/gsw_cli_fkts_common.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_cli_fkts_common.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_cli_fkts_common.Tpo $(DEPDIR)/gsw_cli_fkts_common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_cli_fkts_common.c' object='gsw_cli_fkts_common.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_cli_fkts_common.obj `if test -f '@srcdir@/gsw_cli_fkts_common.c'; then $(CYGPATH_W) '@srcdir@/gsw_cli_fkts_common.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_cli_fkts_common.c'; fi` + +gsw_tbl.o: @srcdir@/gsw_tbl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_tbl.o -MD -MP -MF $(DEPDIR)/gsw_tbl.Tpo -c -o gsw_tbl.o `test -f '@srcdir@/gsw_tbl.c' || echo '$(srcdir)/'`@srcdir@/gsw_tbl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_tbl.Tpo $(DEPDIR)/gsw_tbl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_tbl.c' object='gsw_tbl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_tbl.o `test -f '@srcdir@/gsw_tbl.c' || echo '$(srcdir)/'`@srcdir@/gsw_tbl.c + +gsw_tbl.obj: @srcdir@/gsw_tbl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_tbl.obj -MD -MP -MF $(DEPDIR)/gsw_tbl.Tpo -c -o gsw_tbl.obj `if test -f '@srcdir@/gsw_tbl.c'; then $(CYGPATH_W) '@srcdir@/gsw_tbl.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_tbl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_tbl.Tpo $(DEPDIR)/gsw_tbl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_tbl.c' object='gsw_tbl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_tbl.obj `if test -f '@srcdir@/gsw_tbl.c'; then $(CYGPATH_W) '@srcdir@/gsw_tbl.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_tbl.c'; fi` + +gsw_cli_fkts_flow.o: @srcdir@/gsw_cli_fkts_flow.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_cli_fkts_flow.o -MD -MP -MF $(DEPDIR)/gsw_cli_fkts_flow.Tpo -c -o gsw_cli_fkts_flow.o `test -f '@srcdir@/gsw_cli_fkts_flow.c' || echo '$(srcdir)/'`@srcdir@/gsw_cli_fkts_flow.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_cli_fkts_flow.Tpo $(DEPDIR)/gsw_cli_fkts_flow.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_cli_fkts_flow.c' object='gsw_cli_fkts_flow.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_cli_fkts_flow.o `test -f '@srcdir@/gsw_cli_fkts_flow.c' || echo '$(srcdir)/'`@srcdir@/gsw_cli_fkts_flow.c + +gsw_cli_fkts_flow.obj: @srcdir@/gsw_cli_fkts_flow.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gsw_cli_fkts_flow.obj -MD -MP -MF $(DEPDIR)/gsw_cli_fkts_flow.Tpo -c -o gsw_cli_fkts_flow.obj `if test -f '@srcdir@/gsw_cli_fkts_flow.c'; then $(CYGPATH_W) '@srcdir@/gsw_cli_fkts_flow.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_cli_fkts_flow.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsw_cli_fkts_flow.Tpo $(DEPDIR)/gsw_cli_fkts_flow.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/gsw_cli_fkts_flow.c' object='gsw_cli_fkts_flow.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gsw_cli_fkts_flow.obj `if test -f '@srcdir@/gsw_cli_fkts_flow.c'; then $(CYGPATH_W) '@srcdir@/gsw_cli_fkts_flow.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/gsw_cli_fkts_flow.c'; fi` + +ltq_cli_dump_call.o: @srcdir@/ltq_cli_dump_call.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltq_cli_dump_call.o -MD -MP -MF $(DEPDIR)/ltq_cli_dump_call.Tpo -c -o ltq_cli_dump_call.o `test -f '@srcdir@/ltq_cli_dump_call.c' || echo '$(srcdir)/'`@srcdir@/ltq_cli_dump_call.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ltq_cli_dump_call.Tpo $(DEPDIR)/ltq_cli_dump_call.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/ltq_cli_dump_call.c' object='ltq_cli_dump_call.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltq_cli_dump_call.o `test -f '@srcdir@/ltq_cli_dump_call.c' || echo '$(srcdir)/'`@srcdir@/ltq_cli_dump_call.c + +ltq_cli_dump_call.obj: @srcdir@/ltq_cli_dump_call.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltq_cli_dump_call.obj -MD -MP -MF $(DEPDIR)/ltq_cli_dump_call.Tpo -c -o ltq_cli_dump_call.obj `if test -f '@srcdir@/ltq_cli_dump_call.c'; then $(CYGPATH_W) '@srcdir@/ltq_cli_dump_call.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/ltq_cli_dump_call.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ltq_cli_dump_call.Tpo $(DEPDIR)/ltq_cli_dump_call.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/ltq_cli_dump_call.c' object='ltq_cli_dump_call.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltq_cli_dump_call.obj `if test -f '@srcdir@/ltq_cli_dump_call.c'; then $(CYGPATH_W) '@srcdir@/ltq_cli_dump_call.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/ltq_cli_dump_call.c'; fi` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-exec-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-binPROGRAMS install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-exec-hook install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS + + +lint: + @flint @srcdir@/../std_lx.lnt $(INCLUDES) \ + $(switch_cli_SOURCES) + +rsm: + rsm -fa -n -s -Ta $(switch_cli_SOURCES) $(EXTRA_DIST) + +install-exec-hook: $(bin_PROGRAMS) + @for p in $(bin_PROGRAMS); do \ + $(STRIP) $(DESTDIR)$(bindir)/$$p; \ + echo " $(STRIP) $(DESTDIR)$(bindir)/$$p"; \ + done + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/Makefile_test b/src/Makefile_test old mode 100644 new mode 100755 diff --git a/src/gsw_cli_adap.c b/src/gsw_cli_adap.c new file mode 100755 index 0000000000000000000000000000000000000000..98365c62ee98193081755ffc2348624217a8f0f0 --- /dev/null +++ b/src/gsw_cli_adap.c @@ -0,0 +1,1370 @@ +/**************************************************************************** + + Copyright 2010 + Lantiq Deutschland GmbH + Am Campeon 3; 85579 Neubiberg, Germany + + For licensing information, see the file 'LICENSE' in the root folder of + this software module. + +*****************************************************************************/ +#include "ltq_cli_lib.h" + +#ifndef IOCTL_PCTOOL +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <fcntl.h> +#include <unistd.h> +#include <errno.h> +#include <ctype.h> +#endif + +#include "adap_ops.h" +#include "mac_ops.h" +#include "gsw_cli_mac.h" + +int test_cli_adap(void *fd); + +struct _gswss_cfg { + char cmdname[256]; + u32 cmdid; + u8 args; + int (*set_func)(void *, GSW_MAC_Cli_t *); + int (*get_func)(void *, GSW_MAC_Cli_t *); + char help[1024]; +}; + +u32 gsw_gswss_reg_read(void *fd, GSW_MAC_Cli_t *param) +{ + int ret = 0; + u32 offset = param->val[0]; + + param->cmdType = GSWSS_REG_RD; + ret = cli_ioctl(fd, GSW_GSWSS_CFG, param); + + printf("\tREG offset: 0x%04x\n\tData: %08X\n", offset, param->val[0]); + return ret; +} + +int gsw_gswss_reg_write(void *fd, GSW_MAC_Cli_t *param) +{ + param->cmdType = GSWSS_REG_WR; + + cli_ioctl(fd, GSW_GSWSS_CFG, param); + + return 0; +} + + + + +int gswss_cli_reg_rd(void *fd, GSW_MAC_Cli_t *param, u32 reg) +{ + param->cmdType = GSWSS_REG_WR; + param->val[0] = reg; + + cli_ioctl(fd, GSW_GSWSS_CFG, param); + + return param->val[0]; +} + +int gswss_cli_get_switch_ss_reset(void *fd, GSW_MAC_Cli_t *param) +{ + u32 core_reset, reset; + + core_reset = gswss_cli_reg_rd(fd, param, GSWIP_CFG); + reset = mac_get_val(core_reset, GSWIP_CFG, SS_HWRES); + + printf("Switch Subsys Reset %s\n", + reset ? "ENABLED" : "DISABLED"); + + return 0; +} + +int gswss_cli_get_macsec_reset(void *fd, GSW_MAC_Cli_t *param) +{ + u32 macsec_en, reset; + + macsec_en = gswss_cli_reg_rd(fd, param, MACSEC_EN); + + reset = mac_get_val(macsec_en, MACSEC_EN, RES); + + printf("GSWSS: MACSEC reset : %s\n", + reset ? "ENABLED" : "DISABLED"); + + return 0; +} + +int gswss_cli_get_cfg1_1588(void *fd, GSW_MAC_Cli_t *param) +{ + u32 cfg0; + u32 trig0_sel, trig1_sel, sw_trig; + + cfg0 = gswss_cli_reg_rd(fd, param, CFG1_1588); + + trig1_sel = mac_get_val(cfg0, CFG1_1588, TRIG1SEL); + trig0_sel = mac_get_val(cfg0, CFG1_1588, TRIG0SEL); + sw_trig = mac_get_val(cfg0, CFG1_1588, SWTRIG); + + if (trig0_sel == 0) + printf("\tTRIG0: PON is the master\n"); + else if (trig0_sel == 1) + printf("\tTRIG0: PCIE0 is the master\n"); + else if (trig0_sel == 2) + printf("\tTRIG0: PCIE1 is the master\n"); + else if (trig0_sel == 3) + printf("\tTRIG0: XGMAC2 is the master\n"); + else if (trig0_sel == 4) + printf("\tTRIG0: XGMAC3 is the master\n"); + else if (trig0_sel == 5) + printf("\tTRIG0: XGMAC4 is the master\n"); + else if (trig0_sel == 6) + printf("\tTRIG0: PON100US is the master\n"); + else if (trig0_sel == 8) + printf("\tTRIG0: EXTPPS0 is the master\n"); + else if (trig0_sel == 9) + printf("\tTRIG0: EXTPPS1 is the master\n"); + else if (trig0_sel == 10) + printf("\tTRIG0: Software Trigger\n"); + else + goto end; + + if (trig1_sel == 0) + printf("\tTRIG1: PON is the master\n"); + else if (trig1_sel == 1) + printf("\tTRIG1: PCIE0 is the master\n"); + else if (trig1_sel == 2) + printf("\tTRIG1: PCIE1 is the master\n"); + else if (trig1_sel == 3) + printf("\tTRIG1: XGMAC2 is the master\n"); + else if (trig1_sel == 4) + printf("\tTRIG1: XGMAC3 is the master\n"); + else if (trig1_sel == 5) + printf("\tTRIG1: XGMAC4 is the master\n"); + else if (trig1_sel == 6) + printf("\tTRIG1: PON100US is the master\n"); + else if (trig1_sel == 8) + printf("\tTRIG1: EXTPPS0 is the master\n"); + else if (trig1_sel == 9) + printf("\tTRIG1: EXTPPS1 is the master\n"); + else if (trig1_sel == 10) + printf("\tTRIG1: Software Trigger\n"); + else + goto end; + + if (sw_trig == 0) + printf("\tSW_TRIG: 0\n"); + else if (sw_trig == 1) + printf("\tSW_TRIG: 1\n"); + +end: + return 0; +} + +int gswss_cli_get_clkmode(void *fd, GSW_MAC_Cli_t *param) +{ + u32 clk_mode_cfg; + int clk_mode; + + param->cmdType = GSWSS_ADAP_CLK_MD; + clk_mode = cli_ioctl(fd, GSW_GSWSS_CFG, param); + + printf("GSWSS: Clock Mode Got :"); + + if (clk_mode == 0) + printf("%s\n", "NCO1 - 666 Mhz"); + else if (clk_mode == 1) + printf("%s\n", "NCO2 - 450 Mhz"); + else if (clk_mode == 2) + printf("%s\n", "Auto Mode (666/450) Mhz"); + else if (clk_mode == 3) + printf("%s\n", "Auto Mode (666/450) Mhz"); + + return 0; +} + +int gswss_cli_dbg_macsec_to_mac(void *fd, GSW_MAC_Cli_t *param) +{ + u32 macsec_en, mac_idx; + + param->cmdType = GSWSS_ADAP_MACSEC_TO_MAC; + mac_idx = cli_ioctl(fd, GSW_GSWSS_CFG, param); + + if (mac_idx == 0) + printf("GSWSS: MACSEC Disabled\n"); + else if (mac_idx == 2) + printf("GSWSS: MACSEC enabled to MAC %d data traffic\n", + mac_idx); + else if (mac_idx == 3) + printf("GSWSS: MACSEC enabled to MAC %d data traffic\n", + mac_idx); + else if (mac_idx == 4) + printf("GSWSS: MACSEC enabled to MAC %d data traffic\n", + mac_idx); + + return 0; +} + +int gswss_cli_get_nco(void *fd, GSW_MAC_Cli_t *param) +{ + int nco = 0; + + param->cmdType = GSWSS_ADAP_NCO; + nco = cli_ioctl(fd, GSW_GSWSS_CFG, param); + + printf("GSWSS: NCO Index %d NCO Got is %x\n", param->val[0], nco); + + return 0; +} + +int gswss_cli_get_cfg0_1588(void *fd, GSW_MAC_Cli_t *param) +{ + u32 cfg0; + u32 ref_time, dig_time, bin_time, pps_sel; + int ret = 0; + + param->cmdType = GSWSS_ADAP_CFG_1588; + ret = cli_ioctl(fd, GSW_GSWSS_CFG, param); + + ref_time = param->val[0]; + dig_time = param->val[1]; + bin_time = param->val[2]; + pps_sel = param->val[3]; + + if (ref_time == 0) + printf("\tREF_TIME: PON_PCS is the master\n"); + else if (ref_time == 1) + printf("\tREF_TIME: PCIE0 is the master\n"); + else if (ref_time == 2) + printf("\tREF_TIME: PCIE1 is the master\n"); + else if (ref_time == 3) + printf("\tREF_TIME: XGMAC2 is the master\n"); + else if (ref_time == 4) + printf("\tREF_TIME: XGMAC3 is the master\n"); + else if (ref_time == 5) + printf("\tREF_TIME: XGMAC4 is the master\n"); + + if (dig_time == 0) + printf("\tDIG_TIME: PON_PCS is the master\n"); + else if (dig_time == 1) + printf("\tDIG_TIME: PCIE0 is the master\n"); + else if (dig_time == 2) + printf("\tDIG_TIME: PCIE1 is the master\n"); + else if (dig_time == 3) + printf("\tDIG_TIME: XGMAC2 is the master\n"); + else if (dig_time == 4) + printf("\tDIG_TIME: XGMAC3 is the master\n"); + else if (dig_time == 5) + printf("\tDIG_TIME: XGMAC4 is the master\n"); + + if (bin_time == 0) + printf("\tBIN_TIME: PON_PCS is the master\n"); + else if (bin_time == 1) + printf("\tBIN_TIME: PCIE0 is the master\n"); + else if (bin_time == 2) + printf("\tBIN_TIME: PCIE1 is the master\n"); + else if (bin_time == 3) + printf("\tBIN_TIME: XGMAC2 is the master\n"); + else if (bin_time == 4) + printf("\tBIN_TIME: XGMAC3 is the master\n"); + else if (bin_time == 5) + printf("\tBIN_TIME: XGMAC4 is the master\n"); + + if (pps_sel == 0) + printf("\tPPS_SEL: PON_PCS is the master\n"); + else if (pps_sel == 1) + printf("\tPPS_SEL: PCIE0 is the master\n"); + else if (pps_sel == 2) + printf("\tPPS_SEL: PCIE1 is the master\n"); + else if (pps_sel == 3) + printf("\tPPS_SEL: XGMAC2 is the master\n"); + else if (pps_sel == 4) + printf("\tPPS_SEL: XGMAC3 is the master\n"); + else if (pps_sel == 5) + printf("\tPPS_SEL: XGMAC4 is the master\n"); + else if (pps_sel == 6) + printf("\tPPS_SEL: PON PPS100US is the master\n"); + else if (pps_sel == 7) + printf("\tPPS_SEL: Software trigger\n"); + + return 0; +} + +int gswss_cli_get_int_en_sts(void *fd, GSW_MAC_Cli_t *param) +{ + + u32 reg_val, reg_val1; + int ret = 0, i = 0; + u32 mac_int_isr0, mac_int_isr1; + u32 max_mac = 0; + + + if (gswip_version == GSWIP_3_1) + max_mac = 3; + else if (gswip_version == GSWIP_3_2) + max_mac = 9; + + mac_int_isr0 = gswss_cli_reg_rd(fd, param, GSWIPSS_ISR0); + mac_int_isr1 = gswss_cli_reg_rd(fd, param, GSWIPSS_ISR1); + reg_val = gswss_cli_reg_rd(fd, param, GSWIPSS_IER0); + reg_val1 = gswss_cli_reg_rd(fd, param, GSWIPSS_IER1); + + printf("GSWIPSS_IER0 %08x\n", reg_val); + printf("GSWIPSS_IER1 %08x\n", reg_val1); + printf("GSWIPSS_ISR0 %08x\n", mac_int_isr0); + printf("GSWIPSS_ISR1 %08x\n", mac_int_isr1); + + for (i = 0; i < max_mac; i++) { + printf("\tXGMAC %d INT EN: %s\n", + i, + GET_N_BITS(reg_val, + GSWIPSS_IER0_XGMAC2_POS + i, 1) ? + "ENABLED" : + "DISABLED"); + printf("\tXGMAC %d INT STS: %s\n", + i, + GET_N_BITS(mac_int_isr0, + GSWIPSS_ISR0_XGMAC2_POS + i, 1) ? + "ENABLED" : + "DISABLED"); + + printf("\tLINK %d INT EN: %s\n", + i, + GET_N_BITS(reg_val1, + GSWIPSS_IER1_LINK2_POS + i, 1) ? + "ENABLED" : + "DISABLED"); + printf("\tLINK %d INT STS: %s\n", + i, + GET_N_BITS(mac_int_isr1, + GSWIPSS_ISR1_LINK2_POS + i, 1) ? + "ENABLED" : + "DISABLED"); + } + + return ret; +} + +int gswss_cli_get_phy2mode(void *fd, GSW_MAC_Cli_t *param) +{ + u32 phy_mode; + u8 speed_msb, speed_lsb, speed; + u8 linkst, fdup, flow_ctrl_tx, flow_ctrl_rx; + int i = param->mac_idx; + + phy_mode = gswss_cli_reg_rd(fd, param, PHY_MODE(param->mac_idx)); + printf("PHY_MODE_%d %x\n", i, phy_mode); + speed_msb = GET_N_BITS(phy_mode, 15, 1); + speed_lsb = GET_N_BITS(phy_mode, 11, 2); + speed = (speed_msb << 2) | speed_lsb; + + if (speed == 0) + printf("\tGSWSS: SPEED 10 Mbps\n"); + else if (speed == 1) + printf("\tGSWSS: SPEED 100 Mbps\n"); + else if (speed == 2) + printf("\tGSWSS: SPEED 1 Gbps\n"); + else if (speed == 3) + printf("\tGSWSS: SPEED 10 Gbps\n"); + else if (speed == 4) + printf("\tGSWSS: SPEED 2.5 Gbps\n"); + else if (speed == 5) + printf("\tGSWSS: SPEED 5 Gbps\n"); + else if (speed == 6) + printf("\tGSWSS: SPEED RESERVED\n"); + else if (speed == 7) + printf("\tGSWSS: SPEED Auto Mode\n"); + + linkst = GET_N_BITS(phy_mode, 13, 2); + + if (linkst == 0) + printf("\tGSWSS: LINK STS: Auto Mode\n"); + else if (linkst == 1) + printf("\tGSWSS: LINK STS: Forced up\n"); + else if (linkst == 2) + printf("\tGSWSS: LINK STS: Forced down\n"); + else if (linkst == 3) + printf("\tGSWSS: LINK STS: Reserved\n"); + + fdup = GET_N_BITS(phy_mode, 9, 2); + + if (fdup == 0) + printf("\tGSWSS: Duplex mode set: Auto Mode\n"); + else if (fdup == 1) + printf("\tGSWSS: Duplex mode set: Full Duplex Mode\n"); + else if (fdup == 2) + printf("\tGSWSS: Duplex mode set: Reserved\n"); + else if (fdup == 3) + printf("\tGSWSS: Duplex mode set: Half Duplex Mode\n"); + + flow_ctrl_tx = GET_N_BITS(phy_mode, 7, 2); + + if (flow_ctrl_tx == 0) + printf("\tGSWSS: Flow Ctrl Mode TX: Auto Mode\n"); + else if (flow_ctrl_tx == 1) + printf("\tGSWSS: Flow Ctrl Mode TX: ENABLED\n"); + else if (flow_ctrl_tx == 2) + printf("\tGSWSS: Flow Ctrl Mode TX: Reserved\n"); + else if (flow_ctrl_tx == 3) + printf("\tGSWSS: Flow Ctrl Mode TX: DISABLED\n"); + + flow_ctrl_rx = GET_N_BITS(phy_mode, 7, 2); + + if (flow_ctrl_rx == 0) + printf("\tGSWSS: Flow Ctrl Mode RX: Auto Mode\n"); + else if (flow_ctrl_rx == 1) + printf("\tGSWSS: Flow Ctrl Mode RX: ENABLED\n"); + else if (flow_ctrl_rx == 2) + printf("\tGSWSS: Flow Ctrl Mode RX: Reserved\n"); + else if (flow_ctrl_rx == 3) + printf("\tGSWSS: Flow Ctrl Mode RX: DISABLED\n"); + + return 0; +} + +int gswss_cli_get_txtstamp_fifo(void *fd, GSW_MAC_Cli_t *param) +{ + struct mac_fifo_entry *f_entry = ¶m->f_entry; + + param->cmdType = GSWSS_MAC_TXTSTAMP_FIFO; + cli_ioctl(fd, GSW_GSWSS_CFG, param); + + printf("GSWSS MAC%d\n", param->mac_idx); + printf("\tTTSE: \t%s\n", + f_entry->ttse ? "ENABLED" : "DISABLED"); + printf("\tOSTC: \t%s\n", + f_entry->ostc ? "ENABLED" : "DISABLED"); + printf("\tOSTPA: \t%s\n", + f_entry->ostpa ? "ENABLED" : "DISABLED"); + + if (f_entry->cic == 0) + printf("\tCIC: \t" + "DISABLED\n"); + + if (f_entry->cic == 1) + printf("\tCIC: \tTime stamp IP Checksum update\n"); + + if (f_entry->cic == 2) + printf("\tCIC: \tTime stamp IP and " + "Payload Checksum update\n"); + + if (f_entry->cic == 3) + printf("\tCIC: \tTime stamp IP, Payload checksum and " + "Pseudo header update\n"); + + printf("\tTTSL: \t%d\n", f_entry->ttsl); + printf("\tTTSH: \t%d\n", f_entry->ttsh); + + return 0; +} + +int gswss_cli_get_macop(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_op_cfg, val; + int i = param->mac_idx; + + mac_op_cfg = gswss_cli_reg_rd(fd, param, MAC_OP_CFG(param->mac_idx)); + printf("GSWSS: MAC%d OP_CFG %d\n", i, mac_op_cfg); + + val = mac_get_val(mac_op_cfg, MAC_OP_CFG, TXFCS_INS); + printf("TX direction FCS\n"); + + if (val == MODE0) + printf("\tPacket does not have FCS and FCS " + "is not inserted\n"); + else if (val == MODE1) + printf("\tPacket does not have FCS and FCS " + "is inserted\n"); + else if (val == MODE2) + printf("\tPacket has FCS and FCS is not inserted\n"); + else if (val == MODE3) + printf("\tReserved\n"); + + val = mac_get_val(mac_op_cfg, MAC_OP_CFG, RXFCS); + printf("RX direction FCS\n"); + + if (val == MODE0) + printf("\tPacket does not have FCS and FCS " + "is not removed\n"); + else if (val == MODE1) + printf("\tReserved\n"); + else if (val == MODE2) + printf("\tPacket has FCS and FCS is not removed\n"); + else if (val == MODE3) + printf("\tPacket has FCS and FCS is removed\n"); + + val = mac_get_val(mac_op_cfg, MAC_OP_CFG, TXSPTAG); + printf("TX Special Tag\n"); + + if (val == MODE0) + printf("\tPacket does not have Special Tag and " + "Special Tag is not removed\n"); + else if (val == MODE1) + printf("\tPacket has Special Tag and " + "Special Tag is replaced\n"); + else if (val == MODE2) + printf("\tPacket has Special Tag and " + "Special Tag is not removed\n"); + else if (val == MODE3) + printf("\tPacket has Special Tag and " + "Special Tag is removed\n"); + + val = mac_get_val(mac_op_cfg, MAC_OP_CFG, RXSPTAG); + printf("RX Special Tag\n"); + + if (val == MODE0) + printf("\tPacket does not have Special Tag and " + "Special Tag is not inserted\n"); + else if (val == MODE1) + printf("\tPacket does not have Special Tag and " + "Special Tag is inserted\n"); + else if (val == MODE2) + printf("\tPacket has Special Tag and " + "Special Tag is not inserted\n"); + else if (val == MODE3) + printf("\tReserved\n"); + + val = mac_get_val(mac_op_cfg, MAC_OP_CFG, RXTIME); + printf("RX Direction Timestamp\n"); + + if (val == MODE0) + printf("\tPacket does not have time stamp and " + "time stamp is not inserted.\n"); + else if (val == MODE1) + printf("\tPacket doe not have time stamp and " + "time stamp is inserted\n"); + else if (val == MODE2) + printf("\tPacket has time stamp and " + "time stamp is not inserted\n"); + else if (val == MODE3) + printf("\tReserved\n"); + + return 0; +} + +int gswss_cli_get_mtu(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mtu = 0; + + param->cmdType = GSWSS_MAC_MTU; + mtu = cli_ioctl(fd, GSW_GSWSS_CFG, param); + + printf("GSWSS: MAC%d MTU: %d\n", param->mac_idx, mtu); + + return 0; +} + +int gswss_cli_get_macif(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_if_cfg, val; + int i = param->mac_idx; + + mac_if_cfg = gswss_cli_reg_rd(fd, param, MAC_IF_CFG(param->mac_idx)); + printf("GSWSS: MAC%d IF_CFG %d\n", i, + mac_if_cfg); + val = mac_get_val(mac_if_cfg, MAC_IF_CFG, CFG1G); + printf("\t1G: %s\n", + val ? + "XGMAC GMII interface mode is used" : + "Legacy GMAC GMII interface mode is used"); + val = mac_get_val(mac_if_cfg, MAC_IF_CFG, CFGFE); + printf("\tFast Ethernet: %s\n", + val ? + "XGMAC GMII interface mode is used" : + "Legacy GMAC MII interface mode is used"); + val = mac_get_val(mac_if_cfg, MAC_IF_CFG, CFG2G5); + printf("\t2.5G: %s\n", + val ? + "XGMAC XGMII interface mode is used" : + "XGMAC GMII interface mode is used"); + + return 0; +} + +int gswss_cli_get_mac_reset(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_if_cfg, reset; + int ret = 0, i = param->mac_idx; + + mac_if_cfg = gswss_cli_reg_rd(fd, param, MAC_IF_CFG(param->mac_idx)); + reset = mac_get_val(mac_if_cfg, MAC_IF_CFG, XGMAC_RES); + printf("\tXGMAC %d Reset Bit: %s\n", i, + reset ? "ENABLED" : "DISABLED"); + reset = mac_get_val(mac_if_cfg, MAC_IF_CFG, LMAC_RES); + printf("\tXGMAC %d Reset Bit: %s\n", i, + reset ? "ENABLED" : "DISABLED"); + reset = mac_get_val(mac_if_cfg, MAC_IF_CFG, ADAP_RES); + printf("\tXGMAC %d Reset Bit: %s\n", i, + reset ? "ENABLED" : "DISABLED"); + + return ret; +} + +int gswss_cli_get_mac_en(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_if_cfg, enable; + int ret = 0, i = param->mac_idx; + + mac_if_cfg = gswss_cli_reg_rd(fd, param, MAC_IF_CFG(param->mac_idx)); + enable = mac_get_val(mac_if_cfg, MAC_IF_CFG, MAC_EN); + printf("GSWSS: MAC %d: %s\n", i, enable ? "ENABLED" : "DISABLED"); + + return ret; +} + +int gswss_cli_get_corese(void *fd, GSW_MAC_Cli_t *param) +{ + u32 core_en; + int ret; + + param->cmdType = GSWSS_ADAP_CORESE; + ret = cli_ioctl(fd, GSW_GSWSS_CFG, param); + printf("CORESE %s\n", ret ? "ENABLED" : "DISABLED"); + + return ret; +} + +struct _gswss_cfg gswss_cfg[] = { + { + "reset", + GSWSS_MAC_RESET, + 3, + 0, + gswss_cli_get_mac_reset, + " <2/3/4: MacIdx> " + " <0/1/2/3/4 XGMAC/LMAC/ADAP> <1/0: Reset/No reset>" + }, + { + "macen", + GSWSS_MAC_EN, + 2, + 0, + gswss_cli_get_mac_en, + " <2/3/4: MacIdx> " + " <1/0: Enable/Disable>" + }, + { + "macif", + GSWSS_MAC_IF, + 3, + 0, + gswss_cli_get_macif, + " <2/3/4: MacIdx> <0/1/2: 1G/FE/2.5G> " + " <0/1/2/3 MII/GMII/XGMAC_GMII/XGMAC_XGMII>" + }, + { + "macop", + GSWSS_MAC_OP, + 4, + 0, + gswss_cli_get_macop, + " <2/3/4: MacIdx> <0/1 RX/TX> " + " <0/1/2 FCS/SPTAG/TIME> <0/1/2/3 Mode0/Mode1/Mode2/Mode3>" + }, + { + "mtu", + GSWSS_MAC_MTU, + 2, + 0, + gswss_cli_get_mtu, + " <2/3/4: MacIdx> " + " <mtu size>" + }, + { + "txtstamp_fifo", + GSWSS_MAC_TXTSTAMP_FIFO, + 8, + 0, + gswss_cli_get_txtstamp_fifo, + " <2/3/4: MacIdx> " + " <ttse ostc ost_avail cic sec nsec rec_id>" + }, + { + "w", + GSWSS_REG_WR, + 3, + 0, + 0, + " <reg_off> <reg_val>" + }, + { + "r", + GSWSS_REG_RD, + 2, + 0, + 0, + " <reg_off>" + }, + { + "int_en", + GSWSS_ADAP_INT, + 3, + 0, + gswss_cli_get_int_en_sts, + " <2/3/4: MacIdx> " + " <0/1/2/3 XGMAC/LMAC/ADAP/MACSEC> <1/0: Enable/Disable>" + }, + { + "macsec", + GSWSS_ADAP_MACSEC_TO_MAC, + 2, + 0, + gswss_cli_dbg_macsec_to_mac, + " <2/3/4: MacIdx> " + " <1/0: Enable/Disable>" + }, + { + "cfg_1588", + GSWSS_ADAP_CFG_1588, + 4, + 0, + gswss_cli_get_cfg0_1588, + " <ref_time <0/1/2/3/4/5 PON/PCIE0/PCIE1/XGMAC2/XGMAC3/XGMAC4>" + " <dig_time <0/1/2/3/4/5 PON/PCIE0/PCIE1/XGMAC2/XGMAC3/XGMAC4>" + " <bin_time <0/1/2/3/4/5 PON/PCIE0/PCIE1/XGMAC2/XGMAC3/XGMAC4>" + " <pps_sel <0/1/2/3/4/5/6/7 PON/PCIE0/PCIE1/XGMAC2/XGMAC3/XGMAC4/PON100US/SW>" + }, + { + "aux_trig", + GSWSS_ADAP_1588_CFG1, + 3, + 0, + gswss_cli_get_cfg1_1588, + " <trig0_sel <0/1/2/3/4/5/6/8/9/10 PON/PCIE0/PCIE1/XGMAC2/XGMAC3/XGMAC4/PON100US/EXTPPS0/EXTPPS1/SW>" + " <trig1_sel <0/1/2/3/4/5/6/8/9/10 PON/PCIE0/PCIE1/XGMAC2/XGMAC3/XGMAC4/PON100US/EXTPPS0/EXTPPS1/SW>" + " <sw_trig <0/1>" + }, + { + "clk_md", + GSWSS_ADAP_CLK_MD, + 1, + 0, + gswss_cli_get_clkmode, + " <0/1/2/3 666/450/Auto/Auto Mhz >" + }, + { + "nco", + GSWSS_ADAP_NCO, + 2, + 0, + gswss_cli_get_nco, + " <args:2 1/2/3/4:Nco Index, Value>", + }, + { + "macsec_rst", + GSWSS_ADAP_MACSEC_RST, + 1, + 0, + gswss_cli_get_macsec_reset, + " <1/0: Reset/No-Reset>" + }, + { + "ss_rst", + GSWSS_ADAP_SS_RST, + 0, + 0, + gswss_cli_get_switch_ss_reset, + " <Reset Switch Core>" + }, + { + "corese", + GSWSS_ADAP_CORESE, + 1, + 0, + gswss_cli_get_corese, + " <1/0: enable/disable>" + }, + { + "phymode", + GSWSS_MAC_PHY2MODE, + 0, + 0, + gswss_cli_get_phy2mode, + " <2/3/4: MacIdx>", + }, +}; + +static inline int mac_nstrlen(char *s) +{ + int cnt = 0; + + if (s == (void *)0) + return 0; + + while (s[cnt]) + cnt++; + + return cnt; +} + +static inline unsigned long mac_nstrtoul(const char *s, int len, + u32 *next_idx) +{ + unsigned long acc; + int cnt = 0; + char c; + int base = 0; + + acc = 0; + + c = s[cnt]; + + if (s[cnt] == '0') { + cnt++; + + if ((s[cnt] == 'x') || (s[cnt] == 'X')) { + base = 16; + cnt++; + } + } + + if (!base) + base = 10; + + for (; cnt < len; cnt++) { + c = s[cnt]; + + if ((c >= '0') && (c <= '9')) + c -= '0'; + else if ((c >= 'a') && (c <= 'f')) + c -= 'a' - 10; + else if ((c >= 'A') && (c <= 'F')) + c -= 'A' - 10; + else + c = 0; + + acc *= base; + acc += c; + } + + (*next_idx)++; + + return acc; +} + +void gswss_help(void) +{ + int i = 0; + int num_of_elem = (sizeof(gswss_cfg) / sizeof(struct _gswss_cfg)); + + printf("\n----GSWSS Commands----\n\n"); + + for (i = 0; i < num_of_elem; i++) { + if (gswss_cfg[i].help) { +#if defined(CHIPTEST) && CHIPTEST + + if (gswss_cfg[i].cmdid < GSWSS_MAX_ADAP) { + printf("gsw gswss %15s \t %s\n", + gswss_cfg[i].cmdname, + gswss_cfg[i].help); + } + +#else + + if (gswss_cfg[i].cmdid < GSWSS_MAX_ADAP) { + printf("switch_cli gswss %15s \t %s\n", + gswss_cfg[i].cmdname, + gswss_cfg[i].help); + } + +#endif + } + } + + printf("\n\n"); + + for (i = 0; i < num_of_elem; i++) { + if (gswss_cfg[i].help) { +#if defined(CHIPTEST) && CHIPTEST + + if (gswss_cfg[i].cmdid < GSWSS_MAX_ADAP) { + if (gswss_cfg[i].cmdid < GSWSS_MAX_MAC) { + if ((!strcmp(gswss_cfg[i].cmdname, "r")) || + (!strcmp(gswss_cfg[i].cmdname, "w"))) { + continue; + } else { + printf("gsw gswss get %10s \t %s\n", + gswss_cfg[i].cmdname, "<2/3/4... Mac Idx>"); + } + } else { + if ((!strcmp(gswss_cfg[i].cmdname, "r")) || + (!strcmp(gswss_cfg[i].cmdname, "w"))) { + continue; + } else { + printf("gsw gswss get %10s \t\n", + gswss_cfg[i].cmdname); + } + } + } + +#else + + if (gswss_cfg[i].cmdid < GSWSS_MAX_ADAP) { + if (gswss_cfg[i].cmdid < GSWSS_MAX_MAC) { + if ((!strcmp(gswss_cfg[i].cmdname, "r")) || + (!strcmp(gswss_cfg[i].cmdname, "w"))) { + continue; + } else { + printf("switch_cli gswss get %10s \t %s\n", + gswss_cfg[i].cmdname, "<2/3/4... Mac Idx>"); + } + + } else { + if ((!strcmp(gswss_cfg[i].cmdname, "r")) || + (!strcmp(gswss_cfg[i].cmdname, "w"))) { + continue; + } else { + if (!strcmp(gswss_cfg[i].cmdname, "nco")) { + printf("switch_cli gswss get %10s %s\t\n", gswss_cfg[i].cmdname, "NCO Index <1,2,3,4>"); + } else { + printf("switch_cli gswss get %10s \t\n", + gswss_cfg[i].cmdname); + } + } + } + } + +#endif + } + } + + printf("\n"); +} + +int get_mac_idx(char *argv[], u32 idx, GSW_MAC_Cli_t *param) +{ + u32 max_mac = 0; + + if (gswip_version == GSWIP_3_1) + max_mac = 3; + else if (gswip_version == GSWIP_3_2) + max_mac = 9; + + if ((idx < MAC_2) || (idx > ((max_mac + MAC_2) - 1))) { + printf("Give valid mac index 2/3/4/...\n"); + return -1; + } + + param->mac_idx = idx; + + return idx; +} + +int gswss_main(u32 argc, char *argv[], void *fd) +{ + u32 start_arg = 0; + u32 idx; + struct mac_ops *ops = NULL; + GSW_MAC_Cli_t param; + int i = 0, num_of_elem, found = 0, j = 0, ret = 0; + + start_arg++; + start_arg++; + + if (argc <= 2) { + gswss_help(); + goto end; + } + + if (!strcmp(argv[start_arg], "-help")) { + gswss_help(); + goto end; + } + + memset(¶m, 0x00, sizeof(param)); + + if (!strcmp(argv[start_arg], "test")) { + test_cli_adap(fd); + goto end; + } + + if (!strcmp(argv[start_arg], "r")) { + start_arg++; + found = 1; + + if ((strstr(argv[start_arg], "0x")) || + (strstr(argv[start_arg], "0X"))) + printf("\n"); + else + printf("Please give the address with " + "0x firmat\n"); + + param.val[0] = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + gsw_gswss_reg_read(fd, ¶m); + + goto end; + } + + if (!strcmp(argv[start_arg], "w")) { + start_arg++; + found = 1; + + if ((strstr(argv[start_arg], "0x")) || + (strstr(argv[start_arg], "0X"))) + printf("\n"); + else + printf("Please give the address with " + "0x format\n"); + + param.val[0] = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + param.val[1] = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + gsw_gswss_reg_write(fd, ¶m); + + goto end; + } + + if (!strcmp(argv[start_arg], "get")) { + start_arg++; + + if (!argv[start_arg]) { + gswss_help(); + goto end; + } + + num_of_elem = (sizeof(gswss_cfg) / sizeof(struct _gswss_cfg)); + + for (i = 0; i < num_of_elem; i++) { + + if (gswss_cfg[i].cmdid < GSWSS_MAX_MAC) { + + if (!strcmp(argv[start_arg], gswss_cfg[i].cmdname)) { + + start_arg++; + found = 1; + + if (!argv[start_arg]) { + printf("switch_cli gswss get %s <2/3/4..: MacIdx>\n", gswss_cfg[i].cmdname); + goto end; + } + + idx = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + + if (get_mac_idx(argv, idx, ¶m) < 0) + return -1; + + for (j = 0; j < gswss_cfg[i].args - 1; j++) { + if (argv[start_arg]) { + param.val[j] = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + } + } + + param.cmdType = gswss_cfg[i].cmdid; + param.get = 1; + + if (gswss_cfg[i].get_func) + gswss_cfg[i].get_func(fd, ¶m); + else + ret = cli_ioctl(fd, GSW_GSWSS_CFG, ¶m); + + goto end; + } + } + + if (gswss_cfg[i].cmdid > GSWSS_MAX_MAC && + gswss_cfg[i].cmdid < GSWSS_MAX_ADAP) { + + if (!strcmp(argv[start_arg], gswss_cfg[i].cmdname)) { + start_arg++; + found = 1; + + if (!strcmp(gswss_cfg[i].cmdname, "nco")) { + if (!argv[start_arg]) { + printf("switch_cli gswss get nco <NCO Index 1,2,3,4>\n"); + goto end; + } + } + + for (j = 0; j < gswss_cfg[i].args; j++) { + + if (argv[start_arg]) { + param.val[j] = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + } + + + } + + if (!strcmp(gswss_cfg[i].cmdname, "nco")) { + if (param.val[0] < 1 || param.val[0] > 4) { + printf("switch_cli gswss get nco <NCO Index 1,2,3,4>\n"); + goto end; + } + } + + param.cmdType = gswss_cfg[i].cmdid; + param.get = 1; + + if (gswss_cfg[i].get_func) + gswss_cfg[i].get_func(fd, ¶m); + else + ret = cli_ioctl(fd, GSW_GSWSS_CFG, ¶m); + + goto end; + } + } + } + + if (found == 0) { + gswss_help(); + goto end; + } + } else { + + num_of_elem = (sizeof(gswss_cfg) / sizeof(struct _gswss_cfg)); + + if (!argv[start_arg]) { + gswss_help(); + goto end; + } + + for (i = 0; i < num_of_elem; i++) { + + if (gswss_cfg[i].cmdid < GSWSS_MAX_MAC) { + + if (!strcmp(argv[start_arg], gswss_cfg[i].cmdname)) { + start_arg++; + found = 1; + + if (!argv[start_arg]) { + printf("switch_cli gswss %s %s\n", gswss_cfg[i].cmdname, gswss_cfg[i].help); + goto end; + } + + if (gswss_cfg[i].cmdid != GSWSS_REG_RD && gswss_cfg[i].cmdid != GSWSS_REG_WR) { + + idx = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + + if (get_mac_idx(argv, idx, ¶m) < 0) + return -1; + } else { + param.mac_idx = MAC_2; + } + + for (j = 0; j < gswss_cfg[i].args - 1; j++) { + + if (!argv[start_arg]) { + printf("switch_cli gswss %s %s\n", gswss_cfg[i].cmdname, gswss_cfg[i].help); + goto end; + } + + param.val[j] = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + } + + param.cmdType = gswss_cfg[i].cmdid; + param.get = 0; + + if (gswss_cfg[i].set_func) + gswss_cfg[i].set_func(fd, ¶m); + else + ret = cli_ioctl(fd, GSW_GSWSS_CFG, ¶m); + + if (gswss_cfg[i].cmdid == GSWSS_REG_RD) { + printf("\tREG offset: 0x%04x\n\tData: %08X\n", param.val[0], + ret); + } + + if (gswss_cfg[i].cmdid == GSWSS_REG_WR) { + printf("\tREG offset: 0x%04x\n\tData: %08X\n", param.val[0], param.val[1]); + } + + goto end; + } + } + + if (gswss_cfg[i].cmdid > GSWSS_MAX_MAC && + gswss_cfg[i].cmdid < GSWSS_MAX_ADAP) { + + if (!strcmp(argv[start_arg], gswss_cfg[i].cmdname)) { + start_arg++; + found = 1; + + if (!argv[start_arg]) { + printf("switch_cli gswss %s %s\n", gswss_cfg[i].cmdname, gswss_cfg[i].help); + goto end; + } + + + for (j = 0; j < gswss_cfg[i].args; j++) { + + if (!argv[start_arg]) { + printf("switch_cli gswss %s %s\n", gswss_cfg[i].cmdname, gswss_cfg[i].help); + goto end; + } + + param.val[j] = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + } + + param.cmdType = gswss_cfg[i].cmdid; + param.get = 0; + + if (gswss_cfg[i].set_func) + gswss_cfg[i].set_func(fd, ¶m); + else + ret = cli_ioctl(fd, GSW_GSWSS_CFG, ¶m); + + goto end; + } + } + } + + if (found == 0) { + gswss_help(); + goto end; + } + } + +end: + return 0; +} + + +int test_cli_adap(void *fd) +{ + int i = 0, j = 0, k = 0, m = 0, setget; + int num_of_elem = + (sizeof(gswss_cfg) / sizeof(struct _gswss_cfg)); + int argc = 0; + char **argv; + + argv = malloc(15 * sizeof(char *)); // allocate the array to hold the pointer + + if (argv == NULL) { + printf("%s memory allocation failed !! %d\n", __func__, __LINE__); + return -1; + } + + for (i = 0; i < 15; i++) { + argv[i] = malloc(255 * sizeof(char)); // allocate each array to hold the strings + + if (argv[i] == NULL) { + printf("%s memory allocation failed !! %d\n", __func__, __LINE__); + + while (--i >= 0) + free(argv[i]); // Free Previous + + free(argv); // Free Array + return -1; + } + } + + for (setget = 0; setget < 2; setget++) { + for (m = 0; m < 3; m++) { + for (i = 0; i < num_of_elem; i++) { + + k = 0; + + argv[k] = "switch_cli"; + k++; + argv[k] = "gswss"; + k++; + + + for (j = 2; j < 15; j++) + memset(argv[j], '\0', 255); + + if (gswss_cfg[i].cmdid < GSWSS_MAX_MAC) { + + if (setget == 1) { + strcpy(argv[k], "get"); + k++; + strcpy(argv[k], gswss_cfg[i].cmdname); + k++; + + if (m == 0) + strcpy(argv[k], "2"); + else if (m == 1) + strcpy(argv[k], "3"); + else if (m == 2) + strcpy(argv[k], "4"); + + k++; + + printf("%s %s %s %s %s\n", argv[0], argv[1], argv[2], argv[3], argv[4]); + } else { + strcpy(argv[k], gswss_cfg[i].cmdname); + k++; + + if (gswss_cfg[i].cmdid != GSWSS_REG_RD && gswss_cfg[i].cmdid != GSWSS_REG_WR) { + if (m == 0) + strcpy(argv[k], "2"); + else if (m == 1) + strcpy(argv[k], "3"); + else if (m == 2) + strcpy(argv[k], "4"); + + k++; + } + + printf("%s %s %s %s", argv[0], argv[1], argv[2], argv[3]); + + for (j = 0; j < gswss_cfg[i].args - 1; j++) { + strcpy(argv[k], "1"); + printf(" %s", argv[k]); + k++; + } + + printf("\n"); + } + } else if (gswss_cfg[i].cmdid > GSWSS_MAX_MAC) { + + if (setget == 1) { + strcpy(argv[k], "get"); + k++; + strcpy(argv[k], gswss_cfg[i].cmdname); + k++; + + printf("%s %s %s %s\n", argv[0], argv[1], argv[2], argv[3]); + system("sleep 1"); + } else { + strcpy(argv[k], gswss_cfg[i].cmdname); + k++; + + printf("%s %s %s", argv[0], argv[1], argv[2]); + system("sleep 1"); + + for (j = 0; j < gswss_cfg[i].args; j++) { + strcpy(argv[k], "1"); + printf(" %s", argv[k]); + k++; + } + + printf("\n"); + } + } + + argc = k; + system("sleep 1"); + + gswss_main(argc, argv, fd); + } + } + } + + for (i = 0; i < 15; i++) { + free(argv[i]); + } + + free(argv); + + return 0; +} + diff --git a/src/gsw_cli_fkts.c b/src/gsw_cli_fkts.c old mode 100644 new mode 100755 index afa52f457984cbf15ffe6999c1cc62ba2d5398fa..e35e10af5a9fef7f9120c0d42905fe78b98b515b --- a/src/gsw_cli_fkts.c +++ b/src/gsw_cli_fkts.c @@ -21,7 +21,13 @@ #include <ctype.h> #endif -int gsw_8021x_eapol_rule_set(int argc, char *argv[], int fd, int numPar) +#define MAX_NUM_OF_DISPLAY_PORTS 12 + +int xgmac_main(u32 argc, char *argv[], void *fd); +int gswss_main(u32 argc, char *argv[], void *fd); +int lmac_main(u32 argc, char *argv[], void *fd); + +int gsw_8021x_eapol_rule_set(int argc, char *argv[], void *fd, int numPar) { GSW_8021X_EAPOL_Rule_t param; int cnt = 0; @@ -39,7 +45,7 @@ int gsw_8021x_eapol_rule_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_8021X_EAPOL_RULE_SET, ¶m); } -int gsw_8021x_port_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_8021x_port_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_8021X_portCfg_t param; int cnt = 0; @@ -61,7 +67,7 @@ int gsw_8021x_port_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_8021X_PORT_CFG_SET, ¶m); } -int gsw_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_cfg_t param; int cnt = 0; @@ -71,7 +77,7 @@ int gsw_cfg_set(int argc, char *argv[], int fd, int numPar) return (-4); cnt += scanParamArg(argc, argv, "eMAC_TableAgeTimer", sizeof(param.eMAC_TableAgeTimer), ¶m.eMAC_TableAgeTimer); - cnt += scanParamArg(argc, argv, "bVLAN_Aware", sizeof(param.eMAC_TableAgeTimer), ¶m.eMAC_TableAgeTimer); + cnt += scanParamArg(argc, argv, "bVLAN_Aware", sizeof(param.bVLAN_Aware), ¶m.bVLAN_Aware); cnt += scanParamArg(argc, argv, "nMaxPacketLen", sizeof(param.nMaxPacketLen), ¶m.nMaxPacketLen); cnt += scanParamArg(argc, argv, "bLearningLimitAction", sizeof(param.bLearningLimitAction), ¶m.bLearningLimitAction); cnt += scanParamArg(argc, argv, "bPauseMAC_ModeSrc", sizeof(param.bPauseMAC_ModeSrc), ¶m.bPauseMAC_ModeSrc); @@ -83,7 +89,7 @@ int gsw_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_CFG_SET, ¶m); } -int gsw_cpu_port_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_cpu_port_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_CPU_PortCfg_t param; int cnt = 0; @@ -102,6 +108,8 @@ int gsw_cpu_port_cfg_set(int argc, char *argv[], int fd, int numPar) cnt += scanParamArg(argc, argv, "bFcsCheck", sizeof(param.bFcsCheck), ¶m.bFcsCheck); cnt += scanParamArg(argc, argv, "bFcsGenerate", sizeof(param.bFcsGenerate), ¶m.bFcsGenerate); cnt += scanParamArg(argc, argv, "bSpecialTagEthType", sizeof(param.bSpecialTagEthType), ¶m.bSpecialTagEthType); + cnt += scanParamArg(argc, argv, "bTsPtp", sizeof(param.bTsPtp), ¶m.bTsPtp); + cnt += scanParamArg(argc, argv, "bTsNonptp", sizeof(param.bTsNonptp), ¶m.bTsNonptp); cnt += scanParamArg(argc, argv, "eNoMPEParserCfg", sizeof(param.eNoMPEParserCfg), ¶m.eNoMPEParserCfg); cnt += scanParamArg(argc, argv, "eMPE1ParserCfg", sizeof(param.eMPE1ParserCfg), ¶m.eMPE1ParserCfg); @@ -114,17 +122,17 @@ int gsw_cpu_port_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_CPU_PORT_CFG_SET, ¶m); } -int gsw_disable(int argc, char *argv[], int fd, int numPar) +int gsw_disable(int argc, char *argv[], void *fd, int numPar) { return cli_ioctl(fd, GSW_DISABLE, 0); } -int gsw_enable(int argc, char *argv[], int fd, int numPar) +int gsw_enable(int argc, char *argv[], void *fd, int numPar) { return cli_ioctl(fd, GSW_ENABLE, 0); } -int gsw_hw_init(int argc, char *argv[], int fd, int numPar) +int gsw_hw_init(int argc, char *argv[], void *fd, int numPar) { GSW_HW_Init_t param; int cnt = 0; @@ -138,12 +146,12 @@ int gsw_hw_init(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_HW_INIT, ¶m); } -int gsw_mac_table_clear(int argc, char *argv[], int fd, int numPar) +int gsw_mac_table_clear(int argc, char *argv[], void *fd, int numPar) { return cli_ioctl(fd, GSW_MAC_TABLE_CLEAR, 0); } -int gsw_mac_table_entry_add(int argc, char *argv[], int fd, int numPar) +int gsw_mac_table_entry_add(int argc, char *argv[], void *fd, int numPar) { GSW_MAC_tableAdd_t sVar; int cnt = 0; @@ -159,6 +167,11 @@ int gsw_mac_table_entry_add(int argc, char *argv[], int fd, int numPar) cnt += scanParamArg(argc, argv, "nSVLAN_Id", sizeof(sVar.bIgmpControlled), &sVar.nSVLAN_Id); cnt += scanParamArg(argc, argv, "nSubIfId", sizeof(sVar.nSubIfId), &sVar.nSubIfId); cnt += scanMAC_Arg(argc, argv, "nMAC", sVar.nMAC); + + if (gswip_version == GSWIP_3_2) { + cnt += scanMAC_Arg(argc, argv, "nAssociatedMAC", sVar.nAssociatedMAC); + } + cnt += scanParamArg(argc, argv, "nPortMapValueIndex0", sizeof(sVar.nPortMap[0]), &sVar.nPortMap[0]); cnt += scanParamArg(argc, argv, "nPortMapValueIndex1", sizeof(sVar.nPortMap[1]), &sVar.nPortMap[1]); cnt += scanParamArg(argc, argv, "nPortMapValueIndex2", sizeof(sVar.nPortMap[2]), &sVar.nPortMap[2]); @@ -174,7 +187,7 @@ int gsw_mac_table_entry_add(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_MAC_TABLE_ENTRY_ADD, &sVar); } -int gsw_mac_table_entry_remove(int argc, char *argv[], int fd, int numPar) +int gsw_mac_table_entry_remove(int argc, char *argv[], void *fd, int numPar) { GSW_MAC_tableRemove_t param; int cnt = 0; @@ -189,7 +202,7 @@ int gsw_mac_table_entry_remove(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_MAC_TABLE_ENTRY_REMOVE, ¶m); } -int gsw_mdio_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_mdio_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_MDIO_cfg_t param; int cnt = 0; @@ -207,7 +220,7 @@ int gsw_mdio_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_MDIO_CFG_SET, ¶m); } -int gsw_mdio_data_write(int argc, char *argv[], int fd, int numPar) +int gsw_mdio_data_write(int argc, char *argv[], void *fd, int numPar) { GSW_MDIO_data_t param; int cnt = 0; @@ -223,7 +236,7 @@ int gsw_mdio_data_write(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_MDIO_DATA_WRITE, ¶m); } -int gsw_mmd_data_write(int argc, char *argv[], int fd, int numPar) +int gsw_mmd_data_write(int argc, char *argv[], void *fd, int numPar) { GSW_MMD_data_t param; int cnt = 0; @@ -239,7 +252,7 @@ int gsw_mmd_data_write(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_MMD_DATA_WRITE, ¶m); } -int gsw_monitor_port_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_monitor_port_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_monitorPortCfg_t param; int cnt = 0; @@ -256,13 +269,24 @@ int gsw_monitor_port_cfg_set(int argc, char *argv[], int fd, int numPar) cnt += scanParamArg(argc, argv, "bMonitorPort", sizeof(param.bMonitorPort), ¶m.bMonitorPort); cnt += scanParamArg(argc, argv, "nSubIfId", sizeof(param.nSubIfId), ¶m.nSubIfId); + if (gswip_version == GSWIP_3_2) { + cnt += scanParamArg(argc, argv, "bEnableIngressMirror", sizeof(param.bEnableIngressMirror), + ¶m.bEnableIngressMirror); + cnt += scanParamArg(argc, argv, "bEnableEgressMirror", sizeof(param.bEnableEgressMirror), + ¶m.bEnableEgressMirror); + cnt += scanParamArg(argc, argv, "nMonitorLpId", sizeof(param.nMonitorLpId), ¶m.nMonitorLpId); + cnt += scanParamArg(argc, argv, "bEnableMonitorQmap", sizeof(param.bEnableMonitorQmap), ¶m.bEnableMonitorQmap); + cnt += scanParamArg(argc, argv, "nMonitorQid", sizeof(param.nMonitorQid), ¶m.nMonitorQid); + cnt += scanParamArg(argc, argv, "nRedirectPortId", sizeof(param.nRedirectPortId), ¶m.nRedirectPortId); + } + if (cnt != numPar) return (-2); return cli_ioctl(fd, GSW_MONITOR_PORT_CFG_SET, ¶m); } -int gsw_multicast_router_port_add(int argc, char *argv[], int fd, int numPar) +int gsw_multicast_router_port_add(int argc, char *argv[], void *fd, int numPar) { GSW_multicastRouter_t param; int cnt = 0; @@ -276,7 +300,7 @@ int gsw_multicast_router_port_add(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_MULTICAST_ROUTER_PORT_ADD, ¶m); } -int gsw_multicast_router_port_remove(int argc, char *argv[], int fd, int numPar) +int gsw_multicast_router_port_remove(int argc, char *argv[], void *fd, int numPar) { GSW_multicastRouter_t param; int cnt = 0; @@ -290,7 +314,7 @@ int gsw_multicast_router_port_remove(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_MULTICAST_ROUTER_PORT_REMOVE, ¶m); } -int gsw_multicast_snoop_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_multicast_snoop_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_multicastSnoopCfg_t param; int cnt = 0; @@ -319,7 +343,7 @@ int gsw_multicast_snoop_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_MULTICAST_SNOOP_CFG_SET, ¶m); } -int gsw_port_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_port_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_portCfg_t param; int cnt = 0; @@ -356,7 +380,7 @@ int gsw_port_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_PORT_CFG_SET, ¶m); } -int gsw_port_link_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_port_link_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_portLinkCfg_t param; int cnt = 0; @@ -387,7 +411,7 @@ int gsw_port_link_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_PORT_LINK_CFG_SET, ¶m); } -int gsw_port_redirect_set(int argc, char *argv[], int fd, int numPar) +int gsw_port_redirect_set(int argc, char *argv[], void *fd, int numPar) { GSW_portRedirectCfg_t param; int cnt = 0; @@ -410,7 +434,7 @@ int gsw_port_redirect_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_PORT_REDIRECT_SET, ¶m); } -int gsw_port_rgmii_clk_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_port_rgmii_clk_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_portRGMII_ClkCfg_t param; int cnt = 0; @@ -433,13 +457,13 @@ int gsw_port_rgmii_clk_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_PORT_RGMII_CLK_CFG_SET, ¶m); } -int gsw_qos_meter_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_meter_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_meterCfg_t param; int cnt = 0; memset(¶m, 0, sizeof(GSW_QoS_meterCfg_t)); - cnt += scanParamArg(argc, argv, "nMeterId", sizeof(param.nMeterId), ¶m.nMeterId); + cnt += scanParamArg(argc, argv, "nMeterId", 32, ¶m.nMeterId); if (cnt != 1) return (-3); @@ -455,6 +479,9 @@ int gsw_qos_meter_cfg_set(int argc, char *argv[], int fd, int numPar) cnt += scanParamArg(argc, argv, "nPiRate", sizeof(param.nPiRate), ¶m.nPiRate); cnt += scanParamArg(argc, argv, "cMeterName", sizeof(param.cMeterName), ¶m.cMeterName); cnt += scanParamArg(argc, argv, "nColourBlindMode", sizeof(param.nColourBlindMode), ¶m.nColourBlindMode); + cnt += scanParamArg(argc, argv, "bPktMode", sizeof(param.bPktMode), ¶m.bPktMode); + cnt += scanParamArg(argc, argv, "bLocalOverhd", sizeof(param.bLocalOverhd), ¶m.bLocalOverhd); + cnt += scanParamArg(argc, argv, "nLocaloverhd", sizeof(param.nLocaloverhd), ¶m.nLocaloverhd); if (cnt != numPar) return (-2); @@ -462,7 +489,7 @@ int gsw_qos_meter_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_METER_CFG_SET, ¶m); } -int gsw_qos_meter_port_assign(int argc, char *argv[], int fd, int numPar) +int gsw_qos_meter_port_assign(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_meterPort_t param; int cnt = 0; @@ -479,7 +506,7 @@ int gsw_qos_meter_port_assign(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_METER_PORT_ASSIGN, ¶m); } -int gsw_qos_meter_port_deassign(int argc, char *argv[], int fd, int numPar) +int gsw_qos_meter_port_deassign(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_meterPort_t param; int cnt = 0; @@ -496,7 +523,7 @@ int gsw_qos_meter_port_deassign(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_METER_PORT_DEASSIGN, ¶m); } -int gsw_qos_port_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_port_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_portCfg_t param; int cnt = 0; @@ -519,7 +546,7 @@ int gsw_qos_port_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_PORT_CFG_SET, ¶m); } -int gsw_qos_port_remarking_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_port_remarking_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_portRemarkingCfg_t param; int cnt = 0; @@ -549,10 +576,11 @@ int gsw_qos_port_remarking_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_PORT_REMARKING_CFG_SET, ¶m); } -int gsw_qos_queue_port_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_queue_port_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_queuePort_t param; int cnt = 0; + unsigned char nQueueId = 0, nRedirectPortId = 0; memset(¶m, 0, sizeof(GSW_QoS_queuePort_t)); cnt += scanParamArg(argc, argv, "nPortId", sizeof(param.nPortId), ¶m.nPortId); @@ -567,6 +595,12 @@ int gsw_qos_queue_port_set(int argc, char *argv[], int fd, int numPar) cnt += scanParamArg(argc, argv, "nQueueId", sizeof(param.nQueueId), ¶m.nQueueId); cnt += scanParamArg(argc, argv, "nRedirectPortId", sizeof(param.nRedirectPortId), ¶m.nRedirectPortId); + if (gswip_version == GSWIP_3_2) { + cnt += scanParamArg(argc, argv, "bEnableIngressPceBypass", sizeof(param.bEnableIngressPceBypass), + ¶m.bEnableIngressPceBypass); + cnt += scanParamArg(argc, argv, "bReservedPortMode", sizeof(param.bReservedPortMode), + ¶m.bReservedPortMode); + } if (cnt != numPar) return (-3); @@ -574,7 +608,7 @@ int gsw_qos_queue_port_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_QUEUE_PORT_SET, ¶m); } -int gsw_qos_scheduler_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_scheduler_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_schedulerCfg_t param; int cnt = 0; @@ -597,7 +631,7 @@ int gsw_qos_scheduler_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_SCHEDULER_CFG_SET, ¶m); } -int gsw_qos_shaper_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_shaper_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_ShaperCfg_t param; int cnt = 0; @@ -621,7 +655,7 @@ int gsw_qos_shaper_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_SHAPER_CFG_SET, ¶m); } -int gsw_qos_shaper_queue_assign(int argc, char *argv[], int fd, int numPar) +int gsw_qos_shaper_queue_assign(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_ShaperQueue_t param; int cnt = 0; @@ -636,7 +670,7 @@ int gsw_qos_shaper_queue_assign(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_SHAPER_QUEUE_ASSIGN, ¶m); } -int gsw_qos_shaper_queue_deassign(int argc, char *argv[], int fd, int numPar) +int gsw_qos_shaper_queue_deassign(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_ShaperQueue_t param; int cnt = 0; @@ -651,7 +685,7 @@ int gsw_qos_shaper_queue_deassign(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_SHAPER_QUEUE_DEASSIGN, ¶m); } -int gsw_qos_storm_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_storm_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_stormCfg_t param; int cnt = 0; @@ -668,7 +702,7 @@ int gsw_qos_storm_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_STORM_CFG_SET, ¶m); } -int gsw_qos_wred_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_wred_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_WRED_Cfg_t param; int cnt = 0; @@ -693,7 +727,7 @@ int gsw_qos_wred_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_WRED_CFG_SET, ¶m); } -int gsw_qos_wred_queue_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_wred_queue_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_WRED_QueueCfg_t param; int cnt = 0; @@ -720,7 +754,7 @@ int gsw_qos_wred_queue_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_WRED_QUEUE_CFG_SET, ¶m); } -int gsw_rmon_clear(int argc, char *argv[], int fd, int numPar) +int gsw_rmon_clear(int argc, char *argv[], void *fd, int numPar) { GSW_RMON_clear_t param; int cnt = 0; @@ -735,7 +769,7 @@ int gsw_rmon_clear(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_RMON_CLEAR, ¶m); } -int gsw_stp_bpdu_rule_set(int argc, char *argv[], int fd, int numPar) +int gsw_stp_bpdu_rule_set(int argc, char *argv[], void *fd, int numPar) { GSW_STP_BPDU_Rule_t param; int cnt = 0; @@ -753,7 +787,7 @@ int gsw_stp_bpdu_rule_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_STP_BPDU_RULE_SET, ¶m); } -int gsw_stp_port_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_stp_port_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_STP_portCfg_t param; int cnt = 0; @@ -775,7 +809,7 @@ int gsw_stp_port_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_STP_PORT_CFG_SET, ¶m); } -int gsw_vlan_id_create(int argc, char *argv[], int fd, int numPar) +int gsw_vlan_id_create(int argc, char *argv[], void *fd, int numPar) { GSW_VLAN_IdCreate_t param; int cnt = 0; @@ -792,7 +826,7 @@ int gsw_vlan_id_create(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_VLAN_ID_CREATE, ¶m); } -int gsw_vlan_id_delete(int argc, char *argv[], int fd, int numPar) +int gsw_vlan_id_delete(int argc, char *argv[], void *fd, int numPar) { GSW_VLAN_IdDelete_t param; int cnt = 0; @@ -806,7 +840,7 @@ int gsw_vlan_id_delete(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_VLAN_ID_DELETE, ¶m); } -int gsw_vlan_port_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_vlan_port_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_VLAN_portCfg_t param; int cnt = 0; @@ -833,7 +867,7 @@ int gsw_vlan_port_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_VLAN_PORT_CFG_SET, ¶m); } -int gsw_vlan_port_member_add(int argc, char *argv[], int fd, int numPar) +int gsw_vlan_port_member_add(int argc, char *argv[], void *fd, int numPar) { GSW_VLAN_portMemberAdd_t param; int cnt = 0; @@ -849,7 +883,7 @@ int gsw_vlan_port_member_add(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_VLAN_PORT_MEMBER_ADD, ¶m); } -int gsw_vlan_port_member_remove(int argc, char *argv[], int fd, int numPar) +int gsw_vlan_port_member_remove(int argc, char *argv[], void *fd, int numPar) { GSW_VLAN_portMemberRemove_t param; int cnt = 0; @@ -864,7 +898,7 @@ int gsw_vlan_port_member_remove(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_VLAN_PORT_MEMBER_REMOVE, ¶m); } -int gsw_vlan_member_init(int argc, char *argv[], int fd, int numPar) +int gsw_vlan_member_init(int argc, char *argv[], void *fd, int numPar) { GSW_VLAN_memberInit_t param; int cnt = 0; @@ -878,7 +912,7 @@ int gsw_vlan_member_init(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_VLAN_MEMBER_INIT, ¶m); } -int gsw_vlan_reserved_add(int argc, char *argv[], int fd, int numPar) +int gsw_vlan_reserved_add(int argc, char *argv[], void *fd, int numPar) { GSW_VLAN_reserved_t param; int cnt = 0; @@ -892,7 +926,7 @@ int gsw_vlan_reserved_add(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_VLAN_RESERVED_ADD, ¶m); } -int gsw_vlan_reserved_remove(int argc, char *argv[], int fd, int numPar) +int gsw_vlan_reserved_remove(int argc, char *argv[], void *fd, int numPar) { GSW_VLAN_reserved_t param; int cnt = 0; @@ -906,7 +940,7 @@ int gsw_vlan_reserved_remove(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_VLAN_RESERVED_REMOVE, ¶m); } -int gsw_wol_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_wol_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_WoL_Cfg_t param; int cnt = 0; @@ -925,7 +959,7 @@ int gsw_wol_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_WOL_CFG_SET, ¶m); } -int gsw_wol_port_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_wol_port_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_WoL_PortCfg_t param; int cnt = 0; @@ -947,7 +981,7 @@ int gsw_wol_port_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_WOL_PORT_CFG_SET, ¶m); } -int gsw_irq_mask_set(int argc, char *argv[], int fd, int numPar) +int gsw_irq_mask_set(int argc, char *argv[], void *fd, int numPar) { GSW_irq_t param; int cnt = 0; @@ -962,7 +996,7 @@ int gsw_irq_mask_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_IRQ_MASK_SET, ¶m); } -int gsw_irq_status_clear(int argc, char *argv[], int fd, int numPar) +int gsw_irq_status_clear(int argc, char *argv[], void *fd, int numPar) { GSW_irq_t param; int cnt = 0; @@ -977,7 +1011,7 @@ int gsw_irq_status_clear(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_IRQ_STATUS_CLEAR, ¶m); } -int gsw_pce_rule_delete(int argc, char *argv[], int fd, int numPar) +int gsw_pce_rule_delete(int argc, char *argv[], void *fd, int numPar) { GSW_PCE_ruleDelete_t param; int cnt = 0; @@ -991,7 +1025,7 @@ int gsw_pce_rule_delete(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_PCE_RULE_DELETE, ¶m); } -int gsw_reset(int argc, char *argv[], int fd, int numPar) +int gsw_reset(int argc, char *argv[], void *fd, int numPar) { GSW_reset_t param; int cnt = 0; @@ -1005,7 +1039,7 @@ int gsw_reset(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_RESET, ¶m); } -int gsw_8021x_eapol_rule_get(int argc, char *argv[], int fd, int numPar) +int gsw_8021x_eapol_rule_get(int argc, char *argv[], void *fd, int numPar) { GSW_8021X_EAPOL_Rule_t param; memset(¶m, 0, sizeof(GSW_8021X_EAPOL_Rule_t)); @@ -1021,7 +1055,7 @@ int gsw_8021x_eapol_rule_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_8021x_port_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_8021x_port_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_8021X_portCfg_t param; int cnt = 0; @@ -1043,7 +1077,7 @@ int gsw_8021x_port_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_cfg_t param; memset(¶m, 0, sizeof(GSW_cfg_t)); @@ -1065,7 +1099,7 @@ int gsw_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_cpu_port_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_cpu_port_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_CPU_PortCfg_t param; int cnt = 0; @@ -1089,6 +1123,8 @@ int gsw_cpu_port_cfg_get(int argc, char *argv[], int fd, int numPar) printf("\t%40s:\t%s\n", "bFcsCheck", (param.bFcsCheck > 0) ? "TRUE" : "FALSE"); printf("\t%40s:\t%s\n", "bFcsGenerate", (param.bFcsGenerate > 0) ? "TRUE" : "FALSE"); printHex32Value("bSpecialTagEthType", param.bSpecialTagEthType, 0); + printf("\t%40s:\t%s\n", "bTsPtp", (param.bTsPtp > 0) ? "TRUE" : "FALSE"); + printf("\t%40s:\t%s\n", "bTsNonptp", (param.bTsNonptp > 0) ? "TRUE" : "FALSE"); printf("\t%40s:\t%d\n", "eNoMPEParserCfg", param.eNoMPEParserCfg); printf("\t%40s:\t%d\n", "eMPE1ParserCfg", param.eMPE1ParserCfg); @@ -1098,7 +1134,7 @@ int gsw_cpu_port_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_mac_table_entry_query(int argc, char *argv[], int fd, int numPar) +int gsw_mac_table_entry_query(int argc, char *argv[], void *fd, int numPar) { GSW_MAC_tableQuery_t sVar; int cnt = 0, i = 0; @@ -1130,18 +1166,28 @@ int gsw_mac_table_entry_query(int argc, char *argv[], int fd, int numPar) printf("\t\t\t\t bIgmpControlled:\t%d\n", sVar.bIgmpControlled); printf("\t\t\t\t\tnSVLAN_Id:\t%d\n", sVar.nSVLAN_Id); - if (sVar.bStaticEntry) { - for (i = 0; i < 8; i++) - printf("\t\t\t\t\t PortMap[ %d ]:\t0x%x\n", i, sVar.nPortMap[i]); - } - else { /*Dynamic Entry*/ - printf("\t%40s:\t%s\n", "bEntryChanged", (sVar.bEntryChanged > 0) ? "TRUE" : "FALSE"); + if (gswip_version == GSWIP_3_2 || gswip_version == GSWIP_3_1) { + if (sVar.bStaticEntry) { + for (i = 0; i < 8; i++) { + printf("\t\t\t\t\t PortMap[ %d ]:\t0x%x\n", i, sVar.nPortMap[i]); + } + + printf("\t\t\t\t\t Hit status:\t%d\n", sVar.hitstatus); + } else { /*Dynamic Entry*/ + printf("\t%40s:\t%s\n", "bEntryChanged", (sVar.bEntryChanged > 0) ? "TRUE" : "FALSE"); + } + + if (gswip_version == GSWIP_3_2) { + printf("\t%40s:\t", "nAssociatedMAC"); + printMAC_Address(sVar.nAssociatedMAC); + printf("\n"); + } } return 0; } -int gsw_mdio_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_mdio_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_MDIO_cfg_t param; memset(¶m, 0, sizeof(GSW_MDIO_cfg_t)); @@ -1157,7 +1203,7 @@ int gsw_mdio_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_mdio_data_read(int argc, char *argv[], int fd, int numPar) +int gsw_mdio_data_read(int argc, char *argv[], void *fd, int numPar) { GSW_MDIO_data_t param; int cnt = 0; @@ -1181,7 +1227,7 @@ int gsw_mdio_data_read(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_mmd_data_read(int argc, char *argv[], int fd, int numPar) +int gsw_mmd_data_read(int argc, char *argv[], void *fd, int numPar) { GSW_MMD_data_t param; int cnt = 0; @@ -1205,7 +1251,7 @@ int gsw_mmd_data_read(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_monitor_port_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_monitor_port_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_monitorPortCfg_t param; int cnt = 0; @@ -1213,6 +1259,12 @@ int gsw_monitor_port_cfg_get(int argc, char *argv[], int fd, int numPar) cnt += scanParamArg(argc, argv, "nPortId", sizeof(param.nPortId), ¶m.nPortId); + if (gswip_version == GSWIP_3_2) { + cnt += scanParamArg(argc, argv, "bEnableMonitorQmap", 16, ¶m.bEnableMonitorQmap); + } + + + if (cnt != numPar) return (-2); @@ -1225,10 +1277,20 @@ int gsw_monitor_port_cfg_get(int argc, char *argv[], int fd, int numPar) printf("\n\tnPortId %d", param.nPortId); printf("\t%40s:\t%s\n", "bMonitorPort", (param.bMonitorPort > 0) ? "TRUE" : "FALSE"); printf("\n\tnSubIfId %d", param.nSubIfId); + + if (gswip_version == GSWIP_3_2) { + printf("\n\tnbEnableIngressMirror %d", param.bEnableIngressMirror); + printf("\n\tnbEnableEgressMirror %d", param.bEnableEgressMirror); + printf("\n\tbEnableMonitorQmap %d", param.bEnableMonitorQmap); + printf("\n\tnMonitorLpId %d", param.nMonitorLpId); + printf("\n\tnMonitorQid %d", param.nMonitorQid); + printf("\n\tnRedirectPortId %d", param.nRedirectPortId); + } + return 0; } -int gsw_multicast_snoop_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_multicast_snoop_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_multicastSnoopCfg_t param; memset(¶m, 0, sizeof(GSW_multicastSnoopCfg_t)); @@ -1256,7 +1318,7 @@ int gsw_multicast_snoop_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_port_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_port_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_portCfg_t param; int cnt = 0; @@ -1294,7 +1356,7 @@ int gsw_port_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_port_link_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_port_link_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_portLinkCfg_t param; int cnt = 0; @@ -1325,7 +1387,7 @@ int gsw_port_link_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_port_phy_addr_get(int argc, char *argv[], int fd, int numPar) +int gsw_port_phy_addr_get(int argc, char *argv[], void *fd, int numPar) { GSW_portPHY_Addr_t param; int cnt = 0; @@ -1347,7 +1409,7 @@ int gsw_port_phy_addr_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_port_phy_query(int argc, char *argv[], int fd, int numPar) +int gsw_port_phy_query(int argc, char *argv[], void *fd, int numPar) { GSW_portPHY_Query_t param; int cnt = 0; @@ -1369,7 +1431,7 @@ int gsw_port_phy_query(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_port_redirect_get(int argc, char *argv[], int fd, int numPar) +int gsw_port_redirect_get(int argc, char *argv[], void *fd, int numPar) { GSW_portRedirectCfg_t param; int cnt = 0; @@ -1392,7 +1454,7 @@ int gsw_port_redirect_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_port_rgmii_clk_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_port_rgmii_clk_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_portRGMII_ClkCfg_t param; int cnt = 0; @@ -1415,7 +1477,7 @@ int gsw_port_rgmii_clk_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_meter_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_meter_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_meterCfg_t param; int cnt = 0; @@ -1440,10 +1502,13 @@ int gsw_qos_meter_cfg_get(int argc, char *argv[], int fd, int numPar) printHex32Value("nPiRate", param.nPiRate, 0); //printHex32Value("cMeterName", param.cMeterName, 0); printHex32Value("nColourBlindMode", param.nColourBlindMode, 0); + printHex32Value("bPktMode", param.bPktMode, 0); + printf("\t%40s:\t%s\n", "bLocalOverhd", (param.bLocalOverhd > 0) ? "TRUE" : "FALSE"); + printHex32Value("nLocaloverhd", param.nLocaloverhd, 0); return 0; } -int gsw_qos_port_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_port_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_portCfg_t param; int cnt = 0; @@ -1466,7 +1531,7 @@ int gsw_qos_port_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_port_remarking_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_port_remarking_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_portRemarkingCfg_t param; int cnt = 0; @@ -1496,7 +1561,7 @@ int gsw_qos_port_remarking_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_scheduler_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_scheduler_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_schedulerCfg_t param; int cnt = 0; @@ -1519,7 +1584,7 @@ int gsw_qos_scheduler_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_shaper_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_shaper_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_ShaperCfg_t param; int cnt = 0; @@ -1543,7 +1608,7 @@ int gsw_qos_shaper_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_shaper_queue_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_shaper_queue_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_ShaperQueueGet_t param; int cnt = 0; @@ -1566,7 +1631,7 @@ int gsw_qos_shaper_queue_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_storm_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_storm_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_stormCfg_t param; memset(¶m, 0, sizeof(GSW_QoS_stormCfg_t)); @@ -1584,7 +1649,7 @@ int gsw_qos_storm_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_wred_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_wred_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_WRED_Cfg_t param; memset(¶m, 0, sizeof(GSW_QoS_WRED_Cfg_t)); @@ -1607,7 +1672,7 @@ int gsw_qos_wred_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_wred_queue_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_wred_queue_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_WRED_QueueCfg_t param; int cnt = 0; @@ -1635,7 +1700,7 @@ int gsw_qos_wred_queue_cfg_get(int argc, char *argv[], int fd, int numPar) } -int gsw_debug_ctp_rmon_port_get(int argc, char *argv[], int fd, int numPar) +int gsw_debug_ctp_rmon_port_get(int argc, char *argv[], void *fd, int numPar) { GSW_Debug_RMON_Port_cnt_t sVar; int cnt = 0; @@ -1677,6 +1742,17 @@ int gsw_debug_ctp_rmon_port_get(int argc, char *argv[], int fd, int numPar) printf("nRxGoodBytes : %llu (0x%llx)\n", (unsigned long long)sVar.nRxGoodBytes, (unsigned long long)sVar.nRxGoodBytes); printf("nRxBadBytes : %llu (0x%llx)\n", (unsigned long long)sVar.nRxBadBytes, (unsigned long long)sVar.nRxBadBytes); + /*Valid only for GSWIP3.2 */ + if (gswip_version == GSWIP_3_2) { + printf("nRxUnicastPktsYellowRed : %u\n", sVar.nRxUnicastPktsYellowRed); + printf("nRxBroadcastPktsYellowRed : %u\n", sVar.nRxBroadcastPktsYellowRed); + printf("nRxMulticastPktsYellowRed : %u\n", sVar.nRxMulticastPktsYellowRed); + printf("nRxGoodPktsYellowRed : %u\n", sVar.nRxGoodPktsYellowRed); + printf("nRxGoodBytesYellowRed : %llu (0x%llx)\n", (unsigned long long)sVar.nRxGoodBytesYellowRed, (unsigned long long)sVar.nRxGoodBytesYellowRed); + } + + + /*CTP port TX*/ sVar.ePortType = 1; @@ -1702,11 +1778,21 @@ int gsw_debug_ctp_rmon_port_get(int argc, char *argv[], int fd, int numPar) printf("nTxAcmDroppedPkts : %u\n", sVar.nTxAcmDroppedPkts); printf("nTxGoodBytes : %llu (0x%llx)\n", (unsigned long long)sVar.nTxGoodBytes, (unsigned long long)sVar.nTxGoodBytes); + /*Valid only for GSWIP3.2 */ + if (gswip_version == GSWIP_3_2) { + printf("nTxUnicastPktsYellowRed : %u\n", sVar.nTxUnicastPktsYellowRed); + printf("nTxBroadcastPktsYellowRed : %u\n", sVar.nTxBroadcastPktsYellowRed); + printf("nTxMulticastPktsYellowRed : %u\n", sVar.nTxMulticastPktsYellowRed); + printf("nTxGoodPktsYellowRed : %u\n", sVar.nTxGoodPktsYellowRed); + printf("nTxGoodBytesYellowRed : %llu (0x%llx)\n", (unsigned long long)sVar.nTxGoodBytesYellowRed, (unsigned long long)sVar.nTxGoodBytesYellowRed); + } + + return 0; } -int gsw_debug_bridge_rmon_port_get(int argc, char *argv[], int fd, int numPar) +int gsw_debug_bridge_rmon_port_get(int argc, char *argv[], void *fd, int numPar) { GSW_Debug_RMON_Port_cnt_t sVar; int cnt = 0; @@ -1773,11 +1859,21 @@ int gsw_debug_bridge_rmon_port_get(int argc, char *argv[], int fd, int numPar) printf("nTxAcmDroppedPkts : %u\n", sVar.nTxAcmDroppedPkts); printf("nTxGoodBytes : %llu (0x%llx)\n", (unsigned long long)sVar.nTxGoodBytes, (unsigned long long)sVar.nTxGoodBytes); + /*Valid only for GSWIP3.2 */ + if (gswip_version == GSWIP_3_2) { + printf("nTxUnicastPktsYellowRed : %u\n", sVar.nTxUnicastPktsYellowRed); + printf("nTxBroadcastPktsYellowRed : %u\n", sVar.nTxBroadcastPktsYellowRed); + printf("nTxMulticastPktsYellowRed : %u\n", sVar.nTxMulticastPktsYellowRed); + printf("nTxGoodPktsYellowRed : %u\n", sVar.nTxGoodPktsYellowRed); + printf("nTxGoodBytesYellowRed : %llu (0x%llx)\n", (unsigned long long)sVar.nTxGoodBytesYellowRed, (unsigned long long)sVar.nTxGoodBytesYellowRed); + } + + return 0; } -int gsw_debug_ctpbypass_rmon_port_get(int argc, char *argv[], int fd, int numPar) +int gsw_debug_ctpbypass_rmon_port_get(int argc, char *argv[], void *fd, int numPar) { GSW_Debug_RMON_Port_cnt_t sVar; int cnt = 0; @@ -1813,26 +1909,86 @@ int gsw_debug_ctpbypass_rmon_port_get(int argc, char *argv[], int fd, int numPar printf("nTxAcmDroppedPkts : %u\n", sVar.nTxAcmDroppedPkts); printf("nTxGoodBytes : %llu (0x%llx)\n", (unsigned long long)sVar.nTxGoodBytes, (unsigned long long)sVar.nTxGoodBytes); + + /*Valid only for GSWIP3.2 */ + if (gswip_version == GSWIP_3_2) { + printf("nTxUnicastPktsYellowRed : %u\n", sVar.nTxUnicastPktsYellowRed); + printf("nTxBroadcastPktsYellowRed : %u\n", sVar.nTxBroadcastPktsYellowRed); + printf("nTxMulticastPktsYellowRed : %u\n", sVar.nTxMulticastPktsYellowRed); + printf("nTxGoodPktsYellowRed : %u\n", sVar.nTxGoodPktsYellowRed); + printf("nTxGoodBytesYellowRed : %llu (0x%llx)\n", (unsigned long long)sVar.nTxGoodBytesYellowRed, (unsigned long long)sVar.nTxGoodBytesYellowRed); + } + + return 0; } -#define MAX_NUM_OF_PORTS 12 - -int gsw_debug_rmon_port_get_all(int argc, char *argv[], int fd, int numPar) +int gsw_debug_rmon_port_get_all(int argc, char *argv[], void *fd, int numPar) { - GSW_Debug_RMON_Port_cnt_t sVar_rx[MAX_NUM_OF_PORTS]; - GSW_Debug_RMON_Port_cnt_t sVar_tx[MAX_NUM_OF_PORTS]; - u32 i = 0, j = 0, cnt = 0; + GSW_Debug_RMON_Port_cnt_t sVar_rx[MAX_NUM_OF_DISPLAY_PORTS]; + GSW_Debug_RMON_Port_cnt_t sVar_tx[MAX_NUM_OF_DISPLAY_PORTS]; + u32 i = 0, j = 0, cnt = 0, start = 0, end = 0, max_read = 0; + int maxctp, maxbridge; GSW_RMON_portType_t eCounerType; + GSW_cap_t param; - memset(sVar_rx, 0, sizeof(GSW_Debug_RMON_Port_cnt_t)*MAX_NUM_OF_PORTS); - memset(sVar_tx, 0, sizeof(GSW_Debug_RMON_Port_cnt_t)*MAX_NUM_OF_PORTS); + memset(sVar_rx, 0, sizeof(GSW_Debug_RMON_Port_cnt_t)*MAX_NUM_OF_DISPLAY_PORTS); + memset(sVar_tx, 0, sizeof(GSW_Debug_RMON_Port_cnt_t)*MAX_NUM_OF_DISPLAY_PORTS); cnt += scanParamArg(argc, argv, "ePortType", sizeof(eCounerType), &eCounerType); + cnt += scanParamArg(argc, argv, "Start", sizeof(start), &start); + cnt += scanParamArg(argc, argv, "End", sizeof(end), &end); if (cnt != numPar) return (-2); + memset(¶m, 0, sizeof(GSW_cap_t)); + param.nCapType = GSW_CAP_TYPE_CTP; + + if (cli_ioctl(fd, GSW_CAP_GET, ¶m) != 0) { + printf("ioctl returned with ERROR!\n"); + return (-1); + } + + maxctp = param.nCap; + memset(¶m, 0, sizeof(GSW_cap_t)); + param.nCapType = GSW_CAP_TYPE_BRIDGE_PORT; + + if (cli_ioctl(fd, GSW_CAP_GET, ¶m) != 0) { + printf("ioctl returned with ERROR!\n"); + return (-1); + } + + maxbridge = param.nCap; + + if (eCounerType == 0 || eCounerType == 1) { + if (start >= maxctp) + start = maxctp - 1; + + if (end < start) + end = start; + else if (end >= maxctp) + end = maxctp - 1; + + } + + if (eCounerType == 2 || eCounerType == 3) { + if (start >= maxbridge) + start = maxbridge - 1; + + if (end < start) + end = start; + else if (end >= maxbridge) + end = maxbridge - 1; + } + + max_read = end - start; + + if (max_read >= MAX_NUM_OF_DISPLAY_PORTS) { + printf("\n\tWARNING: Display only 12 ports, please check start and end\n"); + return -1; + } + for (j = 0; j < 2; j++) { if (eCounerType == GSW_RMON_CTP_PORT_RX && j == 1) { eCounerType = GSW_RMON_CTP_PORT_TX; @@ -1840,16 +1996,28 @@ int gsw_debug_rmon_port_get_all(int argc, char *argv[], int fd, int numPar) eCounerType = GSW_RMON_BRIDGE_PORT_TX; } - if ((eCounerType == 0) || (eCounerType == 1)) + switch (eCounerType) { + case 0: + case 1: printf("Reading CTP Port %s Counters\n", j ? "Tx" : "Rx"); - else if ((eCounerType == 2) || (eCounerType == 3)) + break; + + case 2: + case 3: printf("Reading BRIDGE Port %s Counters\n", j ? "Tx" : "Rx"); - else if (eCounerType == 4) + break; + + case 4: printf("Reading Bypass-PCE Port Tx Counters\n"); + break; + + default: + break; + } if (j == 0) { // Getting RX port RMON - for (i = 0; i < MAX_NUM_OF_PORTS; i++) { - sVar_rx[i].nPortId = i; + for (i = 0; i <= max_read; i++) { + sVar_rx[i].nPortId = start + i; sVar_rx[i].ePortType = eCounerType; if (cli_ioctl(fd, GSW_DEBUG_RMON_PORT_GET, &sVar_rx[i]) != 0) { @@ -1858,8 +2026,8 @@ int gsw_debug_rmon_port_get_all(int argc, char *argv[], int fd, int numPar) } } } else { // Getting TX port RMON - for (i = 0; i < MAX_NUM_OF_PORTS; i++) { - sVar_tx[i].nPortId = i; + for (i = 0; i <= max_read; i++) { + sVar_tx[i].nPortId = start + i; sVar_tx[i].ePortType = eCounerType; if (cli_ioctl(fd, GSW_DEBUG_RMON_PORT_GET, &sVar_tx[i]) != 0) { @@ -1874,7 +2042,7 @@ int gsw_debug_rmon_port_get_all(int argc, char *argv[], int fd, int numPar) printf("Port : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = start; i <= end; i++) printf("%11u", i); printf("\n"); @@ -1884,91 +2052,91 @@ int gsw_debug_rmon_port_get_all(int argc, char *argv[], int fd, int numPar) printf("nRxGoodPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRxGoodPkts); printf("\n"); printf("nRxUnicastPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRxUnicastPkts); printf("\n"); printf("nRxBroadcastPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRxBroadcastPkts); printf("\n"); printf("nRxMulticastPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRxMulticastPkts); printf("\n"); printf("nRxFCSErrorPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRxFCSErrorPkts); printf("\n"); printf("nRxUnderSizeGoodPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRxUnderSizeGoodPkts); printf("\n"); printf("nRxOversizeGoodPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRxOversizeGoodPkts); printf("\n"); printf("nRxUnderSizeErrorPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRxUnderSizeErrorPkts); printf("\n"); printf("nRxOversizeErrorPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRxOversizeErrorPkts); printf("\n"); printf("nRxFilteredPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRxFilteredPkts); printf("\n"); printf("nRx64BytePkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRx64BytePkts); printf("\n"); printf("nRx127BytePkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRx127BytePkts); printf("\n"); printf("nRx255BytePkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRx255BytePkts); printf("\n"); @@ -1976,7 +2144,7 @@ int gsw_debug_rmon_port_get_all(int argc, char *argv[], int fd, int numPar) printf("nRx511BytePkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRx511BytePkts); printf("\n"); @@ -1984,14 +2152,14 @@ int gsw_debug_rmon_port_get_all(int argc, char *argv[], int fd, int numPar) printf("nRx1023BytePkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRx1023BytePkts); printf("\n"); printf("nRxMaxBytePkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRxMaxBytePkts); printf("\n"); @@ -1999,35 +2167,35 @@ int gsw_debug_rmon_port_get_all(int argc, char *argv[], int fd, int numPar) printf("nRxDroppedPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRxDroppedPkts); printf("\n"); printf("nRxExtendedVlanDiscardPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nRxExtendedVlanDiscardPkts); printf("\n"); printf("nMtuExceedDiscardPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_rx[i].nMtuExceedDiscardPkts); printf("\n"); printf("nRxGoodBytes : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", (u32)sVar_rx[i].nRxGoodBytes); printf("\n"); printf("nRxBadBytes : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", (u32)sVar_rx[i].nRxBadBytes); printf("\n"); @@ -2037,105 +2205,105 @@ int gsw_debug_rmon_port_get_all(int argc, char *argv[], int fd, int numPar) printf("nTxGoodPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_tx[i].nTxGoodPkts); printf("\n"); printf("nTxUnicastPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_tx[i].nTxUnicastPkts); printf("\n"); printf("nTxBroadcastPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_tx[i].nTxBroadcastPkts); printf("\n"); printf("nTxMulticastPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_tx[i].nTxMulticastPkts); printf("\n"); printf("nTx64BytePkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_tx[i].nTx64BytePkts); printf("\n"); printf("nTx127BytePkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_tx[i].nTx127BytePkts); printf("\n"); printf("nTx255BytePkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_tx[i].nTx255BytePkts); printf("\n"); printf("nTx511BytePkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_tx[i].nTx511BytePkts); printf("\n"); printf("nTx1023BytePkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_tx[i].nTx1023BytePkts); printf("\n"); printf("nTxMaxBytePkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_tx[i].nTxMaxBytePkts); printf("\n"); printf("nTxDroppedPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_tx[i].nTxDroppedPkts); printf("\n"); printf("nTxOversizeGoodPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_tx[i].nTxOversizeGoodPkts); printf("\n"); printf("nTxUnderSizeGoodPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_tx[i].nTxUnderSizeGoodPkts); printf("\n"); printf("nTxAcmDroppedPkts : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", sVar_tx[i].nTxAcmDroppedPkts); printf("\n"); printf("nTxGoodBytes : "); - for (i = 0; i < MAX_NUM_OF_PORTS; i++) + for (i = 0; i <= max_read; i++) printf("%11u", (u32)sVar_tx[i].nTxGoodBytes); printf("\n"); @@ -2144,7 +2312,7 @@ int gsw_debug_rmon_port_get_all(int argc, char *argv[], int fd, int numPar) } -int gsw_debug_rmon_port_get(int argc, char *argv[], int fd, int numPar) +int gsw_debug_rmon_port_get(int argc, char *argv[], void *fd, int numPar) { GSW_Debug_RMON_Port_cnt_t sVar; int cnt = 0; @@ -2188,6 +2356,16 @@ int gsw_debug_rmon_port_get(int argc, char *argv[], int fd, int numPar) printf("nRxGoodBytes : %llu (0x%llx)\n", (unsigned long long)sVar.nRxGoodBytes, (unsigned long long)sVar.nRxGoodBytes); printf("nRxBadBytes : %llu (0x%llx)\n", (unsigned long long)sVar.nRxBadBytes, (unsigned long long)sVar.nRxBadBytes); + /*Valid only for GSWIP3.2 */ + if (gswip_version == GSWIP_3_2) { + printf("nRxUnicastPktsYellowRed : %u\n", sVar.nRxUnicastPktsYellowRed); + printf("nRxBroadcastPktsYellowRed : %u\n", sVar.nRxBroadcastPktsYellowRed); + printf("nRxMulticastPktsYellowRed : %u\n", sVar.nRxMulticastPktsYellowRed); + printf("nRxGoodPktsYellowRed : %u\n", sVar.nRxGoodPktsYellowRed); + printf("nRxGoodBytesYellowRed : %llu (0x%llx)\n", (unsigned long long)sVar.nRxGoodBytesYellowRed, (unsigned long long)sVar.nRxGoodBytesYellowRed); + } + + printf("\n\n"); printf("nTxGoodPkts : %u\n", sVar.nTxGoodPkts); printf("nTxUnicastPkts : %u\n", sVar.nTxUnicastPkts); @@ -2205,11 +2383,23 @@ int gsw_debug_rmon_port_get(int argc, char *argv[], int fd, int numPar) printf("nTxAcmDroppedPkts : %u\n", sVar.nTxAcmDroppedPkts); printf("nTxGoodBytes : %llu (0x%llx)\n", (unsigned long long)sVar.nTxGoodBytes, (unsigned long long)sVar.nTxGoodBytes); + + /*Valid only for GSWIP3.2 */ + if (gswip_version == GSWIP_3_2) { + printf("nTxUnicastPktsYellowRed : %u\n", sVar.nTxUnicastPktsYellowRed); + printf("nTxBroadcastPktsYellowRed : %u\n", sVar.nTxBroadcastPktsYellowRed); + printf("nTxMulticastPktsYellowRed : %u\n", sVar.nTxMulticastPktsYellowRed); + printf("nTxGoodPktsYellowRed : %u\n", sVar.nTxGoodPktsYellowRed); + printf("nTxGoodBytesYellowRed : %llu (0x%llx)\n", (unsigned long long)sVar.nTxGoodBytesYellowRed, (unsigned long long)sVar.nTxGoodBytesYellowRed); + } + + + return 0; } -int gsw_rmon_port_get(int argc, char *argv[], int fd, int numPar) +int gsw_rmon_port_get(int argc, char *argv[], void *fd, int numPar) { GSW_RMON_Port_cnt_t sVar; int cnt = 0; @@ -2299,7 +2489,7 @@ int gsw_rmon_port_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_stp_bpdu_rule_get(int argc, char *argv[], int fd, int numPar) +int gsw_stp_bpdu_rule_get(int argc, char *argv[], void *fd, int numPar) { GSW_STP_BPDU_Rule_t param; memset(¶m, 0, sizeof(GSW_STP_BPDU_Rule_t)); @@ -2315,7 +2505,7 @@ int gsw_stp_bpdu_rule_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_stp_port_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_stp_port_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_STP_portCfg_t param; int cnt = 0; @@ -2337,7 +2527,7 @@ int gsw_stp_port_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_vlan_id_get(int argc, char *argv[], int fd, int numPar) +int gsw_vlan_id_get(int argc, char *argv[], void *fd, int numPar) { GSW_VLAN_IdGet_t param; int cnt = 0; @@ -2359,7 +2549,7 @@ int gsw_vlan_id_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_vlan_port_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_vlan_port_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_VLAN_portCfg_t param; int cnt = 0; @@ -2386,7 +2576,7 @@ int gsw_vlan_port_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_wol_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_wol_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_WoL_Cfg_t param; memset(¶m, 0, sizeof(GSW_WoL_Cfg_t)); @@ -2407,7 +2597,7 @@ int gsw_wol_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_wol_port_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_wol_port_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_WoL_PortCfg_t param; int cnt = 0; @@ -2429,7 +2619,7 @@ int gsw_wol_port_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_irq_get(int argc, char *argv[], int fd, int numPar) +int gsw_irq_get(int argc, char *argv[], void *fd, int numPar) { GSW_irq_t param; memset(¶m, 0, sizeof(GSW_irq_t)); @@ -2445,7 +2635,7 @@ int gsw_irq_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_irq_mask_get(int argc, char *argv[], int fd, int numPar) +int gsw_irq_mask_get(int argc, char *argv[], void *fd, int numPar) { GSW_irq_t param; memset(¶m, 0, sizeof(GSW_irq_t)); @@ -2461,7 +2651,7 @@ int gsw_irq_mask_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_register_get(int argc, char *argv[], int fd, int numPar) +int gsw_register_get(int argc, char *argv[], void *fd, int numPar) { GSW_register_t param; int cnt = 0; @@ -2482,7 +2672,7 @@ int gsw_register_get(int argc, char *argv[], int fd, int numPar) printHex32Value("nData", param.nData, 0); return 0; } -int gsw_trunking_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_trunking_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_trunkingCfg_t param; @@ -2499,7 +2689,7 @@ int gsw_trunking_cfg_get(int argc, char *argv[], int fd, int numPar) printHex32Value("bMAC_Dst", param.bMAC_Dst, 0); return 0; } -int gsw_trunking_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_trunking_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_trunkingCfg_t param; int cnt = 0; @@ -2518,7 +2708,7 @@ int gsw_trunking_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_TRUNKING_CFG_SET, ¶m); } -int gsw_trunking_port_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_trunking_port_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_trunkingPortCfg_t param; int cnt = 0; @@ -2539,7 +2729,7 @@ int gsw_trunking_port_cfg_get(int argc, char *argv[], int fd, int numPar) printHex32Value("nAggrPortId", param.nAggrPortId, 0); return 0; } -int gsw_trunking_port_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_trunking_port_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_trunkingPortCfg_t param; int cnt = 0; @@ -2563,7 +2753,7 @@ int gsw_trunking_port_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_TRUNKING_PORT_CFG_SET, ¶m); } -int gsw_qos_wred_port_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_wred_port_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_WRED_PortCfg_t param; int cnt = 0; @@ -2589,7 +2779,7 @@ int gsw_qos_wred_port_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_wred_port_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_wred_port_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_WRED_PortCfg_t param; int cnt = 0; @@ -2615,7 +2805,7 @@ int gsw_qos_wred_port_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_WRED_PORT_CFG_SET, ¶m); } -int gsw_qos_flowctrl_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_flowctrl_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_FlowCtrlCfg_t param; memset(¶m, 0, sizeof(GSW_QoS_FlowCtrlCfg_t)); @@ -2633,7 +2823,7 @@ int gsw_qos_flowctrl_cfg_get(int argc, char *argv[], int fd, int numPar) } -int gsw_qos_flowctrl_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_flowctrl_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_FlowCtrlCfg_t param; int cnt = 0; @@ -2653,7 +2843,7 @@ int gsw_qos_flowctrl_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_FLOWCTRL_CFG_SET, ¶m); } -int gsw_qos_flowctrl_port_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_flowctrl_port_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_FlowCtrlPortCfg_t param; int cnt = 0; @@ -2674,12 +2864,12 @@ int gsw_qos_flowctrl_port_cfg_get(int argc, char *argv[], int fd, int numPar) printHex32Value("nFlowCtrl_Max", param.nFlowCtrl_Max, 0); return 0; } -int gsw_qos_flowctrl_port_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_flowctrl_port_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_FlowCtrlPortCfg_t param; int cnt = 0; memset(¶m, 0, sizeof(GSW_QoS_FlowCtrlPortCfg_t)); - cnt += scanParamArg(argc, argv, "nPortId", sizeof(param.nPortId), ¶m.nPortId); + cnt += scanParamArg(argc, argv, "nPortId", 32, ¶m.nPortId); if (cnt != 1) return (-2); @@ -2698,7 +2888,7 @@ int gsw_qos_flowctrl_port_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_QOS_FLOWCTRL_PORT_CFG_SET, ¶m); } -int gsw_qos_queue_buffer_reserve_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_queue_buffer_reserve_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_QueueBufferReserveCfg_t param; int cnt = 0; @@ -2718,7 +2908,7 @@ int gsw_qos_queue_buffer_reserve_cfg_get(int argc, char *argv[], int fd, int num return 0; } -int gsw_qos_queue_buffer_reserve_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_queue_buffer_reserve_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_QueueBufferReserveCfg_t param; int cnt = 0; @@ -2743,7 +2933,7 @@ int gsw_qos_queue_buffer_reserve_cfg_set(int argc, char *argv[], int fd, int num } //#ifdef SWAPI_ETC_CHIP -int gsw_svlan_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_svlan_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_SVLAN_cfg_t param; @@ -2757,7 +2947,7 @@ int gsw_svlan_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_svlan_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_svlan_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_SVLAN_cfg_t param; @@ -2772,7 +2962,7 @@ int gsw_svlan_cfg_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_SVLAN_CFG_SET, ¶m); } -int gsw_svlan_port_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_svlan_port_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_SVLAN_portCfg_t param; @@ -2800,7 +2990,7 @@ int gsw_svlan_port_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_svlan_port_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_svlan_port_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_SVLAN_portCfg_t param; @@ -2829,7 +3019,7 @@ int gsw_svlan_port_cfg_set(int argc, char *argv[], int fd, int numPar) } -int gsw_qos_svlan_class_pcp_port_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_svlan_class_pcp_port_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_SVLAN_ClassPCP_PortCfg_t param; @@ -2865,7 +3055,7 @@ int gsw_qos_svlan_class_pcp_port_set(int argc, char *argv[], int fd, int numPar) } -int gsw_qos_svlan_class_pcp_port_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_svlan_class_pcp_port_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_SVLAN_ClassPCP_PortCfg_t param; int cnt = 0, i; @@ -2890,7 +3080,7 @@ int gsw_qos_svlan_class_pcp_port_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_svlan_pcp_class_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_svlan_pcp_class_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_SVLAN_PCP_ClassCfg_t param; @@ -2925,7 +3115,7 @@ int gsw_qos_svlan_pcp_class_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_svlan_pcp_class_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_svlan_pcp_class_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_SVLAN_PCP_ClassCfg_t param; int i; @@ -2942,7 +3132,7 @@ int gsw_qos_svlan_pcp_class_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_pce_eg_vlan_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_pce_eg_vlan_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_PCE_EgVLAN_Cfg_t param; unsigned int cnt = 0; @@ -2961,7 +3151,7 @@ int gsw_pce_eg_vlan_cfg_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_pce_eg_vlan_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_pce_eg_vlan_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_PCE_EgVLAN_Cfg_t param; unsigned int cnt = 0; @@ -2982,7 +3172,7 @@ int gsw_pce_eg_vlan_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_pce_eg_vlan_entry_write(int argc, char *argv[], int fd, int numPar) +int gsw_pce_eg_vlan_entry_write(int argc, char *argv[], void *fd, int numPar) { GSW_PCE_EgVLAN_Entry_t param; unsigned int cnt = 0; @@ -3007,7 +3197,7 @@ int gsw_pce_eg_vlan_entry_write(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_pce_eg_vlan_entry_read(int argc, char *argv[], int fd, int numPar) +int gsw_pce_eg_vlan_entry_read(int argc, char *argv[], void *fd, int numPar) { GSW_PCE_EgVLAN_Entry_t param; unsigned int cnt = 0; @@ -3033,7 +3223,7 @@ int gsw_pce_eg_vlan_entry_read(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_pmac_bm_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_pmac_bm_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_PMAC_BM_Cfg_t param; unsigned int cnt = 0; @@ -3053,7 +3243,7 @@ int gsw_pmac_bm_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_pmac_bm_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_pmac_bm_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_PMAC_BM_Cfg_t param; unsigned int cnt = 0; @@ -3072,7 +3262,7 @@ int gsw_pmac_bm_cfg_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_pmac_eg_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_pmac_eg_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_PMAC_Eg_Cfg_t param; unsigned int cnt = 0; @@ -3122,7 +3312,7 @@ int gsw_pmac_eg_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_pmac_eg_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_pmac_eg_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_PMAC_Eg_Cfg_t param; unsigned int cnt = 0; @@ -3162,7 +3352,7 @@ int gsw_pmac_eg_cfg_set(int argc, char *argv[], int fd, int numPar) return 0; } #if 0 -int gsw_pmac_eg_count_get(int argc, char *argv[], int fd, int numPar) +int gsw_pmac_eg_count_get(int argc, char *argv[], void *fd, int numPar) { GSW_PMAC_Eg_Cnt_t param; unsigned int cnt = 0; @@ -3181,7 +3371,7 @@ int gsw_pmac_eg_count_get(int argc, char *argv[], int fd, int numPar) return 0; } #endif -int gsw_pmac_ig_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_pmac_ig_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_PMAC_Ig_Cfg_t param; unsigned int cnt = 0; @@ -3219,7 +3409,7 @@ int gsw_pmac_ig_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_pmac_ig_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_pmac_ig_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_PMAC_Ig_Cfg_t param; unsigned int cnt = 0; @@ -3245,7 +3435,7 @@ int gsw_pmac_ig_cfg_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_pmac_count_get(int argc, char *argv[], int fd, int numPar) +int gsw_pmac_count_get(int argc, char *argv[], void *fd, int numPar) { GSW_PMAC_Cnt_t param; unsigned int cnt = 0; @@ -3267,7 +3457,7 @@ int gsw_pmac_count_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_rmon_mode_set(int argc, char *argv[], int fd, int numPar) +int gsw_rmon_mode_set(int argc, char *argv[], void *fd, int numPar) { GSW_RMON_mode_t param; unsigned int cnt = 0; @@ -3285,7 +3475,7 @@ int gsw_rmon_mode_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_rmon_if_get(int argc, char *argv[], int fd, int numPar) +int gsw_rmon_if_get(int argc, char *argv[], void *fd, int numPar) { GSW_RMON_If_cnt_t param; unsigned int cnt = 0; @@ -3311,7 +3501,7 @@ int gsw_rmon_if_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_rmon_redirect_get(int argc, char *argv[], int fd, int numPar) +int gsw_rmon_redirect_get(int argc, char *argv[], void *fd, int numPar) { GSW_RMON_Redirect_cnt_t param; @@ -3332,7 +3522,7 @@ int gsw_rmon_redirect_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_rmon_route_get(int argc, char *argv[], int fd, int numPar) +int gsw_rmon_route_get(int argc, char *argv[], void *fd, int numPar) { GSW_RMON_Route_cnt_t param; unsigned int cnt = 0; @@ -3365,7 +3555,7 @@ int gsw_rmon_route_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_rmon_meter_get(int argc, char *argv[], int fd, int numPar) +int gsw_rmon_meter_get(int argc, char *argv[], void *fd, int numPar) { GSW_RMON_Meter_cnt_t param; unsigned int cnt = 0; @@ -3389,7 +3579,7 @@ int gsw_rmon_meter_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_rmon_flow_get(int argc, char *argv[], int fd, int numPar) +int gsw_rmon_flow_get(int argc, char *argv[], void *fd, int numPar) { GSW_RMON_flowGet_t param; unsigned int cnt = 0; @@ -3415,7 +3605,7 @@ int gsw_rmon_flow_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_rmon_tflow_clear(int argc, char *argv[], int fd, int numPar) +int gsw_rmon_tflow_clear(int argc, char *argv[], void *fd, int numPar) { GSW_RMON_flowGet_t sVar; unsigned int cnt = 0; @@ -3435,7 +3625,7 @@ int gsw_rmon_tflow_clear(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_meter_act(int argc, char *argv[], int fd, int numPar) +int gsw_qos_meter_act(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_mtrAction_t param; unsigned int cnt = 0; @@ -3459,7 +3649,7 @@ int gsw_qos_meter_act(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_pmac_glbl_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_pmac_glbl_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_PMAC_Glbl_Cfg_t param; unsigned int cnt = 0; @@ -3498,7 +3688,7 @@ int gsw_pmac_glbl_cfg_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_pmac_glbl_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_pmac_glbl_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_PMAC_Glbl_Cfg_t param; unsigned int cnt = 0, i = 0; @@ -3535,7 +3725,7 @@ int gsw_pmac_glbl_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_ctp_port_alloc(int argc, char *argv[], int fd, int numPar) +int gsw_ctp_port_alloc(int argc, char *argv[], void *fd, int numPar) { GSW_CTP_portAssignment_t sVar; unsigned int cnt = 0; @@ -3555,7 +3745,7 @@ int gsw_ctp_port_alloc(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_ctp_port_free(int argc, char *argv[], int fd, int numPar) +int gsw_ctp_port_free(int argc, char *argv[], void *fd, int numPar) { GSW_CTP_portAssignment_t sVar; unsigned int cnt = 0; @@ -3572,7 +3762,7 @@ int gsw_ctp_port_free(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_ctp_port_assigment_set(int argc, char *argv[], int fd, int numPar) +int gsw_ctp_port_assigment_set(int argc, char *argv[], void *fd, int numPar) { GSW_CTP_portAssignment_t sVar; unsigned int cnt = 0; @@ -3592,7 +3782,7 @@ int gsw_ctp_port_assigment_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_ctp_port_assigment_get(int argc, char *argv[], int fd, int numPar) +int gsw_ctp_port_assigment_get(int argc, char *argv[], void *fd, int numPar) { GSW_CTP_portAssignment_t sVar; unsigned int cnt = 0; @@ -3618,7 +3808,7 @@ int gsw_ctp_port_assigment_get(int argc, char *argv[], int fd, int numPar) } -int gsw_extendedvlan_alloc(int argc, char *argv[], int fd, int numPar) +int gsw_extendedvlan_alloc(int argc, char *argv[], void *fd, int numPar) { GSW_EXTENDEDVLAN_alloc_t sVar; unsigned int cnt = 0; @@ -3639,7 +3829,7 @@ int gsw_extendedvlan_alloc(int argc, char *argv[], int fd, int numPar) } -int gsw_vlanfilter_alloc(int argc, char *argv[], int fd, int numPar) +int gsw_vlanfilter_alloc(int argc, char *argv[], void *fd, int numPar) { GSW_VLANFILTER_alloc_t sVar; unsigned int cnt = 0; @@ -3662,7 +3852,7 @@ int gsw_vlanfilter_alloc(int argc, char *argv[], int fd, int numPar) } -int gsw_extendedvlan_config_set(int argc, char *argv[], int fd, int numPar) +int gsw_extendedvlan_config_set(int argc, char *argv[], void *fd, int numPar) { GSW_EXTENDEDVLAN_config_t sVar; unsigned int cnt = 0; @@ -3732,6 +3922,10 @@ int gsw_extendedvlan_config_set(int argc, char *argv[], int fd, int numPar) sVar.sTreatment.nDscp2PcpMap[f] = nDscp2PcpMapValue; } + cnt += scanParamArg(argc, argv, "bOriginalPacketFilterMode", sizeof(sVar.sFilter.bOriginalPacketFilterMode), &sVar.sFilter.bOriginalPacketFilterMode); + cnt += scanParamArg(argc, argv, "eFilter_4_Tpid_Mode", sizeof(sVar.sFilter.eFilter_4_Tpid_Mode), &sVar.sFilter.eFilter_4_Tpid_Mode); + cnt += scanParamArg(argc, argv, "eTreatment_4_Tpid_Mode", sizeof(sVar.sTreatment.eTreatment_4_Tpid_Mode), &sVar.sTreatment.eTreatment_4_Tpid_Mode); + if (cnt != numPar) return (-2); @@ -3741,7 +3935,7 @@ int gsw_extendedvlan_config_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_extendedvlan_config_get(int argc, char *argv[], int fd, int numPar) +int gsw_extendedvlan_config_get(int argc, char *argv[], void *fd, int numPar) { GSW_EXTENDEDVLAN_config_t sVar; unsigned int cnt = 0; @@ -3817,10 +4011,17 @@ int gsw_extendedvlan_config_get(int argc, char *argv[], int fd, int numPar) printf("\n\t nDscp2PcpMap[%d] = %u", f, sVar.sTreatment.nDscp2PcpMap[f]); } + cnt += scanParamArg(argc, argv, "bOriginalPacketFilterMode", sizeof(sVar.sFilter.bOriginalPacketFilterMode), &sVar.sFilter.bOriginalPacketFilterMode); + cnt += scanParamArg(argc, argv, "eFilter_4_Tpid_Mode", sizeof(sVar.sFilter.eFilter_4_Tpid_Mode), &sVar.sFilter.eFilter_4_Tpid_Mode); + cnt += scanParamArg(argc, argv, "eTreatment_4_Tpid_Mode", sizeof(sVar.sTreatment.eTreatment_4_Tpid_Mode), &sVar.sTreatment.eTreatment_4_Tpid_Mode); + printf("\n\t bOriginalPacketFilterMode = %u", sVar.sFilter.bOriginalPacketFilterMode); + printf("\n\t eFilter_4_Tpid_Mode = %u", sVar.sFilter.eFilter_4_Tpid_Mode); + printf("\n\t eTreatment_4_Tpid_Mode = %u", sVar.sTreatment.eTreatment_4_Tpid_Mode); + return 0; } -int gsw_extendedvlan_free(int argc, char *argv[], int fd, int numPar) +int gsw_extendedvlan_free(int argc, char *argv[], void *fd, int numPar) { GSW_EXTENDEDVLAN_alloc_t sVar; unsigned int cnt = 0; @@ -3839,7 +4040,7 @@ int gsw_extendedvlan_free(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_vlanfilter_config_set(int argc, char *argv[], int fd, int numPar) +int gsw_vlanfilter_config_set(int argc, char *argv[], void *fd, int numPar) { GSW_VLANFILTER_config_t sVar; unsigned int cnt = 0; @@ -3860,7 +4061,7 @@ int gsw_vlanfilter_config_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_vlanfilter_config_get(int argc, char *argv[], int fd, int numPar) +int gsw_vlanfilter_config_get(int argc, char *argv[], void *fd, int numPar) { GSW_VLANFILTER_config_t sVar; unsigned int cnt = 0; @@ -3884,7 +4085,7 @@ int gsw_vlanfilter_config_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_vlanfilter_free(int argc, char *argv[], int fd, int numPar) +int gsw_vlanfilter_free(int argc, char *argv[], void *fd, int numPar) { GSW_VLANFILTER_alloc_t sVar; unsigned int cnt = 0; @@ -3903,7 +4104,7 @@ int gsw_vlanfilter_free(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_bridge_config_set(int argc, char *argv[], int fd, int numPar) +int gsw_bridge_config_set(int argc, char *argv[], void *fd, int numPar) { GSW_BRIDGE_config_t sVar; unsigned int cnt = 0; @@ -3987,7 +4188,7 @@ int gsw_bridge_config_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_bridge_config_get(int argc, char *argv[], int fd, int numPar) +int gsw_bridge_config_get(int argc, char *argv[], void *fd, int numPar) { GSW_BRIDGE_config_t sVar; unsigned int cnt = 0; @@ -4032,7 +4233,7 @@ int gsw_bridge_config_get(int argc, char *argv[], int fd, int numPar) } -int gsw_bridge_alloc(int argc, char *argv[], int fd, int numPar) +int gsw_bridge_alloc(int argc, char *argv[], void *fd, int numPar) { GSW_BRIDGE_alloc_t sVar; memset(&sVar, 0x00, sizeof(sVar)); @@ -4045,7 +4246,7 @@ int gsw_bridge_alloc(int argc, char *argv[], int fd, int numPar) } -int gsw_bridge_free(int argc, char *argv[], int fd, int numPar) +int gsw_bridge_free(int argc, char *argv[], void *fd, int numPar) { GSW_BRIDGE_alloc_t sVar; unsigned int cnt = 0; @@ -4062,10 +4263,10 @@ int gsw_bridge_free(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_ctp_port_config_set(int argc, char *argv[], int fd, int numPar) +int gsw_ctp_port_config_set(int argc, char *argv[], void *fd, int numPar) { GSW_CTP_portConfig_t sVar; - unsigned int cnt = 0, i; + unsigned int cnt = 0, i, j; memset(&sVar, 0x00, sizeof(sVar)); cnt += scanParamArg(argc, argv, "nLogicalPortId", sizeof(sVar.nLogicalPortId), &sVar.nLogicalPortId); @@ -4231,7 +4432,7 @@ int gsw_ctp_port_config_set(int argc, char *argv[], int fd, int numPar) } -int gsw_ctp_port_config_get(int argc, char *argv[], int fd, int numPar) +int gsw_ctp_port_config_get(int argc, char *argv[], void *fd, int numPar) { GSW_CTP_portConfig_t sVar; unsigned int cnt = 0, i; @@ -4301,7 +4502,7 @@ int gsw_ctp_port_config_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_ctp_port_config_reset(int argc, char *argv[], int fd, int numPar) +int gsw_ctp_port_config_reset(int argc, char *argv[], void *fd, int numPar) { GSW_CTP_portConfig_t sVar; unsigned int cnt = 0; @@ -4324,10 +4525,10 @@ int gsw_ctp_port_config_reset(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_bridge_port_config_set(int argc, char *argv[], int fd, int numPar) +int gsw_bridge_port_config_set(int argc, char *argv[], void *fd, int numPar) { GSW_BRIDGE_portConfig_t sVar; - unsigned int cnt = 0, i, bBridgePortMapEnable = 0, Index = 0, MapValue = 0; + unsigned int cnt = 0, i, j, bBridgePortMapEnable = 0, Index = 0, MapValue = 0; memset(&sVar, 0x00, sizeof(sVar)); cnt += scanParamArg(argc, argv, "nBridgePortId", sizeof(sVar.nBridgePortId), &sVar.nBridgePortId); @@ -4522,7 +4723,7 @@ int gsw_bridge_port_config_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_bridge_port_config_get(int argc, char *argv[], int fd, int numPar) +int gsw_bridge_port_config_get(int argc, char *argv[], void *fd, int numPar) { GSW_BRIDGE_portConfig_t sVar; unsigned int cnt = 0, i; @@ -4597,7 +4798,7 @@ int gsw_bridge_port_config_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_bridge_port_alloc(int argc, char *argv[], int fd, int numPar) +int gsw_bridge_port_alloc(int argc, char *argv[], void *fd, int numPar) { GSW_BRIDGE_portAlloc_t sVar; unsigned int cnt = 0; @@ -4613,7 +4814,7 @@ int gsw_bridge_port_alloc(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_bridge_port_free(int argc, char *argv[], int fd, int numPar) +int gsw_bridge_port_free(int argc, char *argv[], void *fd, int numPar) { GSW_BRIDGE_portAlloc_t sVar; unsigned int cnt = 0; @@ -4630,7 +4831,144 @@ int gsw_bridge_port_free(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_pmac_rmon_get(int argc, char *argv[], int fd, int numPar) +int gsw_debug_pmac_rmon_get_all(int argc, char *argv[], void *fd, int numPar) +{ + GSW_PMAC_Cnt_t eg[16]; + GSW_PMAC_Cnt_t ig[16]; + u32 i = 0, j = 0, cnt = 0; + u32 start = 0, end = 12; + u32 max_read = 0; + u8 pmacId = 0; + + cnt += scanParamArg(argc, argv, "nPmacId", sizeof(pmacId), &pmacId); + cnt += scanParamArg(argc, argv, "Start", sizeof(start), &start); + cnt += scanParamArg(argc, argv, "End", sizeof(end), &end); + + memset(eg, 0, sizeof(GSW_PMAC_Cnt_t) * 16); + memset(ig, 0, sizeof(GSW_PMAC_Cnt_t) * 16); + + max_read = end - start; + + if (max_read > 16 || end > 16) { + printf("Display only 16 ports, please check start and end\n"); + return -1; + } + + printf("\n"); + + for (j = 0; j < 2; j++) { + + printf("Reading PmacId %d: %s\n", pmacId, (j == 0) ? "Egress" : "Ingress"); + + if (j == 0) { // Getting Egress Pmac rmon + for (i = 0; i < max_read; i++) { + eg[i].nPmacId = pmacId; + eg[i].nTxDmaChanId = start + i; + + if (cli_ioctl(fd, GSW_PMAC_COUNT_GET, &eg[i]) != 0) { + printf("ioctl returned with ERROR!\n"); + return (-1); + } + } + } else { // Getting Ingress Pmac rmon + for (i = 0; i < max_read; i++) { + ig[i].nPmacId = pmacId; + ig[i].nTxDmaChanId = start + i; + + if (cli_ioctl(fd, GSW_PMAC_COUNT_GET, &ig[i]) != 0) { + printf("ioctl returned with ERROR!\n"); + return (-1); + } + } + } + } + + printf("\n"); + + printf("Rx Logical Port : "); + + for (i = start; i < end; i++) + printf("%11u", i); + + printf("\n"); + printf("\n"); + + printf("Egress Checksum Error Packet Count : "); + + for (i = 0; i < max_read; i++) + printf("%11u", eg[i].nChkSumErrPktsCount); + + printf("\n"); + + printf("Egress Checksum Error Byte Count : "); + + for (i = 0; i < max_read; i++) + printf("%11u", eg[i].nChkSumErrBytesCount); + + printf("\n"); + + printf("Egress Total Packet Count : "); + + for (i = 0; i < max_read; i++) + printf("%11u", eg[i].nEgressPktsCount); + + printf("\n"); + + printf("Egress Total Byte Count : "); + + for (i = 0; i < max_read; i++) + printf("%11u", eg[i].nEgressBytesCount); + + printf("\n"); + + + + printf("\n"); + printf("\n"); + + printf("DMA TxCh : "); + + for (i = start; i < end; i++) + printf("%11u", i); + + printf("\n"); + printf("\n"); + + printf("Ingress Discard Packet Count : "); + + for (i = 0; i < max_read; i++) + printf("%11u", ig[i].nDiscPktsCount); + + printf("\n"); + + printf("Ingress Discard Byte Count : "); + + for (i = 0; i < max_read; i++) + printf("%11u", ig[i].nDiscBytesCount); + + printf("\n"); + + printf("Ingress Total Packet Count : "); + + for (i = 0; i < max_read; i++) + printf("%11u", ig[i].nIngressPktsCount); + + printf("\n"); + + printf("Ingress Total Byte Count : "); + + for (i = 0; i < max_read; i++) + printf("%11u", ig[i].nIngressBytesCount); + + printf("\n"); + + + + return 0; +} + + +int gsw_pmac_rmon_get(int argc, char *argv[], void *fd, int numPar) { GSW_PMAC_Cnt_t sVar; unsigned int cnt = 0; @@ -4656,12 +4994,18 @@ int gsw_pmac_rmon_get(int argc, char *argv[], int fd, int numPar) printf("\t Ingress Total Byte Count = %u\n", sVar.nIngressBytesCount); printf("\t Egress Total Packet Count = %u\n", sVar.nEgressPktsCount); printf("\t Egress Total Byte Count = %u\n", sVar.nEgressBytesCount); + printf("\t Ingress Header Packet Count = %u\n", sVar.nIngressHdrPktsCount); + printf("\t Ingress Header Byte Count = %u\n", sVar.nIngressHdrBytesCount); + printf("\t Egress Header Packet Count = %u\n", sVar.nEgressHdrPktsCount); + printf("\t Egress Header Byte Count = %u\n", sVar.nEgressHdrBytesCount); + printf("\t Egress Header Discard Packet Count = %u\n", sVar.nEgressHdrDiscPktsCount); + printf("\t Egress Header Discard Byte Count = %u\n", sVar.nEgressHdrDiscBytesCount); return 0; } -int gsw_debug_ctpstatistics(int argc, char *argv[], int fd, int numPar) +int gsw_debug_ctpstatistics(int argc, char *argv[], void *fd, int numPar) { GSW_debug_t sVar; unsigned int cnt = 0; @@ -4678,17 +5022,77 @@ int gsw_debug_ctpstatistics(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_debug_lpstatistics(int argc, char *argv[], int fd, int numPar) +int gsw_debug_lpstatistics(int argc, char *argv[], void *fd, int numPar) { - GSW_debug_t sVar; + u32 i = 0, j = 0, k = 0; + u32 first_port = 0, no_port = 0; + GSW_CTP_portAssignment_t Assign_get; + static GSW_CTP_portConfig_t CTP_get; + static GSW_BRIDGE_portConfig_t BP_get; - if (cli_ioctl(fd, GSW_DEBUG_LP_STATISTICS, &sVar) != 0) - return (-1); + memset(&Assign_get, 0x00, sizeof(Assign_get)); + memset(&CTP_get, 0x00, sizeof(CTP_get)); + memset(&BP_get, 0x00, sizeof(BP_get)); + + printf("\n\n"); + printf("\t\t----------------------------------------\n"); + printf("\t\t\t LOGICAL PORT Statistics\n"); + printf("\t\t----------------------------------------\n"); + + for (j = 0; j < 12; j++) { + Assign_get.nLogicalPortId = j; + + if (cli_ioctl(fd, GSW_CTP_PORT_ASSIGNMENT_GET, &Assign_get) != 0) { + printf("GSW_CTP_PortAssignmentGet returns ERROR\n"); + return (-1); + } + + printf("\n"); + printf("\n------ Logical Port %u Configuration ------\n", j); + printf("\n\t nLogicalPortId = %u", Assign_get.nLogicalPortId); + printf("\n\t nFirstCtpPortId = %u", Assign_get.nFirstCtpPortId); + printf("\n\t nNumberOfCtpPort = %u", Assign_get.nNumberOfCtpPort); + printf("\n\t eMode = %u", Assign_get.eMode); + printf("\n\n\t The Following CTP Ports are associated with Logical port %u :", j); + + first_port = Assign_get.nFirstCtpPortId; + no_port = Assign_get.nNumberOfCtpPort; + + for (i = first_port, k = 0; i < (first_port + no_port); i++, k++) { + CTP_get.nLogicalPortId = j; + CTP_get.nSubIfIdGroup = k; + CTP_get.eMask = 0xffffffff; + + if (cli_ioctl(fd, GSW_CTP_PORT_CONFIG_GET, &CTP_get) != 0) { + printf("GSW_CTP_PORT_CONFIG_GET returns ERROR\n"); + return (-1); + } + + BP_get.nBridgePortId = CTP_get.nBridgePortId; + BP_get.eMask = 0xffffffff; + + if (cli_ioctl(fd, GSW_BRIDGE_PORT_CONFIG_GET, &BP_get) != 0) { + printf("GSW_BRIDGE_PORT_CONFIG_GET returns ERROR\n"); + return (-1); + } + + if (i == 287) + printf("\n\t\t %u. CTP Ports %u is Default Port--Dummy port (connected to)--> Bridge port %u (Bridge/Fid = %u)\n", + (k + 1), i, CTP_get.nBridgePortId, BP_get.nBridgeId); + else + printf("\n\t\t %u. CTP Ports %u (connected to)--> Bridge port %u (Bridge/Fid = %u)\n", + (k + 1), i, CTP_get.nBridgePortId, BP_get.nBridgeId); + } + } + + printf("\n\n"); + printf("To Get individual CTP port's statistics, Please use following command :\n"); + printf("switch_cli GSW_DEBUG_CTP_STATISTICS Index=CTP_PORT_INDEX --> example: 0 to 287\n"); return 0; } -int gsw_debug_ctptablestatus(int argc, char *argv[], int fd, int numPar) +int gsw_debug_ctptablestatus(int argc, char *argv[], void *fd, int numPar) { GSW_debug_t sVar; unsigned int cnt = 0; @@ -4708,7 +5112,7 @@ int gsw_debug_ctptablestatus(int argc, char *argv[], int fd, int numPar) } -int gsw_debug_bridgeporttablestatus(int argc, char *argv[], int fd, int numPar) +int gsw_debug_bridgeporttablestatus(int argc, char *argv[], void *fd, int numPar) { GSW_debug_t sVar; unsigned int cnt = 0; @@ -4727,8 +5131,28 @@ int gsw_debug_bridgeporttablestatus(int argc, char *argv[], int fd, int numPar) return 0; } +int gsw_debug_tunneltemptablestatus(int argc, char *argv[], void *fd, int numPar) +{ + GSW_debug_t sVar; + unsigned int cnt = 0; + memset(&sVar, 0x00, sizeof(sVar)); -int gsw_debug_bridgetablestatus(int argc, char *argv[], int fd, int numPar) + cnt += scanParamArg(argc, argv, "Index", sizeof(sVar.nTableIndex), &sVar.nTableIndex); + cnt += scanParamArg(argc, argv, "Set", sizeof(sVar.nForceSet), &sVar.nForceSet); + cnt += scanParamArg(argc, argv, "CheckAll", sizeof(sVar.nCheckIndexInUse), &sVar.nCheckIndexInUse); + + if (cnt != numPar) + return (-2); + + if (gswip_version == GSWIP_3_2) { + if (cli_ioctl(fd, GSW_DEBUG_TUNNELTEMP_STATUS, &sVar) != 0) + return (-1); + } + + return 0; +} + +int gsw_debug_bridgetablestatus(int argc, char *argv[], void *fd, int numPar) { GSW_debug_t sVar; unsigned int cnt = 0; @@ -4747,7 +5171,7 @@ int gsw_debug_bridgetablestatus(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_debug_Exvlantablestatus(int argc, char *argv[], int fd, int numPar) +int gsw_debug_Exvlantablestatus(int argc, char *argv[], void *fd, int numPar) { GSW_debug_t sVar; unsigned int cnt = 0; @@ -4767,7 +5191,7 @@ int gsw_debug_Exvlantablestatus(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_debug_VlanFiltertablestatus(int argc, char *argv[], int fd, int numPar) +int gsw_debug_VlanFiltertablestatus(int argc, char *argv[], void *fd, int numPar) { GSW_debug_t sVar; unsigned int cnt = 0; @@ -4789,7 +5213,7 @@ int gsw_debug_VlanFiltertablestatus(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_debug_Metertablestatus(int argc, char *argv[], int fd, int numPar) +int gsw_debug_Metertablestatus(int argc, char *argv[], void *fd, int numPar) { GSW_debug_t sVar; unsigned int cnt = 0; @@ -4808,7 +5232,7 @@ int gsw_debug_Metertablestatus(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_debug_Dscp2Pcptablestatus(int argc, char *argv[], int fd, int numPar) +int gsw_debug_Dscp2Pcptablestatus(int argc, char *argv[], void *fd, int numPar) { GSW_debug_t sVar; unsigned int cnt = 0; @@ -4826,7 +5250,7 @@ int gsw_debug_Dscp2Pcptablestatus(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_debug_Pmappertablestatus(int argc, char *argv[], int fd, int numPar) +int gsw_debug_Pmappertablestatus(int argc, char *argv[], void *fd, int numPar) { GSW_debug_t sVar; unsigned int cnt = 0; @@ -4846,7 +5270,7 @@ int gsw_debug_Pmappertablestatus(int argc, char *argv[], int fd, int numPar) } -int gsw_irq_register(int argc, char *argv[], int fd, int numPar) +int gsw_irq_register(int argc, char *argv[], void *fd, int numPar) { GSW_Irq_Op_t sVar; unsigned int cnt = 0; @@ -4867,7 +5291,7 @@ int gsw_irq_register(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_irq_unregister(int argc, char *argv[], int fd, int numPar) +int gsw_irq_unregister(int argc, char *argv[], void *fd, int numPar) { GSW_Irq_Op_t sVar; unsigned int cnt = 0; @@ -4886,7 +5310,7 @@ int gsw_irq_unregister(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_irq_enable(int argc, char *argv[], int fd, int numPar) +int gsw_irq_enable(int argc, char *argv[], void *fd, int numPar) { GSW_Irq_Op_t sVar; unsigned int cnt = 0; @@ -4905,7 +5329,7 @@ int gsw_irq_enable(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_irq_disable(int argc, char *argv[], int fd, int numPar) +int gsw_irq_disable(int argc, char *argv[], void *fd, int numPar) { GSW_Irq_Op_t sVar; unsigned int cnt = 0; @@ -4924,8 +5348,9 @@ int gsw_irq_disable(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_debug_PrintPceIrqList(int argc, char *argv[], int fd, int numPar) +int gsw_debug_PrintPceIrqList(int argc, char *argv[], void *fd, int numPar) { + unsigned int cnt = 0; if (cli_ioctl(fd, GSW_DEBUG_PRINT_PCEIRQ_LIST, 0) != 0) return (-1); @@ -4934,7 +5359,7 @@ int gsw_debug_PrintPceIrqList(int argc, char *argv[], int fd, int numPar) } -int gsw_debug_pmac_eg(int argc, char *argv[], int fd, int numPar) +int gsw_debug_pmac_eg(int argc, char *argv[], void *fd, int numPar) { GSW_debug_t sVar; unsigned int cnt = 0; @@ -4952,7 +5377,7 @@ int gsw_debug_pmac_eg(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_debug_pmac_bp(int argc, char *argv[], int fd, int numPar) +int gsw_debug_pmac_bp(int argc, char *argv[], void *fd, int numPar) { GSW_debug_t sVar; unsigned int cnt = 0; @@ -4969,7 +5394,7 @@ int gsw_debug_pmac_bp(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_debug_pmac_ig(int argc, char *argv[], int fd, int numPar) +int gsw_debug_pmac_ig(int argc, char *argv[], void *fd, int numPar) { GSW_debug_t sVar; unsigned int cnt = 0; @@ -4986,7 +5411,7 @@ int gsw_debug_pmac_ig(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_debug_def_pce_qmap(int argc, char *argv[], int fd, int numPar) +int gsw_debug_def_pce_qmap(int argc, char *argv[], void *fd, int numPar) { GSW_debug_t sVar; unsigned int cnt = 0; @@ -5001,7 +5426,7 @@ int gsw_debug_def_pce_qmap(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_debug_def_byp_qmap(int argc, char *argv[], int fd, int numPar) +int gsw_debug_def_byp_qmap(int argc, char *argv[], void *fd, int numPar) { GSW_debug_t sVar; unsigned int cnt = 0; @@ -5016,43 +5441,25 @@ int gsw_debug_def_byp_qmap(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_xgmac_cli(int argc, char *argv[], int fd, int numPar) +int gsw_xgmac_cli(int argc, char *argv[], void *fd, int numPar) { - GSW_MAC_cfg_t sVar; - unsigned int cnt = 0; - - memset(&sVar, 0x00, sizeof(sVar)); - sVar.argc = argc; - - for (cnt = 0; cnt < argc; cnt++) { - strcpy((char *)sVar.argv[cnt], argv[cnt]); - } - - if (cli_ioctl(fd, GSW_XGMAC_CFG, &sVar) != 0) - return (-1); - + xgmac_main(argc, argv, fd); return 0; } -int gsw_gswss_cli(int argc, char *argv[], int fd, int numPar) +int gsw_gswss_cli(int argc, char *argv[], void *fd, int numPar) { - GSW_MAC_cfg_t sVar; - unsigned int cnt = 0; - - memset(&sVar, 0x00, sizeof(sVar)); - sVar.argc = argc; - - for (cnt = 0; cnt < argc; cnt++) { - strcpy((char *)sVar.argv[cnt], argv[cnt]); - } - - if (cli_ioctl(fd, GSW_GSWSS_CFG, &sVar) != 0) - return (-1); + gswss_main(argc, argv, fd); + return 0; +} +int gsw_lmac_cli(int argc, char *argv[], void *fd, int numPar) +{ + lmac_main(argc, argv, fd); return 0; } -int gsw_lmac_cli(int argc, char *argv[], int fd, int numPar) +int gsw_macsec_cli(int argc, char *argv[], void *fd, int numPar) { GSW_MAC_cfg_t sVar; unsigned int cnt = 0; @@ -5064,13 +5471,13 @@ int gsw_lmac_cli(int argc, char *argv[], int fd, int numPar) strcpy((char *)sVar.argv[cnt], argv[cnt]); } - if (cli_ioctl(fd, GSW_LMAC_CFG, &sVar) != 0) + if (cli_ioctl(fd, GSW_MACSEC_CFG, &sVar) != 0) return (-1); return 0; } -int gsw_macsec_cli(int argc, char *argv[], int fd, int numPar) +int gsw_pmacbr_cli(int argc, char *argv[], void *fd, int numPar) { GSW_MAC_cfg_t sVar; unsigned int cnt = 0; @@ -5082,7 +5489,7 @@ int gsw_macsec_cli(int argc, char *argv[], int fd, int numPar) strcpy((char *)sVar.argv[cnt], argv[cnt]); } - if (cli_ioctl(fd, GSW_MACSEC_CFG, &sVar) != 0) + if (cli_ioctl(fd, GSW_PMACBR_CFG, &sVar) != 0) return (-1); return 0; @@ -5255,10 +5662,10 @@ static const gsw_pce_tbl_t gsw_pmac_tbl[] = { {0, 0, 3}, {0, 0, 5}, {0, 0, 3} }; -int gsw_dump_mem(int argc, char *argv[], int fd, int numPar) +int gsw_dump_mem(int argc, char *argv[], void *fd, int numPar) { GSW_table_t sVar; - unsigned int i = 0, j = 0, k = 0, m = 0; + unsigned int cnt = 0, i = 0, j = 0, k = 0, m = 0; GSW_register_t reg, param; u32 devIdx = 0; int num_of_elem; @@ -5675,7 +6082,7 @@ int gsw_dump_mem(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_dscp2pcp_map_get(int argc, char *argv[], int fd, int numPar) +int gsw_dscp2pcp_map_get(int argc, char *argv[], void *fd, int numPar) { GSW_DSCP2PCP_map_t param; unsigned int cnt = 0; @@ -5699,7 +6106,7 @@ int gsw_dscp2pcp_map_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_defaul_mac_filter_get(int argc, char *argv[], int fd, int numPar) +int gsw_defaul_mac_filter_get(int argc, char *argv[], void *fd, int numPar) { GSW_MACFILTER_default_t param; unsigned int cnt = 0; @@ -5723,7 +6130,7 @@ int gsw_defaul_mac_filter_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_defaul_mac_filter_set(int argc, char *argv[], int fd, int numPar) +int gsw_defaul_mac_filter_set(int argc, char *argv[], void *fd, int numPar) { GSW_MACFILTER_default_t sVar; unsigned int cnt = 0; @@ -5740,7 +6147,244 @@ int gsw_defaul_mac_filter_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_color_marking_table_set(int argc, char *argv[], int fd, int numPar) +int gsw_pbb_tunneltemplate_config_set(int argc, char *argv[], void *fd, int numPar) +{ + GSW_PBB_Tunnel_Template_Config_t sVar; + unsigned int cnt = 0; + memset(&sVar, 0x00, sizeof(sVar)); + + cnt += scanParamArg(argc, argv, "nTunnelTemplateId", sizeof(sVar.nTunnelTemplateId), &sVar.nTunnelTemplateId); + + cnt += scanParamArg(argc, argv, "bIheaderDstMACEnable", sizeof(sVar.bIheaderDstMACEnable), &sVar.bIheaderDstMACEnable); + cnt += scanMAC_Arg(argc, argv, "nIheaderDstMAC", sVar.nIheaderDstMAC); + cnt += scanParamArg(argc, argv, "bIheaderSrcMACEnable", sizeof(sVar.bIheaderSrcMACEnable), &sVar.bIheaderSrcMACEnable); + cnt += scanMAC_Arg(argc, argv, "nIheaderSrcMAC", sVar.nIheaderSrcMAC); + + cnt += scanParamArg(argc, argv, "bItagEnable", sizeof(sVar.bItagEnable), &sVar.bItagEnable); + cnt += scanParamArg(argc, argv, "bItagTpidEnable", sizeof(sVar.sItag.bTpidEnable), &sVar.sItag.bTpidEnable); + cnt += scanParamArg(argc, argv, "nItagTpid", sizeof(sVar.sItag.nTpid), &sVar.sItag.nTpid); + cnt += scanParamArg(argc, argv, "bItagPcpEnable", sizeof(sVar.sItag.bPcpEnable), &sVar.sItag.bPcpEnable); + cnt += scanParamArg(argc, argv, "nItagPcp", sizeof(sVar.sItag.nPcp), &sVar.sItag.nPcp); + cnt += scanParamArg(argc, argv, "bItagDeiEnable", sizeof(sVar.sItag.bDeiEnable), &sVar.sItag.bDeiEnable); + cnt += scanParamArg(argc, argv, "nItagDei", sizeof(sVar.sItag.nDei), &sVar.sItag.nDei); + cnt += scanParamArg(argc, argv, "bItagUacEnable", sizeof(sVar.sItag.bUacEnable), &sVar.sItag.bUacEnable); + cnt += scanParamArg(argc, argv, "nItagUac", sizeof(sVar.sItag.nUac), &sVar.sItag.nUac); + cnt += scanParamArg(argc, argv, "bItagResEnable", sizeof(sVar.sItag.bResEnable), &sVar.sItag.bResEnable); + cnt += scanParamArg(argc, argv, "nItagRes", sizeof(sVar.sItag.nRes), &sVar.sItag.nRes); + cnt += scanParamArg(argc, argv, "bItagSidEnable", sizeof(sVar.sItag.bSidEnable), &sVar.sItag.bSidEnable); + cnt += scanParamArg(argc, argv, "nItagSid", sizeof(sVar.sItag.nSid), &sVar.sItag.nSid); + + cnt += scanParamArg(argc, argv, "bBtagEnable", sizeof(sVar.bBtagEnable), &sVar.bBtagEnable); + cnt += scanParamArg(argc, argv, "bBtagTpidEnable", sizeof(sVar.sBtag.bTpidEnable), &sVar.sBtag.bTpidEnable); + cnt += scanParamArg(argc, argv, "nBtagTpid", sizeof(sVar.sBtag.nTpid), &sVar.sBtag.nTpid); + cnt += scanParamArg(argc, argv, "bBtagPcpEnable", sizeof(sVar.sBtag.bPcpEnable), &sVar.sBtag.bPcpEnable); + cnt += scanParamArg(argc, argv, "nBtagPcp", sizeof(sVar.sBtag.nPcp), &sVar.sBtag.nPcp); + cnt += scanParamArg(argc, argv, "bBtagDeiEnable", sizeof(sVar.sBtag.bDeiEnable), &sVar.sBtag.bDeiEnable); + cnt += scanParamArg(argc, argv, "nBtagDei", sizeof(sVar.sBtag.nDei), &sVar.sBtag.nDei); + cnt += scanParamArg(argc, argv, "bBtagVidEnable", sizeof(sVar.sBtag.bVidEnable), &sVar.sBtag.bVidEnable); + cnt += scanParamArg(argc, argv, "nBtagVid", sizeof(sVar.sBtag.nVid), &sVar.sBtag.nVid); + + if (cnt != numPar) + return (-2); + + if (gswip_version == GSWIP_3_2) { + if (cli_ioctl(fd, GSW_PBB_TUNNEL_TEMPLATE_SET, &sVar) != 0) + return (-1); + } + + return 0; +} + +int gsw_pbb_tunneltemplate_config_get(int argc, char *argv[], void *fd, int numPar) +{ + GSW_PBB_Tunnel_Template_Config_t sVar; + unsigned int cnt = 0; + memset(&sVar, 0x00, sizeof(sVar)); + + + cnt += scanParamArg(argc, argv, "nTunnelTemplateId", sizeof(sVar.nTunnelTemplateId), &sVar.nTunnelTemplateId); + + if (cnt != numPar) + return (-2); + + if (gswip_version == GSWIP_3_2) { + if (cli_ioctl(fd, GSW_PBB_TUNNEL_TEMPLATE_GET, &sVar) != 0) + return (-1); + } else { + return 0; + } + + printf("\n\t nTunnelTemplateId = %u", sVar.nTunnelTemplateId); + printf("\n\t nIheaderDstMAC ="); + printMAC_Address(sVar.nIheaderDstMAC); + printf("\n\t nIheaderSrcMAC ="); + printMAC_Address(sVar.nIheaderSrcMAC); + printf("\n\t nItagTpid =0x%x", sVar.sItag.nTpid); + printf("\n\t nItagPcp = %u", sVar.sItag.nPcp); + printf("\n\t nItagDei = %u", sVar.sItag.nDei); + printf("\n\t nItagUac = %u", sVar.sItag.nUac); + printf("\n\t nItagRes = %u", sVar.sItag.nRes); + printf("\n\t nItagSid = %u", sVar.sItag.nSid); + printf("\n\t nBtagTpid =0x%x", sVar.sBtag.nTpid); + printf("\n\t nBtagPcp = %u", sVar.sBtag.nPcp); + printf("\n\t nBtagDei = %u", sVar.sBtag.nDei); + printf("\n\t nBtagVid = %u", sVar.sBtag.nVid); + + return 0; +} + +int gsw_pbb_tunneltemplate_alloc(int argc, char *argv[], void *fd, int numPar) +{ + GSW_PBB_Tunnel_Template_Config_t sVar; + unsigned int cnt = 0; + memset(&sVar, 0x00, sizeof(sVar)); + + if (gswip_version == GSWIP_3_2) { + if (cli_ioctl(fd, GSW_PBB_TUNNEL_TEMPLATE_ALLOC, &sVar) != 0) + return (-1); + } else { + return 0; + } + + printf("\n\t Allocated nTunnelTemplateId = %u", sVar.nTunnelTemplateId); + return 0; +} + +int gsw_pbb_tunneltemplate_free(int argc, char *argv[], void *fd, int numPar) +{ + GSW_PBB_Tunnel_Template_Config_t sVar; + unsigned int cnt = 0; + memset(&sVar, 0x00, sizeof(sVar)); + + cnt += scanParamArg(argc, argv, "nTunnelTemplateId", sizeof(sVar.nTunnelTemplateId), &sVar.nTunnelTemplateId); + + if (cnt != numPar) + return (-2); + + if (gswip_version == GSWIP_3_2) { + if (cli_ioctl(fd, GSW_PBB_TUNNEL_TEMPLATE_FREE, &sVar) != 0) + return (-1); + } else { + return 0; + } + + printf("\n\t Freed nTunnelTemplateId = %u", sVar.nTunnelTemplateId); + return 0; +} + + +int gsw_lpidTogpid_assignmentset(int argc, char *argv[], void *fd, int numPar) +{ + GSW_LPID_to_GPID_Assignment_t sVar; + unsigned int cnt = 0; + memset(&sVar, 0x00, sizeof(sVar)); + + cnt += scanParamArg(argc, argv, "nLogicalPortId", sizeof(sVar.nLogicalPortId), &sVar.nLogicalPortId); + cnt += scanParamArg(argc, argv, "nFirstGlobalPortId", sizeof(sVar.nFirstGlobalPortId), &sVar.nFirstGlobalPortId); + cnt += scanParamArg(argc, argv, "nNumberOfGlobalPort", sizeof(sVar.nNumberOfGlobalPort), &sVar.nNumberOfGlobalPort); + + if (findStringParam(argc, argv, "nValidBits")) { + cnt += scanParamArg(argc, argv, "nValidBits", sizeof(sVar.nValidBits), &sVar.nValidBits); + } else { + sVar.nValidBits = 0x7; + } + + + if (cnt != numPar) + return (-2); + + if (gswip_version == GSWIP_3_2) { + if (cli_ioctl(fd, GSW_LPID_TO_GPID_ASSIGNMENT_SET, &sVar) != 0) + return (-1); + } else { + return 0; + } + + return 0; +} + +int gsw_lpidTogpid_assignmentget(int argc, char *argv[], void *fd, int numPar) +{ + GSW_LPID_to_GPID_Assignment_t sVar; + unsigned int cnt = 0; + memset(&sVar, 0x00, sizeof(sVar)); + + cnt += scanParamArg(argc, argv, "nLogicalPortId", sizeof(sVar.nLogicalPortId), &sVar.nLogicalPortId); + + if (cnt != numPar) + return (-2); + + if (gswip_version == GSWIP_3_2) { + if (cli_ioctl(fd, GSW_LPID_TO_GPID_ASSIGNMENT_GET, &sVar) != 0) + return (-1); + } else { + return 0; + } + + printf("\n\t nLogicalPortId = %u", sVar.nLogicalPortId); + printf("\n\t nFirstGlobalPortId = %u", sVar.nFirstGlobalPortId); + printf("\n\t nNumberOfGlobalPort = %u", sVar.nNumberOfGlobalPort); + printf("\n\t nValidBits = %u", sVar.nValidBits); + + return 0; +} + + +int gsw_gpidTolpid_assignmentset(int argc, char *argv[], void *fd, int numPar) +{ + GSW_GPID_to_LPID_Assignment_t sVar; + unsigned int cnt = 0; + memset(&sVar, 0x00, sizeof(sVar)); + + cnt += scanParamArg(argc, argv, "nGlobalPortId", sizeof(sVar.nGlobalPortId), &sVar.nGlobalPortId); + cnt += scanParamArg(argc, argv, "nLogicalPortId", sizeof(sVar.nLogicalPortId), &sVar.nLogicalPortId); + cnt += scanParamArg(argc, argv, "nSubIf_GroupField", sizeof(sVar.nSubIf_GroupField), &sVar.nSubIf_GroupField); + cnt += scanParamArg(argc, argv, "nSubIf_GroupField_OverRide", sizeof(sVar.nSubIf_GroupField_OverRide), &sVar.nSubIf_GroupField_OverRide); + + if (cnt != numPar) + return (-2); + + if (gswip_version == GSWIP_3_2) { + if (cli_ioctl(fd, GSW_GPID_TO_LPID_ASSIGNMENT_SET, &sVar) != 0) + return (-1); + } else { + return 0; + } + + return 0; +} + +int gsw_gpidTolpid_assignmentget(int argc, char *argv[], void *fd, int numPar) +{ + GSW_GPID_to_LPID_Assignment_t sVar; + unsigned int cnt = 0; + memset(&sVar, 0x00, sizeof(sVar)); + + cnt += scanParamArg(argc, argv, "nGlobalPortId", sizeof(sVar.nGlobalPortId), &sVar.nGlobalPortId); + + if (cnt != numPar) + return (-2); + + if (gswip_version == GSWIP_3_2) { + if (cli_ioctl(fd, GSW_GPID_TO_LPID_ASSIGNMENT_GET, &sVar) != 0) + return (-1); + } else { + return 0; + } + + printf("\n\t nGlobalPortId = %u", sVar.nGlobalPortId); + printf("\n\t nLogicalPortId = %u", sVar.nLogicalPortId); + printf("\n\t nSubIf_GroupField = %u", sVar.nSubIf_GroupField); + + if (sVar.nSubIf_GroupField_OverRide) + printf("\n\t nSubIf_GroupField_OverRide = TRUE"); + else + printf("\n\t nSubIf_GroupField_OverRide = FALSE"); + + return 0; +} + +int gsw_qos_color_marking_table_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_colorMarkingEntry_t sVar; unsigned int cnt = 0; @@ -5851,7 +6495,7 @@ int gsw_qos_color_marking_table_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_color_marking_table_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_color_marking_table_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_colorMarkingEntry_t param; unsigned char i = 0; @@ -5876,7 +6520,7 @@ int gsw_qos_color_marking_table_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_color_remarking_table_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_color_remarking_table_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_colorRemarkingEntry_t param; unsigned char i = 0; @@ -5918,7 +6562,7 @@ int gsw_qos_color_remarking_table_get(int argc, char *argv[], int fd, int numPar } -int gsw_qos_color_remarking_table_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_color_remarking_table_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_colorRemarkingEntry_t sVar; unsigned int cnt = 0; @@ -6011,5 +6655,160 @@ int gsw_qos_color_remarking_table_set(int argc, char *argv[], int fd, int numPar } +int gsw_defaul_pce_qmap_get(int argc, char *argv[], void *fd, int numPar) +{ + int i = 0; + int cnt = 0; + GSW_QoS_queuePort_t q_map; + memset(&q_map, 0, sizeof(GSW_QoS_queuePort_t)); + + cnt += scanParamArg(argc, argv, "nPortId", sizeof(q_map.nPortId), &q_map.nPortId); + + printf("\nGSWIP Default PCE-Q-MAP\n"); + printf("%15s %15s %15s %15s %15s %15s\n", + "EgLpid", "Ext", "Traf_Cls", "Q_Map_Mode", "Qid", "Redir_Lpid"); + + for (i = 0; i <= 15; i++) { + q_map.nTrafficClassId = i; + + if (cli_ioctl(fd, GSW_QOS_QUEUE_PORT_GET, &q_map) != 0) + return (-1); + + printf("%15d %15d %15d %15d %15d %15d ", + q_map.nPortId, q_map.bExtrationEnable, + q_map.nTrafficClassId, q_map.eQMapMode, + q_map.nQueueId, q_map.nRedirectPortId); + printf("\n"); + + } + + return 0; +} + + + +int gsw_defaul_bypass_qmap_get(int argc, char *argv[], void *fd, int numPar) +{ + int i = 0; + int cnt = 0; + GSW_QoS_queuePort_t q_map; + memset(&q_map, 0, sizeof(GSW_QoS_queuePort_t)); + + cnt += scanParamArg(argc, argv, "nPortId", sizeof(q_map.nPortId), &q_map.nPortId); + + printf("\nGSWIP Default PCE Bypass Q-MAP\n"); + printf("%15s %15s %15s %15s %15s %15s\n", + "EgMpid", "Ext", "Traf_Cls", "Q_Map_Mode", "Qid", "Redir_Lpid"); + + for (i = 0; i <= 15; i++) { + q_map.bRedirectionBypass = 1; + + if (cli_ioctl(fd, GSW_QOS_QUEUE_PORT_GET, &q_map) != 0) + return (-1); + + printf("%15d %15d %15d %15d %15d %15d ", + q_map.nPortId, q_map.bExtrationEnable, + q_map.nTrafficClassId, q_map.eQMapMode, + q_map.nQueueId, q_map.nRedirectPortId); + printf("\n"); + + } + + return 0; +} + + +int gsw_pmac_get_ig_cfg(int argc, char *argv[], void *fd, int numPar) +{ + GSW_PMAC_Ig_Cfg_t ig_cfg; + unsigned int cnt = 0; + memset(&ig_cfg, 0, sizeof(GSW_PMAC_Ig_Cfg_t)); + + cnt += scanParamArg(argc, argv, "nPmacId", sizeof(ig_cfg.nPmacId), &ig_cfg.nPmacId); + cnt += scanParamArg(argc, argv, "nTxDmaChanId", sizeof(ig_cfg.nTxDmaChanId), &ig_cfg.nTxDmaChanId); + + if (cnt != numPar) + return (-2); + + + printf("\nGSWIP PMAC IG CFG\n"); + printf("%10s %10s %10s %10s %10s %10s %10s %10s %10s\n", + "PmacId", "TxDmaChId", "ErrPktDisc", "ClassEn", + "ClassDef", "eSubId", "bSpIdDef", "bPmacPr", "DefPmacHdr"); + + if (cli_ioctl(fd, GSW_PMAC_IG_CFG_GET, &ig_cfg) != 0) + return (-1); + + printf("%10d %10d %10d %10d %10d %10d %10d %10d %10x:%x:%x:%x:%x:%x:%x:%x", + ig_cfg.nPmacId, ig_cfg.nTxDmaChanId, + ig_cfg.bErrPktsDisc, ig_cfg.bClassEna, + ig_cfg.bClassDefault, ig_cfg.eSubId, + ig_cfg.bSpIdDefault, ig_cfg.bPmacPresent, + ig_cfg.defPmacHdr[0], ig_cfg.defPmacHdr[1], + ig_cfg.defPmacHdr[2], ig_cfg.defPmacHdr[3], + ig_cfg.defPmacHdr[4], ig_cfg.defPmacHdr[5], + ig_cfg.defPmacHdr[6], ig_cfg.defPmacHdr[7]); + printf("\n"); + return 0; +} + +int gsw_tflow_ualloc(int argc, char *argv[], void *fd, int numPar) +{ + gsw_tflow_alloc_t sVar; + unsigned int cnt = 0; + memset(&sVar, 0x00, sizeof(sVar)); + + cnt += scanParamArg(argc, argv, "nNumberOfEntries", sizeof(sVar.num_of_pcerules), &sVar.num_of_pcerules); + + if (cnt != numPar) + return (-2); + + if (cli_ioctl(fd, GSW_TFLOW_ALLOC, &sVar) != 0) + return (-1); + + printf("\n\tAllocated Tflowblock = %u", sVar.tflowblockid); + printf("\n\t Number of block entries associated with Tflowblock %d = %u\n", + sVar.tflowblockid, sVar.num_of_pcerules); + + return 0; +} + +int gsw_tflow_ufree(int argc, char *argv[], void *fd, int numPar) +{ + gsw_tflow_alloc_t sVar; + unsigned int cnt = 0; + memset(&sVar, 0x00, sizeof(sVar)); + + cnt += scanParamArg(argc, argv, "nTflowBlockId", sizeof(sVar.tflowblockid), &sVar.tflowblockid); + + if (cnt != numPar) + return (-2); + + if (cli_ioctl(fd, GSW_TFLOW_FREE, &sVar) != 0) + return (-1); + + return 0; +} + +int gsw_debug_tflowtablestatus(int argc, char *argv[], void *fd, int numPar) +{ + GSW_debug_t sVar; + unsigned int cnt = 0; + memset(&sVar, 0x00, sizeof(sVar)); + + cnt += scanParamArg(argc, argv, "Index", sizeof(sVar.nTableIndex), &sVar.nTableIndex); + cnt += scanParamArg(argc, argv, "Set", sizeof(sVar.nForceSet), &sVar.nForceSet); + cnt += scanParamArg(argc, argv, "CheckAll", sizeof(sVar.nCheckIndexInUse), &sVar.nCheckIndexInUse); + cnt += scanParamArg(argc, argv, "blockid", sizeof(sVar.nblockid), &sVar.nblockid); + + if (cnt != numPar) + return (-2); + + if (cli_ioctl(fd, GSW_DEBUG_TFLOWTABLE_STATUS, &sVar) != 0) + return (-1); + + return 0; +} + //#endif /* SWAPI_ETC_CHIP */ diff --git a/src/gsw_cli_fkts.h b/src/gsw_cli_fkts.h old mode 100644 new mode 100755 index c69c19f559d0e13070aa632ade9ff92a57a6a840..f84e6bfee75bbe2daaefe6a9d0606b65251de93d --- a/src/gsw_cli_fkts.h +++ b/src/gsw_cli_fkts.h @@ -1,264 +1,286 @@ -/**************************************************************************** - - Copyright 2010 - Lantiq Deutschland GmbH - Am Campeon 3; 85579 Neubiberg, Germany - - For licensing information, see the file 'LICENSE' in the root folder of - this software module. - -*****************************************************************************/ -#ifndef _CMD_DECLARE_H -#define _CMD_DECLARE_H -int gsw_8021x_eapol_rule_set(int, int, char **); -int gsw_8021x_port_cfg_set(int, int, char **); -int gsw_cfg_set(int, int, char **); -int gsw_cpu_port_cfg_set(int, int, char **); -int gsw_cpu_port_extend_cfg_set(int, int, char **); -int gsw_disable(int, int, char **); -int gsw_enable(int, int, char **); -int gsw_hw_init(int, int, char **); -int gsw_mac_table_clear(int, int, char **); -int gsw_mac_table_entry_add(int, int, char **); -int gsw_mac_table_entry_remove(int, int, char **); -int gsw_mdio_cfg_set(int, int, char **); -int gsw_mdio_data_write(int, int, char **); -int gsw_mmd_data_write(int, int, char **); -int gsw_monitor_port_cfg_set(int, int, char **); -int gsw_multicast_router_port_add(int, int, char **); -int gsw_multicast_router_port_remove(int, int, char **); -int gsw_multicast_snoop_cfg_set(int, int, char **); -int gsw_multicast_table_entry_add(int, int, char **); -int gsw_port_cfg_set(int, int, char **); -int gsw_port_link_cfg_set(int, int, char **); -int gsw_port_redirect_set(int, int, char **); -int gsw_port_rgmii_clk_cfg_set(int, int, char **); -int gsw_qos_class_dscp_set(int, int, char **); -int gsw_qos_dscp_class_set(int, int, char **); -int gsw_qos_dscp_drop_precedence_cfg_set(int, int, char **); -int gsw_qos_meter_cfg_set(int, int, char **); -int gsw_qos_meter_port_assign(int, int, char **); -int gsw_qos_meter_port_deassign(int, int, char **); -int gsw_qos_pcp_class_set(int, int, char **); -int gsw_qos_port_cfg_set(int, int, char **); -int gsw_qos_port_remarking_cfg_set(int, int, char **); -int gsw_qos_queue_port_set(int, int, char **); -int gsw_qos_scheduler_cfg_set(int, int, char **); -int gsw_qos_shaper_cfg_set(int, int, char **); -int gsw_qos_shaper_queue_assign(int, int, char **); -int gsw_qos_shaper_queue_deassign(int, int, char **); -int gsw_qos_storm_cfg_set(int, int, char **); -int gsw_qos_wred_cfg_set(int, int, char **); -int gsw_qos_wred_queue_cfg_set(int, int, char **); -int gsw_rmon_clear(int, int, char **); -int gsw_stp_bpdu_rule_set(int, int, char **); -int gsw_stp_port_cfg_set(int, int, char **); -int gsw_vlan_id_create(int, int, char **); -int gsw_vlan_id_delete(int, int, char **); -int gsw_vlan_port_cfg_set(int, int, char **); -int gsw_vlan_port_member_add(int, int, char **); -int gsw_vlan_port_member_remove(int, int, char **); -int gsw_vlan_member_init(int argc, char *argv[], int fd, int numPar); -int gsw_vlan_reserved_add(int, int, char **); -int gsw_vlan_reserved_remove(int, int, char **); -int gsw_wol_cfg_set(int, int, char **); -int gsw_wol_port_cfg_set(int, int, char **); -int gsw_irq_mask_set(int, int, char **); -int gsw_irq_status_clear(int, int, char **); -int gsw_pce_rule_delete(int, int, char **); -int gsw_pce_rule_write(int, int, char **); -int gsw_register_set(int, int, char **); -int gsw_reset(int, int, char **); -int gsw_8021x_eapol_rule_get(int, int, char **); -int gsw_8021x_port_cfg_get(int, int, char **); -int gsw_cap_get(int, int, char **); -int gsw_cfg_get(int, int, char **); -int gsw_cpu_port_cfg_get(int, int, char **); -int gsw_cpu_port_extend_cfg_get(int, int, char **); -int gsw_mac_table_entry_query(int, int, char **); -int gsw_mac_table_entry_read(int, int, char **); -int gsw_mdio_cfg_get(int, int, char **); -int gsw_mdio_data_read(int, int, char **); -int gsw_mmd_data_read(int, int, char **); -int gsw_monitor_port_cfg_get(int, int, char **); -int gsw_multicast_router_port_read(int, int, char **); -int gsw_multicast_snoop_cfg_get(int, int, char **); -int gsw_multicast_table_entry_read(int, int, char **); -int gsw_multicast_table_entry_remove(int, int, char **); -int gsw_port_cfg_get(int, int, char **); -int gsw_port_link_cfg_get(int, int, char **); -int gsw_port_phy_addr_get(int, int, char **); -int gsw_port_phy_query(int, int, char **); -int gsw_port_redirect_get(int, int, char **); -int gsw_port_rgmii_clk_cfg_get(int, int, char **); -int gsw_qos_class_dscp_get(int, int, char **); -int gsw_qos_class_pcp_get(int, int, char **); -int gsw_qos_class_pcp_set(int, int, char **); -int gsw_qos_dscp_class_get(int, int, char **); -int gsw_qos_dscp_drop_precedence_cfg_get(int, int, char **); -int gsw_qos_meter_cfg_get(int, int, char **); -int gsw_qos_meter_port_get(int, int, char **); -int gsw_qos_pcp_class_get(int, int, char **); -int gsw_qos_port_cfg_get(int, int, char **); -int gsw_qos_port_remarking_cfg_get(int, int, char **); -int gsw_qos_queue_port_get(int, int, char **); -int gsw_qos_scheduler_cfg_get(int, int, char **); -int gsw_qos_shaper_cfg_get(int, int, char **); -int gsw_qos_shaper_queue_get(int, int, char **); -int gsw_qos_storm_cfg_get(int, int, char **); -int gsw_qos_wred_cfg_get(int, int, char **); -int gsw_qos_wred_queue_cfg_get(int, int, char **); -int gsw_rmon_port_get(int, int, char **); -int gsw_stp_bpdu_rule_get(int, int, char **); -int gsw_stp_port_cfg_get(int, int, char **); -int gsw_version_get(int, int, char **); -int gsw_vlan_id_get(int, int, char **); -int gsw_vlan_port_cfg_get(int, int, char **); -int gsw_vlan_port_member_read(int, int, char **); -int gsw_wol_cfg_get(int, int, char **); -int gsw_wol_port_cfg_get(int, int, char **); -int gsw_irq_get(int, int, char **); -int gsw_irq_mask_get(int, int, char **); -int gsw_pce_rule_read(int, int, char **); -int gsw_register_get(int, int, char **); -int gsw_rmon_extend_get(int, int, char **); - -int gsw_timestamp_timer_get(int, int, char **); -int gsw_timestamp_timer_set(int, int, char **); - -int gsw_timestamp_port_read(int, int, char **); -int gsw_trunking_cfg_set(int, int, char **); -int gsw_trunking_cfg_get(int, int, char **); -int gsw_trunking_port_cfg_set(int, int, char **); -int gsw_trunking_port_cfg_get(int, int, char **); -int gsw_qos_wred_port_cfg_set(int, int, char **); -int gsw_qos_wred_port_cfg_get(int, int, char **); -int gsw_qos_flowctrl_cfg_set(int, int, char **); -int gsw_qos_flowctrl_cfg_get(int, int, char **); -int gsw_qos_flowctrl_port_cfg_set(int, int, char **); -int gsw_qos_flowctrl_port_cfg_get(int, int, char **); -int gsw_qos_queue_buffer_reserve_cfg_set(int, int, char **); -int gsw_qos_queue_buffer_reserve_cfg_get(int, int, char **); -//#ifdef SWAPI_ETC_CHIP -int gsw_svlan_cfg_set(int argc, char *argv[], int fd, int numPar); -int gsw_svlan_cfg_get(int argc, char *argv[], int fd, int numPar); -int gsw_svlan_port_cfg_set(int argc, char *argv[], int fd, int numPar); -int gsw_svlan_port_cfg_get(int argc, char *argv[], int fd, int numPar); -int gsw_qos_svlan_class_pcp_port_set(int argc, char *argv[], int fd, int numPar); -int gsw_qos_svlan_class_pcp_port_get(int argc, char *argv[], int fd, int numPar); -int gsw_qos_svlan_pcp_class_set(int argc, char *argv[], int fd, int numPar); -int gsw_qos_svlan_pcp_class_get(int argc, char *argv[], int fd, int numPar); -int gsw_pce_eg_vlan_cfg_set(int argc, char *argv[], int fd, int numPar); -int gsw_pce_eg_vlan_cfg_get(int argc, char *argv[], int fd, int numPar); -int gsw_pce_eg_vlan_entry_write(int argc, char *argv[], int fd, int numPar); -int gsw_pce_eg_vlan_entry_read(int argc, char *argv[], int fd, int numPar); - -int gsw_pmac_bm_cfg_get(int argc, char *argv[], int fd, int numPar); -int gsw_pmac_bm_cfg_set(int argc, char *argv[], int fd, int numPar); -int gsw_pmac_eg_cfg_get(int argc, char *argv[], int fd, int numPar); -int gsw_pmac_eg_cfg_set(int argc, char *argv[], int fd, int numPar); -//int gsw_pmac_eg_count_get(int argc, char *argv[], int fd, int numPar); -int gsw_pmac_ig_cfg_get(int argc, char *argv[], int fd, int numPar); -int gsw_pmac_ig_cfg_set(int argc, char *argv[], int fd, int numPar); -int gsw_pmac_count_get(int argc, char *argv[], int fd, int numPar); - -int gsw_rmon_mode_set(int argc, char *argv[], int fd, int numPar); -int gsw_rmon_if_get(int argc, char *argv[], int fd, int numPar); -int gsw_rmon_redirect_get(int argc, char *argv[], int fd, int numPar); -int gsw_rmon_route_get(int argc, char *argv[], int fd, int numPar); -int gsw_rmon_meter_get(int argc, char *argv[], int fd, int numPar); -int gsw_rmon_flow_get(int argc, char *argv[], int fd, int numPar); -int gsw_rmon_tflow_clear(int argc, char *argv[], int fd, int numPar); - - - -int gsw_qos_meter_act(int argc, char *argv[], int fd, int numPar); -int gsw_pmac_glbl_cfg_set(int argc, char *argv[], int fd, int numPar); -int gsw_pmac_glbl_cfg_get(int argc, char *argv[], int fd, int numPar); - -/*GSWIP 3.1*/ -int gsw_ctp_port_assigment_set(int argc, char *argv[], int fd, int numPar); -int gsw_ctp_port_assigment_get(int argc, char *argv[], int fd, int numPar); -int gsw_extendedvlan_config_set(int argc, char *argv[], int fd, int numPar); -int gsw_extendedvlan_config_get(int argc, char *argv[], int fd, int numPar); -int gsw_extendedvlan_free(int argc, char *argv[], int fd, int numPar); -int gsw_vlanfilter_config_set(int argc, char *argv[], int fd, int numPar); -int gsw_vlanfilter_config_get(int argc, char *argv[], int fd, int numPar); -int gsw_vlanfilter_free(int argc, char *argv[], int fd, int numPar); -int gsw_bridge_config_set(int argc, char *argv[], int fd, int numPar); -int gsw_bridge_config_get(int argc, char *argv[], int fd, int numPar); -int gsw_bridge_free(int argc, char *argv[], int fd, int numPar); -int gsw_ctp_port_config_set(int argc, char *argv[], int fd, int numPar); -int gsw_ctp_port_config_get(int argc, char *argv[], int fd, int numPar); -int gsw_ctp_port_config_reset(int argc, char *argv[], int fd, int numPar); -int gsw_bridge_port_config_set(int argc, char *argv[], int fd, int numPar); -int gsw_bridge_port_config_get(int argc, char *argv[], int fd, int numPar); -int gsw_bridge_port_alloc(int argc, char *argv[], int fd, int numPar); -int gsw_bridge_port_free(int argc, char *argv[], int fd, int numPar); -int gsw_extendedvlan_alloc(int argc, char *argv[], int fd, int numPar); -int gsw_vlanfilter_alloc(int argc, char *argv[], int fd, int numPar); -int gsw_bridge_alloc(int argc, char *argv[], int fd, int numPar); -int gsw_pmac_rmon_get(int argc, char *argv[], int fd, int numPar); -int gsw_debug_ctptablestatus(int argc, char *argv[], int fd, int numPar); -int gsw_debug_bridgeporttablestatus(int argc, char *argv[], int fd, int numPar); -int gsw_debug_bridgetablestatus(int argc, char *argv[], int fd, int numPar); -int gsw_debug_Exvlantablestatus(int argc, char *argv[], int fd, int numPar); -int gsw_debug_VlanFiltertablestatus(int argc, char *argv[], int fd, int numPar); -int gsw_debug_Metertablestatus(int argc, char *argv[], int fd, int numPar); -int gsw_debug_Dscp2Pcptablestatus(int argc, char *argv[], int fd, int numPar); -int gsw_debug_Pmappertablestatus(int argc, char *argv[], int fd, int numPar); -int gsw_debug_pmac_eg(int argc, char *argv[], int fd, int numPar); -int gsw_debug_pmac_ig(int argc, char *argv[], int fd, int numPar); -int gsw_debug_pmac_bp(int argc, char *argv[], int fd, int numPar); -int gsw_debug_def_pce_qmap(int argc, char *argv[], int fd, int numPar); -int gsw_debug_def_byp_qmap(int argc, char *argv[], int fd, int numPar); -int gsw_xgmac_cli(int argc, char *argv[], int fd, int numPar); -int gsw_debug_ctpstatistics(int argc, char *argv[], int fd, int numPar); -int gsw_debug_lpstatistics(int argc, char *argv[], int fd, int numPar); -int gsw_gswss_cli(int argc, char *argv[], int fd, int numPar); -int gsw_lmac_cli(int argc, char *argv[], int fd, int numPar); -int gsw_macsec_cli(int argc, char *argv[], int fd, int numPar); -int gsw_dump_mem(int argc, char *argv[], int fd, int numPar); -int gsw_ctp_port_alloc(int argc, char *argv[], int fd, int numPar); -int gsw_ctp_port_free(int argc, char *argv[], int fd, int numPar); - - -int gsw_irq_register(int argc, char *argv[], int fd, int numPar); -int gsw_irq_unregister(int argc, char *argv[], int fd, int numPar); -int gsw_irq_enable(int argc, char *argv[], int fd, int numPar); -int gsw_irq_disable(int argc, char *argv[], int fd, int numPar); -int gsw_debug_PrintPceIrqList(int argc, char *argv[], int fd, int numPar); - -int gsw_dscp2pcp_map_get(int argc, char *argv[], int fd, int numPar); -int gsw_defaul_mac_filter_get(int argc, char *argv[], int fd, int numPar); -int gsw_defaul_mac_filter_set(int argc, char *argv[], int fd, int numPar); -int gsw_qos_color_marking_table_set(int argc, char *argv[], int fd, int numPar); -int gsw_qos_color_marking_table_get(int argc, char *argv[], int fd, int numPar); -int gsw_qos_color_remarking_table_get(int argc, char *argv[], int fd, int numPar); -int gsw_qos_color_remarking_table_set(int argc, char *argv[], int fd, int numPar); - - -int gsw_debug_ctp_rmon_port_get(int argc, char *argv[], int fd, int numPar); -int gsw_debug_bridge_rmon_port_get(int argc, char *argv[], int fd, int numPar); -int gsw_debug_ctpbypass_rmon_port_get(int argc, char *argv[], int fd, int numPar); -int gsw_debug_rmon_port_get(int argc, char *argv[], int fd, int numPar); -int gsw_debug_rmon_port_get_all(int argc, char *argv[], int fd, int numPar); - -#if defined(CONFIG_LTQ_TEST) && CONFIG_LTQ_TEST -int gsw_pmac_bm_cfg_set(int argc, char *argv[], int fd, int numPar); -int gsw_pmac_eg_cfg_set(int argc, char *argv[], int fd, int numPar); -int gsw_pmac_ig_cfg_set(int argc, char *argv[], int fd, int numPar); -int gsw_route_entry_read(int argc, char *argv[], int fd, int numPar); -int gsw_route_entry_add(int argc, char *argv[], int fd, int numPar); -int gsw_route_entry_delete(int argc, char *argv[], int fd, int numPar); -int gsw_route_tunnel_entry_add(int argc, char *argv[], int fd, int numPar); -int gsw_route_tunnel_entry_delete(int argc, char *argv[], int fd, int numPar); -int gsw_route_tunnel_entry_read(int argc, char *argv[], int fd, int numPar); -int gsw_route_l2nat_cfg_write(int argc, char *argv[], int fd, int numPar); -int gsw_route_l2nat_cfg_read(int argc, char *argv[], int fd, int numPar); -int gsw_route_session_hit_op(int argc, char *argv[], int fd, int numPar); -int gsw_route_session_dest_mod(int argc, char *argv[], int fd, int numPar); -#endif - -//#endif /* SWAPI_ETC_CHIP */ -#endif /* _CMD_DECLARE_H*/ +/**************************************************************************** + + Copyright 2010 + Lantiq Deutschland GmbH + Am Campeon 3; 85579 Neubiberg, Germany + + For licensing information, see the file 'LICENSE' in the root folder of + this software module. + +*****************************************************************************/ +#ifndef _CMD_DECLARE_H +#define _CMD_DECLARE_H +int gsw_8021x_eapol_rule_set(int argc, char *argv[], void *fd, int numPar); +int gsw_8021x_port_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_cpu_port_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_cpu_port_extend_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_disable(int argc, char *argv[], void *fd, int numPar); +int gsw_enable(int argc, char *argv[], void *fd, int numPar); +int gsw_hw_init(int argc, char *argv[], void *fd, int numPar); +int gsw_mac_table_clear(int argc, char *argv[], void *fd, int numPar); +int gsw_mac_table_entry_add(int argc, char *argv[], void *fd, int numPar); +int gsw_mac_table_entry_remove(int argc, char *argv[], void *fd, int numPar); +int gsw_mdio_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_mdio_data_write(int argc, char *argv[], void *fd, int numPar); +int gsw_mmd_data_write(int argc, char *argv[], void *fd, int numPar); +int gsw_monitor_port_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_multicast_router_port_add(int argc, char *argv[], void *fd, int numPar); +int gsw_multicast_router_port_remove(int argc, char *argv[], void *fd, int numPar); +int gsw_multicast_snoop_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_multicast_table_entry_add(int argc, char *argv[], void *fd, int numPar); +int gsw_port_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_port_link_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_port_redirect_set(int argc, char *argv[], void *fd, int numPar); +int gsw_port_rgmii_clk_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_class_dscp_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_dscp_class_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_dscp_drop_precedence_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_meter_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_meter_port_assign(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_meter_port_deassign(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_pcp_class_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_port_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_port_remarking_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_queue_port_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_scheduler_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_shaper_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_shaper_queue_assign(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_shaper_queue_deassign(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_storm_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_wred_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_wred_queue_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_rmon_clear(int argc, char *argv[], void *fd, int numPar); +int gsw_stp_bpdu_rule_set(int argc, char *argv[], void *fd, int numPar); +int gsw_stp_port_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_vlan_id_create(int argc, char *argv[], void *fd, int numPar); +int gsw_vlan_id_delete(int argc, char *argv[], void *fd, int numPar); +int gsw_vlan_port_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_vlan_port_member_add(int argc, char *argv[], void *fd, int numPar); +int gsw_vlan_port_member_remove(int argc, char *argv[], void *fd, int numPar); +int gsw_vlan_member_init(int argc, char *argv[], void *fd, int numPar); +int gsw_vlan_reserved_add(int argc, char *argv[], void *fd, int numPar); +int gsw_vlan_reserved_remove(int argc, char *argv[], void *fd, int numPar); +int gsw_wol_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_wol_port_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_irq_mask_set(int argc, char *argv[], void *fd, int numPar); +int gsw_irq_status_clear(int argc, char *argv[], void *fd, int numPar); +int gsw_pce_rule_delete(int argc, char *argv[], void *fd, int numPar); +int gsw_pce_rule_write(int argc, char *argv[], void *fd, int numPar); +int gsw_register_set(int argc, char *argv[], void *fd, int numPar); +int gsw_reset(int argc, char *argv[], void *fd, int numPar); +int gsw_8021x_eapol_rule_get(int argc, char *argv[], void *fd, int numPar); +int gsw_8021x_port_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_cap_get(int argc, char *argv[], void *fd, int numPar); +int gsw_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_cpu_port_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_cpu_port_extend_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_mac_table_entry_query(int argc, char *argv[], void *fd, int numPar); +int gsw_mac_table_entry_read(int argc, char *argv[], void *fd, int numPar); +int gsw_mdio_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_mdio_data_read(int argc, char *argv[], void *fd, int numPar); +int gsw_mmd_data_read(int argc, char *argv[], void *fd, int numPar); +int gsw_monitor_port_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_multicast_router_port_read(int argc, char *argv[], void *fd, int numPar); +int gsw_multicast_snoop_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_multicast_table_entry_read(int argc, char *argv[], void *fd, int numPar); +int gsw_multicast_table_entry_remove(int argc, char *argv[], void *fd, int numPar); +int gsw_port_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_port_link_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_port_phy_addr_get(int argc, char *argv[], void *fd, int numPar); +int gsw_port_phy_query(int argc, char *argv[], void *fd, int numPar); +int gsw_port_redirect_get(int argc, char *argv[], void *fd, int numPar); +int gsw_port_rgmii_clk_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_class_dscp_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_class_pcp_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_class_pcp_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_dscp_class_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_dscp_drop_precedence_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_meter_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_meter_port_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_pcp_class_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_port_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_port_remarking_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_queue_port_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_scheduler_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_shaper_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_shaper_queue_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_storm_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_wred_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_wred_queue_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_rmon_port_get(int argc, char *argv[], void *fd, int numPar); +int gsw_stp_bpdu_rule_get(int argc, char *argv[], void *fd, int numPar); +int gsw_stp_port_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_version_get(int argc, char *argv[], void *fd, int numPar); +int gsw_vlan_id_get(int argc, char *argv[], void *fd, int numPar); +int gsw_vlan_port_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_vlan_port_member_read(int argc, char *argv[], void *fd, int numPar); +int gsw_wol_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_wol_port_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_irq_get(int argc, char *argv[], void *fd, int numPar); +int gsw_irq_mask_get(int argc, char *argv[], void *fd, int numPar); +int gsw_pce_rule_read(int argc, char *argv[], void *fd, int numPar); +int gsw_register_get(int argc, char *argv[], void *fd, int numPar); +int gsw_rmon_extend_get(int argc, char *argv[], void *fd, int numPar); + +int gsw_timestamp_timer_get(int argc, char *argv[], void *fd, int numPar); +int gsw_timestamp_timer_set(int argc, char *argv[], void *fd, int numPar); + +int gsw_timestamp_port_read(int argc, char *argv[], void *fd, int numPar); +int gsw_trunking_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_trunking_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_trunking_port_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_trunking_port_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_wred_port_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_wred_port_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_flowctrl_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_flowctrl_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_flowctrl_port_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_flowctrl_port_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_queue_buffer_reserve_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_queue_buffer_reserve_cfg_get(int argc, char *argv[], void *fd, int numPar); +//#ifdef SWAPI_ETC_CHIP +int gsw_svlan_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_svlan_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_svlan_port_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_svlan_port_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_svlan_class_pcp_port_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_svlan_class_pcp_port_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_svlan_pcp_class_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_svlan_pcp_class_get(int argc, char *argv[], void *fd, int numPar); +int gsw_pce_eg_vlan_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_pce_eg_vlan_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_pce_eg_vlan_entry_write(int argc, char *argv[], void *fd, int numPar); +int gsw_pce_eg_vlan_entry_read(int argc, char *argv[], void *fd, int numPar); + +int gsw_pmac_bm_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_pmac_bm_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_pmac_eg_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_pmac_eg_cfg_set(int argc, char *argv[], void *fd, int numPar); +//int gsw_pmac_eg_count_get(int argc, char *argv[], void *fd, int numPar); +int gsw_pmac_ig_cfg_get(int argc, char *argv[], void *fd, int numPar); +int gsw_pmac_ig_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_pmac_count_get(int argc, char *argv[], void *fd, int numPar); + +int gsw_rmon_mode_set(int argc, char *argv[], void *fd, int numPar); +int gsw_rmon_if_get(int argc, char *argv[], void *fd, int numPar); +int gsw_rmon_redirect_get(int argc, char *argv[], void *fd, int numPar); +int gsw_rmon_route_get(int argc, char *argv[], void *fd, int numPar); +int gsw_rmon_meter_get(int argc, char *argv[], void *fd, int numPar); +int gsw_rmon_flow_get(int argc, char *argv[], void *fd, int numPar); +int gsw_rmon_tflow_clear(int argc, char *argv[], void *fd, int numPar); + + + +int gsw_qos_meter_act(int argc, char *argv[], void *fd, int numPar); +int gsw_pmac_glbl_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_pmac_glbl_cfg_get(int argc, char *argv[], void *fd, int numPar); + +/*GSWIP 3.1*/ +int gsw_ctp_port_assigment_set(int argc, char *argv[], void *fd, int numPar); +int gsw_ctp_port_assigment_get(int argc, char *argv[], void *fd, int numPar); +int gsw_extendedvlan_config_set(int argc, char *argv[], void *fd, int numPar); +int gsw_extendedvlan_config_get(int argc, char *argv[], void *fd, int numPar); +int gsw_extendedvlan_free(int argc, char *argv[], void *fd, int numPar); +int gsw_vlanfilter_config_set(int argc, char *argv[], void *fd, int numPar); +int gsw_vlanfilter_config_get(int argc, char *argv[], void *fd, int numPar); +int gsw_vlanfilter_free(int argc, char *argv[], void *fd, int numPar); +int gsw_bridge_config_set(int argc, char *argv[], void *fd, int numPar); +int gsw_bridge_config_get(int argc, char *argv[], void *fd, int numPar); +int gsw_bridge_free(int argc, char *argv[], void *fd, int numPar); +int gsw_ctp_port_config_set(int argc, char *argv[], void *fd, int numPar); +int gsw_ctp_port_config_get(int argc, char *argv[], void *fd, int numPar); +int gsw_ctp_port_config_reset(int argc, char *argv[], void *fd, int numPar); +int gsw_bridge_port_config_set(int argc, char *argv[], void *fd, int numPar); +int gsw_bridge_port_config_get(int argc, char *argv[], void *fd, int numPar); +int gsw_bridge_port_alloc(int argc, char *argv[], void *fd, int numPar); +int gsw_bridge_port_free(int argc, char *argv[], void *fd, int numPar); +int gsw_extendedvlan_alloc(int argc, char *argv[], void *fd, int numPar); +int gsw_vlanfilter_alloc(int argc, char *argv[], void *fd, int numPar); +int gsw_bridge_alloc(int argc, char *argv[], void *fd, int numPar); +int gsw_pmac_rmon_get(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_ctptablestatus(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_bridgeporttablestatus(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_bridgetablestatus(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_Exvlantablestatus(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_VlanFiltertablestatus(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_Metertablestatus(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_Dscp2Pcptablestatus(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_Pmappertablestatus(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_pmac_eg(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_pmac_ig(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_pmac_bp(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_def_pce_qmap(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_def_byp_qmap(int argc, char *argv[], void *fd, int numPar); +int gsw_xgmac_cli(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_ctpstatistics(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_lpstatistics(int argc, char *argv[], void *fd, int numPar); +int gsw_gswss_cli(int argc, char *argv[], void *fd, int numPar); +int gsw_lmac_cli(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_cli(int argc, char *argv[], void *fd, int numPar); +int gsw_pmacbr_cli(int argc, char *argv[], void *fd, int numPar); +int gsw_dump_mem(int argc, char *argv[], void *fd, int numPar); +int gsw_ctp_port_alloc(int argc, char *argv[], void *fd, int numPar); +int gsw_ctp_port_free(int argc, char *argv[], void *fd, int numPar); + + +int gsw_irq_register(int argc, char *argv[], void *fd, int numPar); +int gsw_irq_unregister(int argc, char *argv[], void *fd, int numPar); +int gsw_irq_enable(int argc, char *argv[], void *fd, int numPar); +int gsw_irq_disable(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_PrintPceIrqList(int argc, char *argv[], void *fd, int numPar); + +int gsw_dscp2pcp_map_get(int argc, char *argv[], void *fd, int numPar); +int gsw_defaul_mac_filter_get(int argc, char *argv[], void *fd, int numPar); +int gsw_defaul_mac_filter_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_color_marking_table_set(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_color_marking_table_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_color_remarking_table_get(int argc, char *argv[], void *fd, int numPar); +int gsw_qos_color_remarking_table_set(int argc, char *argv[], void *fd, int numPar); + + +int gsw_debug_ctp_rmon_port_get(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_bridge_rmon_port_get(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_ctpbypass_rmon_port_get(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_rmon_port_get(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_rmon_port_get_all(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_tunneltemptablestatus(int argc, char *argv[], void *fd, int numPar); + + +int gsw_pbb_tunneltemplate_config_set(int argc, char *argv[], void *fd, int numPar); +int gsw_pbb_tunneltemplate_config_get(int argc, char *argv[], void *fd, int numPar); +int gsw_pbb_tunneltemplate_alloc(int argc, char *argv[], void *fd, int numPar); +int gsw_pbb_tunneltemplate_free(int argc, char *argv[], void *fd, int numPar); + +int gsw_lpidTogpid_assignmentset(int argc, char *argv[], void *fd, int numPar); +int gsw_lpidTogpid_assignmentget(int argc, char *argv[], void *fd, int numPar); +int gsw_gpidTolpid_assignmentset(int argc, char *argv[], void *fd, int numPar); +int gsw_gpidTolpid_assignmentget(int argc, char *argv[], void *fd, int numPar); + +int gsw_defaul_pce_qmap_get(int argc, char *argv[], void *fd, int numPar); +int gsw_defaul_bypass_qmap_get(int argc, char *argv[], void *fd, int numPar); +int gsw_pmac_get_ig_cfg(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_pmac_rmon_get_all(int argc, char *argv[], void *fd, int numPar); +int gsw_tflow_ualloc(int argc, char *argv[], void *fd, int numPar); +int gsw_tflow_ufree(int argc, char *argv[], void *fd, int numPar); +int gsw_debug_tflowtablestatus(int argc, char *argv[], void *fd, int numPar); + + +#if defined(CONFIG_LTQ_TEST) && CONFIG_LTQ_TEST +int gsw_pmac_bm_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_pmac_eg_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_pmac_ig_cfg_set(int argc, char *argv[], void *fd, int numPar); +int gsw_route_entry_read(int argc, char *argv[], void *fd, int numPar); +int gsw_route_entry_add(int argc, char *argv[], void *fd, int numPar); +int gsw_route_entry_delete(int argc, char *argv[], void *fd, int numPar); +int gsw_route_tunnel_entry_add(int argc, char *argv[], void *fd, int numPar); +int gsw_route_tunnel_entry_delete(int argc, char *argv[], void *fd, int numPar); +int gsw_route_tunnel_entry_read(int argc, char *argv[], void *fd, int numPar); +int gsw_route_l2nat_cfg_write(int argc, char *argv[], void *fd, int numPar); +int gsw_route_l2nat_cfg_read(int argc, char *argv[], void *fd, int numPar); +int gsw_route_session_hit_op(int argc, char *argv[], void *fd, int numPar); +int gsw_route_session_dest_mod(int argc, char *argv[], void *fd, int numPar); +#endif + +//#endif /* SWAPI_ETC_CHIP */ +#endif /* _CMD_DECLARE_H*/ diff --git a/src/gsw_cli_fkts_common.c b/src/gsw_cli_fkts_common.c old mode 100644 new mode 100755 index 30cfd84095433d7b5da3989418d1711a1e679e28..62118296479bed98dc64d9913f5cd9ee29cf944d --- a/src/gsw_cli_fkts_common.c +++ b/src/gsw_cli_fkts_common.c @@ -20,12 +20,12 @@ #include <errno.h> #include <ctype.h> #endif -int gsw_mac_table_entry_read(int argc, char *argv[], int fd, int numPar) +int gsw_mac_table_entry_read(int argc, char *argv[], void *fd, int numPar) { GSW_MAC_tableRead_t MAC_tableRead; printf("-------------------------------------------------------------\n"); - printf(" MAC Address | Port | Age | SID | FID | Static\n"); + printf(" MAC Address | Port | Age | SID | FID | Static\n"); printf("-------------------------------------------------------------\n"); memset(&MAC_tableRead, 0x00, sizeof(MAC_tableRead)); @@ -46,51 +46,54 @@ int gsw_mac_table_entry_read(int argc, char *argv[], int fd, int numPar) } } + if (gswip_version == GSWIP_3_1 || gswip_version == GSWIP_3_2) { + if (MAC_tableRead.bStaticEntry) { + unsigned int i = 0; + int port = 0; + printMAC_Address(MAC_tableRead.nMAC); + printf(" | %3d | %4d | %4d | %3d | TRUE(static)\n", + port, MAC_tableRead.nAgeTimer, MAC_tableRead.nSubIfId, MAC_tableRead.nFId); + printf("\t\t\t\t\t nFilterFlag(key):\t0x%x\n\n", MAC_tableRead.nFilterFlag); -#if 0 + for (i = 0; i < 16; i++) { + if (!MAC_tableRead.nPortMap[i]) + continue; - if (MAC_tableRead.bStaticEntry != 0) { - int port; - - for (port = 0; port < (sizeof(MAC_tableRead.nPortId) * 8 - 1); port++) { - if (((MAC_tableRead.nPortId >> port) & 0x1) == 1) { - printMAC_Address(MAC_tableRead.nMAC); - printf(" | %3d | %4d | %4d | %3d | TRUE\n", \ - port, MAC_tableRead.nAgeTimer, MAC_tableRead.nSubIfId, MAC_tableRead.nFId); + printf("\t\t\t\t\t PortMap[ %d ]:\t0x%x\n", i, MAC_tableRead.nPortMap[i]); } - } - } else { - printMAC_Address(MAC_tableRead.nMAC); - printf(" | %3d | %4d | %4d | %3d | FALSE\n", \ - MAC_tableRead.nPortId, MAC_tableRead.nAgeTimer, MAC_tableRead.nSubIfId, MAC_tableRead.nFId); - } - -#endif - if (MAC_tableRead.bStaticEntry) { - unsigned int i = 0; - int port = 0; - printMAC_Address(MAC_tableRead.nMAC); - printf(" | %3d | %4d | %4d | %3d(key) | TRUE(static)\n", \ - port, MAC_tableRead.nAgeTimer, MAC_tableRead.nSubIfId, MAC_tableRead.nFId); - printf("\t\t\t\t\t nFilterFlag(key):\t0x%x\n\n", MAC_tableRead.nFilterFlag); - - for (i = 0; i < 16; i++) - printf("\t\t\t\t\t PortMap[ %d ]:\t0x%x\n", i, MAC_tableRead.nPortMap[i]); + printf("\t\t\t\t\t Hit Status:\t%d\n", MAC_tableRead.hitstatus); + } else { + printMAC_Address(MAC_tableRead.nMAC); + printf(" | %3d | %4d | %4d | %3d | FALSE(dynamic)\n", + MAC_tableRead.nPortId, MAC_tableRead.nAgeTimer, MAC_tableRead.nSubIfId, MAC_tableRead.nFId); + } } else { - printMAC_Address(MAC_tableRead.nMAC); - printf(" | %3d | %4d | %4d | %3d(key) | FALSE(dynamic)\n", \ - MAC_tableRead.nPortId, MAC_tableRead.nAgeTimer, MAC_tableRead.nSubIfId, MAC_tableRead.nFId); + if (MAC_tableRead.bStaticEntry != 0) { + int port; + + for (port = 0; port < (sizeof(MAC_tableRead.nPortId) * 8 - 1); port++) { + if (((MAC_tableRead.nPortId >> port) & 0x1) == 1) { + printMAC_Address(MAC_tableRead.nMAC); + printf(" | %3d | %4d | %4d | %3d | TRUE\n", + port, MAC_tableRead.nAgeTimer, MAC_tableRead.nSubIfId, MAC_tableRead.nFId); + } + } + } else { + printMAC_Address(MAC_tableRead.nMAC); + printf(" | %3d | %4d | %4d | %3d | FALSE\n", + MAC_tableRead.nPortId, MAC_tableRead.nAgeTimer, MAC_tableRead.nSubIfId, MAC_tableRead.nFId); + } } memset(&MAC_tableRead, 0x00, sizeof(MAC_tableRead)); } - printf("-----------------------------------------------------\n"); + printf("------------------------------------------------------------\n"); return 0; } -int gsw_multicast_router_port_read(int argc, char *argv[], int fd, int numPar) +int gsw_multicast_router_port_read(int argc, char *argv[], void *fd, int numPar) { GSW_multicastRouterRead_t multicastRouterRead; @@ -111,7 +114,7 @@ int gsw_multicast_router_port_read(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_class_dscp_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_class_dscp_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_ClassDSCP_Cfg_t classDSCP_Cfg; int i; @@ -126,7 +129,7 @@ int gsw_qos_class_dscp_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_class_dscp_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_class_dscp_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_ClassDSCP_Cfg_t ClassDSCP_Cfg; unsigned int nTrafficClass, cnt; @@ -155,7 +158,7 @@ int gsw_qos_class_dscp_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_class_pcp_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_class_pcp_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_ClassPCP_Cfg_t classPCP_Cfg; int i; @@ -171,7 +174,7 @@ int gsw_qos_class_pcp_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_class_pcp_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_class_pcp_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_ClassPCP_Cfg_t classPCP_Cfg; unsigned int nTrafficClass, cnt; @@ -200,7 +203,7 @@ int gsw_qos_class_pcp_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_dscp_class_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_dscp_class_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_DSCP_ClassCfg_t DSCP_ClassCfg; int i; @@ -216,7 +219,7 @@ int gsw_qos_dscp_class_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_dscp_class_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_dscp_class_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_DSCP_ClassCfg_t DSCP_ClassCfg; unsigned char nTrafficClass; @@ -245,7 +248,7 @@ int gsw_qos_dscp_class_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_pcp_class_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_pcp_class_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_PCP_ClassCfg_t PCP_ClassCfg; int i; @@ -255,13 +258,13 @@ int gsw_qos_pcp_class_get(int argc, char *argv[], int fd, int numPar) if (cli_ioctl(fd, GSW_QOS_PCP_CLASS_GET, &PCP_ClassCfg) != 0) return (-2); - for (i = 0; i < 8; i++) + for (i = 0; i < 16; i++) printf("\tnTrafficClass[%d] = %d\n", i, PCP_ClassCfg.nTrafficClass[i]); return 0; } -int gsw_qos_pcp_class_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_pcp_class_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_PCP_ClassCfg_t PCP_ClassCfg; unsigned char nTrafficClass; @@ -272,7 +275,7 @@ int gsw_qos_pcp_class_set(int argc, char *argv[], int fd, int numPar) if (cnt != 2) return (-2); - if (nPCP >= 8) { + if (nPCP >= 16) { printf("ERROR: Given \"nPCP\" is out of range (7)\n"); return (-3); } @@ -290,7 +293,7 @@ int gsw_qos_pcp_class_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_qos_dscp_drop_precedence_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_dscp_drop_precedence_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_DSCP_DropPrecedenceCfg_t DropPrecedenceCfg; int i; @@ -332,7 +335,7 @@ int gsw_qos_dscp_drop_precedence_cfg_get(int argc, char *argv[], int fd, int num return 0; } -int gsw_qos_dscp_drop_precedence_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_qos_dscp_drop_precedence_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_DSCP_DropPrecedenceCfg_t DropPrecedenceCfg; unsigned int nDSCP_DropPrecedence, nDSCP, cnt; @@ -360,7 +363,7 @@ int gsw_qos_dscp_drop_precedence_cfg_set(int argc, char *argv[], int fd, int num return 0; } -int gsw_qos_meter_port_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_meter_port_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_meterPortGet_t qos_meterportget; @@ -404,7 +407,7 @@ int gsw_qos_meter_port_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_version_get(int argc, char *argv[], int fd, int numPar) +int gsw_version_get(int argc, char *argv[], void *fd, int numPar) { GSW_version_t version; int i; @@ -426,7 +429,7 @@ int gsw_version_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_cap_get(int argc, char *argv[], int fd, int numPar) +int gsw_cap_get(int argc, char *argv[], void *fd, int numPar) { GSW_cap_t cap; GSW_capType_t i; @@ -446,7 +449,7 @@ int gsw_cap_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_cpu_port_extend_cfg_get(int argc, char *argv[], int fd, int numPar) +int gsw_cpu_port_extend_cfg_get(int argc, char *argv[], void *fd, int numPar) { GSW_CPU_PortExtendCfg_t CPU_PortExtendCfg; char *peHeaderAdd; @@ -500,7 +503,7 @@ int gsw_cpu_port_extend_cfg_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_cpu_port_extend_cfg_set(int argc, char *argv[], int fd, int numPar) +int gsw_cpu_port_extend_cfg_set(int argc, char *argv[], void *fd, int numPar) { GSW_CPU_PortExtendCfg_t CPU_PortExtendCfg; unsigned int cnt; @@ -563,7 +566,7 @@ static int multicastParamRead(int argc, char *argv[], GSW_multicastTable_t *para return 0; } -int gsw_multicast_table_entry_add(int argc, char *argv[], int fd, int numPar) +int gsw_multicast_table_entry_add(int argc, char *argv[], void *fd, int numPar) { GSW_multicastTable_t param; int retval; @@ -578,7 +581,7 @@ int gsw_multicast_table_entry_add(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_multicast_table_entry_remove(int argc, char *argv[], int fd, int numPar) +int gsw_multicast_table_entry_remove(int argc, char *argv[], void *fd, int numPar) { GSW_multicastTable_t param; int retval; @@ -596,39 +599,61 @@ int gsw_multicast_table_entry_remove(int argc, char *argv[], int fd, int numPar) static void dump_multicast_table_entry(GSW_multicastTableRead_t *ptr) { if (ptr->eIPVersion == GSW_IP_SELECT_IPV4) { - printf("%24s", ""); printIPv4_Address(ptr->uIP_Gda.nIPv4); } else printIPv6_Address(ptr->uIP_Gda.nIPv6); if (ptr->eModeMember != GSW_IGMP_MEMBER_DONT_CARE) { - printf(" | "); if (ptr->eIPVersion == GSW_IP_SELECT_IPV4) { - printf("%24s", ""); printIPv4_Address(ptr->uIP_Gsa.nIPv4); } else printIPv6_Address(ptr->uIP_Gsa.nIPv6); - printf(" | %s\n", (ptr->eModeMember == GSW_IGMP_MEMBER_INCLUDE) ? "INCLUDE" : "EXCLUDE"); - printf(" | %s\n", (ptr->bExclSrcIP == 1) ? "TRUE" : "FALSE"); - } else - printf("\n"); + printf(" %11s |", (ptr->eModeMember == GSW_IGMP_MEMBER_INCLUDE) ? "INCLUDE" : "EXCLUDE"); + printf(" %10s |", (ptr->bExclSrcIP == 1) ? "TRUE" : "FALSE"); + } + + if (gswip_version == GSWIP_3_1 || gswip_version == GSWIP_3_2) + printf(" %9d |", ptr->hitstatus); + + printf("\n"); + } -int gsw_multicast_table_entry_read(int argc, char *argv[], int fd, int numPar) +int gsw_multicast_table_entry_read(int argc, char *argv[], void *fd, int numPar) { GSW_multicastTableRead_t multicastTableRead; + int k = 0, valid = 0; + u8 mcasthitsts_en = 0; + + if (gswip_version == GSWIP_3_1 || gswip_version == GSWIP_3_2) { + GSW_register_t param; + memset(¶m, 0, sizeof(GSW_register_t)); + param.nRegAddr = 0x456; + + if (cli_ioctl(fd, GSW_REGISTER_GET, ¶m) != 0) { + printf("ioctl returned with ERROR!\n"); + return (-1); + } + + if (param.nData & 0x2000) + mcasthitsts_en = 1; + else + mcasthitsts_en = 0; + } + + + if (gswip_version == GSWIP_3_1 || gswip_version == GSWIP_3_2) { + printf("-----------------------------------------------------------------------------------------------------------\n"); + printf("| %4s | %15s | %3s | %15s | %15s | %11s | %10s | %9s |\n", "Port", "Sub Id", "FID", "GDA", "GSA", "Member Mode", "bExclSrcIP", "HitStatus"); + printf("-----------------------------------------------------------------------------------------------------------\n"); + } else { + printf("-----------------------------------------------------------------------------------------------\n"); + printf("| %4s | %15s | %3s | %15s | %15s | %11s | %10s |\n", "Port", "Sub Id", "FID", "GDA", "GSA", "Member Mode", "bExclSrcIP"); + printf("-----------------------------------------------------------------------------------------------\n"); + } -#if 0 - printf("-------------------------------------------------------------------------------------------------------\n"); - printf(" Port | GDA | GSA | Member Mode\n"); - printf("-------------------------------------------------------------------------------------------------------\n"); -#else - printf("-------------------------------------------------------------------------------------------------------\n"); - printf(" Port | Sub Id | FID | GDA | GSA | Member Mode | bExclSrcIP\n"); - printf("-------------------------------------------------------------------------------------------------------\n"); -#endif memset(&multicastTableRead, 0x00, sizeof(multicastTableRead)); multicastTableRead.bInitial = 1; @@ -641,37 +666,88 @@ int gsw_multicast_table_entry_read(int argc, char *argv[], int fd, int numPar) break; + if ((multicastTableRead.nPortId == 0) && (multicastTableRead.nSubIfId == 0) && (multicastTableRead.nFID == 0)) { + valid = 0; + + for (k = 0; k < 8; k++) { + if (multicastTableRead.uIP_Gsa.nIPv6[k] != 0) + valid = 1; + } + + for (k = 0; k < 8; k++) { + if (multicastTableRead.uIP_Gda.nIPv6[k] != 0) + valid = 1; + } + + for (k = 0; k < 16; k++) { + if (multicastTableRead.nPortMap[k] != 0) + valid = 1; + } + + if (valid == 0) + continue; + } + if (multicastTableRead.nPortId & GSW_PORTMAP_FLAG_GET(GSW_multicastTableRead_t)) { - unsigned int i = 0, mask = 1; + unsigned int i = 0, j = 0, mask = 1; + + if (gswip_version == GSWIP_3_1 || gswip_version == GSWIP_3_2) { + for (j = 0; j < 16; j++) { + i = 0; + mask = 1; + + if (!multicastTableRead.nPortMap[j]) + continue; + + while (mask <= (1 << 16)) { + if (mask & multicastTableRead.nPortMap[j]) { + if (mcasthitsts_en && (j == 7) && (mask == (1 << 15))) { + break; + } + + printf("| %4d |", (j * 16) + i); + printf(" %15d |", multicastTableRead.nSubIfId); + printf(" %3d |", multicastTableRead.nFID); + dump_multicast_table_entry(&multicastTableRead); + } - while (mask != GSW_PORTMAP_FLAG_GET(GSW_multicastTableRead_t)) { - if (mask & multicastTableRead.nPortId) { - printf(" %4d | ", i); - dump_multicast_table_entry(&multicastTableRead); + i++; + mask = 1 << i; + } } + } else { + while (mask != GSW_PORTMAP_FLAG_GET(GSW_multicastTableRead_t)) { + if (mask & multicastTableRead.nPortId) { + printf("| %4d |", (j * 16) + i); + printf(" %15d |", multicastTableRead.nSubIfId); + printf(" %3d |", multicastTableRead.nFID); + dump_multicast_table_entry(&multicastTableRead); + } - i++; - mask = 1 << i; + i++; + mask = 1 << i; + } } - - printf(" %d | ", multicastTableRead.nSubIfId); - printf(" %d | ", multicastTableRead.nFID); } else { - printf(" %d | ", multicastTableRead.nPortId); - printf(" %d | ", multicastTableRead.nSubIfId); - printf(" %d | ", multicastTableRead.nFID); + printf("| %4d |", multicastTableRead.nPortId); + printf(" %15d |", multicastTableRead.nSubIfId); + printf(" %3d |", multicastTableRead.nFID); dump_multicast_table_entry(&multicastTableRead); } memset(&multicastTableRead, 0x00, sizeof(multicastTableRead)); } - printf("-------------------------------------------------------------------------------------------------------\n"); + if (gswip_version == GSWIP_3_1 || gswip_version == GSWIP_3_2) + printf("-----------------------------------------------------------------------------------------------------------\n"); + else + printf("-----------------------------------------------------------------------------------------------\n"); + return 0; } -int gsw_vlan_port_member_read(int argc, char *argv[], int fd, int numPar) +int gsw_vlan_port_member_read(int argc, char *argv[], void *fd, int numPar) { GSW_VLAN_portMemberRead_t portMemberRead; diff --git a/src/gsw_cli_fkts_flow.c b/src/gsw_cli_fkts_flow.c index a128b882e88a7ae7077c5228d297501bb747c9c9..cd70c20efff9210073c27291aabf6e91ee98d7da 100644 --- a/src/gsw_cli_fkts_flow.c +++ b/src/gsw_cli_fkts_flow.c @@ -24,14 +24,17 @@ #define NUM_TC 16 -int gsw_pce_rule_read(int argc, char *argv[], int fd, int numPar) +int gsw_pce_rule_read(int argc, char *argv[], void *fd, int numPar) { GSW_PCE_rule_t pce_rule; int cnt, i; memset(&pce_rule, 0x00, sizeof(pce_rule)); - cnt = scanParamArg(argc, argv, "pattern.nIndex", sizeof(pce_rule.pattern.nIndex), &pce_rule.pattern.nIndex); + cnt += scanParamArg(argc, argv, "pattern.nIndex", sizeof(pce_rule.pattern.nIndex), &pce_rule.pattern.nIndex); + cnt += scanParamArg(argc, argv, "nRegion", sizeof(pce_rule.region), &pce_rule.region); + cnt += scanParamArg(argc, argv, "nLogicalPortId", sizeof(pce_rule.logicalportid), &pce_rule.logicalportid); + cnt += scanParamArg(argc, argv, "nSubIfIdGroup", sizeof(pce_rule.subifidgroup), &pce_rule.subifidgroup); if (cnt == 0) return (-2); @@ -40,38 +43,38 @@ int gsw_pce_rule_read(int argc, char *argv[], int fd, int numPar) return (-3); if (pce_rule.pattern.bEnable) { - printf("\n\tp.nIndex = %u", pce_rule.pattern.nIndex); + printf("\n\tp.nIndex = %u", pce_rule.pattern.nIndex); if (pce_rule.pattern.bMAC_DstEnable) { - printf("\n\tp.bMAC_DstEnable = %u", pce_rule.pattern.bMAC_DstEnable); - printf("\n\tp.nMAC_Dst = "); + printf("\n\tp.bMAC_DstEnable = %u", pce_rule.pattern.bMAC_DstEnable); + printf("\n\tp.nMAC_Dst = "); for (i = 0; i < 6; i++) { printf("%2.2x", pce_rule.pattern.nMAC_Dst[i]); } - printf("\n\tp.nMAC_DstMask = 0x%x", pce_rule.pattern.nMAC_DstMask); + printf("\n\tp.nMAC_DstMask = 0x%x", pce_rule.pattern.nMAC_DstMask); } if (pce_rule.pattern.bMAC_SrcEnable) { - printf("\n\tp.bMAC_SrcEnable = %u", pce_rule.pattern.bMAC_SrcEnable); - printf("\n\tp.nMAC_Src = "); + printf("\n\tp.bMAC_SrcEnable = %u", pce_rule.pattern.bMAC_SrcEnable); + printf("\n\tp.nMAC_Src = "); for (i = 0; i < 6; i++) { printf("%2.2x", pce_rule.pattern.nMAC_Src[i]); } - printf("\n\tp.nMAC_SrcMask = 0x%x", pce_rule.pattern.nMAC_SrcMask); + printf("\n\tp.nMAC_SrcMask = 0x%x", pce_rule.pattern.nMAC_SrcMask); } if (pce_rule.pattern.eDstIP_Select) { - printf("\n\tp.eDstIP_Select = %u", pce_rule.pattern.eDstIP_Select); + printf("\n\tp.eDstIP_Select = %u", pce_rule.pattern.eDstIP_Select); if (pce_rule.pattern.eDstIP_Select == GSW_PCE_IP_V4) { - printf("\n\tp.nDstIP = 0x%x", pce_rule.pattern.nDstIP.nIPv4); - printf("\n\tp.nDstIP_Mask = 0x%x", pce_rule.pattern.nDstIP_Mask); + printf("\n\tp.nDstIP = 0x%x", pce_rule.pattern.nDstIP.nIPv4); + printf("\n\tp.nDstIP_Mask = 0x%x", pce_rule.pattern.nDstIP_Mask); } else if (pce_rule.pattern.eDstIP_Select == GSW_PCE_IP_V6) { - printf("\n\tp.nDstIP = "); + printf("\n\tp.nDstIP = "); for (i = 0; i < 8; i++) { if (i == 7) @@ -80,18 +83,18 @@ int gsw_pce_rule_read(int argc, char *argv[], int fd, int numPar) printf("%x:", pce_rule.pattern.nDstIP.nIPv6[i]); } - printf("\n\tp.nDstIP_Mask = 0x%x", pce_rule.pattern.nDstIP_Mask); + printf("\n\tp.nDstIP_Mask = 0x%x", pce_rule.pattern.nDstIP_Mask); } } if (pce_rule.pattern.eInnerDstIP_Select) { - printf("\n\tp.eInnerDstIP_Select = %u", pce_rule.pattern.eInnerDstIP_Select); + printf("\n\tp.eInnerDstIP_Select = %u", pce_rule.pattern.eInnerDstIP_Select); if (pce_rule.pattern.eInnerDstIP_Select == GSW_PCE_IP_V4) { - printf("\n\tp.nInnerDstIP = 0x%x", pce_rule.pattern.nInnerDstIP.nIPv4); - printf("\n\tp.nInnerDstIP_Mask = 0x%x", pce_rule.pattern.nInnerDstIP_Mask); + printf("\n\tp.nInnerDstIP = 0x%x", pce_rule.pattern.nInnerDstIP.nIPv4); + printf("\n\tp.nInnerDstIP_Mask = 0x%x", pce_rule.pattern.nInnerDstIP_Mask); } else if (pce_rule.pattern.eInnerDstIP_Select == GSW_PCE_IP_V6) { - printf("\n\tp.nInnerDstIP = "); + printf("\n\tp.nInnerDstIP = "); for (i = 0; i < 8; i++) { if (i == 7) @@ -100,18 +103,18 @@ int gsw_pce_rule_read(int argc, char *argv[], int fd, int numPar) printf("%x:", pce_rule.pattern.nInnerDstIP.nIPv6[i]); } - printf("\n\tp.nInnerDstIP_Mask = 0x%x", pce_rule.pattern.nInnerDstIP_Mask); + printf("\n\tp.nInnerDstIP_Mask = 0x%x", pce_rule.pattern.nInnerDstIP_Mask); } } if (pce_rule.pattern.eSrcIP_Select) { - printf("\n\tp.eSrcIP_Select = %u", pce_rule.pattern.eSrcIP_Select); + printf("\n\tp.eSrcIP_Select = %u", pce_rule.pattern.eSrcIP_Select); if (pce_rule.pattern.eSrcIP_Select == GSW_PCE_IP_V4) { - printf("\n\tp.nSrcIP = 0x%x", pce_rule.pattern.nSrcIP.nIPv4); - printf("\n\tp.nSrcIP_Mask = 0x%x", pce_rule.pattern.nSrcIP_Mask); + printf("\n\tp.nSrcIP = 0x%x", pce_rule.pattern.nSrcIP.nIPv4); + printf("\n\tp.nSrcIP_Mask = 0x%x", pce_rule.pattern.nSrcIP_Mask); } else if (pce_rule.pattern.eSrcIP_Select == GSW_PCE_IP_V6) { - printf("\n\tp.nSrcIP = "); + printf("\n\tp.nSrcIP = "); for (i = 0; i < 8; i++) { if (i == 7) @@ -120,18 +123,18 @@ int gsw_pce_rule_read(int argc, char *argv[], int fd, int numPar) printf("%x:", pce_rule.pattern.nSrcIP.nIPv6[i]); } - printf("\n\tp.nSrcIP_Mask = 0x%x", pce_rule.pattern.nSrcIP_Mask); + printf("\n\tp.nSrcIP_Mask = 0x%x", pce_rule.pattern.nSrcIP_Mask); } } if (pce_rule.pattern.eInnerSrcIP_Select) { - printf("\n\tp.eInnerSrcIP_Select = %u", pce_rule.pattern.eInnerSrcIP_Select); + printf("\n\tp.eInnerSrcIP_Select = %u", pce_rule.pattern.eInnerSrcIP_Select); if (pce_rule.pattern.eInnerSrcIP_Select == GSW_PCE_IP_V4) { - printf("\n\tp.nInnerSrcIP = 0x%x", pce_rule.pattern.nInnerSrcIP.nIPv4); - printf("\n\tp.nInnerSrcIP_Mask = 0x%x", pce_rule.pattern.nInnerSrcIP_Mask); + printf("\n\tp.nInnerSrcIP = 0x%x", pce_rule.pattern.nInnerSrcIP.nIPv4); + printf("\n\tp.nInnerSrcIP_Mask = 0x%x", pce_rule.pattern.nInnerSrcIP_Mask); } else if (pce_rule.pattern.eInnerSrcIP_Select == GSW_PCE_IP_V6) { - printf("\n\tp.nInnerSrcIP = "); + printf("\n\tp.nInnerSrcIP = "); for (i = 0; i < 8; i++) { if (i == 7) @@ -140,89 +143,89 @@ int gsw_pce_rule_read(int argc, char *argv[], int fd, int numPar) printf("%x:", pce_rule.pattern.nInnerSrcIP.nIPv6[i]); } - printf("\n\tp.nInnerSrcIP_Mask = 0x%x", pce_rule.pattern.nInnerSrcIP_Mask); + printf("\n\tp.nInnerSrcIP_Mask = 0x%x", pce_rule.pattern.nInnerSrcIP_Mask); } } if (pce_rule.pattern.bVid) { - printf("\n\tp.bVid = %u", pce_rule.pattern.bVid); - printf("\n\tp.nVid = %u", pce_rule.pattern.nVid); + printf("\n\tp.bVid = %u", pce_rule.pattern.bVid); + printf("\n\tp.nVid = %u", pce_rule.pattern.nVid); if (pce_rule.pattern.bVidRange_Select) - printf("\n\tp.bVidRange_Select = %u (Range Key)", pce_rule.pattern.bVidRange_Select); + printf("\n\tp.bVidRange_Select = %u (Range Key)", pce_rule.pattern.bVidRange_Select); else - printf("\n\tp.bVidRange_Select = %u (Mask Key)", pce_rule.pattern.bVidRange_Select); + printf("\n\tp.bVidRange_Select = %u (Mask Key)", pce_rule.pattern.bVidRange_Select); - printf("\n\tp.nVidRange = %u", pce_rule.pattern.nVidRange); - printf("\n\tp.bVid_Original = %u", pce_rule.pattern.bVid_Original); + printf("\n\tp.nVidRange = %u", pce_rule.pattern.nVidRange); + printf("\n\tp.bVid_Original = %u", pce_rule.pattern.bVid_Original); } if (pce_rule.pattern.bSLAN_Vid) { - printf("\n\tp.bSLAN_Vid = %u", pce_rule.pattern.bSLAN_Vid); - printf("\n\tp.nSLAN_Vid = %u", pce_rule.pattern.nSLAN_Vid); + printf("\n\tp.bSLAN_Vid = %u", pce_rule.pattern.bSLAN_Vid); + printf("\n\tp.nSLAN_Vid = %u", pce_rule.pattern.nSLAN_Vid); if (pce_rule.pattern.bSVidRange_Select) - printf("\n\tp.bSVidRange_Select = %u (Range Key)", pce_rule.pattern.bSVidRange_Select); + printf("\n\tp.bSVidRange_Select = %u (Range Key)", pce_rule.pattern.bSVidRange_Select); else - printf("\n\tp.bSVidRange_Select = %u (Mask Key)", pce_rule.pattern.bSVidRange_Select); + printf("\n\tp.bSVidRange_Select = %u (Mask Key)", pce_rule.pattern.bSVidRange_Select); - printf("\n\tp.nOuterVidRange = %u", pce_rule.pattern.nOuterVidRange); - printf("\n\tp.bOuterVid_Original = %u", pce_rule.pattern.bOuterVid_Original); + printf("\n\tp.nOuterVidRange = %u", pce_rule.pattern.nOuterVidRange); + printf("\n\tp.bOuterVid_Original = %u", pce_rule.pattern.bOuterVid_Original); } if (pce_rule.pattern.bPortIdEnable) { - printf("\n\tp.bPortIdEnable = %u", pce_rule.pattern.bPortIdEnable); - printf("\n\tp.nPortId = %u", pce_rule.pattern.nPortId); + printf("\n\tp.bPortIdEnable = %u", pce_rule.pattern.bPortIdEnable); + printf("\n\tp.nPortId = %u", pce_rule.pattern.nPortId); } if (pce_rule.pattern.bSubIfIdEnable) { - printf("\n\tp.bSubIfIdEnable = %u", pce_rule.pattern.bSubIfIdEnable); - printf("\n\tp.eSubIfIdType = %u", pce_rule.pattern.eSubIfIdType); - printf("\n\tp.nSubIfId = %u", pce_rule.pattern.nSubIfId); + printf("\n\tp.bSubIfIdEnable = %u", pce_rule.pattern.bSubIfIdEnable); + printf("\n\tp.eSubIfIdType = %u", pce_rule.pattern.eSubIfIdType); + printf("\n\tp.nSubIfId = %u", pce_rule.pattern.nSubIfId); } if (pce_rule.pattern.bPktLngEnable) { - printf("\n\tp.bPktLngEnable = %u", pce_rule.pattern.bPktLngEnable); - printf("\n\tp.nPktLng = %u", pce_rule.pattern.nPktLng); - printf("\n\tp.nPktLngRange = %u", pce_rule.pattern.nPktLngRange); + printf("\n\tp.bPktLngEnable = %u", pce_rule.pattern.bPktLngEnable); + printf("\n\tp.nPktLng = %u", pce_rule.pattern.nPktLng); + printf("\n\tp.nPktLngRange = %u", pce_rule.pattern.nPktLngRange); } if (pce_rule.pattern.bPayload1_SrcEnable) { - printf("\n\tp.nPayload1 = 0x%x", pce_rule.pattern.nPayload1); - printf("\n\tp.bPayload1MaskRange_Select = %u", pce_rule.pattern.bPayload1MaskRange_Select); - printf("\n\tp.nPayload1_Mask = 0x%x", pce_rule.pattern.nPayload1_Mask); - printf("\n\tp.bPayload1_Exclude = %u", pce_rule.pattern.bPayload1_Exclude); + printf("\n\tp.nPayload1 = 0x%x", pce_rule.pattern.nPayload1); + printf("\n\tp.bPayload1MaskRange_Select = %u", pce_rule.pattern.bPayload1MaskRange_Select); + printf("\n\tp.nPayload1_Mask = 0x%x", pce_rule.pattern.nPayload1_Mask); + printf("\n\tp.bPayload1_Exclude = %u", pce_rule.pattern.bPayload1_Exclude); } if (pce_rule.pattern.bPayload2_SrcEnable) { - printf("\n\tp.nPayload2 = 0x%x", pce_rule.pattern.nPayload2); - printf("\n\tp.bPayload2MaskRange_Select = %u", pce_rule.pattern.bPayload2MaskRange_Select); - printf("\n\tp.nPayload2_Mask = 0x%x", pce_rule.pattern.nPayload2_Mask); - printf("\n\tp.bPayload2_Exclude = %u", pce_rule.pattern.bPayload2_Exclude); + printf("\n\tp.nPayload2 = 0x%x", pce_rule.pattern.nPayload2); + printf("\n\tp.bPayload2MaskRange_Select = %u", pce_rule.pattern.bPayload2MaskRange_Select); + printf("\n\tp.nPayload2_Mask = 0x%x", pce_rule.pattern.nPayload2_Mask); + printf("\n\tp.bPayload2_Exclude = %u", pce_rule.pattern.bPayload2_Exclude); } if (pce_rule.pattern.bParserFlagLSB_Enable) { - printf("\n\tp.nParserFlagLSB = 0x%x", pce_rule.pattern.nParserFlagLSB); - printf("\n\tp.nParserFlagLSB_Mask = 0x%x", pce_rule.pattern.nParserFlagLSB_Mask); - printf("\n\tp.bParserFlagLSB_Exclude = %u", pce_rule.pattern.bParserFlagLSB_Exclude); + printf("\n\tp.nParserFlagLSB = 0x%x", pce_rule.pattern.nParserFlagLSB); + printf("\n\tp.nParserFlagLSB_Mask = 0x%x", pce_rule.pattern.nParserFlagLSB_Mask); + printf("\n\tp.bParserFlagLSB_Exclude = %u", pce_rule.pattern.bParserFlagLSB_Exclude); } if (pce_rule.pattern.bParserFlagMSB_Enable) { - printf("\n\tp.nParserFlagMSB = 0x%x", pce_rule.pattern.nParserFlagMSB); - printf("\n\tp.nParserFlagMSB_Mask = 0x%x", pce_rule.pattern.nParserFlagMSB_Mask); - printf("\n\tp.bParserFlagMSB_Exclude = %u", pce_rule.pattern.bParserFlagMSB_Exclude); + printf("\n\tp.nParserFlagMSB = 0x%x", pce_rule.pattern.nParserFlagMSB); + printf("\n\tp.nParserFlagMSB_Mask = 0x%x", pce_rule.pattern.nParserFlagMSB_Mask); + printf("\n\tp.bParserFlagMSB_Exclude = %u", pce_rule.pattern.bParserFlagMSB_Exclude); } if (pce_rule.pattern.bParserFlag1LSB_Enable) { - printf("\n\tp.nParserFlag1LSB = 0x%x", pce_rule.pattern.nParserFlag1LSB); - printf("\n\tp.nParserFlag1LSB_Mask = 0x%x", pce_rule.pattern.nParserFlag1LSB_Mask); - printf("\n\tp.bParserFlag1LSB_Exclude = %u", pce_rule.pattern.bParserFlag1LSB_Exclude); + printf("\n\tp.nParserFlag1LSB = 0x%x", pce_rule.pattern.nParserFlag1LSB); + printf("\n\tp.nParserFlag1LSB_Mask = 0x%x", pce_rule.pattern.nParserFlag1LSB_Mask); + printf("\n\tp.bParserFlag1LSB_Exclude = %u", pce_rule.pattern.bParserFlag1LSB_Exclude); } if (pce_rule.pattern.bParserFlag1MSB_Enable) { - printf("\n\tp.nParserFlag1MSB = 0x%x", pce_rule.pattern.nParserFlag1MSB); - printf("\n\tp.nParserFlag1MSB_Mask = 0x%x", pce_rule.pattern.nParserFlag1MSB_Mask); - printf("\n\tp.bParserFlag1MSB_Exclude = %u", pce_rule.pattern.bParserFlag1MSB_Exclude); + printf("\n\tp.nParserFlag1MSB = 0x%x", pce_rule.pattern.nParserFlag1MSB); + printf("\n\tp.nParserFlag1MSB_Mask = 0x%x", pce_rule.pattern.nParserFlag1MSB_Mask); + printf("\n\tp.bParserFlag1MSB_Exclude = %u", pce_rule.pattern.bParserFlag1MSB_Exclude); } #if 0 @@ -236,143 +239,283 @@ int gsw_pce_rule_read(int argc, char *argv[], int fd, int numPar) #endif if (pce_rule.action.eLearningAction) - printf("\n\ta.eLearningAction = %u", pce_rule.action.eLearningAction); + printf("\n\ta.eLearningAction = %u", pce_rule.action.eLearningAction); if (pce_rule.action.eSnoopingTypeAction) - printf("\n\ta.eSnoopingTypeAction = %u", pce_rule.action.eSnoopingTypeAction); + printf("\n\ta.eSnoopingTypeAction = %u", pce_rule.action.eSnoopingTypeAction); if (pce_rule.pattern.bEtherTypeEnable) { - printf("\n\tp.nEtherType = 0x%x", pce_rule.pattern.nEtherType); - printf("\n\tp.nEtherTypeMask = 0x%x", pce_rule.pattern.nEtherTypeMask); + printf("\n\tp.nEtherType = 0x%x", pce_rule.pattern.nEtherType); + printf("\n\tp.nEtherTypeMask = 0x%x", pce_rule.pattern.nEtherTypeMask); } if (pce_rule.pattern.bProtocolEnable) { - printf("\n\tp.nProtocol = 0x%x", pce_rule.pattern.nProtocol); - printf("\n\tp.nProtocolMask = 0x%x", pce_rule.pattern.nProtocolMask); - printf("\n\tp.bProtocol_Exclude = 0x%x", pce_rule.pattern.bProtocol_Exclude); + printf("\n\tp.nProtocol = 0x%x", pce_rule.pattern.nProtocol); + printf("\n\tp.nProtocolMask = 0x%x", pce_rule.pattern.nProtocolMask); + printf("\n\tp.bProtocol_Exclude = 0x%x", pce_rule.pattern.bProtocol_Exclude); } if (pce_rule.pattern.bInnerProtocolEnable) { - printf("\n\tp.nInnerProtocol = 0x%x", pce_rule.pattern.nInnerProtocol); - printf("\n\tp.nInnerProtocolMask = 0x%x", pce_rule.pattern.nInnerProtocolMask); - printf("\n\tp.bInnerProtocol_Exclude = 0x%x", pce_rule.pattern.bInnerProtocol_Exclude); + printf("\n\tp.nInnerProtocol = 0x%x", pce_rule.pattern.nInnerProtocol); + printf("\n\tp.nInnerProtocolMask = 0x%x", pce_rule.pattern.nInnerProtocolMask); + printf("\n\tp.bInnerProtocol_Exclude = 0x%x", pce_rule.pattern.bInnerProtocol_Exclude); } if (pce_rule.pattern.bSessionIdEnable) { - printf("\n\tp.bSessionIdEnable = 0x%x", pce_rule.pattern.bSessionIdEnable); - printf("\n\tp.nSessionId = 0x%x", pce_rule.pattern.nSessionId); + printf("\n\tp.bSessionIdEnable = 0x%x", pce_rule.pattern.bSessionIdEnable); + printf("\n\tp.nSessionId = 0x%x", pce_rule.pattern.nSessionId); } if (pce_rule.pattern.bPPP_ProtocolEnable) { - printf("\n\tp.nPPP_Protocol = 0x%x", pce_rule.pattern.nPPP_Protocol); - printf("\n\tp.nPPP_ProtocolMask = 0x%x", pce_rule.pattern.nPPP_ProtocolMask); - printf("\n\tp.bPPP_Protocol_Exclude = 0x%x", pce_rule.pattern.bPPP_Protocol_Exclude); + printf("\n\tp.nPPP_Protocol = 0x%x", pce_rule.pattern.nPPP_Protocol); + printf("\n\tp.nPPP_ProtocolMask = 0x%x", pce_rule.pattern.nPPP_ProtocolMask); + printf("\n\tp.bPPP_Protocol_Exclude = 0x%x", pce_rule.pattern.bPPP_Protocol_Exclude); } if (pce_rule.pattern.bAppDataMSB_Enable) { - printf("\n\tp.nAppDataMSB = 0x%x", pce_rule.pattern.nAppDataMSB); - printf("\n\tp.bAppMaskRangeMSB_Select = %u", pce_rule.pattern.bAppMaskRangeMSB_Select); - printf("\n\tp.nAppMaskRangeMSB = 0x%x", pce_rule.pattern.nAppMaskRangeMSB); + printf("\n\tp.nAppDataMSB = 0x%x", pce_rule.pattern.nAppDataMSB); + printf("\n\tp.bAppMaskRangeMSB_Select = %u", pce_rule.pattern.bAppMaskRangeMSB_Select); + printf("\n\tp.nAppMaskRangeMSB = 0x%x", pce_rule.pattern.nAppMaskRangeMSB); } if (pce_rule.pattern.bAppDataLSB_Enable) { - printf("\n\tp.nAppDataLSB = 0x%x", pce_rule.pattern.nAppDataLSB); - printf("\n\tp.bAppMaskRangeLSB_Select = %u", pce_rule.pattern.bAppMaskRangeLSB_Select); - printf("\n\tp.nAppMaskRangeLSB = 0x%x", pce_rule.pattern.nAppMaskRangeLSB); + printf("\n\tp.nAppDataLSB = 0x%x", pce_rule.pattern.nAppDataLSB); + printf("\n\tp.bAppMaskRangeLSB_Select = %u", pce_rule.pattern.bAppMaskRangeLSB_Select); + printf("\n\tp.nAppMaskRangeLSB = 0x%x", pce_rule.pattern.nAppMaskRangeLSB); } if (pce_rule.pattern.bDSCP_Enable) - printf("\n\tp.nDSCP = %u", pce_rule.pattern.nDSCP); + printf("\n\tp.nDSCP = %u", pce_rule.pattern.nDSCP); if (pce_rule.pattern.bInner_DSCP_Enable) - printf("\n\tp.nInnerDSCP = %u", pce_rule.pattern.nInnerDSCP); + printf("\n\tp.nInnerDSCP = %u", pce_rule.pattern.nInnerDSCP); if (pce_rule.action.bRemarkAction) - printf("\n\ta.bRemarkAction = Enabled val = %u", pce_rule.action.bRemarkAction); + printf("\n\ta.bRemarkAction = Enabled val = %u", pce_rule.action.bRemarkAction); if (pce_rule.action.bRemarkPCP) - printf("\n\ta.bRemarkPCP = Disabled val = %u", pce_rule.action.bRemarkPCP); + printf("\n\ta.bRemarkPCP = Disabled val = %u", pce_rule.action.bRemarkPCP); if (pce_rule.action.bRemarkDSCP) - printf("\n\ta.bRemarkDSCP = Disabled val = %u", pce_rule.action.bRemarkDSCP); + printf("\n\ta.bRemarkDSCP = Disabled val = %u", pce_rule.action.bRemarkDSCP); if (pce_rule.action.bRemarkClass) - printf("\n\ta.bRemarkClass = Disabled val = %u", pce_rule.action.bRemarkClass); + printf("\n\ta.bRemarkClass = Disabled val = %u", pce_rule.action.bRemarkClass); if (pce_rule.action.bRemarkSTAG_PCP) - printf("\n\ta.bRemarkSTAG_PCP = Disabled val = %u", pce_rule.action.bRemarkSTAG_PCP); + printf("\n\ta.bRemarkSTAG_PCP = Disabled val = %u", pce_rule.action.bRemarkSTAG_PCP); if (pce_rule.action.bRemarkSTAG_DEI) - printf("\n\ta.bRemarkSTAG_DEI = Disabled val = %u", pce_rule.action.bRemarkSTAG_DEI); + printf("\n\ta.bRemarkSTAG_DEI = Disabled val = %u", pce_rule.action.bRemarkSTAG_DEI); if ((pce_rule.action.bRMON_Action) || (pce_rule.action.bFlowID_Action)) { - printf("\n\ta.nFlowID/nRmon_ID = %u", pce_rule.action.nFlowID); + printf("\n\ta.nFlowID/nRmon_ID = %u", pce_rule.action.nFlowID); } if (pce_rule.pattern.bPCP_Enable) { - printf("\n\tp.bPCP_Enable = %u", pce_rule.pattern.bPCP_Enable); - printf("\n\tp.nPCP = %u", pce_rule.pattern.nPCP); + printf("\n\tp.bPCP_Enable = %u", pce_rule.pattern.bPCP_Enable); + printf("\n\tp.nPCP = %u", pce_rule.pattern.nPCP); } if (pce_rule.pattern.bSTAG_PCP_DEI_Enable) { - printf("\n\tp.bSTAG_PCP_DEI_Enable = %u", pce_rule.pattern.bSTAG_PCP_DEI_Enable); - printf("\n\tp.nSTAG_PCP_DEI = %u", pce_rule.pattern.nSTAG_PCP_DEI); + printf("\n\tp.bSTAG_PCP_DEI_Enable = %u", pce_rule.pattern.bSTAG_PCP_DEI_Enable); + printf("\n\tp.nSTAG_PCP_DEI = %u", pce_rule.pattern.nSTAG_PCP_DEI); } if (pce_rule.action.ePortMapAction) { - printf("\n\ta.ePortMapAction = 0x%x", pce_rule.action.ePortMapAction); + printf("\n\ta.ePortMapAction = 0x%x", pce_rule.action.ePortMapAction); for (i = 0; i < 8; i++) { if (pce_rule.action.nForwardPortMap[i]) - printf("\n\ta.nForwardPortMap[%d] = 0x%x", i, pce_rule.action.nForwardPortMap[i]); + printf("\n\ta.nForwardPortMap[%d] = 0x%x", i, pce_rule.action.nForwardPortMap[i]); } } if (pce_rule.action.eTrafficClassAction) { - printf("\n\ta.eTrafficClassAction = %u", pce_rule.action.eTrafficClassAction); - printf("\n\ta.nTrafficClassAlternate = %u", pce_rule.action.nTrafficClassAlternate); + printf("\n\ta.eTrafficClassAction = %u", pce_rule.action.eTrafficClassAction); + printf("\n\ta.nTrafficClassAlternate = %u", pce_rule.action.nTrafficClassAlternate); } if (pce_rule.action.bPortTrunkAction) { - printf("\n\ta.bPortTrunkAction = Enabled"); - printf("\n\ta.bPortLinkSelection = %u", pce_rule.action.bPortLinkSelection); + printf("\n\ta.bPortTrunkAction = Enabled"); + printf("\n\ta.bPortLinkSelection = %u", pce_rule.action.bPortLinkSelection); } if (pce_rule.action.bExtendedVlanEnable) { - printf("\n\ta.bExtendedVlanEnable = Enabled"); - printf("\n\ta.nExtendedVlanBlockId = %u", pce_rule.action.nExtendedVlanBlockId); + printf("\n\ta.bExtendedVlanEnable = Enabled"); + printf("\n\ta.nExtendedVlanBlockId = %u", pce_rule.action.nExtendedVlanBlockId); } if (pce_rule.action.ePortFilterType_Action) { - printf("\n\ta.ePortFilterType_Action = %u", pce_rule.action.ePortFilterType_Action); + printf("\n\ta.ePortFilterType_Action = %u", pce_rule.action.ePortFilterType_Action); for (i = 0; i < 8; i++) { if (pce_rule.action.nForwardPortMap[i]) - printf("\n\ta.nForwardPortMap[%d] = 0x%x", i, pce_rule.action.nForwardPortMap[i]); + printf("\n\ta.nForwardPortMap[%d] = 0x%x", i, pce_rule.action.nForwardPortMap[i]); } } if (pce_rule.action.eProcessPath_Action) - printf("\n\ta.eProcessPath_Action = %u", pce_rule.action.eProcessPath_Action); + printf("\n\ta.eProcessPath_Action = %u", pce_rule.action.eProcessPath_Action); if (pce_rule.action.bOamEnable) - printf("\n\ta.bOamEnable = %u", pce_rule.action.bOamEnable); + printf("\n\ta.bOamEnable = %u", pce_rule.action.bOamEnable); if (pce_rule.action.bExtractEnable) - printf("\n\ta.bExtractEnable = %u", pce_rule.action.bExtractEnable); + printf("\n\ta.bExtractEnable = %u", pce_rule.action.bExtractEnable); if (pce_rule.action.bOamEnable || pce_rule.action.bExtractEnable) - printf("\n\ta.nRecordId = %u", pce_rule.action.nRecordId); + printf("\n\ta.nRecordId = %u", pce_rule.action.nRecordId); - if (pce_rule.action.eMeterAction) - printf("\n\ta.nMeterId = %u", pce_rule.action.nMeterId); + if (pce_rule.action.eMeterAction) { + printf("\n\ta.eMeterAction = %u", pce_rule.action.eMeterAction); + printf("\n\ta.nMeterId = %u", pce_rule.action.nMeterId); + } if (pce_rule.action.bFidEnable) - printf("\n\ta.nFId = %u", pce_rule.action.nFId); + printf("\n\ta.nFId = %u", pce_rule.action.nFId); if (pce_rule.pattern.bInsertionFlag_Enable) - printf("\n\tp.nInsertionFlag = %u", pce_rule.pattern.nInsertionFlag); + printf("\n\tp.nInsertionFlag = %u", pce_rule.pattern.nInsertionFlag); + + if (pce_rule.action.eCrossStateAction == GSW_PCE_ACTION_CROSS_STATE_CROSS) + printf("\n\tp.eCrossStateAction = GSW_PCE_ACTION_CROSS_STATE_CROSS"); + else if (pce_rule.action.eCrossStateAction == GSW_PCE_ACTION_CROSS_STATE_REGULAR) + printf("\n\tp.eCrossStateAction = GSW_PCE_ACTION_CROSS_STATE_REGULAR"); + else + printf("\n\tp.eCrossStateAction = GSW_PCE_ACTION_CROSS_STATE_DISABLE"); + + if (gswip_version == GSWIP_3_2) { + /*Applicable onlt for GSWIP 3.2*/ + printf("\n\tp.bFlexibleField4_ExcludeEnable = %u", pce_rule.pattern.bFlexibleField4_ExcludeEnable); + printf("\n\tp.bFlexibleField4_RangeEnable = %u", pce_rule.pattern.bFlexibleField4_RangeEnable); + printf("\n\tp.nFlexibleField4_ParserIndex = %u", pce_rule.pattern.nFlexibleField4_ParserIndex); + printf("\n\tp.nFlexibleField4_Value = %u", pce_rule.pattern.nFlexibleField4_Value); + printf("\n\tp.nFlexibleField4_MaskOrRange = %u", pce_rule.pattern.nFlexibleField4_MaskOrRange); + + printf("\n\tp.bFlexibleField3_ExcludeEnable = %u", pce_rule.pattern.bFlexibleField3_ExcludeEnable); + printf("\n\tp.bFlexibleField3_RangeEnable = %u", pce_rule.pattern.bFlexibleField3_RangeEnable); + printf("\n\tp.nFlexibleField3_ParserIndex = %u", pce_rule.pattern.nFlexibleField3_ParserIndex); + printf("\n\tp.nFlexibleField3_Value = %u", pce_rule.pattern.nFlexibleField3_Value); + printf("\n\tp.nFlexibleField3_MaskOrRange = %u", pce_rule.pattern.nFlexibleField3_MaskOrRange); + + printf("\n\tp.bFlexibleField2_ExcludeEnable = %u", pce_rule.pattern.bFlexibleField2_ExcludeEnable); + printf("\n\tp.bFlexibleField2_RangeEnable = %u", pce_rule.pattern.bFlexibleField2_RangeEnable); + printf("\n\tp.nFlexibleField2_ParserIndex = %u", pce_rule.pattern.nFlexibleField2_ParserIndex); + printf("\n\tp.nFlexibleField2_Value = %u", pce_rule.pattern.nFlexibleField2_Value); + printf("\n\tp.nFlexibleField2_MaskOrRange = %u", pce_rule.pattern.nFlexibleField2_MaskOrRange); + + printf("\n\tp.bFlexibleField1_ExcludeEnable = %u", pce_rule.pattern.bFlexibleField1_ExcludeEnable); + printf("\n\tp.bFlexibleField1_RangeEnable = %u", pce_rule.pattern.bFlexibleField1_RangeEnable); + printf("\n\tp.nFlexibleField1_ParserIndex = %u", pce_rule.pattern.nFlexibleField1_ParserIndex); + printf("\n\tp.nFlexibleField1_Value = %u", pce_rule.pattern.nFlexibleField1_Value); + printf("\n\tp.nFlexibleField1_MaskOrRange = %u", pce_rule.pattern.nFlexibleField1_MaskOrRange); + + if (pce_rule.action.sPBB_Action.bIheaderActionEnable) { + printf("\n\ta.sPBB_Action.bIheaderActionEnable = %u", pce_rule.action.sPBB_Action.bIheaderActionEnable); + + switch (pce_rule.action.sPBB_Action.eIheaderOpMode) { + case GSW_PCE_I_HEADER_OPERATION_INSERT : + printf("\n\ta.sPBB_Action.eIheaderOpMode = GSW_PCE_I_HEADER_OPERATION_INSERT"); + printf("\n\ta.sPBB_Action.nTunnelIdKnownTraffic = %u", pce_rule.action.sPBB_Action.nTunnelIdKnownTraffic); + printf("\n\ta.sPBB_Action.nTunnelIdUnKnownTraffic = %u", pce_rule.action.sPBB_Action.nTunnelIdUnKnownTraffic); + printf("\n\ta.sPBB_Action.bB_DstMac_FromMacTableEnable = %u", pce_rule.action.sPBB_Action.bB_DstMac_FromMacTableEnable); + + break; + + case GSW_PCE_I_HEADER_OPERATION_REPLACE : + printf("\n\ta.sPBB_Action.eIheaderOpMode = GSW_PCE_I_HEADER_OPERATION_REPLACE"); + printf("\n\ta.sPBB_Action.nTunnelIdKnownTraffic = %u", pce_rule.action.sPBB_Action.nTunnelIdKnownTraffic); + printf("\n\ta.sPBB_Action.nTunnelIdUnKnownTraffic = %u", pce_rule.action.sPBB_Action.nTunnelIdUnKnownTraffic); + printf("\n\ta.sPBB_Action.bReplace_B_SrcMacEnable = %u", pce_rule.action.sPBB_Action.bReplace_B_SrcMacEnable); + + printf("\n\ta.sPBB_Action.bReplace_B_DstMacEnable = %u", pce_rule.action.sPBB_Action.bReplace_B_DstMacEnable); + printf("\n\ta.sPBB_Action.bReplace_I_TAG_ResEnable = %u", pce_rule.action.sPBB_Action.bReplace_I_TAG_ResEnable); + printf("\n\ta.sPBB_Action.bReplace_I_TAG_UacEnable = %u", pce_rule.action.sPBB_Action.bReplace_I_TAG_UacEnable); + printf("\n\ta.sPBB_Action.bReplace_I_TAG_DeiEnable = %u", pce_rule.action.sPBB_Action.bReplace_I_TAG_DeiEnable); + printf("\n\ta.sPBB_Action.bReplace_I_TAG_PcpEnable = %u", pce_rule.action.sPBB_Action.bReplace_I_TAG_PcpEnable); + printf("\n\ta.sPBB_Action.bReplace_I_TAG_SidEnable = %u", pce_rule.action.sPBB_Action.bReplace_I_TAG_SidEnable); + printf("\n\ta.sPBB_Action.bReplace_I_TAG_TpidEnable = %u", pce_rule.action.sPBB_Action.bReplace_I_TAG_TpidEnable); + + break; + + case GSW_PCE_I_HEADER_OPERATION_REMOVE : + printf("\n\ta.sPBB_Action.eIheaderOpMode = GSW_PCE_I_HEADER_OPERATION_REMOVE"); + + break; + + case GSW_PCE_I_HEADER_OPERATION_NOCHANGE : + printf("\n\ta.sPBB_Action.eIheaderOpMode = GSW_PCE_I_HEADER_OPERATION_NOCHANGE"); + + break; + + default: + break; + } + } + + /*Applicable onlt for GSWIP 3.2*/ + if (pce_rule.action.sPBB_Action.bBtagActionEnable) { + printf("\n\ta.sPBB_Action.bBtagActionEnable = %u", pce_rule.action.sPBB_Action.bBtagActionEnable); + + switch (pce_rule.action.sPBB_Action.eBtagOpMode) { + case GSW_PCE_B_TAG_OPERATION_INSERT : + printf("\n\ta.sPBB_Action.eBtagOpMode = GSW_PCE_B_TAG_OPERATION_INSERT"); + printf("\n\ta.sPBB_Action.nProcessIdKnownTraffic = %u", pce_rule.action.sPBB_Action.nProcessIdKnownTraffic); + printf("\n\ta.sPBB_Action.nProcessIdUnKnownTraffic = %u", pce_rule.action.sPBB_Action.nProcessIdUnKnownTraffic); + break; + + case GSW_PCE_B_TAG_OPERATION_REPLACE : + printf("\n\ta.sPBB_Action.eBtagOpMode = GSW_PCE_B_TAG_OPERATION_REPLACE"); + printf("\n\ta.sPBB_Action.nProcessIdKnownTraffic = %u", pce_rule.action.sPBB_Action.nProcessIdKnownTraffic); + printf("\n\ta.sPBB_Action.nProcessIdUnKnownTraffic = %u", pce_rule.action.sPBB_Action.nProcessIdUnKnownTraffic); + printf("\n\ta.sPBB_Action.bReplace_B_TAG_DeiEnable = %u", pce_rule.action.sPBB_Action.bReplace_B_TAG_DeiEnable); + printf("\n\ta.sPBB_Action.bReplace_B_TAG_PcpEnable = %u", pce_rule.action.sPBB_Action.bReplace_B_TAG_PcpEnable); + printf("\n\ta.sPBB_Action.bReplace_B_TAG_VidEnable = %u", pce_rule.action.sPBB_Action.bReplace_B_TAG_VidEnable); + printf("\n\ta.sPBB_Action.bReplace_B_TAG_TpidEnable = %u", pce_rule.action.sPBB_Action.bReplace_B_TAG_TpidEnable); + break; + + case GSW_PCE_B_TAG_OPERATION_REMOVE : + printf("\n\ta.sPBB_Action.eBtagOpMode = GSW_PCE_B_TAG_OPERATION_REMOVE"); + break; + + case GSW_PCE_B_TAG_OPERATION_NOCHANGE : + printf("\n\ta.sPBB_Action.eBtagOpMode = GSW_PCE_B_TAG_OPERATION_NOCHANGE"); + break; + + default: + break; + } + } + + /*Applicable onlt for GSWIP 3.2*/ + if (pce_rule.action.sPBB_Action.bMacTableMacinMacActionEnable) { + printf("\n\ta.sPBB_Action.bMacTableMacinMacActionEnable = %u", pce_rule.action.sPBB_Action.bMacTableMacinMacActionEnable); + + switch (pce_rule.action.sPBB_Action.eMacTableMacinMacSelect) { + case GSW_PCE_OUTER_MAC_SELECTED : + printf("\n\ta.sPBB_Action.eMacTableMacinMacSelect = GSW_PCE_OUTER_MAC_SELECTED"); + break; + + case GSW_PCE_INNER_MAC_SELECTED : + printf("\n\ta.sPBB_Action.eMacTableMacinMacSelect = GSW_PCE_INNER_MAC_SELECTED"); + break; + default: + break; + } + } + + /*Applicable onlt for GSWIP 3.2*/ + if (gswip_version == GSWIP_3_2) { + printf("\n\tsDestSubIF_Action.bDestSubIFIDActionEnable = %u", pce_rule.action.sDestSubIF_Action.bDestSubIFIDActionEnable); + printf("\n\tsDestSubIF_Action.bDestSubIFIDAssignmentEnable = %u", pce_rule.action.sDestSubIF_Action.bDestSubIFIDAssignmentEnable); + printf("\n\tsDestSubIF_Action.nDestSubIFGrp_Field = %u", pce_rule.action.sDestSubIF_Action.nDestSubIFGrp_Field); + } + + + + } } else { printf("\n\tp.nIndex rule not set at = %u", pce_rule.pattern.nIndex); } @@ -380,13 +523,15 @@ int gsw_pce_rule_read(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_pce_rule_write(int argc, char *argv[], int fd, int numPar) +int gsw_pce_rule_write(int argc, char *argv[], void *fd, int numPar) { GSW_PCE_rule_t pce_rule; int cnt = 0; memset(&pce_rule, 0, sizeof(pce_rule)); - + cnt += scanParamArg(argc, argv, "nRegion", sizeof(pce_rule.region), &pce_rule.region); + cnt += scanParamArg(argc, argv, "nLogicalPortId", sizeof(pce_rule.logicalportid), &pce_rule.logicalportid); + cnt += scanParamArg(argc, argv, "nSubIfIdGroup", sizeof(pce_rule.subifidgroup), &pce_rule.subifidgroup); cnt += scanParamArg(argc, argv, "pattern.nIndex", sizeof(pce_rule.pattern.nIndex), &pce_rule.pattern.nIndex); cnt += scanParamArg(argc, argv, "pattern.bEnable", sizeof(pce_rule.pattern.bEnable), &pce_rule.pattern.bEnable); cnt += scanParamArg(argc, argv, "pattern.bPortIdEnable", sizeof(pce_rule.pattern.bPortIdEnable), &pce_rule.pattern.bPortIdEnable); @@ -394,6 +539,8 @@ int gsw_pce_rule_write(int argc, char *argv[], int fd, int numPar) cnt += scanParamArg(argc, argv, "pattern.bPortId_Exclude", sizeof(pce_rule.pattern.bPortId_Exclude), &pce_rule.pattern.bPortId_Exclude); cnt += scanParamArg(argc, argv, "pattern.bSubIfIdEnable", sizeof(pce_rule.pattern.bSubIfIdEnable), &pce_rule.pattern.bSubIfIdEnable); cnt += scanParamArg(argc, argv, "pattern.nSubIfId", sizeof(pce_rule.pattern.nSubIfId), &pce_rule.pattern.nSubIfId); + cnt += scanParamArg(argc, argv, "pattern.bInsertionFlag_Enable", sizeof(pce_rule.pattern.bInsertionFlag_Enable), &pce_rule.pattern.bInsertionFlag_Enable); + cnt += scanParamArg(argc, argv, "pattern.nInsertionFlag", sizeof(pce_rule.pattern.nInsertionFlag), &pce_rule.pattern.nInsertionFlag); cnt += scanParamArg(argc, argv, "pattern.bSubIfId_Exclude", sizeof(pce_rule.pattern.bSubIfId_Exclude), &pce_rule.pattern.bSubIfId_Exclude); cnt += scanParamArg(argc, argv, "pattern.bDSCP_Enable", sizeof(pce_rule.pattern.bDSCP_Enable), &pce_rule.pattern.bDSCP_Enable); cnt += scanParamArg(argc, argv, "pattern.nDSCP", sizeof(pce_rule.pattern.nDSCP), &pce_rule.pattern.nDSCP); @@ -472,7 +619,7 @@ int gsw_pce_rule_write(int argc, char *argv[], int fd, int numPar) cnt += scanParamArg(argc, argv, "pattern.bInnerSrcIP_Exclude", sizeof(pce_rule.pattern.bInnerSrcIP_Exclude), &pce_rule.pattern.bInnerSrcIP_Exclude); cnt += scanParamArg(argc, argv, "pattern.bEtherTypeEnable", sizeof(pce_rule.pattern.bEtherTypeEnable), &pce_rule.pattern.bEtherTypeEnable); - cnt += scanParamArg(argc, argv, "pattern.nEtherType", sizeof(pce_rule.pattern.bEtherTypeEnable), &pce_rule.pattern.nEtherType); + cnt += scanParamArg(argc, argv, "pattern.nEtherType", sizeof(pce_rule.pattern.nEtherType), &pce_rule.pattern.nEtherType); cnt += scanParamArg(argc, argv, "pattern.nEtherTypeMask", sizeof(pce_rule.pattern.nEtherTypeMask), &pce_rule.pattern.nEtherTypeMask); cnt += scanParamArg(argc, argv, "pattern.bEtherType_Exclude", sizeof(pce_rule.pattern.bEtherType_Exclude), &pce_rule.pattern.bEtherType_Exclude); @@ -608,6 +755,131 @@ int gsw_pce_rule_write(int argc, char *argv[], int fd, int numPar) cnt += scanParamArg(argc, argv, "action.bExtendedVlanEnable", sizeof(pce_rule.action.bExtendedVlanEnable), &pce_rule.action.bExtendedVlanEnable); cnt += scanParamArg(argc, argv, "action.nExtendedVlanBlockId", sizeof(pce_rule.action.nExtendedVlanBlockId), &pce_rule.action.nExtendedVlanBlockId); + /*Aplicable for GSWIP 3.2*/ + + cnt += scanParamArg(argc, argv, "pattern.bFlexibleField4Enable", + sizeof(&pce_rule.pattern.bFlexibleField4Enable), &pce_rule.pattern.bFlexibleField4Enable); + cnt += scanParamArg(argc, argv, "pattern.bFlexibleField4_ExcludeEnable", + sizeof(&pce_rule.pattern.bFlexibleField4_ExcludeEnable), &pce_rule.pattern.bFlexibleField4_ExcludeEnable); + cnt += scanParamArg(argc, argv, "pattern.bFlexibleField4_RangeEnable", + sizeof(&pce_rule.pattern.bFlexibleField4_RangeEnable), &pce_rule.pattern.bFlexibleField4_RangeEnable); + cnt += scanParamArg(argc, argv, "pattern.nFlexibleField4_ParserIndex", + sizeof(&pce_rule.pattern.nFlexibleField4_ParserIndex), &pce_rule.pattern.nFlexibleField4_ParserIndex); + cnt += scanParamArg(argc, argv, "pattern.nFlexibleField4_Value", + sizeof(&pce_rule.pattern.nFlexibleField4_Value), &pce_rule.pattern.nFlexibleField4_Value); + cnt += scanParamArg(argc, argv, "pattern.nFlexibleField4_MaskOrRange", + sizeof(&pce_rule.pattern.nFlexibleField4_MaskOrRange), &pce_rule.pattern.nFlexibleField4_MaskOrRange); + + cnt += scanParamArg(argc, argv, "pattern.bFlexibleField3Enable", + sizeof(&pce_rule.pattern.bFlexibleField3Enable), &pce_rule.pattern.bFlexibleField3Enable); + cnt += scanParamArg(argc, argv, "pattern.bFlexibleField3_ExcludeEnable", + sizeof(&pce_rule.pattern.bFlexibleField3_ExcludeEnable), &pce_rule.pattern.bFlexibleField3_ExcludeEnable); + cnt += scanParamArg(argc, argv, "pattern.bFlexibleField3_RangeEnable", + sizeof(&pce_rule.pattern.bFlexibleField3_RangeEnable), &pce_rule.pattern.bFlexibleField3_RangeEnable); + cnt += scanParamArg(argc, argv, "pattern.nFlexibleField3_ParserIndex", + sizeof(&pce_rule.pattern.nFlexibleField3_ParserIndex), &pce_rule.pattern.nFlexibleField3_ParserIndex); + cnt += scanParamArg(argc, argv, "pattern.nFlexibleField3_Value", + sizeof(&pce_rule.pattern.nFlexibleField3_Value), &pce_rule.pattern.nFlexibleField3_Value); + cnt += scanParamArg(argc, argv, "pattern.nFlexibleField3_MaskOrRange", + sizeof(&pce_rule.pattern.nFlexibleField3_MaskOrRange), &pce_rule.pattern.nFlexibleField3_MaskOrRange); + + cnt += scanParamArg(argc, argv, "pattern.bFlexibleField2Enable", + sizeof(&pce_rule.pattern.bFlexibleField2Enable), &pce_rule.pattern.bFlexibleField2Enable); + cnt += scanParamArg(argc, argv, "pattern.bFlexibleField2_ExcludeEnable", + sizeof(&pce_rule.pattern.bFlexibleField2_ExcludeEnable), &pce_rule.pattern.bFlexibleField2_ExcludeEnable); + cnt += scanParamArg(argc, argv, "pattern.bFlexibleField2_RangeEnable", + sizeof(&pce_rule.pattern.bFlexibleField2_RangeEnable), &pce_rule.pattern.bFlexibleField2_RangeEnable); + cnt += scanParamArg(argc, argv, "pattern.nFlexibleField2_ParserIndex", + sizeof(&pce_rule.pattern.nFlexibleField2_ParserIndex), &pce_rule.pattern.nFlexibleField2_ParserIndex); + cnt += scanParamArg(argc, argv, "pattern.nFlexibleField2_Value", + sizeof(&pce_rule.pattern.nFlexibleField2_Value), &pce_rule.pattern.nFlexibleField2_Value); + cnt += scanParamArg(argc, argv, "pattern.nFlexibleField2_MaskOrRange", + sizeof(&pce_rule.pattern.nFlexibleField2_MaskOrRange), &pce_rule.pattern.nFlexibleField2_MaskOrRange); + + cnt += scanParamArg(argc, argv, "pattern.bFlexibleField1Enable", + sizeof(&pce_rule.pattern.bFlexibleField1Enable), &pce_rule.pattern.bFlexibleField1Enable); + cnt += scanParamArg(argc, argv, "pattern.bFlexibleField1_ExcludeEnable", + sizeof(&pce_rule.pattern.bFlexibleField1_ExcludeEnable), &pce_rule.pattern.bFlexibleField1_ExcludeEnable); + cnt += scanParamArg(argc, argv, "pattern.bFlexibleField1_RangeEnable", + sizeof(&pce_rule.pattern.bFlexibleField1_RangeEnable), &pce_rule.pattern.bFlexibleField1_RangeEnable); + cnt += scanParamArg(argc, argv, "pattern.nFlexibleField1_ParserIndex", + sizeof(&pce_rule.pattern.nFlexibleField1_ParserIndex), &pce_rule.pattern.nFlexibleField1_ParserIndex); + cnt += scanParamArg(argc, argv, "pattern.nFlexibleField1_Value", + sizeof(&pce_rule.pattern.nFlexibleField1_Value), &pce_rule.pattern.nFlexibleField1_Value); + cnt += scanParamArg(argc, argv, "pattern.nFlexibleField1_MaskOrRange", + sizeof(&pce_rule.pattern.nFlexibleField1_MaskOrRange), &pce_rule.pattern.nFlexibleField1_MaskOrRange); + + cnt += scanParamArg(argc, argv, "action.bPBB_Action_Enable", sizeof(pce_rule.action.bPBB_Action_Enable), &pce_rule.action.bPBB_Action_Enable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bIheaderActionEnable", + sizeof(pce_rule.action.sPBB_Action.bIheaderActionEnable), &pce_rule.action.sPBB_Action.bIheaderActionEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.eIheaderOpMode", + sizeof(pce_rule.action.sPBB_Action.eIheaderOpMode), &pce_rule.action.sPBB_Action.eIheaderOpMode); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bTunnelIdKnownTrafficEnable", + sizeof(pce_rule.action.sPBB_Action.bTunnelIdKnownTrafficEnable), &pce_rule.action.sPBB_Action.bTunnelIdKnownTrafficEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.nTunnelIdKnownTraffic", + sizeof(pce_rule.action.sPBB_Action.nTunnelIdKnownTraffic), &pce_rule.action.sPBB_Action.nTunnelIdKnownTraffic); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bTunnelIdUnKnownTrafficEnable", + sizeof(pce_rule.action.sPBB_Action.bTunnelIdUnKnownTrafficEnable), &pce_rule.action.sPBB_Action.bTunnelIdUnKnownTrafficEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.nTunnelIdUnKnownTraffic", + sizeof(pce_rule.action.sPBB_Action.nTunnelIdUnKnownTraffic), &pce_rule.action.sPBB_Action.nTunnelIdUnKnownTraffic); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bB_DstMac_FromMacTableEnable", + sizeof(pce_rule.action.sPBB_Action.bB_DstMac_FromMacTableEnable), &pce_rule.action.sPBB_Action.bB_DstMac_FromMacTableEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bReplace_B_SrcMacEnable", + sizeof(pce_rule.action.sPBB_Action.bReplace_B_SrcMacEnable), &pce_rule.action.sPBB_Action.bReplace_B_SrcMacEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bReplace_B_DstMacEnable", + sizeof(pce_rule.action.sPBB_Action.bReplace_B_DstMacEnable), &pce_rule.action.sPBB_Action.bReplace_B_DstMacEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bReplace_I_TAG_ResEnable", + sizeof(pce_rule.action.sPBB_Action.bReplace_I_TAG_ResEnable), &pce_rule.action.sPBB_Action.bReplace_I_TAG_ResEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bReplace_I_TAG_UacEnable", + sizeof(pce_rule.action.sPBB_Action.bReplace_I_TAG_UacEnable), &pce_rule.action.sPBB_Action.bReplace_I_TAG_UacEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bReplace_I_TAG_DeiEnable", + sizeof(pce_rule.action.sPBB_Action.bReplace_I_TAG_DeiEnable), &pce_rule.action.sPBB_Action.bReplace_I_TAG_DeiEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bReplace_I_TAG_PcpEnable", + sizeof(pce_rule.action.sPBB_Action.bReplace_I_TAG_PcpEnable), &pce_rule.action.sPBB_Action.bReplace_I_TAG_PcpEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bReplace_I_TAG_SidEnable", + sizeof(pce_rule.action.sPBB_Action.bReplace_I_TAG_SidEnable), &pce_rule.action.sPBB_Action.bReplace_I_TAG_SidEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bReplace_I_TAG_TpidEnable", + sizeof(pce_rule.action.sPBB_Action.bReplace_I_TAG_TpidEnable), &pce_rule.action.sPBB_Action.bReplace_I_TAG_TpidEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bBtagActionEnable", + sizeof(pce_rule.action.sPBB_Action.bBtagActionEnable), &pce_rule.action.sPBB_Action.bBtagActionEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.eBtagOpMode", + sizeof(pce_rule.action.sPBB_Action.eBtagOpMode), &pce_rule.action.sPBB_Action.eBtagOpMode); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bProcessIdKnownTrafficEnable", + sizeof(pce_rule.action.sPBB_Action.bProcessIdKnownTrafficEnable), &pce_rule.action.sPBB_Action.bProcessIdKnownTrafficEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.nProcessIdKnownTraffic", + sizeof(pce_rule.action.sPBB_Action.nProcessIdKnownTraffic), &pce_rule.action.sPBB_Action.nProcessIdKnownTraffic); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bProcessIdUnKnownTrafficEnable", + sizeof(pce_rule.action.sPBB_Action.bProcessIdUnKnownTrafficEnable), &pce_rule.action.sPBB_Action.bProcessIdUnKnownTrafficEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.nProcessIdUnKnownTraffic", + sizeof(pce_rule.action.sPBB_Action.nProcessIdUnKnownTraffic), &pce_rule.action.sPBB_Action.nProcessIdUnKnownTraffic); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bReplace_B_TAG_DeiEnable", + sizeof(pce_rule.action.sPBB_Action.bReplace_B_TAG_DeiEnable), &pce_rule.action.sPBB_Action.bReplace_B_TAG_DeiEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bReplace_B_TAG_PcpEnable", + sizeof(pce_rule.action.sPBB_Action.bReplace_B_TAG_PcpEnable), &pce_rule.action.sPBB_Action.bReplace_B_TAG_PcpEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bReplace_B_TAG_VidEnable", + sizeof(pce_rule.action.sPBB_Action.bReplace_B_TAG_VidEnable), &pce_rule.action.sPBB_Action.bReplace_B_TAG_VidEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bReplace_B_TAG_TpidEnable", + sizeof(pce_rule.action.sPBB_Action.bReplace_B_TAG_TpidEnable), &pce_rule.action.sPBB_Action.bReplace_B_TAG_TpidEnable); + + cnt += scanParamArg(argc, argv, "action.sPBB_Action.bMacTableMacinMacActionEnable", + sizeof(pce_rule.action.sPBB_Action.bMacTableMacinMacActionEnable), &pce_rule.action.sPBB_Action.bMacTableMacinMacActionEnable); + cnt += scanParamArg(argc, argv, "action.sPBB_Action.eMacTableMacinMacSelect", + sizeof(pce_rule.action.sPBB_Action.eMacTableMacinMacSelect), &pce_rule.action.sPBB_Action.eMacTableMacinMacSelect); + + /*Applicable only for GSWIP V32 */ + if (gswip_version == GSWIP_3_2) { + cnt += scanParamArg(argc, argv, "action.bDestSubIf_Action_Enable", + sizeof(pce_rule.action.bDestSubIf_Action_Enable), &pce_rule.action.bDestSubIf_Action_Enable); + cnt += scanParamArg(argc, argv, "action.sDestSubIF_Action.bDestSubIFIDActionEnable", + sizeof(pce_rule.action.sDestSubIF_Action.bDestSubIFIDActionEnable), &pce_rule.action.sDestSubIF_Action.bDestSubIFIDActionEnable); + cnt += scanParamArg(argc, argv, "action.sDestSubIF_Action.bDestSubIFIDAssignmentEnable", + sizeof(pce_rule.action.sDestSubIF_Action.bDestSubIFIDAssignmentEnable), &pce_rule.action.sDestSubIF_Action.bDestSubIFIDAssignmentEnable); + cnt += scanParamArg(argc, argv, "action.sDestSubIF_Action.nDestSubIFGrp_Field", + sizeof(pce_rule.action.sDestSubIF_Action.nDestSubIFGrp_Field), &pce_rule.action.sDestSubIF_Action.nDestSubIFGrp_Field); + } + + //printf("cnt = %d numPar = %d................\n", cnt, numPar); + if (cnt != numPar) return (-2); if (cnt == 0) return (-3); @@ -615,7 +887,7 @@ int gsw_pce_rule_write(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_PCE_RULE_WRITE, &pce_rule); } -int gsw_rmon_extend_get(int argc, char *argv[], int fd, int numPar) +int gsw_rmon_extend_get(int argc, char *argv[], void *fd, int numPar) { GSW_RMON_extendGet_t param; int cnt, i; @@ -638,12 +910,12 @@ int gsw_rmon_extend_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_rmon_extend_set(int argc, char *argv[], int fd, int numPar) +int gsw_rmon_extend_set(int argc, char *argv[], void *fd, int numPar) { return -1; } -int gsw_timestamp_timer_get(int argc, char *argv[], int fd, int numPar) +int gsw_timestamp_timer_get(int argc, char *argv[], void *fd, int numPar) { GSW_TIMESTAMP_Timer_t param; memset(¶m, 0, sizeof(GSW_TIMESTAMP_Timer_t)); @@ -659,7 +931,7 @@ int gsw_timestamp_timer_get(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_timestamp_timer_set(int argc, char *argv[], int fd, int numPar) +int gsw_timestamp_timer_set(int argc, char *argv[], void *fd, int numPar) { GSW_TIMESTAMP_Timer_t param; int cnt = 0; @@ -685,7 +957,7 @@ int gsw_timestamp_timer_set(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_timestamp_port_read(int argc, char *argv[], int fd, int numPar) +int gsw_timestamp_port_read(int argc, char *argv[], void *fd, int numPar) { GSW_TIMESTAMP_PortRead_t param; int cnt; @@ -707,22 +979,22 @@ int gsw_timestamp_port_read(int argc, char *argv[], int fd, int numPar) printHex32Value("nEgressNanoSec", param.nEgressNanoSec, 0); return 0; } -int gsw_boot_get(int argc, char *argv[], int fd, int numPar) +int gsw_boot_get(int argc, char *argv[], void *fd, int numPar) { return -1; } -int gsw_boot_set(int argc, char *argv[], int fd, int numPar) +int gsw_boot_set(int argc, char *argv[], void *fd, int numPar) { return -1; } -int gsw_rmon_extend_clear(int argc, char *argv[], int fd, int numPar) +int gsw_rmon_extend_clear(int argc, char *argv[], void *fd, int numPar) { return -1; } -int gsw_register_set(int argc, char *argv[], int fd, int numPar) +int gsw_register_set(int argc, char *argv[], void *fd, int numPar) { GSW_register_t param; u16 nSetBits = 0, nClearBits = 0; @@ -758,7 +1030,7 @@ int gsw_register_set(int argc, char *argv[], int fd, int numPar) return cli_ioctl(fd, GSW_REGISTER_SET, ¶m); } -int gsw_qos_queue_port_get(int argc, char *argv[], int fd, int numPar) +int gsw_qos_queue_port_get(int argc, char *argv[], void *fd, int numPar) { GSW_QoS_queuePort_t queuePortParam; int tc; @@ -857,7 +1129,13 @@ int gsw_qos_queue_port_get(int argc, char *argv[], int fd, int numPar) printHex32Value("nRedirectPortId", queuePortParam.nRedirectPortId, 0); } else { /* printout all queues of that port */ - printf("\n Port | Traffic Class | Egress Queue | bRedirectionBypass | nRedirectPortId\n"); + + if (gswip_version != GSWIP_3_2) { + printf("\n Port | Traffic Class | Egress Queue | bRedirectionBypass | nRedirectPortId\n"); + } else { + printf("\n Port | Traffic Class | Egress Queue | bPceIngressBypass | bRedirectionBypass | nRedirectPortId\n"); + } + // printf("\n Port | Traffic Class | Egress Queue \n"); printf("---------------------------------------\n"); @@ -869,14 +1147,24 @@ int gsw_qos_queue_port_get(int argc, char *argv[], int fd, int numPar) return (-1); } - printf(" %4d | %13d | %12d | %12d | %12d \n", - queuePortParam.nPortId, - queuePortParam.nTrafficClassId, - queuePortParam.nQueueId, queuePortParam.bRedirectionBypass, queuePortParam.nRedirectPortId); - /* printf(" %4d | %13d | %12d \n", - queuePortParam.nPortId, - queuePortParam.nTrafficClassId, - queuePortParam.nQueueId );*/ + if (gswip_version != GSWIP_3_2) { + + printf(" %4d | %13d | %12d | %12d | %12d \n", + queuePortParam.nPortId, + queuePortParam.nTrafficClassId, + queuePortParam.nQueueId, queuePortParam.bRedirectionBypass, queuePortParam.nRedirectPortId); + /* printf(" %4d | %13d | %12d \n", + queuePortParam.nPortId, + queuePortParam.nTrafficClassId, + queuePortParam.nQueueId );*/ + } else { + + printf(" %4d | %13d | %12d | %12d | %12d | %12d\n", + queuePortParam.nPortId, + queuePortParam.nTrafficClassId, + queuePortParam.nQueueId, queuePortParam.bEnableIngressPceBypass, + queuePortParam.bRedirectionBypass, queuePortParam.nRedirectPortId); + } } printf("---------------------------------------\n"); @@ -899,6 +1187,33 @@ int gsw_qos_queue_port_get(int argc, char *argv[], int fd, int numPar) queuePortParam.nQueueId, queuePortParam.bRedirectionBypass, queuePortParam.nRedirectPortId); } + if (gswip_version == GSWIP_3_2) { + scanParamArg(argc, argv, "bReservedPortMode", 8, &queuePortParam.bReservedPortMode); + + if (queuePortParam.bReservedPortMode) { + printf("---------------------------------------\n"); + /* printout all queues of that port */ + printf("\n Port | Traffic Class | Egress Queue | bIngressPortMode | nRedirectPortId\n"); + printf("---------------------------------------\n"); + + for (tc = 0; tc < NUM_TC; tc++) { + queuePortParam.nTrafficClassId = tc; + queuePortParam.bReservedPortMode = 1; + + if (cli_ioctl(fd, GSW_QOS_QUEUE_PORT_GET, &queuePortParam) != 0) { + printf("ioctl returned with ERROR!\n"); + return (-1); + } + + printf(" %4d | %13d | %12d | %12d | %12d \n", + queuePortParam.nPortId, + queuePortParam.nTrafficClassId, + queuePortParam.nQueueId, queuePortParam.bReservedPortMode, queuePortParam.nRedirectPortId); + } + + } + } + printf("---------------------------------------\n"); } } @@ -908,7 +1223,7 @@ int gsw_qos_queue_port_get(int argc, char *argv[], int fd, int numPar) #if defined(CONFIG_LTQ_TEST) && CONFIG_LTQ_TEST -int gsw_route_entry_add(int argc, char *argv[], int fd, int numPar) +int gsw_route_entry_add(int argc, char *argv[], void *fd, int numPar) { GSW_ROUTE_Entry_t rt_entry; int cnt = 0; @@ -999,7 +1314,7 @@ int gsw_route_entry_add(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_route_entry_read(int argc, char *argv[], int fd, int numPar) +int gsw_route_entry_read(int argc, char *argv[], void *fd, int numPar) { GSW_ROUTE_Entry_t rt_entry; int cnt = 0; @@ -1102,7 +1417,7 @@ int gsw_route_entry_read(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_route_entry_delete(int argc, char *argv[], int fd, int numPar) +int gsw_route_entry_delete(int argc, char *argv[], void *fd, int numPar) { GSW_ROUTE_Entry_t rt_entry; int cnt = 0; @@ -1121,7 +1436,7 @@ int gsw_route_entry_delete(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_route_tunnel_entry_add(int argc, char *argv[], int fd, int numPar) +int gsw_route_tunnel_entry_add(int argc, char *argv[], void *fd, int numPar) { GSW_ROUTE_Tunnel_Entry_t tn_entry; int cnt = 0; @@ -1153,7 +1468,7 @@ int gsw_route_tunnel_entry_add(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_route_tunnel_entry_delete(int argc, char *argv[], int fd, int numPar) +int gsw_route_tunnel_entry_delete(int argc, char *argv[], void *fd, int numPar) { GSW_ROUTE_Tunnel_Entry_t tn_entry; int cnt = 0; @@ -1185,7 +1500,7 @@ int gsw_route_tunnel_entry_delete(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_route_tunnel_entry_read(int argc, char *argv[], int fd, int numPar) +int gsw_route_tunnel_entry_read(int argc, char *argv[], void *fd, int numPar) { GSW_ROUTE_Tunnel_Entry_t tn_entry; int cnt = 0; @@ -1232,7 +1547,7 @@ int gsw_route_tunnel_entry_read(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_route_l2nat_cfg_read(int argc, char *argv[], int fd, int numPar) +int gsw_route_l2nat_cfg_read(int argc, char *argv[], void *fd, int numPar) { GSW_ROUTE_EgPort_L2NAT_Cfg_t l2nat_cfg; int cnt = 0; @@ -1254,7 +1569,7 @@ int gsw_route_l2nat_cfg_read(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_route_l2nat_cfg_write(int argc, char *argv[], int fd, int numPar) +int gsw_route_l2nat_cfg_write(int argc, char *argv[], void *fd, int numPar) { GSW_ROUTE_EgPort_L2NAT_Cfg_t l2nat_cfg; int cnt = 0; @@ -1273,7 +1588,7 @@ int gsw_route_l2nat_cfg_write(int argc, char *argv[], int fd, int numPar) } -int gsw_route_session_hit_op(int argc, char *argv[], int fd, int numPar) +int gsw_route_session_hit_op(int argc, char *argv[], void *fd, int numPar) { GSW_ROUTE_Session_Hit_t session_hit; @@ -1301,7 +1616,7 @@ int gsw_route_session_hit_op(int argc, char *argv[], int fd, int numPar) return 0; } -int gsw_route_session_dest_mod(int argc, char *argv[], int fd, int numPar) +int gsw_route_session_dest_mod(int argc, char *argv[], void *fd, int numPar) { GSW_ROUTE_Session_Dest_t dest_mod; int cnt = 0; diff --git a/src/gsw_cli_lmac.c b/src/gsw_cli_lmac.c new file mode 100755 index 0000000000000000000000000000000000000000..3637ca238acfa248b4d607d12dd034ebced72dd6 --- /dev/null +++ b/src/gsw_cli_lmac.c @@ -0,0 +1,1139 @@ +/**************************************************************************** + + Copyright 2010 + Lantiq Deutschland GmbH + Am Campeon 3; 85579 Neubiberg, Germany + + For licensing information, see the file 'LICENSE' in the root folder of + this software module. + +*****************************************************************************/ +#include "ltq_cli_lib.h" + +#ifndef IOCTL_PCTOOL +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <fcntl.h> +#include <unistd.h> +#include <errno.h> +#include <ctype.h> +#endif + +#include <mac_ops.h> +#include "gsw_cli_mac.h" + +int test_lmac_cli(void *fd); + +struct _lmac_cfg { + char cmdname[256]; + u32 cmdType; + u8 args; + int (*set_func)(void *, GSW_MAC_Cli_t *); + int (*get_func)(void *, GSW_MAC_Cli_t *); + char help[1024]; +}; + +u32 lmac_reg_read(void *fd, GSW_MAC_Cli_t *param) +{ + int ret = 0; + u32 offset = param->val[0]; + + param->cmdType = LMAC_REG_RD; + ret = cli_ioctl(fd, GSW_LMAC_CFG, param); + + printf("\tREG offset: 0x%04x\n\tData: %08X\n", offset, param->val[0]); + return ret; +} + +int lmac_reg_write(void *fd, GSW_MAC_Cli_t *param) +{ + param->cmdType = LMAC_REG_WR; + + cli_ioctl(fd, GSW_LMAC_CFG, param); + + + return 0; +} + +u32 gsw_lmac_reg_read(void *fd, GSW_MAC_Cli_t *param, u32 reg) +{ + int ret = 0; + u32 offset = param->val[0]; + + param->cmdType = LMAC_REG_RD; + param->val[0] = reg; + ret = cli_ioctl(fd, GSW_LMAC_CFG, param); + + return param->val[0]; +} + +u32 gsw_lmac_reg_write(void *fd, GSW_MAC_Cli_t *param, u32 reg, u32 data) +{ + int ret = 0; + u32 offset = param->val[0]; + + param->cmdType = LMAC_REG_RD; + param->val[0] = reg; + param->val[1] = data; + ret = cli_ioctl(fd, GSW_LMAC_CFG, param); + + return ret; +} + +int lmac_cli_get_intf_mode(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_ctrl0 = gsw_lmac_reg_read(fd, param, MAC_CTRL0(param->mac_idx)); + u32 val = 0; + + printf("LMAC %d INTF MODE %08x\n", param->mac_idx, mac_ctrl0); + val = mac_get_val(mac_ctrl0, MAC_CTRL0, GMII); + + if (val == 0) + printf("\tIntf mode set to : AUTO\n"); + else if (val == 1) + printf("\tIntf mode set to : MII (10/100/200 Mbps)\n"); + else if (val == 2) + printf("\tIntf mode set to : GMII (1000 Mbps)\n"); + else if (val == 3) + printf("\tIntf mode set to : GMII_2G (2000 Mbps)\n"); + + return 0; +} + +int lmac_cli_get_duplex_mode(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_ctrl0 = gsw_lmac_reg_read(fd, param, MAC_CTRL0(param->mac_idx)); + u32 val; + + printf("LMAC %d DUPLEX MODE %08x\n", param->mac_idx, mac_ctrl0); + + val = mac_get_val(mac_ctrl0, MAC_CTRL0, FDUP); + + if (val == 0) + printf("\tFDUP mode set to : AUTO\n"); + else if (val == 1) + printf("\tFDUP mode set to : Full Duplex Mode\n"); + else if (val == 2) + printf("\tFDUP mode set to : Reserved\n"); + else if (val == 3) + printf("\tFDUP mode set to : Half Duplex Mode\n"); + + return val; +} + +int lmac_cli_get_flowcon_mode(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_ctrl0 = gsw_lmac_reg_read(fd, param, MAC_CTRL0(param->mac_idx)); + int val; + + printf("LMAC %d FLOWCONTROL MODE %08x\n", + param->mac_idx, mac_ctrl0); + + val = mac_get_val(mac_ctrl0, MAC_CTRL0, FCON); + + if (val == 0) + printf("\tFCON mode set to : AUTO\n"); + else if (val == 1) + printf("\tFCON mode set to : Receive only\n"); + else if (val == 2) + printf("\tFCON mode set to : transmit only\n"); + else if (val == 3) + printf("\tFCON mode set to : RXTX\n"); + else if (val == 4) + printf("\tFCON mode set to : DISABLED\n"); + + return val; +} + +int lmac_cli_get_txfcs(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_ctrl0 = gsw_lmac_reg_read(fd, param, MAC_CTRL0(param->mac_idx)); + u32 val; + + printf("LMAC %d FCS %08x\n", param->mac_idx, mac_ctrl0); + + val = mac_get_val(mac_ctrl0, MAC_CTRL0, FCS); + printf("\tFCS generation : %s\n", val ? "ENABLED" : "DISABLED"); + + return val; +} + +int lmac_cli_get_int(void *fd, GSW_MAC_Cli_t *param) +{ + u32 lmac_isr = gsw_lmac_reg_read(fd, param, LMAC_ISR); + u32 val = 0, mac_idx = 0; + + mac_idx = param->mac_idx; + val = GET_N_BITS(lmac_isr, mac_idx, LMAC_ISR_MAC2_WIDTH); + + return val; +} + +int lmac_cli_get_ipg(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_ctrl1 = gsw_lmac_reg_read(fd, param, MAC_CTRL1(param->mac_idx)); + u32 val; + + printf("LMAC %d IPG %08x\n", param->mac_idx, mac_ctrl1); + + val = mac_get_val(mac_ctrl1, MAC_CTRL1, IPG); + printf("\tIPG set to %d : bytes\n", val); + + return val; +} + +int lmac_cli_get_preamble(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_ctrl1 = gsw_lmac_reg_read(fd, param, MAC_CTRL1(param->mac_idx)); + u32 val; + + printf("LMAC %d PREAMBLE %08x\n", param->mac_idx, mac_ctrl1); + + val = mac_get_val(mac_ctrl1, MAC_CTRL1, SHORTPRE); + printf("\tPreamble is : %s\n", val ? "0 byte" : "7 byte"); + + return val; +} + +int lmac_cli_get_defermode(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_ctrl1 = gsw_lmac_reg_read(fd, param, MAC_CTRL1(param->mac_idx)); + u32 val; + + printf("LMAC %d DEFERMODE %08x\n", param->mac_idx, mac_ctrl1); + + val = mac_get_val(mac_ctrl1, MAC_CTRL1, DEFERMODE); + printf("\tCRS backpressure : %s\n", + val ? + "Enabled in Full Duplex mode" : + "Enabled in Half Duplex mode"); + + return val; +} + +int lmac_cli_get_lpi(void *fd, GSW_MAC_Cli_t *param, u32 *mode_en, u32 *lpi_waitg, u32 *lpi_waitm) +{ + u32 mac_ctrl4 = gsw_lmac_reg_read(fd, param, MAC_CTRL4(param->mac_idx)); + + printf("LMAC %d LPI %08x\n", param->mac_idx, mac_ctrl4); + + *mode_en = mac_get_val(mac_ctrl4, MAC_CTRL4, LPIEN); + printf("\tLPI Mode : %s\n", *mode_en ? "ENABLED" : "DISABLED"); + + *lpi_waitm = mac_get_val(mac_ctrl4, MAC_CTRL4, WAIT); + printf("\tLPI Wait time for 100M : %d usec\n", *lpi_waitm); + + *lpi_waitg = mac_get_val(mac_ctrl4, MAC_CTRL4, GWAIT); + printf("\tLPI Wait time for 1G : %d usec\n", *lpi_waitg); + + return 0; +} + +int lmac_cli_get_jps(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_ctrl5 = gsw_lmac_reg_read(fd, param, MAC_CTRL5(param->mac_idx)); + u32 pjps_bp, pjps_nobp; + + printf("LMAC %d JPS %08x\n", param->mac_idx, mac_ctrl5); + + pjps_bp = mac_get_val(mac_ctrl5, MAC_CTRL5, PJPS_BP); + printf("\tProlong Jam Pattern Size during backpressure : %s\n", + pjps_bp ? + "64 bit jam pattern" : + "32 bit jam pattern"); + + pjps_nobp = mac_get_val(mac_ctrl5, MAC_CTRL5, PJPS_NOBP); + printf("\tProlong Jam Pattern Size during no-backpressure : %s\n", + pjps_nobp ? + "64 bit jam pattern" : + "32 bit jam pattern"); + + return 0; +} + +int lmac_cli_get_loopback(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_testen = gsw_lmac_reg_read(fd, param, MAC_TESTEN(param->mac_idx)); + u32 val; + + printf("LMAC %d Loopback: %08x\n", param->mac_idx, mac_testen); + + val = mac_get_val(mac_testen, MAC_TESTEN, LOOP); + printf("\tLMAC: Loopback : %s\n", val ? "ENABLED" : "DISABLED"); + + return val; +} + +int lmac_cli_get_txer(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_testen = gsw_lmac_reg_read(fd, param, MAC_TESTEN(param->mac_idx)); + u32 val; + + printf("LMAC %d TXER %08x\n", param->mac_idx, mac_testen); + + val = mac_get_val(mac_testen, MAC_TESTEN, TXER); + printf("\tInject transmit error : %s\n", + val ? "ENABLED" : "DISABLED"); + + return val; +} + +int lmac_cli_get_lpimonitor_mode(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_testen = gsw_lmac_reg_read(fd, param, MAC_TESTEN(param->mac_idx)); + u32 val; + + printf("LMAC %d LPI MONITORING MODE %08x\n", + param->mac_idx, mac_testen); + + val = mac_get_val(mac_testen, MAC_TESTEN, LPITM); + + if (val == 0) + printf("\tLPI to be monitored in time recording : TX\n"); + else if (val == 1) + printf("\tLPI to be monitored in time recording : RX\n"); + else if (val == 2) + printf("\tLPI to be monitored in time recording : TXRX\n"); + + return val; +} + +int lmac_cli_get_pauseframe_samode(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_pfad = gsw_lmac_reg_read(fd, param, MAC_PFADCFG); + u32 val; + + printf("LMAC: PAUSE FRAME SAMODE %08x\n", mac_pfad); + + val = mac_get_val(mac_pfad, MAC_PFADCFG, SAMOD); + printf("\tPause frame use : %s\n", + val ? + "PORT specific MAC source address" : + "COMMON MAC source address"); + + return val; +} + +int lmac_cli_get_pauseframe_addr(void *fd, GSW_MAC_Cli_t *param, u8 *mac_addr) +{ + u16 mac_addr_0 = 0, mac_addr_1 = 0, mac_addr_2; + + mac_addr_0 = gsw_lmac_reg_read(fd, param, MAC_PFSA_0); + mac_addr[1] = ((mac_addr_0 & 0xFF00) >> 8); + mac_addr[0] = (mac_addr_0 & 0x00FF); + + mac_addr_1 = gsw_lmac_reg_read(fd, param, MAC_PFSA_1); + mac_addr[3] = ((mac_addr_1 & 0xFF00) >> 8); + mac_addr[2] = (mac_addr_1 & 0x00FF); + + mac_addr_2 = gsw_lmac_reg_read(fd, param, MAC_PFSA_2); + mac_addr[5] = ((mac_addr_2 & 0xFF00) >> 8); + mac_addr[4] = (mac_addr_2 & 0x00FF); + + return 0; +} + +int lmac_cli_get_mac_pstat(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_pstat = gsw_lmac_reg_read(fd, param, MAC_PSTAT(param->mac_idx)); + + printf("LMAC %d PORT STAT: %08x\n", param->mac_idx, mac_pstat); + + if (mac_get_val(mac_pstat, MAC_PSTAT, RXLPI)) + printf("\tReceive Low Power Idle Status : " + "LPI Low power idle state\n"); + else + printf("\tReceive Low Power Idle Status : " + "Normal Power state\n"); + + if (mac_get_val(mac_pstat, MAC_PSTAT, TXLPI)) + printf("\tTransmit Low Power Idle Status : " + "LPI Low power idle state\n"); + else + printf("\tTransmit Low Power Idle Status : " + "Normal Power state\n"); + + if (mac_get_val(mac_pstat, MAC_PSTAT, CRS)) + printf("\tCarrier Detected\n"); + else + printf("\tNo Carrier Detected\n"); + + if (mac_get_val(mac_pstat, MAC_PSTAT, LSTAT)) + printf("\tLink is : UP\n"); + else + printf("\tLink is : DOWN\n"); + + if (mac_get_val(mac_pstat, MAC_PSTAT, TXPAUEN)) + printf("\tLink Partner accepts Pause frames\n"); + else + printf("\tLink Partner doesnot accepts Pause frames\n"); + + if (mac_get_val(mac_pstat, MAC_PSTAT, RXPAUEN)) + printf("\tLink Partner sends Pause frames\n"); + else + printf("\tLink Partner doesnot sends Pause frames\n"); + + if (mac_get_val(mac_pstat, MAC_PSTAT, TXPAU)) + printf("\tTransmit Pause status is active\n"); + else + printf("\tNormal transmit operation\n"); + + if (mac_get_val(mac_pstat, MAC_PSTAT, RXPAU)) + printf("\tReceive Pause status is active\n"); + else + printf("\tNormal Receive operation\n"); + + if (mac_get_val(mac_pstat, MAC_PSTAT, FDUP)) + printf("\tFull duplex Mode\n"); + else + printf("\thalf Duplex mode\n"); + + if (mac_get_val(mac_pstat, MAC_PSTAT, MBIT)) + printf("\tAttached PHY runs at a data rate of " + "100 Mbps\n"); + else + printf("\tAttached PHY runs at a data rate of " + "10 Mbps\n"); + + if (mac_get_val(mac_pstat, MAC_PSTAT, GBIT)) + printf("\tAttached PHY runs at a data rate of " + "1000 or 2000 Mbps\n"); + else + printf("\tAttached PHY runs at a data rate of " + "10 or 100 Mbps\n"); + + if (mac_get_val(mac_pstat, MAC_PSTAT, PACT)) + printf("\tPHY is active and responds to MDIO accesses\n"); + else + printf("\tPHY is inactive or not present\n"); + + return 0; +} + +int lmac_cli_get_mac_pisr(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_pisr = gsw_lmac_reg_read(fd, param, MAC_PISR(param->mac_idx)); + + printf("LMAC %d PORT INTERRUPT STATUS: %08x\n", + param->mac_idx, mac_pisr); + + if (mac_get_val(mac_pisr, MAC_PISR, RXPAUSE)) + printf("\tAtleast 1 pause frame has been Received\n"); + + if (mac_get_val(mac_pisr, MAC_PISR, TXPAUSE)) + printf("\tAtleast 1 pause frame has been transmitted\n"); + + if (mac_get_val(mac_pisr, MAC_PISR, FCSERR)) + printf("\tFrame checksum Error Detected\n"); + + if (mac_get_val(mac_pisr, MAC_PISR, LENERR)) + printf("\tLength mismatch Error Detected\n"); + + if (mac_get_val(mac_pisr, MAC_PISR, TOOLONG)) + printf("\tToo Long frame Error Detected\n"); + + if (mac_get_val(mac_pisr, MAC_PISR, TOOSHORT)) + printf("\tToo Short frame Error Detected\n"); + + if (mac_get_val(mac_pisr, MAC_PISR, JAM)) + printf("\tJam status detected\n"); + + if (mac_get_val(mac_pisr, MAC_PISR, LPION)) + printf("\tReceive low power idle mode is entered\n"); + + if (mac_get_val(mac_pisr, MAC_PISR, LPIOFF)) + printf("\tReceive low power idle mode is left\n"); + + if (mac_get_val(mac_pisr, MAC_PISR, TXPAUEN)) + printf("\tA change of Transmit Pause Enable Status\n"); + + if (mac_get_val(mac_pisr, MAC_PISR, RXPAUEN)) + printf("\tA change of Receive Pause Enable Status\n"); + + if (mac_get_val(mac_pisr, MAC_PISR, FDUP)) + printf("\tA change of half- or full-duplex mode\n"); + + if (mac_get_val(mac_pisr, MAC_PISR, SPEED)) + printf("\tA change of speed mode\n"); + + if (mac_get_val(mac_pisr, MAC_PISR, PACT)) + printf("\tA change of link activity\n"); + + if (mac_get_val(mac_pisr, MAC_PISR, ALIGN)) + printf("\tA frame has been received which an " + "alignment error\n"); + + if (mac_get_val(mac_pisr, MAC_PISR, PHYERR)) + printf("\tA frame has been received which has an " + "active rx_err signal\n"); + + return 0; +} + +int lmac_cli_get_rmon(void *fd, GSW_MAC_Cli_t *param) +{ + struct lmac_rmon_cnt lmac_cnt[10]; + int i = 0, max_mac = 0; + struct mac_ops *ops; + static char buf[256] = {'\0'}; + + if (param->set_all) { + if (gswip_version == GSWIP_3_1) + max_mac = 3; + else if (gswip_version == GSWIP_3_2) + max_mac = 9; + + memset((char *)buf, '\0', 256); + + param->set_all = 0; + + for (i = 0; i < max_mac; i++) { + param->mac_idx = MAC_2 + i; + + memset(&lmac_cnt[i], 0, sizeof(struct lmac_rmon_cnt)); + memset(¶m->lpstats, 0, sizeof(struct lmac_rmon_cnt)); + param->cmdType = LMAC_RMON; + + cli_ioctl(fd, GSW_LMAC_CFG, param); + memcpy(&lmac_cnt[i], ¶m->lpstats, sizeof(struct lmac_rmon_cnt)); + } + + printf("\nTYPE "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%18s %d\t", "LMAC", (i + MAC_2)); + + printf("%s", buf); + printf("\n"); + } else { + + memset((char *)buf, '\0', 256); + memset(&lmac_cnt[i], 0, sizeof(struct lmac_rmon_cnt)); + memset(¶m->lpstats, 0, sizeof(struct lmac_rmon_cnt)); + + param->cmdType = LMAC_RMON; + cli_ioctl(fd, GSW_LMAC_CFG, param); + memcpy(&lmac_cnt[i], ¶m->lpstats, sizeof(struct lmac_rmon_cnt)); + + printf("\nTYPE "); + sprintf(buf + strlen(buf), "%18s %d\t", "LMAC", param->mac_idx); + printf("%s", buf); + printf("\n"); + max_mac = 1; + } + + memset((char *)buf, '\0', 256); + + printf("Single Collision Cnt = "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%20d\t", + lmac_cnt[i].sing_coln_cnt); + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', 256); + + printf("Multiple Collision Cnt = "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%20d\t", + lmac_cnt[i].mple_coln_cnt); + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', 256); + + printf("Late Collision Cnt = "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%20d\t", + lmac_cnt[i].late_coln_cnt); + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', 256); + + printf("Excess Collision Cnt = "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%20d\t", + lmac_cnt[i].excs_coln_cnt); + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', 256); + + printf("Rx Pause Cnt = "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%20d\t", + lmac_cnt[i].rx_pause_cnt); + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', 256); + + printf("Tx Pause Cnt = "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%20d\t", + lmac_cnt[i].tx_pause_cnt); + + printf("%s", buf); + printf("\n"); + + return 0; +} + +struct _lmac_cfg lmac_cfg[] = { + { + "r", + LMAC_REG_RD, + 1, + 0, + 0, + "<arg: reg_off>" + }, + { + "w", + LMAC_REG_WR, + 2, + 0, + 0, + "<arg: reg_off, reg_val>" + }, + { + "rmon", + LMAC_RMON, + 0, + 0, + lmac_cli_get_rmon, + "<RMON>" + }, + { + "clear_rmon", + LMAC_CLR_RMON, + 0, + 0, + 0, + "<RMON Clear>" + }, + { + "ifmode", + LMAC_IF_MODE, + 1, + 0, + lmac_cli_get_intf_mode, + "<arg: <0/1/2/3: AUTO/MII/GMII/GMII_2G>>" + }, + { + "duplex", + LMAC_DPX, + 1, + 0, + lmac_cli_get_duplex_mode, + "<arg: <0/1/2/3: AUTO/FULL/RES/HALF>>" + }, + { + "txfcs", + LMAC_XFCS, + 1, + 0, + lmac_cli_get_txfcs, + "<arg: 1: ENABLED, 0: DISABLED>" + }, + { + "flowcont", + LMAC_FLOWCON, + 1, + 0, + lmac_cli_get_flowcon_mode, + "<arg: <0/1/2/3/4: AUTO/RX/TX/RXTX/DISABLED >>" + }, + { + "ipg", + LMAC_IPG, + 1, + 0, + lmac_cli_get_ipg, + "<arg: ipg_val>" + }, + { + "preamble", + LMAC_PREAMBLE, + 1, + 0, + lmac_cli_get_preamble, + "<arg: 1 <0 byte>, 0 <7 byte>>" + }, + { + "defermode", + LMAC_DEFERMODE, + 1, + 0, + lmac_cli_get_defermode, + "<arg: 1: <BP Enabled in FD Mode> 0: <BP Enabled in HD Mode>>" + }, + { + "jps", + LMAC_JPS, + 2, + 0, + lmac_cli_get_jps, + "<arg: 1: <64 bit jam pattern in BP Mode> 0: <32 bit jam pattern in BP Mode>>" + "<arg: 1: <64 bit jam pattern in No BP Mode> 0: <32 bit jam pattern in No BP Mode>>" + }, + { + "loopback", + LMAC_LB, + 1, + 0, + lmac_cli_get_loopback, + "<arg: 1: ENABLED, 0: DISABLED>" + }, + { + "txerr", + LMAC_TXER, + 1, + 0, + lmac_cli_get_txer, + "<arg: 1: ENABLED, 0: DISABLED>" + }, + { + "lpimonitor", + LMAC_LPIMONIT, + 1, + 0, + lmac_cli_get_lpimonitor_mode, + "<arg: <0/1/2/: TX/RX/TXRX>>" + }, + { + "pstat", + LMAC_PSTAT, + 0, + 0, + lmac_cli_get_mac_pstat, + "" + }, + { + "pisr", + LMAC_PISR, + 0, + 0, + lmac_cli_get_mac_pisr, + "" + }, + { + "pause_sa_mode", + LMAC_PAUSE_SA_MODE, + 1, + 0, + lmac_cli_get_pauseframe_samode, + "<arg: 1: Port specific SA, 0: Common MAC SA>" + }, + +}; + +static inline int mac_nstrlen(char *s) +{ + int cnt = 0; + + if (s == (void *)0) + return 0; + + while (s[cnt]) + cnt++; + + return cnt; +} + +static inline unsigned long mac_nstrtoul(const char *s, int len, + u32 *next_idx) +{ + unsigned long acc; + int cnt = 0; + char c; + int base = 0; + + acc = 0; + + c = s[cnt]; + + if (s[cnt] == '0') { + cnt++; + + if ((s[cnt] == 'x') || (s[cnt] == 'X')) { + base = 16; + cnt++; + } + } + + if (!base) + base = 10; + + for (; cnt < len; cnt++) { + c = s[cnt]; + + if ((c >= '0') && (c <= '9')) + c -= '0'; + else if ((c >= 'a') && (c <= 'f')) + c -= 'a' - 10; + else if ((c >= 'A') && (c <= 'F')) + c -= 'A' - 10; + else + c = 0; + + acc *= base; + acc += c; + } + + (*next_idx)++; + + return acc; +} + +void lmac_help(void) +{ + int i = 0; + int num_of_elem = (sizeof(lmac_cfg) / sizeof(struct _lmac_cfg)); + + printf("\n----Legacy MAC Commands----\n\n"); + + for (i = 0; i < num_of_elem; i++) { + if (!strcmp(lmac_cfg[i].cmdname, "rmon")) { + continue; + } else { + printf("switch_cli lmac <2/3/4..> %15s %s\n", + lmac_cfg[i].cmdname, lmac_cfg[i].help); + } + } + + printf("\n\n"); + + for (i = 0; i < num_of_elem; i++) { + + if ((!strcmp(lmac_cfg[i].cmdname, "r")) || + (!strcmp(lmac_cfg[i].cmdname, "w"))) { + continue; + } else { + printf("switch_cli lmac <2/3/4..> get %15s\n", + lmac_cfg[i].cmdname); + } + } + + printf("\n"); + +} + +int lmac_main(u32 argc, char *argv[], void *fd) +{ + int idx = 0; + u32 start_arg = 0; + u32 max_mac; + GSW_MAC_Cli_t param; + int i = 0, num_of_elem, found = 0, j = 0, ret = 0; + + memset(¶m, 0x00, sizeof(param)); + + start_arg++; + start_arg++; + + if (!argv[start_arg]) { + lmac_help(); + goto end; + } + + if (!strcmp(argv[start_arg], "-help")) { + found = 1; + lmac_help(); + goto end; + } + + if (!strcmp(argv[start_arg], "test")) { + found = 1; + test_lmac_cli(fd); + goto end; + } + + if (!strcmp(argv[start_arg], "r")) { + start_arg++; + found = 1; + + if ((strstr(argv[start_arg], "0x")) || + (strstr(argv[start_arg], "0X"))) + printf("\n"); + else + printf("Please give the address with " + "0x firmat\n"); + + param.val[0] = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + lmac_reg_read(fd, ¶m); + + goto end; + } + + if (!strcmp(argv[start_arg], "w")) { + start_arg++; + found = 1; + + if ((strstr(argv[start_arg], "0x")) || + (strstr(argv[start_arg], "0X"))) + printf("\n"); + else + printf("Please give the address with " + "0x format\n"); + + param.val[0] = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + param.val[1] = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + lmac_reg_write(fd, ¶m); + + goto end; + } + + + if (found) + goto end; + + if (!strcmp(argv[start_arg], "*")) { + start_arg++; + param.set_all = 1; + } else { + idx = mac_nstrtoul(argv[start_arg], mac_nstrlen(argv[start_arg]), + &start_arg); + + if (gswip_version == GSWIP_3_1) + max_mac = 3; + else if (gswip_version == GSWIP_3_2) + max_mac = 9; + + if ((idx < MAC_2) || (idx > ((max_mac + MAC_2) - 1))) { + printf("Give valid mac index 2/3/4/...\n"); + return -1; + } + + param.set_all = 0; + + } + + param.mac_idx = idx; + + if (!argv[start_arg]) { + lmac_help(); + goto end; + } + + if (!strcmp(argv[start_arg], "get")) { + start_arg++; + + if (!argv[start_arg]) { + lmac_help(); + goto end; + } + + num_of_elem = (sizeof(lmac_cfg) / sizeof(struct _lmac_cfg)); + + for (i = 0; i < num_of_elem; i++) { + + if (!strcmp(argv[start_arg], lmac_cfg[i].cmdname)) { + start_arg++; + found = 1; + + for (j = 0; j < lmac_cfg[i].args; j++) { + + if (argv[start_arg]) { + param.val[j] = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + } + } + + param.cmdType = lmac_cfg[i].cmdType; + param.get = 0; + + if (lmac_cfg[i].get_func) + lmac_cfg[i].get_func(fd, ¶m); + else + ret = cli_ioctl(fd, GSW_LMAC_CFG, ¶m); + + goto end; + } + } + + if (found == 0) { + lmac_help(); + goto end; + } + } else { + + num_of_elem = (sizeof(lmac_cfg) / sizeof(struct _lmac_cfg)); + + if (!argv[start_arg]) { + lmac_help(); + goto end; + } + + for (i = 0; i < num_of_elem; i++) { + + if (!strcmp(argv[start_arg], lmac_cfg[i].cmdname)) { + start_arg++; + found = 1; + + if (!argv[start_arg]) { + printf("switch_cli lmac <2/3/4..> %s %s\n", lmac_cfg[i].cmdname, lmac_cfg[i].help); + goto end; + } + + for (j = 0; j < lmac_cfg[i].args; j++) { + + if (!argv[start_arg]) { + printf("switch_cli lmac <2/3/4..> %s %s\n", lmac_cfg[i].cmdname, lmac_cfg[i].help); + goto end; + } + + param.val[j] = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + } + + param.cmdType = lmac_cfg[i].cmdType; + param.get = 0; + + if (lmac_cfg[i].set_func) + lmac_cfg[i].set_func(fd, ¶m); + else + ret = cli_ioctl(fd, GSW_LMAC_CFG, ¶m); + + if (lmac_cfg[i].cmdType == LMAC_REG_RD) { + printf("\tREG offset: 0x%04x\n\tData: %08X\n", param.val[0], + ret); + } + + if (lmac_cfg[i].cmdType == LMAC_REG_WR) { + printf("\tREG offset: 0x%04x\n\tData: %08X\n", param.val[0], param.val[1]); + } + + goto end; + } + } + } + + if (found == 0) { + lmac_help(); + goto end; + } + +end: + return 0; +} + + +int test_lmac_cli(void *fd) +{ + int i = 0, j = 0, k = 0, m = 0, setget; + int num_of_elem = + (sizeof(lmac_cfg) / sizeof(struct _lmac_cfg)); + int argc = 0; + char **argv; + + argv = malloc(10 * sizeof(char *)); // allocate the array to hold the pointer + + if (argv == NULL) { + printf("%s memory allocation failed !! %d\n", __func__, __LINE__); + return -1; + } + + for (i = 0; i < 10; i++) { + argv[i] = malloc(255 * sizeof(char)); // allocate each array to hold the strings + + if (argv[i] == NULL) { + printf("%s memory allocation failed !! %d\n", __func__, __LINE__); + + while (--i >= 0) + free(argv[i]); // Free Previous + + free(argv); // Free Array + return -1; + } + } + + + for (setget = 0; setget < 2; setget++) { + for (m = 0; m < 3; m++) { + for (i = 0; i < num_of_elem; i++) { + + k = 0; + + argv[k] = "switch_cli"; + k++; + argv[k] = "lmac"; + k++; + + + if (m == 0) + strcpy(argv[k], "2"); + else if (m == 1) + strcpy(argv[k], "3"); + else if (m == 2) + strcpy(argv[k], "4"); + + k++; + + for (j = 3; j < 10; j++) + memset(argv[j], '\0', 255); + + if (setget == 1) { + strcpy(argv[k], "get"); + k++; + strcpy(argv[k], lmac_cfg[i].cmdname); + k++; + + + + printf("%s %s %s %s %s\n", argv[0], argv[1], argv[2], argv[3], argv[4]); + system("sleep 1"); + lmac_main(argc, argv, fd); + } else { + strcpy(argv[k], lmac_cfg[i].cmdname); + k++; + + printf("%s %s %s %s", argv[0], argv[1], argv[2], argv[3]); + + for (j = 0; j < lmac_cfg[i].args; j++) { + strcpy(argv[k], "1"); + printf(" %s", argv[k]); + k++; + } + + printf("\n"); + } + + argc = k; + + lmac_main(argc, argv, fd); + } + } + } + + for (i = 0; i < 10; i++) { + free(argv[i]); + } + + free(argv); + + return 0; +} + diff --git a/src/gsw_cli_mac.c b/src/gsw_cli_mac.c new file mode 100755 index 0000000000000000000000000000000000000000..9b23e95acf7152aa23e315ec0265b3d242897d86 --- /dev/null +++ b/src/gsw_cli_mac.c @@ -0,0 +1,3052 @@ +/**************************************************************************** + + Copyright 2010 + Lantiq Deutschland GmbH + Am Campeon 3; 85579 Neubiberg, Germany + + For licensing information, see the file 'LICENSE' in the root folder of + this software module. + +*****************************************************************************/ +#include "ltq_cli_lib.h" + +#ifndef IOCTL_PCTOOL +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <fcntl.h> +#include <unistd.h> +#include <errno.h> +#include <ctype.h> +#endif + +#include <mac_ops.h> +#include <adap_ops.h> + +#include "gsw_cli_mac.h" + +int test_cli(void *fd); + +struct _xgmac_cfg { + char name[256]; + u32 cmdType; + u32 args; + u32 *data1; + u32 *data2; + u32 *data3; + u32 *data4; + u32 *data5; + u32 *data6; + int (*set_func)(void *, GSW_MAC_Cli_t *); + int (*get_func)(void *, GSW_MAC_Cli_t *); + char help[1024]; +}; + +u32 val_0 = 0, val_1 = 0, val_2 = 0, val_3 = 0, val_4 = 0, val_5 = 0; + +u32 gsw_mac_reg_read(void *fd, GSW_MAC_Cli_t *param) +{ + int ret = 0; + u32 offset = param->val[0]; + + param->cmdType = MAC_CLI_REG_RD; + + ret = cli_ioctl(fd, GSW_XGMAC_CFG, param); + + printf("\tREG offset: 0x%04x\n\tData: %08X\n", offset, param->val[0]); + return ret; +} + +int gsw_mac_reg_write(void *fd, GSW_MAC_Cli_t *param) +{ + param->cmdType = MAC_CLI_REG_WR; + + cli_ioctl(fd, GSW_XGMAC_CFG, param); + + + return 0; +} + +u32 xgmac_reg_rd(void *fd, GSW_MAC_Cli_t *param, u32 reg) +{ + param->cmdType = MAC_CLI_REG_RD; + param->val[0] = reg; + + cli_ioctl(fd, GSW_XGMAC_CFG, param); + + return param->val[0]; +} + +void xgmac_reg_wr(void *fd, GSW_MAC_Cli_t *param, u32 reg, u32 data) +{ + param->cmdType = MAC_CLI_REG_RD; + param->val[0] = reg; + param->val[1] = data; + + cli_ioctl(fd, GSW_XGMAC_CFG, param); +} + +#define xgmac_reg_rd_bits(fd, param, reg, field) \ + GET_N_BITS(xgmac_reg_rd(fd, param, reg), \ + reg##_##field##_POS, \ + reg##_##field##_WIDTH) + +#define xgmac_reg_wr_bits(fd, param, reg, field, _val) \ + do { \ + u32 reg_val = xgmac_reg_rd(fd, param, reg); \ + SET_N_BITS(reg_val, \ + reg##_##field##_POS, \ + reg##_##field##_WIDTH, (_val)); \ + xgmac_reg_wr(fd, param, reg, reg_val); \ + } while (0) + +#define xgmac_get_val(var, reg, field) \ + GET_N_BITS((var), \ + reg##_##field##_POS, \ + reg##_##field##_WIDTH) + +#define xgmac_set_val(var, reg, field, val) \ + SET_N_BITS((var), \ + reg##_##field##_POS, \ + reg##_##field##_WIDTH, (val)) + +static int print_mdio_rd_cnt(void *fd, GSW_MAC_Cli_t *param) + +{ + int clause; + int i, phy_reg_data; + u32 start = 0, end = 0, read_reg = 0; + + param->cmdType = MAC_CLI_GET_MDIO_CL; + clause = cli_ioctl(fd, GSW_XGMAC_CFG, param); + + start = param->val[2]; + end = param->val[3]; + + printf("OP \tCL \tDEVADR\tPHYID \tPHYREG\tDATA\n"); + printf("============================================\n"); + + for (i = 0; i <= (end - start); i++) { + + param->cmdType = MAC_CLI_SET_MDIO_RD; + read_reg = start + i; + param->val[2] = read_reg; + + phy_reg_data = cli_ioctl(fd, GSW_XGMAC_CFG, param); + + printf("%s\t", "RD"); + printf("%4s\t", clause ? "CL22" : "CL45"); + printf("%6X\t", param->val[0]); + printf("%5X\t", param->val[1]); + printf("%6X\t", param->val[2]); + printf("%4X\t", phy_reg_data); + printf("\n"); + } + + return 0; +} + +static int print_mdio_rd(void *fd, GSW_MAC_Cli_t *param) + +{ + int clause; + int phy_reg_data; + + param->cmdType = MAC_CLI_GET_MDIO_CL; + clause = cli_ioctl(fd, GSW_XGMAC_CFG, param); + + printf("OP \tCL \tDEVADR\tPHYID \tPHYREG\tDATA\n"); + printf("============================================\n"); + + param->cmdType = MAC_CLI_SET_MDIO_RD; + phy_reg_data = cli_ioctl(fd, GSW_XGMAC_CFG, param); + + printf("%s\t", "RD"); + printf("%4s\t", clause ? "CL22" : "CL45"); + printf("%6X\t", param->val[0]); + printf("%5X\t", param->val[1]); + printf("%6X\t", param->val[2]); + printf("%4X\t", phy_reg_data); + printf("\n"); + + return 0; +} + +static int xgmac_cli_mdio_get_int_sts(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mdio_isr = xgmac_reg_rd(fd, param, MDIO_ISR); + u32 mdio_ier = xgmac_reg_rd(fd, param, MDIO_IER); + + printf("XGMAC %d: MDIO Interrupt Status\n", param->mac_idx); + printf("\tMDIO_IER interrupts %s %08x\n", + mdio_ier ? "ENABLED" : "DISABLED", mdio_ier); + + if (mdio_ier & MASK(MDIO_IER, CWCOMPIE)) + printf("Continuous Write Completion Interrupt Enabled\n"); + + if (mdio_ier & MASK(MDIO_IER, SNGLCOMPIE)) + printf("Single Command Completion Interrupt Enabled\n"); + + if (mdio_ier & MASK(MDIO_IER, PRT3ALIE)) + printf("Dev Present Sts Change Interrupt P3 Enabled\n"); + + if (mdio_ier & MASK(MDIO_IER, PRT2ALIE)) + printf("Dev Present Sts Change Interrupt P2 Enabled\n"); + + if (mdio_ier & MASK(MDIO_IER, PRT1ALIE)) + printf("Dev Present Sts Change Interrupt P1 Enabled\n"); + + if (mdio_ier & MASK(MDIO_IER, PRT0ALIE)) + printf("Dev Present Sts Change Interrupt P0 Enabled\n"); + + if (mdio_ier & MASK(MDIO_IER, PRT3LSIE)) + printf("Link Status Change Interrupt P3 Enabled\n"); + + if (mdio_ier & MASK(MDIO_IER, PRT2LSIE)) + printf("Link Status Change Interrupt P2 Enabled\n"); + + if (mdio_ier & MASK(MDIO_IER, PRT1LSIE)) + printf("Link Status Change Interrupt P1 Enabled\n"); + + if (mdio_ier & MASK(MDIO_IER, PRT0LSIE)) + printf("Link Status Change Interrupt P0 Enabled\n"); + + if (mdio_ier & MASK(MDIO_IER, PRT3CONIE)) + printf("Connect/Disconnect Event Interrupt P3 Enabled\n"); + + if (mdio_ier & MASK(MDIO_IER, PRT2CONIE)) + printf("Connect/Disconnect Event Interrupt P2 Enabled\n"); + + if (mdio_ier & MASK(MDIO_IER, PRT1CONIE)) + printf("Connect/Disconnect Event Interrupt P1 Enabled\n"); + + if (mdio_ier & MASK(MDIO_IER, PRT0CONIE)) + printf("Connect/Disconnect Event Interrupt P0 Enabled\n"); + + if (!mdio_isr) { + printf("\tNo MDIO interrupt status available %08x\n", + mdio_isr); + } else { + printf("\tMDIO interrupt status available %08x\n", + mdio_isr); + + if (mdio_isr & MASK(MDIO_ISR, CWCOMPINT)) + printf("Continuous WR Completion Int Set\n"); + + if (mdio_isr & MASK(MDIO_ISR, SNGLCOMPINT)) + printf("Single Cmd Completion Int Set\n"); + + if (mdio_isr & MASK(MDIO_ISR, PRT3ALINT)) + printf("Dev Present Sts Change Int P3 Set\n"); + + if (mdio_isr & MASK(MDIO_ISR, PRT2ALINT)) + printf("Dev Present Sts Change Int P2 Set\n"); + + if (mdio_isr & MASK(MDIO_ISR, PRT1ALINT)) + printf("Dev Present Sts Change Int P1 Set\n"); + + if (mdio_isr & MASK(MDIO_ISR, PRT0ALINT)) + printf("Dev Present Sts Change Int P0 Set\n"); + + if (mdio_isr & MASK(MDIO_ISR, PRT3LSINT)) + printf("Link Sts Change Int P3 Set\n"); + + if (mdio_isr & MASK(MDIO_ISR, PRT2LSINT)) + printf("Link Sts Change Int P2 Set\n"); + + if (mdio_isr & MASK(MDIO_ISR, PRT1LSINT)) + printf("Link Sts Change Int P1 Set\n"); + + if (mdio_isr & MASK(MDIO_ISR, PRT0LSINT)) + printf("Link Sts Change Int P0 Set\n"); + + if (mdio_isr & MASK(MDIO_ISR, PRT3CONINT)) + printf("Connect/Disconnect Event Int P3 Set\n"); + + if (mdio_isr & MASK(MDIO_ISR, PRT2CONINT)) + printf("Connect/Disconnect Event Int P2 Set\n"); + + if (mdio_isr & MASK(MDIO_ISR, PRT1CONINT)) + printf("Connect/Disconnect Event Int P1 Set\n"); + + if (mdio_isr & MASK(MDIO_ISR, PRT0CONINT)) + printf("Connect/Disconnect Event Int P0 Set\n"); + } + + return 0; +} + + +static int xgmac_cli_get_tx_cfg(void *fd, GSW_MAC_Cli_t *param) +{ + u32 txq_en; + + printf("XGMAC %d: MTL_Q CFG\n", param->mac_idx); + + txq_en = xgmac_reg_rd_bits(fd, param, MTL_Q_TQOMR, TXQEN); + printf("\tMTL TX Q is %s by default\n", + txq_en ? "ENABLED" : "DISABLED"); + + return 0; +} + +static int xgmac_cli_get_counters_cfg(void *fd, GSW_MAC_Cli_t *param) +{ + u32 ror = 0; + + ror = xgmac_reg_rd_bits(fd, param, MMC_CR, ROR); + + printf("XGMAC %d: RMON_CFG\n", param->mac_idx); + + if (ror) + printf("\tMMC mode: Counters reset to zero after read\n"); + else + printf("\tCounters will not get to Zero after a read\n"); + + return 0; +} + +static int xgmac_cli_get_fifo_size(void *fd, GSW_MAC_Cli_t *param) +{ + u32 rx_fifo_size, tx_fifo_size; + + printf("XGMAC %d: FIFO SIZE\n", param->mac_idx); + + rx_fifo_size = xgmac_reg_rd_bits(fd, param, MTL_Q_RQOMR, RQS); + tx_fifo_size = xgmac_reg_rd_bits(fd, param, MTL_Q_TQOMR, TQS); + + rx_fifo_size = ((rx_fifo_size + 1) * 256); + tx_fifo_size = ((tx_fifo_size + 1) * 256); + + printf("\tRX Q, RQS %d byte fifo per queue\n", rx_fifo_size); + printf("\tTX Q, TQS %d byte fifo per queue\n", tx_fifo_size); + return 0; +} + +static int xgmac_cli_get_flow_control_threshold(void *fd, GSW_MAC_Cli_t *param) +{ + u32 fifo_size, rx_fc, rfa, rfd; + + printf("XGMAC %d: MTL FLOW Control Thresh\n", param->mac_idx); + + fifo_size = xgmac_reg_rd_bits(fd, param, MTL_Q_RQOMR, RQS); + fifo_size = ((fifo_size + 1) * 256); + rx_fc = xgmac_reg_rd_bits(fd, param, MTL_Q_RQOMR, EHFC); + rfa = xgmac_reg_rd_bits(fd, param, MTL_Q_RQFCR, RFA); + rfd = xgmac_reg_rd_bits(fd, param, MTL_Q_RQFCR, RFD); + + printf("\tRX Q, RQS %d byte fifo per queue\n", fifo_size); + printf("\tRx Q, Flow control activte Thresh value %d\n", rfa); + printf("\tRx Q, Flow Control deactivate Thresh value %d\n", rfd); + + if ((fifo_size >= 4096) && (rx_fc == 1)) + printf("\tFLow Control will get triggered according" + "to Thresh values\n"); + + if (fifo_size < 4096) + printf("\tRQS is less than 4KB, Flow control" + "will not get triggered\n"); + + if (rx_fc == 0) + printf("\tFlow control is disabled\n"); + + return 0; +} + +static int xgmac_cli_get_mtl_rx_flow_ctl(void *fd, GSW_MAC_Cli_t *param) +{ + u32 rx_fc; + + printf("XGMAC %d: MTL RX Flow Control\n", param->mac_idx); + + rx_fc = xgmac_reg_rd_bits(fd, param, MTL_Q_RQOMR, EHFC); + printf("\tRX Flow control operation is %s\n", + rx_fc ? "ENABLED" : "DISABLED"); + return 0; +} + +static int xgmac_cli_get_mtl_tx(void *fd, GSW_MAC_Cli_t *param) +{ + u32 tx_mode; + + printf("XGMAC %d: MTL TX mode\n", param->mac_idx); + + tx_mode = xgmac_reg_rd_bits(fd, param, MTL_Q_TQOMR, TSF); + + if (tx_mode == 1) + printf("\tXGMAC %d TX Q Mode: Store and Forward mode\n", + param->mac_idx); + else if (tx_mode == 0) + printf("\tXGMAC %d TX Q Mode: Thresh mode\n", + param->mac_idx); + else + printf("\tXGMAC %d TX Q Mode: unknown mode\n", + param->mac_idx); + + u32 tx_thresh; + + printf("XGMAC %d: MTL TX Thresh\n", param->mac_idx); + + tx_thresh = xgmac_reg_rd_bits(fd, param, MTL_Q_TQOMR, TTC); + + if (tx_thresh == MTL_TX_THRESHOLD_32) + printf("\tXGMAC %d TX Q operates in Thresh 32 bytes\n", + param->mac_idx); + else if (tx_thresh == MTL_TX_THRESHOLD_64) + printf("\tXGMAC %d TX Q operates in Thresh 64 bytes\n", + param->mac_idx); + else if (tx_thresh == MTL_TX_THRESHOLD_96) + printf("\tXGMAC %d TX Q operates in Thresh 96 bytes\n", + param->mac_idx); + else if (tx_thresh == MTL_TX_THRESHOLD_128) + printf("\tXGMAC %d TX Q operates in Thresh 128 bytes\n", + param->mac_idx); + else if (tx_thresh == MTL_TX_THRESHOLD_192) + printf("\tXGMAC %d TX Q operates in Thresh 192 bytes\n", + param->mac_idx); + else if (tx_thresh == MTL_TX_THRESHOLD_256) + printf("\tXGMAC %d TX Q operates in Thresh 256 bytes\n", + param->mac_idx); + else if (tx_thresh == MTL_TX_THRESHOLD_384) + printf("\tXGMAC %d TX Q operates in Thresh 384 bytes\n", + param->mac_idx); + else if (tx_thresh == MTL_TX_THRESHOLD_512) + printf("\tXGMAC %d TX Q operates in Thresh 512 bytes\n", + param->mac_idx); + + return 0; + +} + +static int xgmac_cli_get_mtl_rx(void *fd, GSW_MAC_Cli_t *param) +{ + u32 rx_mode; + + printf("XGMAC %d: MTL RX mode\n", param->mac_idx); + + rx_mode = xgmac_reg_rd_bits(fd, param, MTL_Q_RQOMR, RSF); + + if (rx_mode == 1) + printf("\tXGMAC %d RX Q Mode: Store and Forward mode\n", + param->mac_idx); + else if (rx_mode == 0) + printf("\tXGMAC %d RX Q Mode: Thresh mode\n", + param->mac_idx); + else + printf("\tXGMAC %d RX Q Mode: unknown mode\n", + param->mac_idx); + + u32 rx_thresh; + + printf("XGMAC %d: MTL RX Thresh\n", param->mac_idx); + + rx_thresh = xgmac_reg_rd_bits(fd, param, MTL_Q_RQOMR, RTC); + + if (rx_thresh == MTL_RX_THRESHOLD_32) + printf("\tXGMAC %d RX Q operates in Thresh 32 bytes\n", + param->mac_idx); + else if (rx_thresh == MTL_RX_THRESHOLD_64) + printf("\tXGMAC %d RX Q operates in Thresh 64 bytes\n", + param->mac_idx); + else if (rx_thresh == MTL_RX_THRESHOLD_96) + printf("\tXGMAC %d RX Q operates in Thresh 96 bytes\n", + param->mac_idx); + else if (rx_thresh == MTL_RX_THRESHOLD_128) + printf("\tXGMAC %d RX Q operates in Thresh 128 bytes\n", + param->mac_idx); + + return 0; +} + +static int xgmac_cli_get_mtl_q_alg(void *fd, GSW_MAC_Cli_t *param) +{ + u32 tx_mtl_alg, rx_mtl_alg; + + tx_mtl_alg = xgmac_reg_rd_bits(fd, param, MTL_OMR, ETSALG); + + printf("XGMAC %d: MTL_Q ALG\n", param->mac_idx); + + if (tx_mtl_alg == MTL_ETSALG_WRR) + printf("\tTX is set to WRR Algorithm\n"); + else if (tx_mtl_alg == MTL_ETSALG_WFQ) + printf("\tTX is set to WFQ Algorithm\n"); + else if (tx_mtl_alg == MTL_ETSALG_DWRR) + printf("\tTX is set to DWRR Algorithm\n"); + + rx_mtl_alg = xgmac_reg_rd_bits(fd, param, MTL_OMR, RAA); + + if (rx_mtl_alg == MTL_RAA_SP) + printf("\tRX is set to Strict Priority Algorithm\n"); + else if (rx_mtl_alg == MTL_RAA_WSP) + printf("\tRX is set to WSP Algorithm\n"); + + return 0; +} + +static int xgmac_cli_get_crc_settings(void *fd, GSW_MAC_Cli_t *param) +{ + u32 cst, acs, dcrcc; + + printf("XGMAC %d: CRC Stripping\n", param->mac_idx); + cst = xgmac_reg_rd_bits(fd, param, MAC_RX_CFG, CST); + printf("\tCRC stripping for Type packets: %s\n", + cst ? "ENABLED" : "DISABLED"); + acs = xgmac_reg_rd_bits(fd, param, MAC_RX_CFG, ACS); + printf("\tAutomatic Pad or CRC Stripping: %s\n", + acs ? "ENABLED" : "DISABLED"); + dcrcc = xgmac_reg_rd_bits(fd, param, MAC_RX_CFG, DCRCC); + printf("\tMAC RX do not check the CRC field in the rx pkt: %s\n", + dcrcc ? "ENABLED" : "DISABLED"); + return 0; +} + +static int xgmac_cli_dbg_eee_status(void *fd, GSW_MAC_Cli_t *param) +{ + u32 varmac_lps; + + varmac_lps = xgmac_reg_rd(fd, param, MAC_LPI_CSR); + + printf("XGMAC %d: EEE Status\n", param->mac_idx); + + printf("\tMAC_LPI_Control_Status = %x\n", varmac_lps); + + if (varmac_lps & MAC_LPS_TLPIEN) + printf("\tMAC Transmitter has entered the LPI state\n"); + + if (varmac_lps & MAC_LPS_TLPIEX) + printf("\tMAC Transmitter has exited the LPI state\n"); + + if (varmac_lps & MAC_LPS_RLPIEN) + printf("\tMAC Receiver has entered the LPI state\n"); + + if (varmac_lps & MAC_LPS_RLPIEX) + printf("\tMAC Receiver has exited the LPI state\n"); + + return 0; +} + +static int xgmac_cli_get_eee_settings(void *fd, GSW_MAC_Cli_t *param) +{ + u32 twt, lst, pls, lpitxa, lpitxen; + + twt = xgmac_reg_rd_bits(fd, param, MAC_LPI_TCR, TWT); + lst = xgmac_reg_rd_bits(fd, param, MAC_LPI_TCR, LST); + pls = xgmac_reg_rd_bits(fd, param, MAC_LPI_CSR, PLS); + lpitxa = xgmac_reg_rd_bits(fd, param, MAC_LPI_CSR, LPITXA); + lpitxen = xgmac_reg_rd_bits(fd, param, MAC_LPI_CSR, LPITXEN); + + printf("XGMAC %d: EEE Settings\n", param->mac_idx); + + printf("\tLPI LS TIMER: %d\n", lst); + printf("\tLPI TW TIMER: %d\n", twt); + printf("\tPhy link Status: %s\n", + pls ? "ENABLED" : "DISABLED"); + printf("\tLPI Transmit Automate: %s\n", + lpitxa ? "ENABLED" : "DISABLED"); + printf("\tLPI Transmit Enable: %s\n", + lpitxen ? "ENABLED" : "DISABLED"); + + xgmac_cli_dbg_eee_status(fd, param); + return 0; +} + +static int xgmac_cli_get_mac_settings(void *fd, GSW_MAC_Cli_t *param) +{ + u32 te, re, ra; + + printf("XGMAC %d: MAC Settings\n", param->mac_idx); + + te = xgmac_reg_rd_bits(fd, param, MAC_TX_CFG, TE); + printf("\tMAC TX: %s\n", te ? "ENABLED" : "DISABLED"); + re = xgmac_reg_rd_bits(fd, param, MAC_RX_CFG, RE); + printf("\tMAC RX: %s\n", re ? "ENABLED" : "DISABLED"); + ra = xgmac_reg_rd_bits(fd, param, MAC_PKT_FR, RA); + printf("\tMAC Filter RX ALL: %s\n", ra ? "ENABLED" : "DISABLED"); + return 0; +} + +static int xgmac_cli_get_mac_rxtx_sts(void *fd, GSW_MAC_Cli_t *param) +{ + u32 rwt, tjt, wd, jd; + + printf("XGMAC %d: MAC RXTX Status\n", param->mac_idx); + + jd = xgmac_reg_rd_bits(fd, param, MAC_TX_CFG, JD); + wd = xgmac_reg_rd_bits(fd, param, MAC_RX_CFG, WD); + + printf("\tWATCHDOG Disable : %s\n", + wd ? "ENABLED" : "DISABLED"); + printf("\tJABBER TIMEOUT Disable : %s\n", + jd ? "ENABLED" : "DISABLED"); + + rwt = xgmac_reg_rd_bits(fd, param, MAC_RXTX_STS, RWT); + + if (wd) + printf("\tMAC : %s\n", + rwt ? + "Received packet > 16383 bytes with WD=1" : + "No packet recived with RWT"); + else + printf("\tMAC : %s\n", + rwt ? + "Received packet > 2048 bytes with WD=0" : + "No packet recived with RWT"); + + tjt = xgmac_reg_rd_bits(fd, param, MAC_RXTX_STS, TJT); + + if (jd) + printf("\tMAC : %s\n", + tjt ? + "Transmitted packet > 16383 bytes with JD=1" : + "No packet transmitted with TJT"); + else + printf("\tMAC : %s\n", + tjt ? + "Transmitted packet > 2048 bytes with JD=0" : + "No packet transmitted with TJT"); + + return 0; +} + +static int xgmac_cli_get_mtu_settings(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_rcr, je, wd, gpslce, jd, gpsl; + int ret = 0; + + mac_rcr = xgmac_reg_rd(fd, param, MAC_RX_CFG); + + je = xgmac_get_val(mac_rcr, MAC_RX_CFG, JE); + wd = xgmac_get_val(mac_rcr, MAC_RX_CFG, WD); + gpslce = xgmac_get_val(mac_rcr, MAC_RX_CFG, GPSLCE); + gpsl = xgmac_get_val(mac_rcr, MAC_RX_CFG, GPSL); + jd = xgmac_reg_rd_bits(fd, param, MAC_TX_CFG, JD); + + param->cmdType = MAC_CLI_SET_MTU; + ret = cli_ioctl(fd, GSW_XGMAC_CFG, param); + + printf("XGMAC %d: MTU Settings\n", param->mac_idx); + + printf("\tMTU CONFIGURED %d\n", ret); + + if (je) + printf("\tJumbo Enabled: 1, MAC allows jumbo packets of " + "9,018 bytes (9,022 bytes for VLAN tagged packets)" + "without reporting a giant packet error\n"); + + if (wd) + printf("\tWatchdog Disable: 1,MAC disables the " + "watchdog timer on the receiver. The MAC can " + "receive packets of up to 16,383 bytes.\n"); + else + printf("\tWatchdog Disable: 0, MAC does not allow more " + "than 2,048 bytes (10,240 if JE is 1) of the pkt " + "being received.The MAC cuts off any bytes " + "received after 2,048 bytes\n"); + + if (gpslce) { + printf("\tGPSLCE: 1, MAC considers the value in " + "GPSL field to declare a received packet " + "as Giant packet\n"); + printf("\tGPSL: %04x\n", gpsl); + } else { + printf("\tGPSLCE: 0, MAC considers a RX packet as Giant " + "packet when its size is greater than 1,518 bytes" + "(1522 bytes for tagged packet)\n"); + } + + if (jd) + printf("\tJabber Disable: 1, XGMAC disables the " + "jabber timer on the tx. Tx of up to 16,383-byte " + "frames is supported.\n"); + else + printf("\tJabber Disable: 0, XGMAC cuts off the TX " + "if the application sends more than 2,048 bytes " + "of data (10,240 bytes if JE is 1 during TX\n"); + + return 0; +} + +static int xgmac_cli_get_checksum_offload(void *fd, GSW_MAC_Cli_t *param) +{ + u32 co = 0; + + co = xgmac_reg_rd_bits(fd, param, MAC_RX_CFG, IPC); + printf("XGMAC %d: Checksum Offload Settings\n", param->mac_idx); + printf("\tChecksum Offload : %s\n", co ? "ENABLED" : "DISABLED"); + return 0; +} + +static int xgmac_cli_get_mac_addr(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_addr_hi, mac_addr_lo; + u8 mac_addr[6]; + + mac_addr_hi = xgmac_reg_rd(fd, param, MAC_MACA0HR); + mac_addr_lo = xgmac_reg_rd(fd, param, MAC_MACA0LR); + + printf("XGMAC %d: MAC ADDR\n", param->mac_idx); + + printf("\tmac_addr_hi = %08x\n", mac_addr_hi); + printf("\tmac_addr_lo = %08x\n", mac_addr_lo); + + mac_addr[5] = ((mac_addr_hi & 0x0000FF00) >> 8); + mac_addr[4] = (mac_addr_hi & 0x000000FF); + mac_addr[3] = ((mac_addr_lo & 0xFF000000) >> 24); + mac_addr[2] = ((mac_addr_lo & 0x00FF0000) >> 16); + mac_addr[1] = ((mac_addr_lo & 0x0000FF00) >> 8); + mac_addr[0] = (mac_addr_lo & 0x000000FF); + + printf("\tSet mac address %02x:%02x:%02x:%02x:%02x:%02x\n", + mac_addr[0], + mac_addr[1], + mac_addr[2], + mac_addr[3], + mac_addr[4], + mac_addr[5]); + return 0; +} + +static int xgmac_cli_get_mac_rx_mode(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mode = 0; + + printf("XGMAC %d: MAC RX MODE\n", param->mac_idx); + + mode = xgmac_reg_rd_bits(fd, param, MAC_PKT_FR, PR); + printf("\tPromiscous Mode : %s\n", + mode ? "ENABLED" : "DISABLED"); + mode = xgmac_reg_rd_bits(fd, param, MAC_PKT_FR, PM); + printf("\tPass All Multicast : %s\n", + mode ? "ENABLED" : "DISABLED"); + return 0; +} + +static int xgmac_cli_get_rx_vlan_filtering_mode(void *fd, GSW_MAC_Cli_t *param) +{ + u32 vtfe = 0; + + vtfe = xgmac_reg_rd_bits(fd, param, MAC_PKT_FR, VTFE); + + printf("XGMAC %d: RX VLAN Filtering\n", param->mac_idx); + printf("\tRX VLAN Filtering is %s\n", + vtfe ? "ENABLED" : "DISABLED"); + return 0; +} + +static int xgmac_cli_get_mac_speed(void *fd, GSW_MAC_Cli_t *param) +{ + u32 speed; + + speed = xgmac_reg_rd_bits(fd, param, MAC_TX_CFG, SS); + printf("XGMAC %d: MAC Speed\n", param->mac_idx); + + if (speed == 0) + printf("\tXGMAC configured for XGMII 10G speed\n"); + else if (speed == 2) + printf("\tXGMAC configured for GMII 2.5G speed\n"); + else if (speed == 3) + printf("\tXGMAC configured for GMII 1G speed\n"); + + return 0; +} + +static int xgmac_cli_get_pause_frame_ctl(void *fd, GSW_MAC_Cli_t *param) +{ + u32 pfce = 0, rfe = 0, tfe = 0, pt = 0; + + pfce = xgmac_reg_rd_bits(fd, param, MAC_RX_FCR, PFCE); + rfe = xgmac_reg_rd_bits(fd, param, MAC_RX_FCR, RFE); + tfe = xgmac_reg_rd_bits(fd, param, MAC_TX_FCR, TFE); + pt = xgmac_reg_rd_bits(fd, param, MAC_TX_FCR, PT); + + printf("XGMAC %d: Pause Frame Settings\n", param->mac_idx); + + printf("\tPriority based Flow control: %s\n", + pfce ? "ENABLED" : "DISABLED"); + + if (pfce) + printf("\tEnables TX of priority based flow Ctrl Pkts\n"); + else + printf("\tEnables TX and RX of 802.3x Pause Ctrl Pkts\n"); + + printf("\tReceive Flow control: %s\n", + rfe ? "ENABLED" : "DISABLED"); + + if (rfe) + printf("\tMAC decodes the Rx Pause packets and " + "disables the TX for a specified Pause time\n"); + else + printf("\tMAC doesnot decode the Pause packet\n"); + + printf("\tTransmit Flow control: %s\n", + tfe ? "ENABLED" : "DISABLED"); + + if (tfe) + printf("\tMAC enables Flow control operation " + "based on Pause frame\n"); + else + printf("\tMAC does not transmit and Pause packets by " + "itself\n"); + + printf("\tPause Time: %d\n", pt); + return 0; +} + +static int xgmac_cli_get_mac_loopback_mode(void *fd, GSW_MAC_Cli_t *param) +{ + u32 lm; + + lm = xgmac_reg_rd_bits(fd, param, MAC_RX_CFG, LM); + + printf("XGMAC %d: MAC Loopback\n", param->mac_idx); + printf("\tMAC Loopback mode: %s\n", lm ? "ENABLED" : "DISABLED"); + return 0; +} + +static int xgmac_cli_get_tstamp_settings(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_tscr, val; + + mac_tscr = xgmac_reg_rd(fd, param, MAC_TSTAMP_CR); + + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, TSENA); + + printf("XGMAC %d: Timestamp Settings\n", param->mac_idx); + printf("\tTimestamp is added for TX and RX packets: %s\n", + val ? "ENABLED" : "DISABLED"); + + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, TSCFUPDT); + printf("\tTimestamp Update type: %s\n", val ? "FINE" : "COARSE"); + printf("\tAddend present only in FINE update, " + "Timestamp Addend value %d\n", + xgmac_reg_rd(fd, param, MAC_TSTAMP_ADDNDR)); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, TSENALL); + printf("\tTimestamp for All Packets Received: %s\n", + val ? "ENABLED" : "DISABLED"); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, TSCTRLSSR); + printf("\tTimestamp Digital or Binary Rollover Control %s\n", + val ? + "TIME STAMP DIGITAL (1ns accuracy)" : + "BINARY ROLLOVER"); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, TSTRIG); + printf("\tTSTRIG: Timestamp Interrupt trigger: %s\n", + val ? "ENABLED" : "DISABLED"); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, TSVER2ENA); + printf("\tTSVER2ENA: PTP Pkt Processing for Ver 2 Format: %s\n", + val ? "ENABLED" : "DISABLED"); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, TSIPENA); + printf("\tTSIPENA: MAC receiver processes the PTP packets " + "encapsulated directly in the Ethernet packets: %s\n", + val ? "ENABLED" : "DISABLED"); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, TSIPV6ENA); + printf("\tTSIPV6ENA: MAC receiver processes the PTP packets " + "encapsulated in IPv6-UDP packets: %s\n", + val ? "ENABLED" : "DISABLED"); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, TSIPV4ENA); + printf("\tTSIPV4ENA: MAC receiver processes the PTP packets " + "encapsulated in IPv4-UDP packets: %s\n", + val ? "ENABLED" : "DISABLED"); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, TSEVNTENA); + printf("\tTSEVNTENA: Timestamp snapshot is taken only for " + "event msg (SYNC, Delay_Req, Pdelay_Req, or " + "Pdelay_Resp): %s\n", + val ? "ENABLED" : "DISABLED"); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, SNAPTYPSEL); + printf("\tSNAPTYPSEL: These bits, along with TSMSTRENA " + "TSEVNTENA, decide the set of PTP packet types for which " + "snapshot needs to be taken. %s\n", + val ? "ENABLED" : "DISABLED"); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, TSMSTRENA); + printf("\tTSMSTRENA: Snapshot is taken only for the " + "messages that are relevant to the master node: %s\n", + val ? "ENABLED" : "DISABLED"); + return 0; +} + +static int xgmac_cli_get_txtstamp_cnt(void *fd, GSW_MAC_Cli_t *param) +{ + int ret = 0; + + param->cmdType = MAC_CLI_GET_TXTSTAMP_CNT; + ret = cli_ioctl(fd, GSW_XGMAC_CFG, param); + + printf("XGMAC %d: Tx Tstamp captured count in xgmac Fifo %d\n", + param->mac_idx, ret); + + return 0; +} + +static int xgmac_cli_get_txtstamp_pktid(void *fd, GSW_MAC_Cli_t *param) +{ + int ret = 0; + + param->cmdType = MAC_CLI_GET_TXTSTAMP_PKTID; + ret = cli_ioctl(fd, GSW_XGMAC_CFG, param); + + printf("XGMAC %d: Tx Tstamp pkt ID %d\n", + param->mac_idx, ret); + + return 0; +} + +static int xgmac_cli_get_tstamp_status(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_tscr, val; + u64 time; + + mac_tscr = xgmac_reg_rd(fd, param, MAC_TSTAMP_STSR); + + printf("XGMAC %d: Timestamp Status\n", param->mac_idx); + + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_STSR, ATSNS); + printf("\tNumber of Auxiliary Timestamp Snapshots: %d\n", + val); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_STSR, ATSSTM); + printf("\tAuxiliary Timestamp Snapshot Trigger Missed: %d\n", + val); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_STSR, ATSSTN); + printf("\tAuxiliary Timestamp Snapshot Trigger Identifier %d\n", + val); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_STSR, TXTSC); + printf("\tTX Timestamp Captured: %d\n", + val); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_STSR, TSTRGTERR3); + printf("\tTimestamp Target Time Error: %d\n", + val); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_STSR, TSTARGT3); + printf("\tTimestamp Target Time Reached for Time PPS3: %d\n", + val); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_STSR, TSTRGTERR2); + printf("\tTimestamp Target Time Error: %d\n", + val); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_STSR, TSTARGT2); + printf("\tTimestamp Target Time Reached for Time PPS2: %d\n", + val); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_STSR, TSTRGTERR1); + printf("\tTimestamp Target Time Error: %d\n", + val); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_STSR, TSTARGT1); + printf("\tTimestamp Target Time Reached for Time PPS1: %d\n", + val); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_STSR, TSTRGTERR0); + printf("\tTimestamp Target Time Error: %d\n", + val); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_STSR, TSTARGT0); + printf("\tTimestamp Target Time Reached: %d\n", + val); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_STSR, AUXTSTRIG); + printf("\tAuxiliary Timestamp Trigger Snapshot: %d\n", + val); + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_STSR, TSSOVF); + printf("\tTimestamp Seconds Overflow %d\n", + val); + + printf("\n\n"); + + param->cmdType = MAC_CLI_GET_SYSTEM_TIME; + cli_ioctl(fd, GSW_XGMAC_CFG, param); + + time = param->time; + printf("\t64 bit system time in nsec %lld\n", + time); + + val = xgmac_get_val(mac_tscr, MAC_TSTAMP_STSR, TTSNS); + printf("\tTstamp captured count in xgmac Fifo: %d\n", + val); + + param->cmdType = MAC_CLI_GET_TX_TSTAMP; + cli_ioctl(fd, GSW_XGMAC_CFG, param); + + time = param->time; + printf("\tTimestamp captured in nsec: %lld\n", + time); + + return 0; +} + +static int xgmac_cli_print_system_time(void *fd, GSW_MAC_Cli_t *param) +{ + u64 nsec; + u32 reg_sec, nanosec, sec; + u32 min, hr, days; + + reg_sec = xgmac_reg_rd(fd, param, MAC_SYS_TIME_SEC); + nanosec = xgmac_reg_rd(fd, param, MAC_SYS_TIME_NSEC); + nsec = NSEC_TO_SEC * reg_sec; + nsec += nanosec; + + if (reg_sec) + sec = (reg_sec * (nanosec / NANOSEC_IN_ONESEC)); + else + sec = (nanosec / NANOSEC_IN_ONESEC); + + if (sec >= 60) { + min = sec / 60; + sec = sec - (min * 60); + } else { + min = 0; + } + + if (min >= 60) { + hr = min / 60; + min = min - (hr * 60); + } else { + hr = 0; + } + + if (hr >= 24) { + days = hr / 24; + hr = hr - (days * 24); + } else { + days = 0; + } + + printf("Uptime(d:h:m:s): %02d:%02d:%02d:%02d\n", + days, hr, min, sec); + + printf("Sec %d\n", reg_sec); + printf("NanoSec %d\n", nanosec); + printf("Total in nsec %lld\n", nsec); + return 0; +} + +int gswss_reg_wr(void *fd, GSW_MAC_Cli_t *param, u32 reg, u32 data) +{ + param->cmdType = GSWSS_REG_RD; + param->val[0] = reg; + param->val[1] = data; + + cli_ioctl(fd, GSW_GSWSS_CFG, param); + + return 0; +} + +int gswss_reg_rd(void *fd, GSW_MAC_Cli_t *param, u32 reg) +{ + param->cmdType = GSWSS_REG_WR; + param->val[0] = reg; + + cli_ioctl(fd, GSW_GSWSS_CFG, param); + + return param->val[0]; +} + +static int xgmac_cli_get_txtstamp_mode(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_tscr = 0, mac_txtstamp; + u32 snaptypesel, tsmstrena, tsevntena, tsena; + + mac_txtstamp = gswss_reg_rd(fd, param, MAC_TXTS_CIC(param->mac_idx)); + printf("TTSE: %s\n", + GET_N_BITS(mac_txtstamp, 4, 1) ? "ENABLED" : "DISABLED"); + printf("OSTC: %s\n", + GET_N_BITS(mac_txtstamp, 3, 1) ? "ENABLED" : "DISABLED"); + printf("OSTC_AVAIL: %s\n", + GET_N_BITS(mac_txtstamp, 2, 1) ? "ENABLED" : "DISABLED"); + + mac_tscr = xgmac_reg_rd(fd, param, MAC_TSTAMP_CR); + + snaptypesel = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, SNAPTYPSEL); + tsevntena = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, TSEVNTENA); + tsmstrena = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, TSMSTRENA); + tsena = xgmac_get_val(mac_tscr, MAC_TSTAMP_CR, TSENA); + + printf("snaptypesel %d\n", snaptypesel); + printf("tsevntena %d\n", tsevntena); + printf("tsmstrena %d\n", tsmstrena); + printf("tsena %d\n", tsena); + return 0; +} + +static int xgmac_cli_get_debug_sts(void *fd, GSW_MAC_Cli_t *param) +{ + u32 dbg_sts, dbg_ctl, fifo_sel, pktstate, byteen; + + dbg_ctl = xgmac_reg_rd(fd, param, MTL_DBG_CTL); + dbg_sts = xgmac_reg_rd(fd, param, MTL_DBG_STS); + + fifo_sel = xgmac_get_val(dbg_sts, MTL_DBG_CTL, FIFOSEL); + + printf("XGMAC %d: Debug Status\n", param->mac_idx); + + if (xgmac_get_val(dbg_sts, MTL_DBG_STS, FIFOBUSY)) { + printf("\tA FIFO operation is in progress in the MAC, " + "All other fields in this register is Invalid\n"); + return 0; + } + + pktstate = xgmac_get_val(dbg_sts, MTL_DBG_CTL, PKTSTATE); + + if (fifo_sel == 0) { + printf("\tTX FIFO Selected\n"); + + if (pktstate == 0) + printf("\tType of Data Read: PACKET_DATA\n"); + else if (pktstate == 1) + printf("\tType of Data Read: CONTROL_WORD\n"); + else if (pktstate == 2) + printf("\tType of Data Read: SOP_DATA\n"); + else if (pktstate == 3) + printf("\tType of Data Read: EOP_DATA\n"); + + printf("\tSpace Available in Tx Fifo %d\n", + xgmac_get_val(dbg_sts, MTL_DBG_STS, LOCR)); + } else if (fifo_sel == 3) { + printf("\tRX FIFO Selected\n"); + + if (pktstate == 0) + printf("\tType of Data Read: PACKET_DATA\n"); + else if (pktstate == 1) + printf("\tType of Data Read: NORMAL_STS\n"); + else if (pktstate == 2) + printf("\tType of Data Read: LAST_STS\n"); + else if (pktstate == 3) + printf("\tType of Data Read: EOP\n"); + + printf("\tSpace Available in Rx Fifo %d\n", + xgmac_get_val(dbg_sts, MTL_DBG_STS, LOCR)); + } + + byteen = xgmac_get_val(dbg_ctl, MTL_DBG_CTL, BYTEEN); + + if (xgmac_get_val(dbg_sts, MTL_DBG_STS, PKTI)) + printf("\tFull packet is available in RxFIFO\n"); + + return 0; +} + +static int xgmac_cli_get_mtl_int_sts(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mtl_q_isr; + u32 val; + + mtl_q_isr = xgmac_reg_rd(fd, param, MTL_Q_ISR); + val = xgmac_reg_rd(fd, param, MTL_Q_IER); + + printf("XGMAC %d: MTL Interrupt Status\n", param->mac_idx); + + printf("\tMTL_Q_IER interrupts %s %08x\n", + val ? "ENABLED" : "DISABLED", val); + + /* Tx Q Overflow Interrupt Enable */ + if (val & MASK(MTL_Q_IER, TXUIE)) + printf("\t\tTx Q Overflow Interrupt Enabled\n"); + + /* Average bits per slot interrupt enable */ + if (val & MASK(MTL_Q_IER, ABPSIE)) + printf("\t\tAverage bits per slot interrupt Enabled\n"); + + /* Rx Q Overflow Interrupt Enable */ + if (val & MASK(MTL_Q_IER, RXOIE)) + printf("\t\tRx Q Overflow Interrupt Enabled\n"); + + if (!mtl_q_isr) { + printf("\tNo MTL interrupt status available\n"); + } else { + /* Tx Q Overflow Interrupt Enable */ + val = xgmac_get_val(mtl_q_isr, MTL_Q_ISR, TXUNFIS); + + if (val) + printf("\tTransmit Queue had an Underflow " + "during packet transmission\n"); + + // TODO: Check whether this bit is reserved since traffic class is 1 + /* Average bits per slot interrupt enable */ + val = xgmac_get_val(mtl_q_isr, MTL_Q_ISR, ABPSIS); + + if (val) + printf("\tMAC has updated the ABS value for " + "Traffic Class 0\n"); + + /* Rx Q Overflow Interrupt Enable */ + val = xgmac_get_val(mtl_q_isr, MTL_Q_ISR, RXOVFIS); + + if (val) + printf("\tReceive Queue had an Overflow during " + "packet reception\n"); + } + + return 0; +} + +static int xgmac_cli_dbg_int_sts(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_isr = 0, val; + + printf("XGMAC %d: MAC Interrupt Status\n", param->mac_idx); + mac_isr = xgmac_reg_rd(fd, param, MAC_ISR); + val = xgmac_reg_rd(fd, param, MAC_IER); + printf("\tMAC_IER interrupts %s %08x\n", + val ? "ENABLED" : "DISABLED", val); + + /* Enable Timestamp interrupt */ + if (val & MASK(MAC_IER, TSIE)) + printf("\t\tTimestamp Interrupt Enabled\n"); + + /* Enable LPI interrupt (EEE) */ + if (val & MASK(MAC_IER, LPIIE)) + printf("\t\tLPI interrupt (EEE) Enabled\n"); + + /* Enable transmit error status interrupt */ + if (val & MASK(MAC_IER, TXESIE)) + printf("\t\tTransmit error status interrupt Enabled\n"); + + /* Enable Receive error status interrupt */ + if (val & MASK(MAC_IER, RXESIE)) + printf("\t\tReceive error status interrupt Enabled\n"); + + /* Enable power management interrupt */ + if (val & MASK(MAC_IER, PMTIE)) + printf("\tPower Management interrupt Enabled\n"); + + if (!mac_isr) { + printf("\tNo MAC interrupt status available %d\n", + mac_isr); + } else { + printf("XGMAC %d: MAC Interrupt Status %08x\n", + param->mac_idx, mac_isr); + val = xgmac_get_val(mac_isr, MAC_ISR, LSI); + + if (val) + printf("\tMAC_INT_STS: Link Status bits change " + "their value\n"); + + val = xgmac_get_val(mac_isr, MAC_ISR, SMI); + + if (val) + printf("\tMAC_INT_STS: Any of the bits in the " + "MDIO Interrupt Status Register is set\n"); + + val = xgmac_get_val(mac_isr, MAC_ISR, PMTIS); + + if (val) + printf("\tMAC_INT_STS: A Magic packet or " + "Wake-on-LAN packet is received in the " + "power-down mode\n"); + + val = xgmac_get_val(mac_isr, MAC_ISR, LPIIS); + + if (val) + printf("\tMAC_INT_STS: It is set for any LPI " + "state entry or exit in the MAC Tx/Rx\n"); + + val = xgmac_get_val(mac_isr, MAC_ISR, MMCRXIS); + + if (val) + printf("\tMAC_INT_STS: Interrupt is generated " + "in the MMC Receive Interrupt Register\n"); + + val = xgmac_get_val(mac_isr, MAC_ISR, MMCTXIS); + + if (val) + printf("\tMAC_INT_STS: Interrupt is generated in " + "the MMC Transmit Interrupt Register\n"); + + val = xgmac_get_val(mac_isr, MAC_ISR, TSIS); + + if (val) + printf("\tMAC_INT_STS: Timestamp Interrupt Status" + "is set\n"); + + val = xgmac_get_val(mac_isr, MAC_ISR, TXESIS); + + if (val) + printf("\tMAC_INT_STS: Transmit Error, " + "Jabber Timeout (TJT) event occurs during " + "transmission\n"); + + val = xgmac_get_val(mac_isr, MAC_ISR, RXESIS); + + if (val) + printf("\tMAC_INT_STS: Receive Error, Watchdog " + "Timeout (WDT) event occurs during Rx.\n"); + + val = xgmac_get_val(mac_isr, MAC_ISR, GPIIS); + + if (val) + printf("\tMAC_INT_STS: GPIO Interrupt status " + "is set\n"); + + val = xgmac_get_val(mac_isr, MAC_ISR, LS); + + if (val == 0) + printf("\tMAC_INT_STS: Current Link Status: %s\n", + "LINK OK"); + + if (val == 2) + printf("\tMAC_INT_STS: Current Link Status: %s\n", + "Local Link Fault"); + + if (val == 3) + printf("\tMAC_INT_STS: Current Link Status: %s\n", + "Remote Link Fault"); + + return val; + } + + val = xgmac_cli_get_mtl_int_sts(fd, param); + return val; +} + + +static int xgmac_cli_get_mtl_underflow_pkt_cnt(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mtl_q; + u32 val; + + mtl_q = xgmac_reg_rd(fd, param, MTL_Q_TQUR); + printf("XGMAC %d: MTL Underflow Pkt Counter %08x\n", + param->mac_idx, mtl_q); + + val = xgmac_get_val(mtl_q, MTL_Q_TQUR, UFCNTOVF); + + if (val) + printf("\t\tOverflow bit of Underflow pkt counter %d\n", + val); + + val = xgmac_get_val(mtl_q, MTL_Q_TQUR, UFPKTCNT); + + if (val) + printf("\t\tUnerflow packet counter %d\n", val); + + return 0; +} + +static int xgmac_cli_get_mtl_missed_pkt_cnt(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mtl_q; + u32 val; + + mtl_q = xgmac_reg_rd(fd, param, MTL_Q_RQMPOCR); + printf("XGMAC %d: MTL Missed Overflow Pkt Counter %08x\n", + param->mac_idx, mtl_q); + + val = xgmac_get_val(mtl_q, MTL_Q_RQMPOCR, MISCNTOVF); + + if (val) + printf("\t\tRx Queue Missed Packet Counter crossed the " + "maximum limit %d\n", val); + + val = xgmac_get_val(mtl_q, MTL_Q_RQMPOCR, MISPKTCNT); + + if (val) + printf("\t\tNumber of packets missed by XGMAC %d\n", val); + + val = xgmac_get_val(mtl_q, MTL_Q_RQMPOCR, OVFCNTOVF); + + if (val) + printf("\t\tRx Queue Overflow Packet Counter field " + "crossed the maximum limit %d\n", val); + + val = xgmac_get_val(mtl_q, MTL_Q_RQMPOCR, OVFPKTCNT); + + if (val) + printf("\tNo: of packets discarded by the XGMAC %d\n", + val); + + return 0; +} + +static int xgmac_cli_get_fup_fep_setting(void *fd, GSW_MAC_Cli_t *param) +{ + u32 fup, fef; + + printf("XGMAC %d: FUP/FEP Settings\n", param->mac_idx); + + fup = xgmac_reg_rd_bits(fd, param, MTL_Q_RQOMR, FUP); + printf("\tForward Undersized Good Packets for RxQ: %s\n", + fup ? "ENABLE" : "DISABLE"); + fef = xgmac_reg_rd_bits(fd, param, MTL_Q_RQOMR, FEF); + printf("\tForward Error Packets for RxQ: %s\n", + fef ? "ENABLE" : "DISABLE"); + return 0; +} + +static int xgmac_cli_get_ipg(void *fd, GSW_MAC_Cli_t *param) +{ + u32 ipg, ifp, speed; + + ipg = xgmac_reg_rd_bits(fd, param, MAC_TX_CFG, IPG); + ifp = xgmac_reg_rd_bits(fd, param, MAC_TX_CFG, IFP); + speed = xgmac_reg_rd_bits(fd, param, MAC_TX_CFG, SS); + + printf("XGMAC %d: IPG Settings\n", param->mac_idx); + + if (((speed == 3) || (speed == 2)) && (ifp == 0)) { + printf("\tGMMI mode Minimum IPG between packets during " + "TX is %d bits\n", (96 - (ipg * 8))); + return 0; + } + + if ((speed == 0) && (ifp == 0)) + printf("\tMinimum IPG between packets during TX is %d " + "bits, XGMII mode No reduction possible\n", 96); + + if (ifp) + printf("\tMinimum IPG between packets during " + "TX is %d bits\n", (96 - (ipg * 32))); + + return 0; +} + +static int xgmac_cli_get_extcfg(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_extcfg, val; + + mac_extcfg = xgmac_reg_rd(fd, param, MAC_EXTCFG); + + val = xgmac_get_val(mac_extcfg, MAC_EXTCFG, SBDIOEN); + printf("XGMAC %d: MAC Extended CFG SGDIOEN: %s\n", + param->mac_idx, val ? "ENABLED" : "DISABLED"); + return 0; +} + +static int xgmac_cli_dbg_pmt(void *fd, GSW_MAC_Cli_t *param) +{ + u32 mac_pmtcsr, val, i = 0; + u32 value[8]; + + mac_pmtcsr = xgmac_reg_rd(fd, param, MAC_PMT_CSR); + + printf("XGMAC %d: PMT Settings\n", param->mac_idx); + + val = xgmac_get_val(mac_pmtcsr, MAC_PMT_CSR, MGKPKTEN); + printf("Magic_Packet_Enable: %s\n", + val ? "ENABLED" : "DISABLED"); + + val = xgmac_get_val(mac_pmtcsr, MAC_PMT_CSR, RWKPKTEN); + printf("Remote_Wakeup_Packet_Enable: %s\n", + val ? "ENABLED" : "DISABLED"); + + val = xgmac_get_val(mac_pmtcsr, MAC_PMT_CSR, PWRDWN); + printf("Power_Down: %s\n", + val ? "ENABLED" : "DISABLED"); + + val = xgmac_get_val(mac_pmtcsr, MAC_PMT_CSR, MGKPRCVD); + printf("Magic_Packet : %s\n", + val ? "Received" : "Not Received"); + + val = xgmac_get_val(mac_pmtcsr, MAC_PMT_CSR, RWKPRCVD); + printf("Remote_Wakeup_Packet : %s\n", + val ? "Received" : "Not Received"); + + val = xgmac_get_val(mac_pmtcsr, MAC_PMT_CSR, RWKPTR); + printf("Remote_Wakeup_FIFO_Pointer : %d\n", val); + + val = xgmac_get_val(mac_pmtcsr, MAC_PMT_CSR, GLBLUCAST); + printf("Global_unicast: %d\n", val); + + for (i = 0; i < 8; i++) { + value[i] = xgmac_reg_rd(fd, param, MAC_RWK_PFR); + printf("Remote_Wakeup_Packet_REG[%d]: %08x\n", + i, value[i]); + } + + return 0; +} + +#define BUF_SIZE 512 + +static int xgmac_cli_get_rmon(void *fd, GSW_MAC_Cli_t *param) +{ + u32 i = 0; + static char buf[BUF_SIZE] = {'\0'}; + u32 max_mac = 0; + u64 dyn_val = 0; + struct xgmac_mmc_stats mmc_stats[10]; + + if (param->set_all) { + if (gswip_version == GSWIP_3_1) + max_mac = 3; + else if (gswip_version == GSWIP_3_2) + max_mac = 9; + + memset((char *)buf, '\0', BUF_SIZE); + + param->set_all = 0; + + for (i = 0; i < max_mac; i++) { + param->mac_idx = MAC_2 + i; + + memset(&mmc_stats[i], 0, sizeof(struct xgmac_mmc_stats)); + memset(¶m->pstats, 0, sizeof(struct xgmac_mmc_stats)); + + printf("XGMAC %d: Reading rmon\n", param->mac_idx); + + param->cmdType = MAC_CLI_GET_RMON; + + cli_ioctl(fd, GSW_XGMAC_CFG, param); + memcpy(&mmc_stats[i], ¶m->pstats, sizeof(struct xgmac_mmc_stats)); + } + + printf("\nTYPE "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%18s %d\t", "XGMAC", MAC_2 + i); + + printf("%s", buf); + printf("\n"); + } else { + + memset((char *)buf, '\0', BUF_SIZE); + memset(¶m->pstats, 0, sizeof(struct xgmac_mmc_stats)); + + param->cmdType = MAC_CLI_GET_RMON; + + cli_ioctl(fd, GSW_XGMAC_CFG, param); + memcpy(&mmc_stats[0], ¶m->pstats, sizeof(struct xgmac_mmc_stats)); + + printf("\nTYPE %18s %d\n", "XGMAC", param->mac_idx); + max_mac = 1; + } + + memset((char *)buf, '\0', BUF_SIZE); + + printf("Rx_Packets = "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%20llu\t", + mmc_stats[i].rxframecount_gb); + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', BUF_SIZE); + + printf("Rx_Bytes = "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%20llu\t", + mmc_stats[i].rxoctetcount_gb); + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', BUF_SIZE); + + printf("Rx_Byte_errors = "); + + for (i = 0; i < max_mac; i++) { + if (mmc_stats[i].rxoctetcount_g <= mmc_stats[i].rxoctetcount_gb) + sprintf(buf + strlen(buf), "%20llu\t", + (mmc_stats[i].rxoctetcount_gb - mmc_stats[i].rxoctetcount_g)); + else + sprintf(buf + strlen(buf), "%20llu\t", dyn_val); + } + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', BUF_SIZE); + + printf("Rx_Pauseframe = "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%20llu\t", + mmc_stats[i].rxpauseframes); + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', BUF_SIZE); + + printf("Rx_Crc_Errors = "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%20llu\t", + mmc_stats[i].rxcrcerror); + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', BUF_SIZE); + + printf("Rx_Fifo_Errors = "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%20llu\t", + mmc_stats[i].rxfifooverflow); + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', BUF_SIZE); + + printf("\n"); + + printf("Tx_Packets = "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%20llu\t", + mmc_stats[i].txframecount_gb); + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', BUF_SIZE); + + printf("Tx_Bytes = "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%20llu\t", + mmc_stats[i].txoctetcount_gb); + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', BUF_SIZE); + + printf("Tx_Packet_Errors = "); + + for (i = 0; i < max_mac; i++) { + if (mmc_stats[i].txframecount_g <= mmc_stats[i].txframecount_gb) + sprintf(buf + strlen(buf), "%20llu\t", + (mmc_stats[i].txframecount_gb - mmc_stats[i].txframecount_g)); + else + sprintf(buf + strlen(buf), "%20llu\t", dyn_val); + } + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', BUF_SIZE); + + printf("Tx_Byte_Errors = "); + + for (i = 0; i < max_mac; i++) { + if (mmc_stats[i].txoctetcount_g <= mmc_stats[i].txoctetcount_gb) + sprintf(buf + strlen(buf), "%20llu\t", + (mmc_stats[i].txoctetcount_gb - + mmc_stats[i].txoctetcount_g)); + else + sprintf(buf + strlen(buf), "%20llu\t", dyn_val); + } + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', BUF_SIZE); + + printf("Tx_Pauseframe = "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%20llu\t", + mmc_stats[i].txpauseframes); + + printf("%s", buf); + printf("\n"); + + memset((char *)buf, '\0', BUF_SIZE); + + printf("Tx_underflow_error = "); + + for (i = 0; i < max_mac; i++) + sprintf(buf + strlen(buf), "%20llu\t", + mmc_stats[i].txunderflowerror); + + printf("%s", buf); + printf("\n"); + + return 0; +} + +static int xgmac_cli_print_hw_cap(void *fd, GSW_MAC_Cli_t *param) +{ + memset(¶m->hw_feat, 0, sizeof(struct xgmac_hw_features)); + + param->cmdType = MAC_CLI_GET_HW_FEAT; + cli_ioctl(fd, GSW_XGMAC_CFG, param); + + printf("========== Hardware feature register 0 ==============\n"); + + if (param->hw_feat.gmii) + printf("\t 1Gbps Supported\n"); + + if (param->hw_feat.vlhash) + printf("\t Enable Address Filter VLAN Hash Table " + "option is selected.\n"); + + if (param->hw_feat.sma) + printf("\t Enable Station Management Block " + "(MDIO Interface) option is selected.\n"); + + if (param->hw_feat.rwk) + printf("\t Enable Remote Wake-Up Packet Detection " + "option is selected\n"); + + if (param->hw_feat.mgk) + printf("\t Enable Magic Packet Detection option " + "is selected.\n"); + + if (param->hw_feat.mmc) + printf("\t Enable XGMAC Management Counter (MMC) option " + "is selected.\n"); + + if (param->hw_feat.aoe) + printf("\t Enable IPv4 ARP Offload option " + "is selected\n"); + + if (param->hw_feat.ts) + printf("\t Enable IEEE 1588 Timestamp Support option " + "is selected.\n"); + + if (param->hw_feat.eee) + printf("\t Enable Energy Efficient Ethernet (EEE) option " + "is selected.\n"); + + if (param->hw_feat.tx_coe) + printf("\t Enable Transmit TCP/IP Checksum Offload option" + "is selected.\n"); + + if (param->hw_feat.rx_coe) + printf("\t Enable Receive TCP/IP Checksum Check option" + "is selected.\n"); + + if (param->hw_feat.addn_mac) + printf("\t Number of additional MAC addresses " + "selected = %d\n", param->hw_feat.addn_mac); + + if (param->hw_feat.ts_src) { + if (param->hw_feat.ts_src == 1) + printf("\t Time Stamp time source: INTERNAL\n"); + else if (param->hw_feat.ts_src == 2) + printf("\t Time Stamp time source: EXTERNAL\n"); + else if (param->hw_feat.ts_src == 3) + printf("\t Time Stamp time source: " + "INTERNAL & EXTERNAL\n"); + } else { + printf("\t Time Stamp time source: RESERVED\n"); + } + + if (param->hw_feat.sa_vlan_ins) + printf("\t Enable SA and VLAN Insertion on " + "Tx option is selected.\n"); + + if (param->hw_feat.vxn) + printf("\t Support for VxLAN/NVGRE is selected\n"); + + if (param->hw_feat.ediffc) + printf("\t EDMA mode Separate Memory is selected " + "for the Descriptor Cache.\n"); + + if (param->hw_feat.edma) + printf("\t Enhanced DMA option is selected.\n"); + + printf("========== Hardware feature register 1 ==============\n"); + + if (param->hw_feat.rx_fifo_size) + printf("\t Rx Fifo Size %d:%d bytes\n", + param->hw_feat.rx_fifo_size, + (1 << (param->hw_feat.rx_fifo_size + 7))); + + if (param->hw_feat.tx_fifo_size) + printf("\t Tx Fifo Size %d:%d bytes\n", + param->hw_feat.tx_fifo_size, + (1 << (param->hw_feat.tx_fifo_size + 7))); + + if (param->hw_feat.osten) + printf("\t One Step Timestamping Enabled\n"); + + if (param->hw_feat.ptoen) + printf("\t Enable PTP Timestamp Offload Feature is " + "selected\n"); + + if (param->hw_feat.adv_ts_hi) + printf("\t Add IEEE 1588 Higher Word Register option is " + "selected.\n"); + + if (param->hw_feat.dma_width == 0) + printf("\t Dma Width: 32\n"); + else if (param->hw_feat.dma_width == 1) + printf("\t Dma Width: 40\n"); + else if (param->hw_feat.dma_width == 2) + printf("\t Dma Width: 48\n"); + else if (param->hw_feat.dma_width == 3) + printf("\t Dma Width: RESERVED\n"); + + if (param->hw_feat.dcb) + printf("\t Enable Data Center Bridging option is " + "selected.\n"); + + if (param->hw_feat.sph) + printf("\t Enable Split Header Structure option is " + "selected.\n"); + + if (param->hw_feat.tso) + printf("\t Enable TCP Segmentation Offloading for " + "TCP/IP Packets option is selected.\n"); + + if (param->hw_feat.dma_debug) + printf("\t Enable Debug Memory Access option is " + "selected.\n"); + + if (param->hw_feat.rss) + printf("\t RSS Feature Enabled\n"); + + printf("\t Number of traffic classes selected: %d\n", + (param->hw_feat.tc_cnt + 1)); + + if (param->hw_feat.hash_table_size) + printf("\t Hash table size: %d\n", + (64 << (param->hw_feat.hash_table_size - 1))); + else + printf("\t Hash table size: No hash table selected\n"); + + if (param->hw_feat.l3l4_filter_num) + printf("\t Total number of L3 or L4 filters %d\n", + param->hw_feat.l3l4_filter_num); + + printf("========== Hardware feature register 2 ==============\n"); + printf("\t Number of MTL RX Q: %d\n", (param->hw_feat.rx_q_cnt + 1)); + + printf("\t Number of MTL TX Q: %d\n", (param->hw_feat.tx_q_cnt + 1)); + + if (param->hw_feat.rx_ch_cnt) + printf("\t Number of DMA Receive channels: %d\n", + (param->hw_feat.rx_ch_cnt + 1)); + + if (param->hw_feat.tx_ch_cnt) + printf("\t Number of DMA transmit channels: %d\n", + (param->hw_feat.tx_ch_cnt + 1)); + + if (param->hw_feat.pps_out_num) + printf("\t Number of PPS outputs %d\n", + param->hw_feat.pps_out_num); + + if (param->hw_feat.aux_snap_num) { + if (param->hw_feat.aux_snap_num > 4) + printf("\t Number of Auxiliary Snapshot Inputs: " + "RESERVED\n"); + else + printf("\t Number of Auxiliary Snapshot Inputs: " + "%d\n", param->hw_feat.aux_snap_num); + } else { + printf("\t No Auxiliary input\n"); + } + + return 0; +} + +int xgmac_cli_get_pch_crc_cnt(void *fd, GSW_MAC_Cli_t *param) +{ + u32 crc_cnt; + + crc_cnt = xgmac_reg_rd(fd, param, MAC_RX_PCH_CRC_CNT); + + printf("XGMAC %d: PCH CRC Counter: %d\n", + param->mac_idx, crc_cnt); + + return 0; +} + +static int xgmac_cli_get_all_hw_settings(void *fd, GSW_MAC_Cli_t *param) +{ + printf("\n\n\t\t\tGET ALL SETTINGS for XGMAC %d\n", + param->mac_idx); + printf("\n"); + xgmac_cli_get_tx_cfg(fd, param); + xgmac_cli_get_counters_cfg(fd, param); + xgmac_cli_get_fifo_size(fd, param); + xgmac_cli_get_flow_control_threshold(fd, param); + xgmac_cli_get_mtl_rx_flow_ctl(fd, param); + xgmac_cli_get_mtl_tx(fd, param); + xgmac_cli_get_mtl_rx(fd, param); + xgmac_cli_get_mtl_q_alg(fd, param); + + xgmac_cli_get_crc_settings(fd, param); + + xgmac_cli_get_eee_settings(fd, param); + xgmac_cli_dbg_eee_status(fd, param); + + xgmac_cli_get_mac_settings(fd, param); + xgmac_cli_get_mtu_settings(fd, param); + xgmac_cli_get_checksum_offload(fd, param); + xgmac_cli_get_mac_addr(fd, param); + xgmac_cli_get_mac_rx_mode(fd, param); + xgmac_cli_get_rx_vlan_filtering_mode(fd, param); + xgmac_cli_get_mac_speed(fd, param); + xgmac_cli_get_pause_frame_ctl(fd, param); + xgmac_cli_get_mac_loopback_mode(fd, param); + xgmac_cli_get_tstamp_settings(fd, param); + xgmac_cli_get_debug_sts(fd, param); + xgmac_cli_dbg_int_sts(fd, param); + xgmac_cli_get_fup_fep_setting(fd, param); + xgmac_cli_get_ipg(fd, param); + xgmac_cli_dbg_pmt(fd, param); + xgmac_cli_get_mac_rxtx_sts(fd, param); + xgmac_cli_get_mtl_missed_pkt_cnt(fd, param); + + return 0; +} + +struct _xgmac_cfg xgmac_cfg_table[] = { + /* Name WritePtr ReadPtr Args,Data1,Data2,Data3,Data4 Help */ + { + "reset ", + MAC_CLI_RESET, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + 0, + "<XGMAC Reset 1/0 Reset/No reset>" + }, + /* MTL REGISTER SETTINGS */ + { + "mtl_tx ", + MAC_CLI_MTL_TX, + 0, + &val_0, &val_1, 0, 0, 0, 0, + 0, + xgmac_cli_get_mtl_tx, + "<args 2: 1/0: store_forward/threshold arg 2 0:64, 1:res, 2:96, 3:128, 4:192, 5:256, 6:384, 7:512>" + }, + { + "mtl_rx ", + MAC_CLI_MTL_RX, + 0, + &val_0, &val_1, 0, 0, 0, 0, + 0, + xgmac_cli_get_mtl_rx, + "<args 2: 1/0: store_forward/threshold args 2: 0:64, 1:res, 2:96, 3:128>" + }, + { + "flow_ctrl_thresh", + MAC_CLI_FCTHR, + 0, + &val_0, &val_1, 0, 0, 0, 0, + 0, + xgmac_cli_get_flow_control_threshold, + "<args 2: Thresh to act Flow Ctrl, Thresh to de-act Flow Ctrl>" + }, + { + "ts_addend ", + MAC_CLI_SET_TS_ADDEND, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + 0, + "<args 1: Timestamd addend val>" + }, + { + "ptp_tx_mode ", + MAC_CLI_TXTSTAMP_MODE, + 0, + &val_0, &val_1, &val_2, 0, 0, 0, + 0, + xgmac_cli_get_txtstamp_mode, + "<1/0: SnaptypeSel, 1/0: tsmstrena, 1/0: tseventena>" + }, + { + "hwtstamp ", + MAC_CLI_HW_TSTAMP, + 0, + &val_0, &val_1, 0, 0, 0, 0, + 0, + xgmac_cli_get_tstamp_settings, + "<args 2: 1/0 TX timestamp ON/OFF, FILTER_TYPE: 0-14/ None/ALL/Some/V1L4EVENT/V1L4SYNC/V1L4DELAY_REQ/V2L4EVENT/V2L4SYNC/V2L4DELAYREQ/V2L2EVENT/V2L2SYNC/V2L2DELAYREQ/V2EVENT/V2SYNC/V2DELAYREQ>" + }, + { + "error_pkt_fwd ", + MAC_CLI_ERR_PKT_FWD, + 0, + &val_0, &val_1, 0, 0, 0, 0, + 0, + xgmac_cli_get_fup_fep_setting, + "<args 2: <1/0 enable/disable FUP, 1/0 enable/disable FEF>" + }, + { + "int_en ", + MAC_CLI_SET_INT, + 0, + &val_0, &val_1, 0, 0, 0, 0, + 0, + xgmac_cli_dbg_int_sts, + "<MTL and MAC Interrupt Enable and get status>" + }, + { + "mac_enable ", + MAC_CLI_EN, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_mac_settings, + "<args 1: 1/0: MAC enable/disable>" + }, + { + "mac_addr ", + MAC_CLI_SET_MAC_ADDR, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_mac_addr, + "<args 1: xx:xx:xx:xx:xx:xx>" + }, + { + "mac_rx_mode ", + MAC_CLI_SET_RX_MODE, + 0, + &val_0, &val_1, 0, 0, 0, 0, + 0, + xgmac_cli_get_mac_rx_mode, + "<args 2: <1/0 enable/disable promisc, 1/0 accept/deny allmcast>" + }, + { + "mtu ", + MAC_CLI_SET_MTU, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + 0, + "<args 1: MTU value>" + }, + { + "pause_frame_ctrl", + MAC_CLI_PFCTRL, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_pause_frame_ctl, + "<args 1: 0/1/2/3/4: Auto/RX/TX/RXTX/Disabled>" + }, + { + "pause_filter ", + MAC_CLI_SET_PF_FILTER, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + 0, + "<args 1: 1/0: ENABLED / DISABLED>" + }, + { + "speed ", + MAC_CLI_SPEED, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + 0, + "<args 1: 0/1/2/3:LMAC 10/100/200/1G 4/5/6/7/8/9:XGMAC 10/100/1G/2G5/5G/10G 10: 2G5-GMII>" + }, + { + "duplex ", + MAC_CLI_SET_DPX_MODE, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + 0, + "<args 1: 0/1/2:Full/Half/Auto>" + }, + { + "rx_csum_offload ", + MAC_CLI_CSUM_OFFLOAD, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_checksum_offload, + "<args 1: 1/0: ENABLED / DISABLED>" + }, + { + "loopback ", + MAC_CLI_LB, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_mac_loopback_mode, + "<args 1: 1/0: ENABLED / DISABLED>" + }, + { + "eee ", + MAC_CLI_EEE, + 0, + &val_0, &val_1, &val_2, 0, 0, 0, + 0, + xgmac_cli_get_eee_settings, + "<args 3: 1/0: ENABLED / DISABLED, Timer 0, Timer 1>" + }, + { + "crc_strip_type ", + MAC_CLI_CRC_STRIP, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_crc_settings, + "<args 1: 1/0: ENABLED / DISABLED>" + }, + { + "crc_strip_acs ", + MAC_CLI_CRC_STRIP_ACS, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_crc_settings, + "<args 1: 1/0: ENABLED / DISABLED>" + }, + { + "ipg ", + MAC_CLI_IPG, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_ipg, + "<args 1 IPG val 0 - 4, default val 0>," + }, + { + "magic_pmt ", + MAC_CLI_MAGIC_PMT, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_dbg_pmt, + "<args 1: 1/0: ENABLED / DISABLED>" + }, + { + "gucast_pmt ", + MAC_CLI_PMT_GUCAST, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_dbg_pmt, + "<args 1: 1/0: ENABLED / DISABLED>" + }, + { + "extcfg ", + MAC_CLI_EXTCFG, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_extcfg, + "<args 1: 1/0: ENABLED / DISABLED SBDIOEN>" + }, + { + "rxtx ", + MAC_CLI_SET_RXTXCFG, + 0, + &val_0, &val_1, 0, 0, 0, 0, + 0, + xgmac_cli_get_mac_rxtx_sts, + "<args 2: 1/0 Jabber Enable/Disable 1/0 Watchdog Enable/Disable>" + }, + { + "linksts ", + MAC_CLI_SET_LINKSTS, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + 0, + "<args 1: 0/1/2 UP/DOWN/AUTO>" + }, + { + "lpitx ", + MAC_CLI_SET_LPITX, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_eee_settings, + "<args 1: 1/0: ENABLED / DISABLED>" + }, + { + "mdio_cl ", + MAC_CLI_SET_MDIO_CL, + 0, + &val_0, &val_1, 0, 0, 0, 0, + 0, + 0, + "<args 2: 1/0: CL22/CL45, phy_id>" + }, + { + "mdio_rd ", + MAC_CLI_SET_MDIO_RD, + 0, + &val_0, &val_1, &val_2, 0, 0, 0, + print_mdio_rd, + 0, + "<args 3: dev_adr, phy_id, phy_reg>" + }, + { + "mdio_rd_cont ", + MAC_CLI_SET_MDIO_RD_CNT, + 0, + &val_0, &val_1, &val_2, &val_3, 0, 0, + print_mdio_rd_cnt, + 0, + "<args 4: dev_adr, phy_id, phy_reg_st, phy_reg_end>" + }, + { + "mdio_wr ", + MAC_CLI_SET_MDIO_WR, + 0, + &val_0, &val_1, &val_2, &val_3, 0, 0, + 0, + 0, + "<args 4: dev_adr, phy_id, phy_reg, phy_data>" + }, + { + "mdio_int ", + MAC_CLI_SET_MDIO_INT, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_mdio_get_int_sts, + "<args 1: <mdio_int>" + }, + { + "mdio_int ", + MAC_CLI_GET_MDIO_CL, + 0, + 0, 0, 0, 0, 0, 0, + 0, + 0, + "Get MDIO CL" + }, + { + "fcs_gen ", + MAC_CLI_SET_FCSGEN, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_crc_settings, + "<args 1: 0/1/2 CRC_PAD_ENA/CRC_EN_PAD_DIS/CRC_PAD_DIS>" + }, + { + "gint ", + MAC_CLI_SET_GINT, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + 0, + "<args 1: 1/0: G.INT ENABLED / DISABLED>" + }, + { + "rx_crc ", + MAC_CLI_SET_RXCRC, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_crc_settings, + "<args 1: 1/0: ENABLED / DISABLED Rx CRC check>" + }, + { + "fifo_add ", + MAC_CLI_ADD_FIFO, + 0, + &val_0, &val_1, &val_2, &val_3, &val_4, &val_5, + 0, + 0, + "<Add Tx Fifo>" + }, + { + "fifo_del ", + MAC_CLI_DEL_FIFO, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + 0, + "<Del Tx Fifo arg1 <rec_id>>" + }, + { + "ts_src_sel ", + MAC_CLI_SET_EXT_TS_SRC, + 0, + &val_0, 0, 0, 0, 0, 0, + 0, + 0, + "<REF: 0/1 - Internal/External>" + }, + { + "flush_tx_q ", + MAC_CLI_FLUSH_TX_Q, + 0, + 0, 0, 0, 0, 0, 0, + 0, + 0, + "flush MTL transmit Q>" + }, + { + "fifo ", + MAC_CLI_GET_FIFO, + 0, + 0, 0, 0, 0, 0, 0, + 0, + 0, + "<Get Tx Fifo>" + }, + { + "init ", + MAC_CLI_INIT, + 0, + 0, 0, 0, 0, 0, 0, + 0, + 0, + "<Initialize the module based on the Index Set>" + }, + { + "systime ", + MAC_CLI_GET_SYSTEM_TIME, + 0, + 0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_print_system_time, + "Print System time" + }, + { + "ts_enable ", + MAC_CLI_SET_TSTAMP_EN, + 0, + 0, 0, 0, 0, 0, 0, + 0, + 0, + "Tx Timestamp Enable" + }, + { + "ts_disable ", + MAC_CLI_SET_TSTAMP_DIS, + 0, + 0, 0, 0, 0, 0, 0, + 0, + 0, + "Disable TX and RX timestamp" + }, + + /* MAC REGISTER SETTINGS */ + + { + "pause_tx ", + MAC_CLI_PAUSE_TX, + 0, + 0, 0, 0, 0, 0, 0, + 0, + 0, + "<Initiate PAUSE packet transmit>" + }, + { + "miss_ovf_pkt_cnt", + MAC_CLI_GET_MISS_PKT_CNT, + 0, + 0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_mtl_missed_pkt_cnt, + "<Missed Overflow packet count>" + }, + { + "uflow_pkt_cnt ", + MAC_CLI_GET_UFLOW_PKT_CNT, + 0, + 0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_mtl_underflow_pkt_cnt, + "<Underflow packet count>" + }, + { + "tstamp_sts ", + MAC_CLI_GET_TSTAMP_STS, + 0, + 0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_tstamp_status, + "<Get timestamp status>" + }, + { + "txtstamp_cnt ", + MAC_CLI_GET_TXTSTAMP_CNT, + 0, + 0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_txtstamp_cnt, + "<Get txtstamp count>" + }, + { + "txtstamp_pktid ", + MAC_CLI_GET_TXTSTAMP_PKTID, + 0, + 0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_txtstamp_pktid, + "<Get txtstamp pktid>" + }, + /* OTHERS */ + { + "rmon ", + MAC_CLI_GET_RMON, + 0, + 0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_rmon, + "<args 1: 1: reset 0: no reset>" + }, + { + "clear_rmon ", + MAC_CLI_CLEAR_RMON, + 0, + 0, 0, 0, 0, 0, 0, + 0, + 0, + "<clear rmon>" + }, + { + "rmon_cfg ", + MAC_CLI_GET_CNTR_CFG, + 0, + 0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_counters_cfg, + "<RMON config>" + }, + { + "hw_feat ", + MAC_CLI_GET_HW_FEAT, + 0, + 0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_print_hw_cap, + "<get all hw features>" + }, + { + "all ", + MAC_CLI_GET_ALL, + 0, + 0, 0, 0, 0, 0, 0, + 0, + xgmac_cli_get_all_hw_settings, + "<Get all HW settings>" + }, +}; + +void xgmac_menu(void) +{ + int i = 0; + + int num_of_elem = (sizeof(xgmac_cfg_table) / sizeof(struct _xgmac_cfg)); + + printf("\n MAC SET API's\n\n"); + + for (i = 0; i < num_of_elem; i++) { + if (xgmac_cfg_table[i].data1 || xgmac_cfg_table[i].data2 || + xgmac_cfg_table[i].data3 || xgmac_cfg_table[i].data4) + printf("switch_cli xgmac <2/3/4/* MacIdx> %15s \t %s \n", + xgmac_cfg_table[i].name, + xgmac_cfg_table[i].help); + } + + printf("\n MAC GET API's\n\n"); + + for (i = 0; i < num_of_elem; i++) { + if (xgmac_cfg_table[i].get_func) + printf("switch_cli xgmac <2/3/4/ MacIdx> get %15s\n", + xgmac_cfg_table[i].name); + } + + printf("\n"); +} + +static int con_mac_adr_str(char *mac_adr_str, unsigned char *mac_adr_ptr) +{ + char *str_ptr = mac_adr_str; + char *endptr; + int i; + unsigned long int val; + + if (strlen(mac_adr_str) != (12 + 5)) { + printf("ERROR: Invalid length of mac address (xx:xx:xx:xx:xx:xx)!\n"); + return 0; + } + + for (i = 0; i < 6; i++) { + val = strtoul(str_ptr, &endptr, 16); + + if ((*endptr != 0) && (*endptr != ':') && (*endptr != '-')) + return 0; + + *(mac_adr_ptr + i) = (unsigned char)(val & 0xFF); + str_ptr = endptr + 1; + } + + return 1; +} +static inline int mac_nstrlen(char *s) +{ + int cnt = 0; + + if (s == (void *)0) + return 0; + + while (s[cnt]) + cnt++; + + return cnt; +} + +static inline unsigned long mac_nstrtoul(const char *s, int len, + u32 *next_idx) +{ + unsigned long acc; + int cnt = 0; + char c; + int base = 0; + + acc = 0; + + c = s[cnt]; + + if (s[cnt] == '0') { + cnt++; + + if ((s[cnt] == 'x') || (s[cnt] == 'X')) { + base = 16; + cnt++; + } + } + + if (!base) + base = 10; + + for (; cnt < len; cnt++) { + c = s[cnt]; + + if ((c >= '0') && (c <= '9')) + c -= '0'; + else if ((c >= 'a') && (c <= 'f')) + c -= 'a' - 10; + else if ((c >= 'A') && (c <= 'F')) + c -= 'A' - 10; + else + c = 0; + + acc *= base; + acc += c; + } + + (*next_idx)++; + + return acc; +} + +void removeSpace(char *str) +{ + char *p1 = str, *p2 = str; + + do + while (*p2 == ' ') + p2++; + + while ((*p1++ = *p2++)); +} + +void xgmac_cli_init(void) +{ + int i = 0; + int num_of_elem = (sizeof(xgmac_cfg_table) / sizeof(struct _xgmac_cfg)); + + for (i = 0; i < num_of_elem; i++) { + removeSpace(xgmac_cfg_table[i].name); + + xgmac_cfg_table[i].args = 4; + + if (xgmac_cfg_table[i].data1) + xgmac_cfg_table[i].args += 1; + + if (xgmac_cfg_table[i].data2) + xgmac_cfg_table[i].args += 1; + + if (xgmac_cfg_table[i].data3) + xgmac_cfg_table[i].args += 1; + + if (xgmac_cfg_table[i].data4) + xgmac_cfg_table[i].args += 1; + + if (xgmac_cfg_table[i].data5) + xgmac_cfg_table[i].args += 1; + + if (xgmac_cfg_table[i].data6) + xgmac_cfg_table[i].args += 1; + } +} + +void set_pdata(char *arg, u32 *data, u32 *start_arg) +{ + u32 val = mac_nstrtoul(arg, mac_nstrlen(arg), start_arg); + *data = val; +} + +void set_data(char *argv[], int i, u32 *start_arg) +{ + if (xgmac_cfg_table[i].data1) + set_pdata(argv[*start_arg], xgmac_cfg_table[i].data1, start_arg); + + if (xgmac_cfg_table[i].data2) + set_pdata(argv[*start_arg], xgmac_cfg_table[i].data2, start_arg); + + if (xgmac_cfg_table[i].data3) + set_pdata(argv[*start_arg], xgmac_cfg_table[i].data3, start_arg); + + if (xgmac_cfg_table[i].data4) + set_pdata(argv[*start_arg], xgmac_cfg_table[i].data4, start_arg); + + if (xgmac_cfg_table[i].data5) + set_pdata(argv[*start_arg], xgmac_cfg_table[i].data5, start_arg); + + if (xgmac_cfg_table[i].data6) + set_pdata(argv[*start_arg], xgmac_cfg_table[i].data6, start_arg); +} + +int xgmac_main(u32 argc, char *argv[], void *fd) +{ + u32 i = 0, j = 0, found = 0; + u32 start_arg = 0; + int idx = 0; + u32 max_mac = 3; + u32 nanosec; + u32 sec, min, hr, days; + int num_of_elem = + (sizeof(xgmac_cfg_table) / sizeof(struct _xgmac_cfg)); + GSW_MAC_Cli_t param; + + memset(¶m, 0x00, sizeof(param)); + + xgmac_cli_init(); + + start_arg++; + start_arg++; + + if (!argv[start_arg]) { + xgmac_menu(); + goto end; + } + + if (!strcmp(argv[start_arg], "-help")) { + found = 1; + xgmac_menu(); + goto end; + } + + if (!strcmp(argv[start_arg], "test")) { + found = 1; + test_cli(fd); + goto end; + } + + if (found) + goto end; + + if (!strcmp(argv[start_arg], "*")) { + start_arg++; + param.set_all = 1; + } else { + idx = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), &start_arg); + + if (gswip_version == GSWIP_3_1) + max_mac = 3; + else if (gswip_version == GSWIP_3_2) + max_mac = 9; + + if ((idx < MAC_2) || (idx > ((max_mac + MAC_2) - 1))) { + printf("Give valid mac index 2/3/4/...\n"); + return -1; + } + + param.set_all = 0; + } + + param.mac_idx = idx; + + if (!argv[start_arg]) { + xgmac_menu(); + goto end; + } + + if (!strcmp(argv[start_arg], "uptime")) { + found = 1; + + param.val[0] = 0x0d08; + sec = gsw_mac_reg_read(fd, ¶m); + param.val[0] = 0x0d0c; + nanosec = gsw_mac_reg_read(fd, ¶m); + + if (sec >= 60) { + min = sec / 60; + sec = sec - (min * 60); + } else { + min = 0; + } + + if (min >= 60) { + hr = min / 60; + min = min - (hr * 60); + } else { + hr = 0; + } + + if (hr >= 24) { + days = hr / 24; + hr = hr - (days * 24); + } else { + days = 0; + } + + printf("Uptime(d:h:m:s): %02d:%02d:%02d:%02d\n", + days, hr, min, sec); + + goto end; + } + + if (!strcmp(argv[start_arg], "r")) { + start_arg++; + found = 1; +#if defined(PC_UTILITY) || defined(__KERNEL__) + + if ((strstr(argv[start_arg], "0x")) || + (strstr(argv[start_arg], "0X"))) + printf("matches with 0x\n"); + else + printf("Please give the address with " + "0x firmat\n"); + +#endif + + param.val[0] = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + gsw_mac_reg_read(fd, ¶m); + + goto end; + } + + if (!strcmp(argv[start_arg], "w")) { + start_arg++; + found = 1; + +#if defined(PC_UTILITY) || defined(__KERNEL__) + + if ((strstr(argv[start_arg], "0x")) || + (strstr(argv[start_arg], "0X"))) + printf("matches with 0x\n"); + else + printf("Please give the address with " + "0x format\n"); + +#endif + + param.val[0] = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + param.val[1] = mac_nstrtoul(argv[start_arg], + mac_nstrlen(argv[start_arg]), + &start_arg); + gsw_mac_reg_write(fd, ¶m); + + goto end; + } + + if (!strcmp(argv[start_arg], "get")) { + start_arg++; + + if (!argv[start_arg]) { + xgmac_menu(); + goto end; + } + + for (i = 0; i < num_of_elem; i++) { + removeSpace(xgmac_cfg_table[i].name); + + if (!strcmp(xgmac_cfg_table[i].name, argv[start_arg])) { + + param.cmdType = xgmac_cfg_table[i].cmdType; +#if 0 + + if (param.set_all) + printf("switch_cli xgmac * get %s\n", xgmac_cfg_table[i].name); + else + printf("switch_cli xgmac %d get %s\n", param.mac_idx, xgmac_cfg_table[i].name); + +#endif + + param.get = 1; + + if (param.set_all) { + + if (xgmac_cfg_table[i].cmdType == MAC_CLI_GET_RMON) { + if (xgmac_cfg_table[i].get_func) { + xgmac_cfg_table[i].get_func(fd, ¶m); + } + + found = 1; + break; + } + + if (gswip_version == GSWIP_3_1) + max_mac = 3; + else if (gswip_version == GSWIP_3_2) + max_mac = 9; + + for (j = 0; j < max_mac; j++) { + param.mac_idx = MAC_2 + j; + + if (xgmac_cfg_table[i].get_func) { + xgmac_cfg_table[i].get_func(fd, ¶m); + } else { + + if (cli_ioctl(fd, GSW_XGMAC_CFG, ¶m) != 0) + return (-1); + } + } + } else { + if (xgmac_cfg_table[i].get_func) { + xgmac_cfg_table[i].get_func(fd, ¶m); + } else { + + if (cli_ioctl(fd, GSW_XGMAC_CFG, ¶m) != 0) + return (-1); + } + } + + found = 1; + break; + } + } + } + + if (found) + goto end; + + for (i = 0; i < num_of_elem; i++) { + removeSpace(argv[start_arg]); + + if (!strcmp(xgmac_cfg_table[i].name, argv[start_arg])) { + start_arg++; + + if (argc != xgmac_cfg_table[i].args) { + printf("[USAGE:]\n"); + printf("switch_cli xgmac <idx> %s %s\n", + xgmac_cfg_table[i].name, + xgmac_cfg_table[i].help); + return 0; + } + + param.cmdType = xgmac_cfg_table[i].cmdType; + +#if 1 + + if (param.set_all) + printf("switch_cli xgmac * %s", xgmac_cfg_table[i].name); + else + printf("switch_cli xgmac %d %s", param.mac_idx, xgmac_cfg_table[i].name); + +#endif + + if (xgmac_cfg_table[i].cmdType == MAC_CLI_SET_MAC_ADDR) { + con_mac_adr_str(argv[start_arg], param.mac_addr); + //printf(" %02x:%02x:%02x:%02x:%02x:%02x", + // param.mac_addr[0],param.mac_addr[1],param.mac_addr[2], + // param.mac_addr[3],param.mac_addr[4],param.mac_addr[5]); + } else { + set_data(argv, i, &start_arg); + + if (xgmac_cfg_table[i].data1) { + param.val[0] = *(xgmac_cfg_table[i].data1); + //printf(" %d", param.val[0]); + } + + if (xgmac_cfg_table[i].data2) { + param.val[1] = *(xgmac_cfg_table[i].data2); + //printf(" %d", param.val[1]); + } + + if (xgmac_cfg_table[i].data3) { + param.val[2] = *(xgmac_cfg_table[i].data3); + //printf(" %d", param.val[2]); + } + + if (xgmac_cfg_table[i].data4) { + param.val[3] = *(xgmac_cfg_table[i].data4); + //printf(" %d", param.val[3]); + } + + if (xgmac_cfg_table[i].data5) { + param.val[4] = *(xgmac_cfg_table[i].data5); + //printf(" %d", param.val[4]); + } + + if (xgmac_cfg_table[i].data6) { + param.val[5] = *(xgmac_cfg_table[i].data6); + //printf(" %d", param.val[5]); + } + } + + printf("\n"); + + param.get = 0; + + if (param.set_all) { + + if (gswip_version == GSWIP_3_1) + max_mac = 3; + else if (gswip_version == GSWIP_3_2) + max_mac = 9; + + for (j = 0; j < max_mac; j++) { + param.mac_idx = MAC_2 + j; + + if (xgmac_cfg_table[i].set_func) { + xgmac_cfg_table[i].set_func(fd, ¶m); + } else { + if (cli_ioctl(fd, GSW_XGMAC_CFG, ¶m) != 0) + return (-1); + } + } + } else { + + if (xgmac_cfg_table[i].set_func) { + xgmac_cfg_table[i].set_func(fd, ¶m); + } else { + if (cli_ioctl(fd, GSW_XGMAC_CFG, ¶m) != 0) + return (-1); + } + } + + found = 1; + break; + } + } + +end: + + if (found == 0) + printf("command entered is invalid, use --help to display" + "cmds\n"); + + return 0; +} + + +int test_cli(void *fd) +{ + int i = 0, j = 0, k = 0; + int num_of_elem = + (sizeof(xgmac_cfg_table) / sizeof(struct _xgmac_cfg)); + int argc = 0; + char **argv; + + argv = malloc(10 * sizeof(char *)); // allocate the array to hold the pointer + + if (argv == NULL) { + printf("%s memory allocation failed !! %d\n", __func__, __LINE__); + return -1; + } + + for (i = 0; i < 10; i++) { + argv[i] = malloc(255 * sizeof(char)); // allocate each array to hold the strings + + if (argv[i] == NULL) { + printf("%s memory allocation failed !! %d\n", __func__, __LINE__); + + while (--i >= 0) + free(argv[i]); // Free Previous + + free(argv); // Free Array + return -1; + } + } + + + argv[0] = "switch_cli"; + argv[1] = "xgmac"; + + for (k = 0; k < 5; k++) { + if (k == 0) + strcpy(argv[2], "2"); + else if (k == 1) + strcpy(argv[2], "3"); + else if (k == 2) + strcpy(argv[2], "4"); + else if (k == 3) + strcpy(argv[2], "*"); + + for (i = 1; i < num_of_elem; i++) { + + for (j = 3; j < 10; j++) + memset(argv[j], '\0', 255); + + argc = xgmac_cfg_table[i].args; + + + if (xgmac_cfg_table[i].data1 || xgmac_cfg_table[i].data2 || + xgmac_cfg_table[i].data3 || xgmac_cfg_table[i].data4 || + xgmac_cfg_table[i].data5 || xgmac_cfg_table[i].data6) { + + if (k == 4) { + strcpy(argv[2], "2"); + } + + strcpy(argv[3], xgmac_cfg_table[i].name); + + if (xgmac_cfg_table[i].data1) + strcpy(argv[4], "1"); + + if (xgmac_cfg_table[i].data2) + strcpy(argv[5], "2"); + + if (xgmac_cfg_table[i].data3) + strcpy(argv[6], "3"); + + if (xgmac_cfg_table[i].data4) + strcpy(argv[7], "4"); + + if (xgmac_cfg_table[i].data5) + strcpy(argv[8], "5"); + + if (xgmac_cfg_table[i].data6) + strcpy(argv[9], "6"); + + printf("%s %s %s %s\n", argv[0], argv[1], argv[2], argv[3]); + + if (argv[4]) + printf(" %s", argv[4]); + + if (argv[5]) + printf(" %s", argv[5]); + + if (argv[6]) + printf(" %s", argv[6]); + + if (argv[7]) + printf(" %s", argv[7]); + + if (argv[8]) + printf(" %s", argv[8]); + + if (argv[9]) + printf(" %s", argv[9]); + + printf("\n"); + + } else { + + strcpy(argv[3], "get"); + strcpy(argv[4], xgmac_cfg_table[i].name); + + printf("%s %s %s %s %s\n", argv[0], argv[1], argv[2], argv[3], argv[4]); + } + + system("sleep 1"); + xgmac_main(argc, argv, fd); + + if (xgmac_cfg_table[i].get_func) { + + for (j = 3; j < 10; j++) + memset(argv[j], '\0', 255); + + strcpy(argv[3], "get"); + strcpy(argv[4], xgmac_cfg_table[i].name); + + printf("%s %s %s %s %s\n", argv[0], argv[1], argv[2], argv[3], argv[4]); + system("sleep 1"); + xgmac_main(argc, argv, fd); + } + } + } + + free(argv); + + return 0; +} + diff --git a/src/gsw_cli_mac.h b/src/gsw_cli_mac.h new file mode 100755 index 0000000000000000000000000000000000000000..98c88b732d72a1fbb3fd0fb9751db53135deaf4b --- /dev/null +++ b/src/gsw_cli_mac.h @@ -0,0 +1,1280 @@ +#ifndef GSW_CLI_MAC_H_ +#define GSW_CLI_MAC_H_ + +#define NANOSEC_IN_ONESEC 550000 +#define NSEC_TO_SEC 1000000000 + + +#define MAC_TX_CFG 0x0000 +#define MAC_RX_CFG 0x0004 +#define MAC_PKT_FR 0x0008 +#define MAC_TX_FCR 0x0070 +#define MAC_TX_FCR1 0x0074 +#define MAC_TX_FCR2 0x0078 +#define MAC_TX_FCR3 0x007C +#define MAC_TX_FCR4 0x0080 +#define MAC_TX_FCR5 0x0084 +#define MAC_TX_FCR6 0x0088 +#define MAC_TX_FCR7 0x008C +#define MAC_RX_FCR 0x0090 +#define MAC_ISR 0x00b0 +#define MAC_IER 0x00b4 +#define MAC_RXTX_STS 0x00b8 +#define MAC_PMT_CSR 0x00c0 +#define MAC_RWK_PFR 0x00c4 +#define MAC_LPI_CSR 0x00d0 +#define MAC_LPI_TCR 0x00d4 +#define MAC_VR 0x0110 +#define MAC_HW_F0 0x011c +#define MAC_HW_F1 0x0120 +#define MAC_HW_F2 0x0124 +#define MAC_EXTCFG 0x0140 +#define MAC_MACA0HR 0x0300 +#define MAC_MACA0LR 0x0304 +#define MAC_MACA1HR 0x0308 +#define MAC_MACA1LR 0x030c +#define MAC_TSTAMP_CR 0x0d00 +#define MAC_SUBSEC_INCR 0x0d04 +#define MAC_SYS_TIME_SEC 0x0d08 +#define MAC_SYS_TIME_NSEC 0x0d0c +#define MAC_SYS_TIME_SEC_UPD 0x0d10 +#define MAC_SYS_TIME_NSEC_UPD 0x0d14 +#define MAC_TSTAMP_ADDNDR 0x0d18 +#define MAC_TSTAMP_STSR 0x0d20 +#define MAC_TXTSTAMP_NSECR 0x0d30 +#define MAC_TXTSTAMP_SECR 0x0d34 +#define MAC_TXTSTAMP_STS 0x0d38 +#define MAC_AUX_CTRL 0x0d40 +#define MAC_AUX_NSEC 0x0d48 +#define MAC_AUX_SEC 0x0d4c +#define MAC_RX_PCH_CRC_CNT 0x0d2c + +#define MTL_OMR 0x1000 +#define MTL_DBG_CTL 0x1008 +#define MTL_DBG_STS 0x100c +#define MTL_DBG_DAT 0x1010 +#define MTL_ISR 0x1020 +#define MTL_RQDCM0R 0x1030 +#define MTL_TCPR_MAP0 0x1040 + +#define MTL_Q_TQOMR 0x1100 +#define MTL_Q_TQUR 0x1104 +#define MTL_Q_TQDG 0x1108 +#define MTL_Q_RQOMR 0x1140 +#define MTL_Q_RQMPOCR 0x1144 +#define MTL_Q_RQDG 0x1148 +#define MTL_Q_RQFCR 0x1150 +#define MTL_Q_IER 0x1170 +#define MTL_Q_ISR 0x1174 + + +#define MAC_LPS_TLPIEN 0x00000001 +#define MAC_LPS_TLPIEX 0x00000002 +#define MAC_LPS_RLPIEN 0x00000004 +#define MAC_LPS_RLPIEX 0x00000008 + +#define XGMAC_CTRL_REG_ADDR_POS 0 +#define XGMAC_CTRL_REG_ADDR_WIDTH 14 +#define XGMAC_CTRL_REG_OPMODE_POS 14 +#define XGMAC_CTRL_REG_OPMODE_WIDTH 1 +#define XGMAC_CTRL_REG_BAS_POS 15 +#define XGMAC_CTRL_REG_BAS_WIDTH 1 + +#define MAC_AUX_CTRL_ATSFC_POS 0 +#define MAC_AUX_CTRL_ATSFC_WIDTH 1 +#define MAC_AUX_CTRL_ATSEN0_POS 4 +#define MAC_AUX_CTRL_ATSEN0_WIDTH 1 +#define MAC_AUX_CTRL_ATSEN1_POS 5 +#define MAC_AUX_CTRL_ATSEN1_WIDTH 1 +#define MAC_AUX_CTRL_ATSEN2_POS 6 +#define MAC_AUX_CTRL_ATSEN2_WIDTH 1 +#define MAC_AUX_CTRL_ATSEN3_POS 7 +#define MAC_AUX_CTRL_ATSEN3_WIDTH 1 + +#define MAC_HW_F0_ADDMACADRSEL_POS 18 +#define MAC_HW_F0_ADDMACADRSEL_WIDTH 5 +#define MAC_HW_F0_ARPOFFSEL_POS 9 +#define MAC_HW_F0_ARPOFFSEL_WIDTH 1 +#define MAC_HW_F0_EEESEL_POS 13 +#define MAC_HW_F0_EEESEL_WIDTH 1 +#define MAC_HW_F0_GMIISEL_POS 1 +#define MAC_HW_F0_GMIISEL_WIDTH 1 +#define MAC_HW_F0_MGKSEL_POS 7 +#define MAC_HW_F0_MGKSEL_WIDTH 1 +#define MAC_HW_F0_MMCSEL_POS 8 +#define MAC_HW_F0_MMCSEL_WIDTH 1 +#define MAC_HW_F0_RWKSEL_POS 6 +#define MAC_HW_F0_RWKSEL_WIDTH 1 +#define MAC_HW_F0_RXCOESEL_POS 16 +#define MAC_HW_F0_RXCOESEL_WIDTH 1 +#define MAC_HW_F0_SAVLANINS_POS 27 +#define MAC_HW_F0_SAVLANINS_WIDTH 1 +#define MAC_HW_F0_SMASEL_POS 5 +#define MAC_HW_F0_SMASEL_WIDTH 1 +#define MAC_HW_F0_TSSEL_POS 12 +#define MAC_HW_F0_TSSEL_WIDTH 1 +#define MAC_HW_F0_TSSTSSEL_POS 25 +#define MAC_HW_F0_TSSTSSEL_WIDTH 2 +#define MAC_HW_F0_TXCOESEL_POS 14 +#define MAC_HW_F0_TXCOESEL_WIDTH 1 +#define MAC_HW_F0_VLHASH_POS 4 +#define MAC_HW_F0_VLHASH_WIDTH 1 +#define MAC_HW_F0_VXN_POS 29 +#define MAC_HW_F0_VXN_WIDTH 1 +#define MAC_HW_F0_EDIFFC_POS 30 +#define MAC_HW_F0_EDIFFC_WIDTH 1 +#define MAC_HW_F0_EDMA_POS 31 +#define MAC_HW_F0_EDMA_WIDTH 1 + +#define MAC_HW_F1_ADDR64_POS 14 +#define MAC_HW_F1_ADDR64_WIDTH 2 +#define MAC_HW_F1_ADVTHWORD_POS 13 +#define MAC_HW_F1_ADVTHWORD_WIDTH 1 +#define MAC_HW_F1_DBGMEMA_POS 19 +#define MAC_HW_F1_DBGMEMA_WIDTH 1 +#define MAC_HW_F1_DCBEN_POS 16 +#define MAC_HW_F1_DCBEN_WIDTH 1 +#define MAC_HW_F1_HASHTBLSZ_POS 24 +#define MAC_HW_F1_HASHTBLSZ_WIDTH 3 +#define MAC_HW_F1_L3L4FNUM_POS 27 +#define MAC_HW_F1_L3L4FNUM_WIDTH 4 +#define MAC_HW_F1_NUMTC_POS 21 +#define MAC_HW_F1_NUMTC_WIDTH 3 +#define MAC_HW_F1_RSSEN_POS 20 +#define MAC_HW_F1_RSSEN_WIDTH 1 +#define MAC_HW_F1_RXFIFOSIZE_POS 0 +#define MAC_HW_F1_RXFIFOSIZE_WIDTH 5 +#define MAC_HW_F1_SPHEN_POS 17 +#define MAC_HW_F1_SPHEN_WIDTH 1 +#define MAC_HW_F1_TSOEN_POS 18 +#define MAC_HW_F1_TSOEN_WIDTH 1 +#define MAC_HW_F1_TXFIFOSIZE_POS 6 +#define MAC_HW_F1_TXFIFOSIZE_WIDTH 5 +#define MAC_HW_F1_OSTEN_POS 11 +#define MAC_HW_F1_OSTEN_WIDTH 1 +#define MAC_HW_F1_PTOEN_POS 12 +#define MAC_HW_F1_PTOEN_WIDTH 1 + +#define MAC_HW_F2_AUXSNAPNUM_POS 28 +#define MAC_HW_F2_AUXSNAPNUM_WIDTH 3 +#define MAC_HW_F2_PPSOUTNUM_POS 24 +#define MAC_HW_F2_PPSOUTNUM_WIDTH 3 +#define MAC_HW_F2_RXCHCNT_POS 12 +#define MAC_HW_F2_RXCHCNT_WIDTH 4 +#define MAC_HW_F2_RXQCNT_POS 0 +#define MAC_HW_F2_RXQCNT_WIDTH 4 +#define MAC_HW_F2_TXCHCNT_POS 18 +#define MAC_HW_F2_TXCHCNT_WIDTH 4 +#define MAC_HW_F2_TXQCNT_POS 6 +#define MAC_HW_F2_TXQCNT_WIDTH 4 + +#define MAC_EXTCFG_SBDIOEN_POS 8 +#define MAC_EXTCFG_SBDIOEN_WIDTH 1 + +#define MAC_IER_TSIE_POS 12 +#define MAC_IER_TSIE_WIDTH 1 +#define MAC_IER_TXESIE_POS 13 +#define MAC_IER_TXESIE_WIDTH 1 +#define MAC_IER_RXESIE_POS 14 +#define MAC_IER_RXESIE_WIDTH 1 +#define MAC_IER_LPIIE_POS 5 +#define MAC_IER_LPIIE_WIDTH 1 +#define MAC_IER_PMTIE_POS 4 +#define MAC_IER_PMTIE_WIDTH 1 + +#define MAC_ISR_LSI_POS 0 +#define MAC_ISR_LSI_WIDTH 1 +#define MAC_ISR_SMI_POS 1 +#define MAC_ISR_SMI_WIDTH 1 +#define MAC_ISR_PMTIS_POS 4 +#define MAC_ISR_PMTIS_WIDTH 1 +#define MAC_ISR_LPIIS_POS 5 +#define MAC_ISR_LPIIS_WIDTH 1 +#define MAC_ISR_MMCRXIS_POS 9 +#define MAC_ISR_MMCRXIS_WIDTH 1 +#define MAC_ISR_MMCTXIS_POS 10 +#define MAC_ISR_MMCTXIS_WIDTH 1 +#define MAC_ISR_TSIS_POS 12 +#define MAC_ISR_TSIS_WIDTH 1 +#define MAC_ISR_TXESIS_POS 13 +#define MAC_ISR_TXESIS_WIDTH 1 +#define MAC_ISR_RXESIS_POS 14 +#define MAC_ISR_RXESIS_WIDTH 1 +#define MAC_ISR_GPIIS_POS 15 +#define MAC_ISR_GPIIS_WIDTH 1 +#define MAC_ISR_LS_POS 24 +#define MAC_ISR_LS_WIDTH 2 + +#define MAC_LPI_CSR_TLPIEN_POS 0 +#define MAC_LPI_CSR_TLPIEN_WIDTH 1 +#define MAC_LPI_CSR_TLPIEX_POS 1 +#define MAC_LPI_CSR_TLPIEX_WIDTH 1 +#define MAC_LPI_CSR_RLPIEN_POS 2 +#define MAC_LPI_CSR_RLPIEN_WIDTH 1 +#define MAC_LPI_CSR_RLPIEX_POS 3 +#define MAC_LPI_CSR_RLPIEX_WIDTH 1 +#define MAC_LPI_CSR_LPITXEN_POS 16 +#define MAC_LPI_CSR_LPITXEN_WIDTH 1 +#define MAC_LPI_CSR_LPIATE_POS 20 +#define MAC_LPI_CSR_LPIATE_WIDTH 1 +#define MAC_LPI_CSR_LPITXA_POS 19 +#define MAC_LPI_CSR_LPITXA_WIDTH 1 +#define MAC_LPI_CSR_PLS_POS 17 +#define MAC_LPI_CSR_PLS_WIDTH 1 + +#define MAC_LPI_TCR_LST_POS 16 +#define MAC_LPI_TCR_LST_WIDTH 10 +#define MAC_LPI_TCR_TWT_POS 0 +#define MAC_LPI_TCR_TWT_WIDTH 16 + +#define MAC_MACA1HR_AE_POS 31 +#define MAC_MACA1HR_AE_WIDTH 1 + +#define MAC_PKT_FR_PM_POS 4 +#define MAC_PKT_FR_PM_WIDTH 1 +#define MAC_PKT_FR_PR_POS 0 +#define MAC_PKT_FR_PR_WIDTH 1 +#define MAC_PKT_FR_VTFE_POS 16 +#define MAC_PKT_FR_VTFE_WIDTH 1 +#define MAC_PKT_FR_RA_POS 31 +#define MAC_PKT_FR_RA_WIDTH 1 +#define MAC_PKT_FR_PCF_POS 6 +#define MAC_PKT_FR_PCF_WIDTH 2 + +#define MAC_PMT_CSR_PWRDWN_POS 0 +#define MAC_PMT_CSR_PWRDWN_WIDTH 1 +#define MAC_PMT_CSR_MGKPKTEN_POS 1 +#define MAC_PMT_CSR_MGKPKTEN_WIDTH 1 +#define MAC_PMT_CSR_RWKPKTEN_POS 2 +#define MAC_PMT_CSR_RWKPKTEN_WIDTH 1 +#define MAC_PMT_CSR_MGKPRCVD_POS 5 +#define MAC_PMT_CSR_MGKPRCVD_WIDTH 1 +#define MAC_PMT_CSR_RWKPRCVD_POS 6 +#define MAC_PMT_CSR_RWKPRCVD_WIDTH 1 +#define MAC_PMT_CSR_RWKPFE_POS 10 +#define MAC_PMT_CSR_RWKPFE_WIDTH 1 +#define MAC_PMT_CSR_RWKPTR_POS 24 +#define MAC_PMT_CSR_RWKPTR_WIDTH 5 +#define MAC_PMT_CSR_GLBLUCAST_POS 9 +#define MAC_PMT_CSR_GLBLUCAST_WIDTH 1 +#define MAC_PMT_CSR_RWKFILTRST_POS 31 +#define MAC_PMT_CSR_RWKFILTRST_WIDTH 1 + +#define MAC_TX_FCR_PT_POS 16 +#define MAC_TX_FCR_PT_WIDTH 16 +#define MAC_TX_FCR_TFE_POS 1 +#define MAC_TX_FCR_TFE_WIDTH 1 +#define MAC_TX_FCR_FCB_POS 0 +#define MAC_TX_FCR_FCB_WIDTH 1 +#define MAC_TX_FCR1_PT_POS 16 +#define MAC_TX_FCR1_PT_WIDTH 16 +#define MAC_TX_FCR1_TFE_POS 1 +#define MAC_TX_FCR1_TFE_WIDTH 1 +#define MAC_TX_FCR2_PT_POS 16 +#define MAC_TX_FCR2_PT_WIDTH 16 +#define MAC_TX_FCR2_TFE_POS 1 +#define MAC_TX_FCR2_TFE_WIDTH 1 +#define MAC_TX_FCR3_PT_POS 16 +#define MAC_TX_FCR3_PT_WIDTH 16 +#define MAC_TX_FCR3_TFE_POS 1 +#define MAC_TX_FCR3_TFE_WIDTH 1 +#define MAC_TX_FCR4_PT_POS 16 +#define MAC_TX_FCR4_PT_WIDTH 16 +#define MAC_TX_FCR4_TFE_POS 1 +#define MAC_TX_FCR4_TFE_WIDTH 1 +#define MAC_TX_FCR5_PT_POS 16 +#define MAC_TX_FCR5_PT_WIDTH 16 +#define MAC_TX_FCR5_TFE_POS 1 +#define MAC_TX_FCR5_TFE_WIDTH 1 +#define MAC_TX_FCR6_PT_POS 16 +#define MAC_TX_FCR6_PT_WIDTH 16 +#define MAC_TX_FCR6_TFE_POS 1 +#define MAC_TX_FCR6_TFE_WIDTH 1 +#define MAC_TX_FCR7_PT_POS 16 +#define MAC_TX_FCR7_PT_WIDTH 16 +#define MAC_TX_FCR7_TFE_POS 1 +#define MAC_TX_FCR7_TFE_WIDTH 1 + + +#define MAC_RX_CFG_ACS_POS 1 +#define MAC_RX_CFG_ACS_WIDTH 1 +#define MAC_RX_CFG_CST_POS 2 +#define MAC_RX_CFG_CST_WIDTH 1 +#define MAC_RX_CFG_DCRCC_POS 3 +#define MAC_RX_CFG_DCRCC_WIDTH 1 +#define MAC_RX_CFG_HDSMS_POS 12 +#define MAC_RX_CFG_HDSMS_WIDTH 3 +#define MAC_RX_CFG_IPC_POS 9 +#define MAC_RX_CFG_IPC_WIDTH 1 +#define MAC_RX_CFG_JE_POS 8 +#define MAC_RX_CFG_JE_WIDTH 1 +#define MAC_RX_CFG_LM_POS 10 +#define MAC_RX_CFG_LM_WIDTH 1 +#define MAC_RX_CFG_RE_POS 0 +#define MAC_RX_CFG_RE_WIDTH 1 +#define MAC_RX_CFG_WD_POS 7 +#define MAC_RX_CFG_WD_WIDTH 1 +#define MAC_RX_CFG_GPSLCE_POS 6 +#define MAC_RX_CFG_GPSLCE_WIDTH 1 +#define MAC_RX_CFG_GPSL_POS 16 +#define MAC_RX_CFG_GPSL_WIDTH 14 +#define MAC_RX_CFG_PRXM_POS 15 +#define MAC_RX_CFG_PRXM_WIDTH 1 + +#define MAC_RX_FCR_PFCE_POS 8 +#define MAC_RX_FCR_PFCE_WIDTH 1 +#define MAC_RX_FCR_RFE_POS 0 +#define MAC_RX_FCR_RFE_WIDTH 1 +#define MAC_RX_FCR_UP_POS 1 +#define MAC_RX_FCR_UP_WIDTH 1 + +#define MAC_RXTX_STS_RWT_POS 8 +#define MAC_RXTX_STS_RWT_WIDTH 1 +#define MAC_RXTX_STS_TJT_POS 0 +#define MAC_RXTX_STS_TJT_WIDTH 1 + +#define MAC_SUBSEC_INCR_SNSINC_POS 8 +#define MAC_SUBSEC_INCR_SNSINC_WIDTH 8 +#define MAC_SUBSEC_INCR_SSINC_POS 16 +#define MAC_SUBSEC_INCR_SSINC_WIDTH 8 + +#define MAC_SYS_TIME_NSEC_UPD_ADDSUB_POS 31 +#define MAC_SYS_TIME_NSEC_UPD_ADDSUB_WIDTH 1 +#define MAC_SYS_TIME_NSEC_UPD_TSSS_POS 0 +#define MAC_SYS_TIME_NSEC_UPD_TSSS_WIDTH 31 + +#define MAC_TX_CFG_USS_POS 31 +#define MAC_TX_CFG_USS_WIDTH 1 +#define MAC_TX_CFG_SS_POS 29 +#define MAC_TX_CFG_SS_WIDTH 2 +#define MAC_TX_CFG_TE_POS 0 +#define MAC_TX_CFG_TE_WIDTH 1 +#define MAC_TX_CFG_JD_POS 16 +#define MAC_TX_CFG_JD_WIDTH 1 +#define MAC_TX_CFG_IPG_POS 8 +#define MAC_TX_CFG_IPG_WIDTH 3 +#define MAC_TX_CFG_IFP_POS 11 +#define MAC_TX_CFG_IFP_WIDTH 1 +#define MAC_TX_CFG_PEN_POS 19 +#define MAC_TX_CFG_PEN_WIDTH 1 +#define MAC_TX_CFG_PCHM_POS 18 +#define MAC_TX_CFG_PCHM_WIDTH 1 +#define MAC_TX_CFG_G9991EN_POS 28 +#define MAC_TX_CFG_G9991EN_WIDTH 1 + +#define MAC_TSTAMP_CR_AV8021ASMEN_POS 28 +#define MAC_TSTAMP_CR_AV8021ASMEN_WIDTH 1 +#define MAC_TSTAMP_CR_SNAPTYPSEL_POS 16 +#define MAC_TSTAMP_CR_SNAPTYPSEL_WIDTH 2 +#define MAC_TSTAMP_CR_TSADDREG_POS 5 +#define MAC_TSTAMP_CR_TSADDREG_WIDTH 1 +#define MAC_TSTAMP_CR_TSCFUPDT_POS 1 +#define MAC_TSTAMP_CR_TSCFUPDT_WIDTH 1 +#define MAC_TSTAMP_CR_TSCTRLSSR_POS 9 +#define MAC_TSTAMP_CR_TSCTRLSSR_WIDTH 1 +#define MAC_TSTAMP_CR_TSENA_POS 0 +#define MAC_TSTAMP_CR_TSENA_WIDTH 1 +#define MAC_TSTAMP_CR_TSENALL_POS 8 +#define MAC_TSTAMP_CR_TSENALL_WIDTH 1 +#define MAC_TSTAMP_CR_TSEVNTENA_POS 14 +#define MAC_TSTAMP_CR_TSEVNTENA_WIDTH 1 +#define MAC_TSTAMP_CR_TSINIT_POS 2 +#define MAC_TSTAMP_CR_TSINIT_WIDTH 1 +#define MAC_TSTAMP_CR_TSIPENA_POS 11 +#define MAC_TSTAMP_CR_TSIPENA_WIDTH 1 +#define MAC_TSTAMP_CR_TSIPV4ENA_POS 13 +#define MAC_TSTAMP_CR_TSIPV4ENA_WIDTH 1 +#define MAC_TSTAMP_CR_TSIPV6ENA_POS 12 +#define MAC_TSTAMP_CR_TSIPV6ENA_WIDTH 1 +#define MAC_TSTAMP_CR_TSMSTRENA_POS 15 +#define MAC_TSTAMP_CR_TSMSTRENA_WIDTH 1 +#define MAC_TSTAMP_CR_TSVER2ENA_POS 10 +#define MAC_TSTAMP_CR_TSVER2ENA_WIDTH 1 +#define MAC_TSTAMP_CR_TXTSSTSM_POS 24 +#define MAC_TSTAMP_CR_TXTSSTSM_WIDTH 1 +#define MAC_TSTAMP_CR_TSTRIG_POS 4 +#define MAC_TSTAMP_CR_TSTRIG_WIDTH 1 +#define MAC_TSTAMP_CR_TSUPDT_POS 3 +#define MAC_TSTAMP_CR_TSUPDT_WIDTH 1 +#define MAC_TSTAMP_CR_ESTI_POS 20 +#define MAC_TSTAMP_CR_ESTI_WIDTH 1 +#define MAC_TSTAMP_CR_CSC_POS 19 +#define MAC_TSTAMP_CR_CSC_WIDTH 1 + +#define MAC_TSTAMP_STSR_ATSNS_POS 25 +#define MAC_TSTAMP_STSR_ATSNS_WIDTH 5 +#define MAC_TSTAMP_STSR_ATSSTM_POS 24 +#define MAC_TSTAMP_STSR_ATSSTM_WIDTH 1 +#define MAC_TSTAMP_STSR_ATSSTN_POS 16 +#define MAC_TSTAMP_STSR_ATSSTN_WIDTH 4 +#define MAC_TSTAMP_STSR_TXTSC_POS 15 +#define MAC_TSTAMP_STSR_TXTSC_WIDTH 1 +#define MAC_TSTAMP_STSR_TTSNS_POS 10 +#define MAC_TSTAMP_STSR_TTSNS_WIDTH 5 +#define MAC_TSTAMP_STSR_TSTRGTERR3_POS 9 +#define MAC_TSTAMP_STSR_TSTRGTERR3_WIDTH 1 +#define MAC_TSTAMP_STSR_TSTARGT3_POS 8 +#define MAC_TSTAMP_STSR_TSTARGT3_WIDTH 1 +#define MAC_TSTAMP_STSR_TSTRGTERR2_POS 7 +#define MAC_TSTAMP_STSR_TSTRGTERR2_WIDTH 1 +#define MAC_TSTAMP_STSR_TSTARGT2_POS 6 +#define MAC_TSTAMP_STSR_TSTARGT2_WIDTH 1 +#define MAC_TSTAMP_STSR_TSTRGTERR1_POS 5 +#define MAC_TSTAMP_STSR_TSTRGTERR1_WIDTH 1 +#define MAC_TSTAMP_STSR_TSTARGT1_POS 4 +#define MAC_TSTAMP_STSR_TSTARGT1_WIDTH 1 +#define MAC_TSTAMP_STSR_TSTRGTERR0_POS 3 +#define MAC_TSTAMP_STSR_TSTRGTERR0_WIDTH 1 +#define MAC_TSTAMP_STSR_TSTARGT0_POS 1 +#define MAC_TSTAMP_STSR_TSTARGT0_WIDTH 1 +#define MAC_TSTAMP_STSR_AUXTSTRIG_POS 2 +#define MAC_TSTAMP_STSR_AUXTSTRIG_WIDTH 1 +#define MAC_TSTAMP_STSR_TSSOVF_POS 0 +#define MAC_TSTAMP_STSR_TSSOVF_WIDTH 1 + +#define MAC_TXTSTAMP_NSECR_TXTSSTSMIS_POS 31 +#define MAC_TXTSTAMP_NSECR_TXTSSTSMIS_WIDTH 1 + +#define MAC_TXTSTAMP_STS_PKTID_POS 0 +#define MAC_TXTSTAMP_STS_PKTID_WIDTH 10 + +#define MAC_VR_SNPSVER_POS 0 +#define MAC_VR_SNPSVER_WIDTH 8 + +#define MMC_CR 0x0800 + +#define MMC_TXOCTETCOUNT_GB_LO 0x0814 +#define MMC_TXFRAMECOUNT_GB_LO 0x081c +#define MMC_TXBROADCASTFRAMES_G_LO 0x0824 +#define MMC_TXMULTICASTFRAMES_G_LO 0x082c +#define MMC_TXUNICASTFRAMES_GB_LO 0x0864 +#define MMC_TXMULTICASTFRAMES_GB_LO 0x086c +#define MMC_TXBROADCASTFRAMES_GB_LO 0x0874 +#define MMC_TXUNDERFLOWERROR_LO 0x087c +#define MMC_TXOCTETCOUNT_G_LO 0x0884 +#define MMC_TXFRAMECOUNT_G_LO 0x088c +#define MMC_TXPAUSEFRAMES_LO 0x0894 +#define MMC_TXVLANFRAMES_G_LO 0x089c + +#define MMC_RXFRAMECOUNT_GB_LO 0x0900 +#define MMC_RXOCTETCOUNT_GB_LO 0x0908 +#define MMC_RXOCTETCOUNT_G_LO 0x0910 +#define MMC_RXBROADCASTFRAMES_G_LO 0x0918 +#define MMC_RXMULTICASTFRAMES_G_LO 0x0920 +#define MMC_RXCRCERROR_LO 0x0928 +#define MMC_RXRUNTERROR 0x0930 +#define MMC_RXJABBERERROR 0x0934 +#define MMC_RXUNDERSIZE_G 0x0938 +#define MMC_RXOVERSIZE_G 0x093c +#define MMC_RXUNICASTFRAMES_G_LO 0x0970 +#define MMC_RXLENGTHERROR_LO 0x0978 +#define MMC_RXOUTOFRANGETYPE_LO 0x0980 +#define MMC_RXPAUSEFRAMES_LO 0x0988 +#define MMC_RXFIFOOVERFLOW_LO 0x0990 +#define MMC_RXVLANFRAMES_GB_LO 0x0998 +#define MMC_RXWATCHDOGERROR 0x09a0 + +#define MMC_CR_CR_POS 0 +#define MMC_CR_CR_WIDTH 1 +#define MMC_CR_CSR_POS 1 +#define MMC_CR_CSR_WIDTH 1 +#define MMC_CR_ROR_POS 2 +#define MMC_CR_ROR_WIDTH 1 +#define MMC_CR_MCF_POS 3 +#define MMC_CR_MCF_WIDTH 1 +#define MMC_CR_MCT_POS 4 +#define MMC_CR_MCT_WIDTH 2 + +#define MTL_OMR_ETSALG_POS 5 +#define MTL_OMR_ETSALG_WIDTH 2 +#define MTL_OMR_RAA_POS 2 +#define MTL_OMR_RAA_WIDTH 1 + +#define MTL_Q_RQMPOCR_MISCNTOVF_POS 31 +#define MTL_Q_RQMPOCR_MISCNTOVF_WIDTH 1 +#define MTL_Q_RQMPOCR_MISPKTCNT_POS 16 +#define MTL_Q_RQMPOCR_MISPKTCNT_WIDTH 11 +#define MTL_Q_RQMPOCR_OVFCNTOVF_POS 15 +#define MTL_Q_RQMPOCR_OVFCNTOVF_WIDTH 1 +#define MTL_Q_RQMPOCR_OVFPKTCNT_POS 0 +#define MTL_Q_RQMPOCR_OVFPKTCNT_WIDTH 11 + +#define MTL_Q_TQUR_UFCNTOVF_POS 15 +#define MTL_Q_TQUR_UFCNTOVF_WIDTH 1 +#define MTL_Q_TQUR_UFPKTCNT_POS 0 +#define MTL_Q_TQUR_UFPKTCNT_WIDTH 11 + +#define MTL_Q_RQDR_PRXQ_POS 16 +#define MTL_Q_RQDR_PRXQ_WIDTH 14 +#define MTL_Q_RQDR_RXQSTS_POS 4 +#define MTL_Q_RQDR_RXQSTS_WIDTH 2 +#define MTL_Q_RQFCR_RFA_POS 1 +#define MTL_Q_RQFCR_RFA_WIDTH 6 +#define MTL_Q_RQFCR_RFD_POS 17 +#define MTL_Q_RQFCR_RFD_WIDTH 6 +#define MTL_Q_RQOMR_EHFC_POS 7 +#define MTL_Q_RQOMR_EHFC_WIDTH 1 +#define MTL_Q_RQOMR_RQS_POS 16 +#define MTL_Q_RQOMR_RQS_WIDTH 9 +#define MTL_Q_RQOMR_RSF_POS 5 +#define MTL_Q_RQOMR_RSF_WIDTH 1 +#define MTL_Q_RQOMR_RTC_POS 0 +#define MTL_Q_RQOMR_RTC_WIDTH 2 +#define MTL_Q_RQOMR_FUP_POS 3 +#define MTL_Q_RQOMR_FUP_WIDTH 1 +#define MTL_Q_RQOMR_FEF_POS 4 +#define MTL_Q_RQOMR_FEF_WIDTH 1 + +#define MTL_Q_RQDG_PRXQ_POS 16 +#define MTL_Q_RQDG_PRXQ_WIDTH 14 +#define MTL_Q_RQDG_RXQSTS_POS 4 +#define MTL_Q_RQDG_RXQSTS_WIDTH 2 +#define MTL_Q_RQDG_RRCSTS_POS 1 +#define MTL_Q_RQDG_RRCSTS_WIDTH 2 + +#define MTL_Q_TQOMR_FTQ_POS 0 +#define MTL_Q_TQOMR_FTQ_WIDTH 1 +#define MTL_Q_TQOMR_Q2TCMAP_POS 8 +#define MTL_Q_TQOMR_Q2TCMAP_WIDTH 3 +#define MTL_Q_TQOMR_TQS_POS 16 +#define MTL_Q_TQOMR_TQS_WIDTH 10 +#define MTL_Q_TQOMR_TSF_POS 1 +#define MTL_Q_TQOMR_TSF_WIDTH 1 +#define MTL_Q_TQOMR_TTC_POS 4 +#define MTL_Q_TQOMR_TTC_WIDTH 3 +#define MTL_Q_TQOMR_TXQEN_POS 2 +#define MTL_Q_TQOMR_TXQEN_WIDTH 2 + +#define MTL_Q_TQDG_TXQSTS_POS 4 +#define MTL_Q_TQDG_TXQSTS_WIDTH 1 +#define MTL_Q_TQDG_TRCSTS_POS 1 +#define MTL_Q_TQDG_TRCSTS_WIDTH 2 + +#define MTL_Q_IER_TXUIE_POS 0 +#define MTL_Q_IER_TXUIE_WIDTH 1 +#define MTL_Q_IER_ABPSIE_POS 1 +#define MTL_Q_IER_ABPSIE_WIDTH 1 +#define MTL_Q_IER_RXOIE_POS 16 +#define MTL_Q_IER_RXOIE_WIDTH 1 + +#define MTL_Q_ISR_TXUNFIS_POS 0 +#define MTL_Q_ISR_TXUNFIS_WIDTH 1 +#define MTL_Q_ISR_ABPSIS_POS 1 +#define MTL_Q_ISR_ABPSIS_WIDTH 1 +#define MTL_Q_ISR_RXOVFIS_POS 16 +#define MTL_Q_ISR_RXOVFIS_WIDTH 1 + +#define MTL_DBG_CTL_FDBGEN_POS 0 +#define MTL_DBG_CTL_FDBGEN_WIDTH 1 +#define MTL_DBG_CTL_DBGMOD_POS 1 +#define MTL_DBG_CTL_DBGMOD_WIDTH 1 +#define MTL_DBG_CTL_PKTSTATE_POS 5 +#define MTL_DBG_CTL_PKTSTATE_WIDTH 2 +#define MTL_DBG_CTL_RSTALL_POS 8 +#define MTL_DBG_CTL_RSTALL_WIDTH 1 +#define MTL_DBG_CTL_RSTSEL_POS 9 +#define MTL_DBG_CTL_RSTSEL_WIDTH 1 +#define MTL_DBG_CTL_FIFORDEN_POS 10 +#define MTL_DBG_CTL_FIFORDEN_WIDTH 1 +#define MTL_DBG_CTL_FIFOWREN_POS 11 +#define MTL_DBG_CTL_FIFOWREN_WIDTH 1 +#define MTL_DBG_CTL_FIFOSEL_POS 12 +#define MTL_DBG_CTL_FIFOSEL_WIDTH 2 +#define MTL_DBG_CTL_PKTIE_POS 14 +#define MTL_DBG_CTL_PKTIE_WIDTH 2 +#define MTL_DBG_CTL_BYTEEN_POS 2 +#define MTL_DBG_CTL_BYTEEN_WIDTH 2 + +#define MTL_DBG_STS_FIFOBUSY_POS 0 +#define MTL_DBG_STS_FIFOBUSY_WIDTH 1 +#define MTL_DBG_STS_PKTSTATE_POS 1 +#define MTL_DBG_STS_PKTSTATE_WIDTH 2 +#define MTL_DBG_STS_PKTI_POS 8 +#define MTL_DBG_STS_PKTI_WIDTH 1 +#define MTL_DBG_STS_LOCR_POS 16 +#define MTL_DBG_STS_LOCR_WIDTH 16 +#define MTL_DBG_STS_BYTEEN_POS 3 +#define MTL_DBG_STS_BYTEEN_WIDTH 2 + +#define MTL_DBG_DAT_FDBGDATA_POS 0 +#define MTL_DBG_CTL_FDBGDATA_WIDTH 32 + +#define MTL_TCPR_MAP0_PSTC0_POS 0 +#define MTL_TCPR_MAP0_PSTC0_WIDTH 8 + +#define MDIO_SCAR 0x200 +#define MDIO_SCCDR 0x204 +#define MDIO_CWAR 0x208 +#define MDIO_CWDR 0x20C +#define MDIO_CSPE 0x210 +#define MDIO_ISR 0x214 +#define MDIO_IER 0x218 +#define MDIO_PSR 0x21C +#define MDIO_C22P 0x220 + +#define MDIO_SCAR_DA_POS 21 +#define MDIO_SCAR_DA_WIDTH 5 +#define MDIO_SCAR_PA_POS 16 +#define MDIO_SCAR_PA_WIDTH 5 +#define MDIO_SCAR_RA_POS 0 + +#define MDIO_SCAR_RA_WIDTH 16 + +#define MDIO_SCCDR_BUSY_POS 22 +#define MDIO_SCCDR_BUSY_WIDTH 1 +#define MDIO_SCCDR_CR_POS 19 +#define MDIO_SCCDR_CR_WIDTH 3 +#define MDIO_SCCDR_SADDR_POS 18 +#define MDIO_SCCDR_SADDR_WIDTH 1 +#define MDIO_SCCDR_CMD_POS 16 +#define MDIO_SCCDR_CMD_WIDTH 2 +#define MDIO_SCCDR_SDATA_POS 0 +#define MDIO_SCCDR_SDATA_WIDTH 16 + +#define MDIO_CWAR_CWB_POS 22 +#define MDIO_CWAR_CWB_WIDTH 1 +#define MDIO_CWAR_CPRT_POS 21 +#define MDIO_CWAR_CPRT_WIDTH 1 +#define MDIO_CWAR_CADDR_POS 16 +#define MDIO_CWAR_CADDR_WIDTH 5 +#define MDIO_CWAR_CREGADDR_POS 0 +#define MDIO_CWAR_CREGADDR_WIDTH 16 + +#define MDIO_CWDR_CDATA_POS 0 +#define MDIO_CWDR_CDATA_WIDTH 16 + +#define MDIO_CSPE_PORT3_POS 3 +#define MDIO_CSPE_PORT3_WIDTH 1 +#define MDIO_CSPE_PORT2_POS 2 +#define MDIO_CSPE_PORT2_WIDTH 1 +#define MDIO_CSPE_PORT1_POS 1 +#define MDIO_CSPE_PORT1_WIDTH 1 +#define MDIO_CSPE_PORT0_POS 0 +#define MDIO_CSPE_PORT0_WIDTH 1 + +#define MDIO_ISR_CWCOMPINT_POS 13 +#define MDIO_ISR_CWCOMPINT_WIDTH 1 +#define MDIO_ISR_SNGLCOMPINT_POS 12 +#define MDIO_ISR_SNGLCOMPINT_WIDTH 1 +#define MDIO_ISR_PRT3ALINT_POS 11 +#define MDIO_ISR_PRT3ALINT_WIDTH 1 +#define MDIO_ISR_PRT2ALINT_POS 10 +#define MDIO_ISR_PRT2ALINT_WIDTH 1 +#define MDIO_ISR_PRT1ALINT_POS 9 +#define MDIO_ISR_PRT1ALINT_WIDTH 1 +#define MDIO_ISR_PRT0ALINT_POS 8 +#define MDIO_ISR_PRT0ALINT_WIDTH 1 +#define MDIO_ISR_PRT3LSINT_POS 7 +#define MDIO_ISR_PRT3LSINT_WIDTH 1 +#define MDIO_ISR_PRT2LSINT_POS 6 +#define MDIO_ISR_PRT2LSINT_WIDTH 1 +#define MDIO_ISR_PRT1LSINT_POS 5 +#define MDIO_ISR_PRT1LSINT_WIDTH 1 +#define MDIO_ISR_PRT0LSINT_POS 4 +#define MDIO_ISR_PRT0LSINT_WIDTH 1 +#define MDIO_ISR_PRT3CONINT_POS 3 +#define MDIO_ISR_PRT3CONINT_WIDTH 1 +#define MDIO_ISR_PRT2CONINT_POS 2 +#define MDIO_ISR_PRT2CONINT_WIDTH 1 +#define MDIO_ISR_PRT1CONINT_POS 1 +#define MDIO_ISR_PRT1CONINT_WIDTH 1 +#define MDIO_ISR_PRT0CONINT_POS 0 +#define MDIO_ISR_PRT0CONINT_WIDTH 1 + +#define MDIO_IER_CWCOMPIE_POS 13 +#define MDIO_IER_CWCOMPIE_WIDTH 1 +#define MDIO_IER_SNGLCOMPIE_POS 12 +#define MDIO_IER_SNGLCOMPIE_WIDTH 1 +#define MDIO_IER_PRT3ALIE_POS 11 +#define MDIO_IER_PRT3ALIE_WIDTH 1 +#define MDIO_IER_PRT2ALIE_POS 10 +#define MDIO_IER_PRT2ALIE_WIDTH 1 +#define MDIO_IER_PRT1ALIE_POS 9 +#define MDIO_IER_PRT1ALIE_WIDTH 1 +#define MDIO_IER_PRT0ALIE_POS 8 +#define MDIO_IER_PRT0ALIE_WIDTH 1 +#define MDIO_IER_PRT3LSIE_POS 7 +#define MDIO_IER_PRT3LSIE_WIDTH 1 +#define MDIO_IER_PRT2LSIE_POS 6 +#define MDIO_IER_PRT2LSIE_WIDTH 1 +#define MDIO_IER_PRT1LSIE_POS 5 +#define MDIO_IER_PRT1LSIE_WIDTH 1 +#define MDIO_IER_PRT0LSIE_POS 4 +#define MDIO_IER_PRT0LSIE_WIDTH 1 +#define MDIO_IER_PRT3CONIE_POS 3 +#define MDIO_IER_PRT3CONIE_WIDTH 1 +#define MDIO_IER_PRT2CONIE_POS 2 +#define MDIO_IER_PRT2CONIE_WIDTH 1 +#define MDIO_IER_PRT1CONIE_POS 1 +#define MDIO_IER_PRT1CONIE_WIDTH 1 +#define MDIO_IER_PRT0CONIE_POS 0 +#define MDIO_IER_PRT0CONIE_WIDTH 1 + +#define MDIO_PSR_PORT3CON_POS 3 +#define MDIO_PSR_PORT3CON_WIDTH 1 +#define MDIO_PSR_PORT2CON_POS 2 +#define MDIO_PSR_PORT2CON_WIDTH 1 +#define MDIO_PSR_PORT1CON_POS 1 +#define MDIO_PSR_PORT1CON_WIDTH 1 +#define MDIO_PSR_PORT0CON_POS 0 +#define MDIO_PSR_PORT0CON_WIDTH 1 + +#define MDIO_CL22P_PORT3_POS 3 +#define MDIO_CL22P_PORT3_WIDTH 1 +#define MDIO_CL22P_PORT2_POS 2 +#define MDIO_CL22P_PORT2_WIDTH 1 +#define MDIO_CL22P_PORT1_POS 1 +#define MDIO_CL22P_PORT1_WIDTH 1 +#define MDIO_CL22P_PORT0_POS 0 +#define MDIO_CL22P_PORT0_WIDTH 1 + +#define MDIO_DIUR_PVSD2_POS 31 +#define MDIO_DIUR_PVSD2_WIDTH 1 +#define MDIO_DIUR_PVSD1_POS 30 +#define MDIO_DIUR_PVSD1_WIDTH 1 +#define MDIO_DIUR_PTC_POS 6 +#define MDIO_DIUR_PTC_WIDTH 1 +#define MDIO_DIUR_PDTEXS_POS 5 +#define MDIO_DIUR_PDTEXS_WIDTH 1 +#define MDIO_DIUR_PPHYXS_POS 4 +#define MDIO_DIUR_PPHYXS_WIDTH 1 +#define MDIO_DIUR_PPCS_POS 3 +#define MDIO_DIUR_PPCS_WIDTH 1 +#define MDIO_DIUR_PWIS_POS 2 +#define MDIO_DIUR_PWIS_WIDTH 1 +#define MDIO_DIUR_PPMDPMA_POS 1 +#define MDIO_DIUR_PPMDPMA_WIDTH 1 + +#define MDIO_LSR_PVSD2_POS 31 +#define MDIO_LSR_PVSD2_WIDTH 1 +#define MDIO_LSR_PVSD1_POS 30 +#define MDIO_LSR_PVSD1_WIDTH 1 +#define MDIO_LSR_PTC_POS 6 +#define MDIO_LSR_PTC_WIDTH 1 +#define MDIO_LSR_PDTEXS_POS 5 +#define MDIO_LSR_PDTEXS_WIDTH 1 +#define MDIO_LSR_PPHYXS_POS 4 +#define MDIO_LSR_PPHYXS_WIDTH 1 +#define MDIO_LSR_PPCS_POS 3 +#define MDIO_LSR_PPCS_WIDTH 1 +#define MDIO_LSR_PWIS_POS 2 +#define MDIO_LSR_PWIS_WIDTH 1 +#define MDIO_LSR_PPMDPMA_POS 1 +#define MDIO_LSR_PPMDPMA_WIDTH 1 + +#define MDIO_ASR_PVSD2_POS 31 +#define MDIO_ASR_PVSD2_WIDTH 1 +#define MDIO_ASR_PVSD1_POS 30 +#define MDIO_ASR_PVSD1_WIDTH 1 +#define MDIO_ASR_PTC_POS 6 +#define MDIO_ASR_PTC_WIDTH 1 +#define MDIO_ASR_PDTEXS_POS 5 +#define MDIO_ASR_PDTEXS_WIDTH 1 +#define MDIO_ASR_PPHYXS_POS 4 +#define MDIO_ASR_PPHYXS_WIDTH 1 +#define MDIO_ASR_PPCS_POS 3 +#define MDIO_ASR_PPCS_WIDTH 1 +#define MDIO_ASR_PWIS_POS 2 +#define MDIO_ASR_PWIS_WIDTH 1 +#define MDIO_ASR_PPMDPMA_POS 1 +#define MDIO_ASR_PPMDPMA_WIDTH 1 + +#define MAC_IF_CFG(idx) (0x1200 + ((idx - MAC_2) * (0x100))) +#define MAC_OP_CFG(idx) (0x1204 + ((idx - MAC_2) * (0x100))) +#define MAC_MTU_CFG(idx) (0x1208 + ((idx - MAC_2) * (0x100))) +#define MAC_GINT_CFG(idx) (0x120C + ((idx - MAC_2) * (0x100))) +#define MAC_GINT_HD0_CFG(idx) (0x1220 + ((idx - MAC_2) * (0x100))) +#define MAC_GINT_HD1_CFG(idx) (0x1224 + ((idx - MAC_2) * (0x100))) +#define MAC_GINT_HD2_CFG(idx) (0x1228 + ((idx - MAC_2) * (0x100))) +#define MAC_GINT_HD3_CFG(idx) (0x122C + ((idx - MAC_2) * (0x100))) +#define MAC_GINT_HD4_CFG(idx) (0x1230 + ((idx - MAC_2) * (0x100))) +#define MAC_GINT_HD5_CFG(idx) (0x1234 + ((idx - MAC_2) * (0x100))) +#define MAC_GINT_HD6_CFG(idx) (0x1238 + ((idx - MAC_2) * (0x100))) +#define LMAC_CNT_LSB(idx) (0x1240 + ((idx - MAC_2) * (0x100))) +#define LMAC_CNT_MSB(idx) (0x1244 + ((idx - MAC_2) * (0x100))) +#define LMAC_CNT_ACC(idx) (0x1248 + ((idx - MAC_2) * (0x100))) +#define MAC_TXTS_0(idx) (0x1250 + ((idx - MAC_2) * (0x100))) +#define MAC_TXTS_1(idx) (0x1254 + ((idx - MAC_2) * (0x100))) +#define MAC_TXTS_2(idx) (0x1258 + ((idx - MAC_2) * (0x100))) +#define MAC_TXTS_3(idx) (0x125C + ((idx - MAC_2) * (0x100))) +#define MAC_TXTS_CIC(idx) (0x1260 + ((idx - MAC_2) * (0x100))) +#define MAC_TXTS_ACC(idx) (0x1264 + ((idx - MAC_2) * (0x100))) +#define PHY_MODE(idx) (0x1270 + ((idx - MAC_2) * (0x100))) +#define PHY_STAT(idx) (0x1274 + ((idx - MAC_2) * (0x100))) +#define ANEG_EEE(idx) (0x1278 + ((idx - MAC_2) * (0x100))) +#define XGMAC_CTRL(idx) (0x1280 + ((idx - MAC_2) * (0x100))) + +#define MAC_IF_CFG_ADAP_RES_POS 15 +#define MAC_IF_CFG_ADAP_RES_WIDTH 1 +#define MAC_IF_CFG_LMAC_RES_POS 14 +#define MAC_IF_CFG_LMAC_RES_WIDTH 1 +#define MAC_IF_CFG_XGMAC_RES_POS 13 +#define MAC_IF_CFG_XGMAC_RES_WIDTH 1 +#define MAC_IF_CFG_MAC_EN_POS 12 +#define MAC_IF_CFG_MAC_EN_WIDTH 1 +#define MAC_IF_CFG_PTP_DIS_POS 11 +#define MAC_IF_CFG_PTP_DIS_WIDTH 1 +#define MAC_IF_CFG_CFG1G_POS 1 +#define MAC_IF_CFG_CFG1G_WIDTH 1 +#define MAC_IF_CFG_CFGFE_POS 2 +#define MAC_IF_CFG_CFGFE_WIDTH 1 +#define MAC_IF_CFG_CFG2G5_POS 0 +#define MAC_IF_CFG_CFG2G5_WIDTH 1 + +#define MAC_OP_CFG_RXSPTAG_POS 0 +#define MAC_OP_CFG_RXSPTAG_WIDTH 2 +#define MAC_OP_CFG_RXTIME_POS 2 +#define MAC_OP_CFG_RXTIME_WIDTH 2 +#define MAC_OP_CFG_RXFCS_POS 4 +#define MAC_OP_CFG_RXFCS_WIDTH 2 +#define MAC_OP_CFG_TXSPTAG_POS 6 +#define MAC_OP_CFG_TXSPTAG_WIDTH 2 +#define MAC_OP_CFG_TXFCS_RM_POS 8 +#define MAC_OP_CFG_TXFCS_RM_WIDTH 1 +#define MAC_OP_CFG_TXFCS_INS_POS 9 +#define MAC_OP_CFG_TXFCS_INS_WIDTH 1 +#define MAC_OP_CFG_NUM_STREAM_POS 10 +#define MAC_OP_CFG_NUM_STREAM_WIDTH 1 + +#define MAC_MTU_CFG_POS 0 +#define MAC_MTU_CFG_WIDTH 14 + +#define MAC_TXTS_CIC_CIC_POS 0 +#define MAC_TXTS_CIC_CIC_WIDTH 2 +#define MAC_TXTS_CIC_OSTAVAIL_POS 2 +#define MAC_TXTS_CIC_OSTAVAIL_WIDTH 1 +#define MAC_TXTS_CIC_OSTC_POS 3 +#define MAC_TXTS_CIC_OSTC_WIDTH 1 +#define MAC_TXTS_CIC_TTSE_POS 4 +#define MAC_TXTS_CIC_TTSE_WIDTH 1 + +#define MAC_TXTS_ACC_ADDR_POS 0 +#define MAC_TXTS_ACC_ADDR_WIDTH 6 +#define MAC_TXTS_ACC_OPMOD_POS 14 +#define MAC_TXTS_ACC_OPMOD_WIDTH 1 +#define MAC_TXTS_ACC_BAS_POS 15 +#define MAC_TXTS_ACC_BAS_WIDTH 1 + +#define PHY_MODE_FCONRX_POS 5 +#define PHY_MODE_FCONRX_WIDTH 2 +#define PHY_MODE_FCONTX_POS 7 +#define PHY_MODE_FCONTX_WIDTH 2 +#define PHY_MODE_FDUP_POS 9 +#define PHY_MODE_FDUP_WIDTH 2 +#define PHY_MODE_SPEEDLSB_POS 11 +#define PHY_MODE_SPEEDLSB_WIDTH 2 +#define PHY_MODE_LINKST_POS 13 +#define PHY_MODE_LINKST_WIDTH 2 +#define PHY_MODE_SPEEDMSB_POS 15 +#define PHY_MODE_SPEEDMSB_WIDTH 1 + +#define PHY_STAT_TXPAUEN_POS 0 +#define PHY_STAT_TXPAUEN_WIDTH 1 +#define PHY_STAT_RXPAUEN_POS 1 +#define PHY_STAT_RXPAUEN_WIDTH 1 +#define PHY_STAT_FDUP_POS 2 +#define PHY_STAT_FDUP_WIDTH 1 +#define PHY_STAT_SPEEDLSB_POS 3 +#define PHY_STAT_SPEEDLSB_WIDTH 2 +#define PHY_STAT_LSTAT_POS 5 +#define PHY_STAT_LSTAT_WIDTH 1 +#define PHY_STAT_EEECAP_POS 7 +#define PHY_STAT_EEECAP_WIDTH 1 +#define PHY_STAT_CLKSTOPCAP_POS 8 +#define PHY_STAT_CLKSTOPCAP_WIDTH 1 +// New for GSWIP3.2 +#define PHY_STAT_TXACT_POS 9 +#define PHY_STAT_TXACT_WIDTH 1 +#define PHY_STAT_RXACT_POS 10 +#define PHY_STAT_RXACT_WIDTH 1 +// ======= +#define PHY_STAT_SPEEDMSB_POS 11 +#define PHY_STAT_SPEEDMSB_WIDTH 1 + +#define XGMAC_CTRL_CPC_POS 0 +#define XGMAC_CTRL_CPC_WIDTH 2 +#define XGMAC_CTRL_DISRX_POS 2 +#define XGMAC_CTRL_DISRX_WIDTH 1 +#define XGMAC_CTRL_DISTX_POS 3 +#define XGMAC_CTRL_DISTX_WIDTH 1 + +#define ANEG_EEE_EEE_CAPABLE_POS 0 +#define ANEG_EEE_EEE_CAPABLE_WIDTH 2 + + +#define GSWIP_CFG 0x0000 +#define MACSEC_EN 0x0008 +#define GSWIPSS_IER0 0x0010 +#define GSWIPSS_ISR0 0x0014 +#define GSWIPSS_IER1 0x0018 +#define GSWIPSS_ISR1 0x001C +#define NCO_LSB 0x0040 +#define NCO_MSB 0x0044 +#define CFG0_1588 0x0050 +#define CFG1_1588 0x0054 +#define NCO1_LSB 0x0060 +#define NCO1_MSB 0x0064 +#define NCO2_LSB 0x0068 +#define NCO2_MSB 0x006C +#define NCO3_LSB 0x0070 +#define NCO3_MSB 0x0074 +#define NCO4_LSB 0x0078 +#define NCO4_MSB 0x007C + +#define GSWIP_CFG_CORE_SE_POS 15 +#define GSWIP_CFG_CORE_SE_WIDTH 1 +#define GSWIP_CFG_CLK_MD_POS 2 +#define GSWIP_CFG_CLK_MD_WIDTH 2 +#define GSWIP_CFG_SS_HWRES_POS 1 +#define GSWIP_CFG_SS_HWRES_WIDTH 1 + +#define MACSEC_EN_SEL_POS 0 +#define MACSEC_EN_SEL_WIDTH 4 +#define MACSEC_EN_RES_POS 15 +#define MACSEC_EN_RES_WIDTH 1 + +#define GSWIPSS_IER0_XGMAC2_POS 2 +#define GSWIPSS_IER0_XGMAC2_WIDTH 1 +#define GSWIPSS_IER0_XGMAC3_POS 3 +#define GSWIPSS_IER0_XGMAC3_WIDTH 1 +#define GSWIPSS_IER0_XGMAC4_POS 4 +#define GSWIPSS_IER0_XGMAC4_WIDTH 1 +#define GSWIPSS_IER0_XGMAC5_POS 5 +#define GSWIPSS_IER0_XGMAC5_WIDTH 1 +#define GSWIPSS_IER0_XGMAC6_POS 6 +#define GSWIPSS_IER0_XGMAC6_WIDTH 1 +#define GSWIPSS_IER0_XGMAC7_POS 7 +#define GSWIPSS_IER0_XGMAC7_WIDTH 1 +#define GSWIPSS_IER0_XGMAC8_POS 8 +#define GSWIPSS_IER0_XGMAC8_WIDTH 1 +#define GSWIPSS_IER0_XGMAC9_POS 9 +#define GSWIPSS_IER0_XGMAC9_WIDTH 1 +#define GSWIPSS_IER0_XGMAC10_POS 10 +#define GSWIPSS_IER0_XGMAC10_WIDTH 1 +#define GSWIPSS_IER0_XGMAC11_POS 11 +#define GSWIPSS_IER0_XGMAC11_WIDTH 1 + + +#define GSWIPSS_ISR0_XGMAC2_POS 2 +#define GSWIPSS_ISR0_XGMAC2_WIDTH 1 +#define GSWIPSS_ISR0_XGMAC3_POS 3 +#define GSWIPSS_ISR0_XGMAC3_WIDTH 1 +#define GSWIPSS_ISR0_XGMAC4_POS 4 +#define GSWIPSS_ISR0_XGMAC4_WIDTH 1 +#define GSWIPSS_ISR0_XGMAC5_POS 5 +#define GSWIPSS_ISR0_XGMAC5_WIDTH 1 +#define GSWIPSS_ISR0_XGMAC6_POS 6 +#define GSWIPSS_ISR0_XGMAC6_WIDTH 1 +#define GSWIPSS_ISR0_XGMAC7_POS 7 +#define GSWIPSS_ISR0_XGMAC7_WIDTH 1 +#define GSWIPSS_ISR0_XGMAC8_POS 8 +#define GSWIPSS_ISR0_XGMAC8_WIDTH 1 +#define GSWIPSS_ISR0_XGMAC9_POS 9 +#define GSWIPSS_ISR0_XGMAC9_WIDTH 1 +#define GSWIPSS_ISR0_XGMAC10_POS 10 +#define GSWIPSS_ISR0_XGMAC10_WIDTH 1 +#define GSWIPSS_ISR0_XGMAC11_POS 11 +#define GSWIPSS_ISR0_XGMAC11_WIDTH 1 + + + +#define GSWIPSS_IER1_LINK2_POS 2 +#define GSWIPSS_IER1_LINK2_WIDTH 1 +#define GSWIPSS_IER1_LINK3_POS 3 +#define GSWIPSS_IER1_LINK3_WIDTH 1 +#define GSWIPSS_IER1_LINK4_POS 4 +#define GSWIPSS_IER1_LINK4_WIDTH 1 +#define GSWIPSS_IER1_LINK5_POS 5 +#define GSWIPSS_IER1_LINK5_WIDTH 1 +#define GSWIPSS_IER1_LINK6_POS 6 +#define GSWIPSS_IER1_LINK6_WIDTH 1 +#define GSWIPSS_IER1_LINK7_POS 7 +#define GSWIPSS_IER1_LINK7_WIDTH 1 +#define GSWIPSS_IER1_LINK8_POS 8 +#define GSWIPSS_IER1_LINK8_WIDTH 1 +#define GSWIPSS_IER1_LINK9_POS 9 +#define GSWIPSS_IER1_LINK9_WIDTH 1 +#define GSWIPSS_IER1_LINK10_POS 10 +#define GSWIPSS_IER1_LINK10_WIDTH 1 +#define GSWIPSS_IER1_LINK11_POS 11 +#define GSWIPSS_IER1_LINK11_WIDTH 1 + + +#define GSWIPSS_ISR1_LINK2_POS 2 +#define GSWIPSS_ISR1_LINK2_WIDTH 1 +#define GSWIPSS_ISR1_LINK3_POS 3 +#define GSWIPSS_ISR1_LINK3_WIDTH 1 +#define GSWIPSS_ISR1_LINK4_POS 4 +#define GSWIPSS_ISR1_LINK4_WIDTH 1 +#define GSWIPSS_ISR1_LINK5_POS 5 +#define GSWIPSS_ISR1_LINK5_WIDTH 1 +#define GSWIPSS_ISR1_LINK6_POS 6 +#define GSWIPSS_ISR1_LINK6_WIDTH 1 +#define GSWIPSS_ISR1_LINK7_POS 7 +#define GSWIPSS_ISR1_LINK7_WIDTH 1 +#define GSWIPSS_ISR1_LINK8_POS 8 +#define GSWIPSS_ISR1_LINK8_WIDTH 1 +#define GSWIPSS_ISR1_LINK9_POS 9 +#define GSWIPSS_ISR1_LINK9_WIDTH 1 +#define GSWIPSS_ISR1_LINK10_POS 10 +#define GSWIPSS_ISR1_LINK10_WIDTH 1 +#define GSWIPSS_ISR1_LINK11_POS 11 +#define GSWIPSS_ISR1_LINK11_WIDTH 1 + + +#define CFG0_1588_REFTIME_POS 0 +#define CFG0_1588_REFTIME_WIDTH 3 +#define CFG0_1588_DIGTIME_POS 4 +#define CFG0_1588_DIGTIME_WIDTH 3 +#define CFG0_1588_BINTIME_POS 8 +#define CFG0_1588_BINTIME_WIDTH 3 +#define CFG0_1588_PPSSEL_POS 12 +#define CFG0_1588_PPSSEL_WIDTH 3 + +#define CFG1_1588_SWTRIG_POS 7 +#define CFG1_1588_SWTRIG_WIDTH 1 +#define CFG1_1588_TRIG0SEL_POS 8 +#define CFG1_1588_TRIG0SEL_WIDTH 4 +#define CFG1_1588_TRIG1SEL_POS 12 +#define CFG1_1588_TRIG1SEL_WIDTH 4 + + + +#define MAC_TEST 0x300 +#define MAC_PFADCFG 0x304 +#define MAC_PFSA_0 0x308 +#define MAC_PFSA_1 0x30C +#define MAC_PFSA_2 0x310 +#define MAC_VLAN_ETYPE_0 0x318 +#define MAC_VLAN_ETYPE_1 0x31C +#define LMAC_IER 0x320 +#define LMAC_ISR 0x324 +#define REG_LMAC_CNT_LSB 0x328 +#define REG_LMAC_CNT_MSB 0x32C +#define REG_LMAC_CNT_ACC 0x330 +#define MAC_PSTAT(idx) (0x400 + ((idx - MAC_2) * (0x30))) +#define MAC_PISR(idx) (0x404 + ((idx - MAC_2) * (0x30))) +#define MAC_PIER(idx) (0x408 + ((idx - MAC_2) * (0x30))) +#define MAC_CTRL0(idx) (0x40C + ((idx - MAC_2) * (0x30))) +#define MAC_CTRL1(idx) (0x410 + ((idx - MAC_2) * (0x30))) +#define MAC_CTRL2(idx) (0x414 + ((idx - MAC_2) * (0x30))) +#define MAC_CTRL3(idx) (0x418 + ((idx - MAC_2) * (0x30))) +#define MAC_CTRL4(idx) (0x41C + ((idx - MAC_2) * (0x30))) +#define MAC_CTRL5(idx) (0x420 + ((idx - MAC_2) * (0x30))) +#define MAC_TESTEN(idx) (0x42C + ((idx - MAC_2) * (0x30))) +#define MAC_LPITIMER0(idx) (0x424 + ((idx - MAC_2) * (0x30))) +#define MAC_LPITIMER1(idx) (0x428 + ((idx - MAC_2) * (0x30))) + +#define MAC_CTRL0_GMII_POS 0 +#define MAC_CTRL0_GMII_WIDTH 2 +#define MAC_CTRL0_FDUP_POS 2 +#define MAC_CTRL0_FDUP_WIDTH 2 +#define MAC_CTRL0_FCON_POS 4 +#define MAC_CTRL0_FCON_WIDTH 2 +#define MAC_CTRL0_FCS_POS 7 +#define MAC_CTRL0_FCS_WIDTH 1 +#define MAC_CTRL0_PADEN_POS 8 +#define MAC_CTRL0_PADEN_WIDTH 1 +#define MAC_CTRL0_VPADEN_POS 9 +#define MAC_CTRL0_VPADEN_WIDTH 1 +#define MAC_CTRL0_VPAD2EN_POS 10 +#define MAC_CTRL0_VPAD2EN_WIDTH 1 +#define MAC_CTRL0_APADEN_POS 11 +#define MAC_CTRL0_APADEN_WIDTH 1 + +#define MAC_CTRL1_IPG_POS 0 +#define MAC_CTRL1_IPG_WIDTH 4 +#define MAC_CTRL1_SHORTPRE_POS 8 +#define MAC_CTRL1_SHORTPRE_WIDTH 1 +#define MAC_CTRL1_DEFERMODE_POS 15 +#define MAC_CTRL1_DEFERMODE_WIDTH 1 + +#define MAC_CTRL2_LCHKS_POS 0 +#define MAC_CTRL2_LCHKS_WIDTH 2 +#define MAC_CTRL2_LCHKL_POS 2 +#define MAC_CTRL2_LCHKL_WIDTH 1 +#define MAC_CTRL2_MLEN_POS 3 +#define MAC_CTRL2_MLEN_WIDTH 1 + +#define MAC_CTRL3_RCNT_POS 0 +#define MAC_CTRL3_RCNT_WIDTH 4 + +#define MAC_CTRL4_WAIT_POS 0 +#define MAC_CTRL4_WAIT_WIDTH 7 +#define MAC_CTRL4_LPIEN_POS 7 +#define MAC_CTRL4_LPIEN_WIDTH 1 +#define MAC_CTRL4_GWAIT_POS 8 +#define MAC_CTRL4_GWAIT_WIDTH 7 + +#define MAC_CTRL5_PJPS_BP_POS 0 +#define MAC_CTRL5_PJPS_BP_WIDTH 1 +#define MAC_CTRL5_PJPS_NOBP_POS 1 +#define MAC_CTRL5_PJPS_NOBP_WIDTH 1 + +#define MAC_TESTEN_LOOP_POS 0 +#define MAC_TESTEN_LOOP_WIDTH 1 +#define MAC_TESTEN_TXER_POS 1 +#define MAC_TESTEN_TXER_WIDTH 1 +#define MAC_TESTEN_JTEN_POS 2 +#define MAC_TESTEN_JTEN_WIDTH 1 +#define MAC_TESTEN_LPITM_POS 8 +#define MAC_TESTEN_LPITM_WIDTH 2 + +#define MAC_LPITMER0_TMLSB_POS 0 +#define MAC_LPITMER0_TMLSB__WIDTH 16 +#define MAC_LPITMER1_TMLSB_POS 0 +#define MAC_LPITMER1_TMLSB__WIDTH 16 + +#define MAC_PIER_RXPAUSE_POS 0 +#define MAC_PIER_RXPAUSE_WIDTH 1 +#define MAC_PIER_TXPAUSE_POS 1 +#define MAC_PIER_TXPAUSE_WIDTH 1 +#define MAC_PIER_FCSERR_POS 2 +#define MAC_PIER_FCSERR_WIDTH 1 +#define MAC_PIER_LENERR_POS 3 +#define MAC_PIER_LENERR_WIDTH 1 +#define MAC_PIER_TOOLONG_POS 4 +#define MAC_PIER_TOOLONG_WIDTH 1 +#define MAC_PIER_TOOSHORT_POS 5 +#define MAC_PIER_TOOSHORT_WIDTH 1 +#define MAC_PIER_JAM_POS 6 +#define MAC_PIER_JAM_WIDTH 1 +#define MAC_PIER_LPION_POS 7 +#define MAC_PIER_LPION_WIDTH 1 +#define MAC_PIER_LPIOFF_POS 8 +#define MAC_PIER_LPIOFF_WIDTH 1 +#define MAC_PIER_TXPAUEN_POS 9 +#define MAC_PIER_TXPAUEN_WIDTH 1 +#define MAC_PIER_RXPAUEN_POS 10 +#define MAC_PIER_RXPAUEN_WIDTH 1 +#define MAC_PIER_FDUP_POS 11 +#define MAC_PIER_FDUP_WIDTH 1 +#define MAC_PIER_SPEED_POS 12 +#define MAC_PIER_SPEED_WIDTH 1 +#define MAC_PIER_PACT_POS 13 +#define MAC_PIER_PACT_WIDTH 1 +#define MAC_PIER_ALIGN_POS 14 +#define MAC_PIER_ALIGN_WIDTH 1 +#define MAC_PIER_PHYERR_POS 15 +#define MAC_PIER_PHYERR_WIDTH 1 + +#define MAC_PISR_RXPAUSE_POS 0 +#define MAC_PISR_RXPAUSE_WIDTH 1 +#define MAC_PISR_TXPAUSE_POS 1 +#define MAC_PISR_TXPAUSE_WIDTH 1 +#define MAC_PISR_FCSERR_POS 2 +#define MAC_PISR_FCSERR_WIDTH 1 +#define MAC_PISR_LENERR_POS 3 +#define MAC_PISR_LENERR_WIDTH 1 +#define MAC_PISR_TOOLONG_POS 4 +#define MAC_PISR_TOOLONG_WIDTH 1 +#define MAC_PISR_TOOSHORT_POS 5 +#define MAC_PISR_TOOSHORT_WIDTH 1 +#define MAC_PISR_JAM_POS 6 +#define MAC_PISR_JAM_WIDTH 1 +#define MAC_PISR_LPION_POS 7 +#define MAC_PISR_LPION_WIDTH 1 +#define MAC_PISR_LPIOFF_POS 8 +#define MAC_PISR_LPIOFF_WIDTH 1 +#define MAC_PISR_TXPAUEN_POS 9 +#define MAC_PISR_TXPAUEN_WIDTH 1 +#define MAC_PISR_RXPAUEN_POS 10 +#define MAC_PISR_RXPAUEN_WIDTH 1 +#define MAC_PISR_FDUP_POS 11 +#define MAC_PISR_FDUP_WIDTH 1 +#define MAC_PISR_SPEED_POS 12 +#define MAC_PISR_SPEED_WIDTH 1 +#define MAC_PISR_PACT_POS 13 +#define MAC_PISR_PACT_WIDTH 1 +#define MAC_PISR_ALIGN_POS 14 +#define MAC_PISR_ALIGN_WIDTH 1 +#define MAC_PISR_PHYERR_POS 15 +#define MAC_PISR_PHYERR_WIDTH 1 + +#define MAC_PSTAT_RXLPI_POS 0 +#define MAC_PSTAT_RXLPI_WIDTH 1 +#define MAC_PSTAT_TXLPI_POS 1 +#define MAC_PSTAT_TXLPI_WIDTH 1 +#define MAC_PSTAT_CRS_POS 2 +#define MAC_PSTAT_CRS_WIDTH 1 +#define MAC_PSTAT_LSTAT_POS 3 +#define MAC_PSTAT_LSTAT_WIDTH 1 +#define MAC_PSTAT_TXPAUEN_POS 4 +#define MAC_PSTAT_TXPAUEN_WIDTH 1 +#define MAC_PSTAT_RXPAUEN_POS 5 +#define MAC_PSTAT_RXPAUEN_WIDTH 1 +#define MAC_PSTAT_TXPAU_POS 6 +#define MAC_PSTAT_TXPAU_WIDTH 1 +#define MAC_PSTAT_RXPAU_POS 7 +#define MAC_PSTAT_RXPAU_WIDTH 1 +#define MAC_PSTAT_FDUP_POS 8 +#define MAC_PSTAT_FDUP_WIDTH 1 +#define MAC_PSTAT_MBIT_POS 9 +#define MAC_PSTAT_MBIT_WIDTH 1 +#define MAC_PSTAT_GBIT_POS 10 +#define MAC_PSTAT_GBIT_WIDTH 1 +#define MAC_PSTAT_PACT_POS 11 +#define MAC_PSTAT_PACT_WIDTH 1 + +#define MAC_VLAN_ETPE1_STAG_POS 0 +#define MAC_VLAN_ETPE1_STAG_WIDTH 16 +#define MAC_VLAN_ETPE0_CTAG_POS 0 +#define MAC_VLAN_ETPE0_CTAG_WIDTH 16 + +#define LMAC_IER_MAC2_POS 0 +#define LMAC_IER_MAC2_WIDTH 1 +#define LMAC_IER_MAC3_POS 1 +#define LMAC_IER_MAC3_WIDTH 1 +#define LMAC_IER_MAC4_POS 2 +#define LMAC_IER_MAC4_WIDTH 1 + +#define LMAC_ISR_MAC2_POS 0 +#define LMAC_ISR_MAC2_WIDTH 1 +#define LMAC_ISR_MAC3_POS 1 +#define LMAC_ISR_MAC3_WIDTH 1 +#define LMAC_ISR_MAC4_POS 2 +#define LMAC_ISR_MAC4_WIDTH 1 + +#define MAC_PFSA2_PFAD_POS 0 +#define MAC_PFSA2_PFAD_WIDTH 16 +#define MAC_PFSA1_PFAD_POS 0 +#define MAC_PFSA1_PFAD_WIDTH 16 +#define MAC_PFSA0_PFAD_POS 0 +#define MAC_PFSA0_PFAD_WIDTH 16 + +#define MAC_PFADCFG_SAMOD_POS 0 +#define MAC_PFADCFG_SAMOD_WIDTH 1 + +#define LMAC_CNT_ACC_BAS_POS 15 +#define LMAC_CNT_ACC_BAS_WIDTH 1 +#define LMAC_CNT_ACC_OPMOD_POS 13 +#define LMAC_CNT_ACC_OPMOD_WIDTH 2 +#define LMAC_CNT_ACC_MAC_POS 8 +#define LMAC_CNT_ACC_MAC_WIDTH 4 +#define LMAC_CNT_ACC_ADDR_POS 0 +#define LMAC_CNT_ACC_ADDR_WIDTH 5 + + +#define MASK(reg, field) (1 << reg##_##field##_POS) +#define MASK_N_BITS(reg, field) ((1 << (reg##_##field##_WIDTH)) - 1) + +#define GET_N_BITS(reg, pos, n) \ + (((reg) >> (pos)) & ((0x1 << (n)) - 1)) + +#define SET_N_BITS(reg, pos, n, val) \ + do { \ + (reg) &= ~(((0x1 << (n)) - 1) << (pos)); \ + (reg) |= (((val) & ((0x1 << (n)) - 1)) << (pos)); \ + } while (0) + +#define mac_get_val(var, reg, field) \ + GET_N_BITS((var), \ + reg##_##field##_POS, \ + reg##_##field##_WIDTH) + +#define mac_set_val(var, reg, field, val) \ + SET_N_BITS((var), \ + reg##_##field##_POS, \ + reg##_##field##_WIDTH, (val)) + +#endif diff --git a/src/gsw_cli_macsec.c b/src/gsw_cli_macsec.c new file mode 100755 index 0000000000000000000000000000000000000000..d7d18b2fcab63843d5a8c3538f79460aa6b8c33a --- /dev/null +++ b/src/gsw_cli_macsec.c @@ -0,0 +1,625 @@ +/**************************************************************************** + + Copyright 2010 + Lantiq Deutschland GmbH + Am Campeon 3; 85579 Neubiberg, Germany + + For licensing information, see the file 'LICENSE' in the root folder of + this software module. + +*****************************************************************************/ +#include "ltq_cli_lib.h" + +#ifndef IOCTL_PCTOOL +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <fcntl.h> +#include <unistd.h> +#include <errno.h> +#include <ctype.h> +#endif + +#include "macsec_ops.h" +#include "gsw_cli_macsec.h" + +const GSW_CommandTable_t cmdTableMacsec[] = { + {/* 0 */ "MACSEC_REG_RD", (command_fkt)gsw_macsec_reg_read}, + {/* 1 */ "MACSEC_REG_WR", (command_fkt)gsw_macsec_reg_write}, + {/* 2 */ "MACSEC_INIT", (command_fkt)gsw_macsec_init}, + {/* 3 */ "MACSEC_EXIT", (command_fkt)gsw_macsec_exit}, + {/* 4 */ "MACSEC_SA_READ", (command_fkt)gsw_macsec_sa_rd}, + {/* 5 */ "MACSEC_SPTAG_EN", (command_fkt)gsw_macsec_sptag}, + {/* 6 */ "MACSEC_MTINFO_EN", (command_fkt)gsw_macsec_mtinfo}, + {/* 7 */ "MACSEC_GET_MTINFO", (command_fkt)gsw_macsec_get_mtinfo}, + {/* 8 */ "MACSEC_GET_SPTAG", (command_fkt)gsw_macsec_get_sptag}, + {/* 9 */ "MACSEC_GET_RMON", (command_fkt)gsw_macsec_get_rmon}, + {/* 10 */ "MACSEC_GET_MTINFO", (command_fkt)gsw_macsec_get_sptag}, + {/* 11 */ "MACSEC_DBG_INIT_ENC", (command_fkt)gsw_macsec_dbg_init_enc}, + {/* 12 */ "MACSEC_DBG_RMON_ENC", (command_fkt)gsw_macsec_dbg_rmon_enc}, + {/* 13 */ "MACSEC_DBG_RMON_DEC", (command_fkt)gsw_macsec_dbg_rmon_dec}, + {/* 14 */ "MACSEC_RMON_CLEAR", (command_fkt)gsw_macsec_rmon_clr}, + {/* 15 */ "MACSEC_FLOW_READ", (command_fkt)gsw_macsec_flow_rd}, + {/* 16 */ "MACSEC_DBG_DIS", (command_fkt)gsw_macsec_dbg_init_dis}, + {/* 17 */ "MACSEC_SA_DBG", (command_fkt)gsw_macsec_sa_dbg}, + {/* 18 */ "MACSEC_GET_DBG_INFO", (command_fkt)gsw_macsec_dbg_info}, + {/* 19 */ "MACSEC_TESTCASE_KAT1", (command_fkt)gsw_macsec_testcase_kat1}, + {/* 20 */ "MACSEC_TESTSTS_KAT1", (command_fkt)gsw_macsec_teststs_kat1}, + {/* 21 */ "MACSEC_TESTCASE_KAT2", (command_fkt)gsw_macsec_testcase_kat2}, + {/* 22 */ "MACSEC_TESTSTS_KAT2", (command_fkt)gsw_macsec_teststs_kat2}, + {/* 23 */ "MACSEC_TESTCASE_KAT3", (command_fkt)gsw_macsec_testcase_kat3}, + {/* 24 */ "MACSEC_TESTSTS_KAT3", (command_fkt)gsw_macsec_teststs_kat3}, + {/* 25 */ "MACSEC_CP_STS", (command_fkt)gsw_macsec_cpsts}, + {/* 26 */ "MACSEC_PRINT_PDATA", (command_fkt)gsw_macsec_print_pdata}, +}; + +int gsw_macsec_reg_read(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_REG_RD; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + cnt += scanParamArg(argc, argv, "nRegAddr", sizeof(param.nRegAddr), + ¶m.nRegAddr); + + if (cnt != numPar) + return (-2); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_reg_write(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_REG_WR; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + cnt += scanParamArg(argc, argv, "nRegAddr", sizeof(param.nRegAddr), + ¶m.nRegAddr); + + cnt += scanParamArg(argc, argv, "nData", sizeof(param.nData), + ¶m.nData); + + if (cnt != numPar) + return (-2); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_init(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_INIT; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + if (cnt != numPar) + return (-2); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_exit(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_EXIT; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + if (cnt != numPar) + return (-2); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_sa_rd(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_SA_READ; + + param.sa_st = 0; + param.sa_end = 3; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + cnt += scanParamArg(argc, argv, "SaStart", sizeof(param.sa_st), + ¶m.sa_st); + + cnt += scanParamArg(argc, argv, "SaEnd", sizeof(param.sa_end), + ¶m.sa_end); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_flow_rd(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.sa_st = 0; + param.sa_end = 3; + + param.cmdType = MACSEC_FLOW_READ; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + cnt += scanParamArg(argc, argv, "SaStart", sizeof(param.sa_st), + ¶m.sa_st); + + cnt += scanParamArg(argc, argv, "SaEnd", sizeof(param.sa_end), + ¶m.sa_end); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + + +int gsw_macsec_sptag(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_SPTAG_EN; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + cnt += scanParamArg(argc, argv, "SpTagEn", sizeof(param.sptagen), + ¶m.sptagen); + + if (cnt != numPar) + return (-2); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_mtinfo(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_SPTAG_EN; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + cnt += scanParamArg(argc, argv, "MtInfoEn", sizeof(param.mtinfoen), + ¶m.mtinfoen); + + if (cnt != numPar) + return (-2); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_get_mtinfo(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_GET_MTINFO; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + if (cnt != numPar) + return (-2); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_get_sptag(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_GET_SPTAG; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + if (cnt != numPar) + return (-2); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_get_rmon(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.sa_st = 0; + param.sa_end = 3; + + param.cmdType = MACSEC_GET_RMON; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + cnt += scanParamArg(argc, argv, "SaStart", sizeof(param.sa_st), + ¶m.sa_st); + + cnt += scanParamArg(argc, argv, "SaEnd", sizeof(param.sa_end), + ¶m.sa_end); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_rmon_clr(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_RMON_CLEAR; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_dbg_rmon_enc(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_DBG_RMON_ENC; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_dbg_rmon_dec(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_DBG_RMON_DEC; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_dbg_init_enc(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_DBG_INIT_ENC; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_dbg_init_dis(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_DBG_DIS; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_sa_dbg(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.sa_st = 0; + param.val = 24; + + param.cmdType = MACSEC_SA_DBG; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + cnt += scanParamArg(argc, argv, "SaIdx", sizeof(param.sa_st), + ¶m.sa_st); + + cnt += scanParamArg(argc, argv, "SaWords", sizeof(param.val), + ¶m.val); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_dbg_info(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_GET_DBG_INFO; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_testcase_kat1(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_TESTCASE_KAT1; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + cnt += scanParamArg(argc, argv, "testid", sizeof(param.val), + ¶m.val); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; + +} + +int gsw_macsec_teststs_kat1(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_TESTSTS_KAT1; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + cnt += scanParamArg(argc, argv, "testid", sizeof(param.val), + ¶m.val); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; + +} + +int gsw_macsec_testcase_kat2(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_TESTCASE_KAT2; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + cnt += scanParamArg(argc, argv, "testid", sizeof(param.val), + ¶m.val); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; + +} + +int gsw_macsec_teststs_kat2(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_TESTSTS_KAT2; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + cnt += scanParamArg(argc, argv, "testid", sizeof(param.val), + ¶m.val); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; + +} + +int gsw_macsec_testcase_kat3(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_TESTCASE_KAT3; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + cnt += scanParamArg(argc, argv, "testid", sizeof(param.val), + ¶m.val); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; + +} + +int gsw_macsec_teststs_kat3(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_TESTSTS_KAT3; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + cnt += scanParamArg(argc, argv, "testid", sizeof(param.val), + ¶m.val); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; + +} + +int gsw_macsec_cpsts(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_CP_STS; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; +} + +int gsw_macsec_print_pdata(int argc, char *argv[], void *fd, int numPar) +{ + GSW_MACSec_cfg_t param; + unsigned int cnt = 0; + + memset(¶m, 0x00, sizeof(param)); + + param.cmdType = MACSEC_PRINT_PDATA; + + cnt += scanParamArg(argc, argv, "devid", sizeof(param.devid), + ¶m.devid); + + if (cli_ioctl(fd, GSW_MACSEC_CFG, ¶m) != 0) + return (-1); + + return 0; + +} + diff --git a/src/gsw_cli_macsec.h b/src/gsw_cli_macsec.h new file mode 100755 index 0000000000000000000000000000000000000000..f2451542e1aa055d9fe8ebcba859783ca67b10ac --- /dev/null +++ b/src/gsw_cli_macsec.h @@ -0,0 +1,41 @@ +/**************************************************************************** + + Copyright 2010 + Lantiq Deutschland GmbH + Am Campeon 3; 85579 Neubiberg, Germany + + For licensing information, see the file 'LICENSE' in the root folder of + this software module. + +*****************************************************************************/ +#ifndef _MACSEC_CMD_DECLARE_H +#define _MACSEC_CMD_DECLARE_H +int gsw_macsec_reg_read(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_reg_write(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_init(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_exit(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_sa_rd(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_sptag(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_mtinfo(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_get_mtinfo(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_get_sptag(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_get_rmon(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_dbg_rmon_enc(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_dbg_rmon_dec(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_dbg_init_enc(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_rmon_clr(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_flow_rd(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_dbg_init_dis(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_sa_dbg(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_dbg_info(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_testcase_kat1(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_teststs_kat1(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_testcase_kat2(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_teststs_kat2(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_testcase_kat3(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_teststs_kat3(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_cpsts(int argc, char *argv[], void *fd, int numPar); +int gsw_macsec_print_pdata(int argc, char *argv[], void *fd, int numPar); + + +#endif /* _MACSEC_CMD_DECLARE_H*/ diff --git a/src/gsw_tbl.c b/src/gsw_tbl.c old mode 100644 new mode 100755 index 8f97b4a3319b3729897eabf11c3f18a828ded49a..29cfb3cec4adace1f177020b25b54b7bb499e3bc --- a/src/gsw_tbl.c +++ b/src/gsw_tbl.c @@ -1,5131 +1,5191 @@ -/**************************************************************************** - - Copyright 2010 - Lantiq Deutschland GmbH - Am Campeon 3; 85579 Neubiberg, Germany - - For licensing information, see the file 'LICENSE' in the root folder of - this software module. - -*****************************************************************************/ -#include "ltq_cli_lib.h" -#include "gsw_cli_fkts.h" - -#ifndef IOCTL_PCTOOL -#include <stdio.h> -#include "switch_cli_config.h" -#endif - -const GSW_CommandTable_t cmdTable[] = { - {/* 0 */ "GSW_8021X_EAPOL_RULE_GET", (command_fkt)gsw_8021x_eapol_rule_get}, - {/* 1 */ "GSW_8021X_EAPOL_RULE_SET", (command_fkt)gsw_8021x_eapol_rule_set}, - {/* 2 */ "GSW_8021X_PORT_CFG_GET", (command_fkt)gsw_8021x_port_cfg_get}, - {/* 3 */ "GSW_8021X_PORT_CFG_SET", (command_fkt)gsw_8021x_port_cfg_set}, - {/* 4 */ "GSW_CAP_GET", (command_fkt)gsw_cap_get}, - {/* 5 */ "GSW_CFG_GET", (command_fkt)gsw_cfg_get}, - {/* 6 */ "GSW_CFG_SET", (command_fkt)gsw_cfg_set}, - {/* 7 */ "GSW_CPU_PORT_CFG_GET", (command_fkt)gsw_cpu_port_cfg_get}, - {/* 8 */ "GSW_CPU_PORT_CFG_SET", (command_fkt)gsw_cpu_port_cfg_set}, - {/* 9 */ "GSW_CPU_PORT_EXTEND_CFG_GET", (command_fkt)gsw_cpu_port_extend_cfg_get}, - {/* 10 */ "GSW_CPU_PORT_EXTEND_CFG_SET", (command_fkt)gsw_cpu_port_extend_cfg_set}, - {/* 11 */ "GSW_DISABLE", (command_fkt)gsw_disable}, - {/* 12 */ "GSW_ENABLE", (command_fkt)gsw_enable}, - {/* 13 */ "GSW_HW_INIT", (command_fkt)gsw_hw_init}, - {/* 14 */ "GSW_MAC_TABLE_CLEAR", (command_fkt)gsw_mac_table_clear}, - {/* 15 */ "GSW_MAC_TABLE_ENTRY_ADD", (command_fkt)gsw_mac_table_entry_add}, - {/* 16 */ "GSW_MAC_TABLE_ENTRY_QUERY", (command_fkt)gsw_mac_table_entry_query}, - {/* 17 */ "GSW_MAC_TABLE_ENTRY_READ", (command_fkt)gsw_mac_table_entry_read}, - {/* 18 */ "GSW_MAC_TABLE_ENTRY_REMOVE", (command_fkt)gsw_mac_table_entry_remove}, - {/* 19 */ "GSW_MDIO_CFG_GET", (command_fkt)gsw_mdio_cfg_get}, - {/* 20 */ "GSW_MDIO_CFG_SET", (command_fkt)gsw_mdio_cfg_set}, - {/* 21 */ "GSW_MDIO_DATA_READ", (command_fkt)gsw_mdio_data_read}, - {/* 22 */ "GSW_MDIO_DATA_WRITE", (command_fkt)gsw_mdio_data_write}, - {/* 23 */ "GSW_MMD_DATA_READ", (command_fkt)gsw_mmd_data_read}, - {/* 24 */ "GSW_MMD_DATA_WRITE", (command_fkt)gsw_mmd_data_write}, - {/* 25 */ "GSW_MONITOR_PORT_CFG_GET", (command_fkt)gsw_monitor_port_cfg_get}, - {/* 26 */ "GSW_MONITOR_PORT_CFG_SET", (command_fkt)gsw_monitor_port_cfg_set}, - {/* 27 */ "GSW_MULTICAST_ROUTER_PORT_ADD", (command_fkt)gsw_multicast_router_port_add}, - {/* 28 */ "GSW_MULTICAST_ROUTER_PORT_READ", (command_fkt)gsw_multicast_router_port_read}, - {/* 29 */ "GSW_MULTICAST_ROUTER_PORT_REMOVE", (command_fkt)gsw_multicast_router_port_remove}, - {/* 30 */ "GSW_MULTICAST_SNOOP_CFG_GET", (command_fkt)gsw_multicast_snoop_cfg_get}, - {/* 31 */ "GSW_MULTICAST_SNOOP_CFG_SET", (command_fkt)gsw_multicast_snoop_cfg_set}, - {/* 32 */ "GSW_MULTICAST_TABLE_ENTRY_ADD", (command_fkt)gsw_multicast_table_entry_add}, - {/* 33 */ "GSW_MULTICAST_TABLE_ENTRY_READ", (command_fkt)gsw_multicast_table_entry_read}, - {/* 34 */ "GSW_MULTICAST_TABLE_ENTRY_REMOVE", (command_fkt)gsw_multicast_table_entry_remove}, - {/* 35 */ "GSW_PORT_CFG_GET", (command_fkt)gsw_port_cfg_get}, - {/* 36 */ "GSW_PORT_CFG_SET", (command_fkt)gsw_port_cfg_set}, - {/* 37 */ "GSW_PORT_LINK_CFG_GET", (command_fkt)gsw_port_link_cfg_get}, - {/* 38 */ "GSW_PORT_LINK_CFG_SET", (command_fkt)gsw_port_link_cfg_set}, - {/* 39 */ "GSW_PORT_PHY_ADDR_GET", (command_fkt)gsw_port_phy_addr_get}, - {/* 40 */ "GSW_PORT_PHY_QUERY", (command_fkt)gsw_port_phy_query}, - {/* 41 */ "GSW_PORT_REDIRECT_GET", (command_fkt)gsw_port_redirect_get}, - {/* 42 */ "GSW_PORT_REDIRECT_SET", (command_fkt)gsw_port_redirect_set}, - {/* 43 */ "GSW_PORT_RGMII_CLK_CFG_GET", (command_fkt)gsw_port_rgmii_clk_cfg_get}, - {/* 44 */ "GSW_PORT_RGMII_CLK_CFG_SET", (command_fkt)gsw_port_rgmii_clk_cfg_set}, - {/* 45 */ "GSW_QOS_CLASS_DSCP_GET", (command_fkt)gsw_qos_class_dscp_get}, - {/* 46 */ "GSW_QOS_CLASS_DSCP_SET", (command_fkt)gsw_qos_class_dscp_set}, - {/* 47 */ "GSW_QOS_CLASS_PCP_GET", (command_fkt)gsw_qos_class_pcp_get}, - {/* 48 */ "GSW_QOS_CLASS_PCP_SET", (command_fkt)gsw_qos_class_pcp_set}, - {/* 49 */ "GSW_QOS_DSCP_CLASS_GET", (command_fkt)gsw_qos_dscp_class_get}, - {/* 50 */ "GSW_QOS_DSCP_CLASS_SET", (command_fkt)gsw_qos_dscp_class_set}, - {/* 51 */ "GSW_QOS_DSCP_DROP_PRECEDENCE_CFG_GET", (command_fkt)gsw_qos_dscp_drop_precedence_cfg_get}, - {/* 52 */ "GSW_QOS_DSCP_DROP_PRECEDENCE_CFG_SET", (command_fkt)gsw_qos_dscp_drop_precedence_cfg_set}, - {/* 53 */ "GSW_QOS_METER_CFG_GET", (command_fkt)gsw_qos_meter_cfg_get}, - {/* 54 */ "GSW_QOS_METER_CFG_SET", (command_fkt)gsw_qos_meter_cfg_set}, - {/* 55 */ "GSW_QOS_METER_PORT_ASSIGN", (command_fkt)gsw_qos_meter_port_assign}, - {/* 56 */ "GSW_QOS_METER_PORT_DEASSIGN", (command_fkt)gsw_qos_meter_port_deassign}, - {/* 57 */ "GSW_QOS_METER_PORT_GET", (command_fkt)gsw_qos_meter_port_get}, - {/* 58 */ "GSW_QOS_PCP_CLASS_GET", (command_fkt)gsw_qos_pcp_class_get}, - {/* 59 */ "GSW_QOS_PCP_CLASS_SET", (command_fkt)gsw_qos_pcp_class_set}, - {/* 60 */ "GSW_QOS_PORT_CFG_GET", (command_fkt)gsw_qos_port_cfg_get}, - {/* 61 */ "GSW_QOS_PORT_CFG_SET", (command_fkt)gsw_qos_port_cfg_set}, - {/* 62 */ "GSW_QOS_PORT_REMARKING_CFG_GET", (command_fkt)gsw_qos_port_remarking_cfg_get}, - {/* 63 */ "GSW_QOS_PORT_REMARKING_CFG_SET", (command_fkt)gsw_qos_port_remarking_cfg_set}, - {/* 64 */ "GSW_QOS_QUEUE_PORT_GET", (command_fkt)gsw_qos_queue_port_get}, - {/* 65 */ "GSW_QOS_QUEUE_PORT_SET", (command_fkt)gsw_qos_queue_port_set}, - {/* 66 */ "GSW_QOS_SCHEDULER_CFG_GET", (command_fkt)gsw_qos_scheduler_cfg_get}, - {/* 67 */ "GSW_QOS_SCHEDULER_CFG_SET", (command_fkt)gsw_qos_scheduler_cfg_set}, - {/* 68 */ "GSW_QOS_SHAPER_CFG_GET", (command_fkt)gsw_qos_shaper_cfg_get}, - {/* 69 */ "GSW_QOS_SHAPER_CFG_SET", (command_fkt)gsw_qos_shaper_cfg_set}, - {/* 70 */ "GSW_QOS_SHAPER_QUEUE_ASSIGN", (command_fkt)gsw_qos_shaper_queue_assign}, - {/* 71 */ "GSW_QOS_SHAPER_QUEUE_DEASSIGN", (command_fkt)gsw_qos_shaper_queue_deassign}, - {/* 72 */ "GSW_QOS_SHAPER_QUEUE_GET", (command_fkt)gsw_qos_shaper_queue_get}, - {/* 73 */ "GSW_QOS_STORM_CFG_GET", (command_fkt)gsw_qos_storm_cfg_get}, - {/* 74 */ "GSW_QOS_STORM_CFG_SET", (command_fkt)gsw_qos_storm_cfg_set}, - {/* 75 */ "GSW_QOS_WRED_CFG_GET", (command_fkt)gsw_qos_wred_cfg_get}, - {/* 76 */ "GSW_QOS_WRED_CFG_SET", (command_fkt)gsw_qos_wred_cfg_set}, - {/* 77 */ "GSW_QOS_WRED_QUEUE_CFG_GET", (command_fkt)gsw_qos_wred_queue_cfg_get}, - {/* 78 */ "GSW_QOS_WRED_QUEUE_CFG_SET", (command_fkt)gsw_qos_wred_queue_cfg_set}, - {/* 79 */ "GSW_RMON_CLEAR", (command_fkt)gsw_rmon_clear}, - {/* 80 */ "GSW_RMON_PORT_GET", (command_fkt)gsw_rmon_port_get}, - {/* 81 */ "GSW_STP_BPDU_RULE_GET", (command_fkt)gsw_stp_bpdu_rule_get}, - {/* 82 */ "GSW_STP_BPDU_RULE_SET", (command_fkt)gsw_stp_bpdu_rule_set}, - {/* 83 */ "GSW_STP_PORT_CFG_GET", (command_fkt)gsw_stp_port_cfg_get}, - {/* 84 */ "GSW_STP_PORT_CFG_SET", (command_fkt)gsw_stp_port_cfg_set}, - {/* 85 */ "GSW_VERSION_GET", (command_fkt)gsw_version_get}, - {/* 86 */ "GSW_VLAN_ID_CREATE", (command_fkt)gsw_vlan_id_create}, - {/* 87 */ "GSW_VLAN_ID_DELETE", (command_fkt)gsw_vlan_id_delete}, - {/* 88 */ "GSW_VLAN_ID_GET", (command_fkt)gsw_vlan_id_get}, - {/* 89 */ "GSW_VLAN_PORT_CFG_GET", (command_fkt)gsw_vlan_port_cfg_get}, - {/* 90 */ "GSW_VLAN_PORT_CFG_SET", (command_fkt)gsw_vlan_port_cfg_set}, - {/* 91 */ "GSW_VLAN_PORT_MEMBER_ADD", (command_fkt)gsw_vlan_port_member_add}, - {/* 92 */ "GSW_VLAN_PORT_MEMBER_READ", (command_fkt)gsw_vlan_port_member_read}, - {/* 93 */ "GSW_VLAN_PORT_MEMBER_REMOVE", (command_fkt)gsw_vlan_port_member_remove}, - {/* 94 */ "GSW_VLAN_MEMBER_INIT", (command_fkt)gsw_vlan_member_init}, - {/* 95 */ "GSW_VLAN_RESERVED_ADD", (command_fkt)gsw_vlan_reserved_add}, - {/* 96 */ "GSW_VLAN_RESERVED_REMOVE", (command_fkt)gsw_vlan_reserved_remove}, - {/* 97 */ "GSW_WOL_CFG_GET", (command_fkt)gsw_wol_cfg_get}, - {/* 98 */ "GSW_WOL_CFG_SET", (command_fkt)gsw_wol_cfg_set}, - {/* 99 */ "GSW_WOL_PORT_CFG_GET", (command_fkt)gsw_wol_port_cfg_get}, - {/* 100*/ "GSW_WOL_PORT_CFG_SET", (command_fkt)gsw_wol_port_cfg_set}, - {/* 101 */ "GSW_IRQ_GET", (command_fkt)gsw_irq_get}, - {/* 102 */ "GSW_IRQ_MASK_GET", (command_fkt)gsw_irq_mask_get}, - {/* 103 */ "GSW_IRQ_MASK_SET", (command_fkt)gsw_irq_mask_set}, - {/* 104 */ "GSW_IRQ_STATUS_CLEAR", (command_fkt)gsw_irq_status_clear}, - {/* 105 */ "GSW_PCE_RULE_DELETE", (command_fkt)gsw_pce_rule_delete}, - {/* 106 */ "GSW_PCE_RULE_READ", (command_fkt)gsw_pce_rule_read}, - {/* 107 */ "GSW_PCE_RULE_WRITE", (command_fkt)gsw_pce_rule_write}, - {/* 108 */ "GSW_REGISTER_GET", (command_fkt)gsw_register_get}, - {/* 109 */ "GSW_REGISTER_SET", (command_fkt)gsw_register_set}, - {/* 110 */ "GSW_RESET", (command_fkt)gsw_reset}, - {/* 111 */ "GSW_RMON_EXTEND_GET", (command_fkt)gsw_rmon_extend_get}, - {/* 112 */ "GSW_TIMESTAMP_TIMER_GET", (command_fkt)gsw_timestamp_timer_get}, - {/* 113 */ "GSW_TIMESTAMP_TIMER_SET", (command_fkt)gsw_timestamp_timer_set}, - {/* 114 */ "GSW_TIMESTAMP_PORT_READ", (command_fkt)gsw_timestamp_port_read}, - {/* 115 */ "GSW_TRUNKING_CFG_GET", (command_fkt)gsw_trunking_cfg_get}, - {/* 116 */ "GSW_TRUNKING_CFG_SET", (command_fkt)gsw_trunking_cfg_set}, - {/* 117 */ "GSW_TRUNKING_PORT_CFG_GET", (command_fkt)gsw_trunking_port_cfg_get}, - {/* 118 */ "GSW_TRUNKING_PORT_CFG_SET", (command_fkt)gsw_trunking_port_cfg_set}, - {/* 119 */ "GSW_QOS_WRED_PORT_CFG_GET", (command_fkt)gsw_qos_wred_port_cfg_get}, - {/* 120 */ "GSW_QOS_WRED_PORT_CFG_SET", (command_fkt)gsw_qos_wred_port_cfg_set}, - {/* 121 */ "GSW_QOS_FLOWCTRL_CFG_GET", (command_fkt)gsw_qos_flowctrl_cfg_get}, - {/* 122 */ "GSW_QOS_FLOWCTRL_CFG_SET", (command_fkt)gsw_qos_flowctrl_cfg_set}, - {/* 123 */ "GSW_QOS_FLOWCTRL_PORT_CFG_GET", (command_fkt)gsw_qos_flowctrl_port_cfg_get}, - {/* 124 */ "GSW_QOS_FLOWCTRL_PORT_CFG_SET", (command_fkt)gsw_qos_flowctrl_port_cfg_set}, - {/* 125 */ "GSW_QOS_QUEUE_BUFFER_RESERVE_CFG_GET", (command_fkt)gsw_qos_queue_buffer_reserve_cfg_get}, - {/* 126 */ "GSW_QOS_QUEUE_BUFFER_RESERVE_CFG_SET", (command_fkt)gsw_qos_queue_buffer_reserve_cfg_set}, - - {/* 127 */ "GSW_SVLAN_CFG_GET", (command_fkt)gsw_svlan_cfg_get}, - {/* 128 */ "GSW_SVLAN_CFG_SET", (command_fkt)gsw_svlan_cfg_set}, - {/* 129 */ "GSW_SVLAN_PORT_CFG_GET", (command_fkt)gsw_svlan_port_cfg_get}, - {/* 130 */ "GSW_SVLAN_PORT_CFG_SET", (command_fkt)gsw_svlan_port_cfg_set}, - {/* 131 */ "GSW_QOS_SVLAN_CLASS_PCP_PORT_GET", (command_fkt)gsw_qos_svlan_class_pcp_port_get}, - {/* 132 */ "GSW_QOS_SVLAN_CLASS_PCP_PORT_SET", (command_fkt)gsw_qos_svlan_class_pcp_port_set}, - {/* 133 */ "GSW_QOS_SVLAN_PCP_CLASS_GET", (command_fkt)gsw_qos_svlan_pcp_class_get}, - {/* 134 */ "GSW_QOS_SVLAN_PCP_CLASS_SET", (command_fkt)gsw_qos_svlan_pcp_class_set}, - {/* 135 */ "GSW_PCE_EG_VLAN_CFG_SET", (command_fkt)gsw_pce_eg_vlan_cfg_set}, - {/* 136 */ "GSW_PCE_EG_VLAN_CFG_GET", (command_fkt)gsw_pce_eg_vlan_cfg_get}, - {/* 137 */ "GSW_PCE_EG_VLAN_ENTRY_WRITE", (command_fkt)gsw_pce_eg_vlan_entry_write}, - {/* 138 */ "GSW_PCE_EG_VLAN_ENTRY_READ", (command_fkt)gsw_pce_eg_vlan_entry_read}, - {/* 139 */ "GSW_PMAC_BM_CFG_GET", (command_fkt)gsw_pmac_bm_cfg_get}, - {/* 140 */ "GSW_PMAC_EG_CFG_GET", (command_fkt)gsw_pmac_eg_cfg_get}, - {/* 141 */ "GSW_PMAC_IG_CFG_GET", (command_fkt)gsw_pmac_ig_cfg_get}, - {/* 142 */ "GSW_PMAC_COUNT_GET", (command_fkt)gsw_pmac_count_get}, - {/* 143 */ "GSW_RMON_MODE_SET", (command_fkt)gsw_rmon_mode_set}, - {/* 144 */ "GSW_RMON_IF_GET", (command_fkt)gsw_rmon_if_get}, - {/* 145 */ "GSW_RMON_REDIRECT_GET", (command_fkt)gsw_rmon_redirect_get}, - {/* 146 */ "GSW_RMON_ROUTE_GET", (command_fkt)gsw_rmon_route_get}, - {/* 147 */ "GSW_RMON_METER_GET", (command_fkt)gsw_rmon_meter_get}, - {/* 148 */ "GSW_QOS_METER_ACT", (command_fkt)gsw_qos_meter_act}, - {/* 149 */ "GSW_PMAC_GLBL_CFG_SET", (command_fkt)gsw_pmac_glbl_cfg_set}, - {/* 150 */ "GSW_PMAC_GLBL_CFG_GET", (command_fkt)gsw_pmac_glbl_cfg_get}, - -#if defined(CONFIG_LTQ_TEST) && CONFIG_LTQ_TEST - {/* 152 */ "GSW_ROUTE_ENTRY_READ", (command_fkt)gsw_route_entry_read}, - {/* 153 */ "GSW_ROUTE_ENTRY_DELETE", (command_fkt)gsw_route_entry_delete}, - {/* 154 */ "GSW_ROUTE_ENTRY_ADD", (command_fkt)gsw_route_entry_add}, - {/* 155 */ "GSW_ROUTE_TUNNEL_ENTRY_READ", (command_fkt)gsw_route_tunnel_entry_read}, - {/* 156 */ "GSW_ROUTE_TUNNEL_ENTRY_DELETE", (command_fkt)gsw_route_tunnel_entry_delete}, - {/* 157 */ "GSW_ROUTE_TUNNEL_ENTRY_ADD", (command_fkt)gsw_route_tunnel_entry_add}, - {/* 158 */ "GSW_ROUTE_L2NAT_CFG_READ", (command_fkt)gsw_route_l2nat_cfg_read}, - {/* 159 */ "GSW_ROUTE_L2NAT_CFG_WRITE", (command_fkt)gsw_route_l2nat_cfg_write}, - {/* 160 */ "GSW_ROUTE_SESSION_HIT_OP", (command_fkt)gsw_route_session_hit_op}, - {/* 161 */ "GSW_ROUTE_SESSION_DEST_MOD", (command_fkt)gsw_route_session_dest_mod}, - -#endif - - {/* 162 */ "GSW_CTP_PORT_ASSIGNMENT_SET", (command_fkt)gsw_ctp_port_assigment_set}, - {/* 163 */ "GSW_CTP_PORT_ASSIGNMENT_GET", (command_fkt)gsw_ctp_port_assigment_get}, - {/* 164 */ "GSW_EXTENDEDVLAN_SET", (command_fkt)gsw_extendedvlan_config_set}, - {/* 165 */ "GSW_EXTENDEDVLAN_GET", (command_fkt)gsw_extendedvlan_config_get}, - {/* 166 */ "GSW_EXTENDEDVLAN_FREE", (command_fkt)gsw_extendedvlan_free}, - {/* 167 */ "GSW_VLANFILTER_SET", (command_fkt)gsw_vlanfilter_config_set}, - {/* 168 */ "GSW_VLANFILTER_GET", (command_fkt)gsw_vlanfilter_config_get}, - {/* 169 */ "GSW_VLANFILTER_FREE", (command_fkt)gsw_vlanfilter_free}, - {/* 170 */ "GSW_BRIDGE_CONFIG_SET", (command_fkt)gsw_bridge_config_set}, - {/* 171 */ "GSW_BRIDGE_CONFIG_GET", (command_fkt)gsw_bridge_config_get}, - {/* 172 */ "GSW_BRIDGE_FREE", (command_fkt)gsw_bridge_free}, - {/* 173 */ "GSW_CTP_PORT_CONFIG_SET", (command_fkt)gsw_ctp_port_config_set}, - {/* 174 */ "GSW_CTP_PORT_CONFIG_GET", (command_fkt)gsw_ctp_port_config_get}, - {/* 175 */ "GSW_CTP_PORT_CONFIG_RESET", (command_fkt)gsw_ctp_port_config_reset}, - {/* 176 */ "GSW_BRIDGE_PORT_CONFIG_SET", (command_fkt)gsw_bridge_port_config_set}, - {/* 177 */ "GSW_BRIDGE_PORT_CONFIG_GET", (command_fkt)gsw_bridge_port_config_get}, - {/* 178 */ "GSW_BRIDGE_PORT_ALLOC", (command_fkt)gsw_bridge_port_alloc}, - {/* 179 */ "GSW_BRIDGE_PORT_FREE", (command_fkt)gsw_bridge_port_free}, - {/* 180 */ "GSW_EXTENDEDVLAN_ALLOC", (command_fkt)gsw_extendedvlan_alloc}, - {/* 181 */ "GSW_VLANFILTER_ALLOC", (command_fkt)gsw_vlanfilter_alloc}, - {/* 182 */ "GSW_BRIDGE_ALLOC", (command_fkt)gsw_bridge_alloc}, - {/* 183 */ "GSW_PMAC_RMON_GET", (command_fkt)gsw_pmac_rmon_get}, - - {/* 184 */ "GSW_DEBUG_CTPTABLE_STATUS", (command_fkt)gsw_debug_ctptablestatus}, - {/* 185 */ "GSW_DEBUG_BRDGPORTTABLE_STATUS", (command_fkt)gsw_debug_bridgeporttablestatus}, - {/* 186 */ "GSW_DEBUG_BRDGTABLE_STATUS", (command_fkt)gsw_debug_bridgetablestatus}, - {/* 187 */ "GSW_DEBUG_EXVLANTABLE_STATUS", (command_fkt)gsw_debug_Exvlantablestatus}, - {/* 188 */ "GSW_DEBUG_VLANFILTERTABLE_STATUS", (command_fkt)gsw_debug_VlanFiltertablestatus}, - {/* 189 */ "GSW_DEBUG_METERTABLE_STATUS", (command_fkt)gsw_debug_Metertablestatus}, - {/* 190 */ "GSW_DEBUG_DSCP2PCPTABLE_STATUS", (command_fkt)gsw_debug_Dscp2Pcptablestatus}, - {/* 191 */ "GSW_DEBUG_PMAPPER_STATUS", (command_fkt)gsw_debug_Pmappertablestatus}, - {/* 192 */ "GSW_DEBUG_PMAC_EG", (command_fkt)gsw_debug_pmac_eg}, - {/* 193 */ "GSW_DEBUG_PMAC_IG", (command_fkt)gsw_debug_pmac_ig}, - {/* 194 */ "GSW_DEBUG_PMAC_BP", (command_fkt)gsw_debug_pmac_bp}, - {/* 195 */ "GSW_DEBUG_DEF_QMAP", (command_fkt)gsw_debug_def_pce_qmap}, - {/* 196 */ "GSW_DEBUG_DEF_BYP_QMAP", (command_fkt)gsw_debug_def_byp_qmap}, - {/* 197 */ "xgmac", (command_fkt)gsw_xgmac_cli}, - {/* 198 */ "GSW_PMAC_BM_CFG_SET", (command_fkt)gsw_pmac_bm_cfg_set}, - {/* 199 */ "GSW_PMAC_EG_CFG_SET", (command_fkt)gsw_pmac_eg_cfg_set}, - {/* 200 */ "GSW_PMAC_IG_CFG_SET", (command_fkt)gsw_pmac_ig_cfg_set}, - {/* 201 */ "GSW_DEBUG_CTP_STATISTICS", (command_fkt)gsw_debug_ctpstatistics}, - {/* 202 */ "GSW_DEBUG_LP_STATISTICS", (command_fkt)gsw_debug_lpstatistics}, - {/* 203 */ "gswss", (command_fkt)gsw_gswss_cli}, - {/* 204 */ "lmac", (command_fkt)gsw_lmac_cli}, - {/* 205 */ "GSW_CTP_PORT_ASSIGNMENT_ALLOC", (command_fkt)gsw_ctp_port_alloc}, - {/* 206 */ "GSW_CTP_PORT_ASSIGNMENT_FREE", (command_fkt)gsw_ctp_port_free}, - {/* 207 */ "macsec", (command_fkt)gsw_macsec_cli}, - {/* 208 */ "GSW_IRQ_REGISTER", (command_fkt)gsw_irq_register}, - {/* 209 */ "GSW_IRQ_UNREGISTER", (command_fkt)gsw_irq_unregister}, - {/* 210 */ "GSW_IRQ_ENABLE", (command_fkt)gsw_irq_enable}, - {/* 211 */ "GSW_IRQ_DISBALE", (command_fkt)gsw_irq_disable}, - {/* 212 */ "GSW_DEBUG_PRINT_PCEIRQ_LIST", (command_fkt)gsw_debug_PrintPceIrqList}, - {/* 213 */ "GSW_RMON_FLOW_GET", (command_fkt)gsw_rmon_flow_get}, - {/* 214 */ "GSW_RMON_TFLOW_CLEAR", (command_fkt)gsw_rmon_tflow_clear}, - {/* 215 */ "GSW_DSCP2PCP_MAP_GET", (command_fkt)gsw_dscp2pcp_map_get}, - {/* 216 */ "GSW_DEFAUL_MAC_FILTER_GET", (command_fkt)gsw_defaul_mac_filter_get}, - {/* 217 */ "GSW_DEFAUL_MAC_FILTER_SET", (command_fkt)gsw_defaul_mac_filter_set}, - {/* 218 */ "GSW_QOS_COLOR_MARKING_TABLE_SET", (command_fkt)gsw_qos_color_marking_table_set}, - {/* 219 */ "GSW_QOS_COLOR_MARKING_TABLE_GET", (command_fkt)gsw_qos_color_marking_table_get}, - {/* 220 */ "GSW_QOS_COLOR_REMARKING_TABLE_GET", (command_fkt)gsw_qos_color_remarking_table_get}, - {/* 221 */ "GSW_QOS_COLOR_REMARKING_TABLE_SET", (command_fkt)gsw_qos_color_remarking_table_set}, - - - {/* 222 */ "GSW_DEBUG_RMON_PORT_GET", (command_fkt)gsw_debug_rmon_port_get}, - {/* 223 */ "GSW_CTP_PORT_RMON_GET", (command_fkt)gsw_debug_ctp_rmon_port_get}, - {/* 224 */ "GSW_BRIDGE_PORT_RMON_GET", (command_fkt)gsw_debug_bridge_rmon_port_get}, - {/* 225 */ "GSW_CTP_PORT_PCEBYPASS_RMON_GET", (command_fkt)gsw_debug_ctpbypass_rmon_port_get}, - - {/* 226 */ "GSW_DEBUG_RMON_ALL_GET", (command_fkt)gsw_debug_rmon_port_get_all}, - - {/* 227 */ "GSW_DUMP_MEM", (command_fkt)gsw_dump_mem}, - {NULL, NULL}, -}; - - -//#ifdef SWITCHAPI_HELP_TEXT -const char *const HelpText[] = { - /* 0: GSW_8021X_EAPOL_RULE_GET */ - "Read the IEEE 802.1x filter configuration. The parameters can be modified\n" - "using GSW_8021X_EAPOL_RULE_SET.", - /* 1: GSW_8021X_EAPOL_RULE_SET */ - "Set the IEEE 802.1x filter rule for a dedicated port. Filtered packets can be\n" - "redirected to one dedicated port (e.g. CPU port). The switch supports the\n" - "addition of a specific packet header to the filtered packets that contains\n" - "information like source port, priority and so on. The parameters can be read\n" - "using GSW_8021X_EAPOL_RULE_GET.\n" - "\nParameter:\n----------\n" - "eForwardPort :\n" - "\tFilter authentication packets and forward them, discard them or\n" - "\tdisable the filter.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Default; portmap is determined by the forwarding classification.\n" - "\n" - "\t1: Discard; discard packets.\n" - "\n" - "\t2: Forward to the CPU port. This requires that the CPU port is\n" - "\t\tpreviously set by calling GSW_CPU_PORT_CFG_SET.\n" - "\n" - "\t3: Forward to a port, selected by the parameter 'nForwardPortId'.\n" - "\t\tPlease note that this feature is not supported by all hardware\n" - "\t\tplatforms.\n" - "\n" - "nForwardPortId :\n" - "\tTarget port for forwarded packets, only used if selected by\n" - "\t'eForwardPort'. Forwarding is done if 'eForwardPort =\n" - "\tGSW_PORT_FORWARD_PORT'.", - /* 2: GSW_8021X_PORT_CFG_GET */ - "Get the 802.1x port status for a switch port. A configuration can be set using\n" - "GSW_8021X_PORT_CFG_SET\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 3: GSW_8021X_PORT_CFG_SET */ - "Set the 802.1x port status for a switch port. The port configuration can be\n" - "read using GSW_8021X_PORT_CFG_GET.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "eState :\n" - "\t802.1x state of the port.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Receive and transmit direction are authorized. The port is allowed\n" - "\t\tto transmit and receive all packets and the address learning\n" - "\t\tprocess is also allowed.\n" - "\n" - "\t1: Receive and transmit direction are unauthorized. All the packets\n" - "\t\texcept EAPOL are not allowed to transmit and receive. The address\n" - "\t\tlearning process is disabled.\n" - "\n" - "\t2: Receive direction is authorized, transmit direction is\n" - "\t\tunauthorized. The port is allowed to receive all packets. Packet\n" - "\t\ttransmission to this port is not allowed. The address learning\n" - "\t\tprocess is also allowed.\n" - "\n" - "\t3: Transmit direction is authorized, receive direction is\n" - "\t\tunauthorized. The port is allowed to transmit all packets. Packet\n" - "\t\treception on this port is not allowed. The address learning process\n" - "\t\tis disabled.", - /* 4: GSW_CAP_GET */ - "This service returns the capability referenced by the provided index\n" - "(zero-based counting index value). The Switch API uses the index to return the\n" - "capability parameter from an internal list. For instance, the capability list\n" - "contains information about the amount of supported features like number of\n" - "supported VLAN groups or MAC table entries. The command returns zero-length\n" - "strings ('') in case the requested index number is out of range.", - /* 5: GSW_CFG_GET */ - "Read the global switch configuration. This configuration can be set using\n" - "GSW_CFG_SET.", - /* 6: GSW_CFG_SET */ - "Modify the switch configuration. The configuration can be read using\n" - "GSW_CFG_GET. The switch can be enabled using GSW_ENABLE.\n" - "\nParameter:\n----------\n" - "eMAC_TableAgeTimer :\n" - "\tMAC table aging timer. After this timer expires the MAC table entry is\n" - "\taged out.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t1: 1 second\n" - "\n" - "\t2: 10 seconds\n" - "\n" - "\t3: 300 seconds\n" - "\n" - "\t4: 1 hour\n" - "\n" - "\t5: 24 hours\n" - "\n" - "bVLAN_Aware :\n" - "\tVLAN Awareness. The switch is VLAN unaware if this variable is\n" - "\tdisabled. In this mode, no VLAN-related APIs are supported and return\n" - "\twith an error. The existing VLAN configuration is discarded when VLAN\n" - "\tis disabled again.\n" - "\n" - "nMaxPacketLen :\n" - "\tMaximum Ethernet packet length.\n" - "\n" - "bLearningLimitAction :\n" - "\tAutomatic MAC address table learning limitation consecutive action.\n" - "\tThese frame addresses are not learned, but there exists control as to\n" - "\twhether the frame is still forwarded or dropped. - 0: Drop -\n" - "\t1: Forward\n" - "\n" - "bMAC_SpoofingAction :\n" - "\tAccept or discard MAC spoofing and port MAC locking violation packets.\n" - "\ta MAC source address which was previously learned on a different\n" - "\tingress port (learned by MAC bridging table). This also applies to\n" - "\tstatic added entries. MAC spoofing detection is enabled on port level \n" - "\tby 'bMAC_SpoofingDetection'. MAC address port locking is configured on port level\n" - "\tby 'bLearningMAC_PortLock'. IFX_FALSE(0): Drop,IFX_TRUE(1): Forward \n" - "\n" - "bPauseMAC_ModeSrc :\n" - "\tPause frame MAC source address mode. If enabled, use the alternative\n" - "\taddress specified with 'nMAC'.\n" - "\n" - "nPauseMAC_Src :\n" - "\tPause frame MAC source address.\n" - "\tSupported Formats: 12:34:45:67:89:0A", - /* 7: GSW_CPU_PORT_CFG_GET */ - "Get the port that is directly connected to the software running on a CPU and\n" - "defined as CPU port. This port assignment can be set using\n" - "GSW_CPU_PORT_CFG_SET if it is not fixed and defined by the switch device\n" - "architecture.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 8: GSW_CPU_PORT_CFG_SET */ - "Defines one port that is directly connected to the software running on a CPU.\n" - "This allows for the redirecting of protocol-specific packets to the CPU port\n" - "and special packet treatment when sent by the CPU. If the CPU port cannot be\n" - "set, the function returns an error code.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "bCPU_PortValid :\n" - "\tCPU port validity. Set command: set true to define a CPU port, set\n" - "\tfalse to undo the setting. Get command: true if defined as CPU, false\n" - "\tif not defined as CPU port.\n" - "\n" - "bSpecialTagIngress :\n" - "\tSpecial tag enable in ingress direction.\n" - "\n" - "bSpecialTagEgress :\n" - "\tSpecial tag enable in egress direction.\n" - "\n" - "bFcsCheck :\n" - "\tEnable FCS check - 0: No check, forward all frames - 1:\n" - "\tCheck FCS, drop frames with errors\n" - "\n" - "bFcsGenerate :\n" - "\tEnable FCS generation - 0: Forward packets without FCS -\n" - "\t1: Generate FCS for all frames\n" - "\n" - "bSpecialTagEthType :\n" - "\tSpecial tag Ethertype mode.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: The EtherType field of the Special Tag of egress packets is always\n" - "\t\tset to a prefined value. This same defined value applies for all\n" - "\t\tswitch ports.\n" - "\n" - "\t1: The Ethertype field of the Special Tag of egress packets is set to\n" - "\t\tthe FlowID parameter, which is a results of the switch flow\n" - "\t\tclassification result. The switch flow table rule provides this\n" - "\t\tFlowID as action parameter." - - "eNoMPEParserCfg :\n" - "\tParser Header Config for no MPE flags (i.e. MPE1=0, MPE2=0).\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Parsing Results are not carried on the traffic to CPU port \n" - "\t\t(both MPE1 and MPE2 flags are not set. \n" - "\t1: 8-Bytes Parsing Flags (Bit 63:0) accompanying to CPU Port for this combination. \n" - "\t2: 40-Bytes Offsets (Offset-0 to -39) + 8-Bytes Parsing Flags (Bit 63:0) \n" - "\t\t accompanying to CPU Port for this combination \n" - "\t3: Reserved - for future use \n" - "\n" - "eMPE1ParserCfg :\n" - "\tParser Header Config for MPE-1 set flag (i.e. MPE1=1, MPE2=0).\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Parsing Results are not carried on the traffic to CPU port \n" - "\t\t(both MPE1 and MPE2 flags are not set. \n" - "\t1: 8-Bytes Parsing Flags (Bit 63:0) accompanying to CPU Port for this combination. \n" - "\t2: 40-Bytes Offsets (Offset-0 to -39) + 8-Bytes Parsing Flags (Bit 63:0) \n" - "\t\t accompanying to CPU Port for this combination \n" - "\t3: Reserved - for future use \n" - "\n" - "eMPE2ParserCfg :\n" - "\tParser Header Config for MPE-2 set flag (i.e. MPE1=0, MPE2=1).\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Parsing Results are not carried on the traffic to CPU port \n" - "\t\t(both MPE1 and MPE2 flags are not set. \n" - "\t1: 8-Bytes Parsing Flags (Bit 63:0) accompanying to CPU Port for this combination. \n" - "\t2: 40-Bytes Offsets (Offset-0 to -39) + 8-Bytes Parsing Flags (Bit 63:0) \n" - "\t\t accompanying to CPU Port for this combination \n" - "\t3: Reserved - for future use \n" - "\n" - "eMPE1MPE2ParserCfg :\n" - "\tParser Header Config for both MPE-1 and MPE-2 set flag (i.e. MPE1=1, MPE2=1).\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Parsing Results are not carried on the traffic to CPU port \n" - "\t\t(both MPE1 and MPE2 flags are not set. \n" - "\t1: 8-Bytes Parsing Flags (Bit 63:0) accompanying to CPU Port for this combination. \n" - "\t2: 40-Bytes Offsets (Offset-0 to -39) + 8-Bytes Parsing Flags (Bit 63:0) \n" - "\t\t accompanying to CPU Port for this combination \n" - "\t3: Reserved - for future use \n" - "\n" - "\n", - /* 9: GSW_CPU_PORT_EXTEND_CFG_GET */ - "Reads out additional CPU port configuration. This configuration applies to\n" - "devices where the CPU port is fixed to one dedicated port.", - /* 10: GSW_CPU_PORT_EXTEND_CFG_SET */ - "Configure an additional CPU port configuration. This configuration applies to\n" - "devices where the CPU port is fixed to one dedicated port.\n" - "\nParameter:\n----------\n" - "eHeaderAdd :\n" - "\tAdd Ethernet layer-2 header (also VLAN) to the transmit packet. The\n" - "\tcorresponding header fields are set in 'sHeader'.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: No additional Ethernet header.\n" - "\n" - "\t1: Additional Ethernet header.\n" - "\n" - "\t2: Additional Ethernet- and VLAN- header.\n" - "\n" - "bHeaderRemove :\n" - "\tRemove Ethernet layer-2 header (also VLAN) for packets going from\n" - "\tEthernet switch to the DMA. Only the first VLAN tag found is removed\n" - "\tand additional available VLAN tags remain untouched.\n" - "\n" - "Ethernet layer-2 header information. Used when adding a header to the\n" - "transmitted packet. The parameter 'eHeaderAdd' selects the mode if a layer-2\n" - "header should be added (including VLAN). This structure contains all fields of\n" - "the Ethernet and VLAN header.\n" - "sHeader.nMAC_Src :\n" - "\tPacket MAC Source Address.\n" - "\tSupported Formats: 12:34:45:67:89:0A" - "\n" - "sHeader.nMAC_Dst :\n" - "\tPacket MAC Destination Address.\n" - "\tSupported Formats: 12:34:45:67:89:0A" - "\n" - "sHeader.nEthertype :\n" - "\tPacket EtherType Field.\n" - "\n" - "sHeader.nVLAN_Prio :\n" - "\tVLAN Tag Priority Field. Only used when adding VLAN tag is enabled\n" - "\t(eHeaderAdd=GSW_CPU_HEADER_VLAN).\n" - "\n" - "sHeader.nVLAN_CFI :\n" - "\tVLAN Tag Canonical Format Identifier. Only used when adding VLAN tag\n" - "\tis enabled (eHeaderAdd=GSW_CPU_HEADER_VLAN).\n" - "\n" - "sHeader.nVLAN_ID :\n" - "\tVLAN Tag VLAN ID. Only used when adding VLAN tag is enabled\n" - "\t(eHeaderAdd=GSW_CPU_HEADER_VLAN).\n" - "\n" - "ePauseCtrl :\n" - "\tDescribes how the port handles received PAUSE frames coming from the\n" - "\tswitch. Either forward them to DMA or stop/start transmission. Note\n" - "\tthat the parameter 'eFlowCtrl' of the command 'GSW_PORT_CFG_SET'\n" - "\tdetermines whether the switch generates PAUSE frames.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Forward all PAUSE frames coming from the switch macro towards the\n" - "\t\tDMA channel. These frames do not influence the packet transmission.\n" - "\n" - "\t1: Dispatch all PAUSE frames coming from the switch macro towards the\n" - "\t\tDMA channel. These are filtered out and the packets transmission is\n" - "\t\tstopped and restarted accordingly.\n" - "\n" - "bFcsRemove :\n" - "\tRemove the CRC (FCS) of all packets coming from the switch towards the\n" - "\tDMA channel. Note that the FCS check and generation option can be\n" - "\tconfigured using 'GSW_CPU_PORT_CFG_SET'.\n" - "\n" - "nWAN_Ports :\n" - "\tPort map of Ethernet switch ports that are assigned to the WAN side\n" - "\t(dedicated for applications where ports are grouped into WAN- and LAN-\n" - "\tsegments). All ports that are not selected belong to the LAN segment.\n" - "\tThe LSB bit represents port 0, the higher bits represent the higher\n" - "\tport numbers.", - /* 11: GSW_DISABLE */ - "Disables the whole switch. The switch can be enabled using the\n" - "GSW_ENABLE command", - /* 12: GSW_ENABLE */ - "Enables the whole switch. The switch device is enabled with the default\n" - "configuration in case no other configuration is applied. The switch can be\n" - "disabled using the GSW_DISABLE command", - /* 13: GSW_HW_INIT */ - "Hardware Initialization. This command should be called right after the Switch\n" - "API software module is initialized and loaded. It accesses the hardware\n" - "platform, retrieving platform capabilities and performing the first basic\n" - "configuration.\n" - "\nParameter:\n----------\n" - "eInitMode :\n" - "\tSelect the type of Switch API and hardware initialization.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Access the switch hardware to read out status and capability\n" - "\t\tinformation. Then define the basic hardware configuration to bring\n" - "\t\tthe hardware into a pre-defined state.\n" - "\n" - "\t1: Access the switch hardware to read out status and capability\n" - "\t\tinformation. Do not write any hardware configuration to the device.\n" - "\t\tThis means that the current existing hardware configuration remains\n" - "\t\tunchanged.\n" - "\n" - "\t2: Initialize the switch software module but do not touch the switch\n" - "\t\thardware. This means that no read or write operations are done on\n" - "\t\tthe switch hardware. Status and capability information cannot be\n" - "\t\tretrieved from the hardware.", - /* 14: GSW_MAC_TABLE_CLEAR */ - "Remove all MAC entries from the MAC table.", - /* 15: GSW_MAC_TABLE_ENTRY_ADD */ - "Add a MAC table entry. If an entry already exists for the given MAC Address\n" - "and Filtering Database (FID), this entry is overwritten. If not, a new entry\n" - "is added.\n" - "\nParameter:\n----------\n" - "nFId :\n" - "\tKey - Filtering Identifier (FID) (not supported by all switches)\n" - "\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "nAgeTimer :\n" - "\tAging Time, given in multiples of 1 second in a range from 1 s to\n" - "\t1,000,000 s. The configured value might be rounded that it fits to the\n" - "\tgiven hardware platform.\n" - "\n" - /* "nSVLAN_Id :\n" - "\tSTAG VLAN Id. Only applicable in case SVLAN support is enabled on the device.\n" - "\n"*/ - "nSubIfId :\n" - "\tSub-Interface Identifier Destination (supported in GSWIP-3.0 only)..\n" - "\n" - "bStaticEntry :\n" - "\tStatic Entry (value will be aged out if the entry is not set to\n" - "\tstatic). The switch API implementation uses the maximum age timer in\n" - "\tcase the entry is not static.\n" - "\n" - "nTrafficClass :\n" - "\tEgress queue traffic class. The queue index starts counting from zero.\n" - "\n" - "nMAC :\n" - "\tMAC Address to add to the table.\n" - "\tSupported Formats: 12:34:45:67:89:0A" - "\n" - "nFilterFlag :\n" - "\tKey - Value 0 - not filter, 1 - source address filter\n" - "\t2 - destination address filter, 3 - both source and destination filter.", - /* 16: GSW_MAC_TABLE_ENTRY_QUERY */ - "Search the MAC Address table for a specific address entry. A MAC address is\n" - "provided by the application and Switch API performs a search operation on the\n" - "hardware table. Many hardware platforms provide an optimized and fast address\n" - "search algorithm.\n" - "\nParameter:\n----------\n" - "nMAC :\n" - "\tMAC Address. This parameter needs to be provided for the search\n" - "\toperation. This is an input parameter.\n" - "\tSupported Formats: 12:34:45:67:89:0A" - "\n" - "nFId :\n" - "\tKey - Get the MAC table entry belonging to the given Filtering Identifier\n" - "\t(FID) (not supported by all switches). This is an input parameter." - "\n" - "nFilterFlag :\n" - "\tKey - Value 0 - not filter, 1 - source address filter\n" - "\t2 - destination address filter, 3 - both source and destination filter.", - /* 17: GSW_MAC_TABLE_ENTRY_READ */ - "Read an entry of the MAC table. If the parameter 'bInitial=TRUE', the GET\n" - "operation starts at the beginning of the table. Otherwise it continues the GET\n" - "operation at the entry that follows the previous access. The function sets all\n" - "fields to zero in case the end of the table is reached. In order to read out\n" - "the complete table, this function can be called in a loop. The Switch API sets\n" - "'bLast=1' when the last entry is read out. This 'bLast' parameter could\n" - "be the loop exit criteria.", - /* 18: GSW_MAC_TABLE_ENTRY_REMOVE */ - "Remove a single MAC entry from the MAC table.\n" - "\nParameter:\n----------\n" - "nFId :\n" - "\tFiltering Identifier (FID) (not supported by all switches)\n" - "\n" - "nMAC :\n" - "\tMAC Address to be removed from the table.\n" - "\tSupported Formats: 12:34:45:67:89:0A", - /* 19: GSW_MDIO_CFG_GET */ - "Read the MDIO interface configuration. The parameters can be modified using\n" - "GSW_MDIO_CFG_SET.", - /* 20: GSW_MDIO_CFG_SET */ - "Set the MDIO interface configuration. The parameters can be read using\n" - "GSW_MDIO_CFG_GET. The given frequency is rounded off to fitting to the\n" - "hardware support. GSW_MDIO_CFG_GET will return the exact programmed\n" - "(rounded) frequency value.\n" - "\nParameter:\n----------\n" - "nMDIO_Speed :\n" - "\tMDIO interface clock and data rate [in kHz].\n" - "\n" - "bMDIO_Enable :\n" - "\tMDIO interface enable.", - /* 21: GSW_MDIO_DATA_READ */ - "Read data from the MDIO Interface of the switch device. This function allows\n" - "various kinds of information to be read out for any attached device by\n" - "register and device addressing. The 'nData' value (GSW_MDIO_data_t)\n" - "contains the read device register. A write operation can be done using\n" - "GSW_MDIO_DATA_WRITE.\n" - "\nParameter:\n----------\n" - "nAddressDev :\n" - "\tDevice address on the MDIO interface\n" - "\n" - "nAddressReg :\n" - "\tRegister address inside the device.", - /* 22: GSW_MDIO_DATA_WRITE */ - "Write data to the MDIO Interface of the switch device. This function allows\n" - "for configuration of any attached device by register and device addressing.\n" - "This applies to external and internal Ethernet PHYs as well. The 'nData' value\n" - "(GSW_MDIO_data_t) is directly written to the device register. A read\n" - "operation can be performed using GSW_MDIO_DATA_READ.\n" - "\nParameter:\n----------\n" - "nAddressDev :\n" - "\tDevice address on the MDIO interface\n" - "\n" - "nAddressReg :\n" - "\tRegister address inside the device.\n" - "\n" - "nData :\n" - "\tExchange data word with the device (read / write).", - /* 23: GSW_MMD_DATA_READ */ - "Read MMD Ethernet PHY register over the MDIO Interface attached to the switch\n" - "device. This function allows various kinds of information to be read out for\n" - "any attached device by register and device addressing. The 'nData' value (\ref\n" - "GSW_MMD_data_t) contains the read MMD device register. A write operation\n" - "can be done using \ref GSW_MMD_DATA_WRITE.\n" - "\nParameter:\n----------\n" - "nAddressDev :\n" - "\tDevice address on the MDIO interface\n" - "\n" - "nAddressReg :\n" - "\tMMD Register address/offset inside the device.", - /* 24: GSW_MMD_DATA_WRITE */ - "Write MMD Ethernet PHY register over the MDIO Interface attached to the switch\n" - "device. This function allows configuration of any attached device by MMD\n" - "register and device addressing. This applies to external and internal Ethernet\n" - "PHYs as well. The 'nData' value (\ref GSW_MMD_data_t) is directly\n" - "written to the device register. A read operation can be performed using \ref\n" - "GSW_MMD_DATA_READ.\n" - "\nParameter:\n----------\n" - "nAddressDev :\n" - "\tDevice address on the MDIO interface\n" - "\n" - "nAddressReg :\n" - "\tMMD Register address/offset inside the device.\n" - "\n" - "nData :\n" - "\tExchange data word with the device (read / write).", - /* 25: GSW_MONITOR_PORT_CFG_GET */ - "Reads out the current monitor options for a dedicated Ethernet port. This\n" - "configuration can be set using GSW_MONITOR_PORT_CFG_SET.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 26: GSW_MONITOR_PORT_CFG_SET */ - "Configures the monitor options for a dedicated Ethernet port. This current\n" - "configuration can be read back using GSW_MONITOR_PORT_CFG_GET.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "bMonitorPort :\n" - "\tThis port is used as a monitor port. To use this feature, the port\n" - "\tmirror function is enabled on one or more ports.", - /* 27: GSW_MULTICAST_ROUTER_PORT_ADD */ - "Add static router port to the switch hardware multicast table. These added\n" - "router ports will not be removed by the router port learning aging process.\n" - "The router port learning is enabled over the parameter 'bLearningRouter' over\n" - "the GSW_MULTICAST_SNOOP_CFG_GET command. Router port learning and static\n" - "added entries can both be used together. In case of a sofware IGMP\n" - "stack/daemon environemtn, the router port learning does not have to be\n" - "configured on the switch hardware. Instead the router port management is\n" - "handled by the IGMP stack/daemon. A port can be removed using\n" - "GSW_MULTICAST_ROUTER_PORT_REMOVE.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 28: GSW_MULTICAST_ROUTER_PORT_READ */ - "Check if a port has been selected as a router port, either by automatic\n" - "learning or by manual setting. A port can be added using\n" - "GSW_MULTICAST_ROUTER_PORT_ADD. A port can be removed again using\n" - "GSW_MULTICAST_ROUTER_PORT_REMOVE.\n" - "\nParameter:\n----------\n" - "bInitial :\n" - "\tRestart the get operation from the start of the table. Otherwise\n" - "\treturn the next table entry (next to the entry that was returned\n" - "\tduring the previous get operation). This parameter is always reset\n" - "\tduring the read operation. This boolean parameter is set by the\n" - "\tcalling application.\n" - "\n" - "bLast :\n" - "\tIndicates that the read operation got all last valid entries of the\n" - "\ttable. This boolean parameter is set by the switch API when the Switch\n" - "\tAPI is called after the last valid one was returned already.\n" - "\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 29: GSW_MULTICAST_ROUTER_PORT_REMOVE */ - "Remove an Ethernet router port from the switch hardware multicast table. A\n" - "port can be added using GSW_MULTICAST_ROUTER_PORT_ADD.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 30: GSW_MULTICAST_SNOOP_CFG_GET */ - "Read out the current switch multicast configuration. The configuration can be\n" - "set using GSW_MULTICAST_SNOOP_CFG_SET.", - /* 31: GSW_MULTICAST_SNOOP_CFG_SET */ - "Configure the switch multicast configuration. The currently used configuration\n" - "can be read using GSW_MULTICAST_SNOOP_CFG_GET.\n" - "\nParameter:\n----------\n" - "eIGMP_Mode :\n" - "\tEnables and configures the IGMP/MLD snooping feature. Select\n" - "\tautolearning or management packet forwarding mode. Packet forwarding\n" - "\tis done to the port selected in 'eForwardPort'.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: IGMP management packet snooping and multicast level 3 table\n" - "\t\tlearning is disabled.\n" - "\n" - "\t1: IGMP management packet snooping is enabled and used for the\n" - "\t\thardware auto-learning to fill the multicast level 3 table.\n" - "\n" - "\t2: IGMP management packet snooping is enabled and forwarded to the\n" - "\t\tconfigured port. No autolearning of the multicast level 3 table.\n" - "\t\tThis table has to be maintained by the management software.\n" - "\n" - "bIGMPv3 :\n" - "\tIGMPv3 hardware support. When enabled the IGMP table includes both the\n" - "\tgroup table and the source list table. Otherwise the table only\n" - "\tincludes the group table. This feature is needed when supporting\n" - "\tIGMPv3 and MLDv2 protocols.\n" - "\n" - "bCrossVLAN :\n" - "\tEnables snooped IGMP control packets treated as cross-VLAN packets.\n" - "\tThis parameter is used for hardware auto-learning and snooping packets\n" - "\tforwarded to a dedicated port. This dedicated port can be selected\n" - "\tover 'eForwardPort'.\n" - "\n" - "eForwardPort :\n" - "\tForward snooped packet, only used if forwarded mode is selected by\n" - "\t'eIGMP_Mode = GSW_MULTICAST_SNOOP_MODE_SNOOPFORWARD'.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Default; portmap is determined by the forwarding classification.\n" - "\n" - "\t1: Discard; discard packets.\n" - "\n" - "\t2: Forward to the CPU port. This requires that the CPU port is\n" - "\t\tpreviously set by calling GSW_CPU_PORT_CFG_SET.\n" - "\n" - "\t3: Forward to a port, selected by the parameter 'nForwardPortId'.\n" - "\t\tPlease note that this feature is not supported by all hardware\n" - "\t\tplatforms.\n" - "\n" - "nForwardPortId :\n" - "\tTarget port for forwarded packets, only used if selected by\n" - "\t'eForwardPort'. Forwarding is done if 'eForwardPort =\n" - "\tGSW_PORT_FORWARD_PORT'.\n" - "\n" - "nClassOfService :\n" - "\tSnooping control class of service. Snooping control packet can be\n" - "\tforwarded to the 'nForwardPortId' when selected in 'eIGMP_Mode'. The\n" - "\tclass of service of this port can be selected for the snooped control\n" - "\tpackets, starting from zero. The maximum possible service class\n" - "\tdepends on the hardware platform used. The value\n" - "\tGSW_TRAFFIC_CLASS_DISABLE disables overwriting the given class\n" - "\tassignment.\n" - "\n" - "nRobust :\n" - "\tRobustness variable. Used when the hardware-based IGMP/MLD snooping\n" - "\tfunction is enabled. This robust variable is used in case IGMP\n" - "\thardware learning is enabled ('eIGMP_Mode =\n" - "\tGSW_MULTICAST_SNOOP_MODE_AUTOLEARNING'). Supported range: 1 ...\n" - "\t3\n" - "\n" - "nQueryInterval :\n" - "\tQuery interval. Used to define the query interval in units of 100 ms\n" - "\twhen the hardware-based IGMP/MLD snooping function is enabled. The\n" - "\tautomatically learned router port will be aged out if no IGMP/MLD\n" - "\tquery frame is received from the router port for (nQueryInterval *\n" - "\tnRobust) seconds. The supported range is from 100 ms to 25.5 s, with a\n" - "\tdefault value of 10 s. This query interval is used in case IGMP\n" - "\thardware learning is enabled ('eIGMP_Mode =\n" - "\tGSW_MULTICAST_SNOOP_MODE_AUTOLEARNING').\n" - "\n" - "eSuppressionAggregation :\n" - "\tIGMP/MLD report suppression and Join Aggregation control. Whenever the\n" - "\treport message is already sent out for the same multicast group, the\n" - "\tsuccessive report message within the query-max-responsetime with the\n" - "\tsame group ID will be filtered by the switch. This is called report\n" - "\tsuppression. Whenever the join message is already sent out for the\n" - "\tsame multicast group, the successive join message with the same group\n" - "\tID will be filtered. This is called join aggregation. This suppression\n" - "\tcontrol is used in case IGMP hardware learning is enable ('eIGMP_Mode\n" - "\t= GSW_MULTICAST_SNOOP_MODE_AUTOLEARNING').\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Report Suppression and Join Aggregation.\n" - "\n" - "\t1: Report Suppression. No Join Aggregation.\n" - "\n" - "\t2: Transparent Mode. No Report Suppression and no Join Aggregation.\n" - "\n" - "bFastLeave :\n" - "\tHardware IGMP snooping fast leave option. Allows the hardware to\n" - "\tautomatically clear the membership when receiving the IGMP leave\n" - "\tpacket. This fast leave option is used in case IGMP hardware learning\n" - "\tis enabled ('eIGMP_Mode =\n" - "\tGSW_MULTICAST_SNOOP_MODE_AUTOLEARNING'). Note: The fast-leave\n" - "\toption shall only be enabled where only one host is connected to each\n" - "\tinterface. If fast-leave is enabled where more than one host is\n" - "\tconnected to an interface, some hosts might be dropped inadvertently.\n" - "\tFast-leave processing is supported only with IGMP version 2 hosts.\n" - "\n" - "bLearningRouter :\n" - "\tHardware router port auto-learning. Allows for the ports on which a\n" - "\trouter is located to be learned automatically. This router port\n" - "\tlearning option is used in case IGMP hardware learning is enabled\n" - "\t('eIGMP_Mode = GSW_MULTICAST_SNOOP_MODE_AUTOLEARNING').\n" - "bMulticastUnknownDrop :\n" - "\tDiscard Unknown IP Multicast Packets. Multicast packets are defined as\n" - "\tunknown in case the group address cannot be found in the switch multicast\n" - "\tgroup table. The table group entries could be either automatically learned or\n" - "\tthey are statically added. This Boolean parameter defines if such unknown\n" - "\tmulticast packet are forwarded to the multicast forwarding portmap \n" - "\t(command \ref GSW_PORT_CFG_SET, parameter 'bMulticastUnknownDrop') or \n" - "\tif they are dropped instead.\n" - "\t0: Forward unknown multicast packets for the multicast forwarding portmap.\n" - "\t1: Drop unknown multicast packets. \n" - "bMulticastFIDmode :\n" - "\tMulticast Forwarding based upon FID or Not - valid for GSWIP-3.0 only \n" - "\t0: Multicast Forwarding is not based upon FID.\n" - "\t1: Multicast Forwarding is based upon FID. \n" - "\n", - /* 32: GSW_MULTICAST_TABLE_ENTRY_ADD */ - "Adds a multicast group configuration to the multicast table. No new entry is\n" - "added in case this multicast group already exists in the table. This commands\n" - "adds a host member to the multicast group. A member can be removed again using\n" - "GSW_MULTICAST_TABLE_ENTRY_REMOVE.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "nSubIfId :\n" - "\tSub-Interface Id - valid for GSWIP 3.0 only\n" - "\n" - "nFID :\n" - "\tFID - valid for GSWIP 3.0 only subject to Global FID for MC is enabled\n" - "\n" - "eIPVersion :\n" - "\tSelect the IP version of the 'uIP_Gda' and 'uIP_Gsa' fields. Both\n" - "\tfields support either IPv4 or IPv6.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: IPv4\n" - "\n" - "\t1: IPv6\n" - "\n" - "uIP_Gda :\n" - "\tGroup Destination IP address (GDA).\n" - "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." - "\n" - "uIP_Gsa :\n" - "\tGroup Source IP address. Only used in case IGMPv3 support is enabled\n" - "\tand 'eModeMember != GSW_IGMP_MEMBER_DONT_CARE'.\n" - "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." - "\n" - "eModeMember :\n" - "\tGroup member filter mode. This parameter is ignored when deleting a\n" - "\tmulticast membership table entry. The configurations\n" - "\t'GSW_IGMP_MEMBER_EXCLUDE' and 'GSW_IGMP_MEMBER_INCLUDE'\n" - "\tare only supported if IGMPv3 is used.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Include source IP address membership mode. Only supported for\n" - "\t\tIGMPv3.\n" - "\n" - "\t1: Exclude source IP address membership mode. Only supported for\n" - "\t\tIGMPv3.\n" - "\n" - "\t2: Group source IP address is 'don't care'. This means all source IP\n" - "\t\taddresses (*) are included for the multicast group membership. This\n" - "\t\tis the default mode for IGMPv1 and IGMPv2.\n" - "bExclSrcIP :\n" - "\tExclude Mode - valid for GSWIP 3.0 only - Includes or Excludes Source IP - uIP_Gsa\n" - "\n", - /* 33: GSW_MULTICAST_TABLE_ENTRY_READ */ - "Read out the multicast membership table that is located inside the switch\n" - "hardware. The 'bInitial' parameter restarts the read operation at the\n" - "beginning of the table. Every following GSW_MULTICAST_TABLE_ENTRY_READ\n" - "call reads out the next found entry. The 'bLast' parameter is set by the\n" - "switch API in case the last entry of the table is reached.", - /* 34: GSW_MULTICAST_TABLE_ENTRY_REMOVE */ - "Remove an host member from a multicast group. The multicast group entry is\n" - "completely removed from the multicast table in case it has no host member port\n" - "left. Group members can be added using GSW_MULTICAST_TABLE_ENTRY_ADD.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "nSubIfId :\n" - "\tSub-Interface Id - valid for GSWIP 3.0 only\n" - "\n" - "nFID :\n" - "\tFID - valid for GSWIP 3.0 only subject to Global FID for MC is enabled\n" - "\n" - "eIPVersion :\n" - "\tSelect the IP version of the 'uIP_Gda' and 'uIP_Gsa' fields. Both\n" - "\tfields support either IPv4 or IPv6.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: IPv4\n" - "\n" - "\t1: IPv6\n" - "\n" - "uIP_Gda :\n" - "\tGroup Destination IP address (GDA).\n" - "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." - "\n" - "uIP_Gsa :\n" - "\tGroup Source IP address. Only used in case IGMPv3 support is enabled\n" - "\tand 'eModeMember != GSW_IGMP_MEMBER_DONT_CARE'.\n" - "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." - "\n" - "eModeMember :\n" - "\tGroup member filter mode. This parameter is ignored when deleting a\n" - "\tmulticast membership table entry. The configurations\n" - "\t'GSW_IGMP_MEMBER_EXCLUDE' and 'GSW_IGMP_MEMBER_INCLUDE'\n" - "\tare only supported if IGMPv3 is used.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Include source IP address membership mode. Only supported for\n" - "\t\tIGMPv3.\n" - "\n" - "\t1: Exclude source IP address membership mode. Only supported for\n" - "\t\tIGMPv3.\n" - "\n" - "\t2: Group source IP address is 'don't care'. This means all source IP\n" - "\t\taddresses (*) are included for the multicast group membership. This\n" - "\t\tis the default mode for IGMPv1 and IGMPv2.\n" - "bExclSrcIP :\n" - "\tExclude Mode - valid for GSWIP 3.0 only - Includes or Excludes Source IP - uIP_Gsa\n" - "\n", - /* 35: GSW_PORT_CFG_GET */ - "Read out the current Ethernet port configuration.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 36: GSW_PORT_CFG_SET */ - "Set the Ethernet port configuration.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "eEnable :\n" - "\tEnable Port (ingress only, egress only, both directions, or disabled).\n" - "\tThis parameter is used for Spanning Tree Protocol and 802.1X\n" - "\tapplications.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: The port is disabled in both directions.\n" - "\n" - "\t1: The port is enabled in both directions (ingress and egress).\n" - "\n" - "\t2: The port is enabled in the receive (ingress) direction only.\n" - "\n" - "\t3: The port is enabled in the transmit (egress) direction only.\n" - "\n" - "bUnicastUnknownDrop :\n" - "\tDrop unknown unicast packets. Do not send out unknown unicast packets\n" - "\ton this port, if the boolean parameter is enabled. By default packets\n" - "\tof this type are forwarded to this port.\n" - "\n" - "bMulticastUnknownDrop :\n" - "\tDrop unknown multicast packets. Do not send out unknown multicast\n" - "\tpackets on this port, if boolean parameter is enabled. By default\n" - "\tpackets of this type are forwarded to this port.\n" - "\n" - "bReservedPacketDrop :\n" - "\tDrop reserved packet types (destination address from '01 80 C2 00 00\n" - "\t00' to '01 80 C2 00 00 2F') received on this port.\n" - "\n" - "bBroadcastDrop :\n" - "\tDrop Broadcast packets received on this port. By default packets of\n" - "\tthis type are forwarded to this port.\n" - "\n" - "bAging :\n" - "\tEnables MAC address table aging. The MAC table entries learned on this\n" - "\tport are removed after the aging time has expired. The aging time is a\n" - "\tglobal parameter, common to all ports.\n" - "\n" - "bLearning :\n" - "\tMAC address table learning on the port specified by 'nPortId'.\n" - "\tBy default this parameter is always enabled. \n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Learning is enabled. \n" - "\t1: Learning is disabled.\n" - "\n" - "bLearningMAC_PortLock :\n" - "\tAutomatic MAC address table learning locking on the port specified by\n" - "\t'nPortId'.\n" - "\n" - "nLearningLimit :\n" - "\tAutomatic MAC address table learning limitation on this port. The\n" - "\tlearning functionality is disabled when the limit value is zero. The\n" - "\tvalue 0xFFFF to allow unlimited learned address.\n" - "\n" - "bMAC_SpoofingDetection :\n" - "\tMAC spoofing detection. Identifies ingress packets that carry a MAC source address\n" - "\twhich was previously learned on a different ingress port (learned by MAC bridging table).\n" - "\tThis also applies to static added entries. Those violated packets could be\n" - "\taccepted or discarded, depending on the global switch configuration 'bMAC_SpoofingAction'.\n" - "\tThis parameter is only taken into account when 'bLearning' is enabled.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Port MAC address spoofing detection is not enabled. \n" - "\t1: Port MAC address spoofing detection is enabled.\n" - "\n" - "eFlowCtrl :\n" - "\tPort Flow Control Status. Enables the flow control function.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Automatic flow control mode selection through auto-negotiation.\n" - "\n" - "\t1: Receive flow control only\n" - "\n" - "\t2: Transmit flow control only\n" - "\n" - "\t3: Receive and Transmit flow control\n" - "\n" - "\t4: No flow control\n" - "\n" - "ePortMonitor :\n" - "\tPort monitor feature. Allows forwarding of egress and/or ingress\n" - "\tpackets to the monitor port. If enabled, the monitor port gets a copy\n" - "\tof the selected packet type.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Mirror Feature is disabled. Normal port usage.\n" - "\n" - "\t1: Port Ingress packets are mirrored to the monitor port.\n" - "\n" - "\t2: Port Egress packets are mirrored to the monitor port.\n" - "\n" - "\t3: Port Ingress and Egress packets are mirrored to the monitor port.\n" - "\n" - "\t4: Packet mirroring of 'unknown VLAN violation' frames.\n" - "\n" - "\t16: Packet mirroring of 'VLAN ingress or egress membership violation'\n" - "\t\tframes.\n" - "\n" - "\t32: Packet mirroring of 'port state violation' frames.\n" - "\n" - "\t64: Packet mirroring of 'MAC learning limit violation' frames.\n" - "\n" - "\t128: Packet mirroring of 'port lock violation' frames.\n" - "bIfCounters :\n" - "\tAssign Interface RMON Counters for this Port - GSWIP-3.0\n" - "nIfCountStartIdx :\n" - "\tInterface RMON Counters Start Index - GSWIP-3.0. \n" - "\tValue of (-1) denotes unassigned Interface Counters.\n" - "\tValid range : 0-255 available to be shared amongst ports in desired way.\n" - "eIfRMONmode :\n" - "\tInterface RMON Counters Mode - GSWIP-3.0\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: FID based Interface RMON counters Usage.\n" - "\n" - "\t1: Sub-Interface Id based Interface RMON counters Usage .\n" - "\n" - "\t2: Flow Id (LSB bits 3 to 0) based Interface RMON counters Usage .\n" - "\n" - "\t3: Flow Id (MSB bits 7 to 4) based Interface RMON counters Usage.\n" - "\n", - /* 37: GSW_PORT_LINK_CFG_GET */ - "Read out the Ethernet port's speed, link status, and flow control status. The\n" - "information for one single port 'nPortId' is returned. An error code is\n" - "returned if the selected port does not exist.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 38: GSW_PORT_LINK_CFG_SET */ - "Set the Ethernet port link, speed status and flow control status. The\n" - "configuration applies to a single port 'nPortId'.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "bDuplexForce :\n" - "\tForce Port Duplex Mode. - 0: Negotiate Duplex Mode.\n" - "\tAuto-negotiation mode. Negotiated duplex mode given in 'eDuplex'\n" - "\tduring GSW_PORT_LINK_CFG_GET calls. - 1: Force Duplex\n" - "\tMode. Force duplex mode in 'eDuplex'.\n" - "\n" - "eDuplex :\n" - "\tPort Duplex Status.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Port operates in full-duplex mode\n" - "\n" - "\t1: Port operates in half-duplex mode\n" - "\n" - "bSpeedForce :\n" - "\tForce Link Speed. - 0: Negotiate Link Speed. Negotiated speed\n" - "\tgiven in 'eSpeed' during GSW_PORT_LINK_CFG_GET calls. -\n" - "\t1: Force Link Speed. Forced speed mode in 'eSpeed'.\n" - "\n" - "eSpeed :\n" - "\tEthernet port link up/down and speed status.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t10: 10 Mbit/s\n" - "\n" - "\t100: 100 Mbit/s\n" - "\n" - "\t200: 200 Mbit/s\n" - "\n" - "\t1000: 1000 Mbit/s\n" - "\n" - "bLinkForce :\n" - "\tForce Link. - 0: Auto-negotiate Link. Current link status is\n" - "\tgiven in 'eLink' during GSW_PORT_LINK_CFG_GET calls. - 1:\n" - "\tForce Duplex Mode. Force duplex mode in 'eLink'.\n" - "\n" - "eLink :\n" - "\tLink Status. Read out the current link status. Note that the link\n" - "\tcould be forced by setting 'bLinkForce'.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Link up. Any connected LED still behaves based on the real PHY\n" - "\t\tstatus.\n" - "\n" - "\t1: Link down.\n" - "\n" - "eMII_Mode :\n" - "\tSelected interface mode (MII/RMII/RGMII/GMII).\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Normal PHY interface (twisted pair), use the internal MII\n" - "\t\tInterface.\n" - "\n" - "\t1: Reduced MII interface in normal mode.\n" - "\n" - "\t2: GMII or MII, depending upon the speed.\n" - "\n" - "\t3: RGMII mode.\n" - "\n" - "eMII_Type :\n" - "\tSelect MAC or PHY mode (PHY = Reverse xMII).\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: MAC Mode. The Ethernet port is configured to work in MAC mode.\n" - "\n" - "\t1: PHY Mode. The Ethernet port is configured to work in PHY mode.\n" - "\n" - "eClkMode :\n" - "\tInterface Clock mode (used for RMII mode).\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Clock Mode not applicable.\n" - "\n" - "\t1: Clock Master Mode. The port is configured to provide the clock as\n" - "\t\toutput signal.\n" - "\n" - "\t2: Clock Slave Mode. The port is configured to use the input clock\n" - "\t\tsignal.\n" - "\n" - "bLPI :\n" - "\t'Low Power Idle' Support for 'Energy Efficient Ethernet'. Only enable\n" - "\tthis feature in case the attached PHY also supports it.", - /* 39: GSW_PORT_PHY_ADDR_GET */ - "Read out the MDIO device address of an Ethernet PHY that is connected to an\n" - "Ethernet port. This device address is useful when accessing PHY registers\n" - "using the commands GSW_MDIO_DATA_WRITE, GSW_MDIO_DATA_READ,\n" - "GSW_MMD_DATA_WRITE and GSW_MMD_DATA_READ.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 40: GSW_PORT_PHY_QUERY */ - "Check whether the Ethernet switch hardware has detected an Ethernet PHY\n" - "connected to the given Ethernet port 'nPortId'.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 41: GSW_PORT_REDIRECT_GET */ - "Ingress and egress packets of one specific Ethernet port can be redirected to\n" - "the CPU port. The ingress and egress packet redirection can be configured\n" - "individually. This command reads out the current configuration of a dedicated\n" - "port. A new configuration can be applied by calling\n" - "GSW_PORT_REDIRECT_SET.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 42: GSW_PORT_REDIRECT_SET */ - "Select ingress and egress packets of one specific Ethernet port that can be\n" - "redirected to a port that is configured as the 'CPU port'. The ingress and\n" - "egress packet direction can be configured individually. The packet filter of\n" - "the original port still applies to the packet (for example, MAC address\n" - "learning is done for the selected port and not for the CPU port). On CPU port\n" - "side, no additional learning, forwarding look up, VLAN processing and queue\n" - "selection is performed for redirected packets. Depending on the hardware\n" - "platform used, the CPU port has to be set in advance using\n" - "GSW_CPU_PORT_CFG_SET. The currently used configuration can be read using\n" - "GSW_PORT_REDIRECT_GET.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "bRedirectEgress :\n" - "\tPort Redirect Option. If enabled, all packets destined to 'nPortId'\n" - "\tare redirected to the CPU port. The destination port map in the status\n" - "\theader information is not changed so that the original destination\n" - "\tport can be identified by software.\n" - "\n" - "bRedirectIngress :\n" - "\tPort Ingress Direct Forwarding. If enabled, all packets sourced from\n" - "\t'nPortId' are directly forwarded to queue 0 of the CPU port. These\n" - "\tpackets are not modified and are not affected by normal learning, look\n" - "\tup, VLAN processing and queue selection.", - /* 43: GSW_PORT_RGMII_CLK_CFG_GET */ - "Read the RGMII clocking parameter in case the Ethernet port is configured in\n" - "RGMII mode. The configuration can be set by calling\n" - "GSW_PORT_RGMII_CLK_CFG_SET. It applies to a single port 'nPortId'.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 44: GSW_PORT_RGMII_CLK_CFG_SET */ - "Configure the RGMII clocking parameter in case the Ethernet port is configured\n" - "in RGMII mode. The configuration can be read by calling\n" - "GSW_PORT_RGMII_CLK_CFG_GET. It applies to a single port 'nPortId'.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "nDelayRx :\n" - "\tClock Delay RX [multiple of 500 ps].\n" - "\n" - "nDelayTx :\n" - "\tClock Delay TX [multiple of 500 ps].", - /* 45: GSW_QOS_CLASS_DSCP_GET */ - "Read out the current traffic class to DSCP mapping table. The table can be\n" - "written using GSW_QOS_CLASS_DSCP_SET.", - /* 46: GSW_QOS_CLASS_DSCP_SET */ - "Configure the traffic class to DSCP priority mapping table. This table is\n" - "global for the whole switch device. The table can be read by\n" - "GSW_QOS_CLASS_DSCP_GET.\n" - "\nParameter:\n----------\n" - "nTrafficClass\n" - "\t\tTable index of the traffic table to DSCP (6-bit) mapping\n" - "\t\ttable. The index starts counting from zero.\n" - "nDSCP :\n" - "\t\tDSCP value (6-bit) associated with a particular Traffic class.", - /* 47: GSW_QOS_CLASS_PCP_GET */ - "Read out the current traffic class to 802.1P (PCP) priority mapping table.\n" - "This table is global and valid for the entire switch device. The table can be\n" - "written using GSW_QOS_CLASS_PCP_SET.", - /* 48: GSW_QOS_CLASS_PCP_SET */ - "Configure the traffic class to 802.1P (PCP) priority mapping table. This table\n" - "is global for the whole switch device. The table can be read by\n" - "GSW_QOS_CLASS_PCP_GET.\n" - "\nParameter:\n----------\n" - "nTrafficClass :\n" - "\t\tTable index of the traffic table to PCP (3-bit) mapping\n" - "\t\ttable. The index starts counting from zero.\n" - "nPCP :\n" - "\t\tPCP (3-bit) value associated with a particular traffic class.", - /* 49: GSW_QOS_DSCP_CLASS_GET */ - "Read out the QoS 64 DSCP mapping to the switch priority queues. The table\n" - "configuration can be set using GSW_QOS_DSCP_CLASS_SET.", - /* 50: GSW_QOS_DSCP_CLASS_SET */ - "Initialize the QoS 64 DSCP priority mapping to the switch priority queues.\n" - "This configuration applies for the whole switch device. The table\n" - "configuration can be read by GSW_QOS_DSCP_CLASS_GET.\n" - "\nParameter:\n----------\n" - "nDSCP :\n" - "\t\tTable index of the DSCP to traffic table mapping\n" - "\t\ttable. The index starts counting from zero.\n" - "nTrafficClass :\n" - "\t\tTraffic class associated with a particular DSCP\n" - "\t\tvalue.", - /* 51: GSW_QOS_DSCP_DROP_PRECEDENCE_CFG_GET */ - "Read out the current DSCP to Drop Precedence assignment mapping table. The\n" - "table can be configured using GSW_QOS_DSCP_DROP_PRECEDENCE_CFG_SET.", - /* 52: GSW_QOS_DSCP_DROP_PRECEDENCE_CFG_SET */ - "Configures the DSCP to Drop Presedence assignment mapping table. This mapping\n" - "table is used to identify the switch internal used drop precedence based on\n" - "the DSCP value of the incoming packet. The current mapping table configuration\n" - "can be read by GSW_QOS_DSCP_DROP_PRECEDENCE_CFG_GET.\n" - "\nParameter:\n----------\n" - "nDSCP :\n" - "\t\tTable index of the DSCP to Drop Presedence assignment\n" - "\t\ttable. The index starts counting from zero.\n" - "nDSCP_DropPrecedence :\n" - "\t\tDSCP to drop presedence assignment. Every array entry\n" - "\t\trepresent the drop presedence for one of the 64\n" - "\t\texisting DSCP values. DSCP is the index to an array\n" - "\t\tof resulting drop presedence values. The index starts\n" - "\t\tcounting from zero.\n" - "\t\tSupported Values:\n" - "\t\t-----------------\n" - "\t\t0: Critical Packet. Metering will never changes their\n" - "\t\tdrop precedence of these packets.\n\n" - "\t\t1: Green Drop Precedence Packet. Packet is marked\n" - "\t\twith a 'low' drop precedence.\n\n" - "\t\t2: Yellow Drop Precedence Packet. Packet is marked\n" - "\t\twith a 'middle' drop precedence.\n\n" - "\t\t3: Red Drop Precedence Packet. Packet is marked with\n" - "\t\ta 'high' drop precedence.", - /* 53: GSW_QOS_METER_CFG_GET */ - "Configure the parameters of a rate meter instance. This instance can be\n" - "assigned to an ingress/egress port using GSW_QOS_METER_PORT_ASSIGN. It\n" - "can also be used by the flow classification engine. The total number of\n" - "available rate meters can be retrieved by the capability list using\n" - "GSW_CAP_GET. The current configuration of a meter instance can be\n" - "retrieved using GSW_QOS_METER_CFG_GET.\n" - "\nParameter:\n----------\n" - "nMeterId :\n" - "\tMeter index (zero-based counting).", - /* 54: GSW_QOS_METER_CFG_SET */ - "This command configures the parameters of a rate meter instance. This instance\n" - "can be assigned to an ingress/egress port by using\n" - "GSW_QOS_METER_PORT_ASSIGN. It can also be used by the flow\n" - "classification engine. The total number of available rate meters can be\n" - "retrieved by the capability list using GSW_CAP_GET. The current\n" - "configuration of a meter instance can be retrieved using\n" - "GSW_QOS_METER_CFG_GET.\n" - "\nParameter:\n----------\n" - "bEnable :\n" - "\tEnable/Disable the meter shaper.\n" - "\n" - "nMeterId :\n" - "\tMeter index (zero-based counting).\n" - "\n" - "nCbs :\n" - "\tCommitted Burst Size (CBS [Bytes]).\n" - "\n" - "nEbs :\n" - "\tExcess Burst Size (EBS [Bytes]).\n" - "\n" - "nRate :\n" - "\tCommitted Information Rate (CIR [kbit/s])\n" - "nPiRate :\n" - "\tPeak Information Rate (PIR [kbit/s]) - applicable for trTCM only)" - "\n", - /* 55: GSW_QOS_METER_PORT_ASSIGN */ - "Assign a rate meter instance to an ingress and/or egress port. A maximum of\n" - "two meter IDs can be assigned to one single ingress port. This meter instance\n" - "to port assignment can be removed using GSW_QOS_METER_PORT_DEASSIGN. A\n" - "list of all available assignments can be read using\n" - "GSW_QOS_METER_PORT_GET.\n" - "\nParameter:\n----------\n" - "nMeterId :\n" - "\tMeter index (zero-based counting).\n" - "\n" - "eDir :\n" - "\tPort assignment. Could be either ingress, egress or both. Setting it\n" - "\tto 'GSW_DIRECTION_NONE' would remove the queue for any port\n" - "\tassignment.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: No direction.\n" - "\n" - "\t1: Ingress direction.\n" - "\n" - "\t2: Egress direction.\n" - "\n" - "\t3: Ingress and egress direction.\n" - "\n" - "nPortIngressId :\n" - "\tIngress Port Id.\n" - "\n" - "nPortEgressId :\n" - "\tEgress Port Id.", - /* 56: GSW_QOS_METER_PORT_DEASSIGN */ - "Deassign a rate meter instance from an ingress and/or egress port. A maximum\n" - "of two meter IDs can be assigned to one single ingress port. The meter\n" - "instance is given to the command and the port configuration is returned. An\n" - "instance to port assignment can be done using GSW_QOS_METER_PORT_ASSIGN.\n" - "A list of all available assignments can be read using\n" - "GSW_QOS_METER_PORT_GET.\n" - "\nParameter:\n----------\n" - "nMeterId :\n" - "\tMeter index (zero-based counting).\n" - "\n" - "eDir :\n" - "\tPort assignment. Could be either ingress, egress or both. Setting it\n" - "\tto 'GSW_DIRECTION_NONE' would remove the queue for any port\n" - "\tassignment.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: No direction.\n" - "\n" - "\t1: Ingress direction.\n" - "\n" - "\t2: Egress direction.\n" - "\n" - "\t3: Ingress and egress direction.\n" - "\n" - "nPortIngressId :\n" - "\tIngress Port Id.\n" - "\n" - "nPortEgressId :\n" - "\tEgress Port Id.", - /* 57: GSW_QOS_METER_PORT_GET */ - "Reads out all meter instance to port assignments that are done using\n" - "GSW_QOS_METER_PORT_ASSIGN. All assignments are read from an internal\n" - "table where every read call retrieves the next entry of the table. Setting the\n" - "parameter 'bInitial' starts the read operation at the beginning of the table.\n" - "The returned parameter 'bLast' indicates that the last element of the table\n" - "was returned.", - /* 58: GSW_QOS_PCP_CLASS_GET */ - "Read out the PCP to traffic class mapping table. The table configuration can\n" - "be set using GSW_QOS_PCP_CLASS_SET.", - /* 59: GSW_QOS_PCP_CLASS_SET */ - "Initialize the QoS 802.1P switch priority queue mapping. This configuration\n" - "applies for the whole switch device. The table configuration can be read by\n" - "GSW_QOS_PCP_CLASS_GET.\n" - "\nParameter:\n----------\n" - "nPCP :\n" - "\t\tTable index of the PCP to traffic table mapping\n" - "\t\ttable. The index starts counting from zero.\n" - "nTrafficClass :\n" - "\t\tTraffic class associated with a particular PCP value.", - /* 60: GSW_QOS_PORT_CFG_GET */ - "Read out the current Ethernet port traffic class of ingress packets. It is\n" - "used to identify the packet priority and the related egress priority queue.\n" - "The port configuration can be set using GSW_QOS_PORT_CFG_SET.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 61: GSW_QOS_PORT_CFG_SET */ - "Configures the Ethernet port based traffic class assignment of ingress\n" - "packets. It is used to identify the packet priority and the related egress\n" - "priority queue. For DSCP, the priority to queue assignment is done using\n" - "GSW_QOS_DSCP_CLASS_SET. For VLAN, the priority to queue assignment is\n" - "done using GSW_QOS_PCP_CLASS_SET. The current port configuration can be\n" - "read using GSW_QOS_PORT_CFG_GET.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "eClassMode :\n" - "\tSelect the packet header field on which to base the traffic class\n" - "\tassignment.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: No traffic class assignment based on DSCP or PCP\n" - "\n" - "\t1: Traffic class assignment based on DSCP. PCP information is ignored.\n" - "\t\tThe Port Class is used in case DSCP is not available in the packet.\n" - "\n" - "\t2: Traffic class assignment based on PCP. DSCP information is ignored.\n" - "\t\tThe Port Class is used in case PCP is not available in the packet.\n" - "\n" - "\t3: Traffic class assignment based on DSCP. Make the assignment based\n" - "\t\ton PCP in case the DSCP information is not available in the packet\n" - "\t\theader. The Port Class is used in case both are not available in\n" - "\t\tthe packet.\n" - "\n" - "\t4: CTAG VLAN PCP, IP DSCP. Traffic class assignment based\n" - "\t\t on CTAG VLAN PCP, alternative use DSCP based assignment.\n" - "\n" - "\t5: STAG VLAN PCP. Traffic class assignment based on STAG VLAN PCP. \n" - "\n" - "\t6: STAG VLAN PCP, IP DSCP. Traffic class assignment based\n" - "\t\t on STAG VLAN PCP, alternative use DSCP based assignment.\n" - "\n" - "\t7: IP DSCP, STAG VLAN PCP. Traffic class assignment based\n" - "\t\ton DSCP, alternative use STAG VLAN PCP based assignment.\n" - "\n" - "\t8: STAG VLAN PCP, CTAG VLAN PCP. Traffic class assignment based\n" - "\t\ton STAG VLAN PCP, alternative use CTAG VLAN PCP based assignment.\n" - "\n" - "\t9: STAG VLAN PCP, CTAG VLAN PCP, IP DSCP. Traffic class assignment\n" - "\t\tbased on STAG VLAN PCP, alternative use CTAG VLAN PCP based \n" - "\t\tassignment, alternative use DSCP based assignment. \n" - "\n" - "\t10: IP DSCP, STAG VLAN PCP, CTAG VLAN PCP. Traffic class assignment\n" - "\t\t based on DSCP, alternative use STAG VLAN PCP based\n" - "\t\t assignment, alternative use CTAG VLAN PCP based assignment.\n" - "\n" - "nTrafficClass :\n" - "\tDefault port priority in case no other priority (such as VLAN-based\n" - "\tPCP or IP-based DSCP) is used.", - /* 62: GSW_QOS_PORT_REMARKING_CFG_GET */ - "Read out the Port Remarking Configuration. Ingress and Egress remarking\n" - "options for DSCP and PCP. Remarking is done either on the used traffic class\n" - "or the drop precedence. The current configuration can be set using\n" - "GSW_QOS_PORT_REMARKING_CFG_SET.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 63: GSW_QOS_PORT_REMARKING_CFG_SET */ - "Port Remarking Configuration. Ingress and Egress remarking options for DSCP\n" - "and PCP. Remarking is done either on the used traffic class or the drop\n" - "precedence. The current configuration can be read using\n" - "GSW_QOS_PORT_REMARKING_CFG_GET.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "eDSCP_IngressRemarkingEnable :\n" - "\tIngress DSCP Remarking. Specifies on ingress side how a packet should\n" - "\tbe remarked. This DSCP remarking only works in case remarking is\n" - "\tenabled on the egress port. This configuration requires that remarking\n" - "\tis also enabled on the egress port. DSCP remarking enable on either\n" - "\tingress or egress port side does not perform any remark operation.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: No DSCP Remarking. No remarking is done on the egress port.\n" - "\n" - "\t1: TC DSCP 6-Bit Remarking. The complete DSCP remarking is done based\n" - "\t\ton the traffic class. The traffic class to DSCP value mapping is\n" - "\t\tgiven in a device global table.\n" - "\n" - "\t2: TC DSCP 3-Bit Remarking. The upper 3-Bits of the DSCP field are\n" - "\t\tremarked based on the traffic class. The traffic class to DSCP\n" - "\t\tvalue mapping is given in a device global table.\n" - "\n" - "\t3: Drop Precedence Remarking. The Drop Precedence is remarked on the\n" - "\t\tegress side.\n" - "\n" - "\t4: TC Drop Precedence Remarking. The Drop Precedence is remarked on\n" - "\t\tthe egress side and the upper 3-Bits of the DSCP field are remarked\n" - "\t\tbased on the traffic class. The traffic class to DSCP value mapping\n" - "\t\tis given in a device global table.\n" - "\n" - "bDSCP_EgressRemarkingEnable :\n" - "\tEgress DSCP Remarking. Applies remarking on egress packets in a\n" - "\tfashion as specified on the ingress port. This ingress port remarking\n" - "\tis configured by the parameter 'eDSCP_IngressRemarking'. This\n" - "\tconfiguration requires that remarking is also enabled on the ingress\n" - "\tport. DSCP remarking enable on either ingress or egress port side does\n" - "\tnot perform any remark operation.\n" - "\n" - "bPCP_IngressRemarkingEnable :\n" - "\tIngress PCP Remarking. Applies remarking to all port ingress packets.\n" - "\tThis configuration requires that remarking is also enabled on the\n" - "\tegress port. PCP remarking enable on either ingress or egress port\n" - "\tside does not perform any remark operation.\n" - "\n" - "bPCP_EgressRemarkingEnable :\n" - "\tEgress PCP Remarking. Applies remarking for all port egress packets.\n" - "\tThis configuration requires that remarking is also enabled on the\n" - "\tingress port. PCP remarking enable on either ingress or egress port\n" - "\tside does not perform any remark operation." - "bSTAG_PCP_IngressRemarkingEnable :\n" - "\tIngress STAG VLAN PCP Remarking.\n" - "bSTAG_DEI_IngressRemarkingEnable :\n" - "\tIngress STAG VLAN DEI Remarking.\n" - "bSTAG_PCP_DEI_EgressRemarkingEnable :\n" - "\tEgress STAG VLAN PCP & DEI Remarking.\n" - "\n", - /* 64: GSW_QOS_QUEUE_PORT_GET */ - "Read out the traffic class and port assignment done using\n" - "GSW_QOS_QUEUE_PORT_SET. Please note that the device comes along with a\n" - "default configuration and assignment.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available. This is an input parameter for\n" - "\tGSW_QOS_QUEUE_PORT_GET.\n" - "\n" - "nTrafficClassId :\n" - "\tTraffic Class index (zero-based counting). This is an input parameter\n" - "\tfor GSW_QOS_QUEUE_PORT_GET.\n" - "\n" - "listunused :\n" - "\tPrintout a list of all unused and unassigned egress queue.\n" - "bRedirectionBypass :\n" - "\tQueue Redirection bypass Option. If enabled, all packets destined \n" - "\tto 'nQueueId' are redirected from the 'nPortId' to 'nRedirectPortId'\n" - "\n", - /* 65: GSW_QOS_QUEUE_PORT_SET */ - "Sets the Queue ID for one traffic class of one port. The total amount of\n" - "supported ports, queues and traffic classes can be retrieved from the\n" - "capability list using GSW_CAP_GET. Please note that the device comes\n" - "along with a default configuration and assignment.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available. This is an input parameter for\n" - "\tGSW_QOS_QUEUE_PORT_GET.\n" - "\n" - "nTrafficClassId :\n" - "\tTraffic Class index (zero-based counting). This is an input parameter\n" - "\tfor GSW_QOS_QUEUE_PORT_GET.\n" - "\n" - "nQueueId :\n" - "\tQoS queue index (zero-based counting). This is an output parameter for\n" - "\tGSW_QOS_QUEUE_PORT_GET.\n" - "bRedirectionBypass :\n" - "\tQueue Redirection bypass Option. If enabled, all packets destined \n" - "\tto 'nQueueId' are redirected from the 'nPortId' to 'nRedirectPortId'\n" - "\n" - "nRedirectPortId :\n" - "\tRedirected traffic forward port.\n" - "\tThe bRedirectPortId, all packets from 'nPortId' are redirected.\n" - "\n", - /* 66: GSW_QOS_SCHEDULER_CFG_GET */ - "Read out the current scheduler configuration of a given egress port. This\n" - "configuration can be modified using GSW_QOS_SCHEDULER_CFG_SET.\n" - "\nParameter:\n----------\n" - "nQueueId :\n" - "\tQoS queue index (zero-based counting).", - /* 67: GSW_QOS_SCHEDULER_CFG_SET */ - "This configuration decides how the egress queues, attached to a single port,\n" - "are scheduled to transmit the queued Ethernet packets. The configuration\n" - "differentiates between 'Strict Priority' and 'weighted fair queuing'. This\n" - "applies when multiple egress queues are assigned to an Ethernet port. Using\n" - "the WFQ feature on a port requires the configuration of weights on all given\n" - "queues that are assigned to that port. Strict Priority means that no dedicated\n" - "weight is configured and the queue can transmit following its priority status.\n" - "The given configuration can be read out using GSW_QOS_SCHEDULER_CFG_GET.\n" - "\nParameter:\n----------\n" - "nQueueId :\n" - "\tQoS queue index (zero-based counting).\n" - "\n" - "eType :\n" - "\tScheduler Type (Strict Priority/Weighted Fair Queuing).\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Strict Priority.\n" - "\n" - "\t1: Weighted Fair Queuing.\n" - "\n" - "nWeight :\n" - "\tWeight in Token. Parameter used for WFQ configuration. Sets the weight\n" - "\tin token in relation to all remaining queues on this egress port\n" - "\thaving WFQ configuration. This parameter is only used when\n" - "\t'eType=GSW_QOS_SCHEDULER_WFQ'.", - /* 68: GSW_QOS_SHAPER_CFG_GET */ - "This command retrieves the rate and the burst size configuration of a rate\n" - "shaper instance. A configuration can be modified using\n" - "GSW_QOS_SHAPER_CFG_SET. The total number of available rate shapers can\n" - "be retrieved by the capability list using GSW_CAP_GET.\n" - "\nParameter:\n----------\n" - "nRateShaperId :\n" - "\tRate shaper index (zero-based counting).\n" - "\n" - "nRate :\n" - "\tRate [kbit/s]", - /* 69: GSW_QOS_SHAPER_CFG_SET */ - "This command configures a rate shaper instance with the rate and the burst\n" - "size. This instance can be assigned to QoS queues by using\n" - "GSW_QOS_SHAPER_QUEUE_ASSIGN. The total number of available rate shapers\n" - "can be retrieved by the capability list using GSW_CAP_GET.\n" - "\nParameter:\n----------\n" - "nRateShaperId :\n" - "\tRate shaper index (zero-based counting).\n" - "\n" - "bEnable :\n" - "\tEnable/Disable the rate shaper.\n" - "\n" - "bAVB :\n" - "\t802.1Qav credit based shaper mode. This specific shaper algorithm mode is used\n" - "\tby the audio/video bridging (AVB)network (according to 802.1Qav). By default, an token \n" - "\tbased shaper algorithm is used.\n" - "\n" - "nCbs :\n" - "\tCommitted Burst Size (CBS [bytes])\n" - "\n" - "nRate :\n" - "\tRate [kbit/s]", - /* 70: GSW_QOS_SHAPER_QUEUE_ASSIGN */ - "Assign one rate shaper instance to a QoS queue. The function returns with an\n" - "error in case there already are too many shaper instances assigned to a queue.\n" - "The queue instance can be enabled and configured using\n" - "GSW_QOS_SHAPER_CFG_SET. To remove a rate shaper instance from a QoS\n" - "queue, please use GSW_QOS_SHAPER_QUEUE_DEASSIGN. The total number of\n" - "available rate shaper instances can be retrieved by the capability list using\n" - "GSW_CAP_GET.\n" - "\nParameter:\n----------\n" - "nRateShaperId :\n" - "\tRate shaper index (zero-based counting).\n" - "\n" - "nQueueId :\n" - "\tQoS queue index (zero-based counting).", - /* 71: GSW_QOS_SHAPER_QUEUE_DEASSIGN */ - "Deassign one rate shaper instance from a QoS queue. The function returns with\n" - "an error in case the requested instance is not currently assigned to the\n" - "queue. The queue instance can be enabled and configured by using\n" - "GSW_QOS_SHAPER_CFG_SET. To assign a rate shaper instance to a QoS queue,\n" - "please use GSW_QOS_SHAPER_QUEUE_ASSIGN. The total number of available\n" - "rate shapers can be retrieved by the capability list using GSW_CAP_GET.\n" - "\nParameter:\n----------\n" - "nRateShaperId :\n" - "\tRate shaper index (zero-based counting).\n" - "\n" - "nQueueId :\n" - "\tQoS queue index (zero-based counting).", - /* 72: GSW_QOS_SHAPER_QUEUE_GET */ - "Check whether a rate shaper instance is assigned to the egress queue. The\n" - "egress queue index is the function input parameter. The switch API sets the\n" - "boolean parameter 'bAssigned == 1' in case a rate shaper is assigned\n" - "and then sets 'nRateShaperId' to describe the rater shaper instance. The\n" - "parameter 'bAssigned == 0' in case no rate shaper instance is\n" - "currently assigned to the queue instance. The commands\n" - "GSW_QOS_SHAPER_QUEUE_ASSIGN allow a rate shaper instance to be assigned,\n" - "and GSW_QOS_SHAPER_CFG_SET allows for configuration of a shaper\n" - "instance. The total number of available rate shapers can be retrieved by the\n" - "capability list using GSW_CAP_GET.\n" - "\nParameter:\n----------\n" - "nQueueId :\n" - "\tQoS queue index (zero-based counting). This parameter is the input\n" - "\tparameter for the GET function.", - /* 73: GSW_QOS_STORM_CFG_GET */ - "Reads out the current meter instance assignment for storm control. This\n" - "configuration can be modified using GSW_QOS_STORM_CFG_SET.", - /* 74: GSW_QOS_STORM_CFG_SET */ - "This command configures one meter instances for storm control. These instances\n" - "can be used for ingress broadcast-, multicast- and unknown unicast- packets.\n" - "Some platforms support addition of additional meter instances for this type of\n" - "packet. Repeated calls of GSW_QOS_STORM_CFG_SET allow addition of\n" - "additional meter instances. An assignment can be retrieved using\n" - "GSW_QOS_STORM_CFG_GET. Setting the broadcast, multicast and unknown\n" - "unicast packets boolean switch to zero deletes all metering instance\n" - "assignments.\n" - "\nParameter:\n----------\n" - "nMeterId :\n" - "\tMeter index 0 (zero-based counting).\n" - "\n" - "bBroadcast :\n" - "\tMeter instances used for broadcast traffic.\n" - "\n" - "bMulticast :\n" - "\tMeter instances used for multicast traffic.\n" - "\n" - "bUnknownUnicast :\n" - "\tMeter instances used for unknown unicast traffic.", - /* 75: GSW_QOS_WRED_CFG_GET */ - "Read out the global WRED drop probability profile and thresholds of the\n" - "device. Given parameters are rounded to the segment size of the HW platform.\n" - "The supported segment size is given by the capability list by using\n" - "GSW_CAP_GET.", - /* 76: GSW_QOS_WRED_CFG_SET */ - "Configures the global WRED drop probability profile and thresholds of the\n" - "device. Given parameters are rounded to the segment size of the HW platform.\n" - "The supported segment size is given by the capability list by using\n" - "GSW_CAP_GET.\n" - "\nParameter:\n----------\n" - "eProfile :\n" - "\tDrop Probability Profile.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Pmin = 25%, Pmax = 75% (default)\n" - "\n" - "\t1: Pmin = 25%, Pmax = 50%\n" - "\n" - "\t2: Pmin = 50%, Pmax = 50%\n" - "\n" - "\t3: Pmin = 50%, Pmax = 75%\n" - "\n" - "eMode :\n" - "\tAutomatic or Manual Mode of Thresholds Config.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Automatic - Adaptive Watermark Type.\n" - "\n" - "\t1: Manual Threshold Levels Type.\n" - "\n" - "eThreshMode :\n" - "\tWRED Threshold Mode Config.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Local Thresholds Mode (default)\n" - "\n" - "\t1: Global Thresholds Mode\n" - "\n" - "nRed_Min :\n" - "\tWRED Red Threshold Min [number of segments].\n" - "\n" - "nRed_Max :\n" - "\tWRED Red Threshold Max [number of segments].\n" - "\n" - "nYellow_Min :\n" - "\tWRED Yellow Threshold Min [number of segments].\n" - "\n" - "nYellow_Max :\n" - "\tWRED Yellow Threshold Max [number of segments].\n" - "\n" - "nGreen_Min :\n" - "\tWRED Green Threshold Min [number of segments].\n" - "\n" - "nGreen_Max :\n" - "\tWRED Green Threshold Max [number of segments]." - "\n", - /* 77: GSW_QOS_WRED_QUEUE_CFG_GET */ - "Read out the WRED drop thresholds for a dedicated egress queue. Given\n" - "parameters are rounded to the segment size of the HW platform. The supported\n" - "segment size is given by the capability list by using GSW_CAP_GET. The\n" - "configuration can be changed by using GSW_QOS_WRED_QUEUE_CFG_SET.\n" - "\nParameter:\n----------\n" - "nQueueId :\n" - "\tQoS queue index (zero-based counting)." - "\n", - /* 78: GSW_QOS_WRED_QUEUE_CFG_SET */ - "Configures the WRED drop thresholds for a dedicated egress queue. Given\n" - "parameters are rounded to the segment size of the HW platform. The supported\n" - "segment size is given by the capability list by using GSW_CAP_GET. The\n" - "command GSW_QOS_WRED_QUEUE_CFG_GET retrieves the current configuration.\n" - "\nParameter:\n----------\n" - "nQueueId :\n" - "\tQoS queue index (zero-based counting).\n" - "\n" - "nRed_Min :\n" - "\tWRED Red Threshold Min [number of segments].\n" - "\n" - "nRed_Max :\n" - "\tWRED Red Threshold Max [number of segments].\n" - "\n" - "nYellow_Min :\n" - "\tWRED Yellow Threshold Min [number of segments].\n" - "\n" - "nYellow_Max :\n" - "\tWRED Yellow Threshold Max [number of segments].\n" - "\n" - "nGreen_Min :\n" - "\tWRED Green Threshold Min [number of segments].\n" - "\n" - "nGreen_Max :\n" - "\tWRED Green Threshold Max [number of segments]." - "\n", - /* 79: GSW_RMON_CLEAR */ - "Clears an Ethernet port traffic statistic counter (RMON counter).\n" - "\nParameter:\n----------\n" - "nRmonId :\n" - "\tRMON Counters Identifier - Meter, Port, If, Route, etc.\n" - "eRmonType :\n" - "\tReset the RMON Counters Type.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: All RMON Types Counters (GSW_RMON_ALL_TYPE). \n" - "\n" - "\t1: All PMAC RMON Counters (GSW_RMON_PMAC_TYPE).\n" - "\n" - "\t2: Port based RMON Counters (GSW_RMON_PORT_TYPE).\n" - "\n" - "\t3: Meter based RMON Counters (GSW_RMON_METER_TYPE).\n" - "\n" - "\t4: Interface based RMON Counters(GSW_RMON_IF_TYPE).\n" - "\n" - "\t5: Route based RMON Counters (GSW_RMON_ROUTE_TYPE).\n" - "\n" - "\t6: Redirected Traffic based RMON Counters (GSW_RMON_REDIRECT_TYPE).\n" - "\n", - /* 80: GSW_RMON_PORT_GET */ - "Read out the Ethernet port statistic counter (RMON counter). The zero-based\n" - "'nPortId' structure element describes the logical/ctp/bridge switch port for the\n" - "requested statistic information.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available. This parameter specifies for which MAC port the RMON1\n" - "\tcounter is read. It has to be set by the application before calling\n" - "\tGSW_RMON_PORT_GET\n" - "ePortType :\n" - "\tPort Type. This gives information which type of port to get RMON.\n" - "\tnPortId should be based on this field.\n" - "\tThis is new in GSWIP-3.1. For GSWIP-2.1/2.2/3.0, this field is always\n" - "\tZERO (GSW_LOGICAL_PORT).\n" - "nSubIfIdGroup :\n" - "\tremarks" - "\tThis field is valid when \ref GSW_RMON_Port_cnt_t::ePortType is\n" - "\tGSW_portType_t::GSW_CTP_PORT.\n" - "\tSub interface ID group is defined for each of \ref GSW_LogicalPortMode_t.\n" - "\tFor both GSW_LOGICAL_PORT_8BIT_WLAN and\n" - "\tGSW_LOGICAL_PORT_9BIT_WLAN, this field is VAP.\n" - "\tFor GSW_LOGICAL_PORT_GPON, this field is GEM index.\n" - "\tFor GSW_LOGICAL_PORT_EPON, this field is stream index.\n" - "\tFor GSW_LOGICAL_PORT_GINT, this field is LLID.\n" - "\tFor others, this field is 0.\n" - "bPceBypass :\n" - "\tSeparate set of CTP Tx counters when PCE is bypassed. GSWIP-3.1 only\n", - /* 81: GSW_STP_BPDU_RULE_GET */ - "Read the Spanning Tree configuration. The configuration can be modified using\n" - "GSW_STP_BPDU_RULE_SET.", - /* 82: GSW_STP_BPDU_RULE_SET */ - "Set the Spanning Tree configuration. This configuration includes the filtering\n" - "of detected spanning tree packets. These packets could be redirected to one\n" - "dedicated port (e.g. CPU port) or they could be discarded. The current\n" - "configuration can be read using GSW_STP_BPDU_RULE_GET.\n" - "\nParameter:\n----------\n" - "eForwardPort :\n" - "\tFilter spanning tree packets and forward them, discard them or disable\n" - "\tthe filter.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Default; portmap is determined by the forwarding classification.\n" - "\n" - "\t1: Discard; discard packets.\n" - "\n" - "\t2: Forward to the CPU port. This requires that the CPU port is\n" - "\t\tpreviously set by calling GSW_CPU_PORT_CFG_SET.\n" - "\n" - "\t3: Forward to a port, selected by the parameter 'nForwardPortId'.\n" - "\t\tPlease note that this feature is not supported by all hardware\n" - "\t\tplatforms.\n" - "\n" - "nForwardPortId :\n" - "\tTarget port for forwarded packets; only used if selected by\n" - "\t'eForwardPort'. Forwarding is done if 'eForwardPort =\n" - "\tGSW_PORT_FORWARD_PORT'.", - /* 83: GSW_STP_PORT_CFG_GET */ - "Read out the current Spanning Tree Protocol state of an Ethernet port. This\n" - "configuration can be set using GSW_STP_PORT_CFG_SET.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 84: GSW_STP_PORT_CFG_SET */ - "Configure the Spanning Tree Protocol state of an Ethernet port. The switch\n" - "supports four Spanning Tree Port states (Disable/Discarding,\n" - "Blocking/Listening, Learning and Forwarding state) for every port, to enable\n" - "the Spanning Tree Protocol function when co-operating with software on the CPU\n" - "port. Identified Spanning Tree Protocol packets can be redirected to the CPU\n" - "port. Depending on the hardware implementation, the CPU port assignement is\n" - "fixed or can be configured using GSW_CPU_PORT_CFG_SET. The current port\n" - "state can be read back using GSW_STP_PORT_CFG_GET.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "nFId :\n" - "\tFiltering Identifier (FID) (not supported by all switches). The FID allows to keep\n" - "\t multiple STP states per physical Ethernet port. Multiple CTAG VLAN groups could be a \n" - "\tassigned to one FID and therefore share the same STP port state. Switch API ignores \n" - "\tthe FID value in case the switch device does not support it or switch CTAG VLAN \n" - "\tawareness is disabled. \n" - "\n" - "ePortState :\n" - "\tSpanning Tree Protocol state of the port.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Forwarding state. The port is allowed to transmit and receive all\n" - "\t\tpackets. Address Learning is allowed.\n" - "\n" - "\t1: Disabled/Discarding state. The port entity will not transmit and\n" - "\t\treceive any packets. Learning is disabled in this state.\n" - "\n" - "\t2: Learning state. The port entity will only transmit and receive\n" - "\t\tSpanning Tree Protocol packets (BPDU). All other packets are\n" - "\t\tdiscarded. MAC table address learning is enabled for all good\n" - "\t\tframes.\n" - "\n" - "\t3: Blocking/Listening. Only the Spanning Tree Protocol packets will be\n" - "\t\treceived and transmitted. All other packets are discarded by the\n" - "\t\tport entity. MAC table address learning is disabled in this state.", - /* 85: GSW_VERSION_GET */ - "Retrieve the version string of the currently version index. The returned\n" - "string format might vary between the device platforms used. This means that\n" - "the version information cannot be compared between different device platforms.\n" - "All returned version information is in the form of zero-terminated character\n" - "strings. The returned strings are empty ('') in case the given version index\n" - "is out of range.", - /* 86: GSW_VLAN_ID_CREATE */ - "Add a VLAN ID group to the active VLAN set of the Ethernet switch hardware.\n" - "Based on this configuration, VLAN group port members can be added using\n" - "GSW_VLAN_PORT_MEMBER_ADD. The VLAN ID configuration can be removed again\n" - "by calling GSW_VLAN_ID_DELETE.\n" - "\nParameter:\n----------\n" - "nVId :\n" - "\tVLAN ID. The valid range is from 0 to 4095. An error code is delivered\n" - "\tin case of range mismatch.\n" - "\n" - "nFId :\n" - "\tFiltering Identifier (FID) (not supported by all switches).", - /* 87: GSW_VLAN_ID_DELETE */ - "Remove a VLAN ID group from the active VLAN set of the switch hardware. The\n" - "VLAN ID group was set using GSW_VLAN_ID_CREATE. A VLAN ID group can only\n" - "be removed when no port group members are currently configured on the\n" - "hardware. This VLAN ID group membership configuration is done using\n" - "GSW_VLAN_PORT_MEMBER_ADD and can be removed again using\n" - "GSW_VLAN_PORT_MEMBER_REMOVE.\n" - "\nParameter:\n----------\n" - "nVId :\n" - "\tVLAN ID. The valid range is from 0 to 4095. An error code is delivered\n" - "\tin case of range mismatch.", - /* 88: GSW_VLAN_ID_GET */ - "Read out the FID of a given VLAN ID. This VLAN ID can be added using\n" - "GSW_VLAN_ID_CREATE. This function returns an error in case no valid\n" - "configuration is available for the given VLAN ID.\n" - "\nParameter:\n----------\n" - "nVId :\n" - "\tVLAN ID. The valid range is from 0 to 4095. An error code is delivered\n" - "\tin case of range mismatch.", - /* 89: GSW_VLAN_PORT_CFG_GET */ - "Get VLAN Port Configuration. This function returns the VLAN configuration of\n" - "the given Port 'nPortId'.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 90: GSW_VLAN_PORT_CFG_SET */ - "Set VLAN Port Configuration. This function sets the VLAN configuration of the\n" - "given Port 'nPortId'.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "nPortVId :\n" - "\tPort VLAN ID (PVID). The software shall ensure that the used VLAN has\n" - "\tbeen configured in advance on the hardware by using\n" - "\tGSW_VLAN_ID_CREATE.\n" - "\n" - "bVLAN_UnknownDrop :\n" - "\tDrop ingress VLAN-tagged packets if the VLAN ID is not listed in the\n" - "\tactive VLAN set. If disabled, all incoming VLAN-tagged packets are\n" - "\tforwarded using the FID tag members and the port members of the PVID.\n" - "\n" - "bVLAN_ReAssign :\n" - "\tReassign all ingress VLAN tagged packets to the port-based VLAN ID\n" - "\t(PVID).\n" - "\n" - "eVLAN_MemberViolation :\n" - "\tVLAN ingress and egress membership violation mode. Allows admittance\n" - "\tof VLAN-tagged packets where the port is not a member of the VLAN ID\n" - "\tcarried in the received and sent packet.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: No VLAN member violation. Ingress and egress packets violating the\n" - "\t\tmembership pass and are not filtered out.\n" - "\n" - "\t1: VLAN member violation for ingress packets. Ingress packets\n" - "\t\tviolating the membership are filtered out. Egress packets violating\n" - "\t\tthe membership are not filtered out.\n" - "\n" - "\t2: VLAN member violation for egress packets. Egress packets violating\n" - "\t\tthe membership are filtered out. Ingress packets violating the\n" - "\t\tmembership are not filtered out.\n" - "\n" - "\t3: VLAN member violation for ingress and egress packets. Ingress and\n" - "\t\tegress packets violating the membership are filtered out.\n" - "\n" - "eAdmitMode :\n" - "\tIngress VLAN-tagged or untagged packet filter configuration.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Admit all. Tagged and untagged packets are allowed.\n" - "\n" - "\t1: Untagged packets only (not supported yet). Tagged packets are\n" - "\t\tdropped.\n" - "\n" - "\t2: Tagged packets only. Untagged packets are dropped.\n" - "\n" - "bTVM :\n" - "\tTransparent VLAN Mode (TVM). All packets are handled as untagged\n" - "\tpackets. Any existing tag is ignored and treated as packet payload.", - /* 91: GSW_VLAN_PORT_MEMBER_ADD */ - "Add Ethernet port to port members of a given VLAN group. The assignment can be\n" - "removed using GSW_VLAN_PORT_MEMBER_REMOVE.\n" - "\nParameter:\n----------\n" - "nVId :\n" - "\tVLAN ID. The valid range is from 0 to 4095. An error code is delivered\n" - "\tin case of range mismatch.\n" - "\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "bVLAN_TagEgress :\n" - "\tTag Member Egress. Enable egress tag-based support. If enabled, all\n" - "\tport egress traffic from this VLAN group carries a VLAN group tag.", - /* 92: GSW_VLAN_PORT_MEMBER_READ */ - "Read out all given VLAN group port memberships. Every command call returns one\n" - "VLAN and port membership pair with the corresponding egress traffic tag\n" - "behavior. Call the command in a loop till Switch API sets the 'bLast' variable\n" - "to read all VLAN port memberships. Please set the 'bInitial' parameter for the\n" - "first call starting the read operation at the beginning of the VLAN table.", - /* 93: GSW_VLAN_PORT_MEMBER_REMOVE */ - "Remove Ethernet port from port members of a given VLAN group. This assignment\n" - "was done using GSW_VLAN_PORT_MEMBER_ADD.\n" - "\nParameter:\n----------\n" - "nVId :\n" - "\tVLAN ID. The valid range is from 0 to 4095. An error code is delivered\n" - "\tin case of range mismatch. If the selected VLAN ID is not found in the\n" - "\tvLAN table, an error code is delivered.\n" - "\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available." - "\n", - /* 94: GSW_VLAN_MEMBER_INIT */ - "Initializes the VLAN membership and the egress tagged portmap of all VLAN groups.\n" - "\nParameter:\n----------\n" - "nPortMemberMap :\n" - "\tPortmap field of the uninitialized VLAN groups.\n" - "\n" - "nEgressTagMap :\n" - "\tEgress tagmap field of the uninitialized VLAN groups.\n" - "\n", - /* 95: GSW_VLAN_RESERVED_ADD */ - "Add VLAN ID to a reserved VLAN list. The switch supports replacing the VID of\n" - "received packets with the PVID of the receiving port. This function adds a VID\n" - "to the list of VIDs to replace. All switch devices support adding VID=0, VID=1\n" - "and VID=FFF to be replaced. Some devices also allow adding other VIDs to be\n" - "replaced. An added VID could be removed again by calling\n" - "GSW_VLAN_RESERVED_REMOVE. This configuration applies to the whole switch\n" - "device.\n" - "\nParameter:\n----------\n" - "nVId :\n" - "\tVID of the received packet to be replaced by the PVID. The valid range\n" - "\tis from 0 to 4095. An error code is delivered in case of range\n" - "\tmismatch.", - /* 96: GSW_VLAN_RESERVED_REMOVE */ - "Remove VLAN ID from a reserved VLAN group list. This function removes a VID\n" - "replacement configuration from the switch hardware. This replacement\n" - "configuration replaces the VID of received packets with the PVID of the\n" - "receiving port. This configuration can be added using\n" - "GSW_VLAN_RESERVED_ADD. This configuration applies to the whole switch\n" - "device.\n" - "\nParameter:\n----------\n" - "nVId :\n" - "\tVID of the received packet to be replaced by the PVID. The valid range\n" - "\tis from 0 to 4095. An error code is delivered in case of range\n" - "\tmismatch.", - /* 97: GSW_WOL_CFG_GET */ - "Read the Wake-on-LAN configuration. The parameters can be modified using\n" - "GSW_WOL_CFG_SET.", - /* 98: GSW_WOL_CFG_SET */ - "Set the Wake-on-LAN configuration. The parameters can be read using\n" - "GSW_WOL_CFG_GET.\n" - "\nParameter:\n----------\n" - "nWolMAC :\n" - "\tWoL MAC address.\n" - "\tSupported Formats: 12:34:45:67:89:0A" - "\n" - "nWolPassword :\n" - "\tWoL password.\n" - "\n" - "bWolPasswordEnable :\n" - "\tWoL password enable.", - /* 99: GSW_WOL_PORT_CFG_GET */ - "Read out the current status of the Wake-On-LAN feature on a dedicated port.\n" - "This status can be changed using GSW_WOL_PORT_CFG_SET. The Wake-On-LAN\n" - "specific parameter can be configured using GSW_WOL_CFG_SET.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 100: GSW_WOL_PORT_CFG_SET */ - "Set the current Wake-On-LAN status for a dedicated port. The Wake-On-LAN\n" - "specific parameter can be configured using GSW_WOL_CFG_SET.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "bWakeOnLAN_Enable :\n" - "\tEnable Wake-on-LAN.", - /* 101: GSW_IRQ_GET */ - "Read the interrupt status. Interrupt status indications can be cleared using\n" - "GSW_IRQ_STATUS_CLEAR.", - /* 102: GSW_IRQ_MASK_GET */ - "Get the interrupt enable configuration. This assignment can be set using\n" - "GSW_IRQ_MASK_SET.", - /* 103: GSW_IRQ_MASK_SET */ - "Set the interrupt enable configuration. This assignment can be read using\n" - "GSW_IRQ_MASK_GET. Setting interrupts that are not supported by hardware\n" - "results in an error response.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available. This port parameter is needed for some interrupts that\n" - "\tare specified by 'nIrqSrc'. For all other interrupts, this parameter\n" - "\tis \"don't care\".\n" - "\n" - "eIrqSrc :\n" - "\tInterrupt source.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Wake-on-LAN Interrupt. The parameter 'nPortId' specifies the\n" - "\t\trelative MAC port.\n" - "\n" - "\t1: Port Limit Alert Interrupt. This interrupt is asserted when the\n" - "\t\tnumber of learned MAC addresses exceeds the configured limit for\n" - "\t\tthe ingress port. The parameter 'nPortId' specifies the relative\n" - "\t\tMAC port.\n" - "\n" - "\t2: Port Lock Alert Interrupt. This interrupt is asserted when a source\n" - "\t\tMAC address is learned on a locked port and is received on another\n" - "\t\tport. The parameter 'nPortId' specifies the relative MAC port.", - /* 104: GSW_IRQ_STATUS_CLEAR */ - "Clear individual interrupt status bits. Interrupt status indications can be\n" - "read using GSW_IRQ_GET.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available. This port parameter is needed for some interrupts that\n" - "\tare specified by 'nIrqSrc'. For all other interrupts, this parameter\n" - "\tis \"don't care\".\n" - "\n" - "eIrqSrc :\n" - "\tInterrupt source.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Wake-on-LAN Interrupt. The parameter 'nPortId' specifies the\n" - "\t\trelative MAC port.\n" - "\n" - "\t1: Port Limit Alert Interrupt. This interrupt is asserted when the\n" - "\t\tnumber of learned MAC addresses exceeds the configured limit for\n" - "\t\tthe ingress port. The parameter 'nPortId' specifies the relative\n" - "\t\tMAC port.\n" - "\n" - "\t2: Port Lock Alert Interrupt. This interrupt is asserted when a source\n" - "\t\tMAC address is learned on a locked port and is received on another\n" - "\t\tport. The parameter 'nPortId' specifies the relative MAC port.", - /* 105: GSW_PCE_RULE_DELETE */ - "This command deletes a complete rule from the packet classification engine. A\n" - "delete operation is done on the rule of a dedicated index 'nIndex'. A rule can\n" - "be written over using the command GSW_PCE_RULE_WRITE.\n" - "\nParameter:\n----------\n" - "nIndex :\n" - "\tAction Index in the Packet Classification Engine. It corresponds to\n" - "\tthe table rule index." - "\n", - /* 106: GSW_PCE_RULE_READ */ - "This command allows to read out a rule pattern and action of the packet\n" - "classification engine. A rule could be written by the command\n" - "GSW_PCE_RULE_WRITE.\n" - "Parameter:\n----------\n" - "pattern.nIndex :\n" - "\tTable index" - "\n", - /* 107: GSW_PCE_RULE_WRITE */ - "This command writes a rule pattern and action to the table of the packet\n" - "classification engine. The pattern part describes the parameter to identify an\n" - "incoming packet to which the dedicated actions should be applied. A rule can\n" - "be read using the command GSW_PCE_RULE_READ.\n" - "Rule Pattern Part.\n" - "\nParameter:\n----------\n" - "pattern.nIndex :\n" - "\tPCE Rule Index (Upto 512 rules supported in GSWIP-3.0)\n" - "\n" - "pattern.bEnable :\n" - "\tIndex is used (enabled) or set to unused (disabled)\n" - "\n" - "pattern.bPortIdEnable :\n" - "\tPort ID used\n" - "\n" - "pattern.nPortId :\n" - "\tPort ID\n" - "\n" - "pattern.bPortId_Exclude :\n" - "\tExclude Port Id Value - used for GSWIP-3.0 only\n" - "\n" - - "pattern.bSubIfIdEnable :\n" - "\tSub-Interface ID - used for GSWIP-3.0 only\n" - "\n" - "pattern.nSubIfId :\n" - "\tSub-Interface ID value - used for GSWIP-3.0 only \n" - "\n" - "pattern.bSubIfId_Exclude :\n" - "\tExclude Sub-Interface Id Value - used for GSWIP-3.0 only\n" - "\n" - - "pattern.bDSCP_Enable :\n" - "\tDSCP value used (Outer for GSWIP-3.0)\n" - "\n" - "pattern.nDSCP :\n" - "\tDSCP value (Outer for GSWIP-3.0)\n" - "\n" - "pattern.bDSCP_Exclude :\n" - "\tExclude (Outer) DSCP value used for GSWIP-3.0 only\n" - "\n" - "pattern.bInner_DSCP_Enable :\n" - "\tInner DSCP value used for GSWIP-3.0 only \n" - "\n" - "pattern.nInnerDSCP :\n" - "\tInner DSCP value for GSWIP-3.0 only \n" - "\n" - "pattern.bInnerDSCP_Exclude :\n" - "\tExclude Inner DSCP value used for GSWIP-3.0 only\n" - "\n" - - "pattern.bPCP_Enable :\n" - "\tPCP value used\n" - "\n" - "pattern.nPCP :\n" - "\tPCP value\n" - "\n" - "pattern.bCTAG_PCP_DEI_Exclude :\n" - "\tExclude CTAG PCP & DEI value used for GSWIP-3.0 only\n" - "\n" - - "pattern.bSTAG_PCP_DEI_Enable :\n" - "\tSTAG VLAN PCP/DEI value used \n" - "\n" - "pattern.nSTAG_PCP_DEI :\n" - "\tSTAG VLAN PCP value\n" - "\n" - - "pattern.bSTAG_PCP_DEI_Exclude :\n" - "\tExclude STAG PCP & DEI value used for GSWIP-3.0 only\n" - "\n" - - "pattern.bPktLngEnable :\n" - "\tPacket length used\n" - "\n" - "pattern.nPktLng :\n" - "\tPacket length\n" - "\n" - "pattern.nPktLngRange :\n" - "\tPacket length Range (from nPktLng to nPktLngRange)\n" - "\n" - - "pattern.bPktLng_Exclude :\n" - "\tExclude Packet Length or range value used for GSWIP-3.0 only \n" - "\n" - - "pattern.bMAC_DstEnable :\n" - "\tDestination MAC address used\n" - "\n" - "pattern.nMAC_Dst :\n" - "\tDestination MAC address\n" - "\tSupported Formats: 12:34:45:67:89:0A" - "\n" - "pattern.nMAC_DstMask :\n" - "\tDestination MAC address mask. Please clear the bits of the nibbles\n" - "\tthat are not marked out and set all other bits. The LSB bit represents\n" - "\tthe lowest data nibble, the next bit the next nibble, and so on.\n" - "\n" - - "pattern.bDstMAC_Exclude :\n" - "\tExclude Destination MAC Address used for GSWIP-3.0 only \n" - "\n" - - "pattern.bMAC_SrcEnable :\n" - "\tSource MAC address used\n" - "\n" - "pattern.nMAC_Src :\n" - "\tSource MAC address\n" - "\tSupported Formats: 12:34:45:67:89:0A" - "\n" - "pattern.nMAC_SrcMask :\n" - "\tSource MAC address mask. Please clear the bits of the nibbles that are\n" - "\tnot marked out and set all other bits. The LSB bit represents the\n" - "\tlowest data nibble, the next bit the next nibble, and so on.\n" - "\n" - - "pattern.bSrcMAC_Exclude :\n" - "\tExclude Source MAC Address used for GSWIP-3.0 only \n" - "\n" - - "pattern.bAppDataMSB_Enable :\n" - "\tMSB Application field used\n" - "\n" - "pattern.nAppDataMSB :\n" - "\tMSB Application field. The first 2 bytes of the packet content\n" - "\tfollowing the IP header for TCP/UDP packets (source port field), or\n" - "\tthe first 2 bytes of packet content following the Ethertype for non-IP\n" - "\tpackets. Any part of this content can be masked-out by a programmable\n" - "\tbit mask 'nAppMaskRangeMSB'.\n" - "\n" - "pattern.bAppMaskRangeMSB_Select :\n" - "\tMSB Application mask/range selection. If set to 1, the field\n" - "\t'nAppMaskRangeMSB' is used as a range parameter, otherwise it is used\n" - "\tas a nibble mask field.\n" - "\n" - "pattern.nAppMaskRangeMSB :\n" - "\tMSB Application mask/range. When used as a range parameter, 1 bit\n" - "\trepresents 1 nibble mask of the 'nAppDataMSB' field. Please clear the\n" - "\tbits of the nibbles that are not marked out and set all other bits.\n" - "\tThe LSB bit represents the lowest data nibble, the next bit the next\n" - "\tnibble, and so on.\n" - "\n" - - "pattern.bAppMSB_Exclude :\n" - "\tMSB Application Data Exclude - for GSWIP-3.0 only \n" - "\n" - - "pattern.bAppDataLSB_Enable :\n" - "\tLSB Application used\n" - "\n" - "pattern.nAppDataLSB :\n" - "\tLSB Application field. The following 2 bytes of the packet behind the\n" - "\t'nAppDataMSB' field. This is the destination port field for TCP/UDP\n" - "\tpackets, or byte 3 and byte 4 of the packet content following the\n" - "\tEthertype for non-IP packets. Any part of this content can be\n" - "\tmasked-out by a programmable bit mask 'nAppMaskRangeLSB'.\n" - "\n" - "pattern.bAppMaskRangeLSB_Select :\n" - "\tLSB Application mask/range selection. If set to 1, the field\n" - "\t'nAppMaskRangeLSB' is used as a range parameter, otherwise it is used\n" - "\tas a nibble mask field.\n" - "\n" - "pattern.nAppMaskRangeLSB :\n" - "\tLSB Application mask/range. When used as a range parameter, 1 bit\n" - "\trepresents 1 nibble mask of the 'nAppDataLSB' field. Please clear the\n" - "\tbits of the nibbles that are not marked out and set all other bits.\n" - "\tThe LSB bit represents the lowest data nibble, the next bit the next\n" - "\tnibble, and so on.\n" - "\n" - - "pattern.bAppLSB_Exclude :\n" - "\tLSB Application Data Exclude - for GSWIP-3.0 only \n" - "\n" - - "pattern.eDstIP_Select :\n" - "\tDestination IP Selection (Outer for GSWIP-3.0).\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Rule Pattern for IP selection disabled.\n" - "\n" - "\t1: Rule Pattern for IPv4.\n" - "\n" - "\t2: Rule Pattern for IPv6.\n" - "\n" - "pattern.nDstIP :\n" - "\tDestination IP (Outer for GSWIP-3.0)\n" - "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." - "\n" - "pattern.nDstIP_Mask :\n" - "\tDestination IP Nibble Mask. 1 bit represents 1 nibble mask of the 'nDstIP' field.\n" - "\tPlease clear the bits of the nibbles that are not marked out and set\n" - "\tall other bits. The LSB bit represents the lowest data nibble, the\n" - "\tnext bit the next nibble, and so on.\n" - "\n" - "pattern.bDstIP_Exclude :\n" - "\tExclude Destination IP Value - used for GSWIP-3.0 only\n" - "\n" - - "pattern.eInnerDstIP_Select :\n" - "\tInner Destination IP Selection - for GSWIP-3.0 only. \n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Rule Pattern for IP selection disabled.\n" - "\n" - "\t1: Rule Pattern for IPv4.\n" - "\n" - "\t2: Rule Pattern for IPv6.\n" - "\n" - "pattern.nInnerDstIP :\n" - "\tInner Destination IP - for GSWIP-3.0 only.\n" - "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." - "\n" - "pattern.nInnerDstIP_Mask :\n" - "\tInner Destination IP Nibble Mask - for GSWIP-3.0 only. 1 bit represents 1 nibble mask of the 'nInnerDstIP' field.\n" - "\tPlease clear the bits of the nibbles that are not marked out and set\n" - "\tall other bits. The LSB bit represents the lowest data nibble, the\n" - "\tnext bit the next nibble, and so on.\n" - "\n" - "pattern.bInnerDstIP_Exclude :\n" - "\tExclude Destination IP Value - used for GSWIP-3.0 only\n" - "\n" - - "pattern.eSrcIP_Select :\n" - "\tSource IP Selection (Outer for GSWIP-3.0).\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Rule Pattern for IP selection disabled.\n" - "\n" - "\t1: Rule Pattern for IPv4.\n" - "\n" - "\t2: Rule Pattern for IPv6.\n" - "\n" - "pattern.nSrcIP :\n" - "\tSource IP (Outer for GSWIP-3.0).\n" - "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." - "\n" - "pattern.nSrcIP_Mask :\n" - "\tSource IP Nibble Mask (Outer for GSWIP-3.0). 1 bit represents 1 nibble mask of the 'nSrcIP' field.\n" - "\tPlease clear the bits of the nibbles that are not marked out and set\n" - "\tall other bits. The LSB bit represents the lowest data nibble, the\n" - "\tnext bit the next nibble, and so on.\n" - "\n" - - "pattern.bSrcIP_Exclude :\n" - "\tExclude Source IP Value - used for GSWIP-3.0 only\n" - "\n" - - "pattern.eInnerSrcIP_Select :\n" - "\tInner Source IP Selection - for GSWIP-3.0 only.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Rule Pattern for IP selection disabled.\n" - "\n" - "\t1: Rule Pattern for IPv4.\n" - "\n" - "\t2: Rule Pattern for IPv6.\n" - "\n" - "pattern.nInnerSrcIP :\n" - "\tInner Source IP - for GSWIP-3.0 only.\n" - "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." - "\n" - "pattern.nInnerSrcIP_Mask :\n" - "\tInner Src IP Nibble Mask - for GSWIP-3.0 only.. 1 bit represents 1 nibble mask of the 'nInnerSrcIP' field.\n" - "\tPlease clear the bits of the nibbles that are not marked out and set\n" - "\tall other bits. The LSB bit represents the lowest data nibble, the\n" - "\tnext bit the next nibble, and so on.\n" - "\n" - - "pattern.bInnerSrcIP_Exclude :\n" - "\tExclude Inner Source IP Value - used for GSWIP-3.0 only \n" - "\n" - - - "pattern.bEtherTypeEnable :\n" - "\tEthertype used.\n" - "\n" - "pattern.nEtherType :\n" - "\tEthertype\n" - "\n" - "pattern.nEtherTypeMask :\n" - "\tEthertype Mask. 1 bit represents 1 nibble mask of the 'nEtherType'\n" - "\tfield. Please clear the bits of the nibbles that are not marked out\n" - "\tand set all other bits. The LSB bit represents the lowest data nibble,\n" - "\tthe next bit the next nibble, and so on.\n" - "\n" - - "pattern.bEtherType_Exclude :\n" - "\tExclude for Ether Type Value - used for GSWIP-3.0 only.\n" - "\n" - - - "pattern.bProtocolEnable :\n" - "\tIP protocol used\n" - "\n" - "pattern.nProtocol :\n" - "\tIP protocol\n" - "\n" - "pattern.nProtocolMask :\n" - "\tIP protocol Mask. 1 bit represents 1 nibble mask of the 'nProtocol'\n" - "\tfield. Please clear the bits of the nibbles that are not marked out\n" - "\tand set all other bits. The LSB bit represents the lowest data nibble,\n" - "\tthe next bit the next nibble, and so on.\n" - "\n" - "pattern.bProtocol_Exclude :\n" - "\tExclude for IP Protocol Value - used for GSWIP-3.0 only.\n" - "\n" - - "pattern.bInnerProtocolEnable :\n" - "\tInner IP protocol used - for GSWIP-3.0 only\n" - "\n" - "pattern.nInnerProtocol :\n" - "\tInner IP protocol Value - for GSWIP-3.0 only.\n" - "\n" - "pattern.nInnerProtocolMask :\n" - "\tInner IP protocol Bit Mask - for GSWIP-3.0 only.. 1 bit represents 1 nibble mask of the 'nInnerProtocol'\n" - "\tfield. Please clear the bits of the nibbles that are not marked out\n" - "\tand set all other bits. The LSB bit represents the lowest data nibble,\n" - "\tthe next bit the next nibble, and so on.\n" - "\n" - "pattern.bInnerProtocol_Exclude :\n" - "\tExclude for Inner IP Protocol Value - used for GSWIP-3.0 only.\n" - "\n" - - "pattern.bSessionIdEnable :\n" - "\tPPPoE used.\n" - "\n" - "pattern.nSessionId :\n" - "\tPPPoE\n" - "\n" - - "pattern.bSessionId_Exclude :\n" - "\tExclude for PPPoE Session Value - used for GSWIP-3.0 only.\n" - "\n" - - "pattern.bPPP_ProtocolEnable :\n" - "\tPPP Protocol used - used for GSWIP-3.0 only.\n" - "\n" - "pattern.nPPP_Protocol :\n" - "\tPPP Protocol Value - used for GSWIP-3.0 only.\n" - "\n" - "pattern.nPPP_ProtocolMask :\n" - "\tPPP protocol Bit Mask - for GSWIP-3.0 only. 1 bit represents 1 nibble mask of the 'nPPP_Protocol'\n" - "\tfield. Please clear the bits of the nibbles that are not marked out\n" - "\tand set all other bits. The LSB bit represents the lowest data nibble,\n" - "\tthe next bit the next nibble, and so on.\n" - "\n" - "pattern.bPPP_Protocol_Exclude :\n" - "\tExclude for PPP Protocol Value - used for GSWIP-3.0 only.\n" - "\n" - - - "pattern.bVid :\n" - "\tVLAN ID used.\n" - "\n" - "pattern.nVid :\n" - "\tVLAN ID\n" - "\n" - - "pattern.bVidRange_Select :\n" - "\tVid mask/range selection - used for GSWIP-3.0 only. \n" - "\n" - "pattern.nVidRange :\n" - "\tVLAN ID Range(CVID) - used for GSWIP-3.0 only.\n" - "\n" - - "pattern.bVid_Exclude :\n" - "\tExclude for VLAN Id (CVLAN) - used for GSWIP-3.0 only. \n" - "\n" - - "pattern.bSLAN_Vid :\n" - "\tSTAG VLAN ID used.\n" - "\n" - "pattern.nSLAN_Vid :\n" - "\tSTAG VLAN ID\n" - "\n" - - "pattern.bSLANVid_Exclude :\n" - "\tExclude for SVLAN Id (SVLAN) - used for GSWIP-3.0 only.\n" - "\n" - - "pattern.bVid_Original :\n" - "\tbVid_Original\n" - "\n" - - "pattern.nOuterVidRange :\n" - "\tnOuterVidRange\n" - "\n" - - "pattern.bSVidRange_Select :\n" - "\tbSVidRange_Select\n" - "\n" - - "pattern.bOuterVid_Original :\n" - "\tbOuterVid_Original\n" - "\n" - - "pattern.bPayload1_SrcEnable :\n" - "\tPayload-1 used - for GSWIP-3.0 PAE only .\n" - "\n" - "pattern.nPayload1 :\n" - "\tPayload-1 Value (16-bits) - for GSWIP-3.0 PAE only.\n" - "\n" - "pattern.bPayload1MaskRange_Select :\n" - "\tPayload-1 mask select used - for GSWIP-3.0 PAE only .\n" - "\n" - "pattern.nPayload1_Mask :\n" - "\tPayload-1 Bit mask - for GSWIP-3.0 PAE only. 1 bit represents 1 nibble mask of the 'nPayload1'\n" - "\tfield. Please clear the bits of the nibbles that are not marked out\n" - "\tand set all other bits. The LSB bit represents the lowest data nibble,\n" - "\tthe next bit the next nibble, and so on.\n" - "\n" - "pattern.bPayload1_Exclude :\n" - "\tExclude Payload-1 used for GSWIP-3.0 PAE only.\n" - "\n" - - "pattern.bPayload2_SrcEnable :\n" - "\tPayload-2 used - for GSWIP-3.0 PAE only.\n" - "\n" - "pattern.nPayload2 :\n" - "\tPayload-2 Value (16-bits) - for GSWIP-3.0 PAE only.\n" - "\n" - "pattern.bPayload2MaskRange_Select :\n" - "\tPayload-2 mask select used - for GSWIP-3.0 PAE only .\n" - "\n" - "pattern.nPayload2_Mask :\n" - "\tPayload-2 Bit mask - for GSWIP-3.0 PAE only. 1 bit represents 1 nibble mask of the 'nPayload2'\n" - "\tfield. Please clear the bits of the nibbles that are not marked out\n" - "\tand set all other bits. The LSB bit represents the lowest data nibble,\n" - "\tthe next bit the next nibble, and so on.\n" - "\n" - "pattern.bPayload2_Exclude :\n" - "\tExclude Payload-2 used for GSWIP-3.0 PAE only.\n" - "\n" - - "pattern.bParserFlagLSB_Enable :\n" - "\tParser Flag LSB (Bit 15 to 0) is used\n" - "\n" - "pattern.nParserFlagLSB :\n" - "\tParser Flag LSB Value \n" - "\n" - "pattern.nParserFlagLSB_Mask :\n" - "\tParser Flag LSB Mask Value \n" - "\n" - "pattern.bParserFlagLSB_Exclude :\n" - "\tExclude for Parser Flag LSB.\n" - "\n" - - "pattern.bParserFlagMSB_Enable :\n" - "\tParser Flag MSB (Bit 31 to 16) is used\n" - "\n" - "pattern.nParserFlagMSB :\n" - "\tParser Flag MSB Value.\n" - "\n" - "pattern.nParserFlagMSB_Mask :\n" - "\tParser Flag MSB Mask Value \n" - "\n" - "pattern.bParserFlagMSB_Exclude :\n" - "\tExclude for Parser Flag MSB.\n" - "\n" - - "pattern.bParserFlag1LSB_Enable :\n" - "\tParser Flag1 LSB (Bit 47 to 32) is used\n" - "\n" - "pattern.nParserFlag1LSB :\n" - "\tParser Flag1 LSB Value \n" - "\n" - "pattern.nParserFlag1LSB_Mask :\n" - "\tParser Flag1 LSB Mask Value \n" - "\n" - "pattern.bParserFlag1LSB_Exclude :\n" - "\tExclude for Parser Flag1 LSB.\n" - "\n" - - "pattern.bParserFlag1MSB_Enable :\n" - "\tParser Flag1 MSB (Bit 63 to 48) is used\n" - "\n" - "pattern.nParserFlag1MSB :\n" - "\tParser Flag1 MSB Value.\n" - "\n" - "pattern.nParserFlag1MSB_Mask :\n" - "\tParser Flag1 MSB Mask Value \n" - "\n" - "pattern.bParserFlag1MSB_Exclude :\n" - "\tExclude for Parser Flag1 MSB.\n" - "\n" - - "Rule Action Part.\n" - "action.eTrafficClassAction :\n" - "\tAction \"Traffic Class\" Group. Traffic class action enable\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Disabled. Traffic class action is disabled.\n" - "\n" - "\t1: Regular Class. Traffic class action is enabled and the CoS\n" - "\t\tclassification traffic class is used.\n" - "\n" - "\t2: Alternative Class. Traffic class action is enabled and the class of\n" - "\t\tthe 'nTrafficClassAlter' field is used.\n" - "\n" - "action.nTrafficClassAlternate :\n" - "\tAlternative Traffic class\n" - "\n" - "action.eSnoopingTypeAction :\n" - "\tAction \"IGMP Snooping\" Group. IGMP Snooping control and enable. Please\n" - "\tnote that the 'nPortMapAction' configuration is ignored in case the\n" - "\tIGMP snooping is enabled. Here, on read operations, 'nPortMapAction =\n" - "\tGSW_PCE_ACTION_PORTMAP_DISABLE' is returned.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Disabled. IGMP Snooping is disabled.\n" - "\n" - "\t1: Default. Regular Packet. No IGMP Snooping action required.\n" - "\n" - "\t2: IGMP Report/Join Message.\n" - "\n" - "\t3: IGMP Leave Message.\n" - "\n" - "\t4: Router Solicitation/Advertisement message.\n" - "\n" - "\t5: IGMP Query Message.\n" - "\n" - "\t6: IGMP Group Specific Query Message.\n" - "\n" - "\t7: IGMP General Query message without Router Solicitation.\n" - "\n" - "action.eLearningAction :\n" - "\tAction \"Learning\" Group. Learning action control and enable\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: MAC Address Learning action is disabled. MAC address learning is\n" - "\t\tnot influenced by this rule.\n" - "\n" - "\t1: Learning is based on the forwarding decision. If the packet is\n" - "\t\tdiscarded, the address is not learned. If the packet is forwarded\n" - "\t\tto any egress port, the address is learned.\n" - "\n" - "\t2: Force No Learning. The address is not learned; forwarding decision\n" - "\t\tignored.\n" - "\n" - "\t3: Force Learning. The address is learned, the forwarding decision\n" - "\t\tignored. Note: The MAC Learning Control signals delivered to\n" - "\t\tPort-Map filtering and combined with Final Forwarding Decision. The\n" - "\t\tresult is used as a feedback for MAC Address learning in the\n" - "\t\tBridging Table.\n" - "\n" - "action.eIrqAction :\n" - "\tAction \"Interrupt\" Group. Interrupt action generate and enable\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Disabled. Interrupt Control Action is disabled for this rule.\n" - "\n" - "\t1: Regular Packet. The Interrupt Control Action is enabled, the packet\n" - "\t\tis treated as a regular packet and no interrupt event is generated.\n" - "\n" - "\t2: Interrupt Event. The Interrupt Control Action is enabled and an\n" - "\t\tinterrupt event is generated.\n" - "\n" - "action.eCrossStateAction :\n" - "\tAction \"Cross State\" Group. Cross state action control and enable\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Disable. The Cross State Action is disabled.\n" - "\n" - "\t1: Regular Packet. The Cross State Action is enabled and the packet is\n" - "\t\ttreated as a non-Cross-State packet (regular packet). Therefore it\n" - "\t\tdoes not ignore Port-State filtering rules.\n" - "\n" - "\t2: Cross-State packet. The Cross State Action is enabled and the\n" - "\t\tpacket is treated as a Cross-State packet. It ignores the\n" - "\t\tPort-State filtering rules.\n" - "\n" - "action.eCritFrameAction :\n" - "\tAction \"Critical Frames\" Group. Critical Frame action control and\n" - "\tenable\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Disable. The Critical Frame Action is disabled.\n" - "\n" - "\t1: Regular Packet. The Critical Frame Action is enabled and the packet\n" - "\t\tis treated as a non-Critical Frame.\n" - "\n" - "\t2: Critical Packet. The Critical Frame Action is enabled and the\n" - "\t\tpacket is treated as a Critical Frame.\n" - "\n" - "action.eTimestampAction :\n" - "\tAction \"Timestamp\" Group. Time stamp action control and enable\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Disable. Timestamp Action is disabled for this rule.\n" - "\n" - "\t1: Regular Packet. The Timestamp Action is enabled for this rule. The\n" - "\t\tpacket is treated as a regular packet and no timing information is\n" - "\t\tstored.\n" - "\n" - "\t2: Receive/Transmit Timing packet. Ingress and Egress Timestamps for\n" - "\t\tthis packet should be stored.\n" - "\n" - "action.ePortMapAction :\n" - "\tAction \"Forwarding\" Group. Port map action enable. This port\n" - "\tforwarding configuration is ignored in case the action \"IGMP Snooping\"\n" - "\tis enabled via the parameter 'nSnoopingTypeAction'.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Disable. Forwarding Group Action is disabled.\n" - "\n" - "\t1: Regular Packet. Forwarding Action enabled. Select Default Port-Map\n" - "\t\t(result of Default Forwarding Classification).\n" - "\n" - "\t2: Discard. Discard the packets.\n" - "\n" - "\t3: Forward to the CPU port. This requires that the CPU port is\n" - "\t\tpreviously set by calling GSW_CPU_PORT_CFG_SET.\n" - "\n" - "\t4: Forward to a portmap, selected by the parameter 'nForwardPortMap'.\n" - "\t\tPlease note that this feature is not supported by all hardware\n" - "\t\tplatforms.\n" - "\n" - "\t5: The packet is treated as Multicast Router\n" - "\t\tSolicitation/Advertisement or Query packet.\n" - "\n" - "\t6: The packet is interpreted as Multicast packet and learned in the\n" - "\t\tmulticast group table.\n" - "\n" - - "\t7: The CTAG VLAN portmap classification result is replaced by the \n" - "\t\tportmap parameter 'nForwardPortMap'. All other classification\n" - "\t\tresults stay unchanged and will be combined together with\n" - "\t\tthe overwritten portmap.\n" - "\n" - "\t8: Add STAG VLAN portmap 'nForwardPortMap' to the overall portmap\n" - "\t\tclassification result (AND'ed with the portmap).\n" - "\n" - "action.nForwardPortMap :\n" - "\tTarget portmap for forwarded packets, only used if selected by\n" - "\t'nPortMapAction'. Forwarding is done if 'nPortMapAction =\n" - "\tGSW_PCE_ACTION_PORTMAP_ALTERNATIVE'. Every bit in the portmap\n" - "\trepresents one port (port 0 = LSB bit).\n" - "\n" - - "action.nForwardSubIfId :\n" - "\tTarget Sub-Interface Id (GSWIP-3.0 only) for forwarded packets,\n" - "\tonly used if selected by 'ePortMapAction'. Forwarding is done" - "\tif 'ePortMapAction = GSW_PCE_ACTION_PORTMAP_ALTERNATIVE'.\n" - "\n" - - - "action.bRemarkAction :\n" - "\tAction \"Remarking\" Group. Remarking action enable\n" - "\n" - "action.bRemarkPCP :\n" - "\tPCP remarking enable. Remarking enabling means that remarking is\n" - "\tpossible in case the port configuration or metering enables remarking\n" - "\ton that packet. Disabling remarking means that it is forced to not\n" - "\tremarking this packet, independent of any port remarking of metering\n" - "\tconfiguration.\n" - "\n" - - "action.bRemarkSTAG_PCP :\n" - "\tSTAG VLAN PCP remarking enable. Remarking enabling means that remarking is\n" - "\tpossible in case the port configuration or metering enables remarking\n" - "\ton that packet. Disabling remarking means that it is forced to not\n" - "\tremarking this packet, independent of any port remarking of metering\n" - "\tconfiguration.\n" - "\n" - "action.bRemarkSTAG_DEI :\n" - "\tSTAG VLAN DEI remarking enable. Remarking enabling means that remarking is\n" - "\tpossible in case the port configuration or metering enables remarking\n" - "\ton that packet. Disabling remarking means that it is forced to not\n" - "\tremarking this packet, independent of any port remarking of metering\n" - "\tconfiguration.\n" - "\n" - - "action.bRemarkDSCP :\n" - "\tDSCP remarking enable Remarking enabling means that remarking is\n" - "\tpossible in case the port configuration or metering enables remarking\n" - "\ton that packet. Disabling remarking means that it is forced to not\n" - "\tremarking this packet, independent of any port remarking of metering\n" - "\tconfiguration.\n" - "\n" - "action.bRemarkClass :\n" - "\tClass remarking enable Remarking enabling means that remarking is\n" - "\tpossible in case the port configuration or metering enables remarking\n" - "\ton that packet. Disabling remarking means that it is forced to not\n" - "\tremarking this packet, independent of any port remarking of metering\n" - "\tconfiguration.\n" - "\n" - "action.eMeterAction :\n" - "\tAction \"Meter\" Group. Meter action control and enable. If metering\n" - "\taction enabled, specified metering instance number overrules any other\n" - "\tmetering assignment. Up to two metering instances can be applied to a\n" - "\tsingle packet.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Action Disable.\n" - "\n" - "\t1: Action Enable. The action is enabled but no dedicated metering\n" - "\t\tinstance is assigned by the rule.\n" - "\n" - "\t2: Action Enable. Assign one meter instance as given in parameter\n" - "\t\t\"nMeterId\".\n" - "\n" - "\t3: Action Enable. Assign pair of meter instances. These instances are\n" - "\t\t\"nMeterId\" and the next following meter instance index.\n" - "\n" - "action.nMeterId :\n" - "\tMeter ID\n" - "\n" - "action.bRMON_Action :\n" - "\tAction \"RMON\" Group. RMON action enable\n" - "\n" - "action.nRMON_Id :\n" - "\tCounter ID (The index starts counting from zero).\n" - "\n" - "action.eVLAN_Action :\n" - "\tAction \"CTAG VLAN\" Group. VLAN action enable\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Disabled. The VLAN Action is disabled.\n" - "\n" - "\t1: Regular VLAN. VLAN Action enabled. Select Default VLAN ID.\n" - "\n" - "\t2: Alternative VLAN. VLAN Action enabled. Select Alternative VLAN as\n" - "\t\tconfigured in 'nVLAN_Id' or 'nSVLAN_Id'. For CTAG VLAN it requires that this \n" - "\t\tVLAN ID is configured by calling GSW_VLAN_ID_CREATE in advance.\n" - "\t\tThis additional call is not required for STAG VLAN.\n" - "\n" - "action.nVLAN_Id :\n" - "\tAlternative VLAN Id\n" - - "\n" - "action.eSVLAN_Action :\n" - "\tAction \"STAG VLAN\" Group. VLAN action enable\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Disabled. The VLAN Action is disabled.\n" - "\n" - "\t1: Regular VLAN. VLAN Action enabled. Select Default VLAN ID.\n" - "\n" - "\t2: Alternative VLAN. VLAN Action enabled. Select Alternative VLAN as\n" - "\t\tconfigured in 'nVLAN_Id' or 'nSVLAN_Id'. For CTAG VLAN it requires that this \n" - "\t\tVLAN ID is configured by calling GSW_VLAN_ID_CREATE in advance.\n" - "\t\tThis additional call is not required for STAG VLAN.\n" - "\n" - "action.nSVLAN_Id :\n" - "\t Alternative STAG VLAN Id\n" - "\n" - "action.nFId :\n" - "\tAlternative FID (not supported by all switches\n" - - "\n" - "action.eVLAN_CrossAction :\n" - "\tAction \"Cross VLAN\" Group. Cross VLAN action enable\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Disabled. The Cross VLAN Action is disabled.\n" - "\n" - "\t1: Regular VLAN Packet. Do not ignore VLAN filtering rules.\n" - "\n" - "\t2: Cross-VLAN packet. Ignore VLAN filtering rules.\n" - "\n" - - "action.bCVLAN_Ignore_Control :\n" - "\t0: Do not ignore CTAG VLAN classification.\n" - "\n" - "\t1: Ignore CTAG VLAN classification.\n" - "\n" - - "action.bPortBitMapMuxControl :\n" - "\t0: port bitmap is used for alternative port map function.\n" - "\n" - "\t1: port bitmap is used for STAG port member.\n" - "\n" - - "action.bPortTrunkAction :\n" - "\t0: action disable.\n" - "\n" - "\t1: action enable.\n" - "\n" - - "action.bPortLinkSelection :\n" - "\t0: lower port selection.\n" - "\n" - "\t1: higher port selection.\n" - "\n" - - "action.bFlowID_Action :\n" - "\tAction \"Flow ID\". The Switch supports enhancing the egress packets by\n" - "\ta device specific special tag header. This header contains detailed\n" - "\tswitch classification results. One header file is a 'Flow ID', which\n" - "\tcan be explicitly set as flow table action when hitting a table rule.\n" - "\tIf selected, the Flow ID is given by the parameter 'nFlowID'.\n" - "\n" - "action.nFlowID :\n" - "\tFlow ID" - - "action.bRoutExtId_Action :\n" - "\tRouting Extension Id Selector - for GSWIP-3.0 only.\n" - "\tWhen enabled, it expects a valid nRoutExtId value to be supplied.\n" - "\tOnly entries matching with Routing Extension value in RT \n" - "\tSession table will be subject to routing.\n" - "\n" - "action.nRoutExtId :\n" - "\tRouting Extension Id Value - for GSWIP-3.0 only. (8-bits range).\n" - "\n" - "action.bRtDstPortMaskCmp_Action :\n" - "\tRouting Destination Port Mask Comparison - for GSWIP-3.0 only.\n" - "\n" - "action.bRtSrcPortMaskCmp_Action :\n" - "\tRouting Source Port Mask Comparison - for GSWIP-3.0 only.\n" - "\n" - "action.bRtDstIpMaskCmp_Action :\n" - "\tRouting Destination IP Address Mask Comparison - for GSWIP-3.0 only.\n" - "\n" - "action.bRtSrcIpMaskCmp_Action :\n" - "\tRouting Source IP Address Mask Comparison - for GSWIP-3.0 only.\n" - "\n" - "action.bRtInnerIPasKey_Action :\n" - "\tSelector of IP in Tunneled IP header (Outer or Inner) - for GSWIP-3.0 only.\n" - "\n" - "action.bRtAccelEna_Action :\n" - "\tRouting Acceleration Enable Action - for GSWIP-3.0 only.\n" - "\n" - "action.bRtCtrlEna_Action :\n" - "\tRouting Control Enable Action - for GSWIP-3.0 only.\n" - "\n" - - "action.eProcessPath_Action :\n" - "\tAssignment of flow to Processing Path-1 or -2 - for GSWIP-3.0 only.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Processing Path is not enabled.\n" - "\n" - "\t1: Processing Path-1 is used for MPE-1.\n" - "\n" - "\t2: Processing Path-2 is used for MPE-2.\n" - "\n" - "\t3: Processing Path-1 and -2 are used for MPE-1 & MPE-2.\n" - "\n" - - "action.bOamEnable :\n" - "\tbOamEnable\n" - "action.nRecordId :\n" - "\tnRecordId\n" - "action.bExtractEnable :\n" - "\tbExtractEnable\n" - "action.eColorFrameAction :\n" - "\teColorFrameAction\n" - "action.bExtendedVlanEnable :\n" - "\tbExtendedVlanEnable\n" - "action.nExtendedVlanBlockId :\n" - "\tnExtendedVlanBlockId\n" - "\n" - - "action.ePortFilterType_Action :\n" - "\tPort Filter Action Config for this flow - for GSWIP-3.0 only.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Port Filter Action is Unused.\n" - "\n" - "\t1: Port Filter Action Type-1 is used.\n" - "\n" - "\t2: Port Filter Action Type-2 is used.\n" - "\n" - "\t3: Port Filter Action Type-3 is used.\n" - "\n" - "\t4: Port Filter Action Type-4 is used.\n" - "\n" - "\t5: Port Filter Action Type-5 (Unknown Unicast) is used.\n" - "\n" - "\t6: Port Filter Action Type-6 (Unknown Multicast) is used.\n" - "\n" - "\n", - /* 108: GSW_REGISTER_GET */ - "Read an internal register. The register offset defines which register to\n" - "access in which table. This routine only accesses the M4599_PDI and the\n" - "ETHSW_PDI of the switch. All PHY registers are accessed via\n" - "GSW_MDIO_DATA_WRITE and GSW_MDIO_DATA_READ. Note that the switch\n" - "API implementation checks whether the given address is inside the valid\n" - "address range. It returns with an error in case an invalid address is given.\n" - "\nParameter:\n----------\n" - "nRegAddr :\n" - "\tRegister Address Offset for read or write access." - "\n", - /* 109: GSW_REGISTER_SET */ - "Write to an internal register. All PHY registers are accessed via\n" - "GSW_MDIO_DATA_WRITE and GSW_MDIO_DATA_READ. Note that the switch\n" - "API implementation checks whether the given address is inside the valid\n" - "address range. It returns with an error in case an invalid address is given.\n" - "\nParameter:\n----------\n" - "nRegAddr :\n" - "\tRegister Address Offset for read or write access.\n" - "nData :\n" - "\tValue to write to or read from 'nRegAddr'.\n" - "nClearBits :\n" - "\tBitmask to clear dedicated databits before writing back the data.\n" - "\tThe field 'nData' is ignored in case 'nCleartBits' is given\n" - "\tdata = data & ~nCleartBits\n" - "nSetBits :\n" - "\tBitmask to set dedicated data bits before writing back the data.\n" - "\tThe field 'nData' is ignored in case 'nSetBits' is given.\n" - "\t'nClearBits' is applied before 'nSetBits'.\n" - "\tdata = data | nSetBits" - "\n", - /* 110: GSW_RESET */ - "Forces a hardware reset of the switch device or switch macro. The device\n" - "automatically comes back out of reset and contains the initial values. All\n" - "previous configurations are lost.\n" - "\nParameter:\n----------\n" - "eReset :\n" - "\tReset selection.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Switch Macro reset\n" - "\n" - "\t1: MDIO master interface reset", - /* 111: GSW_RMON_EXTEND_GET */ - "Read out additional traffic flow (RMON) counters. The zero-based 'nPortId'\n" - "structure element describes the physical switch port for the requested\n" - "statistic information.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.", - /* 112: GSW_TIMESTAMP_TIMER_GET */ - "This command reads out the switch global reference timer counter that is\n" - "used by the packet timestamp capture when sending and receiving Ethernet port level.\n" - "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" - "\nParameter:\n----------\n" - "nSec :\n" - "\tSecond. Absolute second timer count\n" - "nNanoSec :\n" - "\t Nano Second. Absolute nano second timer count.\n" - "nFractionalNanoSec :\n" - "\t Fractional Nano Second. Absolute fractional nano second timer count. \n", - /* 113: GSW_TIMESTAMP_TIMER_SET */ - "This command sets the packet timestamp reference counter.\n" - "This reference timer is a switch global timer which is used by the\n" - "packet timestamp capture when sending and receiving Ethernet port level\n" - "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" - "\nParameter:\n----------\n" - "nSec :\n" - "\tSecond. Absolute second timer count\n" - "nNanoSec :\n" - "\t Nano Second. Absolute nano second timer count.\n" - "nFractionalNanoSec :\n" - "\t Fractional Nano Second. Absolute fractional nano second timer count. \n", - /* 114: GSW_TIMESTAMP_PORT_READ */ - "This command reads out the port related time stamp values. This time stamp is captured\n" - "for ingress and egress packets triggered due to a traffic flow table time stamp action.\n" - "A port related packet timestamp is triggered by the flow table action 'eTimestampAction'.\n" - "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n", - /* 115: GSW_TRUNKING_CFG_GET */ - "Read out the current port trunking algorithm that is used to retrieved if a packet is \n" - "sent on the lower or higher trunking port index number.The algorithm performs an hash \n" - "calculation over the MAC- and IP- addresses using the source- and destination- fields.\n" - "This command retrieve which of the mentioned fields is used by the hash algorithm.\n" - "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" - "\nParameter:\n----------\n" - "bIP_Src :\n" - "\tIP source address is used by the hash algorithm to calculate the egress trunking port index.\n" - "bIP_Dst :\n" - "\tIP destination address is used by the hash algorithm to calculate the egress trunking port index.\n" - "bMAC_Src :\n" - "\tMAC source address is used by the hash algorithm to calculate the egress trunking port index.\n" - "bMAC_Dst :\n" - "\tMAC destination address is used by the hash algorithm to calculate the egress trunking port index.\n", - /* 116: GSW_TRUNKING_CFG_SET */ - "Configure the current port trunking algorithm that is used to retrieved if a packet is \n" - "sent on the lower or higher trunking port index number. The algorithm performs an hash \n" - "calculation over the MAC- and IP- addresses using the source- and destination- fields.\n" - "This command retrieve which of the mentioned fields is used by the hash algorithm.\n" - "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" - "\nParameter:\n----------\n" - "bIP_Dst :\n" - "\tIP destination address is used by the hash algorithm to calculate the egress trunking port index.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Enabled, Destination IP address is used for distrubution algorithm.\n" - "\n" - "\t1: Disable, Destination IP address is not used for distrubution algorithm\n" - "\n" - "bIP_Src :\n" - "\tIP source address is used by the hash algorithm to calculate the egress trunking port index.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Enabled, Source IP address is used for distrubution algorithm.\n" - "\n" - "\t1: Disable, Source IP address is not used for distrubution algorithm\n" - "\n" - "bMAC_Dst :\n" - "\tMAC destination address is used by the hash algorithm to calculate the egress trunking port index.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Enabled, Destination MAC address is used for distrubution algorithm.\n" - "\n" - "\t1: Disable, Destination MAC address is not used for distrubution algorithm\n" - "\n" - "bMAC_Src :\n" - "\tMAC source address is used by the hash algorithm to calculate the egress trunking port index.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Enabled, Source MAC address is used for distrubution algorithm.\n" - "\n" - "\t1: Disable, Source MAC address is not used for distrubution algorithm\n" - "\n", - /* 117: GSW_TRUNKING_PORT_CFG_GET */ - "Read out the port trunking state of a given physical Ethernet switch port 'nPortId'.\n" - "Switch API sets the boolean flag 'bAggregateEnable' and the aggregated trunking \n" - "port 'nAggrPortId' in case trunking is enabled on the port.\n" - "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n", - /* 118: GSW_TRUNKING_PORT_CFG_SET */ - "Configure the port trunking on two physical Ethernet switch ports.\n" - "A new port trunking group of two groups could be placed or removed.\n" - "The two port index number are given with the parameter 'nPortId' and 'nAggrPortId'.\n" - "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "bAggregateEnable :\n" - "\tPorts are aggregated. Enabling means that the 'nPortId' and the 'nAggrPortId' \n" - "\tports form an aggregated link. \n" - "nAggrPortId :\n" - "\tSecond Aggregated Ethernet Port number (zero-based counting).\n" - "\tThe valid range is hardware dependent.An error code is delivered if the selected \n" - "\tport is not available.\n", - /* 119: GSW_QOS_WRED_PORT_CFG_GET */ - "Read out the WRED drop thresholds for a dedicated egress port.Given parameters \n" - "are rounded to the segment size of the HW platform. The supported segment size \n" - "is given by the capability list by using GSW_CAP_GET.\n" - "The configuration can be changed by using GSW_QOS_WRED_PORT_CFG_SET.\n" - "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n", - /* 120: GSW_QOS_WRED_PORT_CFG_SET */ - "Configures the WRED drop thresholds for a dedicated egress port. Given parameters\n" - "are rounded to the segment size of the HW platform. The supported segment size is \n" - "given by the capability list by using GSW_CAP_GET.\n" - "The command GSW_QOS_WRED_PORT_CFG_GET retrieves the current configuration.\n" - "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "nRed_Min :\n" - "\tWRED Red Threshold Min [number of segments].\n" - "\n" - "nRed_Max :\n" - "\tWRED Red Threshold Max [number of segments].\n" - "\n" - "nYellow_Min :\n" - "\tWRED Yellow Threshold Min [number of segments].\n" - "\n" - "nYellow_Max :\n" - "\tWRED Yellow Threshold Max [number of segments].\n" - "\n" - "nGreen_Min :\n" - "\tWRED Green Threshold Min [number of segments].\n" - "\n" - "nGreen_Max :\n" - "\tWRED Green Threshold Max [number of segments].\n", - /* 121: GSW_QOS_FLOWCTRL_CFG_GET */ - "Read out the global flow control thresholds for conforming and non-conforming packets.\n" - "The configured thresholds apply to the global switch segment buffer.\n" - "The configuration can be changed by GSW_QOS_FLOWCTRL_CFG_SET.\n" - "Given parameters are rounded to the segment size of the HW platform. The supported\n" - "segment size is given by the capability list by using GSW_CAP_GET.\n" - "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n", - /* 122: GSW_QOS_FLOWCTRL_CFG_SET */ - "Configures the global flow control thresholds for conforming and non-conforming packets.\n" - "The configured thresholds apply to the global switch segment buffer.\n" - "The current configuration can be retrieved by \ref GSW_QOS_FLOWCTRL_CFG_GET.\n" - "Given parameters are rounded to the segment size of the HW platform. The supported \n" - "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" - "\nParameter:\n----------\n" - "nFlowCtrlNonConform_Min :\n" - "\tGlobal Buffer Non Conforming Flow Control Threshold Minimum [number of segments].\n" - "\n" - "nFlowCtrlNonConform_Max :\n" - "\tGlobal Buffer Non Conforming Flow Control Threshold Maximum [number of segments].\n" - "\n" - "nFlowCtrlConform_Min :\n" - "\tGlobal Buffer Conforming Flow Control Threshold Minimum [number of segments].\n" - "\n" - "nFlowCtrlConform_Max :\n" - "\tGlobal Buffer Conforming Flow Control Threshold Maximum [number of segments].\n", - /* 123: GSW_QOS_FLOWCTRL_PORT_CFG_GET */ - "Read out the ingress port flow control thresholds for occupied buffer segments. \n" - "The configuration can be changed by \ref GSW_QOS_FLOWCTRL_PORT_CFG_SET.\n" - "Given parameters are rounded to the segment size of the HW platform. The supported \n" - "segment size is given by the capability list by using GSW_CAP_GET.\n" - "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n", - /* 124: GSW_QOS_FLOWCTRL_PORT_CFG_SET */ - "Configures the ingress port flow control thresholds for occupied buffer segments.\n" - "The current configuration can be retrieved by GSW_QOS_FLOWCTRL_PORT_CFG_GET.\n" - "Given parameters are rounded to the segment size of the HW platform. The supported\n" - "segment size is given by the capability list by using GSW_CAP_GET.\n" - "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "nFlowCtrl_Min :\n" - "\tIngress Port occupied Buffer Flow Control Threshold Minimum [number of segments].\n" - "nFlowCtrl_Max :\n" - "\tIngress Port occupied Buffer Flow Control Threshold Maximum [number of segments].\n", - /* 125: GSW_QOS_QUEUE_BUFFER_RESERVE_CFG_GET */ - "Read out the egress queue specific buffer reservation.\n" - "Configuration can be read by GSW_QOS_QUEUE_BUFFER_RESERVE_CFG_SET.\n" - "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" - "\nParameter:\n----------\n" - "nQueueId :\n" - "\tQoS queue index (zero-based counting).\n", - /* 126: GSW_QOS_QUEUE_BUFFER_RESERVE_CFG_SET */ - "Configure the egress queue buffer reservation. WRED GREEN packets are never\n" - "dropped by any WRED algorithm (queue,port or global buffer level) in case \n" - "they are below this reservation threshold.The amount of reserved segments \n" - "cannot be occupied by other queues of the switch. The egress queue related \n" - "configuration can be retrieved by calling GSW_QOS_QUEUE_BUFFER_RESERVE_CFG_GET.\n" - "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" - "\nParameter:\n----------\n" - "nQueueId :\n" - "\tQoS queue index (zero-based counting).\n" - "nBufferReserved :\n" - "\tReserved Buffer Segment Threshold [number of segments].\n", - - /* 127: GSW_SVLAN_CFG_GET */ - "Get The current STAG VLAN global device configuration.\n", - /* 128: GSW_SVLAN_CFG_SET */ - "Set STAG VLAN global device configuration.\n" - "\nParameter:\n----------\n" - "nEthertype :\n" - "\tSVLAN ID. Protocl EtherType Field. This 16-bit of the STAG VLAN. \n", - /* 129: GSW_SVLAN_PORT_CFG_GET */ - "Get STAG VLAN Port Configuration. This function returns the STAG VLAN configuration of\n" - "the given Port 'nPortId'.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available. \n", - /* 130: GSW_SVLAN_PORT_CFG_SET */ - "Set STAG VLAN Port Configuration. This function sets the STAG VLAN configuration of the\n" - "given Port 'nPortId'.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is\n" - "\tnot available.\n" - "\n" - "bSVLAN_TagSupport :\n" - "\tPort based STAG VLAN Support. All STAG VLAN protocol parsing and configuration features\n" - "\tare only applied on this port in case the STAG VLAN port support is enabled.\n" - "\n" - "bSVLAN_MACbasedTag :\n" - "\tPort Egress MAC based STAG VLAN. All egress packets contain a STAG VLAN ID \n" - "\that is based on the VLAN ID which is retrieved from the MAC bridging table.\n" - "\tThis MAC bridging table SVLAN ID can be learned from the snooped traffic or statically added.\n" - "\n" - "nPortVId :\n" - "\tPort STAG VLAN ID (PVID). The software shall ensure that the used VLAN has\n" - "\tbeen configured in advance on the hardware by using\n" - "\tGSW_VLAN_ID_CREATE.\n" - "\n" - "bVLAN_ReAssign :\n" - "\tReassign all ingress STAG VLAN tagged packets to the port-based STAG VLAN ID (PVID)\n" - "\n" - "eVLAN_MemberViolation :\n" - "\tVLAN ingress and egress membership violation mode. Allows admittance\n" - "\tof STAG VLAN-tagged packets where the port is not a member of the STAG VLAN ID\n" - "\tcarried in the received and sent packet.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: No VLAN member violation. Ingress and egress packets violating the\n" - "\t\tmembership pass and are not filtered out.\n" - "\n" - "\t1: VLAN member violation for ingress packets. Ingress packets\n" - "\t\tviolating the membership are filtered out. Egress packets violating\n" - "\t\tthe membership are not filtered out.\n" - "\n" - "\t2: VLAN member violation for egress packets. Egress packets violating\n" - "\t\tthe membership are filtered out. Ingress packets violating the\n" - "\t\tmembership are not filtered out.\n" - "\n" - "\t3: VLAN member violation for ingress and egress packets. Ingress and\n" - "\t\tegress packets violating the membership are filtered out.\n" - "\n" - "eAdmitMode :\n" - "\tIngress STAG VLAN-tagged or untagged packet filter configuration.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Admit all. Tagged and untagged packets are allowed.\n" - "\n" - "\t1: Untagged packets only (not supported yet). Tagged packets are\n" - "\t\tdropped.\n" - "\n" - "\t2: Tagged packets only. Untagged packets are dropped.\n", - /* 131: GSW_QOS_SVLAN_CLASS_PCP_PORT_GET */ - "Read out the current egress port related traffic class to 802.1P (PCP) priority mapping table.\n" - "One table is given for each egress port.\n" - "Priority map entry index value is calculated by 'index=PCP + 8*DEI'\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is not available. \n", - /* 132: GSW_QOS_SVLAN_CLASS_PCP_PORT_SET */ - "Configure the egress port related traffic class to STAG VLAN 802.1P (PCP) priority mapping table.\n" - "One table is given for each egress port.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEthernet Port number (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port isnot available.\n" - "nTrafficClass :\n" - "\t\tTraffic class associated with a particular CPCP, SPCp and DSCP values.\n" - "\t\t The index starts counting from zero. \n" - "nCPCP:\n" - "\tConfigures the traffic class to CPCP (3-bit) mapping.The queue index starts counting from zero.\n" - "\tTraffic class associated with a particular 802.1P (PCP) priority mapping value.\n" - "\tOne table is given per egress port. Priority map entry structure.\n" - "\tThe lowest 3 LSB bits (0 ... 2) of 'nPCP_DEI' describe the PCP field.\n" - "\tBit 3 describes the 'DEI' field. \n" - "nSPCP:\n" - "\tConfigures the traffic class to CPCP (3-bit) mapping.The queue index starts counting from zero.\n" - "\tTraffic class associated with a particular 802.1P (PCP) priority mapping value.\n" - "\tOne table is given per egress port. Priority map entry structure.\n" - "\tThe lowest 3 LSB bits (0 ... 2) of 'nPCP_DEI' describe the PCP field.\n" - "\tBit 3 describes the 'DEI' field. \n" - "nDSCP:\n" - "\tConfigures the traffic class to CPCP (3-bit) mapping.The queue index starts counting from zero.\n" - "\tTraffic class associated with a particular 802.1P (PCP) priority mapping value.\n" - "\tOne table is given per egress port. Priority map entry structure.\n" - "\tThe lowest 3 LSB bits (0 ... 2) of 'nPCP_DEI' describe the PCP field.\n" - "\tBit 3 describes the 'DEI' field. \n", - /* 133: GSW_QOS_SVLAN_PCP_CLASS_GET */ - "Read out the 802.1P (PCP) to traffic class mapping table.\n" - "This configuration applies to the entire switch device.\n" - "Priority map entry index value is calculated by 'index=PCP + 8*DEI'. \n", - /* 134: GSW_QOS_SVLAN_PCP_CLASS_SET */ - "Configure the traffic class to 802.1P (PCP) priority mapping table. \n" - "This table is global for the entire switch device. \n" - "\nParameter:\n----------\n" - "nPCP :\n" - "\t\tTable index of the PCP to traffic table mappingtable. The index starts counting from zero. \n" - "nTrafficClass :\n" - "\t\tTraffic class associated with a particular STAG VLAN 802.1P (PCP) priority and \n" - "\t\tDrop Eligiable Indicator (DEI) mapping value. \n" - "\t\tPriority map entry index value is calculated by 'index=PCP + 8*DEI'\n" - "\t\tThe index starts counting from zero.\n" - "nTrafficColor :\n" - "\t\tTraffic Color associated with a particular STAG VLAN 802.1P (PCP) priority and. \n" - "\t\tDrop Eligiable Indicator (DEI) mapping value. \n" - "nPCP_Remark_Enable :\n" - "\tPCP Remark disable control.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: PCP remarking enabled for this code point.\n" - "\n" - "\t1: PCP remarking disabled for this code point.\n" - "\n" - "nDEI_Remark_Enable :\n" - "\tDEI Remark disable control.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: DEI remarking enabled for this code point.\n" - "\n" - "\t1: DEI remarking disabled for this code point.\n" - "\n", - /* 135: GSW_PCE_EG_VLAN_CFG_SET */ - "Configure the Egress VLAN Treatment settings of PCE for given egress Port.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEgress Port Identifier (zero-based counting). The valid range is\n" - "\thardware dependent. \n" - "bEgVidEna :\n" - "\tEnable or disable Egress VLAN treatment on given port.\n" - "eEgVLANmode :\n" - "\tEgress VLAN Treatment Selector - FID or SubIf-GroupId based.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: FID based Egress VLAN Treatment.\n" - "\n" - "\t1: Sub-InterfaceId Group (Bits 12 to 8) based Egress VLAN Treatment.\n" - "nEgStartVLANIdx :\n" - "\tEgress VLAN Treatment start index for specified nPortId. Continuous block \n" - "\t of VLAN is used until next port's Start block assignment\n" - "\n", - /* 136: GSW_PCE_EG_VLAN_CFG_GET */ - "Read the Egress VLAN Treatment settings of PCE for given egress Port.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEgress Port Identifier (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is not available. \n" - "\n", - /* 137: GSW_PCE_EG_VLAN_ENTRY_WRITE */ - "Configure the Egress VLAN Treatment settings of PCE for given egress Port.\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "\tEgress Port Identifier (zero-based counting). The valid range is\n" - "\thardware dependent. An error code is delivered if the selected port is not available. \n" - "nIndex :\n" - "\tIndex corresponding to FID or SubIf-ID Group\n" - "bEgVLAN_Action :\n" - "\tEnable or disable Egress VLAN Treatment Action.\n" - "bEgSVidRem_Action :\n" - "\tEnable or disable the STAG VLAN Removal action.\n" - "bEgSVidIns_Action :\n" - "\tEnable or disable the STAG VLAN Insert action.\n" - "nEgSVid :\n" - "\tSVLAN Value to be inserted in egress.\n" - "bEgCVidRem_Action :\n" - "\tEnable or disable the CTAG VLAN Removal action.\n" - "bEgCVidIns_Action :\n" - "\tEnable or disable the CTAG VLAN Insert action.\n" - "nEgCVid :\n" - "\tCVLAN Value to be inserted in egress.\n" - "\n", - /* 138: GSW_PCE_EG_VLAN_ENTRY_READ */ - "Read the Egress VLAN Treatment settings of PCE for given egress Port.\n" - "\nParameter:\n----------\n" - "nIndex :\n" - "\tIndex corresponding to FID or SubIf-ID Group\n" - "\n", - /* 139: GSW_PMAC_BM_CFG_GET */ - "Read the backpressure mapping table between Tx Queues for Egress and Rx Queues \n" - "for Ingress congestion on given DMA channel. \n" - "\nParameter:\n----------\n" - "nTxDmaChanId :\n" - "\tTx DMA Channel Identifier (0..15). \n" - "\n", - /* 140: GSW_PMAC_EG_CFG_GET */ - "Read egress attributes config on given PMAC port. \n" - "\nParameter:\n----------\n" - "nDestPortId :\n" - "\tDestination Port Identifier (0..15) - Part of Table Index (Bits 0-3).\n" - "bProcFlagsSelect :\n" - "\tSelector for Processing Flags (MPE1, MPE2, DEC & ENC bits). If disabled, \n" - "\tthen the combination of flags bDecFlag, bEncFlag, bMpe1Flag and bMpe2Flag\n" - "\t are considered as index instead of nTrafficClass. For using these \n" - "\tcombination flags, turn ON this boolean selector.\n" - "\tTC or combination processing flag is decided at global \n" - "\tlevel through bProcFlagsEgPMACEna.\n" - "\tIt is expected that user always passes correct value based \n" - "\tupon bProcFlagsEgMPACEna. If mismatch found with global PMAC mode,\n" - "\t SWAPI will return error code.\n" - "nTrafficClass :\n" - "\tTraffic Class value [Lower 4 -bits (LSB-0, 1, 2, 3)].- Part of Table Index Bits 4-7.\n" - "\tThis value is considered, only when bProcFlagsSelect is not set.\n" - "nFlowIDMsb :\n" - "\tFlow-ID MSB (2-bits) value - valid range (0..2). - Part of Table Index Bits 8-9.\n" - "bMpe1Flag :\n" - "\tMPE-1 Flag value - Part of Table Index Bit 4. Valid only when bProcFlagsSelect is set\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: MPE-1 Marked Flag disabled.\n" - "\n" - "\t1: MPE-1 Marked Flag Enabled.\n" - "bMpe2Flag :\n" - "\tMPE-2 Flag value - Part of Table Index Bit 5. Valid only when bProcFlagsSelect is set.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: MPE-2 Marked Flag disabled.\n" - "\n" - "\t1: MPE-2 Marked Flag Enabled.\n" - "bEncFlag :\n" - "\tCryptography Encryption Action Flag value - Part of Table Index Bit 7.\n" - "\t Valid only, when bProcFlagsSelect is set\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Cryptography Encryption Action Flag disabled.\n" - "\n" - "\t1: Cryptography Encryption Action Flag Enabled.\n" - "bDecFlag :\n" - "\tCryptography Decryption Action Flag value - Part of Table Index Bit 6.\n" - "\t Valid only, when bProcFlagsSelect is set.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Cryptography Decryption Action Flag disabled.\n" - "\n" - "\t1: Cryptography Decryption Action Flag Enabled.\n" - "\n", - /* 141: GSW_PMAC_IG_CFG_GET */ - "Reads the PMAC Ingress config on given DMA channel. \n" - "\nParameter:\n----------\n" - "nTxDmaChanId :\n" - "\tTx DMA Channel Identifier (0..15). \n" - "\n", - /* 142: GSW_PMAC_COUNT_GET */ - "Reads the Counters for given DMA Channel/ given source Port ID. \n" - "\nParameter:\n----------\n" - "nTxDmaChanId :\n" - "\tTransmit DMA Channel/ Source Port ID Identifier (0..15). \n" - "\n", - /* 143: GSW_RMON_MODE_SET */ - "Configures a Traffic Statistic Counter (RMON counter). \n" - "Set RMON counting mode to bytes or Packet based. \n" - "\nParameter:\n----------\n" - "eRmonType :\n" - "\tSelect RMON Counters Type. \n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: All RMON Types Counters (GSW_RMON_ALL_TYPE). \n" - "\n" - "\t1: All PMAC RMON Counters (GSW_RMON_PMAC_TYPE).\n" - "\n" - "\t2: Port based RMON Counters (GSW_RMON_PORT_TYPE).\n" - "\n" - "\t3: Meter based RMON Counters (GSW_RMON_METER_TYPE).\n" - "\n" - "\t4: Interface based RMON Counters(GSW_RMON_IF_TYPE).\n" - "\n" - "\t5: Route based RMON Counters (GSW_RMON_ROUTE_TYPE).\n" - "\n" - "\t6: Redirected Traffic based RMON Counters (GSW_RMON_REDIRECT_TYPE).\n" - "\n" - "eCountMode :\n" - "\tSelect RMON Counters Mode. \n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Packet based RMON Counters(GSW_RMON_COUNT_PKTS). \n" - "\n" - "\t1: Bytes based RMON Counters (GSW_RMON_COUNT_BYTES).\n" - "\n" - "\t2: Number of dropped frames, supported only for interface cunters (GSW_RMON_DROP_COUNT).\n" - "\n", - /* 144: GSW_RMON_IF_GET */ - "Get the Interface RMON Counters . \n" - "\nParameter:\n----------\n" - "nIfId :\n" - "\tInterface Counter Index Number. (Range : 0-255). \n" - "\n", - /* 145: GSW_RMON_REDIRECT_GET */ - "Get the Redirected RMON Counters. \n" - "\n", - /* 114: GSW_RMON_ROUTE_GET */ - "Get the Routing RMON Counters. \n" - "\nParameter:\n----------\n" - "nRoutedPortId :\n" - "\tRouted Port Number. \n" - "\n", - /* 147: GSW_RMON_METER_GET */ - "Get the Meter Instance statistic counter. \n" - "\nParameter:\n----------\n" - "nMeterId :\n" - "\tMeter Instance number (zero-based counting). \n" - "\n", - /* 148: GSW_QOS_METER_ACT */ - "Triggers Metering Action for Traffic by CPU/MPE. \n" - "Control Action for triggering metering action from \n" - "CPU users [(CPU or MPE) or (CPU-1 & CPU-2) ] and This control trigger \n" - "action performs metering and returns output color.\n" - "\nParameter:\n----------\n" - "nCpuUserId :\n" - "\tCPU User Id . \n" - "nMeterId :\n" - "\tPrimary Meter Instance Id (zero-based counting). \n" - "bMeterEna :\n" - "\tPrimary Meter Enable or Disable Action. \n" - "nSecMeterId :\n" - "\tSecondary Meter Instance Id (zero-based counting). \n" - "bSecMeterEna :\n" - "\tSecondary Meter Enable or Disable Action. \n" - "ePreColor :\n" - "\tPre-Color to indicate the traffic type getting Metered.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Critical Packet. Metering never changes the drop precedence \n" - "\t\tof these packets (GSW_DROP_PRECEDENCE_CRITICAL). \n" - "\t1: Green Drop Precedence Packet. Packet is marked with a 'low' \n" - "\t\tdrop precedence (GSW_DROP_PRECEDENCE_GREEN).\n" - "\t2: Yellow Drop Precedence Packet. Packet is marked with a 'middle' \n" - "\t\tdrop precedence (GSW_DROP_PRECEDENCE_YELLOW). \n" - "\t3: Red Drop Precedence Packet. Packet is marked with a 'high' \n" - "\t\tdrop precedence. (GSW_DROP_PRECEDENCE_RED).\n" - "\n" - "pktLen :\n" - "\tPacket Length in Bytes subject to Metering action from CPU. \n" - "\n", - - - /* 149: GSW_PMAC_GLBL_CFG_SET */ - "Writes the global PMAC settings applicable to PMAC ports \n" - "It is used to configure the global settings such as Padding, \n" - " Checksum, Length and Egress PMAC Selector fields. \n" - "\nParameter:\n----------\n" - "bAPadEna :\n" - "\tAutomatic Padding Settings - Disabled (Default), to enable set it true. \n" - "bPadEna :\n" - "\tGlobal Padding Settings - Disabled (Default), to enable set it true. \n" - "bVPadEna :\n" - "\tVLAN Padding Setting - Disabled (Default), to enable set it true \n" - "\t applicable when bPadEna is set. \n" - "bSVPadEna :\n" - "\tStacked VLAN Padding Setting - Disabled (Default), to enable set \n" - "\t it true - applicable when bPadEna is set. \n" - "bTxFCSDis :\n" - "\tTransmit FCS Regeneration Setting - Enabled (Default), \n" - "\t\tto disable set it true. \n" - "bIPTransChkRegDis :\n" - "\tIP and Transport (TCP/UDP) Headers Checksum Generation \n" - "\t Control - Enabled (Default), to disable set it true. \n" - "bIPTransChkVerDis :\n" - "\tIP and Transport (TCP/UDP) Headers Checksum Verification \n" - "\tControl - Enabled (Default), to disable set it true. \n" - "bJumboEna :\n" - "\tTo enable receipt of Jumbo frames - Disabled \n" - "\t(Default - 1518 bytes normal frames without VLAN tags), \n" - "\tto enable Jumbo set it truee. \n" - "nMaxJumboLen :\n" - "\tMaximum length of Jumbo frames in terms of bytes \n" - "\t(Bits 13:0). The maximum handled in Switch is 9990 bytes.\n" - "nJumboThreshLen :\n" - "\tThreshold length for Jumbo frames qualification in terms \n" - "\t\tof bytes (Bits 13:0).\n" - "bLongFrmChkDis :\n" - "\tLong frame length check-Enabled(Default),to disable set it true.\n" - - "eShortFrmChkType :\n" - "\tShort frame length check Type - default (Enabled for \n" - "\t 64 bytes without considering VLAN.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Short frame length check is disabled. \n" - "\t1: Short frame length check is enabled without considering VLAN Tags.\n" - "\t2: Short frame length check is enabled including VLAN Tags. \n" - "\t3: Reserved - Currently unused. \n" - "\n" - "bProcFlagsEgCfgEna :\n" - "\tEgress PMAC Config Table Selector - TrafficClass or Processing \n" - "\tFlags (MPE1, MPE22, DEC, ENC based).\n" - "\tThe default setting is Traffic Class based selector for Egress PMAC. \n" - "\n", - /* 150: GSW_PMAC_GLBL_CFG_GET */ - "Get the global PMAC settings currently configured on PMAC port\n" - "\n", - - -#if defined(CONFIG_LTQ_TEST) && CONFIG_LTQ_TEST - - /* 152: GSW_ROUTE_ENTRY_READ */ - "This command reads a Routing session config (pattern and action info)\n" - "for the given index. A routing session (pattern and action) can be added\n" - "using the command \ref GSW_ROUTE_ENTRY_ADD.\n" - "Parameter:\n----------\n" - "nRtIndex :\n" - "\tRouting Session Entry Index Value - returned in GSW_ROUTE_ENTRY_ADD operation" - "\n", - - /* 153: GSW_ROUTE_ENTRY_DELETE */ - "This command deletes an earlier added routing session of specified index\n" - "and pattern. It is must specify the index returned during creation.\n" - " The pattern part is only used for compairng with the pattern stored in index.\n" - "A routing rule and action of specified index can be read using \n" - "the command \ref GSW_ROUTE_ENTRY_READ. \n" - "\nParameter:\n----------\n" - "nRtIndex :\n" - "\tRouting Session Entry Index Value - returned in GSW_ROUTE_ENTRY_ADD operation" - "\n", - - /* 154: GSW_ROUTE_ENTRY_ADD */ - "This command adds a routing session of specified pattern and action.\n" - "The pattern part describes the parameters to identify an incoming packet session\n" - "to which the dedicated actions should be applied.Packets having the same pattern \n" - "field belongs to same session and applied to same action.\n" - "A routing rule and action can be read using the command \ref GSW_ROUTE_ENTRY_READ.\n" - "Routing Pattern Part.\n" - "\nParameter:\n----------\n" - "nHashVal :\n" - "\tRouting Session Entry Hash Value.\n" - "\n" - "nRtIndex :\n" - "\tRouting Session Entry Index Value\n" - "\n" - "bPrio :\n" - "\tIndicate it is a priority session.\n" - "\n" - "nFlags :\n" - "\tFlags to indicate special status E.g. - Swap done (1), Free (2),...\n" - "\n" - "routeEntry.pattern.eIpType :\n" - "\tThe session source/destination IPv4/v6 address seletion.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Routing Pattern for IP selection disabled.\n" - "\n" - "\t1: Routing Pattern for IPv4.\n" - "\n" - "\t2: Routing Pattern for IPv6.\n" - "\n" - "routeEntry.pattern.nSrcIP :\n" - "\tThe session source IPv4/v6 address used for hash computation. \n" - "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." - "\n" - "routeEntry.pattern.nDstIP :\n" - "\tThe session destination IPv4/v6 address for hash computation.\n" - "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." - "\n" - "routeEntry.pattern.nSrcPort :\n" - "\tTCP/UDP source port information\n" - "\n" - "routeEntry.pattern.nDstPort :\n" - "\tTCP/UDP destination port information\n" - "\n" - "routeEntry.pattern.nRoutExtId :\n" - "\tRouting extension Id from Flow Table action.\n" - "\n" - "routeEntry.pattern.bValid :\n" - "\tIndicate, if a particular routing entry is valid or not\n" - "\n" - - "Routing Action Part.\n\n" - - "routeEntry.action.nDstPortMap :\n" - "\tSession destination port map. LSB refers to Port 0.\n" - "\n" - "routeEntry.action.nDstSubIfId :\n" - "\tSession destination sub-interace Id. \n" - "\n" - - "routeEntry.action.eIpType :\n" - "\tSession new IP address type, IPv4/v6, address seletion.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Action for IP selection disabled.\n" - "\n" - "\t1: Routing action for IPv4.\n" - "\n" - "\t2: Routing action for IPv6.\n" - "\n" - "routeEntry.action.nNATIPaddr :\n" - "\tSession new IP address after NAT for eIPType. \n" - "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." - "\n" - - "routeEntry.action.nTcpUdpPort :\n" - "\tSession new TCP/UDP port number. Used if eSessionRoutingMode is NAPT \n" - "\n" - "routeEntry.action.nMTUvalue :\n" - "\tSession MTU value. \n" - "\n" - "routeEntry.action.bMAC_SrcEnable :\n" - "\tSource MAC address used\n" - "\n" - "routeEntry.action.nSrcMAC :\n" - "\tSource MAC address\n" - "\tSupported Formats: 12:34:45:67:89:0A" - "\n" - "routeEntry.action.bMAC_DstEnable :\n" - "\tDestination MAC address used\n" - "\n" - "routeEntry.action.nDstMAC :\n" - "\tDestination MAC address\n" - "\tSupported Formats: 12:34:45:67:89:0A" - "\n" - "routeEntry.action.bPPPoEmode :\n" - "\tSession PPPoE mode\n" - "\t0:PPPoE Mode transparent, 1:PPPoE Mode Termination" - "\n" - "routeEntry.action.nPPPoESessId :\n" - "\tSession PPPoE Session Identifier used\n" - "\n" - "routeEntry.action.bTunnel_Enable :\n" - "\tTunnel used\n" - "\n" - "routeEntry.action.eTunType :\n" - "\tTunnel type/mode\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: GSW_ROUTE_TUNL_NULL. Session routing tunnel type is No Tunnel action.\n" - "\n" - "\t1: GSW_ROUTE_TUNL_6RD. Session routing tunnel type is 6rd.\n" - "\n" - "\t2: GSW_ROUTE_TUNL_DSLITE. Session routing tunnel type is DSlite\n" - "\n" - "\t3: GSW_ROUTE_TUNL_L2TP. Session routing tunnel type is L2TP.\n" - "\n" - "\t4: GSW_ROUTE_TUNL_IPSEC. Session routing tunnel type is IPsec.\n" - "\n" - "routeEntry.action.nTunnelIndex :\n" - "\tPreconfigured tunnel Index. The tunnel Index maps to Tunnel table.\n" - "\n" - "routeEntry.action.bMeterAssign :\n" - "\tMeterId assignment action. 0:Assignment disabled, 1:Assignment Enabled\n" - "\n" - "routeEntry.action.nMeterId :\n" - "\tMeter Id used for the session. The metering configuration can be done using\n" - "\tdiffernt switch api function. Meter index (zero-based counting).\n" - "\n" - "routeEntry.action.bRTPMeasEna :\n" - "\tRTP Multicast session's sequence number counter Action.\n" - "\tValue: 0:Assignment disabled, 1:Assignment Enabled\n" - "\n" - - "routeEntry.action.nRTPSeqNumber :\n" - "\tRTP sequence number for which the multicast packet will be counted.\n" - "\n" - "routeEntry.action.nRTPSessionPktCnt :\n" - "\tRTP packet Rolling Counter. R-O \n" - "\n" - "routeEntry.action.nFID :\n" - "\tSession FID. Value 0-63, Session FID is used for Egress VLAN action\n" - "\n" - "routeEntry.action.nFlowId :\n" - "\tFlow Id value. Value 0-255. Default value is 0.\n" - "\n" - "routeEntry.action.eOutDSCPAction :\n" - "\tOuter DSCP remarking action - Valid for Tunnel associated entries.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: GSW_ROUTE_OUT_DSCP_NULL. Session routing no outer DSCP remarking action.\n" - "\n" - "\t1: GSW_ROUTE_OUT_DSCP_INNER. Session routing outer DSCP from inner IP header.\n" - "\n" - "\t2: GSW_ROUTE_OUT_DSCP_SESSION. Session routing outer DSCP from session action table.\n" - "\n" - "\t3: GSW_ROUTE_OUT_DSCP_RES. Session routing outer DSCP action reserved.\n" - "\n" - "routeEntry.action.bInnerDSCPRemark :\n" - "\tSession routing inner DSCP remarking action.\n" - "\tValue: 0:No remarking., 1:remarking based on session.\n" - "\n" - "routeEntry.action.nDSCP :\n" - "\tDSCP remarking value for the session.\n" - "\n" - "routeEntry.action.bTCremarking :\n" - "\tRouting session traffic class remarking action..\n" - "\tValue: 0:No remarking. 1:TC remarking enabled.\n" - "\n" - "routeEntry.action.nTrafficClass :\n" - "\tTraffic class remarking value for the session.\n" - "\n" - "routeEntry.action.nSessionCtrs :\n" - "\tSession MIB Counters.\n" - "\n" - - "routeEntry.action.eSessDirection :\n" - "\tRouting Session Directions, LAN or WAN \n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: GSW_ROUTE_DIRECTION_DNSTREAM. Session is LAN egress i.e WAN Downstream.\n" - "\n" - "\t1: GSW_ROUTE_DIRECTION_UPSTREAM. Session is LAN ingress i.e. WAN Upstream session.\n" - "\n" - - "routeEntry.action.eSessRoutingMode :\n" - "\tSession routing action mode. Routing mode\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: GSW_ROUTE_MODE_NULL. Session routing type NULL ?? Bridge session.\n" - "\n" - "\t1: GSW_ROUTE_MODE_ROUTING. Session routing type plain routing.\n" - "\n" - "\t2: GSW_ROUTE_MODE_NAT. Session routing type is Src IP address NAT.\n" - "\n" - "\t3: GSW_ROUTE_MODE_NAPT. Session routing type is Src IP/Port NAT.\n" - "\n" - - "routeEntry.action.bTTLDecrement :\n" - "\tEnable TTL decrement for the session.\n" - "\tValue: 0:TTL decrement disabled, 1:TTL decrement enabled.\n" - "\n" - "routeEntry.action.bHitStatus :\n" - "\tSession hit Status - RW.\n" - "\n", - - /* 155: GSW_ROUTE_TUNNEL_ENTRY_READ */ - "This command reads the Tunnel values from the routing Tunnel table at a\n" - "given specified Tunnel Index. A Tunnel entry can be written\n" - "using the command \ref GSW_ROUTE_TUNNEL_ENTRY_ADD.\n" - "Parameter:\n----------\n" - "nTunIndex :\n" - "\tTunnel table entry index.\n" - "tunnelEntry.eTunnelType :\n" - "\tTunnel type enum for DSLite, 6RD, IPSec, L2TP .\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: GSW_ROUTE_TUNL_NULL. Session routing tunnel type is No Tunnel action.\n" - "\n" - "\t1: GSW_ROUTE_TUNL_6RD. Session routing tunnel type is 6rd.\n" - "\n" - "\t2: GSW_ROUTE_TUNL_DSLITE. Session routing tunnel type is DSlite\n" - "\n" - "\t3: GSW_ROUTE_TUNL_L2TP. Session routing tunnel type is L2TP.\n" - "\n" - "\t4: GSW_ROUTE_TUNL_IPSEC. Session routing tunnel type is IPsec.\n" - "\n" - "\n", - - /* 156: GSW_ROUTE_TUNNEL_ENTRY_DELETE */ - "This command deletes a specified Tunnel entry in the Routing Tunnel table.\n" - "The Tunnel entry can be read using the commnad \ref GSW_ROUTE_TUNNEL_ENTRY_READ.\n" - "Parameter:\n----------\n" - "nTunIndex :\n" - "\tTunnel table entry index.\n" - "tunnelEntry.eTunnelType :\n" - "\tTunnel type enum for DSLite, 6RD, IPSec, L2TP .\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: GSW_ROUTE_TUNL_NULL. Session routing tunnel type is No Tunnel action.\n" - "\n" - "\t1: GSW_ROUTE_TUNL_6RD. Session routing tunnel type is 6rd.\n" - "\n" - "\t2: GSW_ROUTE_TUNL_DSLITE. Session routing tunnel type is DSlite\n" - "\n" - "\t3: GSW_ROUTE_TUNL_L2TP. Session routing tunnel type is L2TP.\n" - "\n" - "\t4: GSW_ROUTE_TUNL_IPSEC. Session routing tunnel type is IPsec.\n" - "\n" - "tunnelEntry.t.tun6RD.nSrcIP4Addr :\n" - "\t6rd tunnel Source IPv4 address. 6rd tunnel interface - Outer IPv4\n" - "\tSupported Formats: 10.1.1.1 " - "\n" - "tunnelEntry.t.tun6RD.nDstIP4Addr :\n" - "\t6rd tunnel Dest IPv4 address. 6rd tunnel interface - Outer IPv4\n" - "\tSupported Formats: 10.1.1.1" - "\n" - "tunnelEntry.t.nTunL2TP :\n" - "\tL2TP tunnel configuration.\n" - "\n" - "tunnelEntry.t.nTunIPsec :\n" - "\tIPsec crypto context configuration..\n" - "\n" - "tunnelEntry.t.tunDSlite.nSrcIP6Addr :\n" - "\tDS-Lite tunnel Source IPv6 address. DSLite tunnel interface - Outer IPv6\n" - "\tSupported Formats: f0f3:0013:e0b5: ..." - "\n" - "tunnelEntry.t.tunDSlite.nDstIP6Addr :\n" - "\tDS-Lite tunnel Dest IPv6 address. DSLite tunnel interface - Outer IPv6.\n" - "\tSupported Formats: f0f3:0013:e0b5: ..." - "\n" - "\n", - - /* 157: GSW_ROUTE_TUNNEL_ENTRY_ADD */ - "This command adds a new Tunnel entry in the Routing Tunnel table.\n" - "The Tunnel entry can be read using the commnad GSW_ROUTE_TUNNEL_ENTRY_READ.\n" - "Parameter:\n----------\n" - "nTunIndex :\n" - "\tTunnel table entry index.\n" - "tunnelEntry.eTunnelType :\n" - "\tTunnel type enum for DSLite, 6RD, IPSec, L2TP .\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: GSW_ROUTE_TUNL_NULL. Session routing tunnel type is No Tunnel action.\n" - "\n" - "\t1: GSW_ROUTE_TUNL_6RD. Session routing tunnel type is 6rd.\n" - "\n" - "\t2: GSW_ROUTE_TUNL_DSLITE. Session routing tunnel type is DSlite\n" - "\n" - "\t3: GSW_ROUTE_TUNL_L2TP. Session routing tunnel type is L2TP.\n" - "\n" - "\t4: GSW_ROUTE_TUNL_IPSEC. Session routing tunnel type is IPsec.\n" - "\n" - - "tunnelEntry.t.tun6RD.nSrcIP4Addr :\n" - "\t6rd tunnel Source IPv4 address. 6rd tunnel interface - Outer IPv4\n" - "\tSupported Formats: 10.1.1.1 " - "\n" - - "tunnelEntry.t.tun6RD.nDstIP4Addr :\n" - "\t6rd tunnel Dest IPv4 address. 6rd tunnel interface - Outer IPv4\n" - "\tSupported Formats: 10.1.1.1" - "\n" - - "tunnelEntry.t.nTunL2TP :\n" - "\tL2TP tunnel configuration.\n" - "\n" - "tunnelEntry.t.nTunIPsec :\n" - "\tIPsec crypto context configuration..\n" - "\n" - - "tunnelEntry.t.tunDSlite.nSrcIP6Addr :\n" - "\tDS-Lite tunnel Source IPv6 address. DSLite tunnel interface - Outer IPv6\n" - "\tSupported Formats: f0f3:0013:e0b5: ..." - "\n" - - "tunnelEntry.t.tunDSlite.nDstIP6Addr :\n" - "\tDS-Lite tunnel Dest IPv6 address. DSLite tunnel interface - Outer IPv6.\n" - "\tSupported Formats: f0f3:0013:e0b5: ..." - "\n" - - "\n", - - /* 158: GSW_ROUTE_L2NAT_CFG_READ */ - "This command reads L2NAT configurations on specified egress port of PAE.\n" - "Parameter:\n----------\n" - "nEgPortId :\n" - "\tEgress Port Id.\n" - "\n", - - /* 159: GSW_ROUTE_L2NAT_CFG_WRITE */ - "This command configures L2NAT on egress port of PAE. When enabled the \n" - "Source MAC Address of traffic leaving specified egress port would be \n" - "NAT-ed with configrued MAC address. \n" - "Parameter:\n----------\n" - "bL2NATEna :\n" - "\tEnable L2NAT on this egress port of PAE\n" - "\n" - "nEgPortId :\n" - "\tEgress Port Id.\n" - "\n" - "nNatMAC :\n" - "\tNew source MAC address for L2NAT on this egress port\n" - "\tSupported Formats: 12:34:45:67:89:0A" - "\n", - - /* 160: GSW_ROUTE_SESSION_HIT_OP */ - "This command reads or reads-n-clears Hit-Status for high priority sessions. \n" - "Parameter:\n----------\n" - "nRtIndex :\n" - "\tRouting Session Index\n" - "\n" - "eHitOper :\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: GSW_ROUTE_HIT_READ. Session routing Hit Status Read Action \n" - "\n" - "\t1: GSW_ROUTE_HIT_CLEAR. Session routing Hit Status Clear Action\n" - "\n" - "\n", - - /* 161: GSW_ROUTE_SESSION_DEST_MOD */ - "This command modifies the destination of an existing Routing session. \n" - "Parameter:\n----------\n" - "nRtIdx :\n" - "\tSession Index \n" - "\n" - "nDstPortMap :\n" - "\tSession destination port map. LSB refers to Port 0.\n" - "\n" - "nDstSubIfId :\n" - "\tSession destination sub-interace Id.\n" - "\n" - "\n", -#endif - /* 162: GSW_CTP_PORT_ASSIGNMENT_SET"*/ - "GSW_CTP_PORT_ASSIGNMENT_SET\n" - "\tSupported Parameters:\n" - "\t---------------------\n\n" - "\t1. nLogicalPortId\n" - "\t2. nFirstCtpPortId\n" - "\t3. nNumberOfCtpPort\n" - "\t4. eMode\n", - /* 163: GSW_CTP_PORT_ASSIGNMENT_GET"*/ - "GSW_CTP_PORT_ASSIGNMENT_GET\n" - "\tSupported Parameters:\n" - "\t---------------------\n\n" - "\t1. nLogicalPortId\n", - /* 164: GSW_EXTENDEDVLAN_SET"*/ - "Set Extended VLAN Configuration entry. Valid for GSWIP-3.1\n" - "It is used to set Extended VLAN Configuration entry\n" - "Supported Parameters:\n" - "---------------------\n\n" - "nExtendedVlanBlockId\n" - "\tThis should be valid ID returned by GSW_EXTENDEDVLAN_ALLOC\n" - "\t If it is INVALID_HANDLE, GSW_EXTENDEDVLAN_config_t::nEntryIndex\n" - "\tis absolute index of Extended VLAN entry in hardware for debug purpose\n" - "\tbypassing any check\n" - "nEntryIndex\n" - "\t Index of entry\n" - "eOuterVlanFilterVlanType\n" - "\tIndex of entry, ranges between 0 and\n" - "\t SW_EXTENDEDVLAN_alloc_t::nNumberOfEntries - 1, to\n" - "\tGSW_EXTENDEDVLAN_SET) or get ref GSW_EXTENDEDVLAN_GET)\n" - "\tExtended VLAN Configuration entry. For debug purpose, this field could be\n" - "\tabsolute index of Entended VLAN entry in hardware, when\n" - "\tGSW_EXTENDEDVLAN_config_t::nExtendedVlanBlockId is\n" - "\tINVALID_HANDLE\n" - "** Filter for outer VLAN tag. *\n" - "-------------------------------\n" - "\teOuterVlanFilterVlanType\n" - "\t** Filter Type: normal filter, default rule, or no tag\n" - "\tSupported Values:\n" - "\t0: There is tag and criteria applies\n" - "\t1 There is tag but no criteria\n" - "\t2:Default entry if no other rule applies\n" - "\t3 There is no tag\n" - "\t4:Block invalid\n" - "\tbOuterVlanFilterPriorityEnable\n" - "\t** Enable priority field filtering *\n" - "\tnOuterVlanFilterPriorityVal\n" - "\t** Filter priority value if bPriorityEnable is TRUE.\n" - "\tbOuterVlanFilterVidEnable\n" - "\t** Enable VID filtering. *\n" - "\tnOuterVlanFilterVidVal\n" - "\t** Filter VID if bVidEnable is TRUE\n" - "\teOuterVlanFilterTpid\n" - "\t** Mode to filter TPID of VLAN tag \n" - "\t-------------------\n" - "\tSupported Values:\n" - "\t0: ** Do not filter. *\n" - "\t1 ** TPID is 0x8100. * \n" - "\t2:** TPID is global configured value. *\n" - "\teOuterVlanFilterDei\n" - "\t** Mode to filter DEI of VLAN tag\n" - "\t-------------------\n" - "\tSupported Values:\n" - "\t0: ** Do not filter. *\n" - "\t1 ** DEI is 0 \n" - "\t2:** DEI is 1 \n" - "** Filter for Inner VLAN tag. *\n" - "-------------------------------\n" - "\teInnerVlanFilterVlanType\n" - "\t** Filter Type: normal filter, default rule, or no tag\n" - "\tSupported Values:\n" - "\t0: There is tag and criteria applies\n" - "\t1 There is tag but no criteria\n" - "\t2:Default entry if no other rule applies\n" - "\t3 There is no tag\n" - "\t4:Block invalid\n" - "\tbInnerVlanFilterPriorityEnable\n" - "\t** Enable priority field filtering *\n" - "\tnInnerVlanFilterPriorityVal\n" - "\t** Filter priority value if bPriorityEnable is TRUE.\n" - "\tbInnerVlanFilterVidEnable\n" - "\t** Enable VID filtering. *\n" - "\tnInnerVlanFilterVidVal\n" - "\t** Filter VID if bVidEnable is TRUE\n" - "\teInnerVlanFilterTpid\n" - "\t** Mode to filter TPID of VLAN tag \n" - "\t-------------------\n" - "\tSupported Values:\n" - "\t0: ** Do not filter. *\n" - "\t1 ** TPID is 0x8100. * \n" - "\t2:** TPID is global configured value. *\n" - "\teInnerVlanFilterDei\n" - "\t** Mode to filter DEI of VLAN tag\n" - "\t-------------------\n" - "\tSupported Values:\n" - "\t0: ** Do not filter. *\n" - "\t1 ** DEI is 0 \n" - "\t2:** DEI is 1 \n" - "eEtherType\n" - "\t** Filter EtherType. *\n" - "\tSupported Values:\n" - "\t0: ** Do not filter. *\n" - "\t1: ** IPoE frame (Ethertyp is 0x0800)\n" - "\t2: ** PPPoE frame (Ethertyp is 0x8863 or 0x8864)\n" - "\t3: ** ARP frame (Ethertyp is 0x0806)\n" - "\t4: ** IPv6 IPoE frame (Ethertyp is 0x86DD)\n" - "eRemoveTagAction\n" - "\t** Number of VLAN tag(s) to remove. *\n" - "\tSupported Values:\n" - "\t0:** Do not remove VLAN tag. *\n" - "\t1:** Remove 1 VLAN tag following DA/SA. *\n" - "\t2:** Remove 2 VLAN tag following DA/SA. *\n" - "\t3:** Discard upstream traffic. *\n" - "bOuterVlanActionEnable\n" - "\t** Enable outer VLAN tag add/modification. *\n" - "Treatment for outer VLAN tag. *\n" - "\t-------------------\n" - "\teOuterVlanActionPriorityMode\n" - "\t** Select source of priority field of VLAN tag. *\n" - "\tSupported Values:\n" - "\t0 /** Set priority with given value. */\n" - "\t1 /** Prority value is copied from inner VLAN tag of received packet. */\n" - "\t2 /** Prority value is copied from outer VLAN tag of received packet. */\n" - "\t3 /** Prority value is derived from DSCP field of received packet. */\n" - "eOuterVlanActionPriorityVal\n" - "\t** If GSW_EXTENDEDVLAN_treatmentVlan_t::ePriorityMode is\n" - "\tGSW_EXTENDEDVLAN_TREATMENT_PRIORITY_VAL, use this value for\n" - "\tpriority field of VLAN tag. *\n" - "eOuterVlanActionVidMode\n" - "\t** Select source of VID field of VLAN tag. *\n" - "\tSupported Values:\n" - "\t0:/** Set VID with given value. */\n" - "\t1:/** VID is copied from inner VLAN tag of received packet. */\n" - "\t2:/** VID is copied from outer VLAN tag of received packet. */\n" - "eOuterVlanActionVidVal\n" - "\t** If GSW_EXTENDEDVLAN_treatmentVlan_t::eVidMode is\n" - "\tGSW_EXTENDEDVLAN_TREATMENT_VID_VAL, use this value for VID field\n" - "\tof VLAN tag\n" - "eOuterVlanActionTpid\n" - "\t/** Select source of TPID field of VLAN tag. */\n" - "\tSupported Values:\n" - "\t0:/** TPID is copied from inner VLAN tag of received packet. */\n" - "\t1:/** TPID is copied from outer VLAN tag of received packet. */\n" - "\t2:/** TPID is global configured value. */\n" - "\t3:/** TPID is 0x8100. */\n" - "eOuterVlanActioneDei\n" - "\t/** Select source of DEI field of VLAN tag. */\n" - "\t:Supported Values:\n" - "\t0:/** DEI (if applicable) is copied from inner VLAN tag of received packet. */\n" - "\t1:/** DEI (if applicable) is copied from outer VLAN tag of received packet. */\n" - "\t2:/** DEI is 0. */\n" - "\t3:/** DEI is 1. */\n" - "Treatment for inner VLAN tag. *\n" - "\t------------------ -\n" - "bInnerVlanActionEnable\n" - "\t/** Enable inner VLAN tag add/modification. */\n" - "eInnerVlanActionPriorityMode\n" - "\t **Select source of priority field of VLAN tag. *\n" - "\tSupported Values :\n" - "\t0 /** Set priority with given value. */\n" - "\t1 /** Prority value is copied from inner VLAN tag of received packet. */\n" - "\t2 /** Prority value is copied from outer VLAN tag of received packet. */\n" - "\t3 /** Prority value is derived from DSCP field of received packet. */\n" - "eInnerVlanActionPriorityVal\n" - "\t **If GSW_EXTENDEDVLAN_treatmentVlan_t::ePriorityMode is\n" - "\tGSW_EXTENDEDVLAN_TREATMENT_PRIORITY_VAL, use this value for \n" - "\tpriority field of VLAN tag. *\n" - "eInnerVlanActionVidMode\n" - "\t **Select source of VID field of VLAN tag. *\n" - "\tSupported Values :\n" - "\t0 :/** Set VID with given value. */\n" - "\t1 :/** VID is copied from inner VLAN tag of received packet. */\n" - "\t2 :/** VID is copied from outer VLAN tag of received packet. */\n" - "eInnerVlanActionVidVal\n" - "\t **If GSW_EXTENDEDVLAN_treatmentVlan_t::eVidMode is\n" - "\tGSW_EXTENDEDVLAN_TREATMENT_VID_VAL, use this value for VID field\n" - "\tof VLAN tag\n" - "eInnerVlanActionTpid\n" - "\t/** Select source of TPID field of VLAN tag. */\n" - "\tSupported Values :\n" - "\t0 :/** TPID is copied from inner VLAN tag of received packet. */\n" - "\t1 :/** TPID is copied from outer VLAN tag of received packet. */\n" - "\t2 :/** TPID is global configured value. */\n" - "\t3 :/** TPID is 0x8100. */\n" - "eInnerVlanActioneDei\n" - "\t/** Select source of DEI field of VLAN tag. */\n" - "\t :Supported Values :\n" - "\t0 :/** DEI (if applicable) is copied from inner VLAN tag of received packet. */\n" - "\t1 :/** DEI (if applicable) is copied from outer VLAN tag of received packet. */\n" - "\t2 :/** DEI is 0. */\n" - "\t3 :/** DEI is 1. */\n" - "bReassignBridgePortEnable\n" - "\t/** Enable re-assignment of bridge port. */\n" - "nNewBridgePortId\n" - "\t/** If bReassignBridgePort is TRUE, use this value for bridge port. */\n" - "bNewDscpEnable\n" - "\t/** Enable new DSCP. */\n" - "nNewDscp\n" - "\t/** If bNewDscpEnable is TRUE, use this value for DSCP. */\n" - "bNewTrafficClassEnable\n" - "\t/** Enable new traffic class. */\n" - "nNewTrafficClass\n" - "\t/** If bNewTrafficClassEnable is TRUE, use this value for traffic class. */\n" - "bNewMeterEnable\n" - "\t/** Enable new meter. */\n" - "sNewTrafficMeterId\n" - "\t/** New meter ID.\n" - "\tremarks\n" - "\tMeter should be allocated with ref GSW_QOS_METER_ALLOC before extended\n" - "\tVLAN treatment is added. If this extended VLAN treatment is deleted \n" - "\tthis meter should be released with ref GSW_QOS_METER_FREE. */\n" - "bLoopbackEnable\n" - "\t/** Enable loopback. */\n" - "bDaSaSwapEnable\n" - "\t/** Enable destination/source MAC address swap. */\n" - "bMirrorEnable\n" - "\t/** Enable traffic mirrored to the monitoring port. */\n" - "bDscp2PcpMapEnable\n" - "\t" - "nDscp2PcpMapValue\n" - "\t/** DSCP to PCP mapping, if\n" - "\tref GSW_EXTENDEDVLAN_treatmentVlan_t::ePriorityMode in\n" - "\tref GSW_EXTENDEDVLAN_treatment_t::sOuterVlan.ePriorityMode or\n" - "\tref GSW_EXTENDEDVLAN_treatment_t::sInnerVlan.ePriorityMode is\n" - "\tref GSW_EXTENDEDVLAN_TREATMENT_DSCP.\n" - "\tremarks\n" - "\tThe index of array stands for DSCP value. Each byte of the array is 3-bit\n" - "\tPCP value. For implementation, if DSCP2PCP is separate hardware table,\n" - "\ta resource management mechanism should be implemented. Allocation happens\n" - "\twhen extended VLAN treatment added, and release happens when the\n" - "\ttreatment is deleted. For debug, the DSCP2PCP table can be dumped with\n" - "\tref GSW_DSCP2PCP_MAP_GET. */\n", - /* 165: GSW_EXTENDEDVLAN_GET"*/ - "Get Extended VLAN Configuration entry. Valid for GSWIP-3.1.\n" - "It is used to get Extended VLAN Configuration entry with index\n" - "ref GSW_EXTENDEDVLAN_config_t::nEntryIndex, ranging between 0 and\n" - "ref GSW_EXTENDEDVLAN_alloc_t::nNumberOfEntries - 1, with valid\n" - "ref GSW_EXTENDEDVLAN_config_t::nExtendedVlanBlockId returned by\n" - "ref GSW_EXTENDEDVLAN_ALLOC.\n" - "If ref GSW_EXTENDEDVLAN_config_t::nExtendedVlanBlockId is\n" - "ref INVALID_HANDLE, this is absolute index of Extended VLAN Configuration\n" - "entry in hardware, used for debugging purpose.\n" - "Supported Parameters:\n" - "----------------------\n" - "nExtendedVlanBlockId\n" - "\tThis should be valid ID returned by GSW_EXTENDEDVLAN_ALLOC\n" - "\t If it is INVALID_HANDLE, GSW_EXTENDEDVLAN_config_t::nEntryIndex\n" - "\tis absolute index of Extended VLAN entry in hardware for debug purpose\n" - "\tbypassing any check\n" - "nEntryIndex\n" - "\t Index of entry\n", - /* 166: GSW_EXTENDEDVLAN_FREE"*/ - "Release Extended VLAN Configuration block. Valid for GSWIP-3.1.\n" - "It is used to release Extended VLAN Configuration block allocated by\n" - "ref GSW_EXTENDEDVLAN_ALLOC.\n" - "Supported Parameters:\n" - "----------------------\n" - "nExtendedVlanBlockId\n" - "\t/** Total number of extended VLAN entries are requested. Proper value should\n" - "\tbe given for ref GSW_EXTENDEDVLAN_ALLOC. This field is ignored for\n" - "\tref GSW_EXTENDEDVLAN_FREE. */\n", - /* 167: GSW_VLANFILTER_SET"*/ - "Set VLAN Filter entry. Valid for GSWIP-3.1./\n" - "It is used to set VLAN Filter entry with index/\n" - "ref GSW_VLANFILTER_config_t::nEntryIndex, ranging between 0 and/\n" - "ref GSW_VLANFILTER_alloc_t::nNumberOfEntries - 1, with valid/\n" - "ref GSW_VLANFILTER_config_t::nVlanFilterBlockId returned by/\n" - "ref GSW_VLANFILTER_ALLOC./\n" - "Ifref GSW_VLANFILTER_config_t::nVlanFilterBlockId is ref INVALID_HANDLE,/\n" - "this is absolute index of VLAN Filter entry in hardware, used for debugging/\n" - "purpose./\n" - "Supported Parameters:\n" - "----------------------\n" - "\tnVlanFilterBlockId\n" - "\t/** This should be valid ID return by ref GSW_VLANFILTER_ALLOC.\n" - "\tIf it is ref INVALID_HANDLE, ref GSW_VLANFILTER_config_t::nEntryIndex\n" - "\tis absolute index of VLAN Filter entry in hardware for debug purpose,\n" - "\tbypassing any check. */\n" - "\tnEntryIndex\n" - "\t/** Index of entry. ranges between 0 and\n" - "\tref GSW_VLANFILTER_alloc_t::nNumberOfEntries - 1, to\n" - "\tset (ref GSW_VLANFILTER_SET) or get (ref GSW_VLANFILTER_GET)\n" - "\tVLAN FIlter entry. For debug purpose, this field could be absolute index\n" - "\tof VLAN Filter entry in hardware, when\n" - "\tref GSW_VLANFILTER_config_t::nVlanFilterBlockId is\n" - "\tref INVALID_HANDLE. */\n" - "\teVlanFilterMask\n" - "\t/** VLAN TCI filter mask mode.\n" - "\tremarks\n" - "\tIn GSWIP-3.1, this field of first entry in the block will applies to rest\n" - "\tof entries in the same block. */\n" - "\t Supported values:\n" - "\t0:GSW_VLAN_FILTER_TCI_MASK_VID\n" - "\t1:GSW_VLAN_FILTER_TCI_MASK_PCP\n" - "\t2:GSW_VLAN_FILTER_TCI_MASK_TCI\n" - "\tnVal\n" - "\t/** This is value for VLAN filtering. It depends on\n" - "\tref GSW_VLANFILTER_config_t::eVlanFilterMask.\n" - "\tFor GSW_VLAN_FILTER_TCI_MASK_VID, this is 12-bit VLAN ID.\n" - "\tFor GSW_VLAN_FILTER_TCI_MASK_PCP, this is 3-bit PCP field of VLAN tag.\n" - "\tFor GSW_VLAN_FILTER_TCI_MASK_TCI, this is 16-bit TCI of VLAN tag. */\n" - "\tbDiscardMatched\n" - "\t/** Discard packet if match. */\n", - /* 168: GSW_VLANFILTER_GET"*/ - "Get VLAN Filter Entry. Valid for GSWIP-3.1..\n" - "It is used to get VLAN filter entry with index.\n" - "ref GSW_VLANFILTER_config_t::nEntryIndex, ranging between 0 and.\n" - "ref GSW_VLANFILTER_alloc_t::nNumberOfEntries - 1, with valid.\n" - "ref GSW_VLANFILTER_config_t::nVlanFilterBlockId returned by.\n" - "ref GSW_VLANFILTER_ALLOC..\n" - "If ref GSW_VLANFILTER_config_t::nVlanFilterBlockId is ref INVALID_HANDLE,.\n" - "this is absolute index of VLAN Filter entry in hardware, used for debugging.\n" - "purpose..\n" - "Supported Parameters:\n" - "----------------------\n" - "\tnVlanFilterBlockId\n" - "\t/** This should be valid ID return by ref GSW_VLANFILTER_ALLOC.\n" - "\tIf it is ref INVALID_HANDLE, ref GSW_VLANFILTER_config_t::nEntryIndex\n" - "\tis absolute index of VLAN Filter entry in hardware for debug purpose,\n" - "\tbypassing any check. */\n" - "\tnEntryIndex\n" - "\t/** Index of entry. ranges between 0 and\n" - "\tref GSW_VLANFILTER_alloc_t::nNumberOfEntries - 1, to\n" - "\tset (ref GSW_VLANFILTER_SET) or get (ref GSW_VLANFILTER_GET)\n" - "\tVLAN FIlter entry. For debug purpose, this field could be absolute index\n" - "\tof VLAN Filter entry in hardware, when\n" - "\tref GSW_VLANFILTER_config_t::nVlanFilterBlockId is\n" - "\tref INVALID_HANDLE. */\n", - /* 169: GSW_VLANFILTER_FREE"*/ - "Delete VLAN Filter Block. Valid for GSWIP-3.1.\n" - "It is used to release VLAN Filter block allocated by\n" - "ref GSW_VLANFILTER_ALLOC.\n" - "Supported Parameters:\n" - "----------------------\n" - "nVlanFilterBlockId\n" - "\t/** If ref GSW_VLANFILTER_ALLOC is successful, a valid ID will be returned\n" - "\tin this field. Otherwise, ref INVALID_HANDLE is returned in this field.\n" - "\tFor ref GSW_EXTENDEDVLAN_FREE, this field should be valid ID returned by\n" - "\tref GSW_VLANFILTER_ALLOC. */\n", - /* 170: GSW_BRIDGE_CONFIG_SET"*/ - "GSW_BRIDGE_CONFIG_SET\n" - "\tSupported Parameters:\n" - "\t---------------------\n\n" - "\t1. bForce\n" - "\t2. nBridgeId\n" - "\t3. bMacLearningLimitEnable\n" - "\t4. nMacLearningLimit\n" - "\t5. nMacLearningCount\n" - "\t6. nLearningDiscardEvent\n" - "\t7. eForwardBroadcast\n" - "\t8. eForwardUnknownMulticastIp\n" - "\t9. eForwardUnknownMulticastNonIp\n" - "\t10. eForwardUnknownUnicast\n" - "\t11. bBroadcastMeterEnable\n" - "\t12. nBroadcastMeterId\n" - "\t13. bMulticastMeterEnable\n" - "\t14. nMulticastMeterId\n" - "\t15. bUnknownMulticastIpMeterEnable\n" - "\t16. nUnknownMulticastIpMeterId\n" - "\t17. bUnknownMulticastNonIpMeterEnable\n" - "\t18. nUnknownMulticastNonIpMeterId\n" - "\t19. bUnknownUniCastMeterEnable\n" - "\t20. nUnknownUniCastMeterId\n", - /* 171: GSW_BRIDGE_CONFIG_GET"*/ - "GSW_BRIDGE_CONFIG_GET\n" - "\tSupported Parameters:\n" - "\t---------------------\n\n" - "\t1. nBridgeId\n", - /* 172: GSW_BRIDGE_FREE"*/ - "GSW_BRIDGE_FREE\n" - "\tSupported Parameters:\n" - "\t\t---------------------\n\n" - "\t1. nBridgeId\n", - /* 173: GSW_CTP_PORT_CONFIG_SET"*/ - "GSW_CTP_PORT_CONFIG_SET\n" - "\tSupported Parameters:\n" - "\t---------------------\n\n" - "\t1. bForce\n" - "\t2. nLogicalPortId\n" - "\t3. nSubIfIdGroup\n" - "\t4. nBridgePortId\n" - "\t5. bForcedTrafficClass\n" - "\t6. nDefaultTrafficClass\n" - "\t7. bIngressExtendedVlanEnable\n" - "\t8. nIngressExtendedVlanBlockId\n" - "\t9. bIngressExtendedVlanIgmpEnable\n" - "\t10. nIngressExtendedVlanBlockIdIgmp\n" - "\t11. bEgressExtendedVlanEnable\n" - "\t12. nEgressExtendedVlanBlockId\n" - "\t13. bEgressExtendedVlanIgmpEnable\n" - "\t14. nEgressExtendedVlanBlockIdIgmp\n" - "\t15. bIngressNto1VlanEnable\n" - "\t16. bEgressNto1VlanEnable\n" - "\t17. eIngressMarkingMode\n" - "\t18. eEgressMarkingMode\n" - "\t19. bEgressMarkingOverrideEnable\n" - "\t20. eEgressRemarkingMode\n" - "\t21. bIngressMeteringEnable\n" - "\t22. nIngressTrafficMeterId\n" - "\t23. bEgressMeteringEnable \n" - "\t24. nEgressTrafficMeterId \n" - "\t25. bBridgingBypass\n" - "\t26. nDestLogicalPortId\n" - "\t27. nDestSubIfIdGroup\n" - "\t28. bPmapperEnable\n" - "\t29. ePmapperMappingMode\n" - "\t30. nFirstFlowEntryIndex\n" - "\t31. nNumberOfFlowEntries\n" - "\t32. bIngressLoopbackEnable\n" - "\t33. bIngressDaSaSwapEnable\n" - "\t34. bEgressLoopbackEnable\n" - "\t35. bEgressDaSaSwapEnable\n" - "\t36. bIngressMirrorEnable\n" - "\t37. bEgressMirrorEnable\n", - /* 174: GSW_CTP_PORT_CONFIG_GET"*/ - "GSW_CTP_PORT_CONFIG_GET\n" - "\tSupported Parameters:\n" - "\t---------------------\n\n" - "\t2. nLogicalPortId\n" - "\t3. nSubIfIdGroup\n", - /* 175: GSW_CTP_PORT_CONFIG_RESET"*/ - "GSW_CTP_PORT_CONFIG_RESET\n" - "\tSupported Parameters:\n" - "\t---------------------\n\n" - "\t1. bForce\n" - "\t2. nLogicalPortId\n" - "\t3. nSubIfIdGroup\n", - /* 176: GSW_BRIDGE_PORT_CONFIG_SET"*/ - "GSW_BRIDGE_PORT_CONFIG_SET\n" - "\tSupported Parameters:\n" - "\t---------------------\n\n" - "\t1. bForce\n" - "\t2. nBridgePortId\n" - "\t3. nBridgeId\n" - "\t4. bIngressExtendedVlanEnable\n" - "\t5. nIngressExtendedVlanBlockId\n" - "\t6. bEgressExtendedVlanEnable\n" - "\t7. nEgressExtendedVlanBlockId\n" - "\t8. eIngressMarkingMode\n" - "\t9. eEgressRemarkingMode\n" - "\t10. bIngressMeteringEnable\n" - "\t11. nIngressTrafficMeterId\n" - "\t12. bEgressMeteringEnable\n" - "\t13. nEgressTrafficMeterId\n" - "\t14. bEgressBroadcastSubMeteringEnable\n" - "\t15. nEgressBroadcastSubMeteringId\n" - "\t16. bEgressMulticastSubMeteringEnable\n" - "\t17. nEgressMulticastSubMeteringId\n" - "\t18. bEgressUnknownMulticastIPSubMeteringEnable\n" - "\t19. nEgressUnknownMulticastIPSubMeteringId\n" - "\t20. bEgressUnknownMulticastNonIPSubMeteringEnable\n" - "\t21. nEgressUnknownMulticastNonIPSubMeteringId\n" - "\t22. bEgressUnknownUnicastSubMeteringEnable\n" - "\t23. nEgressUnknownUnicastSubMeteringId\n" - "\t24. nDestLogicalPortId\n" - "\t25. nDestSubIfIdGroup\n" - "\t26. bPmapperEnable\n" - "\t27. ePmapperMappingMode\n" - "\t28. bBridgePortMapEnable\n" - "\t\t Index\n" - "\t\t MapValue\n" - "\t29. bMcDestIpLookupDisable\n" - "\t30. bMcSrcIpLookupEnable\n" - "\t31. bDestMacLookupDisable\n" - "\t32. bSrcMacLearningDisable\n" - "\t33. bMacSpoofingDetectEnable\n" - "\t34. bPortLockEnable\n" - "\t35. bMacLearningLimitEnable\n" - "\t36. bIngressVlanFilterEnable\n" - "\t37. nIngressVlanFilterBlockId\n" - "\t38. bBypassEgressVlanFilter1\n" - "\t39. bEgressVlanFilter1Enable\n" - "\t40. nEgressVlanFilter1BlockId\n" - "\t41. bEgressVlanFilter2Enable\n" - "\t42. nEgressVlanFilter2BlockId\n", - /* 177: GSW_BRIDGE_PORT_CONFIG_GET"*/ - "GSW_BRIDGE_PORT_CONFIG_GET\n" - "\tSupported Parameters:\n" - "\t\t---------------------\n\n" - "\t1. nBridgePortId\n", - /* 178: GSW_BRIDGE_PORT_ALLOC"*/ - "GSW_BRIDGE_PORT_ALLOC\n" - "\tSupported Parameters:\n" - "\t\t---------------------\n\n" - "\t1. No Parameters needed\n", - /* 179: GSW_BRIDGE_PORT_FREE"*/ - "GSW_BRIDGE_PORT_FREE\n" - "\tSupported Parameters:\n" - "\t\t---------------------\n\n" - "\t1. nBridgePortId\n", - /* 180: GSW_EXTENDEDVLAN_ALLOC"*/ - "GSW_EXTENDEDVLAN_ALLO\nC", - /* 181: GSW_VLANFILTER_ALLOC"*/ - "GSW_VLANFILTER_ALLOC\n", - /* 182: GSW_BRIDGE_ALLOC"*/ - "GSW_BRIDGE_ALLOC\n" - "\tSupported Parameters:\n" - "\t\t---------------------\n\n" - "\t1. No Parameters needed\n", - /* 183: GSW_PMAC_RMON_GET"*/ - "GSW_PMAC_RMON_GET\n", - /* 184: GSW_DEBUG_CTPTABLE_STATUS"*/ - "GSW_DEBUG_CTPTABLE_STATUS\n" - "\tSupported Parameters:\n" - "\t\t---------------------\n\n" - "\t1. Index\n" - "\t2. CheckAll (0 or 1)\n", - /* 185: GSW_DEBUG_BRDGPORTTABLE_STATUS"*/ - "GSW_DEBUG_BRDGPORTTABLE_STATUS\n" - "\tSupported Parameters:\n" - "\t\t---------------------\n\n" - "\t1. Index\n" - "\t2. CheckAll (0 or 1)\n", - /* 186: GSW_DEBUG_BRDGTABLE_STATUS"*/ - "GSW_DEBUG_BRDGTABLE_STATUS\n" - "\t\t---------------------\n\n" - "\t1. Index\n", - /* 187: GSW_DEBUG_EXVLANTABLE_STATUS"*/ - "GSW_DEBUG_EXVLANTABLE_STATUS\n", - /* 188: GSW_PMAC_RMON_GET"*/ - "GSW_DEBUG_VLANFILTERTABLE_STATUS\n", - /* 189: GSW_DEBUG_VLANFILTERTABLE_STATUS"*/ - "GSW_DEBUG_METERTABLE_STATUS\n", - /* 190: GSW_DEBUG_DSCP2PCPTABLE_STATUS"*/ - "GSW_DEBUG_DSCP2PCPTABLE_STATUS\n", - /* 191: GSW_DEBUG_PMAPPER_STATUS"*/ - "GSW_DEBUG_PMAPPER_STATUS\n", - /* 192: GSW_DEBUG_PMAC_EG"*/ - "GSW_DEBUG_PMAC_EG\n", - /* 193: GSW_DEBUG_PMAC_IG"*/ - "GSW_DEBUG_PMAC_IG\n", - /* 194: GSW_DEBUG_PMAC_BP"*/ - "GSW_DEBUG_PMAC_IG\n", - /* 195: GSW_DEBUG_DEF_QMAP"*/ - "GSW_DEBUG_DEF_QMAP\n", - /* 196: GSW_DEBUG_DEF_BYP_QMAP"*/ - "GSW_DEBUG_DEF_BYP_QMAP\n", - /* 197: xgmac"*/ - "GSW_XGMAC_CFG\n", - /* 198: GSW_PMAC_BM_CFG_SET */ - "Configure the backpressure mapping table between Tx Queues for Egress and Rx Queues \n" - "for Ingress congestion on given DMA channel. \n" - "\nParameter:\n----------\n" - "nTxDmaChanId :\n" - "\tTx DMA Channel Identifier (0..15). \n" - "txQMask :\n" - "\tTransmit Queues Mask - Upto 32 Egress Queues. \n" - "rxPortMask :\n" - "\tReceive (Ingress) ports congestion Mask - Upto 16 ports. \n" - "\n", - - /* 199: GSW_PMAC_EG_CFG_SET */ - "Configure the egress attributes on given PMAC ports. \n" - "\nParameter:\n----------\n" - "nDestPortId :\n" - "\tDestination Port Identifier (0..15) - Part of Table Index (Bits 0-3). \n" - "bProcFlagsSelect :\n" - "\tSelector for Processing Flags (MPE1, MPE2, DEC & ENC bits). If disabled, \n" - "\tthen the combination of flags bDecFlag, bEncFlag, bMpe1Flag and bMpe2Flag\n" - "\t are considered as index instead of nTrafficClass. For using these \n" - "\tcombination flags, turn ON this boolean selector.\n" - "\tTC or combination processing flag is decided at global \n" - "\tlevel through bProcFlagsEgPMACEna.\n" - "\tIt is expected that user always passes correct value based \n" - "\tupon bProcFlagsEgMPACEna. If mismatch found with global PMAC mode,\n" - "\t SWAPI will return error code.\n" - "nTrafficClass :\n" - "\tTraffic Class value [Lower 4 -bits (LSB-0, 1, 2, 3)].- Part of Table Index Bits 4-7.\n" - "\tThis value is considered, only when bProcFlagsSelect is not set.\n" - "nFlowIDMsb :\n" - "\tFlow-ID MSB (2-bits) value - valid range (0..2). - Part of Table Index Bits 8-9.\n" - "bMpe1Flag :\n" - "\tMPE-1 Flag value - Part of Table Index Bit 4. Valid only when bProcFlagsSelect is set\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: MPE-1 Marked Flag disabled.\n" - "\n" - "\t1: MPE-1 Marked Flag Enabled.\n" - "bMpe2Flag :\n" - "\tMPE-2 Flag value - Part of Table Index Bit 5. Valid only when bProcFlagsSelect is set.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: MPE-2 Marked Flag disabled.\n" - "\n" - "\t1: MPE-2 Marked Flag Enabled.\n" - "bEncFlag :\n" - "\tCryptography Encryption Action Flag value - Part of Table Index Bit 7.\n" - "\t Valid only, when bProcFlagsSelect is set\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Cryptography Encryption Action Flag disabled.\n" - "\n" - "\t1: Cryptography Encryption Action Flag Enabled.\n" - "bDecFlag :\n" - "\tCryptography Decryption Action Flag value - Part of Table Index Bit 6.\n" - "\t Valid only, when bProcFlagsSelect is set.\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Cryptography Decryption Action Flag disabled.\n" - "\n" - "\t1: Cryptography Decryption Action Flag Enabled.\n" - "nRxDmaChanId :\n" - "\tReceive DMA Channel Identifier (0..15) \n" - "bRemL2Hdr :\n" - "\t To remove L2 header & additional bytes (True) or Not (False) \n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: L2 header is not removed.\n" - "\n" - "\t1: L2 Header and byte after L2 header is removed.\n" - "numBytesRem :\n" - "\tNo. of bytes to be removed after Layer-2 Header, valid when bRemL2Hdr is set. \n" - "bFcsEna :\n" - "\tPacket has FCS (True) or Not (False). \n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: The packet has no FCS.\n" - "\n" - "\t1: The packet has FCS.\n" - "bPmacEna :\n" - "\tPacket has PMAC header or not. \n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: The packet has no PMAC header.\n" - "\n" - "\t1: The packet has PMAC header.\n" - "nResDW1 :\n" - "\t4-bits Reserved Field in DMA Descriptor - DW1 (bit 7 to 4). \n" - "nRes1DW0 :\n" - "\t3-bits Reserved Field in DMA Descriptor - DW0 (bit 31 to 29). \n" - "nRes2DW0 :\n" - "\t2-bits Reserved Field in DMA Descriptor - DW0 (bit 14 to 13). \n" - "\n", - - /* 200: GSW_PMAC_IG_CFG_SET */ - "Read egress attributes config on given PMAC port. \n" - "\nParameter:\n----------\n" - "nTxDmaChanId :\n" - "\tTx DMA Channel Identifier (0..15). \n" - "bErrPktsDisc :\n" - "\tError set packets to be discarded .\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Do not discard packet with error flag set\n" - "\n" - "\t1: discard packet with error flag set.\n" - "\n" - "bPmapDefault :\n" - "\tPort Map info from default PMAC header (True) or incoming PMAC header (False).\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: PMAP from PMAC header.\n" - "\n" - "\t1: PMAP from default PMAC header.\n" - "\n" - "bPmapEna :\n" - "\tPort Map Enable info from default PMAC header (True) or incoming PMAC header (False).\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: PMAP Enable from PMAC header.\n" - "\n" - "\t1: PMAP Enable from default PMAC header.\n" - "\n" - "bClassDefault :\n" - "\tClass Info from default PMAC header (True) or incoming PMAC header (False).\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Class from Packet descriptor.\n" - "\n" - "\t1: Class from from default PMAC header.\n" - "\n" - "bClassEna :\n" - "\tClass Enable info from default PMAC header (True) or incoming PMAC header (False).\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: Class Enable from Packet descriptor.\n" - "\n" - "\t1: Class Enable from default PMAC header.\n" - "\n" - "bSubIdDefault :\n" - "\tSub_Interface Id Info from default PMAC header (True) or source \n" - " sub-If in packet descriptor (False).\n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: SubID from Packet descriptor source SubInterface ID.\n" - "\n" - "\t1: SubId from default PMAC header.\n" - "\n" - "bSpIdDefault :\n" - "\tSource Port Id from default PMAC header (True) or incoming PMAC header (False) \n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: SubID from PMAC header.\n" - "\n" - "\t1: SPPID from default PMAC header.\n" - "\n" - "bPmacPresent :\n" - "\tPacket PMAC header is present (True) or not (False) \n" - "\tSupported Values:\n" - "\t-----------------\n" - "\t0: The packet has no PMAC header.\n" - "\n" - "\t1: The packet has PMAC header.\n" - "\n" - "defPmacHdr :\n" - "\tDefault PMAC header - 8 Bytes Configuration .\n" - "\tSupported Formats: 12:34:45:67:89:0A:0B:0C" - "\n", - /* 201: GSW_DEBUG_CTP_STATISTICS"*/ - "GSW_DEBUG_CTP_STATISTICS\n" - "\tSupported Parameters:\n" - "\t\t---------------------\n\n" - "\t1. Index\n", - /* 202: GSW_DEBUG_LP_STATISTICS"*/ - "GSW_DEBUG_LP_STATISTICS\n" - "\tSupported Parameters:\n" - "\t\t---------------------\n\n" - "\t1. Index\n", - /* 203: GSWSS "*/ - "GSW_GSWSS_CFG", - /* 204: LMAC "*/ - "GSW_LMAC_CFG", - /* 205: GSW_CTP_PORT_ASSIGNMENT_ALLOC "*/ - "GSW_CTP_PORT_ASSIGNMENT_ALLOC\n" - "\tSupported Parameters:\n" - "\t---------------------\n\n" - "\t1. nLogicalPortId\n" - "\t2. nNumberOfCtpPort\n" - "\t3. eMode\n" - "\t4. nBridgePortId\n", - /* 206: GSW_CTP_PORT_ASSIGNMENT_FREE "*/ - "GSW_CTP_PORT_ASSIGNMENT_FREE" - "\tSupported Parameters:\n" - "\t---------------------\n\n" - "\t1. nLogicalPortId\n", - /* 207: MACSEC "*/ - "E160_MACSEC_CFG", - /* 208: GSW_IRQ_REGISTER "*/ - "GSW_IRQ_REGISTER", - - /* 209: GSW_IRQ_UNREGISTER "*/ - "GSW_IRQ_UNREGISTER", - - /* 210: GSW_IRQ_ENABLE "*/ - "GSW_IRQ_ENABLE", - - /* 211: GSW_IRQ_DISBALE "*/ - "GSW_IRQ_DISBALE", - - /* 212: GSW_DEBUG_PRINT_PCEIRQ_LIST "*/ - "GSW_DEBUG_PRINT_PCEIRQ_LIST", - /* 213: GSW_RMON_FLOW_GET "*/ - "GSW_RMON_FLOW_GET", - /* 214: GSW_RMON_TFLOW_CLEAR "*/ - "GSW_RMON_TFLOW_CLEAR", - /* 215: GSW_DSCP2PCP_MAP_GET "*/ - "GSW_DSCP2PCP_MAP_GET", - /* 216: GSW_DEFAUL_MAC_FILTER_GET "*/ - "GSW_DEFAUL_MAC_FILTER_GET", - /* 217: GSW_DEFAUL_MAC_FILTER_SET "*/ - "GSW_DEFAUL_MAC_FILTER_SET", - /* 218: GSW_QOS_COLOR_MARKING_TABLE_SET "*/ - "GSW_QOS_COLOR_MARKING_TABLE_SET", - /* 219: GSW_QOS_COLOR_MARKING_TABLE_GET "*/ - "GSW_QOS_COLOR_MARKING_TABLE_GET", - /* 220: GSW_QOS_COLOR_REMARKING_TABLE_GET "*/ - "GSW_QOS_COLOR_REMARKING_TABLE_GET", - /* 221: GSW_QOS_COLOR_REMARKING_TABLE_SET "*/ - "GSW_QOS_COLOR_REMARKING_TABLE_SET", - /* 222: GSW_DEBUG_RMON_PORT_GET "*/ - "Read out the Ethernet port statistic counter (RMON counter). The zero-based\n" - "'nPortId' structure element describes the logical/ctp/bridge switch port for the\n" - "requested statistic information. - NOTE : used by test team and automation only\n" - "\nParameter:\n----------\n" - "nPortId :\n" - "ePortType : \n", - /* 223: GSW_CTP_PORT_RMON_GET "*/ - "Read out the Ethernet port statistic counter (RMON counter). The zero-based\n" - "'nPortId' structure element describes the CTP switch port for the\n" - "requested statistic information.\n" - "\nParameter:\n----------\n" - "nPortId :\n", - /* 224: GSW_BRIDGE_PORT_RMON_GET "*/ - "Read out the Ethernet port statistic counter (RMON counter). The zero-based\n" - "'nPortId' structure element describes the Bridge switch port for the\n" - "requested statistic information.\n" - "\nParameter:\n----------\n" - "nPortId :\n", - /* 225: GSW_CTP_PORT_PCEBYPASS_RMON_GET "*/ - "Read out the Ethernet port statistic counter (RMON counter). The zero-based\n" - "'nPortId' structure element describes the CTP Bypass switch port for the\n" - "requested statistic information.\n" - "\nParameter:\n----------\n" - "nPortId :\n", - /* 226: GSW_RMON_PORT_GET_ALL "*/ - "Read out the Ethernet port statistic counter (RMON counter from nPortId 0 t0 8 - ctp or bridge. The zero-based\n" - "\nParameter:\n----------\n" - "ePortType :\n", - /* 227: DUMP_MEM "*/ - "GSW_DUMP_MEM", - - NULL -}; - -//#endif /* SWITCHAPI_HELP_TEXT */ +/**************************************************************************** + + Copyright 2010 + Lantiq Deutschland GmbH + Am Campeon 3; 85579 Neubiberg, Germany + + For licensing information, see the file 'LICENSE' in the root folder of + this software module. + +*****************************************************************************/ +#include "ltq_cli_lib.h" +#include "gsw_cli_fkts.h" + +#ifndef IOCTL_PCTOOL +#include <stdio.h> +#include "switch_cli_config.h" +#endif + +const GSW_CommandTable_t cmdTable[] = { + {/* 0 */ "GSW_8021X_EAPOL_RULE_GET", (command_fkt)gsw_8021x_eapol_rule_get}, + {/* 1 */ "GSW_8021X_EAPOL_RULE_SET", (command_fkt)gsw_8021x_eapol_rule_set}, + {/* 2 */ "GSW_8021X_PORT_CFG_GET", (command_fkt)gsw_8021x_port_cfg_get}, + {/* 3 */ "GSW_8021X_PORT_CFG_SET", (command_fkt)gsw_8021x_port_cfg_set}, + {/* 4 */ "GSW_CAP_GET", (command_fkt)gsw_cap_get}, + {/* 5 */ "GSW_CFG_GET", (command_fkt)gsw_cfg_get}, + {/* 6 */ "GSW_CFG_SET", (command_fkt)gsw_cfg_set}, + {/* 7 */ "GSW_CPU_PORT_CFG_GET", (command_fkt)gsw_cpu_port_cfg_get}, + {/* 8 */ "GSW_CPU_PORT_CFG_SET", (command_fkt)gsw_cpu_port_cfg_set}, + {/* 9 */ "GSW_CPU_PORT_EXTEND_CFG_GET", (command_fkt)gsw_cpu_port_extend_cfg_get}, + {/* 10 */ "GSW_CPU_PORT_EXTEND_CFG_SET", (command_fkt)gsw_cpu_port_extend_cfg_set}, + {/* 11 */ "GSW_DISABLE", (command_fkt)gsw_disable}, + {/* 12 */ "GSW_ENABLE", (command_fkt)gsw_enable}, + {/* 13 */ "GSW_HW_INIT", (command_fkt)gsw_hw_init}, + {/* 14 */ "GSW_MAC_TABLE_CLEAR", (command_fkt)gsw_mac_table_clear}, + {/* 15 */ "GSW_MAC_TABLE_ENTRY_ADD", (command_fkt)gsw_mac_table_entry_add}, + {/* 16 */ "GSW_MAC_TABLE_ENTRY_QUERY", (command_fkt)gsw_mac_table_entry_query}, + {/* 17 */ "GSW_MAC_TABLE_ENTRY_READ", (command_fkt)gsw_mac_table_entry_read}, + {/* 18 */ "GSW_MAC_TABLE_ENTRY_REMOVE", (command_fkt)gsw_mac_table_entry_remove}, + {/* 19 */ "GSW_MDIO_CFG_GET", (command_fkt)gsw_mdio_cfg_get}, + {/* 20 */ "GSW_MDIO_CFG_SET", (command_fkt)gsw_mdio_cfg_set}, + {/* 21 */ "GSW_MDIO_DATA_READ", (command_fkt)gsw_mdio_data_read}, + {/* 22 */ "GSW_MDIO_DATA_WRITE", (command_fkt)gsw_mdio_data_write}, + {/* 23 */ "GSW_MMD_DATA_READ", (command_fkt)gsw_mmd_data_read}, + {/* 24 */ "GSW_MMD_DATA_WRITE", (command_fkt)gsw_mmd_data_write}, + {/* 25 */ "GSW_MONITOR_PORT_CFG_GET", (command_fkt)gsw_monitor_port_cfg_get}, + {/* 26 */ "GSW_MONITOR_PORT_CFG_SET", (command_fkt)gsw_monitor_port_cfg_set}, + {/* 27 */ "GSW_MULTICAST_ROUTER_PORT_ADD", (command_fkt)gsw_multicast_router_port_add}, + {/* 28 */ "GSW_MULTICAST_ROUTER_PORT_READ", (command_fkt)gsw_multicast_router_port_read}, + {/* 29 */ "GSW_MULTICAST_ROUTER_PORT_REMOVE", (command_fkt)gsw_multicast_router_port_remove}, + {/* 30 */ "GSW_MULTICAST_SNOOP_CFG_GET", (command_fkt)gsw_multicast_snoop_cfg_get}, + {/* 31 */ "GSW_MULTICAST_SNOOP_CFG_SET", (command_fkt)gsw_multicast_snoop_cfg_set}, + {/* 32 */ "GSW_MULTICAST_TABLE_ENTRY_ADD", (command_fkt)gsw_multicast_table_entry_add}, + {/* 33 */ "GSW_MULTICAST_TABLE_ENTRY_READ", (command_fkt)gsw_multicast_table_entry_read}, + {/* 34 */ "GSW_MULTICAST_TABLE_ENTRY_REMOVE", (command_fkt)gsw_multicast_table_entry_remove}, + {/* 35 */ "GSW_PORT_CFG_GET", (command_fkt)gsw_port_cfg_get}, + {/* 36 */ "GSW_PORT_CFG_SET", (command_fkt)gsw_port_cfg_set}, + {/* 37 */ "GSW_PORT_LINK_CFG_GET", (command_fkt)gsw_port_link_cfg_get}, + {/* 38 */ "GSW_PORT_LINK_CFG_SET", (command_fkt)gsw_port_link_cfg_set}, + {/* 39 */ "GSW_PORT_PHY_ADDR_GET", (command_fkt)gsw_port_phy_addr_get}, + {/* 40 */ "GSW_PORT_PHY_QUERY", (command_fkt)gsw_port_phy_query}, + {/* 41 */ "GSW_PORT_REDIRECT_GET", (command_fkt)gsw_port_redirect_get}, + {/* 42 */ "GSW_PORT_REDIRECT_SET", (command_fkt)gsw_port_redirect_set}, + {/* 43 */ "GSW_PORT_RGMII_CLK_CFG_GET", (command_fkt)gsw_port_rgmii_clk_cfg_get}, + {/* 44 */ "GSW_PORT_RGMII_CLK_CFG_SET", (command_fkt)gsw_port_rgmii_clk_cfg_set}, + {/* 45 */ "GSW_QOS_CLASS_DSCP_GET", (command_fkt)gsw_qos_class_dscp_get}, + {/* 46 */ "GSW_QOS_CLASS_DSCP_SET", (command_fkt)gsw_qos_class_dscp_set}, + {/* 47 */ "GSW_QOS_CLASS_PCP_GET", (command_fkt)gsw_qos_class_pcp_get}, + {/* 48 */ "GSW_QOS_CLASS_PCP_SET", (command_fkt)gsw_qos_class_pcp_set}, + {/* 49 */ "GSW_QOS_DSCP_CLASS_GET", (command_fkt)gsw_qos_dscp_class_get}, + {/* 50 */ "GSW_QOS_DSCP_CLASS_SET", (command_fkt)gsw_qos_dscp_class_set}, + {/* 51 */ "GSW_QOS_DSCP_DROP_PRECEDENCE_CFG_GET", (command_fkt)gsw_qos_dscp_drop_precedence_cfg_get}, + {/* 52 */ "GSW_QOS_DSCP_DROP_PRECEDENCE_CFG_SET", (command_fkt)gsw_qos_dscp_drop_precedence_cfg_set}, + {/* 53 */ "GSW_QOS_METER_CFG_GET", (command_fkt)gsw_qos_meter_cfg_get}, + {/* 54 */ "GSW_QOS_METER_CFG_SET", (command_fkt)gsw_qos_meter_cfg_set}, + {/* 55 */ "GSW_QOS_METER_PORT_ASSIGN", (command_fkt)gsw_qos_meter_port_assign}, + {/* 56 */ "GSW_QOS_METER_PORT_DEASSIGN", (command_fkt)gsw_qos_meter_port_deassign}, + {/* 57 */ "GSW_QOS_METER_PORT_GET", (command_fkt)gsw_qos_meter_port_get}, + {/* 58 */ "GSW_QOS_PCP_CLASS_GET", (command_fkt)gsw_qos_pcp_class_get}, + {/* 59 */ "GSW_QOS_PCP_CLASS_SET", (command_fkt)gsw_qos_pcp_class_set}, + {/* 60 */ "GSW_QOS_PORT_CFG_GET", (command_fkt)gsw_qos_port_cfg_get}, + {/* 61 */ "GSW_QOS_PORT_CFG_SET", (command_fkt)gsw_qos_port_cfg_set}, + {/* 62 */ "GSW_QOS_PORT_REMARKING_CFG_GET", (command_fkt)gsw_qos_port_remarking_cfg_get}, + {/* 63 */ "GSW_QOS_PORT_REMARKING_CFG_SET", (command_fkt)gsw_qos_port_remarking_cfg_set}, + {/* 64 */ "GSW_QOS_QUEUE_PORT_GET", (command_fkt)gsw_qos_queue_port_get}, + {/* 65 */ "GSW_QOS_QUEUE_PORT_SET", (command_fkt)gsw_qos_queue_port_set}, + {/* 66 */ "GSW_QOS_SCHEDULER_CFG_GET", (command_fkt)gsw_qos_scheduler_cfg_get}, + {/* 67 */ "GSW_QOS_SCHEDULER_CFG_SET", (command_fkt)gsw_qos_scheduler_cfg_set}, + {/* 68 */ "GSW_QOS_SHAPER_CFG_GET", (command_fkt)gsw_qos_shaper_cfg_get}, + {/* 69 */ "GSW_QOS_SHAPER_CFG_SET", (command_fkt)gsw_qos_shaper_cfg_set}, + {/* 70 */ "GSW_QOS_SHAPER_QUEUE_ASSIGN", (command_fkt)gsw_qos_shaper_queue_assign}, + {/* 71 */ "GSW_QOS_SHAPER_QUEUE_DEASSIGN", (command_fkt)gsw_qos_shaper_queue_deassign}, + {/* 72 */ "GSW_QOS_SHAPER_QUEUE_GET", (command_fkt)gsw_qos_shaper_queue_get}, + {/* 73 */ "GSW_QOS_STORM_CFG_GET", (command_fkt)gsw_qos_storm_cfg_get}, + {/* 74 */ "GSW_QOS_STORM_CFG_SET", (command_fkt)gsw_qos_storm_cfg_set}, + {/* 75 */ "GSW_QOS_WRED_CFG_GET", (command_fkt)gsw_qos_wred_cfg_get}, + {/* 76 */ "GSW_QOS_WRED_CFG_SET", (command_fkt)gsw_qos_wred_cfg_set}, + {/* 77 */ "GSW_QOS_WRED_QUEUE_CFG_GET", (command_fkt)gsw_qos_wred_queue_cfg_get}, + {/* 78 */ "GSW_QOS_WRED_QUEUE_CFG_SET", (command_fkt)gsw_qos_wred_queue_cfg_set}, + {/* 79 */ "GSW_RMON_CLEAR", (command_fkt)gsw_rmon_clear}, + {/* 80 */ "GSW_RMON_PORT_GET", (command_fkt)gsw_rmon_port_get}, + {/* 81 */ "GSW_STP_BPDU_RULE_GET", (command_fkt)gsw_stp_bpdu_rule_get}, + {/* 82 */ "GSW_STP_BPDU_RULE_SET", (command_fkt)gsw_stp_bpdu_rule_set}, + {/* 83 */ "GSW_STP_PORT_CFG_GET", (command_fkt)gsw_stp_port_cfg_get}, + {/* 84 */ "GSW_STP_PORT_CFG_SET", (command_fkt)gsw_stp_port_cfg_set}, + {/* 85 */ "GSW_VERSION_GET", (command_fkt)gsw_version_get}, + {/* 86 */ "GSW_VLAN_ID_CREATE", (command_fkt)gsw_vlan_id_create}, + {/* 87 */ "GSW_VLAN_ID_DELETE", (command_fkt)gsw_vlan_id_delete}, + {/* 88 */ "GSW_VLAN_ID_GET", (command_fkt)gsw_vlan_id_get}, + {/* 89 */ "GSW_VLAN_PORT_CFG_GET", (command_fkt)gsw_vlan_port_cfg_get}, + {/* 90 */ "GSW_VLAN_PORT_CFG_SET", (command_fkt)gsw_vlan_port_cfg_set}, + {/* 91 */ "GSW_VLAN_PORT_MEMBER_ADD", (command_fkt)gsw_vlan_port_member_add}, + {/* 92 */ "GSW_VLAN_PORT_MEMBER_READ", (command_fkt)gsw_vlan_port_member_read}, + {/* 93 */ "GSW_VLAN_PORT_MEMBER_REMOVE", (command_fkt)gsw_vlan_port_member_remove}, + {/* 94 */ "GSW_VLAN_MEMBER_INIT", (command_fkt)gsw_vlan_member_init}, + {/* 95 */ "GSW_VLAN_RESERVED_ADD", (command_fkt)gsw_vlan_reserved_add}, + {/* 96 */ "GSW_VLAN_RESERVED_REMOVE", (command_fkt)gsw_vlan_reserved_remove}, + {/* 97 */ "GSW_WOL_CFG_GET", (command_fkt)gsw_wol_cfg_get}, + {/* 98 */ "GSW_WOL_CFG_SET", (command_fkt)gsw_wol_cfg_set}, + {/* 99 */ "GSW_WOL_PORT_CFG_GET", (command_fkt)gsw_wol_port_cfg_get}, + {/* 100*/ "GSW_WOL_PORT_CFG_SET", (command_fkt)gsw_wol_port_cfg_set}, + {/* 101 */ "GSW_IRQ_GET", (command_fkt)gsw_irq_get}, + {/* 102 */ "GSW_IRQ_MASK_GET", (command_fkt)gsw_irq_mask_get}, + {/* 103 */ "GSW_IRQ_MASK_SET", (command_fkt)gsw_irq_mask_set}, + {/* 104 */ "GSW_IRQ_STATUS_CLEAR", (command_fkt)gsw_irq_status_clear}, + {/* 105 */ "GSW_PCE_RULE_DELETE", (command_fkt)gsw_pce_rule_delete}, + {/* 106 */ "GSW_PCE_RULE_READ", (command_fkt)gsw_pce_rule_read}, + {/* 107 */ "GSW_PCE_RULE_WRITE", (command_fkt)gsw_pce_rule_write}, + {/* 108 */ "GSW_REGISTER_GET", (command_fkt)gsw_register_get}, + {/* 109 */ "GSW_REGISTER_SET", (command_fkt)gsw_register_set}, + {/* 110 */ "GSW_RESET", (command_fkt)gsw_reset}, + {/* 111 */ "GSW_RMON_EXTEND_GET", (command_fkt)gsw_rmon_extend_get}, + {/* 112 */ "GSW_TIMESTAMP_TIMER_GET", (command_fkt)gsw_timestamp_timer_get}, + {/* 113 */ "GSW_TIMESTAMP_TIMER_SET", (command_fkt)gsw_timestamp_timer_set}, + {/* 114 */ "GSW_TIMESTAMP_PORT_READ", (command_fkt)gsw_timestamp_port_read}, + {/* 115 */ "GSW_TRUNKING_CFG_GET", (command_fkt)gsw_trunking_cfg_get}, + {/* 116 */ "GSW_TRUNKING_CFG_SET", (command_fkt)gsw_trunking_cfg_set}, + {/* 117 */ "GSW_TRUNKING_PORT_CFG_GET", (command_fkt)gsw_trunking_port_cfg_get}, + {/* 118 */ "GSW_TRUNKING_PORT_CFG_SET", (command_fkt)gsw_trunking_port_cfg_set}, + {/* 119 */ "GSW_QOS_WRED_PORT_CFG_GET", (command_fkt)gsw_qos_wred_port_cfg_get}, + {/* 120 */ "GSW_QOS_WRED_PORT_CFG_SET", (command_fkt)gsw_qos_wred_port_cfg_set}, + {/* 121 */ "GSW_QOS_FLOWCTRL_CFG_GET", (command_fkt)gsw_qos_flowctrl_cfg_get}, + {/* 122 */ "GSW_QOS_FLOWCTRL_CFG_SET", (command_fkt)gsw_qos_flowctrl_cfg_set}, + {/* 123 */ "GSW_QOS_FLOWCTRL_PORT_CFG_GET", (command_fkt)gsw_qos_flowctrl_port_cfg_get}, + {/* 124 */ "GSW_QOS_FLOWCTRL_PORT_CFG_SET", (command_fkt)gsw_qos_flowctrl_port_cfg_set}, + {/* 125 */ "GSW_QOS_QUEUE_BUFFER_RESERVE_CFG_GET", (command_fkt)gsw_qos_queue_buffer_reserve_cfg_get}, + {/* 126 */ "GSW_QOS_QUEUE_BUFFER_RESERVE_CFG_SET", (command_fkt)gsw_qos_queue_buffer_reserve_cfg_set}, + + {/* 127 */ "GSW_SVLAN_CFG_GET", (command_fkt)gsw_svlan_cfg_get}, + {/* 128 */ "GSW_SVLAN_CFG_SET", (command_fkt)gsw_svlan_cfg_set}, + {/* 129 */ "GSW_SVLAN_PORT_CFG_GET", (command_fkt)gsw_svlan_port_cfg_get}, + {/* 130 */ "GSW_SVLAN_PORT_CFG_SET", (command_fkt)gsw_svlan_port_cfg_set}, + {/* 131 */ "GSW_QOS_SVLAN_CLASS_PCP_PORT_GET", (command_fkt)gsw_qos_svlan_class_pcp_port_get}, + {/* 132 */ "GSW_QOS_SVLAN_CLASS_PCP_PORT_SET", (command_fkt)gsw_qos_svlan_class_pcp_port_set}, + {/* 133 */ "GSW_QOS_SVLAN_PCP_CLASS_GET", (command_fkt)gsw_qos_svlan_pcp_class_get}, + {/* 134 */ "GSW_QOS_SVLAN_PCP_CLASS_SET", (command_fkt)gsw_qos_svlan_pcp_class_set}, + {/* 135 */ "GSW_PCE_EG_VLAN_CFG_SET", (command_fkt)gsw_pce_eg_vlan_cfg_set}, + {/* 136 */ "GSW_PCE_EG_VLAN_CFG_GET", (command_fkt)gsw_pce_eg_vlan_cfg_get}, + {/* 137 */ "GSW_PCE_EG_VLAN_ENTRY_WRITE", (command_fkt)gsw_pce_eg_vlan_entry_write}, + {/* 138 */ "GSW_PCE_EG_VLAN_ENTRY_READ", (command_fkt)gsw_pce_eg_vlan_entry_read}, + {/* 139 */ "GSW_PMAC_BM_CFG_GET", (command_fkt)gsw_pmac_bm_cfg_get}, + {/* 140 */ "GSW_PMAC_EG_CFG_GET", (command_fkt)gsw_pmac_eg_cfg_get}, + {/* 141 */ "GSW_PMAC_IG_CFG_GET", (command_fkt)gsw_pmac_ig_cfg_get}, + {/* 142 */ "GSW_PMAC_COUNT_GET", (command_fkt)gsw_pmac_count_get}, + {/* 143 */ "GSW_RMON_MODE_SET", (command_fkt)gsw_rmon_mode_set}, + {/* 144 */ "GSW_RMON_IF_GET", (command_fkt)gsw_rmon_if_get}, + {/* 145 */ "GSW_RMON_REDIRECT_GET", (command_fkt)gsw_rmon_redirect_get}, + {/* 146 */ "GSW_RMON_ROUTE_GET", (command_fkt)gsw_rmon_route_get}, + {/* 147 */ "GSW_RMON_METER_GET", (command_fkt)gsw_rmon_meter_get}, + {/* 148 */ "GSW_QOS_METER_ACT", (command_fkt)gsw_qos_meter_act}, + {/* 149 */ "GSW_PMAC_GLBL_CFG_SET", (command_fkt)gsw_pmac_glbl_cfg_set}, + {/* 150 */ "GSW_PMAC_GLBL_CFG_GET", (command_fkt)gsw_pmac_glbl_cfg_get}, + +#if defined(CONFIG_LTQ_TEST) && CONFIG_LTQ_TEST + {/* 152 */ "GSW_ROUTE_ENTRY_READ", (command_fkt)gsw_route_entry_read}, + {/* 153 */ "GSW_ROUTE_ENTRY_DELETE", (command_fkt)gsw_route_entry_delete}, + {/* 154 */ "GSW_ROUTE_ENTRY_ADD", (command_fkt)gsw_route_entry_add}, + {/* 155 */ "GSW_ROUTE_TUNNEL_ENTRY_READ", (command_fkt)gsw_route_tunnel_entry_read}, + {/* 156 */ "GSW_ROUTE_TUNNEL_ENTRY_DELETE", (command_fkt)gsw_route_tunnel_entry_delete}, + {/* 157 */ "GSW_ROUTE_TUNNEL_ENTRY_ADD", (command_fkt)gsw_route_tunnel_entry_add}, + {/* 158 */ "GSW_ROUTE_L2NAT_CFG_READ", (command_fkt)gsw_route_l2nat_cfg_read}, + {/* 159 */ "GSW_ROUTE_L2NAT_CFG_WRITE", (command_fkt)gsw_route_l2nat_cfg_write}, + {/* 160 */ "GSW_ROUTE_SESSION_HIT_OP", (command_fkt)gsw_route_session_hit_op}, + {/* 161 */ "GSW_ROUTE_SESSION_DEST_MOD", (command_fkt)gsw_route_session_dest_mod}, + +#endif + + {/* 162 */ "GSW_CTP_PORT_ASSIGNMENT_SET", (command_fkt)gsw_ctp_port_assigment_set}, + {/* 163 */ "GSW_CTP_PORT_ASSIGNMENT_GET", (command_fkt)gsw_ctp_port_assigment_get}, + {/* 164 */ "GSW_EXTENDEDVLAN_SET", (command_fkt)gsw_extendedvlan_config_set}, + {/* 165 */ "GSW_EXTENDEDVLAN_GET", (command_fkt)gsw_extendedvlan_config_get}, + {/* 166 */ "GSW_EXTENDEDVLAN_FREE", (command_fkt)gsw_extendedvlan_free}, + {/* 167 */ "GSW_VLANFILTER_SET", (command_fkt)gsw_vlanfilter_config_set}, + {/* 168 */ "GSW_VLANFILTER_GET", (command_fkt)gsw_vlanfilter_config_get}, + {/* 169 */ "GSW_VLANFILTER_FREE", (command_fkt)gsw_vlanfilter_free}, + {/* 170 */ "GSW_BRIDGE_CONFIG_SET", (command_fkt)gsw_bridge_config_set}, + {/* 171 */ "GSW_BRIDGE_CONFIG_GET", (command_fkt)gsw_bridge_config_get}, + {/* 172 */ "GSW_BRIDGE_FREE", (command_fkt)gsw_bridge_free}, + {/* 173 */ "GSW_CTP_PORT_CONFIG_SET", (command_fkt)gsw_ctp_port_config_set}, + {/* 174 */ "GSW_CTP_PORT_CONFIG_GET", (command_fkt)gsw_ctp_port_config_get}, + {/* 175 */ "GSW_CTP_PORT_CONFIG_RESET", (command_fkt)gsw_ctp_port_config_reset}, + {/* 176 */ "GSW_BRIDGE_PORT_CONFIG_SET", (command_fkt)gsw_bridge_port_config_set}, + {/* 177 */ "GSW_BRIDGE_PORT_CONFIG_GET", (command_fkt)gsw_bridge_port_config_get}, + {/* 178 */ "GSW_BRIDGE_PORT_ALLOC", (command_fkt)gsw_bridge_port_alloc}, + {/* 179 */ "GSW_BRIDGE_PORT_FREE", (command_fkt)gsw_bridge_port_free}, + {/* 180 */ "GSW_EXTENDEDVLAN_ALLOC", (command_fkt)gsw_extendedvlan_alloc}, + {/* 181 */ "GSW_VLANFILTER_ALLOC", (command_fkt)gsw_vlanfilter_alloc}, + {/* 182 */ "GSW_BRIDGE_ALLOC", (command_fkt)gsw_bridge_alloc}, + {/* 183 */ "GSW_PMAC_RMON_GET", (command_fkt)gsw_pmac_rmon_get}, + + {/* 184 */ "GSW_DEBUG_CTPTABLE_STATUS", (command_fkt)gsw_debug_ctptablestatus}, + {/* 185 */ "GSW_DEBUG_BRDGPORTTABLE_STATUS", (command_fkt)gsw_debug_bridgeporttablestatus}, + {/* 186 */ "GSW_DEBUG_BRDGTABLE_STATUS", (command_fkt)gsw_debug_bridgetablestatus}, + {/* 187 */ "GSW_DEBUG_EXVLANTABLE_STATUS", (command_fkt)gsw_debug_Exvlantablestatus}, + {/* 188 */ "GSW_DEBUG_VLANFILTERTABLE_STATUS", (command_fkt)gsw_debug_VlanFiltertablestatus}, + {/* 189 */ "GSW_DEBUG_METERTABLE_STATUS", (command_fkt)gsw_debug_Metertablestatus}, + {/* 190 */ "GSW_DEBUG_DSCP2PCPTABLE_STATUS", (command_fkt)gsw_debug_Dscp2Pcptablestatus}, + {/* 191 */ "GSW_DEBUG_PMAPPER_STATUS", (command_fkt)gsw_debug_Pmappertablestatus}, + {/* 192 */ "GSW_DEBUG_PMAC_EG", (command_fkt)gsw_debug_pmac_eg}, + {/* 193 */ "GSW_DEBUG_PMAC_IG", (command_fkt)gsw_debug_pmac_ig}, + {/* 194 */ "GSW_DEBUG_PMAC_BP", (command_fkt)gsw_debug_pmac_bp}, + {/* 195 */ "GSW_DEBUG_DEF_QMAP", (command_fkt)gsw_debug_def_pce_qmap}, + {/* 196 */ "GSW_DEBUG_DEF_BYP_QMAP", (command_fkt)gsw_debug_def_byp_qmap}, + {/* 197 */ "xgmac", (command_fkt)gsw_xgmac_cli}, + {/* 198 */ "GSW_PMAC_BM_CFG_SET", (command_fkt)gsw_pmac_bm_cfg_set}, + {/* 199 */ "GSW_PMAC_EG_CFG_SET", (command_fkt)gsw_pmac_eg_cfg_set}, + {/* 200 */ "GSW_PMAC_IG_CFG_SET", (command_fkt)gsw_pmac_ig_cfg_set}, + {/* 201 */ "GSW_DEBUG_CTP_STATISTICS", (command_fkt)gsw_debug_ctpstatistics}, + {/* 202 */ "GSW_DEBUG_LP_STATISTICS", (command_fkt)gsw_debug_lpstatistics}, + {/* 203 */ "gswss", (command_fkt)gsw_gswss_cli}, + {/* 204 */ "lmac", (command_fkt)gsw_lmac_cli}, + {/* 205 */ "GSW_CTP_PORT_ASSIGNMENT_ALLOC", (command_fkt)gsw_ctp_port_alloc}, + {/* 206 */ "GSW_CTP_PORT_ASSIGNMENT_FREE", (command_fkt)gsw_ctp_port_free}, + {/* 207 */ "macsec", (command_fkt)gsw_macsec_cli}, + {/* 208 */ "GSW_IRQ_REGISTER", (command_fkt)gsw_irq_register}, + {/* 209 */ "GSW_IRQ_UNREGISTER", (command_fkt)gsw_irq_unregister}, + {/* 210 */ "GSW_IRQ_ENABLE", (command_fkt)gsw_irq_enable}, + {/* 211 */ "GSW_IRQ_DISBALE", (command_fkt)gsw_irq_disable}, + {/* 212 */ "GSW_DEBUG_PRINT_PCEIRQ_LIST", (command_fkt)gsw_debug_PrintPceIrqList}, + {/* 213 */ "GSW_RMON_FLOW_GET", (command_fkt)gsw_rmon_flow_get}, + {/* 214 */ "GSW_RMON_TFLOW_CLEAR", (command_fkt)gsw_rmon_tflow_clear}, + {/* 215 */ "GSW_DSCP2PCP_MAP_GET", (command_fkt)gsw_dscp2pcp_map_get}, + {/* 216 */ "GSW_DEFAUL_MAC_FILTER_GET", (command_fkt)gsw_defaul_mac_filter_get}, + {/* 217 */ "GSW_DEFAUL_MAC_FILTER_SET", (command_fkt)gsw_defaul_mac_filter_set}, + {/* 218 */ "GSW_QOS_COLOR_MARKING_TABLE_SET", (command_fkt)gsw_qos_color_marking_table_set}, + {/* 219 */ "GSW_QOS_COLOR_MARKING_TABLE_GET", (command_fkt)gsw_qos_color_marking_table_get}, + {/* 220 */ "GSW_QOS_COLOR_REMARKING_TABLE_GET", (command_fkt)gsw_qos_color_remarking_table_get}, + {/* 221 */ "GSW_QOS_COLOR_REMARKING_TABLE_SET", (command_fkt)gsw_qos_color_remarking_table_set}, + + + {/* 222 */ "GSW_DEBUG_RMON_PORT_GET", (command_fkt)gsw_debug_rmon_port_get}, + {/* 223 */ "GSW_CTP_PORT_RMON_GET", (command_fkt)gsw_debug_ctp_rmon_port_get}, + {/* 224 */ "GSW_BRIDGE_PORT_RMON_GET", (command_fkt)gsw_debug_bridge_rmon_port_get}, + {/* 225 */ "GSW_CTP_PORT_PCEBYPASS_RMON_GET", (command_fkt)gsw_debug_ctpbypass_rmon_port_get}, + + {/* 226 */ "GSW_DEBUG_RMON_ALL_GET", (command_fkt)gsw_debug_rmon_port_get_all}, + + {/* 227 */ "GSW_PBB_TUNNEL_TEMPLATE_ALLOC", (command_fkt)gsw_pbb_tunneltemplate_alloc}, + {/* 228 */ "GSW_PBB_TUNNEL_TEMPLATE_FREE", (command_fkt)gsw_pbb_tunneltemplate_free}, + {/* 229 */ "GSW_PBB_TUNNEL_TEMPLATE_SET", (command_fkt)gsw_pbb_tunneltemplate_config_set}, + {/* 230 */ "GSW_PBB_TUNNEL_TEMPLATE_GET", (command_fkt)gsw_pbb_tunneltemplate_config_get}, + + {/* 231 */ "GSW_DEBUG_TUNNELTEMP_STATUS", (command_fkt)gsw_debug_tunneltemptablestatus}, + {/* 232 */ "pmac_br", (command_fkt)gsw_pmacbr_cli}, + + {/* 233 */ "GSW_LPID_TO_GPID_ASSIGNMENT_SET", (command_fkt)gsw_lpidTogpid_assignmentset}, + {/* 234 */ "GSW_LPID_TO_GPID_ASSIGNMENT_GET", (command_fkt)gsw_lpidTogpid_assignmentget}, + {/* 235 */ "GSW_GPID_TO_LPID_ASSIGNMENT_SET", (command_fkt)gsw_gpidTolpid_assignmentset}, + {/* 236 */ "GSW_GPID_TO_LPID_ASSIGNMENT_GET", (command_fkt)gsw_gpidTolpid_assignmentget}, + {/* 237 */ "GSW_DUMP_MEM", (command_fkt)gsw_dump_mem}, + {/* 238 */ "GSW_DEFAUL_PCE_QMAP_GET", (command_fkt)gsw_defaul_pce_qmap_get}, + {/* 239 */ "GSW_DEFAUL_PCE_BYPASS_QMAP_GET", (command_fkt)gsw_defaul_bypass_qmap_get}, + {/* 240 */ "GSW_IG_CFG_PMAC_GET", (command_fkt)gsw_pmac_get_ig_cfg}, + {/* 241 */ "GSW_DEBUG_PMAC_RMON_GET_ALL", (command_fkt)gsw_debug_pmac_rmon_get_all}, + {/* 242 */ "GSW_TFLOW_ALLOC", (command_fkt)gsw_tflow_ualloc}, + {/* 243 */ "GSW_TFLOW_FREE", (command_fkt)gsw_tflow_ufree}, + {/* 244 */ "GSW_DEBUG_TFLOWTABLE_STATUS", (command_fkt)gsw_debug_tflowtablestatus}, + + {NULL, NULL}, +}; + + +//#ifdef SWITCHAPI_HELP_TEXT +const char *const HelpText[] = { + /* 0: GSW_8021X_EAPOL_RULE_GET */ + "Read the IEEE 802.1x filter configuration. The parameters can be modified\n" + "using GSW_8021X_EAPOL_RULE_SET.", + /* 1: GSW_8021X_EAPOL_RULE_SET */ + "Set the IEEE 802.1x filter rule for a dedicated port. Filtered packets can be\n" + "redirected to one dedicated port (e.g. CPU port). The switch supports the\n" + "addition of a specific packet header to the filtered packets that contains\n" + "information like source port, priority and so on. The parameters can be read\n" + "using GSW_8021X_EAPOL_RULE_GET.\n" + "\nParameter:\n----------\n" + "eForwardPort :\n" + "\tFilter authentication packets and forward them, discard them or\n" + "\tdisable the filter.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Default; portmap is determined by the forwarding classification.\n" + "\n" + "\t1: Discard; discard packets.\n" + "\n" + "\t2: Forward to the CPU port. This requires that the CPU port is\n" + "\t\tpreviously set by calling GSW_CPU_PORT_CFG_SET.\n" + "\n" + "\t3: Forward to a port, selected by the parameter 'nForwardPortId'.\n" + "\t\tPlease note that this feature is not supported by all hardware\n" + "\t\tplatforms.\n" + "\n" + "nForwardPortId :\n" + "\tTarget port for forwarded packets, only used if selected by\n" + "\t'eForwardPort'. Forwarding is done if 'eForwardPort =\n" + "\tGSW_PORT_FORWARD_PORT'.", + /* 2: GSW_8021X_PORT_CFG_GET */ + "Get the 802.1x port status for a switch port. A configuration can be set using\n" + "GSW_8021X_PORT_CFG_SET\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 3: GSW_8021X_PORT_CFG_SET */ + "Set the 802.1x port status for a switch port. The port configuration can be\n" + "read using GSW_8021X_PORT_CFG_GET.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "eState :\n" + "\t802.1x state of the port.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Receive and transmit direction are authorized. The port is allowed\n" + "\t\tto transmit and receive all packets and the address learning\n" + "\t\tprocess is also allowed.\n" + "\n" + "\t1: Receive and transmit direction are unauthorized. All the packets\n" + "\t\texcept EAPOL are not allowed to transmit and receive. The address\n" + "\t\tlearning process is disabled.\n" + "\n" + "\t2: Receive direction is authorized, transmit direction is\n" + "\t\tunauthorized. The port is allowed to receive all packets. Packet\n" + "\t\ttransmission to this port is not allowed. The address learning\n" + "\t\tprocess is also allowed.\n" + "\n" + "\t3: Transmit direction is authorized, receive direction is\n" + "\t\tunauthorized. The port is allowed to transmit all packets. Packet\n" + "\t\treception on this port is not allowed. The address learning process\n" + "\t\tis disabled.", + /* 4: GSW_CAP_GET */ + "This service returns the capability referenced by the provided index\n" + "(zero-based counting index value). The Switch API uses the index to return the\n" + "capability parameter from an internal list. For instance, the capability list\n" + "contains information about the amount of supported features like number of\n" + "supported VLAN groups or MAC table entries. The command returns zero-length\n" + "strings ('') in case the requested index number is out of range.", + /* 5: GSW_CFG_GET */ + "Read the global switch configuration. This configuration can be set using\n" + "GSW_CFG_SET.", + /* 6: GSW_CFG_SET */ + "Modify the switch configuration. The configuration can be read using\n" + "GSW_CFG_GET. The switch can be enabled using GSW_ENABLE.\n" + "\nParameter:\n----------\n" + "eMAC_TableAgeTimer :\n" + "\tMAC table aging timer. After this timer expires the MAC table entry is\n" + "\taged out.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t1: 1 second\n" + "\n" + "\t2: 10 seconds\n" + "\n" + "\t3: 300 seconds\n" + "\n" + "\t4: 1 hour\n" + "\n" + "\t5: 24 hours\n" + "\n" + "bVLAN_Aware :\n" + "\tVLAN Awareness. The switch is VLAN unaware if this variable is\n" + "\tdisabled. In this mode, no VLAN-related APIs are supported and return\n" + "\twith an error. The existing VLAN configuration is discarded when VLAN\n" + "\tis disabled again.\n" + "\n" + "nMaxPacketLen :\n" + "\tMaximum Ethernet packet length.\n" + "\n" + "bLearningLimitAction :\n" + "\tAutomatic MAC address table learning limitation consecutive action.\n" + "\tThese frame addresses are not learned, but there exists control as to\n" + "\twhether the frame is still forwarded or dropped. - 0: Drop -\n" + "\t1: Forward\n" + "\n" + "bMAC_SpoofingAction :\n" + "\tAccept or discard MAC spoofing and port MAC locking violation packets.\n" + "\ta MAC source address which was previously learned on a different\n" + "\tingress port (learned by MAC bridging table). This also applies to\n" + "\tstatic added entries. MAC spoofing detection is enabled on port level \n" + "\tby 'bMAC_SpoofingDetection'. MAC address port locking is configured on port level\n" + "\tby 'bLearningMAC_PortLock'. IFX_FALSE(0): Drop,IFX_TRUE(1): Forward \n" + "\n" + "bPauseMAC_ModeSrc :\n" + "\tPause frame MAC source address mode. If enabled, use the alternative\n" + "\taddress specified with 'nMAC'.\n" + "\n" + "nPauseMAC_Src :\n" + "\tPause frame MAC source address.\n" + "\tSupported Formats: 12:34:45:67:89:0A", + /* 7: GSW_CPU_PORT_CFG_GET */ + "Get the port that is directly connected to the software running on a CPU and\n" + "defined as CPU port. This port assignment can be set using\n" + "GSW_CPU_PORT_CFG_SET if it is not fixed and defined by the switch device\n" + "architecture.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 8: GSW_CPU_PORT_CFG_SET */ + "Defines one port that is directly connected to the software running on a CPU.\n" + "This allows for the redirecting of protocol-specific packets to the CPU port\n" + "and special packet treatment when sent by the CPU. If the CPU port cannot be\n" + "set, the function returns an error code.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "bCPU_PortValid :\n" + "\tCPU port validity. Set command: set true to define a CPU port, set\n" + "\tfalse to undo the setting. Get command: true if defined as CPU, false\n" + "\tif not defined as CPU port.\n" + "\n" + "bSpecialTagIngress :\n" + "\tSpecial tag enable in ingress direction.\n" + "\n" + "bSpecialTagEgress :\n" + "\tSpecial tag enable in egress direction.\n" + "\n" + "bFcsCheck :\n" + "\tEnable FCS check - 0: No check, forward all frames - 1:\n" + "\tCheck FCS, drop frames with errors\n" + "\n" + "bFcsGenerate :\n" + "\tEnable FCS generation - 0: Forward packets without FCS -\n" + "\t1: Generate FCS for all frames\n" + "\n" + "bSpecialTagEthType :\n" + "\tSpecial tag Ethertype mode.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: The EtherType field of the Special Tag of egress packets is always\n" + "\t\tset to a prefined value. This same defined value applies for all\n" + "\t\tswitch ports.\n" + "\n" + "\t1: The Ethertype field of the Special Tag of egress packets is set to\n" + "\t\tthe FlowID parameter, which is a results of the switch flow\n" + "\t\tclassification result. The switch flow table rule provides this\n" + "\t\tFlowID as action parameter." + + "eNoMPEParserCfg :\n" + "\tParser Header Config for no MPE flags (i.e. MPE1=0, MPE2=0).\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Parsing Results are not carried on the traffic to CPU port \n" + "\t\t(both MPE1 and MPE2 flags are not set. \n" + "\t1: 8-Bytes Parsing Flags (Bit 63:0) accompanying to CPU Port for this combination. \n" + "\t2: 40-Bytes Offsets (Offset-0 to -39) + 8-Bytes Parsing Flags (Bit 63:0) \n" + "\t\t accompanying to CPU Port for this combination \n" + "\t3: Reserved - for future use \n" + "\n" + "eMPE1ParserCfg :\n" + "\tParser Header Config for MPE-1 set flag (i.e. MPE1=1, MPE2=0).\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Parsing Results are not carried on the traffic to CPU port \n" + "\t\t(both MPE1 and MPE2 flags are not set. \n" + "\t1: 8-Bytes Parsing Flags (Bit 63:0) accompanying to CPU Port for this combination. \n" + "\t2: 40-Bytes Offsets (Offset-0 to -39) + 8-Bytes Parsing Flags (Bit 63:0) \n" + "\t\t accompanying to CPU Port for this combination \n" + "\t3: Reserved - for future use \n" + "\n" + "eMPE2ParserCfg :\n" + "\tParser Header Config for MPE-2 set flag (i.e. MPE1=0, MPE2=1).\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Parsing Results are not carried on the traffic to CPU port \n" + "\t\t(both MPE1 and MPE2 flags are not set. \n" + "\t1: 8-Bytes Parsing Flags (Bit 63:0) accompanying to CPU Port for this combination. \n" + "\t2: 40-Bytes Offsets (Offset-0 to -39) + 8-Bytes Parsing Flags (Bit 63:0) \n" + "\t\t accompanying to CPU Port for this combination \n" + "\t3: Reserved - for future use \n" + "\n" + "eMPE1MPE2ParserCfg :\n" + "\tParser Header Config for both MPE-1 and MPE-2 set flag (i.e. MPE1=1, MPE2=1).\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Parsing Results are not carried on the traffic to CPU port \n" + "\t\t(both MPE1 and MPE2 flags are not set. \n" + "\t1: 8-Bytes Parsing Flags (Bit 63:0) accompanying to CPU Port for this combination. \n" + "\t2: 40-Bytes Offsets (Offset-0 to -39) + 8-Bytes Parsing Flags (Bit 63:0) \n" + "\t\t accompanying to CPU Port for this combination \n" + "\t3: Reserved - for future use \n" + "\n" + "\n", + /* 9: GSW_CPU_PORT_EXTEND_CFG_GET */ + "Reads out additional CPU port configuration. This configuration applies to\n" + "devices where the CPU port is fixed to one dedicated port.", + /* 10: GSW_CPU_PORT_EXTEND_CFG_SET */ + "Configure an additional CPU port configuration. This configuration applies to\n" + "devices where the CPU port is fixed to one dedicated port.\n" + "\nParameter:\n----------\n" + "eHeaderAdd :\n" + "\tAdd Ethernet layer-2 header (also VLAN) to the transmit packet. The\n" + "\tcorresponding header fields are set in 'sHeader'.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: No additional Ethernet header.\n" + "\n" + "\t1: Additional Ethernet header.\n" + "\n" + "\t2: Additional Ethernet- and VLAN- header.\n" + "\n" + "bHeaderRemove :\n" + "\tRemove Ethernet layer-2 header (also VLAN) for packets going from\n" + "\tEthernet switch to the DMA. Only the first VLAN tag found is removed\n" + "\tand additional available VLAN tags remain untouched.\n" + "\n" + "Ethernet layer-2 header information. Used when adding a header to the\n" + "transmitted packet. The parameter 'eHeaderAdd' selects the mode if a layer-2\n" + "header should be added (including VLAN). This structure contains all fields of\n" + "the Ethernet and VLAN header.\n" + "sHeader.nMAC_Src :\n" + "\tPacket MAC Source Address.\n" + "\tSupported Formats: 12:34:45:67:89:0A" + "\n" + "sHeader.nMAC_Dst :\n" + "\tPacket MAC Destination Address.\n" + "\tSupported Formats: 12:34:45:67:89:0A" + "\n" + "sHeader.nEthertype :\n" + "\tPacket EtherType Field.\n" + "\n" + "sHeader.nVLAN_Prio :\n" + "\tVLAN Tag Priority Field. Only used when adding VLAN tag is enabled\n" + "\t(eHeaderAdd=GSW_CPU_HEADER_VLAN).\n" + "\n" + "sHeader.nVLAN_CFI :\n" + "\tVLAN Tag Canonical Format Identifier. Only used when adding VLAN tag\n" + "\tis enabled (eHeaderAdd=GSW_CPU_HEADER_VLAN).\n" + "\n" + "sHeader.nVLAN_ID :\n" + "\tVLAN Tag VLAN ID. Only used when adding VLAN tag is enabled\n" + "\t(eHeaderAdd=GSW_CPU_HEADER_VLAN).\n" + "\n" + "ePauseCtrl :\n" + "\tDescribes how the port handles received PAUSE frames coming from the\n" + "\tswitch. Either forward them to DMA or stop/start transmission. Note\n" + "\tthat the parameter 'eFlowCtrl' of the command 'GSW_PORT_CFG_SET'\n" + "\tdetermines whether the switch generates PAUSE frames.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Forward all PAUSE frames coming from the switch macro towards the\n" + "\t\tDMA channel. These frames do not influence the packet transmission.\n" + "\n" + "\t1: Dispatch all PAUSE frames coming from the switch macro towards the\n" + "\t\tDMA channel. These are filtered out and the packets transmission is\n" + "\t\tstopped and restarted accordingly.\n" + "\n" + "bFcsRemove :\n" + "\tRemove the CRC (FCS) of all packets coming from the switch towards the\n" + "\tDMA channel. Note that the FCS check and generation option can be\n" + "\tconfigured using 'GSW_CPU_PORT_CFG_SET'.\n" + "\n" + "nWAN_Ports :\n" + "\tPort map of Ethernet switch ports that are assigned to the WAN side\n" + "\t(dedicated for applications where ports are grouped into WAN- and LAN-\n" + "\tsegments). All ports that are not selected belong to the LAN segment.\n" + "\tThe LSB bit represents port 0, the higher bits represent the higher\n" + "\tport numbers.", + /* 11: GSW_DISABLE */ + "Disables the whole switch. The switch can be enabled using the\n" + "GSW_ENABLE command", + /* 12: GSW_ENABLE */ + "Enables the whole switch. The switch device is enabled with the default\n" + "configuration in case no other configuration is applied. The switch can be\n" + "disabled using the GSW_DISABLE command", + /* 13: GSW_HW_INIT */ + "Hardware Initialization. This command should be called right after the Switch\n" + "API software module is initialized and loaded. It accesses the hardware\n" + "platform, retrieving platform capabilities and performing the first basic\n" + "configuration.\n" + "\nParameter:\n----------\n" + "eInitMode :\n" + "\tSelect the type of Switch API and hardware initialization.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Access the switch hardware to read out status and capability\n" + "\t\tinformation. Then define the basic hardware configuration to bring\n" + "\t\tthe hardware into a pre-defined state.\n" + "\n" + "\t1: Access the switch hardware to read out status and capability\n" + "\t\tinformation. Do not write any hardware configuration to the device.\n" + "\t\tThis means that the current existing hardware configuration remains\n" + "\t\tunchanged.\n" + "\n" + "\t2: Initialize the switch software module but do not touch the switch\n" + "\t\thardware. This means that no read or write operations are done on\n" + "\t\tthe switch hardware. Status and capability information cannot be\n" + "\t\tretrieved from the hardware.", + /* 14: GSW_MAC_TABLE_CLEAR */ + "Remove all MAC entries from the MAC table.", + /* 15: GSW_MAC_TABLE_ENTRY_ADD */ + "Add a MAC table entry. If an entry already exists for the given MAC Address\n" + "and Filtering Database (FID), this entry is overwritten. If not, a new entry\n" + "is added.\n" + "\nParameter:\n----------\n" + "nFId :\n" + "\tKey - Filtering Identifier (FID) (not supported by all switches)\n" + "\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "nAgeTimer :\n" + "\tAging Time, given in multiples of 1 second in a range from 1 s to\n" + "\t1,000,000 s. The configured value might be rounded that it fits to the\n" + "\tgiven hardware platform.\n" + "\n" + /* "nSVLAN_Id :\n" + "\tSTAG VLAN Id. Only applicable in case SVLAN support is enabled on the device.\n" + "\n"*/ + "nSubIfId :\n" + "\tSub-Interface Identifier Destination (supported in GSWIP-3.0 only)..\n" + "\n" + "bStaticEntry :\n" + "\tStatic Entry (value will be aged out if the entry is not set to\n" + "\tstatic). The switch API implementation uses the maximum age timer in\n" + "\tcase the entry is not static.\n" + "\n" + "nTrafficClass :\n" + "\tEgress queue traffic class. The queue index starts counting from zero.\n" + "\n" + "nMAC :\n" + "\tMAC Address to add to the table.\n" + "\tSupported Formats: 12:34:45:67:89:0A" + "\n" + "nFilterFlag :\n" + "\tKey - Value 0 - not filter, 1 - source address filter\n" + "\t2 - destination address filter, 3 - both source and destination filter.", + /* 16: GSW_MAC_TABLE_ENTRY_QUERY */ + "Search the MAC Address table for a specific address entry. A MAC address is\n" + "provided by the application and Switch API performs a search operation on the\n" + "hardware table. Many hardware platforms provide an optimized and fast address\n" + "search algorithm.\n" + "\nParameter:\n----------\n" + "nMAC :\n" + "\tMAC Address. This parameter needs to be provided for the search\n" + "\toperation. This is an input parameter.\n" + "\tSupported Formats: 12:34:45:67:89:0A" + "\n" + "nFId :\n" + "\tKey - Get the MAC table entry belonging to the given Filtering Identifier\n" + "\t(FID) (not supported by all switches). This is an input parameter." + "\n" + "nFilterFlag :\n" + "\tKey - Value 0 - not filter, 1 - source address filter\n" + "\t2 - destination address filter, 3 - both source and destination filter.", + /* 17: GSW_MAC_TABLE_ENTRY_READ */ + "Read an entry of the MAC table. If the parameter 'bInitial=TRUE', the GET\n" + "operation starts at the beginning of the table. Otherwise it continues the GET\n" + "operation at the entry that follows the previous access. The function sets all\n" + "fields to zero in case the end of the table is reached. In order to read out\n" + "the complete table, this function can be called in a loop. The Switch API sets\n" + "'bLast=1' when the last entry is read out. This 'bLast' parameter could\n" + "be the loop exit criteria.", + /* 18: GSW_MAC_TABLE_ENTRY_REMOVE */ + "Remove a single MAC entry from the MAC table.\n" + "\nParameter:\n----------\n" + "nFId :\n" + "\tFiltering Identifier (FID) (not supported by all switches)\n" + "\n" + "nMAC :\n" + "\tMAC Address to be removed from the table.\n" + "\tSupported Formats: 12:34:45:67:89:0A", + /* 19: GSW_MDIO_CFG_GET */ + "Read the MDIO interface configuration. The parameters can be modified using\n" + "GSW_MDIO_CFG_SET.", + /* 20: GSW_MDIO_CFG_SET */ + "Set the MDIO interface configuration. The parameters can be read using\n" + "GSW_MDIO_CFG_GET. The given frequency is rounded off to fitting to the\n" + "hardware support. GSW_MDIO_CFG_GET will return the exact programmed\n" + "(rounded) frequency value.\n" + "\nParameter:\n----------\n" + "nMDIO_Speed :\n" + "\tMDIO interface clock and data rate [in kHz].\n" + "\n" + "bMDIO_Enable :\n" + "\tMDIO interface enable.", + /* 21: GSW_MDIO_DATA_READ */ + "Read data from the MDIO Interface of the switch device. This function allows\n" + "various kinds of information to be read out for any attached device by\n" + "register and device addressing. The 'nData' value (GSW_MDIO_data_t)\n" + "contains the read device register. A write operation can be done using\n" + "GSW_MDIO_DATA_WRITE.\n" + "\nParameter:\n----------\n" + "nAddressDev :\n" + "\tDevice address on the MDIO interface\n" + "\n" + "nAddressReg :\n" + "\tRegister address inside the device.", + /* 22: GSW_MDIO_DATA_WRITE */ + "Write data to the MDIO Interface of the switch device. This function allows\n" + "for configuration of any attached device by register and device addressing.\n" + "This applies to external and internal Ethernet PHYs as well. The 'nData' value\n" + "(GSW_MDIO_data_t) is directly written to the device register. A read\n" + "operation can be performed using GSW_MDIO_DATA_READ.\n" + "\nParameter:\n----------\n" + "nAddressDev :\n" + "\tDevice address on the MDIO interface\n" + "\n" + "nAddressReg :\n" + "\tRegister address inside the device.\n" + "\n" + "nData :\n" + "\tExchange data word with the device (read / write).", + /* 23: GSW_MMD_DATA_READ */ + "Read MMD Ethernet PHY register over the MDIO Interface attached to the switch\n" + "device. This function allows various kinds of information to be read out for\n" + "any attached device by register and device addressing. The 'nData' value (\ref\n" + "GSW_MMD_data_t) contains the read MMD device register. A write operation\n" + "can be done using \ref GSW_MMD_DATA_WRITE.\n" + "\nParameter:\n----------\n" + "nAddressDev :\n" + "\tDevice address on the MDIO interface\n" + "\n" + "nAddressReg :\n" + "\tMMD Register address/offset inside the device.", + /* 24: GSW_MMD_DATA_WRITE */ + "Write MMD Ethernet PHY register over the MDIO Interface attached to the switch\n" + "device. This function allows configuration of any attached device by MMD\n" + "register and device addressing. This applies to external and internal Ethernet\n" + "PHYs as well. The 'nData' value (\ref GSW_MMD_data_t) is directly\n" + "written to the device register. A read operation can be performed using \ref\n" + "GSW_MMD_DATA_READ.\n" + "\nParameter:\n----------\n" + "nAddressDev :\n" + "\tDevice address on the MDIO interface\n" + "\n" + "nAddressReg :\n" + "\tMMD Register address/offset inside the device.\n" + "\n" + "nData :\n" + "\tExchange data word with the device (read / write).", + /* 25: GSW_MONITOR_PORT_CFG_GET */ + "Reads out the current monitor options for a dedicated Ethernet port. This\n" + "configuration can be set using GSW_MONITOR_PORT_CFG_SET.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 26: GSW_MONITOR_PORT_CFG_SET */ + "Configures the monitor options for a dedicated Ethernet port. This current\n" + "configuration can be read back using GSW_MONITOR_PORT_CFG_GET.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "bMonitorPort :\n" + "\tThis port is used as a monitor port. To use this feature, the port\n" + "\tmirror function is enabled on one or more ports.", + /* 27: GSW_MULTICAST_ROUTER_PORT_ADD */ + "Add static router port to the switch hardware multicast table. These added\n" + "router ports will not be removed by the router port learning aging process.\n" + "The router port learning is enabled over the parameter 'bLearningRouter' over\n" + "the GSW_MULTICAST_SNOOP_CFG_GET command. Router port learning and static\n" + "added entries can both be used together. In case of a sofware IGMP\n" + "stack/daemon environemtn, the router port learning does not have to be\n" + "configured on the switch hardware. Instead the router port management is\n" + "handled by the IGMP stack/daemon. A port can be removed using\n" + "GSW_MULTICAST_ROUTER_PORT_REMOVE.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 28: GSW_MULTICAST_ROUTER_PORT_READ */ + "Check if a port has been selected as a router port, either by automatic\n" + "learning or by manual setting. A port can be added using\n" + "GSW_MULTICAST_ROUTER_PORT_ADD. A port can be removed again using\n" + "GSW_MULTICAST_ROUTER_PORT_REMOVE.\n" + "\nParameter:\n----------\n" + "bInitial :\n" + "\tRestart the get operation from the start of the table. Otherwise\n" + "\treturn the next table entry (next to the entry that was returned\n" + "\tduring the previous get operation). This parameter is always reset\n" + "\tduring the read operation. This boolean parameter is set by the\n" + "\tcalling application.\n" + "\n" + "bLast :\n" + "\tIndicates that the read operation got all last valid entries of the\n" + "\ttable. This boolean parameter is set by the switch API when the Switch\n" + "\tAPI is called after the last valid one was returned already.\n" + "\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 29: GSW_MULTICAST_ROUTER_PORT_REMOVE */ + "Remove an Ethernet router port from the switch hardware multicast table. A\n" + "port can be added using GSW_MULTICAST_ROUTER_PORT_ADD.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 30: GSW_MULTICAST_SNOOP_CFG_GET */ + "Read out the current switch multicast configuration. The configuration can be\n" + "set using GSW_MULTICAST_SNOOP_CFG_SET.", + /* 31: GSW_MULTICAST_SNOOP_CFG_SET */ + "Configure the switch multicast configuration. The currently used configuration\n" + "can be read using GSW_MULTICAST_SNOOP_CFG_GET.\n" + "\nParameter:\n----------\n" + "eIGMP_Mode :\n" + "\tEnables and configures the IGMP/MLD snooping feature. Select\n" + "\tautolearning or management packet forwarding mode. Packet forwarding\n" + "\tis done to the port selected in 'eForwardPort'.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: IGMP management packet snooping and multicast level 3 table\n" + "\t\tlearning is disabled.\n" + "\n" + "\t1: IGMP management packet snooping is enabled and used for the\n" + "\t\thardware auto-learning to fill the multicast level 3 table.\n" + "\n" + "\t2: IGMP management packet snooping is enabled and forwarded to the\n" + "\t\tconfigured port. No autolearning of the multicast level 3 table.\n" + "\t\tThis table has to be maintained by the management software.\n" + "\n" + "bIGMPv3 :\n" + "\tIGMPv3 hardware support. When enabled the IGMP table includes both the\n" + "\tgroup table and the source list table. Otherwise the table only\n" + "\tincludes the group table. This feature is needed when supporting\n" + "\tIGMPv3 and MLDv2 protocols.\n" + "\n" + "bCrossVLAN :\n" + "\tEnables snooped IGMP control packets treated as cross-VLAN packets.\n" + "\tThis parameter is used for hardware auto-learning and snooping packets\n" + "\tforwarded to a dedicated port. This dedicated port can be selected\n" + "\tover 'eForwardPort'.\n" + "\n" + "eForwardPort :\n" + "\tForward snooped packet, only used if forwarded mode is selected by\n" + "\t'eIGMP_Mode = GSW_MULTICAST_SNOOP_MODE_SNOOPFORWARD'.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Default; portmap is determined by the forwarding classification.\n" + "\n" + "\t1: Discard; discard packets.\n" + "\n" + "\t2: Forward to the CPU port. This requires that the CPU port is\n" + "\t\tpreviously set by calling GSW_CPU_PORT_CFG_SET.\n" + "\n" + "\t3: Forward to a port, selected by the parameter 'nForwardPortId'.\n" + "\t\tPlease note that this feature is not supported by all hardware\n" + "\t\tplatforms.\n" + "\n" + "nForwardPortId :\n" + "\tTarget port for forwarded packets, only used if selected by\n" + "\t'eForwardPort'. Forwarding is done if 'eForwardPort =\n" + "\tGSW_PORT_FORWARD_PORT'.\n" + "\n" + "nClassOfService :\n" + "\tSnooping control class of service. Snooping control packet can be\n" + "\tforwarded to the 'nForwardPortId' when selected in 'eIGMP_Mode'. The\n" + "\tclass of service of this port can be selected for the snooped control\n" + "\tpackets, starting from zero. The maximum possible service class\n" + "\tdepends on the hardware platform used. The value\n" + "\tGSW_TRAFFIC_CLASS_DISABLE disables overwriting the given class\n" + "\tassignment.\n" + "\n" + "nRobust :\n" + "\tRobustness variable. Used when the hardware-based IGMP/MLD snooping\n" + "\tfunction is enabled. This robust variable is used in case IGMP\n" + "\thardware learning is enabled ('eIGMP_Mode =\n" + "\tGSW_MULTICAST_SNOOP_MODE_AUTOLEARNING'). Supported range: 1 ...\n" + "\t3\n" + "\n" + "nQueryInterval :\n" + "\tQuery interval. Used to define the query interval in units of 100 ms\n" + "\twhen the hardware-based IGMP/MLD snooping function is enabled. The\n" + "\tautomatically learned router port will be aged out if no IGMP/MLD\n" + "\tquery frame is received from the router port for (nQueryInterval *\n" + "\tnRobust) seconds. The supported range is from 100 ms to 25.5 s, with a\n" + "\tdefault value of 10 s. This query interval is used in case IGMP\n" + "\thardware learning is enabled ('eIGMP_Mode =\n" + "\tGSW_MULTICAST_SNOOP_MODE_AUTOLEARNING').\n" + "\n" + "eSuppressionAggregation :\n" + "\tIGMP/MLD report suppression and Join Aggregation control. Whenever the\n" + "\treport message is already sent out for the same multicast group, the\n" + "\tsuccessive report message within the query-max-responsetime with the\n" + "\tsame group ID will be filtered by the switch. This is called report\n" + "\tsuppression. Whenever the join message is already sent out for the\n" + "\tsame multicast group, the successive join message with the same group\n" + "\tID will be filtered. This is called join aggregation. This suppression\n" + "\tcontrol is used in case IGMP hardware learning is enable ('eIGMP_Mode\n" + "\t= GSW_MULTICAST_SNOOP_MODE_AUTOLEARNING').\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Report Suppression and Join Aggregation.\n" + "\n" + "\t1: Report Suppression. No Join Aggregation.\n" + "\n" + "\t2: Transparent Mode. No Report Suppression and no Join Aggregation.\n" + "\n" + "bFastLeave :\n" + "\tHardware IGMP snooping fast leave option. Allows the hardware to\n" + "\tautomatically clear the membership when receiving the IGMP leave\n" + "\tpacket. This fast leave option is used in case IGMP hardware learning\n" + "\tis enabled ('eIGMP_Mode =\n" + "\tGSW_MULTICAST_SNOOP_MODE_AUTOLEARNING'). Note: The fast-leave\n" + "\toption shall only be enabled where only one host is connected to each\n" + "\tinterface. If fast-leave is enabled where more than one host is\n" + "\tconnected to an interface, some hosts might be dropped inadvertently.\n" + "\tFast-leave processing is supported only with IGMP version 2 hosts.\n" + "\n" + "bLearningRouter :\n" + "\tHardware router port auto-learning. Allows for the ports on which a\n" + "\trouter is located to be learned automatically. This router port\n" + "\tlearning option is used in case IGMP hardware learning is enabled\n" + "\t('eIGMP_Mode = GSW_MULTICAST_SNOOP_MODE_AUTOLEARNING').\n" + "bMulticastUnknownDrop :\n" + "\tDiscard Unknown IP Multicast Packets. Multicast packets are defined as\n" + "\tunknown in case the group address cannot be found in the switch multicast\n" + "\tgroup table. The table group entries could be either automatically learned or\n" + "\tthey are statically added. This Boolean parameter defines if such unknown\n" + "\tmulticast packet are forwarded to the multicast forwarding portmap \n" + "\t(command \ref GSW_PORT_CFG_SET, parameter 'bMulticastUnknownDrop') or \n" + "\tif they are dropped instead.\n" + "\t0: Forward unknown multicast packets for the multicast forwarding portmap.\n" + "\t1: Drop unknown multicast packets. \n" + "bMulticastFIDmode :\n" + "\tMulticast Forwarding based upon FID or Not - valid for GSWIP-3.0 only \n" + "\t0: Multicast Forwarding is not based upon FID.\n" + "\t1: Multicast Forwarding is based upon FID. \n" + "\n", + /* 32: GSW_MULTICAST_TABLE_ENTRY_ADD */ + "Adds a multicast group configuration to the multicast table. No new entry is\n" + "added in case this multicast group already exists in the table. This commands\n" + "adds a host member to the multicast group. A member can be removed again using\n" + "GSW_MULTICAST_TABLE_ENTRY_REMOVE.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "nSubIfId :\n" + "\tSub-Interface Id - valid for GSWIP 3.0 only\n" + "\n" + "nFID :\n" + "\tFID - valid for GSWIP 3.0 only subject to Global FID for MC is enabled\n" + "\n" + "eIPVersion :\n" + "\tSelect the IP version of the 'uIP_Gda' and 'uIP_Gsa' fields. Both\n" + "\tfields support either IPv4 or IPv6.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: IPv4\n" + "\n" + "\t1: IPv6\n" + "\n" + "uIP_Gda :\n" + "\tGroup Destination IP address (GDA).\n" + "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." + "\n" + "uIP_Gsa :\n" + "\tGroup Source IP address. Only used in case IGMPv3 support is enabled\n" + "\tand 'eModeMember != GSW_IGMP_MEMBER_DONT_CARE'.\n" + "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." + "\n" + "eModeMember :\n" + "\tGroup member filter mode. This parameter is ignored when deleting a\n" + "\tmulticast membership table entry. The configurations\n" + "\t'GSW_IGMP_MEMBER_EXCLUDE' and 'GSW_IGMP_MEMBER_INCLUDE'\n" + "\tare only supported if IGMPv3 is used.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Include source IP address membership mode. Only supported for\n" + "\t\tIGMPv3.\n" + "\n" + "\t1: Exclude source IP address membership mode. Only supported for\n" + "\t\tIGMPv3.\n" + "\n" + "\t2: Group source IP address is 'don't care'. This means all source IP\n" + "\t\taddresses (*) are included for the multicast group membership. This\n" + "\t\tis the default mode for IGMPv1 and IGMPv2.\n" + "bExclSrcIP :\n" + "\tExclude Mode - valid for GSWIP 3.0 only - Includes or Excludes Source IP - uIP_Gsa\n" + "\n", + /* 33: GSW_MULTICAST_TABLE_ENTRY_READ */ + "Read out the multicast membership table that is located inside the switch\n" + "hardware. The 'bInitial' parameter restarts the read operation at the\n" + "beginning of the table. Every following GSW_MULTICAST_TABLE_ENTRY_READ\n" + "call reads out the next found entry. The 'bLast' parameter is set by the\n" + "switch API in case the last entry of the table is reached.", + /* 34: GSW_MULTICAST_TABLE_ENTRY_REMOVE */ + "Remove an host member from a multicast group. The multicast group entry is\n" + "completely removed from the multicast table in case it has no host member port\n" + "left. Group members can be added using GSW_MULTICAST_TABLE_ENTRY_ADD.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "nSubIfId :\n" + "\tSub-Interface Id - valid for GSWIP 3.0 only\n" + "\n" + "nFID :\n" + "\tFID - valid for GSWIP 3.0 only subject to Global FID for MC is enabled\n" + "\n" + "eIPVersion :\n" + "\tSelect the IP version of the 'uIP_Gda' and 'uIP_Gsa' fields. Both\n" + "\tfields support either IPv4 or IPv6.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: IPv4\n" + "\n" + "\t1: IPv6\n" + "\n" + "uIP_Gda :\n" + "\tGroup Destination IP address (GDA).\n" + "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." + "\n" + "uIP_Gsa :\n" + "\tGroup Source IP address. Only used in case IGMPv3 support is enabled\n" + "\tand 'eModeMember != GSW_IGMP_MEMBER_DONT_CARE'.\n" + "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." + "\n" + "eModeMember :\n" + "\tGroup member filter mode. This parameter is ignored when deleting a\n" + "\tmulticast membership table entry. The configurations\n" + "\t'GSW_IGMP_MEMBER_EXCLUDE' and 'GSW_IGMP_MEMBER_INCLUDE'\n" + "\tare only supported if IGMPv3 is used.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Include source IP address membership mode. Only supported for\n" + "\t\tIGMPv3.\n" + "\n" + "\t1: Exclude source IP address membership mode. Only supported for\n" + "\t\tIGMPv3.\n" + "\n" + "\t2: Group source IP address is 'don't care'. This means all source IP\n" + "\t\taddresses (*) are included for the multicast group membership. This\n" + "\t\tis the default mode for IGMPv1 and IGMPv2.\n" + "bExclSrcIP :\n" + "\tExclude Mode - valid for GSWIP 3.0 only - Includes or Excludes Source IP - uIP_Gsa\n" + "\n", + /* 35: GSW_PORT_CFG_GET */ + "Read out the current Ethernet port configuration.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 36: GSW_PORT_CFG_SET */ + "Set the Ethernet port configuration.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "eEnable :\n" + "\tEnable Port (ingress only, egress only, both directions, or disabled).\n" + "\tThis parameter is used for Spanning Tree Protocol and 802.1X\n" + "\tapplications.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: The port is disabled in both directions.\n" + "\n" + "\t1: The port is enabled in both directions (ingress and egress).\n" + "\n" + "\t2: The port is enabled in the receive (ingress) direction only.\n" + "\n" + "\t3: The port is enabled in the transmit (egress) direction only.\n" + "\n" + "bUnicastUnknownDrop :\n" + "\tDrop unknown unicast packets. Do not send out unknown unicast packets\n" + "\ton this port, if the boolean parameter is enabled. By default packets\n" + "\tof this type are forwarded to this port.\n" + "\n" + "bMulticastUnknownDrop :\n" + "\tDrop unknown multicast packets. Do not send out unknown multicast\n" + "\tpackets on this port, if boolean parameter is enabled. By default\n" + "\tpackets of this type are forwarded to this port.\n" + "\n" + "bReservedPacketDrop :\n" + "\tDrop reserved packet types (destination address from '01 80 C2 00 00\n" + "\t00' to '01 80 C2 00 00 2F') received on this port.\n" + "\n" + "bBroadcastDrop :\n" + "\tDrop Broadcast packets received on this port. By default packets of\n" + "\tthis type are forwarded to this port.\n" + "\n" + "bAging :\n" + "\tEnables MAC address table aging. The MAC table entries learned on this\n" + "\tport are removed after the aging time has expired. The aging time is a\n" + "\tglobal parameter, common to all ports.\n" + "\n" + "bLearning :\n" + "\tMAC address table learning on the port specified by 'nPortId'.\n" + "\tBy default this parameter is always enabled. \n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Learning is enabled. \n" + "\t1: Learning is disabled.\n" + "\n" + "bLearningMAC_PortLock :\n" + "\tAutomatic MAC address table learning locking on the port specified by\n" + "\t'nPortId'.\n" + "\n" + "nLearningLimit :\n" + "\tAutomatic MAC address table learning limitation on this port. The\n" + "\tlearning functionality is disabled when the limit value is zero. The\n" + "\tvalue 0xFFFF to allow unlimited learned address.\n" + "\n" + "bMAC_SpoofingDetection :\n" + "\tMAC spoofing detection. Identifies ingress packets that carry a MAC source address\n" + "\twhich was previously learned on a different ingress port (learned by MAC bridging table).\n" + "\tThis also applies to static added entries. Those violated packets could be\n" + "\taccepted or discarded, depending on the global switch configuration 'bMAC_SpoofingAction'.\n" + "\tThis parameter is only taken into account when 'bLearning' is enabled.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Port MAC address spoofing detection is not enabled. \n" + "\t1: Port MAC address spoofing detection is enabled.\n" + "\n" + "eFlowCtrl :\n" + "\tPort Flow Control Status. Enables the flow control function.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Automatic flow control mode selection through auto-negotiation.\n" + "\n" + "\t1: Receive flow control only\n" + "\n" + "\t2: Transmit flow control only\n" + "\n" + "\t3: Receive and Transmit flow control\n" + "\n" + "\t4: No flow control\n" + "\n" + "ePortMonitor :\n" + "\tPort monitor feature. Allows forwarding of egress and/or ingress\n" + "\tpackets to the monitor port. If enabled, the monitor port gets a copy\n" + "\tof the selected packet type.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Mirror Feature is disabled. Normal port usage.\n" + "\n" + "\t1: Port Ingress packets are mirrored to the monitor port.\n" + "\n" + "\t2: Port Egress packets are mirrored to the monitor port.\n" + "\n" + "\t3: Port Ingress and Egress packets are mirrored to the monitor port.\n" + "\n" + "\t4: Packet mirroring of 'unknown VLAN violation' frames.\n" + "\n" + "\t16: Packet mirroring of 'VLAN ingress or egress membership violation'\n" + "\t\tframes.\n" + "\n" + "\t32: Packet mirroring of 'port state violation' frames.\n" + "\n" + "\t64: Packet mirroring of 'MAC learning limit violation' frames.\n" + "\n" + "\t128: Packet mirroring of 'port lock violation' frames.\n" + "bIfCounters :\n" + "\tAssign Interface RMON Counters for this Port - GSWIP-3.0\n" + "nIfCountStartIdx :\n" + "\tInterface RMON Counters Start Index - GSWIP-3.0. \n" + "\tValue of (-1) denotes unassigned Interface Counters.\n" + "\tValid range : 0-255 available to be shared amongst ports in desired way.\n" + "eIfRMONmode :\n" + "\tInterface RMON Counters Mode - GSWIP-3.0\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: FID based Interface RMON counters Usage.\n" + "\n" + "\t1: Sub-Interface Id based Interface RMON counters Usage .\n" + "\n" + "\t2: Flow Id (LSB bits 3 to 0) based Interface RMON counters Usage .\n" + "\n" + "\t3: Flow Id (MSB bits 7 to 4) based Interface RMON counters Usage.\n" + "\n", + /* 37: GSW_PORT_LINK_CFG_GET */ + "Read out the Ethernet port's speed, link status, and flow control status. The\n" + "information for one single port 'nPortId' is returned. An error code is\n" + "returned if the selected port does not exist.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 38: GSW_PORT_LINK_CFG_SET */ + "Set the Ethernet port link, speed status and flow control status. The\n" + "configuration applies to a single port 'nPortId'.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "bDuplexForce :\n" + "\tForce Port Duplex Mode. - 0: Negotiate Duplex Mode.\n" + "\tAuto-negotiation mode. Negotiated duplex mode given in 'eDuplex'\n" + "\tduring GSW_PORT_LINK_CFG_GET calls. - 1: Force Duplex\n" + "\tMode. Force duplex mode in 'eDuplex'.\n" + "\n" + "eDuplex :\n" + "\tPort Duplex Status.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Port operates in full-duplex mode\n" + "\n" + "\t1: Port operates in half-duplex mode\n" + "\n" + "bSpeedForce :\n" + "\tForce Link Speed. - 0: Negotiate Link Speed. Negotiated speed\n" + "\tgiven in 'eSpeed' during GSW_PORT_LINK_CFG_GET calls. -\n" + "\t1: Force Link Speed. Forced speed mode in 'eSpeed'.\n" + "\n" + "eSpeed :\n" + "\tEthernet port link up/down and speed status.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t10: 10 Mbit/s\n" + "\n" + "\t100: 100 Mbit/s\n" + "\n" + "\t200: 200 Mbit/s\n" + "\n" + "\t1000: 1000 Mbit/s\n" + "\n" + "bLinkForce :\n" + "\tForce Link. - 0: Auto-negotiate Link. Current link status is\n" + "\tgiven in 'eLink' during GSW_PORT_LINK_CFG_GET calls. - 1:\n" + "\tForce Duplex Mode. Force duplex mode in 'eLink'.\n" + "\n" + "eLink :\n" + "\tLink Status. Read out the current link status. Note that the link\n" + "\tcould be forced by setting 'bLinkForce'.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Link up. Any connected LED still behaves based on the real PHY\n" + "\t\tstatus.\n" + "\n" + "\t1: Link down.\n" + "\n" + "eMII_Mode :\n" + "\tSelected interface mode (MII/RMII/RGMII/GMII).\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Normal PHY interface (twisted pair), use the internal MII\n" + "\t\tInterface.\n" + "\n" + "\t1: Reduced MII interface in normal mode.\n" + "\n" + "\t2: GMII or MII, depending upon the speed.\n" + "\n" + "\t3: RGMII mode.\n" + "\n" + "eMII_Type :\n" + "\tSelect MAC or PHY mode (PHY = Reverse xMII).\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: MAC Mode. The Ethernet port is configured to work in MAC mode.\n" + "\n" + "\t1: PHY Mode. The Ethernet port is configured to work in PHY mode.\n" + "\n" + "eClkMode :\n" + "\tInterface Clock mode (used for RMII mode).\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Clock Mode not applicable.\n" + "\n" + "\t1: Clock Master Mode. The port is configured to provide the clock as\n" + "\t\toutput signal.\n" + "\n" + "\t2: Clock Slave Mode. The port is configured to use the input clock\n" + "\t\tsignal.\n" + "\n" + "bLPI :\n" + "\t'Low Power Idle' Support for 'Energy Efficient Ethernet'. Only enable\n" + "\tthis feature in case the attached PHY also supports it.", + /* 39: GSW_PORT_PHY_ADDR_GET */ + "Read out the MDIO device address of an Ethernet PHY that is connected to an\n" + "Ethernet port. This device address is useful when accessing PHY registers\n" + "using the commands GSW_MDIO_DATA_WRITE, GSW_MDIO_DATA_READ,\n" + "GSW_MMD_DATA_WRITE and GSW_MMD_DATA_READ.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 40: GSW_PORT_PHY_QUERY */ + "Check whether the Ethernet switch hardware has detected an Ethernet PHY\n" + "connected to the given Ethernet port 'nPortId'.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 41: GSW_PORT_REDIRECT_GET */ + "Ingress and egress packets of one specific Ethernet port can be redirected to\n" + "the CPU port. The ingress and egress packet redirection can be configured\n" + "individually. This command reads out the current configuration of a dedicated\n" + "port. A new configuration can be applied by calling\n" + "GSW_PORT_REDIRECT_SET.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 42: GSW_PORT_REDIRECT_SET */ + "Select ingress and egress packets of one specific Ethernet port that can be\n" + "redirected to a port that is configured as the 'CPU port'. The ingress and\n" + "egress packet direction can be configured individually. The packet filter of\n" + "the original port still applies to the packet (for example, MAC address\n" + "learning is done for the selected port and not for the CPU port). On CPU port\n" + "side, no additional learning, forwarding look up, VLAN processing and queue\n" + "selection is performed for redirected packets. Depending on the hardware\n" + "platform used, the CPU port has to be set in advance using\n" + "GSW_CPU_PORT_CFG_SET. The currently used configuration can be read using\n" + "GSW_PORT_REDIRECT_GET.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "bRedirectEgress :\n" + "\tPort Redirect Option. If enabled, all packets destined to 'nPortId'\n" + "\tare redirected to the CPU port. The destination port map in the status\n" + "\theader information is not changed so that the original destination\n" + "\tport can be identified by software.\n" + "\n" + "bRedirectIngress :\n" + "\tPort Ingress Direct Forwarding. If enabled, all packets sourced from\n" + "\t'nPortId' are directly forwarded to queue 0 of the CPU port. These\n" + "\tpackets are not modified and are not affected by normal learning, look\n" + "\tup, VLAN processing and queue selection.", + /* 43: GSW_PORT_RGMII_CLK_CFG_GET */ + "Read the RGMII clocking parameter in case the Ethernet port is configured in\n" + "RGMII mode. The configuration can be set by calling\n" + "GSW_PORT_RGMII_CLK_CFG_SET. It applies to a single port 'nPortId'.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 44: GSW_PORT_RGMII_CLK_CFG_SET */ + "Configure the RGMII clocking parameter in case the Ethernet port is configured\n" + "in RGMII mode. The configuration can be read by calling\n" + "GSW_PORT_RGMII_CLK_CFG_GET. It applies to a single port 'nPortId'.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "nDelayRx :\n" + "\tClock Delay RX [multiple of 500 ps].\n" + "\n" + "nDelayTx :\n" + "\tClock Delay TX [multiple of 500 ps].", + /* 45: GSW_QOS_CLASS_DSCP_GET */ + "Read out the current traffic class to DSCP mapping table. The table can be\n" + "written using GSW_QOS_CLASS_DSCP_SET.", + /* 46: GSW_QOS_CLASS_DSCP_SET */ + "Configure the traffic class to DSCP priority mapping table. This table is\n" + "global for the whole switch device. The table can be read by\n" + "GSW_QOS_CLASS_DSCP_GET.\n" + "\nParameter:\n----------\n" + "nTrafficClass\n" + "\t\tTable index of the traffic table to DSCP (6-bit) mapping\n" + "\t\ttable. The index starts counting from zero.\n" + "nDSCP :\n" + "\t\tDSCP value (6-bit) associated with a particular Traffic class.", + /* 47: GSW_QOS_CLASS_PCP_GET */ + "Read out the current traffic class to 802.1P (PCP) priority mapping table.\n" + "This table is global and valid for the entire switch device. The table can be\n" + "written using GSW_QOS_CLASS_PCP_SET.", + /* 48: GSW_QOS_CLASS_PCP_SET */ + "Configure the traffic class to 802.1P (PCP) priority mapping table. This table\n" + "is global for the whole switch device. The table can be read by\n" + "GSW_QOS_CLASS_PCP_GET.\n" + "\nParameter:\n----------\n" + "nTrafficClass :\n" + "\t\tTable index of the traffic table to PCP (3-bit) mapping\n" + "\t\ttable. The index starts counting from zero.\n" + "nPCP :\n" + "\t\tPCP (3-bit) value associated with a particular traffic class.", + /* 49: GSW_QOS_DSCP_CLASS_GET */ + "Read out the QoS 64 DSCP mapping to the switch priority queues. The table\n" + "configuration can be set using GSW_QOS_DSCP_CLASS_SET.", + /* 50: GSW_QOS_DSCP_CLASS_SET */ + "Initialize the QoS 64 DSCP priority mapping to the switch priority queues.\n" + "This configuration applies for the whole switch device. The table\n" + "configuration can be read by GSW_QOS_DSCP_CLASS_GET.\n" + "\nParameter:\n----------\n" + "nDSCP :\n" + "\t\tTable index of the DSCP to traffic table mapping\n" + "\t\ttable. The index starts counting from zero.\n" + "nTrafficClass :\n" + "\t\tTraffic class associated with a particular DSCP\n" + "\t\tvalue.", + /* 51: GSW_QOS_DSCP_DROP_PRECEDENCE_CFG_GET */ + "Read out the current DSCP to Drop Precedence assignment mapping table. The\n" + "table can be configured using GSW_QOS_DSCP_DROP_PRECEDENCE_CFG_SET.", + /* 52: GSW_QOS_DSCP_DROP_PRECEDENCE_CFG_SET */ + "Configures the DSCP to Drop Presedence assignment mapping table. This mapping\n" + "table is used to identify the switch internal used drop precedence based on\n" + "the DSCP value of the incoming packet. The current mapping table configuration\n" + "can be read by GSW_QOS_DSCP_DROP_PRECEDENCE_CFG_GET.\n" + "\nParameter:\n----------\n" + "nDSCP :\n" + "\t\tTable index of the DSCP to Drop Presedence assignment\n" + "\t\ttable. The index starts counting from zero.\n" + "nDSCP_DropPrecedence :\n" + "\t\tDSCP to drop presedence assignment. Every array entry\n" + "\t\trepresent the drop presedence for one of the 64\n" + "\t\texisting DSCP values. DSCP is the index to an array\n" + "\t\tof resulting drop presedence values. The index starts\n" + "\t\tcounting from zero.\n" + "\t\tSupported Values:\n" + "\t\t-----------------\n" + "\t\t0: Critical Packet. Metering will never changes their\n" + "\t\tdrop precedence of these packets.\n\n" + "\t\t1: Green Drop Precedence Packet. Packet is marked\n" + "\t\twith a 'low' drop precedence.\n\n" + "\t\t2: Yellow Drop Precedence Packet. Packet is marked\n" + "\t\twith a 'middle' drop precedence.\n\n" + "\t\t3: Red Drop Precedence Packet. Packet is marked with\n" + "\t\ta 'high' drop precedence.", + /* 53: GSW_QOS_METER_CFG_GET */ + "Configure the parameters of a rate meter instance. This instance can be\n" + "assigned to an ingress/egress port using GSW_QOS_METER_PORT_ASSIGN. It\n" + "can also be used by the flow classification engine. The total number of\n" + "available rate meters can be retrieved by the capability list using\n" + "GSW_CAP_GET. The current configuration of a meter instance can be\n" + "retrieved using GSW_QOS_METER_CFG_GET.\n" + "\nParameter:\n----------\n" + "nMeterId :\n" + "\tMeter index (zero-based counting).", + /* 54: GSW_QOS_METER_CFG_SET */ + "This command configures the parameters of a rate meter instance. This instance\n" + "can be assigned to an ingress/egress port by using\n" + "GSW_QOS_METER_PORT_ASSIGN. It can also be used by the flow\n" + "classification engine. The total number of available rate meters can be\n" + "retrieved by the capability list using GSW_CAP_GET. The current\n" + "configuration of a meter instance can be retrieved using\n" + "GSW_QOS_METER_CFG_GET.\n" + "\nParameter:\n----------\n" + "bEnable :\n" + "\tEnable/Disable the meter shaper.\n" + "\n" + "nMeterId :\n" + "\tMeter index (zero-based counting).\n" + "\n" + "nCbs :\n" + "\tCommitted Burst Size (CBS [Bytes]).\n" + "\n" + "nEbs :\n" + "\tExcess Burst Size (EBS [Bytes]).\n" + "\n" + "nRate :\n" + "\tCommitted Information Rate (CIR [kbit/s])\n" + "nPiRate :\n" + "\tPeak Information Rate (PIR [kbit/s]) - applicable for trTCM only)" + "\n", + /* 55: GSW_QOS_METER_PORT_ASSIGN */ + "Assign a rate meter instance to an ingress and/or egress port. A maximum of\n" + "two meter IDs can be assigned to one single ingress port. This meter instance\n" + "to port assignment can be removed using GSW_QOS_METER_PORT_DEASSIGN. A\n" + "list of all available assignments can be read using\n" + "GSW_QOS_METER_PORT_GET.\n" + "\nParameter:\n----------\n" + "nMeterId :\n" + "\tMeter index (zero-based counting).\n" + "\n" + "eDir :\n" + "\tPort assignment. Could be either ingress, egress or both. Setting it\n" + "\tto 'GSW_DIRECTION_NONE' would remove the queue for any port\n" + "\tassignment.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: No direction.\n" + "\n" + "\t1: Ingress direction.\n" + "\n" + "\t2: Egress direction.\n" + "\n" + "\t3: Ingress and egress direction.\n" + "\n" + "nPortIngressId :\n" + "\tIngress Port Id.\n" + "\n" + "nPortEgressId :\n" + "\tEgress Port Id.", + /* 56: GSW_QOS_METER_PORT_DEASSIGN */ + "Deassign a rate meter instance from an ingress and/or egress port. A maximum\n" + "of two meter IDs can be assigned to one single ingress port. The meter\n" + "instance is given to the command and the port configuration is returned. An\n" + "instance to port assignment can be done using GSW_QOS_METER_PORT_ASSIGN.\n" + "A list of all available assignments can be read using\n" + "GSW_QOS_METER_PORT_GET.\n" + "\nParameter:\n----------\n" + "nMeterId :\n" + "\tMeter index (zero-based counting).\n" + "\n" + "eDir :\n" + "\tPort assignment. Could be either ingress, egress or both. Setting it\n" + "\tto 'GSW_DIRECTION_NONE' would remove the queue for any port\n" + "\tassignment.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: No direction.\n" + "\n" + "\t1: Ingress direction.\n" + "\n" + "\t2: Egress direction.\n" + "\n" + "\t3: Ingress and egress direction.\n" + "\n" + "nPortIngressId :\n" + "\tIngress Port Id.\n" + "\n" + "nPortEgressId :\n" + "\tEgress Port Id.", + /* 57: GSW_QOS_METER_PORT_GET */ + "Reads out all meter instance to port assignments that are done using\n" + "GSW_QOS_METER_PORT_ASSIGN. All assignments are read from an internal\n" + "table where every read call retrieves the next entry of the table. Setting the\n" + "parameter 'bInitial' starts the read operation at the beginning of the table.\n" + "The returned parameter 'bLast' indicates that the last element of the table\n" + "was returned.", + /* 58: GSW_QOS_PCP_CLASS_GET */ + "Read out the PCP to traffic class mapping table. The table configuration can\n" + "be set using GSW_QOS_PCP_CLASS_SET.", + /* 59: GSW_QOS_PCP_CLASS_SET */ + "Initialize the QoS 802.1P switch priority queue mapping. This configuration\n" + "applies for the whole switch device. The table configuration can be read by\n" + "GSW_QOS_PCP_CLASS_GET.\n" + "\nParameter:\n----------\n" + "nPCP :\n" + "\t\tTable index of the PCP to traffic table mapping\n" + "\t\ttable. The index starts counting from zero.\n" + "nTrafficClass :\n" + "\t\tTraffic class associated with a particular PCP value.", + /* 60: GSW_QOS_PORT_CFG_GET */ + "Read out the current Ethernet port traffic class of ingress packets. It is\n" + "used to identify the packet priority and the related egress priority queue.\n" + "The port configuration can be set using GSW_QOS_PORT_CFG_SET.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 61: GSW_QOS_PORT_CFG_SET */ + "Configures the Ethernet port based traffic class assignment of ingress\n" + "packets. It is used to identify the packet priority and the related egress\n" + "priority queue. For DSCP, the priority to queue assignment is done using\n" + "GSW_QOS_DSCP_CLASS_SET. For VLAN, the priority to queue assignment is\n" + "done using GSW_QOS_PCP_CLASS_SET. The current port configuration can be\n" + "read using GSW_QOS_PORT_CFG_GET.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "eClassMode :\n" + "\tSelect the packet header field on which to base the traffic class\n" + "\tassignment.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: No traffic class assignment based on DSCP or PCP\n" + "\n" + "\t1: Traffic class assignment based on DSCP. PCP information is ignored.\n" + "\t\tThe Port Class is used in case DSCP is not available in the packet.\n" + "\n" + "\t2: Traffic class assignment based on PCP. DSCP information is ignored.\n" + "\t\tThe Port Class is used in case PCP is not available in the packet.\n" + "\n" + "\t3: Traffic class assignment based on DSCP. Make the assignment based\n" + "\t\ton PCP in case the DSCP information is not available in the packet\n" + "\t\theader. The Port Class is used in case both are not available in\n" + "\t\tthe packet.\n" + "\n" + "\t4: CTAG VLAN PCP, IP DSCP. Traffic class assignment based\n" + "\t\t on CTAG VLAN PCP, alternative use DSCP based assignment.\n" + "\n" + "\t5: STAG VLAN PCP. Traffic class assignment based on STAG VLAN PCP. \n" + "\n" + "\t6: STAG VLAN PCP, IP DSCP. Traffic class assignment based\n" + "\t\t on STAG VLAN PCP, alternative use DSCP based assignment.\n" + "\n" + "\t7: IP DSCP, STAG VLAN PCP. Traffic class assignment based\n" + "\t\ton DSCP, alternative use STAG VLAN PCP based assignment.\n" + "\n" + "\t8: STAG VLAN PCP, CTAG VLAN PCP. Traffic class assignment based\n" + "\t\ton STAG VLAN PCP, alternative use CTAG VLAN PCP based assignment.\n" + "\n" + "\t9: STAG VLAN PCP, CTAG VLAN PCP, IP DSCP. Traffic class assignment\n" + "\t\tbased on STAG VLAN PCP, alternative use CTAG VLAN PCP based \n" + "\t\tassignment, alternative use DSCP based assignment. \n" + "\n" + "\t10: IP DSCP, STAG VLAN PCP, CTAG VLAN PCP. Traffic class assignment\n" + "\t\t based on DSCP, alternative use STAG VLAN PCP based\n" + "\t\t assignment, alternative use CTAG VLAN PCP based assignment.\n" + "\n" + "nTrafficClass :\n" + "\tDefault port priority in case no other priority (such as VLAN-based\n" + "\tPCP or IP-based DSCP) is used.", + /* 62: GSW_QOS_PORT_REMARKING_CFG_GET */ + "Read out the Port Remarking Configuration. Ingress and Egress remarking\n" + "options for DSCP and PCP. Remarking is done either on the used traffic class\n" + "or the drop precedence. The current configuration can be set using\n" + "GSW_QOS_PORT_REMARKING_CFG_SET.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 63: GSW_QOS_PORT_REMARKING_CFG_SET */ + "Port Remarking Configuration. Ingress and Egress remarking options for DSCP\n" + "and PCP. Remarking is done either on the used traffic class or the drop\n" + "precedence. The current configuration can be read using\n" + "GSW_QOS_PORT_REMARKING_CFG_GET.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "eDSCP_IngressRemarkingEnable :\n" + "\tIngress DSCP Remarking. Specifies on ingress side how a packet should\n" + "\tbe remarked. This DSCP remarking only works in case remarking is\n" + "\tenabled on the egress port. This configuration requires that remarking\n" + "\tis also enabled on the egress port. DSCP remarking enable on either\n" + "\tingress or egress port side does not perform any remark operation.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: No DSCP Remarking. No remarking is done on the egress port.\n" + "\n" + "\t1: TC DSCP 6-Bit Remarking. The complete DSCP remarking is done based\n" + "\t\ton the traffic class. The traffic class to DSCP value mapping is\n" + "\t\tgiven in a device global table.\n" + "\n" + "\t2: TC DSCP 3-Bit Remarking. The upper 3-Bits of the DSCP field are\n" + "\t\tremarked based on the traffic class. The traffic class to DSCP\n" + "\t\tvalue mapping is given in a device global table.\n" + "\n" + "\t3: Drop Precedence Remarking. The Drop Precedence is remarked on the\n" + "\t\tegress side.\n" + "\n" + "\t4: TC Drop Precedence Remarking. The Drop Precedence is remarked on\n" + "\t\tthe egress side and the upper 3-Bits of the DSCP field are remarked\n" + "\t\tbased on the traffic class. The traffic class to DSCP value mapping\n" + "\t\tis given in a device global table.\n" + "\n" + "bDSCP_EgressRemarkingEnable :\n" + "\tEgress DSCP Remarking. Applies remarking on egress packets in a\n" + "\tfashion as specified on the ingress port. This ingress port remarking\n" + "\tis configured by the parameter 'eDSCP_IngressRemarking'. This\n" + "\tconfiguration requires that remarking is also enabled on the ingress\n" + "\tport. DSCP remarking enable on either ingress or egress port side does\n" + "\tnot perform any remark operation.\n" + "\n" + "bPCP_IngressRemarkingEnable :\n" + "\tIngress PCP Remarking. Applies remarking to all port ingress packets.\n" + "\tThis configuration requires that remarking is also enabled on the\n" + "\tegress port. PCP remarking enable on either ingress or egress port\n" + "\tside does not perform any remark operation.\n" + "\n" + "bPCP_EgressRemarkingEnable :\n" + "\tEgress PCP Remarking. Applies remarking for all port egress packets.\n" + "\tThis configuration requires that remarking is also enabled on the\n" + "\tingress port. PCP remarking enable on either ingress or egress port\n" + "\tside does not perform any remark operation." + "bSTAG_PCP_IngressRemarkingEnable :\n" + "\tIngress STAG VLAN PCP Remarking.\n" + "bSTAG_DEI_IngressRemarkingEnable :\n" + "\tIngress STAG VLAN DEI Remarking.\n" + "bSTAG_PCP_DEI_EgressRemarkingEnable :\n" + "\tEgress STAG VLAN PCP & DEI Remarking.\n" + "\n", + /* 64: GSW_QOS_QUEUE_PORT_GET */ + "Read out the traffic class and port assignment done using\n" + "GSW_QOS_QUEUE_PORT_SET. Please note that the device comes along with a\n" + "default configuration and assignment.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available. This is an input parameter for\n" + "\tGSW_QOS_QUEUE_PORT_GET.\n" + "\n" + "nTrafficClassId :\n" + "\tTraffic Class index (zero-based counting). This is an input parameter\n" + "\tfor GSW_QOS_QUEUE_PORT_GET.\n" + "\n" + "listunused :\n" + "\tPrintout a list of all unused and unassigned egress queue.\n" + "bRedirectionBypass :\n" + "\tQueue Redirection bypass Option. If enabled, all packets destined \n" + "\tto 'nQueueId' are redirected from the 'nPortId' to 'nRedirectPortId'\n" + "\n", + /* 65: GSW_QOS_QUEUE_PORT_SET */ + "Sets the Queue ID for one traffic class of one port. The total amount of\n" + "supported ports, queues and traffic classes can be retrieved from the\n" + "capability list using GSW_CAP_GET. Please note that the device comes\n" + "along with a default configuration and assignment.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available. This is an input parameter for\n" + "\tGSW_QOS_QUEUE_PORT_GET.\n" + "\n" + "nTrafficClassId :\n" + "\tTraffic Class index (zero-based counting). This is an input parameter\n" + "\tfor GSW_QOS_QUEUE_PORT_GET.\n" + "\n" + "nQueueId :\n" + "\tQoS queue index (zero-based counting). This is an output parameter for\n" + "\tGSW_QOS_QUEUE_PORT_GET.\n" + "bRedirectionBypass :\n" + "\tQueue Redirection bypass Option. If enabled, all packets destined \n" + "\tto 'nQueueId' are redirected from the 'nPortId' to 'nRedirectPortId'\n" + "\n" + "nRedirectPortId :\n" + "\tRedirected traffic forward port.\n" + "\tThe bRedirectPortId, all packets from 'nPortId' are redirected.\n" + "\n", + /* 66: GSW_QOS_SCHEDULER_CFG_GET */ + "Read out the current scheduler configuration of a given egress port. This\n" + "configuration can be modified using GSW_QOS_SCHEDULER_CFG_SET.\n" + "\nParameter:\n----------\n" + "nQueueId :\n" + "\tQoS queue index (zero-based counting).", + /* 67: GSW_QOS_SCHEDULER_CFG_SET */ + "This configuration decides how the egress queues, attached to a single port,\n" + "are scheduled to transmit the queued Ethernet packets. The configuration\n" + "differentiates between 'Strict Priority' and 'weighted fair queuing'. This\n" + "applies when multiple egress queues are assigned to an Ethernet port. Using\n" + "the WFQ feature on a port requires the configuration of weights on all given\n" + "queues that are assigned to that port. Strict Priority means that no dedicated\n" + "weight is configured and the queue can transmit following its priority status.\n" + "The given configuration can be read out using GSW_QOS_SCHEDULER_CFG_GET.\n" + "\nParameter:\n----------\n" + "nQueueId :\n" + "\tQoS queue index (zero-based counting).\n" + "\n" + "eType :\n" + "\tScheduler Type (Strict Priority/Weighted Fair Queuing).\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Strict Priority.\n" + "\n" + "\t1: Weighted Fair Queuing.\n" + "\n" + "nWeight :\n" + "\tWeight in Token. Parameter used for WFQ configuration. Sets the weight\n" + "\tin token in relation to all remaining queues on this egress port\n" + "\thaving WFQ configuration. This parameter is only used when\n" + "\t'eType=GSW_QOS_SCHEDULER_WFQ'.", + /* 68: GSW_QOS_SHAPER_CFG_GET */ + "This command retrieves the rate and the burst size configuration of a rate\n" + "shaper instance. A configuration can be modified using\n" + "GSW_QOS_SHAPER_CFG_SET. The total number of available rate shapers can\n" + "be retrieved by the capability list using GSW_CAP_GET.\n" + "\nParameter:\n----------\n" + "nRateShaperId :\n" + "\tRate shaper index (zero-based counting).\n" + "\n" + "nRate :\n" + "\tRate [kbit/s]", + /* 69: GSW_QOS_SHAPER_CFG_SET */ + "This command configures a rate shaper instance with the rate and the burst\n" + "size. This instance can be assigned to QoS queues by using\n" + "GSW_QOS_SHAPER_QUEUE_ASSIGN. The total number of available rate shapers\n" + "can be retrieved by the capability list using GSW_CAP_GET.\n" + "\nParameter:\n----------\n" + "nRateShaperId :\n" + "\tRate shaper index (zero-based counting).\n" + "\n" + "bEnable :\n" + "\tEnable/Disable the rate shaper.\n" + "\n" + "bAVB :\n" + "\t802.1Qav credit based shaper mode. This specific shaper algorithm mode is used\n" + "\tby the audio/video bridging (AVB)network (according to 802.1Qav). By default, an token \n" + "\tbased shaper algorithm is used.\n" + "\n" + "nCbs :\n" + "\tCommitted Burst Size (CBS [bytes])\n" + "\n" + "nRate :\n" + "\tRate [kbit/s]", + /* 70: GSW_QOS_SHAPER_QUEUE_ASSIGN */ + "Assign one rate shaper instance to a QoS queue. The function returns with an\n" + "error in case there already are too many shaper instances assigned to a queue.\n" + "The queue instance can be enabled and configured using\n" + "GSW_QOS_SHAPER_CFG_SET. To remove a rate shaper instance from a QoS\n" + "queue, please use GSW_QOS_SHAPER_QUEUE_DEASSIGN. The total number of\n" + "available rate shaper instances can be retrieved by the capability list using\n" + "GSW_CAP_GET.\n" + "\nParameter:\n----------\n" + "nRateShaperId :\n" + "\tRate shaper index (zero-based counting).\n" + "\n" + "nQueueId :\n" + "\tQoS queue index (zero-based counting).", + /* 71: GSW_QOS_SHAPER_QUEUE_DEASSIGN */ + "Deassign one rate shaper instance from a QoS queue. The function returns with\n" + "an error in case the requested instance is not currently assigned to the\n" + "queue. The queue instance can be enabled and configured by using\n" + "GSW_QOS_SHAPER_CFG_SET. To assign a rate shaper instance to a QoS queue,\n" + "please use GSW_QOS_SHAPER_QUEUE_ASSIGN. The total number of available\n" + "rate shapers can be retrieved by the capability list using GSW_CAP_GET.\n" + "\nParameter:\n----------\n" + "nRateShaperId :\n" + "\tRate shaper index (zero-based counting).\n" + "\n" + "nQueueId :\n" + "\tQoS queue index (zero-based counting).", + /* 72: GSW_QOS_SHAPER_QUEUE_GET */ + "Check whether a rate shaper instance is assigned to the egress queue. The\n" + "egress queue index is the function input parameter. The switch API sets the\n" + "boolean parameter 'bAssigned == 1' in case a rate shaper is assigned\n" + "and then sets 'nRateShaperId' to describe the rater shaper instance. The\n" + "parameter 'bAssigned == 0' in case no rate shaper instance is\n" + "currently assigned to the queue instance. The commands\n" + "GSW_QOS_SHAPER_QUEUE_ASSIGN allow a rate shaper instance to be assigned,\n" + "and GSW_QOS_SHAPER_CFG_SET allows for configuration of a shaper\n" + "instance. The total number of available rate shapers can be retrieved by the\n" + "capability list using GSW_CAP_GET.\n" + "\nParameter:\n----------\n" + "nQueueId :\n" + "\tQoS queue index (zero-based counting). This parameter is the input\n" + "\tparameter for the GET function.", + /* 73: GSW_QOS_STORM_CFG_GET */ + "Reads out the current meter instance assignment for storm control. This\n" + "configuration can be modified using GSW_QOS_STORM_CFG_SET.", + /* 74: GSW_QOS_STORM_CFG_SET */ + "This command configures one meter instances for storm control. These instances\n" + "can be used for ingress broadcast-, multicast- and unknown unicast- packets.\n" + "Some platforms support addition of additional meter instances for this type of\n" + "packet. Repeated calls of GSW_QOS_STORM_CFG_SET allow addition of\n" + "additional meter instances. An assignment can be retrieved using\n" + "GSW_QOS_STORM_CFG_GET. Setting the broadcast, multicast and unknown\n" + "unicast packets boolean switch to zero deletes all metering instance\n" + "assignments.\n" + "\nParameter:\n----------\n" + "nMeterId :\n" + "\tMeter index 0 (zero-based counting).\n" + "\n" + "bBroadcast :\n" + "\tMeter instances used for broadcast traffic.\n" + "\n" + "bMulticast :\n" + "\tMeter instances used for multicast traffic.\n" + "\n" + "bUnknownUnicast :\n" + "\tMeter instances used for unknown unicast traffic.", + /* 75: GSW_QOS_WRED_CFG_GET */ + "Read out the global WRED drop probability profile and thresholds of the\n" + "device. Given parameters are rounded to the segment size of the HW platform.\n" + "The supported segment size is given by the capability list by using\n" + "GSW_CAP_GET.", + /* 76: GSW_QOS_WRED_CFG_SET */ + "Configures the global WRED drop probability profile and thresholds of the\n" + "device. Given parameters are rounded to the segment size of the HW platform.\n" + "The supported segment size is given by the capability list by using\n" + "GSW_CAP_GET.\n" + "\nParameter:\n----------\n" + "eProfile :\n" + "\tDrop Probability Profile.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Pmin = 25%, Pmax = 75% (default)\n" + "\n" + "\t1: Pmin = 25%, Pmax = 50%\n" + "\n" + "\t2: Pmin = 50%, Pmax = 50%\n" + "\n" + "\t3: Pmin = 50%, Pmax = 75%\n" + "\n" + "eMode :\n" + "\tAutomatic or Manual Mode of Thresholds Config.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Automatic - Adaptive Watermark Type.\n" + "\n" + "\t1: Manual Threshold Levels Type.\n" + "\n" + "eThreshMode :\n" + "\tWRED Threshold Mode Config.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Local Thresholds Mode (default)\n" + "\n" + "\t1: Global Thresholds Mode\n" + "\n" + "nRed_Min :\n" + "\tWRED Red Threshold Min [number of segments].\n" + "\n" + "nRed_Max :\n" + "\tWRED Red Threshold Max [number of segments].\n" + "\n" + "nYellow_Min :\n" + "\tWRED Yellow Threshold Min [number of segments].\n" + "\n" + "nYellow_Max :\n" + "\tWRED Yellow Threshold Max [number of segments].\n" + "\n" + "nGreen_Min :\n" + "\tWRED Green Threshold Min [number of segments].\n" + "\n" + "nGreen_Max :\n" + "\tWRED Green Threshold Max [number of segments]." + "\n", + /* 77: GSW_QOS_WRED_QUEUE_CFG_GET */ + "Read out the WRED drop thresholds for a dedicated egress queue. Given\n" + "parameters are rounded to the segment size of the HW platform. The supported\n" + "segment size is given by the capability list by using GSW_CAP_GET. The\n" + "configuration can be changed by using GSW_QOS_WRED_QUEUE_CFG_SET.\n" + "\nParameter:\n----------\n" + "nQueueId :\n" + "\tQoS queue index (zero-based counting)." + "\n", + /* 78: GSW_QOS_WRED_QUEUE_CFG_SET */ + "Configures the WRED drop thresholds for a dedicated egress queue. Given\n" + "parameters are rounded to the segment size of the HW platform. The supported\n" + "segment size is given by the capability list by using GSW_CAP_GET. The\n" + "command GSW_QOS_WRED_QUEUE_CFG_GET retrieves the current configuration.\n" + "\nParameter:\n----------\n" + "nQueueId :\n" + "\tQoS queue index (zero-based counting).\n" + "\n" + "nRed_Min :\n" + "\tWRED Red Threshold Min [number of segments].\n" + "\n" + "nRed_Max :\n" + "\tWRED Red Threshold Max [number of segments].\n" + "\n" + "nYellow_Min :\n" + "\tWRED Yellow Threshold Min [number of segments].\n" + "\n" + "nYellow_Max :\n" + "\tWRED Yellow Threshold Max [number of segments].\n" + "\n" + "nGreen_Min :\n" + "\tWRED Green Threshold Min [number of segments].\n" + "\n" + "nGreen_Max :\n" + "\tWRED Green Threshold Max [number of segments]." + "\n", + /* 79: GSW_RMON_CLEAR */ + "Clears an Ethernet port traffic statistic counter (RMON counter).\n" + "\nParameter:\n----------\n" + "nRmonId :\n" + "\tRMON Counters Identifier - Meter, Port, If, Route, etc.\n" + "eRmonType :\n" + "\tReset the RMON Counters Type.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: All RMON Types Counters (GSW_RMON_ALL_TYPE). \n" + "\n" + "\t1: All PMAC RMON Counters (GSW_RMON_PMAC_TYPE).\n" + "\n" + "\t2: Port based RMON Counters (GSW_RMON_PORT_TYPE).\n" + "\n" + "\t3: Meter based RMON Counters (GSW_RMON_METER_TYPE).\n" + "\n" + "\t4: Interface based RMON Counters(GSW_RMON_IF_TYPE).\n" + "\n" + "\t5: Route based RMON Counters (GSW_RMON_ROUTE_TYPE).\n" + "\n" + "\t6: Redirected Traffic based RMON Counters (GSW_RMON_REDIRECT_TYPE).\n" + "\n", + /* 80: GSW_RMON_PORT_GET */ + "Read out the Ethernet port statistic counter (RMON counter). The zero-based\n" + "'nPortId' structure element describes the logical/ctp/bridge switch port for the\n" + "requested statistic information.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available. This parameter specifies for which MAC port the RMON1\n" + "\tcounter is read. It has to be set by the application before calling\n" + "\tGSW_RMON_PORT_GET\n" + "ePortType :\n" + "\tPort Type. This gives information which type of port to get RMON.\n" + "\tnPortId should be based on this field.\n" + "\tThis is new in GSWIP-3.1. For GSWIP-2.1/2.2/3.0, this field is always\n" + "\tZERO (GSW_LOGICAL_PORT).\n" + "nSubIfIdGroup :\n" + "\tremarks" + "\tThis field is valid when \ref GSW_RMON_Port_cnt_t::ePortType is\n" + "\tGSW_portType_t::GSW_CTP_PORT.\n" + "\tSub interface ID group is defined for each of \ref GSW_LogicalPortMode_t.\n" + "\tFor both GSW_LOGICAL_PORT_8BIT_WLAN and\n" + "\tGSW_LOGICAL_PORT_9BIT_WLAN, this field is VAP.\n" + "\tFor GSW_LOGICAL_PORT_GPON, this field is GEM index.\n" + "\tFor GSW_LOGICAL_PORT_EPON, this field is stream index.\n" + "\tFor GSW_LOGICAL_PORT_GINT, this field is LLID.\n" + "\tFor others, this field is 0.\n" + "bPceBypass :\n" + "\tSeparate set of CTP Tx counters when PCE is bypassed. GSWIP-3.1 only\n", + /* 81: GSW_STP_BPDU_RULE_GET */ + "Read the Spanning Tree configuration. The configuration can be modified using\n" + "GSW_STP_BPDU_RULE_SET.", + /* 82: GSW_STP_BPDU_RULE_SET */ + "Set the Spanning Tree configuration. This configuration includes the filtering\n" + "of detected spanning tree packets. These packets could be redirected to one\n" + "dedicated port (e.g. CPU port) or they could be discarded. The current\n" + "configuration can be read using GSW_STP_BPDU_RULE_GET.\n" + "\nParameter:\n----------\n" + "eForwardPort :\n" + "\tFilter spanning tree packets and forward them, discard them or disable\n" + "\tthe filter.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Default; portmap is determined by the forwarding classification.\n" + "\n" + "\t1: Discard; discard packets.\n" + "\n" + "\t2: Forward to the CPU port. This requires that the CPU port is\n" + "\t\tpreviously set by calling GSW_CPU_PORT_CFG_SET.\n" + "\n" + "\t3: Forward to a port, selected by the parameter 'nForwardPortId'.\n" + "\t\tPlease note that this feature is not supported by all hardware\n" + "\t\tplatforms.\n" + "\n" + "nForwardPortId :\n" + "\tTarget port for forwarded packets; only used if selected by\n" + "\t'eForwardPort'. Forwarding is done if 'eForwardPort =\n" + "\tGSW_PORT_FORWARD_PORT'.", + /* 83: GSW_STP_PORT_CFG_GET */ + "Read out the current Spanning Tree Protocol state of an Ethernet port. This\n" + "configuration can be set using GSW_STP_PORT_CFG_SET.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 84: GSW_STP_PORT_CFG_SET */ + "Configure the Spanning Tree Protocol state of an Ethernet port. The switch\n" + "supports four Spanning Tree Port states (Disable/Discarding,\n" + "Blocking/Listening, Learning and Forwarding state) for every port, to enable\n" + "the Spanning Tree Protocol function when co-operating with software on the CPU\n" + "port. Identified Spanning Tree Protocol packets can be redirected to the CPU\n" + "port. Depending on the hardware implementation, the CPU port assignement is\n" + "fixed or can be configured using GSW_CPU_PORT_CFG_SET. The current port\n" + "state can be read back using GSW_STP_PORT_CFG_GET.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "nFId :\n" + "\tFiltering Identifier (FID) (not supported by all switches). The FID allows to keep\n" + "\t multiple STP states per physical Ethernet port. Multiple CTAG VLAN groups could be a \n" + "\tassigned to one FID and therefore share the same STP port state. Switch API ignores \n" + "\tthe FID value in case the switch device does not support it or switch CTAG VLAN \n" + "\tawareness is disabled. \n" + "\n" + "ePortState :\n" + "\tSpanning Tree Protocol state of the port.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Forwarding state. The port is allowed to transmit and receive all\n" + "\t\tpackets. Address Learning is allowed.\n" + "\n" + "\t1: Disabled/Discarding state. The port entity will not transmit and\n" + "\t\treceive any packets. Learning is disabled in this state.\n" + "\n" + "\t2: Learning state. The port entity will only transmit and receive\n" + "\t\tSpanning Tree Protocol packets (BPDU). All other packets are\n" + "\t\tdiscarded. MAC table address learning is enabled for all good\n" + "\t\tframes.\n" + "\n" + "\t3: Blocking/Listening. Only the Spanning Tree Protocol packets will be\n" + "\t\treceived and transmitted. All other packets are discarded by the\n" + "\t\tport entity. MAC table address learning is disabled in this state.", + /* 85: GSW_VERSION_GET */ + "Retrieve the version string of the currently version index. The returned\n" + "string format might vary between the device platforms used. This means that\n" + "the version information cannot be compared between different device platforms.\n" + "All returned version information is in the form of zero-terminated character\n" + "strings. The returned strings are empty ('') in case the given version index\n" + "is out of range.", + /* 86: GSW_VLAN_ID_CREATE */ + "Add a VLAN ID group to the active VLAN set of the Ethernet switch hardware.\n" + "Based on this configuration, VLAN group port members can be added using\n" + "GSW_VLAN_PORT_MEMBER_ADD. The VLAN ID configuration can be removed again\n" + "by calling GSW_VLAN_ID_DELETE.\n" + "\nParameter:\n----------\n" + "nVId :\n" + "\tVLAN ID. The valid range is from 0 to 4095. An error code is delivered\n" + "\tin case of range mismatch.\n" + "\n" + "nFId :\n" + "\tFiltering Identifier (FID) (not supported by all switches).", + /* 87: GSW_VLAN_ID_DELETE */ + "Remove a VLAN ID group from the active VLAN set of the switch hardware. The\n" + "VLAN ID group was set using GSW_VLAN_ID_CREATE. A VLAN ID group can only\n" + "be removed when no port group members are currently configured on the\n" + "hardware. This VLAN ID group membership configuration is done using\n" + "GSW_VLAN_PORT_MEMBER_ADD and can be removed again using\n" + "GSW_VLAN_PORT_MEMBER_REMOVE.\n" + "\nParameter:\n----------\n" + "nVId :\n" + "\tVLAN ID. The valid range is from 0 to 4095. An error code is delivered\n" + "\tin case of range mismatch.", + /* 88: GSW_VLAN_ID_GET */ + "Read out the FID of a given VLAN ID. This VLAN ID can be added using\n" + "GSW_VLAN_ID_CREATE. This function returns an error in case no valid\n" + "configuration is available for the given VLAN ID.\n" + "\nParameter:\n----------\n" + "nVId :\n" + "\tVLAN ID. The valid range is from 0 to 4095. An error code is delivered\n" + "\tin case of range mismatch.", + /* 89: GSW_VLAN_PORT_CFG_GET */ + "Get VLAN Port Configuration. This function returns the VLAN configuration of\n" + "the given Port 'nPortId'.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 90: GSW_VLAN_PORT_CFG_SET */ + "Set VLAN Port Configuration. This function sets the VLAN configuration of the\n" + "given Port 'nPortId'.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "nPortVId :\n" + "\tPort VLAN ID (PVID). The software shall ensure that the used VLAN has\n" + "\tbeen configured in advance on the hardware by using\n" + "\tGSW_VLAN_ID_CREATE.\n" + "\n" + "bVLAN_UnknownDrop :\n" + "\tDrop ingress VLAN-tagged packets if the VLAN ID is not listed in the\n" + "\tactive VLAN set. If disabled, all incoming VLAN-tagged packets are\n" + "\tforwarded using the FID tag members and the port members of the PVID.\n" + "\n" + "bVLAN_ReAssign :\n" + "\tReassign all ingress VLAN tagged packets to the port-based VLAN ID\n" + "\t(PVID).\n" + "\n" + "eVLAN_MemberViolation :\n" + "\tVLAN ingress and egress membership violation mode. Allows admittance\n" + "\tof VLAN-tagged packets where the port is not a member of the VLAN ID\n" + "\tcarried in the received and sent packet.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: No VLAN member violation. Ingress and egress packets violating the\n" + "\t\tmembership pass and are not filtered out.\n" + "\n" + "\t1: VLAN member violation for ingress packets. Ingress packets\n" + "\t\tviolating the membership are filtered out. Egress packets violating\n" + "\t\tthe membership are not filtered out.\n" + "\n" + "\t2: VLAN member violation for egress packets. Egress packets violating\n" + "\t\tthe membership are filtered out. Ingress packets violating the\n" + "\t\tmembership are not filtered out.\n" + "\n" + "\t3: VLAN member violation for ingress and egress packets. Ingress and\n" + "\t\tegress packets violating the membership are filtered out.\n" + "\n" + "eAdmitMode :\n" + "\tIngress VLAN-tagged or untagged packet filter configuration.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Admit all. Tagged and untagged packets are allowed.\n" + "\n" + "\t1: Untagged packets only (not supported yet). Tagged packets are\n" + "\t\tdropped.\n" + "\n" + "\t2: Tagged packets only. Untagged packets are dropped.\n" + "\n" + "bTVM :\n" + "\tTransparent VLAN Mode (TVM). All packets are handled as untagged\n" + "\tpackets. Any existing tag is ignored and treated as packet payload.", + /* 91: GSW_VLAN_PORT_MEMBER_ADD */ + "Add Ethernet port to port members of a given VLAN group. The assignment can be\n" + "removed using GSW_VLAN_PORT_MEMBER_REMOVE.\n" + "\nParameter:\n----------\n" + "nVId :\n" + "\tVLAN ID. The valid range is from 0 to 4095. An error code is delivered\n" + "\tin case of range mismatch.\n" + "\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "bVLAN_TagEgress :\n" + "\tTag Member Egress. Enable egress tag-based support. If enabled, all\n" + "\tport egress traffic from this VLAN group carries a VLAN group tag.", + /* 92: GSW_VLAN_PORT_MEMBER_READ */ + "Read out all given VLAN group port memberships. Every command call returns one\n" + "VLAN and port membership pair with the corresponding egress traffic tag\n" + "behavior. Call the command in a loop till Switch API sets the 'bLast' variable\n" + "to read all VLAN port memberships. Please set the 'bInitial' parameter for the\n" + "first call starting the read operation at the beginning of the VLAN table.", + /* 93: GSW_VLAN_PORT_MEMBER_REMOVE */ + "Remove Ethernet port from port members of a given VLAN group. This assignment\n" + "was done using GSW_VLAN_PORT_MEMBER_ADD.\n" + "\nParameter:\n----------\n" + "nVId :\n" + "\tVLAN ID. The valid range is from 0 to 4095. An error code is delivered\n" + "\tin case of range mismatch. If the selected VLAN ID is not found in the\n" + "\tvLAN table, an error code is delivered.\n" + "\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available." + "\n", + /* 94: GSW_VLAN_MEMBER_INIT */ + "Initializes the VLAN membership and the egress tagged portmap of all VLAN groups.\n" + "\nParameter:\n----------\n" + "nPortMemberMap :\n" + "\tPortmap field of the uninitialized VLAN groups.\n" + "\n" + "nEgressTagMap :\n" + "\tEgress tagmap field of the uninitialized VLAN groups.\n" + "\n", + /* 95: GSW_VLAN_RESERVED_ADD */ + "Add VLAN ID to a reserved VLAN list. The switch supports replacing the VID of\n" + "received packets with the PVID of the receiving port. This function adds a VID\n" + "to the list of VIDs to replace. All switch devices support adding VID=0, VID=1\n" + "and VID=FFF to be replaced. Some devices also allow adding other VIDs to be\n" + "replaced. An added VID could be removed again by calling\n" + "GSW_VLAN_RESERVED_REMOVE. This configuration applies to the whole switch\n" + "device.\n" + "\nParameter:\n----------\n" + "nVId :\n" + "\tVID of the received packet to be replaced by the PVID. The valid range\n" + "\tis from 0 to 4095. An error code is delivered in case of range\n" + "\tmismatch.", + /* 96: GSW_VLAN_RESERVED_REMOVE */ + "Remove VLAN ID from a reserved VLAN group list. This function removes a VID\n" + "replacement configuration from the switch hardware. This replacement\n" + "configuration replaces the VID of received packets with the PVID of the\n" + "receiving port. This configuration can be added using\n" + "GSW_VLAN_RESERVED_ADD. This configuration applies to the whole switch\n" + "device.\n" + "\nParameter:\n----------\n" + "nVId :\n" + "\tVID of the received packet to be replaced by the PVID. The valid range\n" + "\tis from 0 to 4095. An error code is delivered in case of range\n" + "\tmismatch.", + /* 97: GSW_WOL_CFG_GET */ + "Read the Wake-on-LAN configuration. The parameters can be modified using\n" + "GSW_WOL_CFG_SET.", + /* 98: GSW_WOL_CFG_SET */ + "Set the Wake-on-LAN configuration. The parameters can be read using\n" + "GSW_WOL_CFG_GET.\n" + "\nParameter:\n----------\n" + "nWolMAC :\n" + "\tWoL MAC address.\n" + "\tSupported Formats: 12:34:45:67:89:0A" + "\n" + "nWolPassword :\n" + "\tWoL password.\n" + "\n" + "bWolPasswordEnable :\n" + "\tWoL password enable.", + /* 99: GSW_WOL_PORT_CFG_GET */ + "Read out the current status of the Wake-On-LAN feature on a dedicated port.\n" + "This status can be changed using GSW_WOL_PORT_CFG_SET. The Wake-On-LAN\n" + "specific parameter can be configured using GSW_WOL_CFG_SET.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 100: GSW_WOL_PORT_CFG_SET */ + "Set the current Wake-On-LAN status for a dedicated port. The Wake-On-LAN\n" + "specific parameter can be configured using GSW_WOL_CFG_SET.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "bWakeOnLAN_Enable :\n" + "\tEnable Wake-on-LAN.", + /* 101: GSW_IRQ_GET */ + "Read the interrupt status. Interrupt status indications can be cleared using\n" + "GSW_IRQ_STATUS_CLEAR.", + /* 102: GSW_IRQ_MASK_GET */ + "Get the interrupt enable configuration. This assignment can be set using\n" + "GSW_IRQ_MASK_SET.", + /* 103: GSW_IRQ_MASK_SET */ + "Set the interrupt enable configuration. This assignment can be read using\n" + "GSW_IRQ_MASK_GET. Setting interrupts that are not supported by hardware\n" + "results in an error response.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available. This port parameter is needed for some interrupts that\n" + "\tare specified by 'nIrqSrc'. For all other interrupts, this parameter\n" + "\tis \"don't care\".\n" + "\n" + "eIrqSrc :\n" + "\tInterrupt source.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Wake-on-LAN Interrupt. The parameter 'nPortId' specifies the\n" + "\t\trelative MAC port.\n" + "\n" + "\t1: Port Limit Alert Interrupt. This interrupt is asserted when the\n" + "\t\tnumber of learned MAC addresses exceeds the configured limit for\n" + "\t\tthe ingress port. The parameter 'nPortId' specifies the relative\n" + "\t\tMAC port.\n" + "\n" + "\t2: Port Lock Alert Interrupt. This interrupt is asserted when a source\n" + "\t\tMAC address is learned on a locked port and is received on another\n" + "\t\tport. The parameter 'nPortId' specifies the relative MAC port.", + /* 104: GSW_IRQ_STATUS_CLEAR */ + "Clear individual interrupt status bits. Interrupt status indications can be\n" + "read using GSW_IRQ_GET.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available. This port parameter is needed for some interrupts that\n" + "\tare specified by 'nIrqSrc'. For all other interrupts, this parameter\n" + "\tis \"don't care\".\n" + "\n" + "eIrqSrc :\n" + "\tInterrupt source.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Wake-on-LAN Interrupt. The parameter 'nPortId' specifies the\n" + "\t\trelative MAC port.\n" + "\n" + "\t1: Port Limit Alert Interrupt. This interrupt is asserted when the\n" + "\t\tnumber of learned MAC addresses exceeds the configured limit for\n" + "\t\tthe ingress port. The parameter 'nPortId' specifies the relative\n" + "\t\tMAC port.\n" + "\n" + "\t2: Port Lock Alert Interrupt. This interrupt is asserted when a source\n" + "\t\tMAC address is learned on a locked port and is received on another\n" + "\t\tport. The parameter 'nPortId' specifies the relative MAC port.", + /* 105: GSW_PCE_RULE_DELETE */ + "This command deletes a complete rule from the packet classification engine. A\n" + "delete operation is done on the rule of a dedicated index 'nIndex'. A rule can\n" + "be written over using the command GSW_PCE_RULE_WRITE.\n" + "\nParameter:\n----------\n" + "nIndex :\n" + "\tAction Index in the Packet Classification Engine. It corresponds to\n" + "\tthe table rule index." + "\n", + /* 106: GSW_PCE_RULE_READ */ + "This command allows to read out a rule pattern and action of the packet\n" + "classification engine. A rule could be written by the command\n" + "GSW_PCE_RULE_WRITE.\n" + "Parameter:\n----------\n" + "pattern.nIndex :\n" + "\tTable index" + "\n", + /* 107: GSW_PCE_RULE_WRITE */ + "This command writes a rule pattern and action to the table of the packet\n" + "classification engine. The pattern part describes the parameter to identify an\n" + "incoming packet to which the dedicated actions should be applied. A rule can\n" + "be read using the command GSW_PCE_RULE_READ.\n" + "Rule Pattern Part.\n" + "\nParameter:\n----------\n" + "pattern.nIndex :\n" + "\tPCE Rule Index (Upto 512 rules supported in GSWIP-3.0)\n" + "\n" + "pattern.bEnable :\n" + "\tIndex is used (enabled) or set to unused (disabled)\n" + "\n" + "pattern.bPortIdEnable :\n" + "\tPort ID used\n" + "\n" + "pattern.nPortId :\n" + "\tPort ID\n" + "\n" + "pattern.bPortId_Exclude :\n" + "\tExclude Port Id Value - used for GSWIP-3.0 only\n" + "\n" + + "pattern.bSubIfIdEnable :\n" + "\tSub-Interface ID - used for GSWIP-3.0 only\n" + "\n" + "pattern.nSubIfId :\n" + "\tSub-Interface ID value - used for GSWIP-3.0 only \n" + "\n" + "pattern.bSubIfId_Exclude :\n" + "\tExclude Sub-Interface Id Value - used for GSWIP-3.0 only\n" + "\n" + + "pattern.bDSCP_Enable :\n" + "\tDSCP value used (Outer for GSWIP-3.0)\n" + "\n" + "pattern.nDSCP :\n" + "\tDSCP value (Outer for GSWIP-3.0)\n" + "\n" + "pattern.bDSCP_Exclude :\n" + "\tExclude (Outer) DSCP value used for GSWIP-3.0 only\n" + "\n" + "pattern.bInner_DSCP_Enable :\n" + "\tInner DSCP value used for GSWIP-3.0 only \n" + "\n" + "pattern.nInnerDSCP :\n" + "\tInner DSCP value for GSWIP-3.0 only \n" + "\n" + "pattern.bInnerDSCP_Exclude :\n" + "\tExclude Inner DSCP value used for GSWIP-3.0 only\n" + "\n" + + "pattern.bPCP_Enable :\n" + "\tPCP value used\n" + "\n" + "pattern.nPCP :\n" + "\tPCP value\n" + "\n" + "pattern.bCTAG_PCP_DEI_Exclude :\n" + "\tExclude CTAG PCP & DEI value used for GSWIP-3.0 only\n" + "\n" + + "pattern.bSTAG_PCP_DEI_Enable :\n" + "\tSTAG VLAN PCP/DEI value used \n" + "\n" + "pattern.nSTAG_PCP_DEI :\n" + "\tSTAG VLAN PCP value\n" + "\n" + + "pattern.bSTAG_PCP_DEI_Exclude :\n" + "\tExclude STAG PCP & DEI value used for GSWIP-3.0 only\n" + "\n" + + "pattern.bPktLngEnable :\n" + "\tPacket length used\n" + "\n" + "pattern.nPktLng :\n" + "\tPacket length\n" + "\n" + "pattern.nPktLngRange :\n" + "\tPacket length Range (from nPktLng to nPktLngRange)\n" + "\n" + + "pattern.bPktLng_Exclude :\n" + "\tExclude Packet Length or range value used for GSWIP-3.0 only \n" + "\n" + + "pattern.bMAC_DstEnable :\n" + "\tDestination MAC address used\n" + "\n" + "pattern.nMAC_Dst :\n" + "\tDestination MAC address\n" + "\tSupported Formats: 12:34:45:67:89:0A" + "\n" + "pattern.nMAC_DstMask :\n" + "\tDestination MAC address mask. Please clear the bits of the nibbles\n" + "\tthat are not marked out and set all other bits. The LSB bit represents\n" + "\tthe lowest data nibble, the next bit the next nibble, and so on.\n" + "\n" + + "pattern.bDstMAC_Exclude :\n" + "\tExclude Destination MAC Address used for GSWIP-3.0 only \n" + "\n" + + "pattern.bMAC_SrcEnable :\n" + "\tSource MAC address used\n" + "\n" + "pattern.nMAC_Src :\n" + "\tSource MAC address\n" + "\tSupported Formats: 12:34:45:67:89:0A" + "\n" + "pattern.nMAC_SrcMask :\n" + "\tSource MAC address mask. Please clear the bits of the nibbles that are\n" + "\tnot marked out and set all other bits. The LSB bit represents the\n" + "\tlowest data nibble, the next bit the next nibble, and so on.\n" + "\n" + + "pattern.bSrcMAC_Exclude :\n" + "\tExclude Source MAC Address used for GSWIP-3.0 only \n" + "\n" + + "pattern.bAppDataMSB_Enable :\n" + "\tMSB Application field used\n" + "\n" + "pattern.nAppDataMSB :\n" + "\tMSB Application field. The first 2 bytes of the packet content\n" + "\tfollowing the IP header for TCP/UDP packets (source port field), or\n" + "\tthe first 2 bytes of packet content following the Ethertype for non-IP\n" + "\tpackets. Any part of this content can be masked-out by a programmable\n" + "\tbit mask 'nAppMaskRangeMSB'.\n" + "\n" + "pattern.bAppMaskRangeMSB_Select :\n" + "\tMSB Application mask/range selection. If set to 1, the field\n" + "\t'nAppMaskRangeMSB' is used as a range parameter, otherwise it is used\n" + "\tas a nibble mask field.\n" + "\n" + "pattern.nAppMaskRangeMSB :\n" + "\tMSB Application mask/range. When used as a range parameter, 1 bit\n" + "\trepresents 1 nibble mask of the 'nAppDataMSB' field. Please clear the\n" + "\tbits of the nibbles that are not marked out and set all other bits.\n" + "\tThe LSB bit represents the lowest data nibble, the next bit the next\n" + "\tnibble, and so on.\n" + "\n" + + "pattern.bAppMSB_Exclude :\n" + "\tMSB Application Data Exclude - for GSWIP-3.0 only \n" + "\n" + + "pattern.bAppDataLSB_Enable :\n" + "\tLSB Application used\n" + "\n" + "pattern.nAppDataLSB :\n" + "\tLSB Application field. The following 2 bytes of the packet behind the\n" + "\t'nAppDataMSB' field. This is the destination port field for TCP/UDP\n" + "\tpackets, or byte 3 and byte 4 of the packet content following the\n" + "\tEthertype for non-IP packets. Any part of this content can be\n" + "\tmasked-out by a programmable bit mask 'nAppMaskRangeLSB'.\n" + "\n" + "pattern.bAppMaskRangeLSB_Select :\n" + "\tLSB Application mask/range selection. If set to 1, the field\n" + "\t'nAppMaskRangeLSB' is used as a range parameter, otherwise it is used\n" + "\tas a nibble mask field.\n" + "\n" + "pattern.nAppMaskRangeLSB :\n" + "\tLSB Application mask/range. When used as a range parameter, 1 bit\n" + "\trepresents 1 nibble mask of the 'nAppDataLSB' field. Please clear the\n" + "\tbits of the nibbles that are not marked out and set all other bits.\n" + "\tThe LSB bit represents the lowest data nibble, the next bit the next\n" + "\tnibble, and so on.\n" + "\n" + + "pattern.bAppLSB_Exclude :\n" + "\tLSB Application Data Exclude - for GSWIP-3.0 only \n" + "\n" + + "pattern.eDstIP_Select :\n" + "\tDestination IP Selection (Outer for GSWIP-3.0).\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Rule Pattern for IP selection disabled.\n" + "\n" + "\t1: Rule Pattern for IPv4.\n" + "\n" + "\t2: Rule Pattern for IPv6.\n" + "\n" + "pattern.nDstIP :\n" + "\tDestination IP (Outer for GSWIP-3.0)\n" + "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." + "\n" + "pattern.nDstIP_Mask :\n" + "\tDestination IP Nibble Mask. 1 bit represents 1 nibble mask of the 'nDstIP' field.\n" + "\tPlease clear the bits of the nibbles that are not marked out and set\n" + "\tall other bits. The LSB bit represents the lowest data nibble, the\n" + "\tnext bit the next nibble, and so on.\n" + "\n" + "pattern.bDstIP_Exclude :\n" + "\tExclude Destination IP Value - used for GSWIP-3.0 only\n" + "\n" + + "pattern.eInnerDstIP_Select :\n" + "\tInner Destination IP Selection - for GSWIP-3.0 only. \n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Rule Pattern for IP selection disabled.\n" + "\n" + "\t1: Rule Pattern for IPv4.\n" + "\n" + "\t2: Rule Pattern for IPv6.\n" + "\n" + "pattern.nInnerDstIP :\n" + "\tInner Destination IP - for GSWIP-3.0 only.\n" + "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." + "\n" + "pattern.nInnerDstIP_Mask :\n" + "\tInner Destination IP Nibble Mask - for GSWIP-3.0 only. 1 bit represents 1 nibble mask of the 'nInnerDstIP' field.\n" + "\tPlease clear the bits of the nibbles that are not marked out and set\n" + "\tall other bits. The LSB bit represents the lowest data nibble, the\n" + "\tnext bit the next nibble, and so on.\n" + "\n" + "pattern.bInnerDstIP_Exclude :\n" + "\tExclude Destination IP Value - used for GSWIP-3.0 only\n" + "\n" + + "pattern.eSrcIP_Select :\n" + "\tSource IP Selection (Outer for GSWIP-3.0).\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Rule Pattern for IP selection disabled.\n" + "\n" + "\t1: Rule Pattern for IPv4.\n" + "\n" + "\t2: Rule Pattern for IPv6.\n" + "\n" + "pattern.nSrcIP :\n" + "\tSource IP (Outer for GSWIP-3.0).\n" + "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." + "\n" + "pattern.nSrcIP_Mask :\n" + "\tSource IP Nibble Mask (Outer for GSWIP-3.0). 1 bit represents 1 nibble mask of the 'nSrcIP' field.\n" + "\tPlease clear the bits of the nibbles that are not marked out and set\n" + "\tall other bits. The LSB bit represents the lowest data nibble, the\n" + "\tnext bit the next nibble, and so on.\n" + "\n" + + "pattern.bSrcIP_Exclude :\n" + "\tExclude Source IP Value - used for GSWIP-3.0 only\n" + "\n" + + "pattern.eInnerSrcIP_Select :\n" + "\tInner Source IP Selection - for GSWIP-3.0 only.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Rule Pattern for IP selection disabled.\n" + "\n" + "\t1: Rule Pattern for IPv4.\n" + "\n" + "\t2: Rule Pattern for IPv6.\n" + "\n" + "pattern.nInnerSrcIP :\n" + "\tInner Source IP - for GSWIP-3.0 only.\n" + "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." + "\n" + "pattern.nInnerSrcIP_Mask :\n" + "\tInner Src IP Nibble Mask - for GSWIP-3.0 only.. 1 bit represents 1 nibble mask of the 'nInnerSrcIP' field.\n" + "\tPlease clear the bits of the nibbles that are not marked out and set\n" + "\tall other bits. The LSB bit represents the lowest data nibble, the\n" + "\tnext bit the next nibble, and so on.\n" + "\n" + + "pattern.bInnerSrcIP_Exclude :\n" + "\tExclude Inner Source IP Value - used for GSWIP-3.0 only \n" + "\n" + + + "pattern.bEtherTypeEnable :\n" + "\tEthertype used.\n" + "\n" + "pattern.nEtherType :\n" + "\tEthertype\n" + "\n" + "pattern.nEtherTypeMask :\n" + "\tEthertype Mask. 1 bit represents 1 nibble mask of the 'nEtherType'\n" + "\tfield. Please clear the bits of the nibbles that are not marked out\n" + "\tand set all other bits. The LSB bit represents the lowest data nibble,\n" + "\tthe next bit the next nibble, and so on.\n" + "\n" + + "pattern.bEtherType_Exclude :\n" + "\tExclude for Ether Type Value - used for GSWIP-3.0 only.\n" + "\n" + + + "pattern.bProtocolEnable :\n" + "\tIP protocol used\n" + "\n" + "pattern.nProtocol :\n" + "\tIP protocol\n" + "\n" + "pattern.nProtocolMask :\n" + "\tIP protocol Mask. 1 bit represents 1 nibble mask of the 'nProtocol'\n" + "\tfield. Please clear the bits of the nibbles that are not marked out\n" + "\tand set all other bits. The LSB bit represents the lowest data nibble,\n" + "\tthe next bit the next nibble, and so on.\n" + "\n" + "pattern.bProtocol_Exclude :\n" + "\tExclude for IP Protocol Value - used for GSWIP-3.0 only.\n" + "\n" + + "pattern.bInnerProtocolEnable :\n" + "\tInner IP protocol used - for GSWIP-3.0 only\n" + "\n" + "pattern.nInnerProtocol :\n" + "\tInner IP protocol Value - for GSWIP-3.0 only.\n" + "\n" + "pattern.nInnerProtocolMask :\n" + "\tInner IP protocol Bit Mask - for GSWIP-3.0 only.. 1 bit represents 1 nibble mask of the 'nInnerProtocol'\n" + "\tfield. Please clear the bits of the nibbles that are not marked out\n" + "\tand set all other bits. The LSB bit represents the lowest data nibble,\n" + "\tthe next bit the next nibble, and so on.\n" + "\n" + "pattern.bInnerProtocol_Exclude :\n" + "\tExclude for Inner IP Protocol Value - used for GSWIP-3.0 only.\n" + "\n" + + "pattern.bSessionIdEnable :\n" + "\tPPPoE used.\n" + "\n" + "pattern.nSessionId :\n" + "\tPPPoE\n" + "\n" + + "pattern.bSessionId_Exclude :\n" + "\tExclude for PPPoE Session Value - used for GSWIP-3.0 only.\n" + "\n" + + "pattern.bPPP_ProtocolEnable :\n" + "\tPPP Protocol used - used for GSWIP-3.0 only.\n" + "\n" + "pattern.nPPP_Protocol :\n" + "\tPPP Protocol Value - used for GSWIP-3.0 only.\n" + "\n" + "pattern.nPPP_ProtocolMask :\n" + "\tPPP protocol Bit Mask - for GSWIP-3.0 only. 1 bit represents 1 nibble mask of the 'nPPP_Protocol'\n" + "\tfield. Please clear the bits of the nibbles that are not marked out\n" + "\tand set all other bits. The LSB bit represents the lowest data nibble,\n" + "\tthe next bit the next nibble, and so on.\n" + "\n" + "pattern.bPPP_Protocol_Exclude :\n" + "\tExclude for PPP Protocol Value - used for GSWIP-3.0 only.\n" + "\n" + + + "pattern.bVid :\n" + "\tVLAN ID used.\n" + "\n" + "pattern.nVid :\n" + "\tVLAN ID\n" + "\n" + + "pattern.bVidRange_Select :\n" + "\tVid mask/range selection - used for GSWIP-3.0 only. \n" + "\n" + "pattern.nVidRange :\n" + "\tVLAN ID Range(CVID) - used for GSWIP-3.0 only.\n" + "\n" + + "pattern.bVid_Exclude :\n" + "\tExclude for VLAN Id (CVLAN) - used for GSWIP-3.0 only. \n" + "\n" + + "pattern.bSLAN_Vid :\n" + "\tSTAG VLAN ID used.\n" + "\n" + "pattern.nSLAN_Vid :\n" + "\tSTAG VLAN ID\n" + "\n" + + "pattern.bSLANVid_Exclude :\n" + "\tExclude for SVLAN Id (SVLAN) - used for GSWIP-3.0 only.\n" + "\n" + + "pattern.bVid_Original :\n" + "\tbVid_Original\n" + "\n" + + "pattern.nOuterVidRange :\n" + "\tnOuterVidRange\n" + "\n" + + "pattern.bSVidRange_Select :\n" + "\tbSVidRange_Select\n" + "\n" + + "pattern.bOuterVid_Original :\n" + "\tbOuterVid_Original\n" + "\n" + + "pattern.bPayload1_SrcEnable :\n" + "\tPayload-1 used - for GSWIP-3.0 PAE only .\n" + "\n" + "pattern.nPayload1 :\n" + "\tPayload-1 Value (16-bits) - for GSWIP-3.0 PAE only.\n" + "\n" + "pattern.bPayload1MaskRange_Select :\n" + "\tPayload-1 mask select used - for GSWIP-3.0 PAE only .\n" + "\n" + "pattern.nPayload1_Mask :\n" + "\tPayload-1 Bit mask - for GSWIP-3.0 PAE only. 1 bit represents 1 nibble mask of the 'nPayload1'\n" + "\tfield. Please clear the bits of the nibbles that are not marked out\n" + "\tand set all other bits. The LSB bit represents the lowest data nibble,\n" + "\tthe next bit the next nibble, and so on.\n" + "\n" + "pattern.bPayload1_Exclude :\n" + "\tExclude Payload-1 used for GSWIP-3.0 PAE only.\n" + "\n" + + "pattern.bPayload2_SrcEnable :\n" + "\tPayload-2 used - for GSWIP-3.0 PAE only.\n" + "\n" + "pattern.nPayload2 :\n" + "\tPayload-2 Value (16-bits) - for GSWIP-3.0 PAE only.\n" + "\n" + "pattern.bPayload2MaskRange_Select :\n" + "\tPayload-2 mask select used - for GSWIP-3.0 PAE only .\n" + "\n" + "pattern.nPayload2_Mask :\n" + "\tPayload-2 Bit mask - for GSWIP-3.0 PAE only. 1 bit represents 1 nibble mask of the 'nPayload2'\n" + "\tfield. Please clear the bits of the nibbles that are not marked out\n" + "\tand set all other bits. The LSB bit represents the lowest data nibble,\n" + "\tthe next bit the next nibble, and so on.\n" + "\n" + "pattern.bPayload2_Exclude :\n" + "\tExclude Payload-2 used for GSWIP-3.0 PAE only.\n" + "\n" + + "pattern.bParserFlagLSB_Enable :\n" + "\tParser Flag LSB (Bit 15 to 0) is used\n" + "\n" + "pattern.nParserFlagLSB :\n" + "\tParser Flag LSB Value \n" + "\n" + "pattern.nParserFlagLSB_Mask :\n" + "\tParser Flag LSB Mask Value \n" + "\n" + "pattern.bParserFlagLSB_Exclude :\n" + "\tExclude for Parser Flag LSB.\n" + "\n" + + "pattern.bParserFlagMSB_Enable :\n" + "\tParser Flag MSB (Bit 31 to 16) is used\n" + "\n" + "pattern.nParserFlagMSB :\n" + "\tParser Flag MSB Value.\n" + "\n" + "pattern.nParserFlagMSB_Mask :\n" + "\tParser Flag MSB Mask Value \n" + "\n" + "pattern.bParserFlagMSB_Exclude :\n" + "\tExclude for Parser Flag MSB.\n" + "\n" + + "pattern.bParserFlag1LSB_Enable :\n" + "\tParser Flag1 LSB (Bit 47 to 32) is used\n" + "\n" + "pattern.nParserFlag1LSB :\n" + "\tParser Flag1 LSB Value \n" + "\n" + "pattern.nParserFlag1LSB_Mask :\n" + "\tParser Flag1 LSB Mask Value \n" + "\n" + "pattern.bParserFlag1LSB_Exclude :\n" + "\tExclude for Parser Flag1 LSB.\n" + "\n" + + "pattern.bParserFlag1MSB_Enable :\n" + "\tParser Flag1 MSB (Bit 63 to 48) is used\n" + "\n" + "pattern.nParserFlag1MSB :\n" + "\tParser Flag1 MSB Value.\n" + "\n" + "pattern.nParserFlag1MSB_Mask :\n" + "\tParser Flag1 MSB Mask Value \n" + "\n" + "pattern.bParserFlag1MSB_Exclude :\n" + "\tExclude for Parser Flag1 MSB.\n" + "\n" + + "Rule Action Part.\n" + "action.eTrafficClassAction :\n" + "\tAction \"Traffic Class\" Group. Traffic class action enable\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Disabled. Traffic class action is disabled.\n" + "\n" + "\t1: Regular Class. Traffic class action is enabled and the CoS\n" + "\t\tclassification traffic class is used.\n" + "\n" + "\t2: Alternative Class. Traffic class action is enabled and the class of\n" + "\t\tthe 'nTrafficClassAlter' field is used.\n" + "\n" + "action.nTrafficClassAlternate :\n" + "\tAlternative Traffic class\n" + "\n" + "action.eSnoopingTypeAction :\n" + "\tAction \"IGMP Snooping\" Group. IGMP Snooping control and enable. Please\n" + "\tnote that the 'nPortMapAction' configuration is ignored in case the\n" + "\tIGMP snooping is enabled. Here, on read operations, 'nPortMapAction =\n" + "\tGSW_PCE_ACTION_PORTMAP_DISABLE' is returned.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Disabled. IGMP Snooping is disabled.\n" + "\n" + "\t1: Default. Regular Packet. No IGMP Snooping action required.\n" + "\n" + "\t2: IGMP Report/Join Message.\n" + "\n" + "\t3: IGMP Leave Message.\n" + "\n" + "\t4: Router Solicitation/Advertisement message.\n" + "\n" + "\t5: IGMP Query Message.\n" + "\n" + "\t6: IGMP Group Specific Query Message.\n" + "\n" + "\t7: IGMP General Query message without Router Solicitation.\n" + "\n" + "action.eLearningAction :\n" + "\tAction \"Learning\" Group. Learning action control and enable\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: MAC Address Learning action is disabled. MAC address learning is\n" + "\t\tnot influenced by this rule.\n" + "\n" + "\t1: Learning is based on the forwarding decision. If the packet is\n" + "\t\tdiscarded, the address is not learned. If the packet is forwarded\n" + "\t\tto any egress port, the address is learned.\n" + "\n" + "\t2: Force No Learning. The address is not learned; forwarding decision\n" + "\t\tignored.\n" + "\n" + "\t3: Force Learning. The address is learned, the forwarding decision\n" + "\t\tignored. Note: The MAC Learning Control signals delivered to\n" + "\t\tPort-Map filtering and combined with Final Forwarding Decision. The\n" + "\t\tresult is used as a feedback for MAC Address learning in the\n" + "\t\tBridging Table.\n" + "\n" + "action.eIrqAction :\n" + "\tAction \"Interrupt\" Group. Interrupt action generate and enable\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Disabled. Interrupt Control Action is disabled for this rule.\n" + "\n" + "\t1: Regular Packet. The Interrupt Control Action is enabled, the packet\n" + "\t\tis treated as a regular packet and no interrupt event is generated.\n" + "\n" + "\t2: Interrupt Event. The Interrupt Control Action is enabled and an\n" + "\t\tinterrupt event is generated.\n" + "\n" + "action.eCrossStateAction :\n" + "\tAction \"Cross State\" Group. Cross state action control and enable\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Disable. The Cross State Action is disabled.\n" + "\n" + "\t1: Regular Packet. The Cross State Action is enabled and the packet is\n" + "\t\ttreated as a non-Cross-State packet (regular packet). Therefore it\n" + "\t\tdoes not ignore Port-State filtering rules.\n" + "\n" + "\t2: Cross-State packet. The Cross State Action is enabled and the\n" + "\t\tpacket is treated as a Cross-State packet. It ignores the\n" + "\t\tPort-State filtering rules.\n" + "\n" + "action.eCritFrameAction :\n" + "\tAction \"Critical Frames\" Group. Critical Frame action control and\n" + "\tenable\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Disable. The Critical Frame Action is disabled.\n" + "\n" + "\t1: Regular Packet. The Critical Frame Action is enabled and the packet\n" + "\t\tis treated as a non-Critical Frame.\n" + "\n" + "\t2: Critical Packet. The Critical Frame Action is enabled and the\n" + "\t\tpacket is treated as a Critical Frame.\n" + "\n" + "action.eTimestampAction :\n" + "\tAction \"Timestamp\" Group. Time stamp action control and enable\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Disable. Timestamp Action is disabled for this rule.\n" + "\n" + "\t1: Regular Packet. The Timestamp Action is enabled for this rule. The\n" + "\t\tpacket is treated as a regular packet and no timing information is\n" + "\t\tstored.\n" + "\n" + "\t2: Receive/Transmit Timing packet. Ingress and Egress Timestamps for\n" + "\t\tthis packet should be stored.\n" + "\n" + "action.ePortMapAction :\n" + "\tAction \"Forwarding\" Group. Port map action enable. This port\n" + "\tforwarding configuration is ignored in case the action \"IGMP Snooping\"\n" + "\tis enabled via the parameter 'nSnoopingTypeAction'.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Disable. Forwarding Group Action is disabled.\n" + "\n" + "\t1: Regular Packet. Forwarding Action enabled. Select Default Port-Map\n" + "\t\t(result of Default Forwarding Classification).\n" + "\n" + "\t2: Discard. Discard the packets.\n" + "\n" + "\t3: Forward to the CPU port. This requires that the CPU port is\n" + "\t\tpreviously set by calling GSW_CPU_PORT_CFG_SET.\n" + "\n" + "\t4: Forward to a portmap, selected by the parameter 'nForwardPortMap'.\n" + "\t\tPlease note that this feature is not supported by all hardware\n" + "\t\tplatforms.\n" + "\n" + "\t5: The packet is treated as Multicast Router\n" + "\t\tSolicitation/Advertisement or Query packet.\n" + "\n" + "\t6: The packet is interpreted as Multicast packet and learned in the\n" + "\t\tmulticast group table.\n" + "\n" + + "\t7: The CTAG VLAN portmap classification result is replaced by the \n" + "\t\tportmap parameter 'nForwardPortMap'. All other classification\n" + "\t\tresults stay unchanged and will be combined together with\n" + "\t\tthe overwritten portmap.\n" + "\n" + "\t8: Add STAG VLAN portmap 'nForwardPortMap' to the overall portmap\n" + "\t\tclassification result (AND'ed with the portmap).\n" + "\n" + "action.nForwardPortMap :\n" + "\tTarget portmap for forwarded packets, only used if selected by\n" + "\t'nPortMapAction'. Forwarding is done if 'nPortMapAction =\n" + "\tGSW_PCE_ACTION_PORTMAP_ALTERNATIVE'. Every bit in the portmap\n" + "\trepresents one port (port 0 = LSB bit).\n" + "\n" + + "action.nForwardSubIfId :\n" + "\tTarget Sub-Interface Id (GSWIP-3.0 only) for forwarded packets,\n" + "\tonly used if selected by 'ePortMapAction'. Forwarding is done" + "\tif 'ePortMapAction = GSW_PCE_ACTION_PORTMAP_ALTERNATIVE'.\n" + "\n" + + + "action.bRemarkAction :\n" + "\tAction \"Remarking\" Group. Remarking action enable\n" + "\n" + "action.bRemarkPCP :\n" + "\tPCP remarking enable. Remarking enabling means that remarking is\n" + "\tpossible in case the port configuration or metering enables remarking\n" + "\ton that packet. Disabling remarking means that it is forced to not\n" + "\tremarking this packet, independent of any port remarking of metering\n" + "\tconfiguration.\n" + "\n" + + "action.bRemarkSTAG_PCP :\n" + "\tSTAG VLAN PCP remarking enable. Remarking enabling means that remarking is\n" + "\tpossible in case the port configuration or metering enables remarking\n" + "\ton that packet. Disabling remarking means that it is forced to not\n" + "\tremarking this packet, independent of any port remarking of metering\n" + "\tconfiguration.\n" + "\n" + "action.bRemarkSTAG_DEI :\n" + "\tSTAG VLAN DEI remarking enable. Remarking enabling means that remarking is\n" + "\tpossible in case the port configuration or metering enables remarking\n" + "\ton that packet. Disabling remarking means that it is forced to not\n" + "\tremarking this packet, independent of any port remarking of metering\n" + "\tconfiguration.\n" + "\n" + + "action.bRemarkDSCP :\n" + "\tDSCP remarking enable Remarking enabling means that remarking is\n" + "\tpossible in case the port configuration or metering enables remarking\n" + "\ton that packet. Disabling remarking means that it is forced to not\n" + "\tremarking this packet, independent of any port remarking of metering\n" + "\tconfiguration.\n" + "\n" + "action.bRemarkClass :\n" + "\tClass remarking enable Remarking enabling means that remarking is\n" + "\tpossible in case the port configuration or metering enables remarking\n" + "\ton that packet. Disabling remarking means that it is forced to not\n" + "\tremarking this packet, independent of any port remarking of metering\n" + "\tconfiguration.\n" + "\n" + "action.eMeterAction :\n" + "\tAction \"Meter\" Group. Meter action control and enable. If metering\n" + "\taction enabled, specified metering instance number overrules any other\n" + "\tmetering assignment. Up to two metering instances can be applied to a\n" + "\tsingle packet.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Action Disable.\n" + "\n" + "\t1: Action Enable. The action is enabled but no dedicated metering\n" + "\t\tinstance is assigned by the rule.\n" + "\n" + "\t2: Action Enable. Assign one meter instance as given in parameter\n" + "\t\t\"nMeterId\".\n" + "\n" + "\t3: Action Enable. Assign pair of meter instances. These instances are\n" + "\t\t\"nMeterId\" and the next following meter instance index.\n" + "\n" + "action.nMeterId :\n" + "\tMeter ID\n" + "\n" + "action.bRMON_Action :\n" + "\tAction \"RMON\" Group. RMON action enable\n" + "\n" + "action.nRMON_Id :\n" + "\tCounter ID (The index starts counting from zero).\n" + "\n" + "action.eVLAN_Action :\n" + "\tAction \"CTAG VLAN\" Group. VLAN action enable\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Disabled. The VLAN Action is disabled.\n" + "\n" + "\t1: Regular VLAN. VLAN Action enabled. Select Default VLAN ID.\n" + "\n" + "\t2: Alternative VLAN. VLAN Action enabled. Select Alternative VLAN as\n" + "\t\tconfigured in 'nVLAN_Id' or 'nSVLAN_Id'. For CTAG VLAN it requires that this \n" + "\t\tVLAN ID is configured by calling GSW_VLAN_ID_CREATE in advance.\n" + "\t\tThis additional call is not required for STAG VLAN.\n" + "\n" + "action.nVLAN_Id :\n" + "\tAlternative VLAN Id\n" + + "\n" + "action.eSVLAN_Action :\n" + "\tAction \"STAG VLAN\" Group. VLAN action enable\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Disabled. The VLAN Action is disabled.\n" + "\n" + "\t1: Regular VLAN. VLAN Action enabled. Select Default VLAN ID.\n" + "\n" + "\t2: Alternative VLAN. VLAN Action enabled. Select Alternative VLAN as\n" + "\t\tconfigured in 'nVLAN_Id' or 'nSVLAN_Id'. For CTAG VLAN it requires that this \n" + "\t\tVLAN ID is configured by calling GSW_VLAN_ID_CREATE in advance.\n" + "\t\tThis additional call is not required for STAG VLAN.\n" + "\n" + "action.nSVLAN_Id :\n" + "\t Alternative STAG VLAN Id\n" + "\n" + "action.nFId :\n" + "\tAlternative FID (not supported by all switches\n" + + "\n" + "action.eVLAN_CrossAction :\n" + "\tAction \"Cross VLAN\" Group. Cross VLAN action enable\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Disabled. The Cross VLAN Action is disabled.\n" + "\n" + "\t1: Regular VLAN Packet. Do not ignore VLAN filtering rules.\n" + "\n" + "\t2: Cross-VLAN packet. Ignore VLAN filtering rules.\n" + "\n" + + "action.bCVLAN_Ignore_Control :\n" + "\t0: Do not ignore CTAG VLAN classification.\n" + "\n" + "\t1: Ignore CTAG VLAN classification.\n" + "\n" + + "action.bPortBitMapMuxControl :\n" + "\t0: port bitmap is used for alternative port map function.\n" + "\n" + "\t1: port bitmap is used for STAG port member.\n" + "\n" + + "action.bPortTrunkAction :\n" + "\t0: action disable.\n" + "\n" + "\t1: action enable.\n" + "\n" + + "action.bPortLinkSelection :\n" + "\t0: lower port selection.\n" + "\n" + "\t1: higher port selection.\n" + "\n" + + "action.bFlowID_Action :\n" + "\tAction \"Flow ID\". The Switch supports enhancing the egress packets by\n" + "\ta device specific special tag header. This header contains detailed\n" + "\tswitch classification results. One header file is a 'Flow ID', which\n" + "\tcan be explicitly set as flow table action when hitting a table rule.\n" + "\tIf selected, the Flow ID is given by the parameter 'nFlowID'.\n" + "\n" + "action.nFlowID :\n" + "\tFlow ID" + + "action.bRoutExtId_Action :\n" + "\tRouting Extension Id Selector - for GSWIP-3.0 only.\n" + "\tWhen enabled, it expects a valid nRoutExtId value to be supplied.\n" + "\tOnly entries matching with Routing Extension value in RT \n" + "\tSession table will be subject to routing.\n" + "\n" + "action.nRoutExtId :\n" + "\tRouting Extension Id Value - for GSWIP-3.0 only. (8-bits range).\n" + "\n" + "action.bRtDstPortMaskCmp_Action :\n" + "\tRouting Destination Port Mask Comparison - for GSWIP-3.0 only.\n" + "\n" + "action.bRtSrcPortMaskCmp_Action :\n" + "\tRouting Source Port Mask Comparison - for GSWIP-3.0 only.\n" + "\n" + "action.bRtDstIpMaskCmp_Action :\n" + "\tRouting Destination IP Address Mask Comparison - for GSWIP-3.0 only.\n" + "\n" + "action.bRtSrcIpMaskCmp_Action :\n" + "\tRouting Source IP Address Mask Comparison - for GSWIP-3.0 only.\n" + "\n" + "action.bRtInnerIPasKey_Action :\n" + "\tSelector of IP in Tunneled IP header (Outer or Inner) - for GSWIP-3.0 only.\n" + "\n" + "action.bRtAccelEna_Action :\n" + "\tRouting Acceleration Enable Action - for GSWIP-3.0 only.\n" + "\n" + "action.bRtCtrlEna_Action :\n" + "\tRouting Control Enable Action - for GSWIP-3.0 only.\n" + "\n" + + "action.eProcessPath_Action :\n" + "\tAssignment of flow to Processing Path-1 or -2 - for GSWIP-3.0 only.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Processing Path is not enabled.\n" + "\n" + "\t1: Processing Path-1 is used for MPE-1.\n" + "\n" + "\t2: Processing Path-2 is used for MPE-2.\n" + "\n" + "\t3: Processing Path-1 and -2 are used for MPE-1 & MPE-2.\n" + "\n" + + "action.bOamEnable :\n" + "\tbOamEnable\n" + "action.nRecordId :\n" + "\tnRecordId\n" + "action.bExtractEnable :\n" + "\tbExtractEnable\n" + "action.eColorFrameAction :\n" + "\teColorFrameAction\n" + "action.bExtendedVlanEnable :\n" + "\tbExtendedVlanEnable\n" + "action.nExtendedVlanBlockId :\n" + "\tnExtendedVlanBlockId\n" + "\n" + + "action.ePortFilterType_Action :\n" + "\tPort Filter Action Config for this flow - for GSWIP-3.0 only.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Port Filter Action is Unused.\n" + "\n" + "\t1: Port Filter Action Type-1 is used.\n" + "\n" + "\t2: Port Filter Action Type-2 is used.\n" + "\n" + "\t3: Port Filter Action Type-3 is used.\n" + "\n" + "\t4: Port Filter Action Type-4 is used.\n" + "\n" + "\t5: Port Filter Action Type-5 (Unknown Unicast) is used.\n" + "\n" + "\t6: Port Filter Action Type-6 (Unknown Multicast) is used.\n" + "\n" + "\n", + /* 108: GSW_REGISTER_GET */ + "Read an internal register. The register offset defines which register to\n" + "access in which table. This routine only accesses the M4599_PDI and the\n" + "ETHSW_PDI of the switch. All PHY registers are accessed via\n" + "GSW_MDIO_DATA_WRITE and GSW_MDIO_DATA_READ. Note that the switch\n" + "API implementation checks whether the given address is inside the valid\n" + "address range. It returns with an error in case an invalid address is given.\n" + "\nParameter:\n----------\n" + "nRegAddr :\n" + "\tRegister Address Offset for read or write access." + "\n", + /* 109: GSW_REGISTER_SET */ + "Write to an internal register. All PHY registers are accessed via\n" + "GSW_MDIO_DATA_WRITE and GSW_MDIO_DATA_READ. Note that the switch\n" + "API implementation checks whether the given address is inside the valid\n" + "address range. It returns with an error in case an invalid address is given.\n" + "\nParameter:\n----------\n" + "nRegAddr :\n" + "\tRegister Address Offset for read or write access.\n" + "nData :\n" + "\tValue to write to or read from 'nRegAddr'.\n" + "nClearBits :\n" + "\tBitmask to clear dedicated databits before writing back the data.\n" + "\tThe field 'nData' is ignored in case 'nCleartBits' is given\n" + "\tdata = data & ~nCleartBits\n" + "nSetBits :\n" + "\tBitmask to set dedicated data bits before writing back the data.\n" + "\tThe field 'nData' is ignored in case 'nSetBits' is given.\n" + "\t'nClearBits' is applied before 'nSetBits'.\n" + "\tdata = data | nSetBits" + "\n", + /* 110: GSW_RESET */ + "Forces a hardware reset of the switch device or switch macro. The device\n" + "automatically comes back out of reset and contains the initial values. All\n" + "previous configurations are lost.\n" + "\nParameter:\n----------\n" + "eReset :\n" + "\tReset selection.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Switch Macro reset\n" + "\n" + "\t1: MDIO master interface reset", + /* 111: GSW_RMON_EXTEND_GET */ + "Read out additional traffic flow (RMON) counters. The zero-based 'nPortId'\n" + "structure element describes the physical switch port for the requested\n" + "statistic information.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.", + /* 112: GSW_TIMESTAMP_TIMER_GET */ + "This command reads out the switch global reference timer counter that is\n" + "used by the packet timestamp capture when sending and receiving Ethernet port level.\n" + "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" + "\nParameter:\n----------\n" + "nSec :\n" + "\tSecond. Absolute second timer count\n" + "nNanoSec :\n" + "\t Nano Second. Absolute nano second timer count.\n" + "nFractionalNanoSec :\n" + "\t Fractional Nano Second. Absolute fractional nano second timer count. \n", + /* 113: GSW_TIMESTAMP_TIMER_SET */ + "This command sets the packet timestamp reference counter.\n" + "This reference timer is a switch global timer which is used by the\n" + "packet timestamp capture when sending and receiving Ethernet port level\n" + "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" + "\nParameter:\n----------\n" + "nSec :\n" + "\tSecond. Absolute second timer count\n" + "nNanoSec :\n" + "\t Nano Second. Absolute nano second timer count.\n" + "nFractionalNanoSec :\n" + "\t Fractional Nano Second. Absolute fractional nano second timer count. \n", + /* 114: GSW_TIMESTAMP_PORT_READ */ + "This command reads out the port related time stamp values. This time stamp is captured\n" + "for ingress and egress packets triggered due to a traffic flow table time stamp action.\n" + "A port related packet timestamp is triggered by the flow table action 'eTimestampAction'.\n" + "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n", + /* 115: GSW_TRUNKING_CFG_GET */ + "Read out the current port trunking algorithm that is used to retrieved if a packet is \n" + "sent on the lower or higher trunking port index number.The algorithm performs an hash \n" + "calculation over the MAC- and IP- addresses using the source- and destination- fields.\n" + "This command retrieve which of the mentioned fields is used by the hash algorithm.\n" + "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" + "\nParameter:\n----------\n" + "bIP_Src :\n" + "\tIP source address is used by the hash algorithm to calculate the egress trunking port index.\n" + "bIP_Dst :\n" + "\tIP destination address is used by the hash algorithm to calculate the egress trunking port index.\n" + "bMAC_Src :\n" + "\tMAC source address is used by the hash algorithm to calculate the egress trunking port index.\n" + "bMAC_Dst :\n" + "\tMAC destination address is used by the hash algorithm to calculate the egress trunking port index.\n", + /* 116: GSW_TRUNKING_CFG_SET */ + "Configure the current port trunking algorithm that is used to retrieved if a packet is \n" + "sent on the lower or higher trunking port index number. The algorithm performs an hash \n" + "calculation over the MAC- and IP- addresses using the source- and destination- fields.\n" + "This command retrieve which of the mentioned fields is used by the hash algorithm.\n" + "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" + "\nParameter:\n----------\n" + "bIP_Dst :\n" + "\tIP destination address is used by the hash algorithm to calculate the egress trunking port index.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Enabled, Destination IP address is used for distrubution algorithm.\n" + "\n" + "\t1: Disable, Destination IP address is not used for distrubution algorithm\n" + "\n" + "bIP_Src :\n" + "\tIP source address is used by the hash algorithm to calculate the egress trunking port index.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Enabled, Source IP address is used for distrubution algorithm.\n" + "\n" + "\t1: Disable, Source IP address is not used for distrubution algorithm\n" + "\n" + "bMAC_Dst :\n" + "\tMAC destination address is used by the hash algorithm to calculate the egress trunking port index.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Enabled, Destination MAC address is used for distrubution algorithm.\n" + "\n" + "\t1: Disable, Destination MAC address is not used for distrubution algorithm\n" + "\n" + "bMAC_Src :\n" + "\tMAC source address is used by the hash algorithm to calculate the egress trunking port index.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Enabled, Source MAC address is used for distrubution algorithm.\n" + "\n" + "\t1: Disable, Source MAC address is not used for distrubution algorithm\n" + "\n", + /* 117: GSW_TRUNKING_PORT_CFG_GET */ + "Read out the port trunking state of a given physical Ethernet switch port 'nPortId'.\n" + "Switch API sets the boolean flag 'bAggregateEnable' and the aggregated trunking \n" + "port 'nAggrPortId' in case trunking is enabled on the port.\n" + "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n", + /* 118: GSW_TRUNKING_PORT_CFG_SET */ + "Configure the port trunking on two physical Ethernet switch ports.\n" + "A new port trunking group of two groups could be placed or removed.\n" + "The two port index number are given with the parameter 'nPortId' and 'nAggrPortId'.\n" + "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "bAggregateEnable :\n" + "\tPorts are aggregated. Enabling means that the 'nPortId' and the 'nAggrPortId' \n" + "\tports form an aggregated link. \n" + "nAggrPortId :\n" + "\tSecond Aggregated Ethernet Port number (zero-based counting).\n" + "\tThe valid range is hardware dependent.An error code is delivered if the selected \n" + "\tport is not available.\n", + /* 119: GSW_QOS_WRED_PORT_CFG_GET */ + "Read out the WRED drop thresholds for a dedicated egress port.Given parameters \n" + "are rounded to the segment size of the HW platform. The supported segment size \n" + "is given by the capability list by using GSW_CAP_GET.\n" + "The configuration can be changed by using GSW_QOS_WRED_PORT_CFG_SET.\n" + "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n", + /* 120: GSW_QOS_WRED_PORT_CFG_SET */ + "Configures the WRED drop thresholds for a dedicated egress port. Given parameters\n" + "are rounded to the segment size of the HW platform. The supported segment size is \n" + "given by the capability list by using GSW_CAP_GET.\n" + "The command GSW_QOS_WRED_PORT_CFG_GET retrieves the current configuration.\n" + "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "nRed_Min :\n" + "\tWRED Red Threshold Min [number of segments].\n" + "\n" + "nRed_Max :\n" + "\tWRED Red Threshold Max [number of segments].\n" + "\n" + "nYellow_Min :\n" + "\tWRED Yellow Threshold Min [number of segments].\n" + "\n" + "nYellow_Max :\n" + "\tWRED Yellow Threshold Max [number of segments].\n" + "\n" + "nGreen_Min :\n" + "\tWRED Green Threshold Min [number of segments].\n" + "\n" + "nGreen_Max :\n" + "\tWRED Green Threshold Max [number of segments].\n", + /* 121: GSW_QOS_FLOWCTRL_CFG_GET */ + "Read out the global flow control thresholds for conforming and non-conforming packets.\n" + "The configured thresholds apply to the global switch segment buffer.\n" + "The configuration can be changed by GSW_QOS_FLOWCTRL_CFG_SET.\n" + "Given parameters are rounded to the segment size of the HW platform. The supported\n" + "segment size is given by the capability list by using GSW_CAP_GET.\n" + "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n", + /* 122: GSW_QOS_FLOWCTRL_CFG_SET */ + "Configures the global flow control thresholds for conforming and non-conforming packets.\n" + "The configured thresholds apply to the global switch segment buffer.\n" + "The current configuration can be retrieved by \ref GSW_QOS_FLOWCTRL_CFG_GET.\n" + "Given parameters are rounded to the segment size of the HW platform. The supported \n" + "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" + "\nParameter:\n----------\n" + "nFlowCtrlNonConform_Min :\n" + "\tGlobal Buffer Non Conforming Flow Control Threshold Minimum [number of segments].\n" + "\n" + "nFlowCtrlNonConform_Max :\n" + "\tGlobal Buffer Non Conforming Flow Control Threshold Maximum [number of segments].\n" + "\n" + "nFlowCtrlConform_Min :\n" + "\tGlobal Buffer Conforming Flow Control Threshold Minimum [number of segments].\n" + "\n" + "nFlowCtrlConform_Max :\n" + "\tGlobal Buffer Conforming Flow Control Threshold Maximum [number of segments].\n", + /* 123: GSW_QOS_FLOWCTRL_PORT_CFG_GET */ + "Read out the ingress port flow control thresholds for occupied buffer segments. \n" + "The configuration can be changed by \ref GSW_QOS_FLOWCTRL_PORT_CFG_SET.\n" + "Given parameters are rounded to the segment size of the HW platform. The supported \n" + "segment size is given by the capability list by using GSW_CAP_GET.\n" + "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n", + /* 124: GSW_QOS_FLOWCTRL_PORT_CFG_SET */ + "Configures the ingress port flow control thresholds for occupied buffer segments.\n" + "The current configuration can be retrieved by GSW_QOS_FLOWCTRL_PORT_CFG_GET.\n" + "Given parameters are rounded to the segment size of the HW platform. The supported\n" + "segment size is given by the capability list by using GSW_CAP_GET.\n" + "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "nFlowCtrl_Min :\n" + "\tIngress Port occupied Buffer Flow Control Threshold Minimum [number of segments].\n" + "nFlowCtrl_Max :\n" + "\tIngress Port occupied Buffer Flow Control Threshold Maximum [number of segments].\n", + /* 125: GSW_QOS_QUEUE_BUFFER_RESERVE_CFG_GET */ + "Read out the egress queue specific buffer reservation.\n" + "Configuration can be read by GSW_QOS_QUEUE_BUFFER_RESERVE_CFG_SET.\n" + "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" + "\nParameter:\n----------\n" + "nQueueId :\n" + "\tQoS queue index (zero-based counting).\n", + /* 126: GSW_QOS_QUEUE_BUFFER_RESERVE_CFG_SET */ + "Configure the egress queue buffer reservation. WRED GREEN packets are never\n" + "dropped by any WRED algorithm (queue,port or global buffer level) in case \n" + "they are below this reservation threshold.The amount of reserved segments \n" + "cannot be occupied by other queues of the switch. The egress queue related \n" + "configuration can be retrieved by calling GSW_QOS_QUEUE_BUFFER_RESERVE_CFG_GET.\n" + "Note: Supported for GSWIP 2.2 and newer and returns with an error for older hardware revisions.\n" + "\nParameter:\n----------\n" + "nQueueId :\n" + "\tQoS queue index (zero-based counting).\n" + "nBufferReserved :\n" + "\tReserved Buffer Segment Threshold [number of segments].\n", + + /* 127: GSW_SVLAN_CFG_GET */ + "Get The current STAG VLAN global device configuration.\n", + /* 128: GSW_SVLAN_CFG_SET */ + "Set STAG VLAN global device configuration.\n" + "\nParameter:\n----------\n" + "nEthertype :\n" + "\tSVLAN ID. Protocl EtherType Field. This 16-bit of the STAG VLAN. \n", + /* 129: GSW_SVLAN_PORT_CFG_GET */ + "Get STAG VLAN Port Configuration. This function returns the STAG VLAN configuration of\n" + "the given Port 'nPortId'.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available. \n", + /* 130: GSW_SVLAN_PORT_CFG_SET */ + "Set STAG VLAN Port Configuration. This function sets the STAG VLAN configuration of the\n" + "given Port 'nPortId'.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is\n" + "\tnot available.\n" + "\n" + "bSVLAN_TagSupport :\n" + "\tPort based STAG VLAN Support. All STAG VLAN protocol parsing and configuration features\n" + "\tare only applied on this port in case the STAG VLAN port support is enabled.\n" + "\n" + "bSVLAN_MACbasedTag :\n" + "\tPort Egress MAC based STAG VLAN. All egress packets contain a STAG VLAN ID \n" + "\that is based on the VLAN ID which is retrieved from the MAC bridging table.\n" + "\tThis MAC bridging table SVLAN ID can be learned from the snooped traffic or statically added.\n" + "\n" + "nPortVId :\n" + "\tPort STAG VLAN ID (PVID). The software shall ensure that the used VLAN has\n" + "\tbeen configured in advance on the hardware by using\n" + "\tGSW_VLAN_ID_CREATE.\n" + "\n" + "bVLAN_ReAssign :\n" + "\tReassign all ingress STAG VLAN tagged packets to the port-based STAG VLAN ID (PVID)\n" + "\n" + "eVLAN_MemberViolation :\n" + "\tVLAN ingress and egress membership violation mode. Allows admittance\n" + "\tof STAG VLAN-tagged packets where the port is not a member of the STAG VLAN ID\n" + "\tcarried in the received and sent packet.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: No VLAN member violation. Ingress and egress packets violating the\n" + "\t\tmembership pass and are not filtered out.\n" + "\n" + "\t1: VLAN member violation for ingress packets. Ingress packets\n" + "\t\tviolating the membership are filtered out. Egress packets violating\n" + "\t\tthe membership are not filtered out.\n" + "\n" + "\t2: VLAN member violation for egress packets. Egress packets violating\n" + "\t\tthe membership are filtered out. Ingress packets violating the\n" + "\t\tmembership are not filtered out.\n" + "\n" + "\t3: VLAN member violation for ingress and egress packets. Ingress and\n" + "\t\tegress packets violating the membership are filtered out.\n" + "\n" + "eAdmitMode :\n" + "\tIngress STAG VLAN-tagged or untagged packet filter configuration.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Admit all. Tagged and untagged packets are allowed.\n" + "\n" + "\t1: Untagged packets only (not supported yet). Tagged packets are\n" + "\t\tdropped.\n" + "\n" + "\t2: Tagged packets only. Untagged packets are dropped.\n", + /* 131: GSW_QOS_SVLAN_CLASS_PCP_PORT_GET */ + "Read out the current egress port related traffic class to 802.1P (PCP) priority mapping table.\n" + "One table is given for each egress port.\n" + "Priority map entry index value is calculated by 'index=PCP + 8*DEI'\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is not available. \n", + /* 132: GSW_QOS_SVLAN_CLASS_PCP_PORT_SET */ + "Configure the egress port related traffic class to STAG VLAN 802.1P (PCP) priority mapping table.\n" + "One table is given for each egress port.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEthernet Port number (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port isnot available.\n" + "nTrafficClass :\n" + "\t\tTraffic class associated with a particular CPCP, SPCp and DSCP values.\n" + "\t\t The index starts counting from zero. \n" + "nCPCP:\n" + "\tConfigures the traffic class to CPCP (3-bit) mapping.The queue index starts counting from zero.\n" + "\tTraffic class associated with a particular 802.1P (PCP) priority mapping value.\n" + "\tOne table is given per egress port. Priority map entry structure.\n" + "\tThe lowest 3 LSB bits (0 ... 2) of 'nPCP_DEI' describe the PCP field.\n" + "\tBit 3 describes the 'DEI' field. \n" + "nSPCP:\n" + "\tConfigures the traffic class to CPCP (3-bit) mapping.The queue index starts counting from zero.\n" + "\tTraffic class associated with a particular 802.1P (PCP) priority mapping value.\n" + "\tOne table is given per egress port. Priority map entry structure.\n" + "\tThe lowest 3 LSB bits (0 ... 2) of 'nPCP_DEI' describe the PCP field.\n" + "\tBit 3 describes the 'DEI' field. \n" + "nDSCP:\n" + "\tConfigures the traffic class to CPCP (3-bit) mapping.The queue index starts counting from zero.\n" + "\tTraffic class associated with a particular 802.1P (PCP) priority mapping value.\n" + "\tOne table is given per egress port. Priority map entry structure.\n" + "\tThe lowest 3 LSB bits (0 ... 2) of 'nPCP_DEI' describe the PCP field.\n" + "\tBit 3 describes the 'DEI' field. \n", + /* 133: GSW_QOS_SVLAN_PCP_CLASS_GET */ + "Read out the 802.1P (PCP) to traffic class mapping table.\n" + "This configuration applies to the entire switch device.\n" + "Priority map entry index value is calculated by 'index=PCP + 8*DEI'. \n", + /* 134: GSW_QOS_SVLAN_PCP_CLASS_SET */ + "Configure the traffic class to 802.1P (PCP) priority mapping table. \n" + "This table is global for the entire switch device. \n" + "\nParameter:\n----------\n" + "nPCP :\n" + "\t\tTable index of the PCP to traffic table mappingtable. The index starts counting from zero. \n" + "nTrafficClass :\n" + "\t\tTraffic class associated with a particular STAG VLAN 802.1P (PCP) priority and \n" + "\t\tDrop Eligiable Indicator (DEI) mapping value. \n" + "\t\tPriority map entry index value is calculated by 'index=PCP + 8*DEI'\n" + "\t\tThe index starts counting from zero.\n" + "nTrafficColor :\n" + "\t\tTraffic Color associated with a particular STAG VLAN 802.1P (PCP) priority and. \n" + "\t\tDrop Eligiable Indicator (DEI) mapping value. \n" + "nPCP_Remark_Enable :\n" + "\tPCP Remark disable control.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: PCP remarking enabled for this code point.\n" + "\n" + "\t1: PCP remarking disabled for this code point.\n" + "\n" + "nDEI_Remark_Enable :\n" + "\tDEI Remark disable control.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: DEI remarking enabled for this code point.\n" + "\n" + "\t1: DEI remarking disabled for this code point.\n" + "\n", + /* 135: GSW_PCE_EG_VLAN_CFG_SET */ + "Configure the Egress VLAN Treatment settings of PCE for given egress Port.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEgress Port Identifier (zero-based counting). The valid range is\n" + "\thardware dependent. \n" + "bEgVidEna :\n" + "\tEnable or disable Egress VLAN treatment on given port.\n" + "eEgVLANmode :\n" + "\tEgress VLAN Treatment Selector - FID or SubIf-GroupId based.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: FID based Egress VLAN Treatment.\n" + "\n" + "\t1: Sub-InterfaceId Group (Bits 12 to 8) based Egress VLAN Treatment.\n" + "nEgStartVLANIdx :\n" + "\tEgress VLAN Treatment start index for specified nPortId. Continuous block \n" + "\t of VLAN is used until next port's Start block assignment\n" + "\n", + /* 136: GSW_PCE_EG_VLAN_CFG_GET */ + "Read the Egress VLAN Treatment settings of PCE for given egress Port.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEgress Port Identifier (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is not available. \n" + "\n", + /* 137: GSW_PCE_EG_VLAN_ENTRY_WRITE */ + "Configure the Egress VLAN Treatment settings of PCE for given egress Port.\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "\tEgress Port Identifier (zero-based counting). The valid range is\n" + "\thardware dependent. An error code is delivered if the selected port is not available. \n" + "nIndex :\n" + "\tIndex corresponding to FID or SubIf-ID Group\n" + "bEgVLAN_Action :\n" + "\tEnable or disable Egress VLAN Treatment Action.\n" + "bEgSVidRem_Action :\n" + "\tEnable or disable the STAG VLAN Removal action.\n" + "bEgSVidIns_Action :\n" + "\tEnable or disable the STAG VLAN Insert action.\n" + "nEgSVid :\n" + "\tSVLAN Value to be inserted in egress.\n" + "bEgCVidRem_Action :\n" + "\tEnable or disable the CTAG VLAN Removal action.\n" + "bEgCVidIns_Action :\n" + "\tEnable or disable the CTAG VLAN Insert action.\n" + "nEgCVid :\n" + "\tCVLAN Value to be inserted in egress.\n" + "\n", + /* 138: GSW_PCE_EG_VLAN_ENTRY_READ */ + "Read the Egress VLAN Treatment settings of PCE for given egress Port.\n" + "\nParameter:\n----------\n" + "nIndex :\n" + "\tIndex corresponding to FID or SubIf-ID Group\n" + "\n", + /* 139: GSW_PMAC_BM_CFG_GET */ + "Read the backpressure mapping table between Tx Queues for Egress and Rx Queues \n" + "for Ingress congestion on given DMA channel. \n" + "\nParameter:\n----------\n" + "nTxDmaChanId :\n" + "\tTx DMA Channel Identifier (0..15). \n" + "\n", + /* 140: GSW_PMAC_EG_CFG_GET */ + "Read egress attributes config on given PMAC port. \n" + "\nParameter:\n----------\n" + "nDestPortId :\n" + "\tDestination Port Identifier (0..15) - Part of Table Index (Bits 0-3).\n" + "bProcFlagsSelect :\n" + "\tSelector for Processing Flags (MPE1, MPE2, DEC & ENC bits). If disabled, \n" + "\tthen the combination of flags bDecFlag, bEncFlag, bMpe1Flag and bMpe2Flag\n" + "\t are considered as index instead of nTrafficClass. For using these \n" + "\tcombination flags, turn ON this boolean selector.\n" + "\tTC or combination processing flag is decided at global \n" + "\tlevel through bProcFlagsEgPMACEna.\n" + "\tIt is expected that user always passes correct value based \n" + "\tupon bProcFlagsEgMPACEna. If mismatch found with global PMAC mode,\n" + "\t SWAPI will return error code.\n" + "nTrafficClass :\n" + "\tTraffic Class value [Lower 4 -bits (LSB-0, 1, 2, 3)].- Part of Table Index Bits 4-7.\n" + "\tThis value is considered, only when bProcFlagsSelect is not set.\n" + "nFlowIDMsb :\n" + "\tFlow-ID MSB (2-bits) value - valid range (0..2). - Part of Table Index Bits 8-9.\n" + "bMpe1Flag :\n" + "\tMPE-1 Flag value - Part of Table Index Bit 4. Valid only when bProcFlagsSelect is set\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: MPE-1 Marked Flag disabled.\n" + "\n" + "\t1: MPE-1 Marked Flag Enabled.\n" + "bMpe2Flag :\n" + "\tMPE-2 Flag value - Part of Table Index Bit 5. Valid only when bProcFlagsSelect is set.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: MPE-2 Marked Flag disabled.\n" + "\n" + "\t1: MPE-2 Marked Flag Enabled.\n" + "bEncFlag :\n" + "\tCryptography Encryption Action Flag value - Part of Table Index Bit 7.\n" + "\t Valid only, when bProcFlagsSelect is set\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Cryptography Encryption Action Flag disabled.\n" + "\n" + "\t1: Cryptography Encryption Action Flag Enabled.\n" + "bDecFlag :\n" + "\tCryptography Decryption Action Flag value - Part of Table Index Bit 6.\n" + "\t Valid only, when bProcFlagsSelect is set.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Cryptography Decryption Action Flag disabled.\n" + "\n" + "\t1: Cryptography Decryption Action Flag Enabled.\n" + "\n", + /* 141: GSW_PMAC_IG_CFG_GET */ + "Reads the PMAC Ingress config on given DMA channel. \n" + "\nParameter:\n----------\n" + "nTxDmaChanId :\n" + "\tTx DMA Channel Identifier (0..15). \n" + "\n", + /* 142: GSW_PMAC_COUNT_GET */ + "Reads the Counters for given DMA Channel/ given source Port ID. \n" + "\nParameter:\n----------\n" + "nTxDmaChanId :\n" + "\tTransmit DMA Channel/ Source Port ID Identifier (0..15). \n" + "\n", + /* 143: GSW_RMON_MODE_SET */ + "Configures a Traffic Statistic Counter (RMON counter). \n" + "Set RMON counting mode to bytes or Packet based. \n" + "\nParameter:\n----------\n" + "eRmonType :\n" + "\tSelect RMON Counters Type. \n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: All RMON Types Counters (GSW_RMON_ALL_TYPE). \n" + "\n" + "\t1: All PMAC RMON Counters (GSW_RMON_PMAC_TYPE).\n" + "\n" + "\t2: Port based RMON Counters (GSW_RMON_PORT_TYPE).\n" + "\n" + "\t3: Meter based RMON Counters (GSW_RMON_METER_TYPE).\n" + "\n" + "\t4: Interface based RMON Counters(GSW_RMON_IF_TYPE).\n" + "\n" + "\t5: Route based RMON Counters (GSW_RMON_ROUTE_TYPE).\n" + "\n" + "\t6: Redirected Traffic based RMON Counters (GSW_RMON_REDIRECT_TYPE).\n" + "\n" + "eCountMode :\n" + "\tSelect RMON Counters Mode. \n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Packet based RMON Counters(GSW_RMON_COUNT_PKTS). \n" + "\n" + "\t1: Bytes based RMON Counters (GSW_RMON_COUNT_BYTES).\n" + "\n" + "\t2: Number of dropped frames, supported only for interface cunters (GSW_RMON_DROP_COUNT).\n" + "\n", + /* 144: GSW_RMON_IF_GET */ + "Get the Interface RMON Counters . \n" + "\nParameter:\n----------\n" + "nIfId :\n" + "\tInterface Counter Index Number. (Range : 0-255). \n" + "\n", + /* 145: GSW_RMON_REDIRECT_GET */ + "Get the Redirected RMON Counters. \n" + "\n", + /* 114: GSW_RMON_ROUTE_GET */ + "Get the Routing RMON Counters. \n" + "\nParameter:\n----------\n" + "nRoutedPortId :\n" + "\tRouted Port Number. \n" + "\n", + /* 147: GSW_RMON_METER_GET */ + "Get the Meter Instance statistic counter. \n" + "\nParameter:\n----------\n" + "nMeterId :\n" + "\tMeter Instance number (zero-based counting). \n" + "\n", + /* 148: GSW_QOS_METER_ACT */ + "Triggers Metering Action for Traffic by CPU/MPE. \n" + "Control Action for triggering metering action from \n" + "CPU users [(CPU or MPE) or (CPU-1 & CPU-2) ] and This control trigger \n" + "action performs metering and returns output color.\n" + "\nParameter:\n----------\n" + "nCpuUserId :\n" + "\tCPU User Id . \n" + "nMeterId :\n" + "\tPrimary Meter Instance Id (zero-based counting). \n" + "bMeterEna :\n" + "\tPrimary Meter Enable or Disable Action. \n" + "nSecMeterId :\n" + "\tSecondary Meter Instance Id (zero-based counting). \n" + "bSecMeterEna :\n" + "\tSecondary Meter Enable or Disable Action. \n" + "ePreColor :\n" + "\tPre-Color to indicate the traffic type getting Metered.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Critical Packet. Metering never changes the drop precedence \n" + "\t\tof these packets (GSW_DROP_PRECEDENCE_CRITICAL). \n" + "\t1: Green Drop Precedence Packet. Packet is marked with a 'low' \n" + "\t\tdrop precedence (GSW_DROP_PRECEDENCE_GREEN).\n" + "\t2: Yellow Drop Precedence Packet. Packet is marked with a 'middle' \n" + "\t\tdrop precedence (GSW_DROP_PRECEDENCE_YELLOW). \n" + "\t3: Red Drop Precedence Packet. Packet is marked with a 'high' \n" + "\t\tdrop precedence. (GSW_DROP_PRECEDENCE_RED).\n" + "\n" + "pktLen :\n" + "\tPacket Length in Bytes subject to Metering action from CPU. \n" + "\n", + + + /* 149: GSW_PMAC_GLBL_CFG_SET */ + "Writes the global PMAC settings applicable to PMAC ports \n" + "It is used to configure the global settings such as Padding, \n" + " Checksum, Length and Egress PMAC Selector fields. \n" + "\nParameter:\n----------\n" + "bAPadEna :\n" + "\tAutomatic Padding Settings - Disabled (Default), to enable set it true. \n" + "bPadEna :\n" + "\tGlobal Padding Settings - Disabled (Default), to enable set it true. \n" + "bVPadEna :\n" + "\tVLAN Padding Setting - Disabled (Default), to enable set it true \n" + "\t applicable when bPadEna is set. \n" + "bSVPadEna :\n" + "\tStacked VLAN Padding Setting - Disabled (Default), to enable set \n" + "\t it true - applicable when bPadEna is set. \n" + "bTxFCSDis :\n" + "\tTransmit FCS Regeneration Setting - Enabled (Default), \n" + "\t\tto disable set it true. \n" + "bIPTransChkRegDis :\n" + "\tIP and Transport (TCP/UDP) Headers Checksum Generation \n" + "\t Control - Enabled (Default), to disable set it true. \n" + "bIPTransChkVerDis :\n" + "\tIP and Transport (TCP/UDP) Headers Checksum Verification \n" + "\tControl - Enabled (Default), to disable set it true. \n" + "bJumboEna :\n" + "\tTo enable receipt of Jumbo frames - Disabled \n" + "\t(Default - 1518 bytes normal frames without VLAN tags), \n" + "\tto enable Jumbo set it truee. \n" + "nMaxJumboLen :\n" + "\tMaximum length of Jumbo frames in terms of bytes \n" + "\t(Bits 13:0). The maximum handled in Switch is 9990 bytes.\n" + "nJumboThreshLen :\n" + "\tThreshold length for Jumbo frames qualification in terms \n" + "\t\tof bytes (Bits 13:0).\n" + "bLongFrmChkDis :\n" + "\tLong frame length check-Enabled(Default),to disable set it true.\n" + + "eShortFrmChkType :\n" + "\tShort frame length check Type - default (Enabled for \n" + "\t 64 bytes without considering VLAN.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Short frame length check is disabled. \n" + "\t1: Short frame length check is enabled without considering VLAN Tags.\n" + "\t2: Short frame length check is enabled including VLAN Tags. \n" + "\t3: Reserved - Currently unused. \n" + "\n" + "bProcFlagsEgCfgEna :\n" + "\tEgress PMAC Config Table Selector - TrafficClass or Processing \n" + "\tFlags (MPE1, MPE22, DEC, ENC based).\n" + "\tThe default setting is Traffic Class based selector for Egress PMAC. \n" + "\n", + /* 150: GSW_PMAC_GLBL_CFG_GET */ + "Get the global PMAC settings currently configured on PMAC port\n" + "\n", + + +#if defined(CONFIG_LTQ_TEST) && CONFIG_LTQ_TEST + + /* 152: GSW_ROUTE_ENTRY_READ */ + "This command reads a Routing session config (pattern and action info)\n" + "for the given index. A routing session (pattern and action) can be added\n" + "using the command \ref GSW_ROUTE_ENTRY_ADD.\n" + "Parameter:\n----------\n" + "nRtIndex :\n" + "\tRouting Session Entry Index Value - returned in GSW_ROUTE_ENTRY_ADD operation" + "\n", + + /* 153: GSW_ROUTE_ENTRY_DELETE */ + "This command deletes an earlier added routing session of specified index\n" + "and pattern. It is must specify the index returned during creation.\n" + " The pattern part is only used for compairng with the pattern stored in index.\n" + "A routing rule and action of specified index can be read using \n" + "the command \ref GSW_ROUTE_ENTRY_READ. \n" + "\nParameter:\n----------\n" + "nRtIndex :\n" + "\tRouting Session Entry Index Value - returned in GSW_ROUTE_ENTRY_ADD operation" + "\n", + + /* 154: GSW_ROUTE_ENTRY_ADD */ + "This command adds a routing session of specified pattern and action.\n" + "The pattern part describes the parameters to identify an incoming packet session\n" + "to which the dedicated actions should be applied.Packets having the same pattern \n" + "field belongs to same session and applied to same action.\n" + "A routing rule and action can be read using the command \ref GSW_ROUTE_ENTRY_READ.\n" + "Routing Pattern Part.\n" + "\nParameter:\n----------\n" + "nHashVal :\n" + "\tRouting Session Entry Hash Value.\n" + "\n" + "nRtIndex :\n" + "\tRouting Session Entry Index Value\n" + "\n" + "bPrio :\n" + "\tIndicate it is a priority session.\n" + "\n" + "nFlags :\n" + "\tFlags to indicate special status E.g. - Swap done (1), Free (2),...\n" + "\n" + "routeEntry.pattern.eIpType :\n" + "\tThe session source/destination IPv4/v6 address seletion.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Routing Pattern for IP selection disabled.\n" + "\n" + "\t1: Routing Pattern for IPv4.\n" + "\n" + "\t2: Routing Pattern for IPv6.\n" + "\n" + "routeEntry.pattern.nSrcIP :\n" + "\tThe session source IPv4/v6 address used for hash computation. \n" + "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." + "\n" + "routeEntry.pattern.nDstIP :\n" + "\tThe session destination IPv4/v6 address for hash computation.\n" + "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." + "\n" + "routeEntry.pattern.nSrcPort :\n" + "\tTCP/UDP source port information\n" + "\n" + "routeEntry.pattern.nDstPort :\n" + "\tTCP/UDP destination port information\n" + "\n" + "routeEntry.pattern.nRoutExtId :\n" + "\tRouting extension Id from Flow Table action.\n" + "\n" + "routeEntry.pattern.bValid :\n" + "\tIndicate, if a particular routing entry is valid or not\n" + "\n" + + "Routing Action Part.\n\n" + + "routeEntry.action.nDstPortMap :\n" + "\tSession destination port map. LSB refers to Port 0.\n" + "\n" + "routeEntry.action.nDstSubIfId :\n" + "\tSession destination sub-interace Id. \n" + "\n" + + "routeEntry.action.eIpType :\n" + "\tSession new IP address type, IPv4/v6, address seletion.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Action for IP selection disabled.\n" + "\n" + "\t1: Routing action for IPv4.\n" + "\n" + "\t2: Routing action for IPv6.\n" + "\n" + "routeEntry.action.nNATIPaddr :\n" + "\tSession new IP address after NAT for eIPType. \n" + "\tSupported Formats: 10.1.1.1 or f0f3:0013:e0b5: ..." + "\n" + + "routeEntry.action.nTcpUdpPort :\n" + "\tSession new TCP/UDP port number. Used if eSessionRoutingMode is NAPT \n" + "\n" + "routeEntry.action.nMTUvalue :\n" + "\tSession MTU value. \n" + "\n" + "routeEntry.action.bMAC_SrcEnable :\n" + "\tSource MAC address used\n" + "\n" + "routeEntry.action.nSrcMAC :\n" + "\tSource MAC address\n" + "\tSupported Formats: 12:34:45:67:89:0A" + "\n" + "routeEntry.action.bMAC_DstEnable :\n" + "\tDestination MAC address used\n" + "\n" + "routeEntry.action.nDstMAC :\n" + "\tDestination MAC address\n" + "\tSupported Formats: 12:34:45:67:89:0A" + "\n" + "routeEntry.action.bPPPoEmode :\n" + "\tSession PPPoE mode\n" + "\t0:PPPoE Mode transparent, 1:PPPoE Mode Termination" + "\n" + "routeEntry.action.nPPPoESessId :\n" + "\tSession PPPoE Session Identifier used\n" + "\n" + "routeEntry.action.bTunnel_Enable :\n" + "\tTunnel used\n" + "\n" + "routeEntry.action.eTunType :\n" + "\tTunnel type/mode\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: GSW_ROUTE_TUNL_NULL. Session routing tunnel type is No Tunnel action.\n" + "\n" + "\t1: GSW_ROUTE_TUNL_6RD. Session routing tunnel type is 6rd.\n" + "\n" + "\t2: GSW_ROUTE_TUNL_DSLITE. Session routing tunnel type is DSlite\n" + "\n" + "\t3: GSW_ROUTE_TUNL_L2TP. Session routing tunnel type is L2TP.\n" + "\n" + "\t4: GSW_ROUTE_TUNL_IPSEC. Session routing tunnel type is IPsec.\n" + "\n" + "routeEntry.action.nTunnelIndex :\n" + "\tPreconfigured tunnel Index. The tunnel Index maps to Tunnel table.\n" + "\n" + "routeEntry.action.bMeterAssign :\n" + "\tMeterId assignment action. 0:Assignment disabled, 1:Assignment Enabled\n" + "\n" + "routeEntry.action.nMeterId :\n" + "\tMeter Id used for the session. The metering configuration can be done using\n" + "\tdiffernt switch api function. Meter index (zero-based counting).\n" + "\n" + "routeEntry.action.bRTPMeasEna :\n" + "\tRTP Multicast session's sequence number counter Action.\n" + "\tValue: 0:Assignment disabled, 1:Assignment Enabled\n" + "\n" + + "routeEntry.action.nRTPSeqNumber :\n" + "\tRTP sequence number for which the multicast packet will be counted.\n" + "\n" + "routeEntry.action.nRTPSessionPktCnt :\n" + "\tRTP packet Rolling Counter. R-O \n" + "\n" + "routeEntry.action.nFID :\n" + "\tSession FID. Value 0-63, Session FID is used for Egress VLAN action\n" + "\n" + "routeEntry.action.nFlowId :\n" + "\tFlow Id value. Value 0-255. Default value is 0.\n" + "\n" + "routeEntry.action.eOutDSCPAction :\n" + "\tOuter DSCP remarking action - Valid for Tunnel associated entries.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: GSW_ROUTE_OUT_DSCP_NULL. Session routing no outer DSCP remarking action.\n" + "\n" + "\t1: GSW_ROUTE_OUT_DSCP_INNER. Session routing outer DSCP from inner IP header.\n" + "\n" + "\t2: GSW_ROUTE_OUT_DSCP_SESSION. Session routing outer DSCP from session action table.\n" + "\n" + "\t3: GSW_ROUTE_OUT_DSCP_RES. Session routing outer DSCP action reserved.\n" + "\n" + "routeEntry.action.bInnerDSCPRemark :\n" + "\tSession routing inner DSCP remarking action.\n" + "\tValue: 0:No remarking., 1:remarking based on session.\n" + "\n" + "routeEntry.action.nDSCP :\n" + "\tDSCP remarking value for the session.\n" + "\n" + "routeEntry.action.bTCremarking :\n" + "\tRouting session traffic class remarking action..\n" + "\tValue: 0:No remarking. 1:TC remarking enabled.\n" + "\n" + "routeEntry.action.nTrafficClass :\n" + "\tTraffic class remarking value for the session.\n" + "\n" + "routeEntry.action.nSessionCtrs :\n" + "\tSession MIB Counters.\n" + "\n" + + "routeEntry.action.eSessDirection :\n" + "\tRouting Session Directions, LAN or WAN \n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: GSW_ROUTE_DIRECTION_DNSTREAM. Session is LAN egress i.e WAN Downstream.\n" + "\n" + "\t1: GSW_ROUTE_DIRECTION_UPSTREAM. Session is LAN ingress i.e. WAN Upstream session.\n" + "\n" + + "routeEntry.action.eSessRoutingMode :\n" + "\tSession routing action mode. Routing mode\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: GSW_ROUTE_MODE_NULL. Session routing type NULL ?? Bridge session.\n" + "\n" + "\t1: GSW_ROUTE_MODE_ROUTING. Session routing type plain routing.\n" + "\n" + "\t2: GSW_ROUTE_MODE_NAT. Session routing type is Src IP address NAT.\n" + "\n" + "\t3: GSW_ROUTE_MODE_NAPT. Session routing type is Src IP/Port NAT.\n" + "\n" + + "routeEntry.action.bTTLDecrement :\n" + "\tEnable TTL decrement for the session.\n" + "\tValue: 0:TTL decrement disabled, 1:TTL decrement enabled.\n" + "\n" + "routeEntry.action.bHitStatus :\n" + "\tSession hit Status - RW.\n" + "\n", + + /* 155: GSW_ROUTE_TUNNEL_ENTRY_READ */ + "This command reads the Tunnel values from the routing Tunnel table at a\n" + "given specified Tunnel Index. A Tunnel entry can be written\n" + "using the command \ref GSW_ROUTE_TUNNEL_ENTRY_ADD.\n" + "Parameter:\n----------\n" + "nTunIndex :\n" + "\tTunnel table entry index.\n" + "tunnelEntry.eTunnelType :\n" + "\tTunnel type enum for DSLite, 6RD, IPSec, L2TP .\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: GSW_ROUTE_TUNL_NULL. Session routing tunnel type is No Tunnel action.\n" + "\n" + "\t1: GSW_ROUTE_TUNL_6RD. Session routing tunnel type is 6rd.\n" + "\n" + "\t2: GSW_ROUTE_TUNL_DSLITE. Session routing tunnel type is DSlite\n" + "\n" + "\t3: GSW_ROUTE_TUNL_L2TP. Session routing tunnel type is L2TP.\n" + "\n" + "\t4: GSW_ROUTE_TUNL_IPSEC. Session routing tunnel type is IPsec.\n" + "\n" + "\n", + + /* 156: GSW_ROUTE_TUNNEL_ENTRY_DELETE */ + "This command deletes a specified Tunnel entry in the Routing Tunnel table.\n" + "The Tunnel entry can be read using the commnad \ref GSW_ROUTE_TUNNEL_ENTRY_READ.\n" + "Parameter:\n----------\n" + "nTunIndex :\n" + "\tTunnel table entry index.\n" + "tunnelEntry.eTunnelType :\n" + "\tTunnel type enum for DSLite, 6RD, IPSec, L2TP .\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: GSW_ROUTE_TUNL_NULL. Session routing tunnel type is No Tunnel action.\n" + "\n" + "\t1: GSW_ROUTE_TUNL_6RD. Session routing tunnel type is 6rd.\n" + "\n" + "\t2: GSW_ROUTE_TUNL_DSLITE. Session routing tunnel type is DSlite\n" + "\n" + "\t3: GSW_ROUTE_TUNL_L2TP. Session routing tunnel type is L2TP.\n" + "\n" + "\t4: GSW_ROUTE_TUNL_IPSEC. Session routing tunnel type is IPsec.\n" + "\n" + "tunnelEntry.t.tun6RD.nSrcIP4Addr :\n" + "\t6rd tunnel Source IPv4 address. 6rd tunnel interface - Outer IPv4\n" + "\tSupported Formats: 10.1.1.1 " + "\n" + "tunnelEntry.t.tun6RD.nDstIP4Addr :\n" + "\t6rd tunnel Dest IPv4 address. 6rd tunnel interface - Outer IPv4\n" + "\tSupported Formats: 10.1.1.1" + "\n" + "tunnelEntry.t.nTunL2TP :\n" + "\tL2TP tunnel configuration.\n" + "\n" + "tunnelEntry.t.nTunIPsec :\n" + "\tIPsec crypto context configuration..\n" + "\n" + "tunnelEntry.t.tunDSlite.nSrcIP6Addr :\n" + "\tDS-Lite tunnel Source IPv6 address. DSLite tunnel interface - Outer IPv6\n" + "\tSupported Formats: f0f3:0013:e0b5: ..." + "\n" + "tunnelEntry.t.tunDSlite.nDstIP6Addr :\n" + "\tDS-Lite tunnel Dest IPv6 address. DSLite tunnel interface - Outer IPv6.\n" + "\tSupported Formats: f0f3:0013:e0b5: ..." + "\n" + "\n", + + /* 157: GSW_ROUTE_TUNNEL_ENTRY_ADD */ + "This command adds a new Tunnel entry in the Routing Tunnel table.\n" + "The Tunnel entry can be read using the commnad GSW_ROUTE_TUNNEL_ENTRY_READ.\n" + "Parameter:\n----------\n" + "nTunIndex :\n" + "\tTunnel table entry index.\n" + "tunnelEntry.eTunnelType :\n" + "\tTunnel type enum for DSLite, 6RD, IPSec, L2TP .\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: GSW_ROUTE_TUNL_NULL. Session routing tunnel type is No Tunnel action.\n" + "\n" + "\t1: GSW_ROUTE_TUNL_6RD. Session routing tunnel type is 6rd.\n" + "\n" + "\t2: GSW_ROUTE_TUNL_DSLITE. Session routing tunnel type is DSlite\n" + "\n" + "\t3: GSW_ROUTE_TUNL_L2TP. Session routing tunnel type is L2TP.\n" + "\n" + "\t4: GSW_ROUTE_TUNL_IPSEC. Session routing tunnel type is IPsec.\n" + "\n" + + "tunnelEntry.t.tun6RD.nSrcIP4Addr :\n" + "\t6rd tunnel Source IPv4 address. 6rd tunnel interface - Outer IPv4\n" + "\tSupported Formats: 10.1.1.1 " + "\n" + + "tunnelEntry.t.tun6RD.nDstIP4Addr :\n" + "\t6rd tunnel Dest IPv4 address. 6rd tunnel interface - Outer IPv4\n" + "\tSupported Formats: 10.1.1.1" + "\n" + + "tunnelEntry.t.nTunL2TP :\n" + "\tL2TP tunnel configuration.\n" + "\n" + "tunnelEntry.t.nTunIPsec :\n" + "\tIPsec crypto context configuration..\n" + "\n" + + "tunnelEntry.t.tunDSlite.nSrcIP6Addr :\n" + "\tDS-Lite tunnel Source IPv6 address. DSLite tunnel interface - Outer IPv6\n" + "\tSupported Formats: f0f3:0013:e0b5: ..." + "\n" + + "tunnelEntry.t.tunDSlite.nDstIP6Addr :\n" + "\tDS-Lite tunnel Dest IPv6 address. DSLite tunnel interface - Outer IPv6.\n" + "\tSupported Formats: f0f3:0013:e0b5: ..." + "\n" + + "\n", + + /* 158: GSW_ROUTE_L2NAT_CFG_READ */ + "This command reads L2NAT configurations on specified egress port of PAE.\n" + "Parameter:\n----------\n" + "nEgPortId :\n" + "\tEgress Port Id.\n" + "\n", + + /* 159: GSW_ROUTE_L2NAT_CFG_WRITE */ + "This command configures L2NAT on egress port of PAE. When enabled the \n" + "Source MAC Address of traffic leaving specified egress port would be \n" + "NAT-ed with configrued MAC address. \n" + "Parameter:\n----------\n" + "bL2NATEna :\n" + "\tEnable L2NAT on this egress port of PAE\n" + "\n" + "nEgPortId :\n" + "\tEgress Port Id.\n" + "\n" + "nNatMAC :\n" + "\tNew source MAC address for L2NAT on this egress port\n" + "\tSupported Formats: 12:34:45:67:89:0A" + "\n", + + /* 160: GSW_ROUTE_SESSION_HIT_OP */ + "This command reads or reads-n-clears Hit-Status for high priority sessions. \n" + "Parameter:\n----------\n" + "nRtIndex :\n" + "\tRouting Session Index\n" + "\n" + "eHitOper :\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: GSW_ROUTE_HIT_READ. Session routing Hit Status Read Action \n" + "\n" + "\t1: GSW_ROUTE_HIT_CLEAR. Session routing Hit Status Clear Action\n" + "\n" + "\n", + + /* 161: GSW_ROUTE_SESSION_DEST_MOD */ + "This command modifies the destination of an existing Routing session. \n" + "Parameter:\n----------\n" + "nRtIdx :\n" + "\tSession Index \n" + "\n" + "nDstPortMap :\n" + "\tSession destination port map. LSB refers to Port 0.\n" + "\n" + "nDstSubIfId :\n" + "\tSession destination sub-interace Id.\n" + "\n" + "\n", +#endif + /* 162: GSW_CTP_PORT_ASSIGNMENT_SET"*/ + "GSW_CTP_PORT_ASSIGNMENT_SET\n" + "\tSupported Parameters:\n" + "\t---------------------\n\n" + "\t1. nLogicalPortId\n" + "\t2. nFirstCtpPortId\n" + "\t3. nNumberOfCtpPort\n" + "\t4. eMode\n", + /* 163: GSW_CTP_PORT_ASSIGNMENT_GET"*/ + "GSW_CTP_PORT_ASSIGNMENT_GET\n" + "\tSupported Parameters:\n" + "\t---------------------\n\n" + "\t1. nLogicalPortId\n", + /* 164: GSW_EXTENDEDVLAN_SET"*/ + "Set Extended VLAN Configuration entry. Valid for GSWIP-3.1\n" + "It is used to set Extended VLAN Configuration entry\n" + "Supported Parameters:\n" + "---------------------\n\n" + "nExtendedVlanBlockId\n" + "\tThis should be valid ID returned by GSW_EXTENDEDVLAN_ALLOC\n" + "\t If it is INVALID_HANDLE, GSW_EXTENDEDVLAN_config_t::nEntryIndex\n" + "\tis absolute index of Extended VLAN entry in hardware for debug purpose\n" + "\tbypassing any check\n" + "nEntryIndex\n" + "\t Index of entry\n" + "eOuterVlanFilterVlanType\n" + "\tIndex of entry, ranges between 0 and\n" + "\t SW_EXTENDEDVLAN_alloc_t::nNumberOfEntries - 1, to\n" + "\tGSW_EXTENDEDVLAN_SET) or get ref GSW_EXTENDEDVLAN_GET)\n" + "\tExtended VLAN Configuration entry. For debug purpose, this field could be\n" + "\tabsolute index of Entended VLAN entry in hardware, when\n" + "\tGSW_EXTENDEDVLAN_config_t::nExtendedVlanBlockId is\n" + "\tINVALID_HANDLE\n" + "** Filter for outer VLAN tag. *\n" + "-------------------------------\n" + "\teOuterVlanFilterVlanType\n" + "\t** Filter Type: normal filter, default rule, or no tag\n" + "\tSupported Values:\n" + "\t0: There is tag and criteria applies\n" + "\t1 There is tag but no criteria\n" + "\t2:Default entry if no other rule applies\n" + "\t3 There is no tag\n" + "\t4:Block invalid\n" + "\tbOuterVlanFilterPriorityEnable\n" + "\t** Enable priority field filtering *\n" + "\tnOuterVlanFilterPriorityVal\n" + "\t** Filter priority value if bPriorityEnable is TRUE.\n" + "\tbOuterVlanFilterVidEnable\n" + "\t** Enable VID filtering. *\n" + "\tnOuterVlanFilterVidVal\n" + "\t** Filter VID if bVidEnable is TRUE\n" + "\teOuterVlanFilterTpid\n" + "\t** Mode to filter TPID of VLAN tag \n" + "\t-------------------\n" + "\tSupported Values:\n" + "\t0: ** Do not filter. *\n" + "\t1 ** TPID is 0x8100. * \n" + "\t2:** TPID is global configured value. *\n" + "\teOuterVlanFilterDei\n" + "\t** Mode to filter DEI of VLAN tag\n" + "\t-------------------\n" + "\tSupported Values:\n" + "\t0: ** Do not filter. *\n" + "\t1 ** DEI is 0 \n" + "\t2:** DEI is 1 \n" + "** Filter for Inner VLAN tag. *\n" + "-------------------------------\n" + "\teInnerVlanFilterVlanType\n" + "\t** Filter Type: normal filter, default rule, or no tag\n" + "\tSupported Values:\n" + "\t0: There is tag and criteria applies\n" + "\t1 There is tag but no criteria\n" + "\t2:Default entry if no other rule applies\n" + "\t3 There is no tag\n" + "\t4:Block invalid\n" + "\tbInnerVlanFilterPriorityEnable\n" + "\t** Enable priority field filtering *\n" + "\tnInnerVlanFilterPriorityVal\n" + "\t** Filter priority value if bPriorityEnable is TRUE.\n" + "\tbInnerVlanFilterVidEnable\n" + "\t** Enable VID filtering. *\n" + "\tnInnerVlanFilterVidVal\n" + "\t** Filter VID if bVidEnable is TRUE\n" + "\teInnerVlanFilterTpid\n" + "\t** Mode to filter TPID of VLAN tag \n" + "\t-------------------\n" + "\tSupported Values:\n" + "\t0: ** Do not filter. *\n" + "\t1 ** TPID is 0x8100. * \n" + "\t2:** TPID is global configured value. *\n" + "\teInnerVlanFilterDei\n" + "\t** Mode to filter DEI of VLAN tag\n" + "\t-------------------\n" + "\tSupported Values:\n" + "\t0: ** Do not filter. *\n" + "\t1 ** DEI is 0 \n" + "\t2:** DEI is 1 \n" + "eEtherType\n" + "\t** Filter EtherType. *\n" + "\tSupported Values:\n" + "\t0: ** Do not filter. *\n" + "\t1: ** IPoE frame (Ethertyp is 0x0800)\n" + "\t2: ** PPPoE frame (Ethertyp is 0x8863 or 0x8864)\n" + "\t3: ** ARP frame (Ethertyp is 0x0806)\n" + "\t4: ** IPv6 IPoE frame (Ethertyp is 0x86DD)\n" + "eRemoveTagAction\n" + "\t** Number of VLAN tag(s) to remove. *\n" + "\tSupported Values:\n" + "\t0:** Do not remove VLAN tag. *\n" + "\t1:** Remove 1 VLAN tag following DA/SA. *\n" + "\t2:** Remove 2 VLAN tag following DA/SA. *\n" + "\t3:** Discard upstream traffic. *\n" + "bOuterVlanActionEnable\n" + "\t** Enable outer VLAN tag add/modification. *\n" + "Treatment for outer VLAN tag. *\n" + "\t-------------------\n" + "\teOuterVlanActionPriorityMode\n" + "\t** Select source of priority field of VLAN tag. *\n" + "\tSupported Values:\n" + "\t0 /** Set priority with given value. */\n" + "\t1 /** Prority value is copied from inner VLAN tag of received packet. */\n" + "\t2 /** Prority value is copied from outer VLAN tag of received packet. */\n" + "\t3 /** Prority value is derived from DSCP field of received packet. */\n" + "eOuterVlanActionPriorityVal\n" + "\t** If GSW_EXTENDEDVLAN_treatmentVlan_t::ePriorityMode is\n" + "\tGSW_EXTENDEDVLAN_TREATMENT_PRIORITY_VAL, use this value for\n" + "\tpriority field of VLAN tag. *\n" + "eOuterVlanActionVidMode\n" + "\t** Select source of VID field of VLAN tag. *\n" + "\tSupported Values:\n" + "\t0:/** Set VID with given value. */\n" + "\t1:/** VID is copied from inner VLAN tag of received packet. */\n" + "\t2:/** VID is copied from outer VLAN tag of received packet. */\n" + "eOuterVlanActionVidVal\n" + "\t** If GSW_EXTENDEDVLAN_treatmentVlan_t::eVidMode is\n" + "\tGSW_EXTENDEDVLAN_TREATMENT_VID_VAL, use this value for VID field\n" + "\tof VLAN tag\n" + "eOuterVlanActionTpid\n" + "\t/** Select source of TPID field of VLAN tag. */\n" + "\tSupported Values:\n" + "\t0:/** TPID is copied from inner VLAN tag of received packet. */\n" + "\t1:/** TPID is copied from outer VLAN tag of received packet. */\n" + "\t2:/** TPID is global configured value. */\n" + "\t3:/** TPID is 0x8100. */\n" + "eOuterVlanActioneDei\n" + "\t/** Select source of DEI field of VLAN tag. */\n" + "\t:Supported Values:\n" + "\t0:/** DEI (if applicable) is copied from inner VLAN tag of received packet. */\n" + "\t1:/** DEI (if applicable) is copied from outer VLAN tag of received packet. */\n" + "\t2:/** DEI is 0. */\n" + "\t3:/** DEI is 1. */\n" + "Treatment for inner VLAN tag. *\n" + "\t------------------ -\n" + "bInnerVlanActionEnable\n" + "\t/** Enable inner VLAN tag add/modification. */\n" + "eInnerVlanActionPriorityMode\n" + "\t **Select source of priority field of VLAN tag. *\n" + "\tSupported Values :\n" + "\t0 /** Set priority with given value. */\n" + "\t1 /** Prority value is copied from inner VLAN tag of received packet. */\n" + "\t2 /** Prority value is copied from outer VLAN tag of received packet. */\n" + "\t3 /** Prority value is derived from DSCP field of received packet. */\n" + "eInnerVlanActionPriorityVal\n" + "\t **If GSW_EXTENDEDVLAN_treatmentVlan_t::ePriorityMode is\n" + "\tGSW_EXTENDEDVLAN_TREATMENT_PRIORITY_VAL, use this value for \n" + "\tpriority field of VLAN tag. *\n" + "eInnerVlanActionVidMode\n" + "\t **Select source of VID field of VLAN tag. *\n" + "\tSupported Values :\n" + "\t0 :/** Set VID with given value. */\n" + "\t1 :/** VID is copied from inner VLAN tag of received packet. */\n" + "\t2 :/** VID is copied from outer VLAN tag of received packet. */\n" + "eInnerVlanActionVidVal\n" + "\t **If GSW_EXTENDEDVLAN_treatmentVlan_t::eVidMode is\n" + "\tGSW_EXTENDEDVLAN_TREATMENT_VID_VAL, use this value for VID field\n" + "\tof VLAN tag\n" + "eInnerVlanActionTpid\n" + "\t/** Select source of TPID field of VLAN tag. */\n" + "\tSupported Values :\n" + "\t0 :/** TPID is copied from inner VLAN tag of received packet. */\n" + "\t1 :/** TPID is copied from outer VLAN tag of received packet. */\n" + "\t2 :/** TPID is global configured value. */\n" + "\t3 :/** TPID is 0x8100. */\n" + "eInnerVlanActioneDei\n" + "\t/** Select source of DEI field of VLAN tag. */\n" + "\t :Supported Values :\n" + "\t0 :/** DEI (if applicable) is copied from inner VLAN tag of received packet. */\n" + "\t1 :/** DEI (if applicable) is copied from outer VLAN tag of received packet. */\n" + "\t2 :/** DEI is 0. */\n" + "\t3 :/** DEI is 1. */\n" + "bReassignBridgePortEnable\n" + "\t/** Enable re-assignment of bridge port. */\n" + "nNewBridgePortId\n" + "\t/** If bReassignBridgePort is TRUE, use this value for bridge port. */\n" + "bNewDscpEnable\n" + "\t/** Enable new DSCP. */\n" + "nNewDscp\n" + "\t/** If bNewDscpEnable is TRUE, use this value for DSCP. */\n" + "bNewTrafficClassEnable\n" + "\t/** Enable new traffic class. */\n" + "nNewTrafficClass\n" + "\t/** If bNewTrafficClassEnable is TRUE, use this value for traffic class. */\n" + "bNewMeterEnable\n" + "\t/** Enable new meter. */\n" + "sNewTrafficMeterId\n" + "\t/** New meter ID.\n" + "\tremarks\n" + "\tMeter should be allocated with ref GSW_QOS_METER_ALLOC before extended\n" + "\tVLAN treatment is added. If this extended VLAN treatment is deleted \n" + "\tthis meter should be released with ref GSW_QOS_METER_FREE. */\n" + "bLoopbackEnable\n" + "\t/** Enable loopback. */\n" + "bDaSaSwapEnable\n" + "\t/** Enable destination/source MAC address swap. */\n" + "bMirrorEnable\n" + "\t/** Enable traffic mirrored to the monitoring port. */\n" + "bDscp2PcpMapEnable\n" + "\t" + "nDscp2PcpMapValue\n" + "\t/** DSCP to PCP mapping, if\n" + "\tref GSW_EXTENDEDVLAN_treatmentVlan_t::ePriorityMode in\n" + "\tref GSW_EXTENDEDVLAN_treatment_t::sOuterVlan.ePriorityMode or\n" + "\tref GSW_EXTENDEDVLAN_treatment_t::sInnerVlan.ePriorityMode is\n" + "\tref GSW_EXTENDEDVLAN_TREATMENT_DSCP.\n" + "\tremarks\n" + "\tThe index of array stands for DSCP value. Each byte of the array is 3-bit\n" + "\tPCP value. For implementation, if DSCP2PCP is separate hardware table,\n" + "\ta resource management mechanism should be implemented. Allocation happens\n" + "\twhen extended VLAN treatment added, and release happens when the\n" + "\ttreatment is deleted. For debug, the DSCP2PCP table can be dumped with\n" + "\tref GSW_DSCP2PCP_MAP_GET. */\n", + /* 165: GSW_EXTENDEDVLAN_GET"*/ + "Get Extended VLAN Configuration entry. Valid for GSWIP-3.1.\n" + "It is used to get Extended VLAN Configuration entry with index\n" + "ref GSW_EXTENDEDVLAN_config_t::nEntryIndex, ranging between 0 and\n" + "ref GSW_EXTENDEDVLAN_alloc_t::nNumberOfEntries - 1, with valid\n" + "ref GSW_EXTENDEDVLAN_config_t::nExtendedVlanBlockId returned by\n" + "ref GSW_EXTENDEDVLAN_ALLOC.\n" + "If ref GSW_EXTENDEDVLAN_config_t::nExtendedVlanBlockId is\n" + "ref INVALID_HANDLE, this is absolute index of Extended VLAN Configuration\n" + "entry in hardware, used for debugging purpose.\n" + "Supported Parameters:\n" + "----------------------\n" + "nExtendedVlanBlockId\n" + "\tThis should be valid ID returned by GSW_EXTENDEDVLAN_ALLOC\n" + "\t If it is INVALID_HANDLE, GSW_EXTENDEDVLAN_config_t::nEntryIndex\n" + "\tis absolute index of Extended VLAN entry in hardware for debug purpose\n" + "\tbypassing any check\n" + "nEntryIndex\n" + "\t Index of entry\n", + /* 166: GSW_EXTENDEDVLAN_FREE"*/ + "Release Extended VLAN Configuration block. Valid for GSWIP-3.1.\n" + "It is used to release Extended VLAN Configuration block allocated by\n" + "ref GSW_EXTENDEDVLAN_ALLOC.\n" + "Supported Parameters:\n" + "----------------------\n" + "nExtendedVlanBlockId\n" + "\t/** Total number of extended VLAN entries are requested. Proper value should\n" + "\tbe given for ref GSW_EXTENDEDVLAN_ALLOC. This field is ignored for\n" + "\tref GSW_EXTENDEDVLAN_FREE. */\n", + /* 167: GSW_VLANFILTER_SET"*/ + "Set VLAN Filter entry. Valid for GSWIP-3.1./\n" + "It is used to set VLAN Filter entry with index/\n" + "ref GSW_VLANFILTER_config_t::nEntryIndex, ranging between 0 and/\n" + "ref GSW_VLANFILTER_alloc_t::nNumberOfEntries - 1, with valid/\n" + "ref GSW_VLANFILTER_config_t::nVlanFilterBlockId returned by/\n" + "ref GSW_VLANFILTER_ALLOC./\n" + "Ifref GSW_VLANFILTER_config_t::nVlanFilterBlockId is ref INVALID_HANDLE,/\n" + "this is absolute index of VLAN Filter entry in hardware, used for debugging/\n" + "purpose./\n" + "Supported Parameters:\n" + "----------------------\n" + "\tnVlanFilterBlockId\n" + "\t/** This should be valid ID return by ref GSW_VLANFILTER_ALLOC.\n" + "\tIf it is ref INVALID_HANDLE, ref GSW_VLANFILTER_config_t::nEntryIndex\n" + "\tis absolute index of VLAN Filter entry in hardware for debug purpose,\n" + "\tbypassing any check. */\n" + "\tnEntryIndex\n" + "\t/** Index of entry. ranges between 0 and\n" + "\tref GSW_VLANFILTER_alloc_t::nNumberOfEntries - 1, to\n" + "\tset (ref GSW_VLANFILTER_SET) or get (ref GSW_VLANFILTER_GET)\n" + "\tVLAN FIlter entry. For debug purpose, this field could be absolute index\n" + "\tof VLAN Filter entry in hardware, when\n" + "\tref GSW_VLANFILTER_config_t::nVlanFilterBlockId is\n" + "\tref INVALID_HANDLE. */\n" + "\teVlanFilterMask\n" + "\t/** VLAN TCI filter mask mode.\n" + "\tremarks\n" + "\tIn GSWIP-3.1, this field of first entry in the block will applies to rest\n" + "\tof entries in the same block. */\n" + "\t Supported values:\n" + "\t0:GSW_VLAN_FILTER_TCI_MASK_VID\n" + "\t1:GSW_VLAN_FILTER_TCI_MASK_PCP\n" + "\t2:GSW_VLAN_FILTER_TCI_MASK_TCI\n" + "\tnVal\n" + "\t/** This is value for VLAN filtering. It depends on\n" + "\tref GSW_VLANFILTER_config_t::eVlanFilterMask.\n" + "\tFor GSW_VLAN_FILTER_TCI_MASK_VID, this is 12-bit VLAN ID.\n" + "\tFor GSW_VLAN_FILTER_TCI_MASK_PCP, this is 3-bit PCP field of VLAN tag.\n" + "\tFor GSW_VLAN_FILTER_TCI_MASK_TCI, this is 16-bit TCI of VLAN tag. */\n" + "\tbDiscardMatched\n" + "\t/** Discard packet if match. */\n", + /* 168: GSW_VLANFILTER_GET"*/ + "Get VLAN Filter Entry. Valid for GSWIP-3.1..\n" + "It is used to get VLAN filter entry with index.\n" + "ref GSW_VLANFILTER_config_t::nEntryIndex, ranging between 0 and.\n" + "ref GSW_VLANFILTER_alloc_t::nNumberOfEntries - 1, with valid.\n" + "ref GSW_VLANFILTER_config_t::nVlanFilterBlockId returned by.\n" + "ref GSW_VLANFILTER_ALLOC..\n" + "If ref GSW_VLANFILTER_config_t::nVlanFilterBlockId is ref INVALID_HANDLE,.\n" + "this is absolute index of VLAN Filter entry in hardware, used for debugging.\n" + "purpose..\n" + "Supported Parameters:\n" + "----------------------\n" + "\tnVlanFilterBlockId\n" + "\t/** This should be valid ID return by ref GSW_VLANFILTER_ALLOC.\n" + "\tIf it is ref INVALID_HANDLE, ref GSW_VLANFILTER_config_t::nEntryIndex\n" + "\tis absolute index of VLAN Filter entry in hardware for debug purpose,\n" + "\tbypassing any check. */\n" + "\tnEntryIndex\n" + "\t/** Index of entry. ranges between 0 and\n" + "\tref GSW_VLANFILTER_alloc_t::nNumberOfEntries - 1, to\n" + "\tset (ref GSW_VLANFILTER_SET) or get (ref GSW_VLANFILTER_GET)\n" + "\tVLAN FIlter entry. For debug purpose, this field could be absolute index\n" + "\tof VLAN Filter entry in hardware, when\n" + "\tref GSW_VLANFILTER_config_t::nVlanFilterBlockId is\n" + "\tref INVALID_HANDLE. */\n", + /* 169: GSW_VLANFILTER_FREE"*/ + "Delete VLAN Filter Block. Valid for GSWIP-3.1.\n" + "It is used to release VLAN Filter block allocated by\n" + "ref GSW_VLANFILTER_ALLOC.\n" + "Supported Parameters:\n" + "----------------------\n" + "nVlanFilterBlockId\n" + "\t/** If ref GSW_VLANFILTER_ALLOC is successful, a valid ID will be returned\n" + "\tin this field. Otherwise, ref INVALID_HANDLE is returned in this field.\n" + "\tFor ref GSW_EXTENDEDVLAN_FREE, this field should be valid ID returned by\n" + "\tref GSW_VLANFILTER_ALLOC. */\n", + /* 170: GSW_BRIDGE_CONFIG_SET"*/ + "GSW_BRIDGE_CONFIG_SET\n" + "\tSupported Parameters:\n" + "\t---------------------\n\n" + "\t1. bForce\n" + "\t2. nBridgeId\n" + "\t3. bMacLearningLimitEnable\n" + "\t4. nMacLearningLimit\n" + "\t5. nMacLearningCount\n" + "\t6. nLearningDiscardEvent\n" + "\t7. eForwardBroadcast\n" + "\t8. eForwardUnknownMulticastIp\n" + "\t9. eForwardUnknownMulticastNonIp\n" + "\t10. eForwardUnknownUnicast\n" + "\t11. bBroadcastMeterEnable\n" + "\t12. nBroadcastMeterId\n" + "\t13. bMulticastMeterEnable\n" + "\t14. nMulticastMeterId\n" + "\t15. bUnknownMulticastIpMeterEnable\n" + "\t16. nUnknownMulticastIpMeterId\n" + "\t17. bUnknownMulticastNonIpMeterEnable\n" + "\t18. nUnknownMulticastNonIpMeterId\n" + "\t19. bUnknownUniCastMeterEnable\n" + "\t20. nUnknownUniCastMeterId\n", + /* 171: GSW_BRIDGE_CONFIG_GET"*/ + "GSW_BRIDGE_CONFIG_GET\n" + "\tSupported Parameters:\n" + "\t---------------------\n\n" + "\t1. nBridgeId\n", + /* 172: GSW_BRIDGE_FREE"*/ + "GSW_BRIDGE_FREE\n" + "\tSupported Parameters:\n" + "\t\t---------------------\n\n" + "\t1. nBridgeId\n", + /* 173: GSW_CTP_PORT_CONFIG_SET"*/ + "GSW_CTP_PORT_CONFIG_SET\n" + "\tSupported Parameters:\n" + "\t---------------------\n\n" + "\t1. bForce\n" + "\t2. nLogicalPortId\n" + "\t3. nSubIfIdGroup\n" + "\t4. nBridgePortId\n" + "\t5. bForcedTrafficClass\n" + "\t6. nDefaultTrafficClass\n" + "\t7. bIngressExtendedVlanEnable\n" + "\t8. nIngressExtendedVlanBlockId\n" + "\t9. bIngressExtendedVlanIgmpEnable\n" + "\t10. nIngressExtendedVlanBlockIdIgmp\n" + "\t11. bEgressExtendedVlanEnable\n" + "\t12. nEgressExtendedVlanBlockId\n" + "\t13. bEgressExtendedVlanIgmpEnable\n" + "\t14. nEgressExtendedVlanBlockIdIgmp\n" + "\t15. bIngressNto1VlanEnable\n" + "\t16. bEgressNto1VlanEnable\n" + "\t17. eIngressMarkingMode\n" + "\t18. eEgressMarkingMode\n" + "\t19. bEgressMarkingOverrideEnable\n" + "\t20. eEgressRemarkingMode\n" + "\t21. bIngressMeteringEnable\n" + "\t22. nIngressTrafficMeterId\n" + "\t23. bEgressMeteringEnable \n" + "\t24. nEgressTrafficMeterId \n" + "\t25. bBridgingBypass\n" + "\t26. nDestLogicalPortId\n" + "\t27. nDestSubIfIdGroup\n" + "\t28. bPmapperEnable\n" + "\t29. ePmapperMappingMode\n" + "\t30. nFirstFlowEntryIndex\n" + "\t31. nNumberOfFlowEntries\n" + "\t32. bIngressLoopbackEnable\n" + "\t33. bIngressDaSaSwapEnable\n" + "\t34. bEgressLoopbackEnable\n" + "\t35. bEgressDaSaSwapEnable\n" + "\t36. bIngressMirrorEnable\n" + "\t37. bEgressMirrorEnable\n", + /* 174: GSW_CTP_PORT_CONFIG_GET"*/ + "GSW_CTP_PORT_CONFIG_GET\n" + "\tSupported Parameters:\n" + "\t---------------------\n\n" + "\t2. nLogicalPortId\n" + "\t3. nSubIfIdGroup\n", + /* 175: GSW_CTP_PORT_CONFIG_RESET"*/ + "GSW_CTP_PORT_CONFIG_RESET\n" + "\tSupported Parameters:\n" + "\t---------------------\n\n" + "\t1. bForce\n" + "\t2. nLogicalPortId\n" + "\t3. nSubIfIdGroup\n", + /* 176: GSW_BRIDGE_PORT_CONFIG_SET"*/ + "GSW_BRIDGE_PORT_CONFIG_SET\n" + "\tSupported Parameters:\n" + "\t---------------------\n\n" + "\t1. bForce\n" + "\t2. nBridgePortId\n" + "\t3. nBridgeId\n" + "\t4. bIngressExtendedVlanEnable\n" + "\t5. nIngressExtendedVlanBlockId\n" + "\t6. bEgressExtendedVlanEnable\n" + "\t7. nEgressExtendedVlanBlockId\n" + "\t8. eIngressMarkingMode\n" + "\t9. eEgressRemarkingMode\n" + "\t10. bIngressMeteringEnable\n" + "\t11. nIngressTrafficMeterId\n" + "\t12. bEgressMeteringEnable\n" + "\t13. nEgressTrafficMeterId\n" + "\t14. bEgressBroadcastSubMeteringEnable\n" + "\t15. nEgressBroadcastSubMeteringId\n" + "\t16. bEgressMulticastSubMeteringEnable\n" + "\t17. nEgressMulticastSubMeteringId\n" + "\t18. bEgressUnknownMulticastIPSubMeteringEnable\n" + "\t19. nEgressUnknownMulticastIPSubMeteringId\n" + "\t20. bEgressUnknownMulticastNonIPSubMeteringEnable\n" + "\t21. nEgressUnknownMulticastNonIPSubMeteringId\n" + "\t22. bEgressUnknownUnicastSubMeteringEnable\n" + "\t23. nEgressUnknownUnicastSubMeteringId\n" + "\t24. nDestLogicalPortId\n" + "\t25. nDestSubIfIdGroup\n" + "\t26. bPmapperEnable\n" + "\t27. ePmapperMappingMode\n" + "\t28. bBridgePortMapEnable\n" + "\t\t Index\n" + "\t\t MapValue\n" + "\t29. bMcDestIpLookupDisable\n" + "\t30. bMcSrcIpLookupEnable\n" + "\t31. bDestMacLookupDisable\n" + "\t32. bSrcMacLearningDisable\n" + "\t33. bMacSpoofingDetectEnable\n" + "\t34. bPortLockEnable\n" + "\t35. bMacLearningLimitEnable\n" + "\t36. bIngressVlanFilterEnable\n" + "\t37. nIngressVlanFilterBlockId\n" + "\t38. bBypassEgressVlanFilter1\n" + "\t39. bEgressVlanFilter1Enable\n" + "\t40. nEgressVlanFilter1BlockId\n" + "\t41. bEgressVlanFilter2Enable\n" + "\t42. nEgressVlanFilter2BlockId\n", + /* 177: GSW_BRIDGE_PORT_CONFIG_GET"*/ + "GSW_BRIDGE_PORT_CONFIG_GET\n" + "\tSupported Parameters:\n" + "\t\t---------------------\n\n" + "\t1. nBridgePortId\n", + /* 178: GSW_BRIDGE_PORT_ALLOC"*/ + "GSW_BRIDGE_PORT_ALLOC\n" + "\tSupported Parameters:\n" + "\t\t---------------------\n\n" + "\t1. No Parameters needed\n", + /* 179: GSW_BRIDGE_PORT_FREE"*/ + "GSW_BRIDGE_PORT_FREE\n" + "\tSupported Parameters:\n" + "\t\t---------------------\n\n" + "\t1. nBridgePortId\n", + /* 180: GSW_EXTENDEDVLAN_ALLOC"*/ + "GSW_EXTENDEDVLAN_ALLO\nC", + /* 181: GSW_VLANFILTER_ALLOC"*/ + "GSW_VLANFILTER_ALLOC\n", + /* 182: GSW_BRIDGE_ALLOC"*/ + "GSW_BRIDGE_ALLOC\n" + "\tSupported Parameters:\n" + "\t\t---------------------\n\n" + "\t1. No Parameters needed\n", + /* 183: GSW_PMAC_RMON_GET"*/ + "GSW_PMAC_RMON_GET\n", + /* 184: GSW_DEBUG_CTPTABLE_STATUS"*/ + "GSW_DEBUG_CTPTABLE_STATUS\n" + "\tSupported Parameters:\n" + "\t\t---------------------\n\n" + "\t1. Index\n" + "\t2. CheckAll (0 or 1)\n", + /* 185: GSW_DEBUG_BRDGPORTTABLE_STATUS"*/ + "GSW_DEBUG_BRDGPORTTABLE_STATUS\n" + "\tSupported Parameters:\n" + "\t\t---------------------\n\n" + "\t1. Index\n" + "\t2. CheckAll (0 or 1)\n", + /* 186: GSW_DEBUG_BRDGTABLE_STATUS"*/ + "GSW_DEBUG_BRDGTABLE_STATUS\n" + "\t\t---------------------\n\n" + "\t1. Index\n", + /* 187: GSW_DEBUG_EXVLANTABLE_STATUS"*/ + "GSW_DEBUG_EXVLANTABLE_STATUS\n", + /* 188: GSW_PMAC_RMON_GET"*/ + "GSW_DEBUG_VLANFILTERTABLE_STATUS\n", + /* 189: GSW_DEBUG_VLANFILTERTABLE_STATUS"*/ + "GSW_DEBUG_METERTABLE_STATUS\n", + /* 190: GSW_DEBUG_DSCP2PCPTABLE_STATUS"*/ + "GSW_DEBUG_DSCP2PCPTABLE_STATUS\n", + /* 191: GSW_DEBUG_PMAPPER_STATUS"*/ + "GSW_DEBUG_PMAPPER_STATUS\n", + /* 192: GSW_DEBUG_PMAC_EG"*/ + "GSW_DEBUG_PMAC_EG\n", + /* 193: GSW_DEBUG_PMAC_IG"*/ + "GSW_DEBUG_PMAC_IG\n", + /* 194: GSW_DEBUG_PMAC_BP"*/ + "GSW_DEBUG_PMAC_IG\n", + /* 195: GSW_DEBUG_DEF_QMAP"*/ + "GSW_DEBUG_DEF_QMAP\n", + /* 196: GSW_DEBUG_DEF_BYP_QMAP"*/ + "GSW_DEBUG_DEF_BYP_QMAP\n", + /* 197: xgmac"*/ + "GSW_XGMAC_CFG\n", + /* 198: GSW_PMAC_BM_CFG_SET */ + "Configure the backpressure mapping table between Tx Queues for Egress and Rx Queues \n" + "for Ingress congestion on given DMA channel. \n" + "\nParameter:\n----------\n" + "nTxDmaChanId :\n" + "\tTx DMA Channel Identifier (0..15). \n" + "txQMask :\n" + "\tTransmit Queues Mask - Upto 32 Egress Queues. \n" + "rxPortMask :\n" + "\tReceive (Ingress) ports congestion Mask - Upto 16 ports. \n" + "\n", + + /* 199: GSW_PMAC_EG_CFG_SET */ + "Configure the egress attributes on given PMAC ports. \n" + "\nParameter:\n----------\n" + "nDestPortId :\n" + "\tDestination Port Identifier (0..15) - Part of Table Index (Bits 0-3). \n" + "bProcFlagsSelect :\n" + "\tSelector for Processing Flags (MPE1, MPE2, DEC & ENC bits). If disabled, \n" + "\tthen the combination of flags bDecFlag, bEncFlag, bMpe1Flag and bMpe2Flag\n" + "\t are considered as index instead of nTrafficClass. For using these \n" + "\tcombination flags, turn ON this boolean selector.\n" + "\tTC or combination processing flag is decided at global \n" + "\tlevel through bProcFlagsEgPMACEna.\n" + "\tIt is expected that user always passes correct value based \n" + "\tupon bProcFlagsEgMPACEna. If mismatch found with global PMAC mode,\n" + "\t SWAPI will return error code.\n" + "nTrafficClass :\n" + "\tTraffic Class value [Lower 4 -bits (LSB-0, 1, 2, 3)].- Part of Table Index Bits 4-7.\n" + "\tThis value is considered, only when bProcFlagsSelect is not set.\n" + "nFlowIDMsb :\n" + "\tFlow-ID MSB (2-bits) value - valid range (0..2). - Part of Table Index Bits 8-9.\n" + "bMpe1Flag :\n" + "\tMPE-1 Flag value - Part of Table Index Bit 4. Valid only when bProcFlagsSelect is set\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: MPE-1 Marked Flag disabled.\n" + "\n" + "\t1: MPE-1 Marked Flag Enabled.\n" + "bMpe2Flag :\n" + "\tMPE-2 Flag value - Part of Table Index Bit 5. Valid only when bProcFlagsSelect is set.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: MPE-2 Marked Flag disabled.\n" + "\n" + "\t1: MPE-2 Marked Flag Enabled.\n" + "bEncFlag :\n" + "\tCryptography Encryption Action Flag value - Part of Table Index Bit 7.\n" + "\t Valid only, when bProcFlagsSelect is set\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Cryptography Encryption Action Flag disabled.\n" + "\n" + "\t1: Cryptography Encryption Action Flag Enabled.\n" + "bDecFlag :\n" + "\tCryptography Decryption Action Flag value - Part of Table Index Bit 6.\n" + "\t Valid only, when bProcFlagsSelect is set.\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Cryptography Decryption Action Flag disabled.\n" + "\n" + "\t1: Cryptography Decryption Action Flag Enabled.\n" + "nRxDmaChanId :\n" + "\tReceive DMA Channel Identifier (0..15) \n" + "bRemL2Hdr :\n" + "\t To remove L2 header & additional bytes (True) or Not (False) \n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: L2 header is not removed.\n" + "\n" + "\t1: L2 Header and byte after L2 header is removed.\n" + "numBytesRem :\n" + "\tNo. of bytes to be removed after Layer-2 Header, valid when bRemL2Hdr is set. \n" + "bFcsEna :\n" + "\tPacket has FCS (True) or Not (False). \n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: The packet has no FCS.\n" + "\n" + "\t1: The packet has FCS.\n" + "bPmacEna :\n" + "\tPacket has PMAC header or not. \n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: The packet has no PMAC header.\n" + "\n" + "\t1: The packet has PMAC header.\n" + "nResDW1 :\n" + "\t4-bits Reserved Field in DMA Descriptor - DW1 (bit 7 to 4). \n" + "nRes1DW0 :\n" + "\t3-bits Reserved Field in DMA Descriptor - DW0 (bit 31 to 29). \n" + "nRes2DW0 :\n" + "\t2-bits Reserved Field in DMA Descriptor - DW0 (bit 14 to 13). \n" + "\n", + + /* 200: GSW_PMAC_IG_CFG_SET */ + "Read egress attributes config on given PMAC port. \n" + "\nParameter:\n----------\n" + "nTxDmaChanId :\n" + "\tTx DMA Channel Identifier (0..15). \n" + "bErrPktsDisc :\n" + "\tError set packets to be discarded .\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Do not discard packet with error flag set\n" + "\n" + "\t1: discard packet with error flag set.\n" + "\n" + "bPmapDefault :\n" + "\tPort Map info from default PMAC header (True) or incoming PMAC header (False).\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: PMAP from PMAC header.\n" + "\n" + "\t1: PMAP from default PMAC header.\n" + "\n" + "bPmapEna :\n" + "\tPort Map Enable info from default PMAC header (True) or incoming PMAC header (False).\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: PMAP Enable from PMAC header.\n" + "\n" + "\t1: PMAP Enable from default PMAC header.\n" + "\n" + "bClassDefault :\n" + "\tClass Info from default PMAC header (True) or incoming PMAC header (False).\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Class from Packet descriptor.\n" + "\n" + "\t1: Class from from default PMAC header.\n" + "\n" + "bClassEna :\n" + "\tClass Enable info from default PMAC header (True) or incoming PMAC header (False).\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: Class Enable from Packet descriptor.\n" + "\n" + "\t1: Class Enable from default PMAC header.\n" + "\n" + "bSubIdDefault :\n" + "\tSub_Interface Id Info from default PMAC header (True) or source \n" + " sub-If in packet descriptor (False).\n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: SubID from Packet descriptor source SubInterface ID.\n" + "\n" + "\t1: SubId from default PMAC header.\n" + "\n" + "bSpIdDefault :\n" + "\tSource Port Id from default PMAC header (True) or incoming PMAC header (False) \n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: SubID from PMAC header.\n" + "\n" + "\t1: SPPID from default PMAC header.\n" + "\n" + "bPmacPresent :\n" + "\tPacket PMAC header is present (True) or not (False) \n" + "\tSupported Values:\n" + "\t-----------------\n" + "\t0: The packet has no PMAC header.\n" + "\n" + "\t1: The packet has PMAC header.\n" + "\n" + "defPmacHdr :\n" + "\tDefault PMAC header - 8 Bytes Configuration .\n" + "\tSupported Formats: 12:34:45:67:89:0A:0B:0C" + "\n", + /* 201: GSW_DEBUG_CTP_STATISTICS"*/ + "GSW_DEBUG_CTP_STATISTICS\n" + "\tSupported Parameters:\n" + "\t\t---------------------\n\n" + "\t1. Index\n", + /* 202: GSW_DEBUG_LP_STATISTICS"*/ + "GSW_DEBUG_LP_STATISTICS\n" + "\tSupported Parameters:\n" + "\t\t---------------------\n\n" + "\t1. Index\n", + /* 203: GSWSS "*/ + "GSW_GSWSS_CFG", + /* 204: LMAC "*/ + "GSW_LMAC_CFG", + /* 205: GSW_CTP_PORT_ASSIGNMENT_ALLOC "*/ + "GSW_CTP_PORT_ASSIGNMENT_ALLOC\n" + "\tSupported Parameters:\n" + "\t---------------------\n\n" + "\t1. nLogicalPortId\n" + "\t2. nNumberOfCtpPort\n" + "\t3. eMode\n" + "\t4. nBridgePortId\n", + /* 206: GSW_CTP_PORT_ASSIGNMENT_FREE "*/ + "GSW_CTP_PORT_ASSIGNMENT_FREE" + "\tSupported Parameters:\n" + "\t---------------------\n\n" + "\t1. nLogicalPortId\n", + /* 207: MACSEC "*/ + "E160_MACSEC_CFG", + /* 208: GSW_IRQ_REGISTER "*/ + "GSW_IRQ_REGISTER", + + /* 209: GSW_IRQ_UNREGISTER "*/ + "GSW_IRQ_UNREGISTER", + + /* 210: GSW_IRQ_ENABLE "*/ + "GSW_IRQ_ENABLE", + + /* 211: GSW_IRQ_DISBALE "*/ + "GSW_IRQ_DISBALE", + + /* 212: GSW_DEBUG_PRINT_PCEIRQ_LIST "*/ + "GSW_DEBUG_PRINT_PCEIRQ_LIST", + /* 213: GSW_RMON_FLOW_GET "*/ + "GSW_RMON_FLOW_GET", + /* 214: GSW_RMON_TFLOW_CLEAR "*/ + "GSW_RMON_TFLOW_CLEAR", + /* 215: GSW_DSCP2PCP_MAP_GET "*/ + "GSW_DSCP2PCP_MAP_GET", + /* 216: GSW_DEFAUL_MAC_FILTER_GET "*/ + "GSW_DEFAUL_MAC_FILTER_GET", + /* 217: GSW_DEFAUL_MAC_FILTER_SET "*/ + "GSW_DEFAUL_MAC_FILTER_SET", + /* 218: GSW_QOS_COLOR_MARKING_TABLE_SET "*/ + "GSW_QOS_COLOR_MARKING_TABLE_SET", + /* 219: GSW_QOS_COLOR_MARKING_TABLE_GET "*/ + "GSW_QOS_COLOR_MARKING_TABLE_GET", + /* 220: GSW_QOS_COLOR_REMARKING_TABLE_GET "*/ + "GSW_QOS_COLOR_REMARKING_TABLE_GET", + /* 221: GSW_QOS_COLOR_REMARKING_TABLE_SET "*/ + "GSW_QOS_COLOR_REMARKING_TABLE_SET", + /* 222: GSW_DEBUG_RMON_PORT_GET "*/ + "Read out the Ethernet port statistic counter (RMON counter). The zero-based\n" + "'nPortId' structure element describes the logical/ctp/bridge switch port for the\n" + "requested statistic information. - NOTE : used by test team and automation only\n" + "\nParameter:\n----------\n" + "nPortId :\n" + "ePortType : \n", + /* 223: GSW_CTP_PORT_RMON_GET "*/ + "Read out the Ethernet port statistic counter (RMON counter). The zero-based\n" + "'nPortId' structure element describes the CTP switch port for the\n" + "requested statistic information.\n" + "\nParameter:\n----------\n" + "nPortId :\n", + /* 224: GSW_BRIDGE_PORT_RMON_GET "*/ + "Read out the Ethernet port statistic counter (RMON counter). The zero-based\n" + "'nPortId' structure element describes the Bridge switch port for the\n" + "requested statistic information.\n" + "\nParameter:\n----------\n" + "nPortId :\n", + /* 225: GSW_CTP_PORT_PCEBYPASS_RMON_GET "*/ + "Read out the Ethernet port statistic counter (RMON counter). The zero-based\n" + "'nPortId' structure element describes the CTP Bypass switch port for the\n" + "requested statistic information.\n" + "\nParameter:\n----------\n" + "nPortId :\n", + /* 226: GSW_RMON_PORT_GET_ALL "*/ + "Read out the Ethernet port statistic counter (RMON counter from nPortId 0 t0 8 - ctp or bridge. The zero-based\n" + "\nParameter:\n----------\n" + "ePortType :\n", + + /* 227: GSW_PBB_TUNNEL_TEMPLATE_ALLOC "*/ + "GSW_PBB_TUNNEL_TEMPLATE_ALLOC", + /* 228: GSW_PBB_TUNNEL_TEMPLATE_FREE "*/ + "GSW_PBB_TUNNEL_TEMPLATE_FREE", + /* 229: GSW_PBB_TUNNEL_TEMPLATE_SET "*/ + "GSW_PBB_TUNNEL_TEMPLATE_SET", + /* 230: GSW_PBB_TUNNEL_TEMPLATE_GET "*/ + "GSW_PBB_TUNNEL_TEMPLATE_GET", + + /* 231: GSW_DEBUG_TUNNELTEMP_STATUS "*/ + "GSW_DEBUG_TUNNELTEMP_STATUS", + /* 232: GSW_PMACBR_CLI "*/ + "GSW_PMACBR_CLI", + + /* 233: GSW_LPID_TO_GPID_ASSIGNMENT_SET "*/ + "GSW_LPID_TO_GPID_ASSIGNMENT_SET", + /* 234: GSW_LPID_TO_GPID_ASSIGNMENT_GET "*/ + "GSW_LPID_TO_GPID_ASSIGNMENT_GET", + /* 235: GSW_GPID_TO_LPID_ASSIGNMENT_SET "*/ + "GSW_GPID_TO_LPID_ASSIGNMENT_SET", + /* 236: GSW_GPID_TO_LPID_ASSIGNMENT_GET "*/ + "GSW_GPID_TO_LPID_ASSIGNMENT_GET", + /* 237: DUMP_MEM "*/ + "GSW_DUMP_MEM", + /* 238: GSW_DEFAUL_PCE_QMAP_GET "*/ + "Read out the default PCE Q-MAP" + "\nParameter:\n----------\n" + "nPortId :\n", + /* 239: GSW_DEFAUL_PCE_BYPASS_QMAP_GET "*/ + "Read out the default PCE Bypass Q-MAP" + "\nParameter:\n----------\n" + "nPortId :\n", + /* 240: GSW_IG_CFG_PMAC_GET "*/ + "Read out the default PCE Bypass Q-MAP" + "\nParameter:\n----------\n" + "nPortId :\n" + "nTxDmaChanId :\n", + /* 241: GSW_DEBUG_PMAC_RMON_GET_ALL "*/ + "\nParameter:\n----------\n" + "ePortType :\n" + "Start :\n" + "End \n", + NULL +}; + +//#endif /* SWITCHAPI_HELP_TEXT */ diff --git a/src/gsw_tbl.h b/src/gsw_tbl.h old mode 100644 new mode 100755 index bd94201d029197678b71580bdda61af63eb8b79d..c46e8d6f91cbfa1965116c96b1eac7d357e356ce --- a/src/gsw_tbl.h +++ b/src/gsw_tbl.h @@ -17,6 +17,8 @@ #endif extern const GSW_CommandTable_t cmdTable[]; +extern const GSW_CommandTable_t cmdTableMacsec[]; + //#ifdef SWITCHAPI_HELP_TEXT extern const char *HelpText[]; diff --git a/src/ltq_cli_dump_call.c b/src/ltq_cli_dump_call.c old mode 100644 new mode 100755 diff --git a/src/ltq_cli_lib.c b/src/ltq_cli_lib.c old mode 100644 new mode 100755 index dd38f0768aececbbecf5e154aaeb34c9e45e157c..f35ca4077d7341d33b5fc5c074217d2b367658cd --- a/src/ltq_cli_lib.c +++ b/src/ltq_cli_lib.c @@ -19,7 +19,7 @@ #endif #if ! defined (CLI_DUMP_CALL) && ! defined (IOCTL_PCTOOL) -int cli_ioctl(int fd, unsigned long int request, void *par) +int cli_ioctl(void *fd, unsigned long int request, void *par) { return ioctl(fd, request, par); } @@ -31,7 +31,7 @@ int cli_ioctl(GSW_API_HANDLE fd, u32 request, void *par) { /*For PC_tool Handle is stored as global variable*/ fd = sdev; - return gsw_api_kioctl(fd, request, (unsigned int)par); + return gsw_api_kioctl(fd, request, par); } #endif @@ -339,13 +339,13 @@ int checkValidIPv6_Address(unsigned short *ip) void printIPv6_Address(unsigned short *ip) { - printf("%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X", + printf("%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X |", ip[0], ip[1], ip[2], ip[3], ip[4], ip[5], ip[6], ip[7]); } void printIPv4_Address(unsigned int ip) { - char buffer[20]; + char buffer[25]; sprintf(buffer, "%03d.%03d.%03d.%03d", (ip >> 24) & 0xFF, @@ -353,7 +353,7 @@ void printIPv4_Address(unsigned int ip) (ip >> 8) & 0xFF, ip & 0xFF); - printf("%15s", buffer); + printf(" %15s |", buffer); } void printHex32Value(char *name, unsigned int value, unsigned int bitmapIndicator) diff --git a/src/ltq_cli_lib.h b/src/ltq_cli_lib.h old mode 100644 new mode 100755 index bd65c463c50b40930f238454eb0077491408d3fa..0c8972d081d0554ca61d2ab17156ccc3ecad406c --- a/src/ltq_cli_lib.h +++ b/src/ltq_cli_lib.h @@ -38,8 +38,10 @@ FILE *get_fp(void); #endif #else +#include <linux/types.h> +#include <asm/byteorder.h> #include <lantiq_gsw_api.h> -int cli_ioctl(int fd, unsigned long int request, void *par); +int cli_ioctl(void *fd, unsigned long int request, void *par); #endif diff --git a/src/swapi_cli.c b/src/swapi_cli.c old mode 100644 new mode 100755 index 0342e69fc5c8a6e00a655f622b2356afde5d812e..cb882f186bb8e028049d575cd8181884dda910e6 --- a/src/swapi_cli.c +++ b/src/swapi_cli.c @@ -115,7 +115,8 @@ static void find_sub_string(char *strfind) if (Flag) { printf("\n\nThe Above List are the Related Commands for the String which you have entered:\n"); printf("For detail command Usage help:\n"); - printf("switch_cli <Command> help\n\n"); + printf("Usage: switch_cli <Command> <Arg1> <Arg2> ...\n"); + printf("Getting command help text: switch_cli <Command> --help\n"); } } @@ -167,6 +168,295 @@ static void findCommandName(int argc, char *argv[]) } } +#ifdef MACSEC +static void find_sub_string_Macsec(char *strfind) +{ + char *p1, *p2, *p3; + unsigned int i = 0, j = 0, k = 0, count = 0, + Flag = 0, Index = 0; + + for (k = 0; cmdTableMacsec[k].Name != NULL ; k++) { + p1 = cmdTableMacsec[k].Name; + p2 = strfind; + count = 0; + + for (i = 0; i < strlen(cmdTableMacsec[k].Name); i++) { + if (t_olower(*p1) == t_olower(*p2)) { + p3 = p1; + + for (j = 0; j < strlen(strfind); j++) { + if (t_olower(*p3) == t_olower(*p2)) { + p3++; + p2++; + } else + break; + } + + p2 = strfind; + + if (j == strlen(strfind)) { + count++; + + if (count == 1) { + Flag = 1; + Index++; + printf("%d. %s\n", Index, cmdTableMacsec[k].Name); + } + } + } + + p1++; + } + } + + if (Flag) { + printf("\n\nThe Above List are the Related Commands for the String which you have entered:\n"); + printf("For detail command Usage help:\n"); + printf("switch_cli <Command> help\n\n"); + } +} + +static int find_string_Macsec(char *matchthis, unsigned int *Index) +{ + int i, match_found = 1, j; + + for (j = 0; cmdTableMacsec[j].Name != NULL ; j++) { + match_found = 1; + + for (i = 0; cmdTableMacsec[j].Name[i] != '\0'; i++) { + if (t_olower(cmdTableMacsec[j].Name[i]) != t_olower(matchthis[i])) { + match_found = 0; + break; + } + + if (t_olower(matchthis[i]) == '\0') + break; + } + + if (match_found) { + *Index = j; + printf("%s\n", cmdTableMacsec[j].Name); + return 1; + } + } + + return 0; +} + +/* find the command within the programm arguments and return the string to + the global command table. */ +static void findCommandNameMacsec(int argc, char *argv[]) +{ + int i; +// static char * const prefix = "GSW_"; + unsigned int Index = 0; + + /* search for all programm parameter for a command name */ + for (i = 0; i < argc; i++) { + /* search for all supported commands */ + if (!find_string_Macsec(argv[i], &Index)) { + find_sub_string_Macsec(argv[i]); + } else { + pCmdTable = &cmdTableMacsec[Index]; + cmdTableIdx = Index; + return; + } + } +} + +#endif +static void display_options(void) +{ + printf("\n"); + printf("1. RMON Operation \n"); + printf("2. MAC Operations \n"); + printf("3. VLAN Operation \n"); + printf("4. Extended VLAN Operations \n"); + printf("5. VLAN Filter Operations \n"); + printf("6. Bridge Port and Bridge Operations \n"); + printf("7. PCE Operations \n"); + printf("8. QOS Operations \n"); + printf("9. 8021x Operations \n"); + printf("10. Multicast Operations \n"); + printf("11. Trunking Operations \n"); + printf("12. WOL Operations \n"); + printf("13. MonitorPort Operations \n"); + printf("14. PMAC Operations \n"); + printf("15. PAE Operation \n"); + printf("16. MDIO Operation \n"); + printf("17. MMD operations \n"); + printf("18. MAC Filter Operation \n"); + printf("19. Debug Operation \n"); + printf("20. Xgmac Operation \n"); + printf("21. Display All Switch Operation \n"); + printf("\nEnter the option (1 to 21) to continue : \n"); +} + +static void display_alert(void) +{ + printf("\n############# ALERT #############\n\n"); + printf("Switch HW version : 0x%x\n", gswip_version); + printf("NOTE : The above Switch CLI commands are not supported for this Switch HW version\n"); + printf("\n############# ALERT #############\n"); + +} + +static int findHelpMain(int *argc, char *argv[]) +{ + int ret; + int option = 0 ; + + if ((argv[1] == NULL) || + + (strcmp(argv[1], "help") == 0) || + (strcmp(argv[1], "-help") == 0) || + (strcmp(argv[1], "--help") == 0) + + ) { + + printf("\n***** Switch CLI Help Menu *****\n\n"); + printf("Please select any of the below Switch Feature Operations,to display the related Switch CLI Commands\n"); + display_options(); + scanf("%d", &option); + printf("\n\n"); + + switch (option) { + case 1: + find_sub_string("RMON"); + break; + + case 2: + find_sub_string("MAC"); + break; + + case 3: + find_sub_string("_VLAN_"); + + if (gswip_version == GSWIP_3_1) { + display_alert(); + printf("\nFor this Switch HW version use : Extended Vlan and Vlan Filter Switch CLI commands\n\n"); + } + + break; + + case 4: + find_sub_string("ExtendedVlan"); + + if (gswip_version != GSWIP_3_1) + display_alert(); + + break; + + case 5: + find_sub_string("VLANFilter"); + + if (gswip_version != GSWIP_3_1) + display_alert(); + + break; + + case 6: + find_sub_string("Bridge"); + + if (gswip_version != GSWIP_3_1) + display_alert(); + + break; + + case 7: + find_sub_string("PCE"); + break; + + case 8: + find_sub_string("QOS"); + break; + + case 9: + find_sub_string("8021x"); + break; + + case 10: + find_sub_string("Multicast"); + break; + + case 11: + find_sub_string("Trunking"); + break; + + case 12: + find_sub_string("WOL"); + break; + + case 13: + find_sub_string("MonitorPort"); + break; + + case 14: + find_sub_string("PMAC"); + break; + + case 15: + find_sub_string("ROUTE"); + + if (gswip_version == GSWIP_3_1) + display_alert(); + + break; + + case 16: + find_sub_string("MDIO"); + + if (gswip_version == GSWIP_3_1) + display_alert(); + + break; + + case 17: + find_sub_string("MMD"); + + if (gswip_version == GSWIP_3_1) + display_alert(); + + break; + + case 18: + find_sub_string("MAC_Filter"); + + if (gswip_version != GSWIP_3_1) + display_alert(); + + break; + + case 19: + find_sub_string("Debug"); + + if (gswip_version != GSWIP_3_1) + display_alert(); + + break; + + case 20: + argv[1] = "xgmac"; + argv[2] = "-help"; + *argc = 3; + return 0; + + case 21: + find_sub_string("GSW"); + break; + + default : + find_sub_string("GSW"); + break; + } + + ret = 1; + } else { + ret = 0; + } + + return ret; +} /* search all program arguments for a help request. Return unequal zero in case a help request is found. Otherwise return zero */ @@ -181,6 +471,11 @@ static void findHelpText(int argc, char *argv[]) return; } + if (strcmp(argv[i], "-help") == 0) { + bHelpText = 1; + return; + } + if (strcmp(argv[i], "--help") == 0) { bHelpText = 1; return; @@ -190,7 +485,7 @@ static void findHelpText(int argc, char *argv[]) return; } -static int gswip_version_get(int fd) +static int gswip_version_get(void *fd) { GSW_register_t param; memset(¶m, 0, sizeof(GSW_register_t)); @@ -214,19 +509,75 @@ int main(int argc, char *argv[]) { #endif command_fkt pFkt; - int ret, fd, cnt; + int ret, fd, cnt, i = 0; int devIdx = 0; + #ifndef CLI_DUMP_CALL char buffer[32]; -#endif /* #ifndef CLI_DUMP_CALL */ +#endif + +#if ! defined (IOCTL_PCTOOL) + system("echo 0 > /sys/module/printk/parameters/time"); +#endif + + /* scan for device node index */ + cnt = scanParamArg(argc, argv, "dev", 32, &devIdx); +#if ! defined (CLI_DUMP_CALL) && ! defined (IOCTL_PCTOOL) + sprintf(buffer, "/dev/switch_api/%d", devIdx); + fd = open(buffer, O_RDONLY); + + if (fd < 0) + goto end; + +#else + /*PC tool*/ + fd = 0; +#endif + + /*Get Switch HW version*/ + ret = gswip_version_get((void *)fd); + + if (ret != 0) { + printf("Command returns with error %d\n\n", ret); + printf("GSWIP Hardware Revision Identification get failed\n"); + goto end;; + } + + if (findStringParam(argc, argv, "xgmac")) { + if (argc > 12 || argc < 3) { + printf("Invalid xgmac command, if specify *, please use double quotes or single quotes around *.\n" + "Shell will conside * as a wild space character and misbehave\n"); + argv[2] = "-help"; + argc = argc + 1; + } else if (findStringParam(argc, argv, "-help")) { + argv[2] = "-help"; + argc = argc + 1; + } + } else if (findStringParam(argc, argv, "gswss") || + findStringParam(argc, argv, "lmac")) { + + if (argc < 3) { + argv[2] = "-help"; + argc = argc + 1; + } + } else { + ret = findHelpMain(&argc, argv); + + if (ret) + goto end; + } /* search for a SWITCH API command in the program arguments */ bHelpText = 0; pCmdTable = NULL; findCommandName(argc, argv); +#ifdef MACSEC + + if ((!findStringParam(argc, argv, "xgmac")) && + (!findStringParam(argc, argv, "gswss"))) { + findCommandNameMacsec(argc, argv); + } -#if ! defined (IOCTL_PCTOOL) - system("echo 0 > /sys/module/printk/parameters/time"); #endif if (pCmdTable == NULL) { @@ -238,38 +589,38 @@ int main(int argc, char *argv[]) goto end; } - if (findStringParam(argc, argv, "xgmac")) { - if (argc > 12) { - printf("Invalid xgmac command, if specify *, please use double quotes or single quotes around *.\n" - "Shell will conside * as a wild space character and misbehave\n"); - ret = -1; + if (findStringParam(argc, argv, "gswss") || + findStringParam(argc, argv, "lmac") || findStringParam(argc, argv, "xgmac")) { + } else { + /* check if one parameter requests help printout */ + findHelpText(argc, argv); + + if (bHelpText == 1) { + /* print out command help */ + printf("\nCommand Description:\n--------------------\n\n"); + printf("%s", HelpText[cmdTableIdx]); + + if (gswip_version == GSWIP_3_0) { + printf( + "\n\nCommon Parameter:\n" + "-----------------\n" + "dev:\n" + "\tDevice selection:\n" + "\t- \"0\" for \"/dev/switch/0\" (e.g. internal switch / GSWIP-L)\n" + "\t- \"1\" for \"/dev/switch/1\" (e.g. external switch / GSWIP-R) and so on\n" + "\tDefault is device \"0\" in case this parameter is not set.\n"); + } + +#ifdef CLI_DUMP_CALL + printf("\n!!!Parameter Dump Version!!!\n"); +#endif + ret = 0; goto end; } } - /* check if one parameter requests help printout */ - findHelpText(argc, argv); - - /* command given and a help request -> printout help for the given command */ - if (bHelpText == 1) { - /* print out command help */ - printf("\nCommand Description:\n--------------------\n\n"); - printf("%s", HelpText[cmdTableIdx]); - printf( - "\n\nCommon Parameter:\n" - "-----------------\n" - "dev:\n" - "\tDevice selection:\n" - "\t- \"0\" for \"/dev/switch/0\" (e.g. internal switch / GSWIP-L)\n" - "\t- \"1\" for \"/dev/switch/1\" (e.g. external switch / GSWIP-R) and so on\n" - "\tDefault is device \"0\" in case this parameter is not set.\n"); -#ifdef CLI_DUMP_CALL - printf("\n!!!Parameter Dump Version!!!\n"); -#endif /* #ifdef CLI_DUMP_CALL */ - ret = 0; - goto end; - } + /*Store the function Pointer*/ pFkt = pCmdTable->fkt; if (pFkt == NULL) { @@ -278,49 +629,31 @@ int main(int argc, char *argv[]) goto end; } - /* scan for device node index */ - cnt = scanParamArg(argc, argv, "dev", 32, &devIdx); - -#if ! defined (CLI_DUMP_CALL) && ! defined (IOCTL_PCTOOL) - sprintf(buffer, "/dev/switch_api/%d", devIdx); - fd = open(buffer, O_RDONLY); - - if (fd < 0) { - printf("ERROR: Could not open dev node \"%s\"\n", buffer); - ret = -1; - goto end; - } - -#else /* #ifndef CLI_DUMP_CALL */ - fd = 0; -#endif /* #ifndef CLI_DUMP_CALL */ - - ret = gswip_version_get(fd); - - if (ret != 0) { - printf("Command returns with error %d\n\n", ret); - printf("GSWIP Hardware Revision Identification get failed\n"); - goto end;; - } - /*call function pointer*/ ret = pFkt(argc, argv, fd, argc - (2 + cnt)); -#if ! defined (CLI_DUMP_CALL) && ! defined (IOCTL_PCTOOL) - close(fd); -#endif /* #ifndef CLI_DUMP_CALL */ - if (ret != 0) { printf("Command returns with error %d\n\n", ret); printf("Command Description:\n--------------------\n"); printf("%s\n", HelpText[cmdTableIdx]); #ifdef CLI_DUMP_CALL printf("Parameter Dump Version\n"); -#endif /* #ifdef CLI_DUMP_CALL */ +#endif } end: +#if ! defined (CLI_DUMP_CALL) && ! defined (IOCTL_PCTOOL) + + if (fd < 0) { + printf("ERROR: Could not open dev node \"%s\"\n", buffer); + ret = -1; + } else { + close(fd); + } + +#endif + #if ! defined (IOCTL_PCTOOL) system("echo 1 > /sys/module/printk/parameters/time"); #endif