base code update
cover base code update
Update base code to cid-i40e.2018.09.13.tar.gz, which include couple AQ command enhancements and bug fixes. Also all source files' license text is replaced with SPDX tag.
Qi Zhang (20):
net/i40e/base: replace license text with SPDX tag net/i40e/base: fix partition id calculation for X722 net/i40e/base: introduce PHY type bitmask net/i40e/base: enable cloud filter mode for switch config net/i40e/base: add admin queue definitions for cloud filters net/i40e/base: enable cloud filters via tc flower net/i40e/base: improve the polling mechanism net/i40e/base: read LLDP config area with correct endianness net/i40e/base: properly clean resources net/i40e/base: gracefully clean the resources net/i40e/base: correct global reset timeout calculation net/i40e/base: change AQ command for PHY access net/i40e/base: add additional return code net/i40e/base: add AQ command for rearrange NVM structure net/i40e/base: add FC threshold parameter for set MAC net/i40e/base: add support for carlsville device net/i40e/base: wrap admin queue set/get PHY register funcs net/i40e/base: add capability flag for stopping FW LLDP net/i40e/base: add new TR bits used for cloud filters net/i40e/base: update readme
drivers/net/i40e/base/README | 2 +- drivers/net/i40e/base/i40e_adminq.c | 50 +++---- drivers/net/i40e/base/i40e_adminq.h | 35 +---- drivers/net/i40e/base/i40e_adminq_cmd.h | 234 +++++++++++++++++++++++++----- drivers/net/i40e/base/i40e_alloc.h | 35 +---- drivers/net/i40e/base/i40e_common.c | 250 ++++++++++++++++++++++---------- drivers/net/i40e/base/i40e_dcb.c | 46 ++---- drivers/net/i40e/base/i40e_dcb.h | 35 +---- drivers/net/i40e/base/i40e_devids.h | 38 +---- drivers/net/i40e/base/i40e_diag.c | 35 +---- drivers/net/i40e/base/i40e_diag.h | 35 +---- drivers/net/i40e/base/i40e_hmc.c | 35 +---- drivers/net/i40e/base/i40e_hmc.h | 35 +---- drivers/net/i40e/base/i40e_lan_hmc.c | 50 ++----- drivers/net/i40e/base/i40e_lan_hmc.h | 35 +---- drivers/net/i40e/base/i40e_nvm.c | 35 +---- drivers/net/i40e/base/i40e_osdep.h | 34 +---- drivers/net/i40e/base/i40e_prototype.h | 76 ++++------ drivers/net/i40e/base/i40e_register.h | 35 +---- drivers/net/i40e/base/i40e_status.h | 35 +---- drivers/net/i40e/base/i40e_type.h | 58 ++++---- drivers/net/i40e/base/virtchnl.h | 35 +---- drivers/net/i40e/i40e_ethdev.c | 38 ++--- drivers/net/i40e/i40e_flow.c | 10 +- 24 files changed, 529 insertions(+), 777 deletions(-)
Signature · 1 line
2.13.6
PATCH 1/20 net/i40e/base: replace license text with SPDX tag
--- drivers/net/i40e/base/i40e_adminq.c | 35 +++----------------------------- drivers/net/i40e/base/i40e_adminq.h | 35 +++----------------------------- drivers/net/i40e/base/i40e_adminq_cmd.h | 35 +++----------------------------- drivers/net/i40e/base/i40e_alloc.h | 35 +++----------------------------- drivers/net/i40e/base/i40e_common.c | 36 +++------------------------------ drivers/net/i40e/base/i40e_dcb.c | 35 +++----------------------------- drivers/net/i40e/base/i40e_dcb.h | 35 +++----------------------------- drivers/net/i40e/base/i40e_devids.h | 35 +++----------------------------- drivers/net/i40e/base/i40e_diag.c | 35 +++----------------------------- drivers/net/i40e/base/i40e_diag.h | 35 +++----------------------------- drivers/net/i40e/base/i40e_hmc.c | 35 +++----------------------------- drivers/net/i40e/base/i40e_hmc.h | 35 +++----------------------------- drivers/net/i40e/base/i40e_lan_hmc.c | 35 +++----------------------------- drivers/net/i40e/base/i40e_lan_hmc.h | 35 +++----------------------------- drivers/net/i40e/base/i40e_nvm.c | 35 +++----------------------------- drivers/net/i40e/base/i40e_osdep.h | 34 +++---------------------------- drivers/net/i40e/base/i40e_prototype.h | 35 +++----------------------------- drivers/net/i40e/base/i40e_register.h | 35 +++----------------------------- drivers/net/i40e/base/i40e_status.h | 35 +++----------------------------- drivers/net/i40e/base/i40e_type.h | 35 +++----------------------------- drivers/net/i40e/base/virtchnl.h | 35 +++----------------------------- 21 files changed, 63 insertions(+), 672 deletions(-)
drivers/net/i40e/base/i40e_adminq.c +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #include "i40e_status.h" #include "i40e_type.h"
drivers/net/i40e/base/i40e_adminq.h +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #ifndef _I40E_ADMINQ_H_#define _I40E_ADMINQ_H_
drivers/net/i40e/base/i40e_adminq_cmd.h +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #ifndef _I40E_ADMINQ_CMD_H_#define _I40E_ADMINQ_CMD_H_
drivers/net/i40e/base/i40e_alloc.h +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #ifndef _I40E_ALLOC_H_#define _I40E_ALLOC_H_
drivers/net/i40e/base/i40e_common.c +3 -33
@@ -1,42 +1,12 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #include "i40e_type.h" #include "i40e_adminq.h" #include "i40e_prototype.h" #include "virtchnl.h" -/** * i40e_set_mac_type - Sets MAC type * @hw: pointer to the HW structure
drivers/net/i40e/base/i40e_dcb.c +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #include "i40e_adminq.h" #include "i40e_prototype.h"
drivers/net/i40e/base/i40e_dcb.h +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #ifndef _I40E_DCB_H_#define _I40E_DCB_H_
drivers/net/i40e/base/i40e_devids.h +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #ifndef _I40E_DEVIDS_H_#define _I40E_DEVIDS_H_
drivers/net/i40e/base/i40e_diag.c +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #include "i40e_diag.h" #include "i40e_prototype.h"
drivers/net/i40e/base/i40e_diag.h +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #ifndef _I40E_DIAG_H_#define _I40E_DIAG_H_
drivers/net/i40e/base/i40e_hmc.c +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #include "i40e_osdep.h" #include "i40e_register.h"
drivers/net/i40e/base/i40e_hmc.h +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #ifndef _I40E_HMC_H_#define _I40E_HMC_H_
drivers/net/i40e/base/i40e_lan_hmc.c +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #include "i40e_osdep.h" #include "i40e_register.h"
drivers/net/i40e/base/i40e_lan_hmc.h +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #ifndef _I40E_LAN_HMC_H_#define _I40E_LAN_HMC_H_
drivers/net/i40e/base/i40e_nvm.c +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #include "i40e_prototype.h"
drivers/net/i40e/base/i40e_osdep.h +3 -31
@@ -1,34 +1,6 @@ -/****************************************************************************** - -Copyright (c) 2001-2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. -******************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #ifndef _I40E_OSDEP_H_#define _I40E_OSDEP_H_
drivers/net/i40e/base/i40e_prototype.h +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #ifndef _I40E_PROTOTYPE_H_#define _I40E_PROTOTYPE_H_
drivers/net/i40e/base/i40e_register.h +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #ifndef _I40E_REGISTER_H_#define _I40E_REGISTER_H_
drivers/net/i40e/base/i40e_status.h +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #ifndef _I40E_STATUS_H_#define _I40E_STATUS_H_
drivers/net/i40e/base/i40e_type.h +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #ifndef _I40E_TYPE_H_#define _I40E_TYPE_H_
drivers/net/i40e/base/virtchnl.h +3 -32
@@ -1,35 +1,6 @@ -/******************************************************************************* - -Copyright (c) 2013 - 2015, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the Intel Corporation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 OWNER 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. - -***************************************************************************/ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2001-2018 +*/ #ifndef _VIRTCHNL_H_#define _VIRTCHNL_H_
Signature · 1 line
2.13.6
PATCH 2/20 net/i40e/base: fix partition id calculation for X722
In reply to Qi ZhangThis patch overwrites number of ports for X722 devices with support for OCP PHY mezzanine. The old method with checking if port is disabled in the PRTGEN_CNF register cannot be used in this case. When the OCP is removed, ports were seen as disabled, which resulted in wrong calculation of partition id, that caused WoL to be disabled on certain ports.
--- drivers/net/i40e/base/i40e_common.c | 23 ++++++++++++++++++++++- drivers/net/i40e/base/i40e_type.h | 4 +++- 2 files changed, 25 insertions(+), 2 deletions(-)
drivers/net/i40e/base/i40e_common.c +22 -1
@@ -3678,9 +3678,10 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,u32 valid_functions, num_functions;u32 number, logical_id, phys_id;struct i40e_hw_capabilities *p; +enum i40e_status_code status; +u16 id, ocp_cfg_word0;u8 major_rev;u32 i =0 ; -u16 id; cap = (struct i40e_aqc_list_capabilities_element_resp *) buff;
@@ -3972,6 +3973,26 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff, hw->num_ports++; } +/* OCP cards case: if a mezz is removed the ethernet port is at +* disabled state in PRTGEN_CNF register. Additional NVM read is +* needed in order to check if we are dealing with OCP card. +* Those cards have 4 PFs at minimum, so using PRTGEN_CNF for counting +* physical ports results in wrong partition id calculation and thus +* not supporting WoL. +*/ +if (hw->mac.type ==I40E_MAC_X722 ) { +if (i40e_acquire_nvm (hw,I40E_RESOURCE_READ ) ==I40E_SUCCESS ) { + status =i40e_aq_read_nvm (hw,I40E_SR_EMP_MODULE_PTR , +2 *I40E_SR_OCP_CFG_WORD0 , +sizeof (ocp_cfg_word0), + &ocp_cfg_word0, true,NULL ); +if (status ==I40E_SUCCESS && + (ocp_cfg_word0 &I40E_SR_OCP_ENABLED )) + hw->num_ports =4 ; +i40e_release_nvm (hw); + } + } + valid_functions = p->valid_functions; num_functions =0 ;while (valid_functions) {
drivers/net/i40e/base/i40e_type.h +3 -1
@@ -1512,7 +1512,9 @@ struct i40e_hw_port_stats {#define I40E_SR_CONTROL_WORD_1_MASK (0x03 << I40E_SR_CONTROL_WORD_1_SHIFT)#define I40E_SR_CONTROL_WORD_1_NVM_BANK_VALID BIT(5)#define I40E_SR_NVM_MAP_STRUCTURE_TYPE BIT(12) -#define I40E_PTR_TYPE BIT(15) +#define I40E_PTR_TYPE BIT(15) +#define I40E_SR_OCP_CFG_WORD0 0x2B +#define I40E_SR_OCP_ENABLED BIT(15)/* Shadow RAM related */ #define I40E_SR_SECTOR_SIZE_IN_WORDS 0x800
Signature · 1 line
2.13.6
PATCH 3/20 net/i40e/base: introduce PHY type bitmask
In reply to Qi ZhangThis patch introduces a helper macro define.
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+)
drivers/net/i40e/base/i40e_adminq_cmd.h +37 -0
@@ -1855,6 +1855,43 @@ enum i40e_aq_phy_type { I40E_PHY_TYPE_DEFAULT = 0xFF, }; +#define I40E_PHY_TYPES_BITMASK (BIT_ULL(I40E_PHY_TYPE_SGMII) | \ + BIT_ULL(I40E_PHY_TYPE_1000BASE_KX) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_KX4) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_KR) | \ + BIT_ULL(I40E_PHY_TYPE_40GBASE_KR4) | \ + BIT_ULL(I40E_PHY_TYPE_XAUI) | \ + BIT_ULL(I40E_PHY_TYPE_XFI) | \ + BIT_ULL(I40E_PHY_TYPE_SFI) | \ + BIT_ULL(I40E_PHY_TYPE_XLAUI) | \ + BIT_ULL(I40E_PHY_TYPE_XLPPI) | \ + BIT_ULL(I40E_PHY_TYPE_40GBASE_CR4_CU) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_CR1_CU) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_AOC) | \ + BIT_ULL(I40E_PHY_TYPE_40GBASE_AOC) | \ + BIT_ULL(I40E_PHY_TYPE_UNRECOGNIZED) | \ + BIT_ULL(I40E_PHY_TYPE_UNSUPPORTED) | \ + BIT_ULL(I40E_PHY_TYPE_100BASE_TX) | \ + BIT_ULL(I40E_PHY_TYPE_1000BASE_T) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_T) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_SR) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_LR) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_SFPP_CU) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_CR1) | \ + BIT_ULL(I40E_PHY_TYPE_40GBASE_CR4) | \ + BIT_ULL(I40E_PHY_TYPE_40GBASE_SR4) | \ + BIT_ULL(I40E_PHY_TYPE_40GBASE_LR4) | \ + BIT_ULL(I40E_PHY_TYPE_1000BASE_SX) | \ + BIT_ULL(I40E_PHY_TYPE_1000BASE_LX) | \ + BIT_ULL(I40E_PHY_TYPE_1000BASE_T_OPTICAL) | \ + BIT_ULL(I40E_PHY_TYPE_20GBASE_KR2) | \ + BIT_ULL(I40E_PHY_TYPE_25GBASE_KR) | \ + BIT_ULL(I40E_PHY_TYPE_25GBASE_CR) | \ + BIT_ULL(I40E_PHY_TYPE_25GBASE_SR) | \ + BIT_ULL(I40E_PHY_TYPE_25GBASE_LR) | \ + BIT_ULL(I40E_PHY_TYPE_25GBASE_AOC) | \ + BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC)) +#define I40E_LINK_SPEED_100MB_SHIFT 0x1#define I40E_LINK_SPEED_1000MB_SHIFT 0x2#define I40E_LINK_SPEED_10GB_SHIFT 0x3
Signature · 1 line
2.13.6
PATCH 4/20 net/i40e/base: enable cloud filter mode for switch config
In reply to Qi ZhangAdd definitions for L4 filters and switch modes based on cloud filters modes and extend the set switch config command to include the additional cloud filter mode.
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 30 +++++++++++++++++++++++++++++- drivers/net/i40e/base/i40e_common.c | 4 +++- drivers/net/i40e/base/i40e_prototype.h | 2 +- drivers/net/i40e/base/i40e_type.h | 9 +++++++++ drivers/net/i40e/i40e_ethdev.c | 2 +- 5 files changed, 43 insertions(+), 4 deletions(-)
drivers/net/i40e/base/i40e_adminq_cmd.h +29 -1
@@ -775,7 +775,35 @@ struct i40e_aqc_set_switch_config {*/ __le16 first_tag;__le16 second_tag; -u8 reserved[6 ]; +/* Next byte is split into following: +* Bit 7 : 0 : No action, 1: Switch to mode defined by bits 6:0 +* Bit 6 : 0 : Destination Port, 1: source port +* Bit 5..4 : L4 type +* 0: rsvd +* 1: TCP +* 2: UDP +* 3: Both TCP and UDP +* Bits 3:0 Mode +* 0: default mode +* 1: L4 port only mode +* 2: non-tunneled mode +* 3: tunneled mode +*/ +#define I40E_AQ_SET_SWITCH_BIT7_VALID 0x80 + +#define I40E_AQ_SET_SWITCH_L4_SRC_PORT 0x40 + +#define I40E_AQ_SET_SWITCH_L4_TYPE_RSVD 0x00 +#define I40E_AQ_SET_SWITCH_L4_TYPE_TCP 0x10 +#define I40E_AQ_SET_SWITCH_L4_TYPE_UDP 0x20 +#define I40E_AQ_SET_SWITCH_L4_TYPE_BOTH 0x30 + +#define I40E_AQ_SET_SWITCH_MODE_DEFAULT 0x00 +#define I40E_AQ_SET_SWITCH_MODE_L4_PORT 0x01 +#define I40E_AQ_SET_SWITCH_MODE_NON_TUNNEL 0x02 +#define I40E_AQ_SET_SWITCH_MODE_TUNNEL 0x03 +u8 mode; +u8 rsvd5[5 ]; };I40E_CHECK_CMD_LENGTH (i40e_aqc_set_switch_config);
drivers/net/i40e/base/i40e_common.c +3 -1
@@ -2681,13 +2681,14 @@ enum i40e_status_code i40e_aq_get_switch_config(struct i40e_hw *hw,* i40e_aq_set_switch_config * @hw: pointer to the hardware structure * @flags: bit flag values to set +* @mode: cloud filter mode * @valid_flags: which bit flags to set * @cmd_details: pointer to command details structure or NULL * * Set switch configuration bits **/ enum i40e_status_code i40e_aq_set_switch_config (struct i40e_hw *hw, -u16 flags,u16 valid_flags, +u16 flags,u16 valid_flags,u8 mode,struct i40e_asq_cmd_details *cmd_details) {struct i40e_aq_desc desc;
@@ -2699,6 +2700,7 @@ enum i40e_status_code i40e_aq_set_switch_config(struct i40e_hw *hw, i40e_aqc_opc_set_switch_config); scfg->flags =CPU_TO_LE16 (flags); scfg->valid_flags =CPU_TO_LE16 (valid_flags); + scfg->mode = mode;if (hw->flags &I40E_HW_FLAG_802_1AD_CAPABLE ) { scfg->switch_tag =CPU_TO_LE16 (hw->switch_tag); scfg->first_tag =CPU_TO_LE16 (hw->first_tag);
drivers/net/i40e/base/i40e_prototype.h +1 -1
@@ -199,7 +199,7 @@ enum i40e_status_code i40e_aq_get_switch_config(struct i40e_hw *hw, u16 buf_size, u16 *start_seid, struct i40e_asq_cmd_details *cmd_details);enum i40e_status_code i40e_aq_set_switch_config (struct i40e_hw *hw, -u16 flags,u16 valid_flags, +u16 flags,u16 valid_flags,u8 mode,struct i40e_asq_cmd_details *cmd_details); enum i40e_status_code i40e_aq_request_resource(struct i40e_hw *hw, enum i40e_aq_resources_ids resource,
drivers/net/i40e/base/i40e_type.h +9 -0
@@ -349,6 +349,15 @@ struct i40e_hw_capabilities {#define I40E_NVM_IMAGE_TYPE_CLOUD 0x2#define I40E_NVM_IMAGE_TYPE_UDP_CLOUD 0x3 +/* Cloud filter modes: +* Mode1: Filter on L4 port only +* Mode2: Filter for non-tunneled traffic +* Mode3: Filter for tunnel traffic +*/ +#define I40E_CLOUD_FILTER_MODE1 0x6 +#define I40E_CLOUD_FILTER_MODE2 0x7 +#define I40E_CLOUD_FILTER_MODE3 0x8 +u32 management_mode;u32 mng_protocols_over_mctp;#define I40E_MNG_PROTOCOL_PLDM 0x2
drivers/net/i40e/i40e_ethdev.c +1 -1
@@ -3653,7 +3653,7 @@ i40e_vlan_tpid_set(struct rte_eth_dev *dev,if (vlan_type ==ETH_VLAN_TYPE_OUTER ) hw->second_tag =rte_cpu_to_le_16 (tpid); } - ret =i40e_aq_set_switch_config (hw,0 ,0 ,NULL ); + ret =i40e_aq_set_switch_config (hw,0 ,0 ,0 ,NULL );if (ret !=I40E_SUCCESS ) { PMD_DRV_LOG(ERR, "Set switch config failed aq_err: %d",
Signature · 1 line
2.13.6
PATCH 5/20 net/i40e/base: add admin queue definitions for cloud filters
In reply to Qi ZhangAdd new admin queue definitions and extended fields for cloud filter support. Define big buffer for extended general fields in Add/Remove Cloud filters command.
Also rename i40e_aqc_add_remove_cloud_filters_element_data to i40e_aq__cloud_filters_element_data.
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 57 +++++++++++++++++++++++++++++++-- drivers/net/i40e/base/i40e_common.c | 14 ++++---- drivers/net/i40e/base/i40e_prototype.h | 4 +-- 3 files changed, 64 insertions(+), 11 deletions(-)
drivers/net/i40e/base/i40e_adminq_cmd.h +55 -2
@@ -1358,6 +1358,7 @@ struct i40e_aqc_add_remove_cloud_filters { I40E_AQC_ADD_CLOUD_CMD_SEID_NUM_SHIFT) u8 big_buffer_flag;#define I40E_AQC_ADD_REM_CLOUD_CMD_BIG_BUFFER 1 +#define I40E_AQC_ADD_CLOUD_CMD_BB 1u8 reserved2[3 ];__le32 addr_high;__le32 addr_low;
@@ -1365,7 +1366,7 @@ struct i40e_aqc_add_remove_cloud_filters {I40E_CHECK_CMD_LENGTH (i40e_aqc_add_remove_cloud_filters); -struct i40e_aqc_add_remove_cloud_filters_element_data { +struct i40e_aqc_cloud_filters_element_data {u8 outer_mac[6 ];u8 inner_mac[6 ];__le16 inner_vlan;
@@ -1396,6 +1397,9 @@ struct i40e_aqc_add_remove_cloud_filters_element_data {#define I40E_AQC_ADD_CLOUD_FILTER_OMAC_TEN_ID_IMAC 0x000B#define I40E_AQC_ADD_CLOUD_FILTER_IIP 0x000C/* 0x0010 to 0x0017 is for custom filters */ +#define I40E_AQC_ADD_CLOUD_FILTER_IP_PORT 0x0010/* Dest IP + L4 Port */ +#define I40E_AQC_ADD_CLOUD_FILTER_MAC_PORT 0x0011/* Dest MAC + L4 Port */ +#define I40E_AQC_ADD_CLOUD_FILTER_MAC_VLAN_PORT 0x0012/* Dest MAC + VLAN + L4 Port */ #define I40E_AQC_ADD_CLOUD_FLAGS_TO_QUEUE 0x0080#define I40E_AQC_ADD_CLOUD_VNK_SHIFT 6
@@ -1435,7 +1439,7 @@ struct i40e_aqc_add_remove_cloud_filters_element_data {* DCR288 */ struct i40e_aqc_add_rm_cloud_filt_elem_ext { -struct i40e_aqc_add_remove_cloud_filters_element_data element; +struct i40e_aqc_cloud_filters_element_data element;u16 general_fields[32 ];#define I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD0 0#define I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD1 1
@@ -1470,6 +1474,49 @@ struct i40e_aqc_add_rm_cloud_filt_elem_ext {#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD7 30 }; +I40E_CHECK_STRUCT_LEN (0x40 , i40e_aqc_cloud_filters_element_data); + +/* i40e_aqc_cloud_filters_element_bb is used when +* I40E_AQC_CLOUD_CMD_BB flag is set. +*/ +struct i40e_aqc_cloud_filters_element_bb { +struct i40e_aqc_cloud_filters_element_data element; +u16 general_fields[32 ]; +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD0 0 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD1 1 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD2 2 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X11_WORD0 3 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X11_WORD1 4 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X11_WORD2 5 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X12_WORD0 6 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X12_WORD1 7 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X12_WORD2 8 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X13_WORD0 9 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X13_WORD1 10 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X13_WORD2 11 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X14_WORD0 12 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X14_WORD1 13 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X14_WORD2 14 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD0 15 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD1 16 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD2 17 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD3 18 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD4 19 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD5 20 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD6 21 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD7 22 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD0 23 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD1 24 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD2 25 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD3 26 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD4 27 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD5 28 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD6 29 +#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD7 30 +}; + +I40E_CHECK_STRUCT_LEN (0x80 , i40e_aqc_cloud_filters_element_bb); +struct i40e_aqc_remove_cloud_filters_completion {__le16 perfect_ovlan_used;__le16 perfect_ovlan_free;
@@ -1490,6 +1537,8 @@ struct i40e_filter_data {u8 input[3 ]; }; +I40E_CHECK_STRUCT_LEN (4 , i40e_filter_data); +struct i40e_aqc_replace_cloud_filters_cmd {u8 valid_flags;#define I40E_AQC_REPLACE_L1_FILTER 0x0
@@ -1505,6 +1554,8 @@ struct i40e_aqc_replace_cloud_filters_cmd {__le32 addr_low; }; +I40E_CHECK_CMD_LENGTH (i40e_aqc_replace_cloud_filters_cmd); +struct i40e_aqc_replace_cloud_filters_cmd_buf {u8 data[32 ];/* Filter type INPUT codes*/
@@ -1529,6 +1580,8 @@ struct i40e_aqc_replace_cloud_filters_cmd_buf {struct i40e_filter_data filters[8 ]; }; +I40E_CHECK_STRUCT_LEN (0x40 , i40e_aqc_replace_cloud_filters_cmd_buf); +/* Add Mirror Rule (indirect or direct 0x0260) * Delete Mirror Rule (indirect or direct 0x0261) * note: some rule types (4,5) do not use an external buffer.
drivers/net/i40e/base/i40e_common.c +7 -7
@@ -5686,10 +5686,10 @@ void i40e_add_filter_to_drop_tx_flow_control_frames(struct i40e_hw *hw,* to be shifted 1 byte over from the VxLAN VNI **/ STATIC void i40e_fix_up_geneve_vni( -struct i40e_aqc_add_remove_cloud_filters_element_data *filters, +struct i40e_aqc_cloud_filters_element_data *filters,u8 filter_count) { -struct i40e_aqc_add_remove_cloud_filters_element_data *f = filters; +struct i40e_aqc_cloud_filters_element_data *f = filters;int i;for (i =0 ; i < filter_count; i++) {
@@ -5714,13 +5714,13 @@ STATIC void i40e_fix_up_geneve_vni(* @filter_count: number of filters contained in the buffer * * Set the cloud filters for a given VSI. The contents of the -* i40e_aqc_add_remove_cloud_filters_element_data are filled +* i40e_aqc_cloud_filters_element_data are filled * in by the caller of the function. * **/ enum i40e_status_code i40e_aq_add_cloud_filters (struct i40e_hw *hw,u16 seid, -struct i40e_aqc_add_remove_cloud_filters_element_data *filters, +struct i40e_aqc_cloud_filters_element_data *filters,u8 filter_count) {struct i40e_aq_desc desc;
@@ -5806,13 +5806,13 @@ enum i40e_status_code i40e_aq_add_cloud_filters_big_buffer(struct i40e_hw *hw,* @filter_count: number of filters contained in the buffer * * Remove the cloud filters for a given VSI. The contents of the -* i40e_aqc_add_remove_cloud_filters_element_data are filled -* in by the caller of the function. +* i40e_aqc_cloud_filters_element_data are filled in by the caller +* of the function. * **/ enum i40e_status_code i40e_aq_remove_cloud_filters (struct i40e_hw *hw,u16 seid, -struct i40e_aqc_add_remove_cloud_filters_element_data *filters, +struct i40e_aqc_cloud_filters_element_data *filters,u8 filter_count) {struct i40e_aq_desc desc;
drivers/net/i40e/base/i40e_prototype.h +2 -2
@@ -379,7 +379,7 @@ enum i40e_status_code i40e_read_lldp_cfg(struct i40e_hw *hw, struct i40e_lldp_variables *lldp_cfg);enum i40e_status_code i40e_aq_add_cloud_filters (struct i40e_hw *hw,u16 vsi, -struct i40e_aqc_add_remove_cloud_filters_element_data *filters, +struct i40e_aqc_cloud_filters_element_data *filters,u8 filter_count); enum i40e_status_code i40e_aq_add_cloud_filters_big_buffer(struct i40e_hw *hw, u16 seid,
@@ -387,7 +387,7 @@ enum i40e_status_code i40e_aq_add_cloud_filters_big_buffer(struct i40e_hw *hw, u8 filter_count);enum i40e_status_code i40e_aq_remove_cloud_filters (struct i40e_hw *hw,u16 vsi, -struct i40e_aqc_add_remove_cloud_filters_element_data *filters, +struct i40e_aqc_cloud_filters_element_data *filters,u8 filter_count); enum i40e_status_code i40e_aq_remove_cloud_filters_big_buffer( struct i40e_hw *hw, u16 seid,
Signature · 1 line
2.13.6
PATCH 6/20 net/i40e/base: enable cloud filters via tc flower
In reply to Qi ZhangThis patch enables tc-flower based hardware offloads. tc flower filter provided by the kernel is configured as driver specific cloud filter. The patch implements functions and admin queue commands needed to support cloud filters in the driver and adds cloud filters to configure these tc-flower filters.
Also it cover below API renaming for code clean.
- i40e_aq_add_cloud_filters_big_buffer to
i40e_aq_add_cloud_filters_bb
- i40e_aq_remove_cloud_filters_big_buffer to
i40e_aq_rem_cloud_filters_bb
- i40e_aq_remove_cloud_filters to
i40e_aq_rem_cloud_filters
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 3 ++ drivers/net/i40e/base/i40e_common.c | 55 +++++++++++++++++++-------------- drivers/net/i40e/base/i40e_prototype.h | 32 +++++++++---------- drivers/net/i40e/base/i40e_type.h | 1 + drivers/net/i40e/i40e_ethdev.c | 28 ++++++++--------- drivers/net/i40e/i40e_flow.c | 10 +++--- 6 files changed, 70 insertions(+), 59 deletions(-)
drivers/net/i40e/base/i40e_adminq_cmd.h +3 -0
@@ -1378,6 +1378,9 @@ struct i40e_aqc_cloud_filters_element_data {struct {u8 data[16 ]; } v6; +struct { +__le16 data[8 ]; + } raw_v6; } ipaddr;__le16 flags;#define I40E_AQC_ADD_CLOUD_FILTER_SHIFT 0
drivers/net/i40e/base/i40e_common.c +31 -24
121 lines not on this page · raw message
drivers/net/i40e/base/i40e_prototype.h +16 -16
@@ -375,24 +375,24 @@ enum i40e_status_code i40e_aq_query_switch_comp_bw_config(struct i40e_hw *hw, struct i40e_asq_cmd_details *cmd_details);enum i40e_status_code i40e_aq_resume_port_tx (struct i40e_hw *hw,struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_add_cloud_filters_bb (struct i40e_hw *hw,u16 seid, +struct i40e_aqc_cloud_filters_element_bb *filters, +u8 filter_count); +enum i40e_status_code +i40e_aq_add_cloud_filters (struct i40e_hw *hw,u16 vsi, +struct i40e_aqc_cloud_filters_element_data *filters, +u8 filter_count); +enum i40e_status_code +i40e_aq_rem_cloud_filters (struct i40e_hw *hw,u16 vsi, +struct i40e_aqc_cloud_filters_element_data *filters, +u8 filter_count); +enum i40e_status_code +i40e_aq_rem_cloud_filters_bb (struct i40e_hw *hw,u16 seid, +struct i40e_aqc_cloud_filters_element_bb *filters, +u8 filter_count);enum i40e_status_code i40e_read_lldp_cfg (struct i40e_hw *hw,struct i40e_lldp_variables *lldp_cfg); -enum i40e_status_code i40e_aq_add_cloud_filters (struct i40e_hw *hw, -u16 vsi, -struct i40e_aqc_cloud_filters_element_data *filters, -u8 filter_count); -enum i40e_status_code i40e_aq_add_cloud_filters_big_buffer (struct i40e_hw *hw, -u16 seid, -struct i40e_aqc_add_rm_cloud_filt_elem_ext *filters, -u8 filter_count); -enum i40e_status_code i40e_aq_remove_cloud_filters (struct i40e_hw *hw, -u16 vsi, -struct i40e_aqc_cloud_filters_element_data *filters, -u8 filter_count); -enum i40e_status_code i40e_aq_remove_cloud_filters_big_buffer ( -struct i40e_hw *hw,u16 seid, -struct i40e_aqc_add_rm_cloud_filt_elem_ext *filters, -u8 filter_count);enum i40e_status_code i40e_aq_replace_cloud_filters (struct i40e_hw *hw,struct i40e_aqc_replace_cloud_filters_cmd *filters,struct i40e_aqc_replace_cloud_filters_cmd_buf *cmd_buf);
drivers/net/i40e/base/i40e_type.h +1 -0
@@ -357,6 +357,7 @@ struct i40e_hw_capabilities {#define I40E_CLOUD_FILTER_MODE1 0x6#define I40E_CLOUD_FILTER_MODE2 0x7#define I40E_CLOUD_FILTER_MODE3 0x8 +#define I40E_SWITCH_MODE_MASK 0xFu32 management_mode;u32 mng_protocols_over_mctp;
drivers/net/i40e/i40e_ethdev.c +14 -14
@@ -391,7 +391,7 @@ static int i40e_sw_ethertype_filter_insert(struct i40e_pf *pf, struct i40e_ethertype_filter *filter);static int i40e_tunnel_filter_convert ( -struct i40e_aqc_add_rm_cloud_filt_elem_ext *cld_filter, +struct i40e_aqc_cloud_filters_element_bb *cld_filter,struct i40e_tunnel_filter *tunnel_filter);static int i40e_sw_tunnel_filter_insert (struct i40e_pf *pf,struct i40e_tunnel_filter *tunnel_filter);
@@ -7493,7 +7493,7 @@ i40e_dev_get_filter_type(uint16_t filter_type, uint16_t *flag)/* Convert tunnel filter structure */ static int i40e_tunnel_filter_convert ( -struct i40e_aqc_add_rm_cloud_filt_elem_ext *cld_filter, +struct i40e_aqc_cloud_filters_element_bb *cld_filter,struct i40e_tunnel_filter *tunnel_filter) { ether_addr_copy((struct ether_addr *)&cld_filter->element.outer_mac,
@@ -7591,8 +7591,8 @@ i40e_dev_tunnel_filter_set(struct i40e_pf *pf,int val, ret =0 ;struct i40e_hw *hw =I40E_PF_TO_HW (pf);struct i40e_vsi *vsi = pf->main_vsi; -struct i40e_aqc_add_rm_cloud_filt_elem_ext *cld_filter; -struct i40e_aqc_add_rm_cloud_filt_elem_ext *pfilter; +struct i40e_aqc_cloud_filters_element_bb *cld_filter; +struct i40e_aqc_cloud_filters_element_bb *pfilter;struct i40e_tunnel_rule *tunnel_rule = &pf->tunnel;struct i40e_tunnel_filter *tunnel, *node;struct i40e_tunnel_filter check_filter;/* Check if filter exists */
@@ -7700,7 +7700,7 @@ i40e_dev_tunnel_filter_set(struct i40e_pf *pf,if (ret <0 )rte_free (tunnel); }else { - ret =i40e_aq_remove_cloud_filters (hw, vsi->seid, + ret =i40e_aq_rem_cloud_filters (hw, vsi->seid, &cld_filter->element,1 );if (ret <0 ) {PMD_DRV_LOG (ERR ,"Failed to delete a tunnel filter." );
@@ -8033,8 +8033,8 @@ i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf,struct i40e_pf_vf *vf =NULL ;struct i40e_hw *hw =I40E_PF_TO_HW (pf);struct i40e_vsi *vsi; -struct i40e_aqc_add_rm_cloud_filt_elem_ext *cld_filter; -struct i40e_aqc_add_rm_cloud_filt_elem_ext *pfilter; +struct i40e_aqc_cloud_filters_element_bb *cld_filter; +struct i40e_aqc_cloud_filters_element_bb *pfilter;struct i40e_tunnel_rule *tunnel_rule = &pf->tunnel;struct i40e_tunnel_filter *tunnel, *node;struct i40e_tunnel_filter check_filter;/* Check if filter exists */
@@ -8237,7 +8237,7 @@ i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf,if (add) {if (big_buffer) - ret =i40e_aq_add_cloud_filters_big_buffer (hw, + ret =i40e_aq_add_cloud_filters_bb (hw, vsi->seid, cld_filter,1 );else ret = i40e_aq_add_cloud_filters(hw,
@@ -8260,11 +8260,11 @@ i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf,rte_free (tunnel); }else {if (big_buffer) - ret =i40e_aq_remove_cloud_filters_big_buffer ( + ret =i40e_aq_rem_cloud_filters_bb ( hw, vsi->seid, cld_filter,1 );else - ret =i40e_aq_remove_cloud_filters (hw, vsi->seid, - &cld_filter->element,1 ); + ret =i40e_aq_rem_cloud_filters (hw, vsi->seid, + &cld_filter->element,1 );if (ret <0 ) {PMD_DRV_LOG (ERR ,"Failed to delete a tunnel filter." );rte_free (cld_filter);
@@ -11945,7 +11945,7 @@ i40e_tunnel_filter_restore(struct i40e_pf *pf)struct i40e_tunnel_filter_list *tunnel_list = &pf->tunnel.tunnel_list;struct i40e_tunnel_filter *f; -struct i40e_aqc_add_rm_cloud_filt_elem_ext cld_filter; +struct i40e_aqc_cloud_filters_element_bb cld_filter;bool big_buffer =0 ; TAILQ_FOREACH(f, tunnel_list, rules) {
@@ -11980,8 +11980,8 @@ i40e_tunnel_filter_restore(struct i40e_pf *pf) big_buffer =1 ;if (big_buffer) -i40e_aq_add_cloud_filters_big_buffer (hw, - vsi->seid, &cld_filter,1 ); +i40e_aq_add_cloud_filters_bb (hw, + vsi->seid, &cld_filter,1 );else i40e_aq_add_cloud_filters (hw, vsi->seid, &cld_filter.element,1 );
drivers/net/i40e/i40e_flow.c +5 -5
@@ -4773,7 +4773,7 @@ i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf,struct i40e_hw *hw =I40E_PF_TO_HW (pf);struct i40e_vsi *vsi;struct i40e_pf_vf *vf; -struct i40e_aqc_add_rm_cloud_filt_elem_ext cld_filter; +struct i40e_aqc_cloud_filters_element_bb cld_filter;struct i40e_tunnel_rule *tunnel_rule = &pf->tunnel;struct i40e_tunnel_filter *node;bool big_buffer =0 ;
@@ -4808,11 +4808,11 @@ i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf, big_buffer =1 ;if (big_buffer) - ret =i40e_aq_remove_cloud_filters_big_buffer (hw, vsi->seid, - &cld_filter,1 ); + ret =i40e_aq_rem_cloud_filters_bb (hw, vsi->seid, + &cld_filter,1 );else - ret =i40e_aq_remove_cloud_filters (hw, vsi->seid, - &cld_filter.element,1 ); + ret =i40e_aq_rem_cloud_filters (hw, vsi->seid, + &cld_filter.element,1 );if (ret <0 )return -ENOTSUP ;
Signature · 1 line
2.13.6
PATCH 7/20 net/i40e/base: improve the polling mechanism
In reply to Qi ZhangThis patch fixes the polling mechanism of GLGEN_RSTAT.DEVSTATE in the PF Reset path when Global Reset is in progress. While the driver is polling for the end of the PF Reset and the Global Reset is triggered, abandon the PF Reset path and prepare for the upcoming Global Reset.
--- drivers/net/i40e/base/i40e_common.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-)
drivers/net/i40e/base/i40e_common.c +29 -6
@@ -1296,6 +1296,29 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)return media; } +/** +* i40e_poll_globr - Poll for Global Reset completion +* @hw: pointer to the hardware structure +* @retry_limit: how many times to retry before failure +**/ +STATIC enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw, +u32 retry_limit) +{ +u32 cnt, reg =0 ; + +for (cnt =0 ; cnt < retry_limit; cnt++) { + reg =rd32 (hw,I40E_GLGEN_RSTAT ); +if (!(reg &I40E_GLGEN_RSTAT_DEVSTATE_MASK )) +return I40E_SUCCESS ; +i40e_msec_delay (100 ); + } + +DEBUGOUT ("Global reset failed.\n" ); +DEBUGOUT1 ("I40E_GLGEN_RSTAT = 0x%x\n" , reg); + +return I40E_ERR_RESET_FAILED ; +} +#define I40E_PF_RESET_WAIT_COUNT 200/** * i40e_pf_reset - Reset the PF
@@ -1365,14 +1388,14 @@ enum i40e_status_code i40e_pf_reset(struct i40e_hw *hw)if (!(reg &I40E_PFGEN_CTRL_PFSWR_MASK ))break ; reg2 =rd32 (hw,I40E_GLGEN_RSTAT ); -if (reg2 &I40E_GLGEN_RSTAT_DEVSTATE_MASK ) { -DEBUGOUT ("Core reset upcoming. Skipping PF reset request.\n" ); -DEBUGOUT1 ("I40E_GLGEN_RSTAT = 0x%x\n" , reg2); -return I40E_ERR_NOT_READY ; - } +if (reg2 &I40E_GLGEN_RSTAT_DEVSTATE_MASK ) +break ;i40e_msec_delay (1 ); } -if (reg &I40E_PFGEN_CTRL_PFSWR_MASK ) { +if (reg2 &I40E_GLGEN_RSTAT_DEVSTATE_MASK ) { +if (i40e_poll_globr (hw, grst_del) !=I40E_SUCCESS ) +return I40E_ERR_RESET_FAILED ; + }else if (reg &I40E_PFGEN_CTRL_PFSWR_MASK ) {DEBUGOUT ("PF reset polling failed to complete.\n" );return I40E_ERR_RESET_FAILED ; }
Signature · 1 line
2.13.6
PATCH 8/20 net/i40e/base: read LLDP config area with correct endianness
In reply to Qi ZhangThe NVM is in little endian so when we read from it we need to do the correct thing for the endianness of the machine.
--- drivers/net/i40e/base/i40e_dcb.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/net/i40e/base/i40e_dcb.c +7 -4
@@ -1262,18 +1262,20 @@ static enum i40e_status_code _i40e_read_lldp_cfg(struct i40e_hw *hw, {u32 address, offset = (2 * word_offset);enum i40e_status_code ret; +__le16 raw_mem;u16 mem; ret =i40e_acquire_nvm (hw,I40E_RESOURCE_READ );if (ret !=I40E_SUCCESS )return ret; - ret =i40e_aq_read_nvm (hw,0x0 , module *2 ,sizeof (mem), &mem, true, -NULL ); + ret =i40e_aq_read_nvm (hw,0x0 , module *2 ,sizeof (raw_mem), &raw_mem, + true,NULL );i40e_release_nvm (hw);if (ret !=I40E_SUCCESS )return ret; + mem =LE16_TO_CPU (raw_mem);/* Check if this pointer needs to be read in word size or 4K sector * units. */
@@ -1286,12 +1288,13 @@ static enum i40e_status_code _i40e_read_lldp_cfg(struct i40e_hw *hw,if (ret !=I40E_SUCCESS ) goto err_lldp_cfg; - ret =i40e_aq_read_nvm (hw, module, offset,sizeof (mem), &mem, true, -NULL ); + ret =i40e_aq_read_nvm (hw, module, offset,sizeof (raw_mem), &raw_mem, + true,NULL );i40e_release_nvm (hw);if (ret !=I40E_SUCCESS )return ret; + mem =LE16_TO_CPU (raw_mem); offset = mem + word_offset; offset *=2 ;
Signature · 1 line
2.13.6
PATCH 9/20 net/i40e/base: properly clean resources
In reply to Qi ZhangAllocated resources were not freed in the event of a failure in i40e_init_lan_hmc function. This patch gracefully handles the fail case after initializing the lan hmc.
--- drivers/net/i40e/base/i40e_lan_hmc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
drivers/net/i40e/base/i40e_lan_hmc.c +10 -5
@@ -114,7 +114,7 @@ enum i40e_status_code i40e_init_lan_hmc(struct i40e_hw *hw, u32 txq_num, ret_code =I40E_ERR_INVALID_HMC_OBJ_COUNT ;DEBUGOUT3 ("i40e_init_lan_hmc: Tx context: asks for 0x%x but max allowed is 0x%x, returns error %d\n" , txq_num, obj->max_cnt, ret_code); - goto init_lan_hmc_out; + goto free_hmc_out; }/* aggregate values into the full LAN object for later */
@@ -137,7 +137,7 @@ enum i40e_status_code i40e_init_lan_hmc(struct i40e_hw *hw, u32 txq_num, ret_code =I40E_ERR_INVALID_HMC_OBJ_COUNT ;DEBUGOUT3 ("i40e_init_lan_hmc: Rx context: asks for 0x%x but max allowed is 0x%x, returns error %d\n" , rxq_num, obj->max_cnt, ret_code); - goto init_lan_hmc_out; + goto free_hmc_out; }/* aggregate values into the full LAN object for later */
@@ -160,7 +160,7 @@ enum i40e_status_code i40e_init_lan_hmc(struct i40e_hw *hw, u32 txq_num, ret_code =I40E_ERR_INVALID_HMC_OBJ_COUNT ;DEBUGOUT3 ("i40e_init_lan_hmc: FCoE context: asks for 0x%x but max allowed is 0x%x, returns error %d\n" , fcoe_cntx_num, obj->max_cnt, ret_code); - goto init_lan_hmc_out; + goto free_hmc_out; }/* aggregate values into the full LAN object for later */
@@ -183,7 +183,7 @@ enum i40e_status_code i40e_init_lan_hmc(struct i40e_hw *hw, u32 txq_num, ret_code =I40E_ERR_INVALID_HMC_OBJ_COUNT ;DEBUGOUT3 ("i40e_init_lan_hmc: FCoE filter: asks for 0x%x but max allowed is 0x%x, returns error %d\n" , fcoe_filt_num, obj->max_cnt, ret_code); - goto init_lan_hmc_out; + goto free_hmc_out; }/* aggregate values into the full LAN object for later */
@@ -204,7 +204,7 @@ enum i40e_status_code i40e_init_lan_hmc(struct i40e_hw *hw, u32 txq_num, (sizeof (struct i40e_hmc_sd_entry ) * hw->hmc.sd_table.sd_cnt));if (ret_code) - goto init_lan_hmc_out; + goto free_hmc_out; hw->hmc.sd_table.sd_entry = (struct i40e_hmc_sd_entry *)hw->hmc.sd_table.addr.va; }
@@ -213,6 +213,11 @@ enum i40e_status_code i40e_init_lan_hmc(struct i40e_hw *hw, u32 txq_num, init_lan_hmc_out:return ret_code; +free_hmc_out: +if (hw->hmc.hmc_obj_virt_mem.va) +i40e_free_virt_mem (hw, &hw->hmc.hmc_obj_virt_mem); + +return ret_code; }/**
Signature · 1 line
2.13.6
PATCH 10/20 net/i40e/base: gracefully clean the resources
In reply to Qi ZhangAllocated resources were not freed in the event of failure in i40e_init_asq function. This patch gracefully handles all failures.
--- drivers/net/i40e/base/i40e_adminq.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/i40e/base/i40e_adminq.c +6 -1
@@ -97,6 +97,7 @@ enum i40e_status_code i40e_alloc_adminq_arq_ring(struct i40e_hw *hw)**/ void i40e_free_adminq_asq (struct i40e_hw *hw) { +i40e_free_virt_mem (hw, &hw->aq.asq.cmd_buf);i40e_free_dma_mem (hw, &hw->aq.asq.desc_buf); }
@@ -404,7 +405,7 @@ enum i40e_status_code i40e_init_asq(struct i40e_hw *hw)/* initialize base registers */ ret_code =i40e_config_asq_regs (hw);if (ret_code !=I40E_SUCCESS ) - goto init_adminq_free_rings; + goto init_config_regs;/* success! */ hw->aq.asq.count = hw->aq.num_asq_entries;
@@ -412,6 +413,10 @@ enum i40e_status_code i40e_init_asq(struct i40e_hw *hw) init_adminq_free_rings:i40e_free_adminq_asq (hw); +return ret_code; + +init_config_regs: +i40e_free_asq_bufs (hw); init_adminq_exit:return ret_code;
Signature · 1 line
2.13.6
PATCH 11/20 net/i40e/base: correct global reset timeout calculation
In reply to Qi ZhangThe wait time for Global Reset Ready steady state is calculated based on the GLGEN_RSTCTL.GRSTDEL value. However, current impelementation multiplied that value by 20 as a workaround for an issue in SOC platforms. This resulted in the maximum GLGEN_RSTCTL.GRSTDEL timeout of 6.5 seconds becoming 130 seconds, which is so long that the VMkernel watchdog thinks the kernel is frozen and triggers a PSOD.
--- drivers/net/i40e/base/i40e_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/base/i40e_common.c +1 -1
@@ -1342,7 +1342,7 @@ enum i40e_status_code i40e_pf_reset(struct i40e_hw *hw) I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >>I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT ; - grst_del = grst_del *20 ; + grst_del =min (grst_del *20 ,160U );for (cnt =0 ; cnt < grst_del; cnt++) { reg =rd32 (hw,I40E_GLGEN_RSTAT );
Signature · 1 line
2.13.6
PATCH 12/20 net/i40e/base: change AQ command for PHY access
In reply to Qi ZhangAdd new field - command flags with only one flag for now. Added flag tells FW that it shouldn't change page while accessing QSFP module, as it was set manually.
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 4 +++- drivers/net/i40e/base/i40e_common.c | 18 +++++++++++++----- drivers/net/i40e/base/i40e_prototype.h | 4 ++-- drivers/net/i40e/i40e_ethdev.c | 8 ++++---- 4 files changed, 22 insertions(+), 12 deletions(-)
drivers/net/i40e/base/i40e_adminq_cmd.h +3 -1
@@ -2276,7 +2276,9 @@ struct i40e_aqc_phy_register_access {#define I40E_AQ_PHY_REG_ACCESS_EXTERNAL 1#define I40E_AQ_PHY_REG_ACCESS_EXTERNAL_MODULE 2u8 dev_addres; -u8 reserved1[2 ]; +u8 cmd_flags; +#define I40E_AQ_PHY_REG_ACCESS_DONT_CHANGE_QSFP_PAGE 1 +u8 reserved1;__le32 reg_address;__le32 reg_value;u8 reserved2[4 ];
drivers/net/i40e/base/i40e_common.c +13 -5
@@ -6796,7 +6796,7 @@ static enum i40e_status_code i40e_led_get_reg(struct i40e_hw *hw, u16 led_addr,if (hw->flags &I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE ) { status =i40e_aq_get_phy_register (hw,I40E_AQ_PHY_REG_ACCESS_EXTERNAL , -I40E_PHY_COM_REG_PAGE , +I40E_PHY_COM_REG_PAGE , true,I40E_PHY_LED_PROV_REG_1 , reg_val,NULL ); }else {
@@ -6824,7 +6824,7 @@ static enum i40e_status_code i40e_led_set_reg(struct i40e_hw *hw, u16 led_addr,if (hw->flags &I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE ) { status =i40e_aq_set_phy_register (hw,I40E_AQ_PHY_REG_ACCESS_EXTERNAL , -I40E_PHY_COM_REG_PAGE , +I40E_PHY_COM_REG_PAGE , true,I40E_PHY_LED_PROV_REG_1 , reg_val,NULL ); }else {
@@ -6858,7 +6858,7 @@ enum i40e_status_code i40e_led_get_phy(struct i40e_hw *hw, u16 *led_addr,if (hw->flags &I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE ) { status =i40e_aq_get_phy_register (hw,I40E_AQ_PHY_REG_ACCESS_EXTERNAL , -I40E_PHY_COM_REG_PAGE , +I40E_PHY_COM_REG_PAGE , true,I40E_PHY_LED_PROV_REG_1 , ®_val_aq,NULL );if (status ==I40E_SUCCESS )
@@ -7064,6 +7064,7 @@ void i40e_write_rx_ctl(struct i40e_hw *hw, u32 reg_addr, u32 reg_val)* @hw: pointer to the hw struct * @phy_select: select which phy should be accessed * @dev_addr: PHY device address +* @page_change: enable auto page change * @reg_addr: PHY register address * @reg_val: new register value * @cmd_details: pointer to command details structure or NULL
@@ -7071,7 +7072,7 @@ void i40e_write_rx_ctl(struct i40e_hw *hw, u32 reg_addr, u32 reg_val)* Write the external PHY register. **/ enum i40e_status_code i40e_aq_set_phy_register (struct i40e_hw *hw, -u8 phy_select,u8 dev_addr, +u8 phy_select,u8 dev_addr,bool page_change,u32 reg_addr,u32 reg_val,struct i40e_asq_cmd_details *cmd_details) {
@@ -7088,6 +7089,9 @@ enum i40e_status_code i40e_aq_set_phy_register(struct i40e_hw *hw, cmd->reg_address =CPU_TO_LE32 (reg_addr); cmd->reg_value =CPU_TO_LE32 (reg_val); +if (!page_change) + cmd->cmd_flags =I40E_AQ_PHY_REG_ACCESS_DONT_CHANGE_QSFP_PAGE ; + status =i40e_asq_send_command (hw, &desc,NULL ,0 , cmd_details);return status;
@@ -7098,6 +7102,7 @@ enum i40e_status_code i40e_aq_set_phy_register(struct i40e_hw *hw,* @hw: pointer to the hw struct * @phy_select: select which phy should be accessed * @dev_addr: PHY device address +* @page_change: enable auto page change * @reg_addr: PHY register address * @reg_val: read register value * @cmd_details: pointer to command details structure or NULL
@@ -7105,7 +7110,7 @@ enum i40e_status_code i40e_aq_set_phy_register(struct i40e_hw *hw,* Read the external PHY register. **/ enum i40e_status_code i40e_aq_get_phy_register (struct i40e_hw *hw, -u8 phy_select,u8 dev_addr, +u8 phy_select,u8 dev_addr,bool page_change,u32 reg_addr,u32 *reg_val,struct i40e_asq_cmd_details *cmd_details) {
@@ -7121,6 +7126,9 @@ enum i40e_status_code i40e_aq_get_phy_register(struct i40e_hw *hw, cmd->dev_addres = dev_addr; cmd->reg_address =CPU_TO_LE32 (reg_addr); +if (!page_change) + cmd->cmd_flags =I40E_AQ_PHY_REG_ACCESS_DONT_CHANGE_QSFP_PAGE ; + status =i40e_asq_send_command (hw, &desc,NULL ,0 , cmd_details);if (!status) *reg_val =LE32_TO_CPU (cmd->reg_value);
drivers/net/i40e/base/i40e_prototype.h +2 -2
@@ -545,11 +545,11 @@ enum i40e_status_code i40e_aq_rx_ctl_write_register(struct i40e_hw *hw, struct i40e_asq_cmd_details *cmd_details);void i40e_write_rx_ctl (struct i40e_hw *hw,u32 reg_addr,u32 reg_val);enum i40e_status_code i40e_aq_set_phy_register (struct i40e_hw *hw, -u8 phy_select,u8 dev_addr, +u8 phy_select,u8 dev_addr,bool page_change,u32 reg_addr,u32 reg_val,struct i40e_asq_cmd_details *cmd_details);enum i40e_status_code i40e_aq_get_phy_register (struct i40e_hw *hw, -u8 phy_select,u8 dev_addr, +u8 phy_select,u8 dev_addr,bool page_change,u32 reg_addr,u32 *reg_val,struct i40e_asq_cmd_details *cmd_details);
drivers/net/i40e/i40e_ethdev.c +4 -4
@@ -11717,7 +11717,7 @@ static int i40e_get_module_info(struct rte_eth_dev *dev,case I40E_MODULE_TYPE_SFP : status =i40e_aq_get_phy_register (hw,I40E_AQ_PHY_REG_ACCESS_EXTERNAL_MODULE , -I40E_I2C_EEPROM_DEV_ADDR , +I40E_I2C_EEPROM_DEV_ADDR ,1 ,I40E_MODULE_SFF_8472_COMP , &sff8472_comp,NULL );if (status)
@@ -11725,7 +11725,7 @@ static int i40e_get_module_info(struct rte_eth_dev *dev, status =i40e_aq_get_phy_register (hw,I40E_AQ_PHY_REG_ACCESS_EXTERNAL_MODULE , -I40E_I2C_EEPROM_DEV_ADDR , +I40E_I2C_EEPROM_DEV_ADDR ,1 ,I40E_MODULE_SFF_8472_SWAP , &sff8472_swap,NULL );if (status)
@@ -11753,7 +11753,7 @@ static int i40e_get_module_info(struct rte_eth_dev *dev,/* Read from memory page 0. */ status =i40e_aq_get_phy_register (hw,I40E_AQ_PHY_REG_ACCESS_EXTERNAL_MODULE , -0 , +0 ,1 ,I40E_MODULE_REVISION_ADDR , &sff8636_rev,NULL );if (status)
@@ -11814,7 +11814,7 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev, } status =i40e_aq_get_phy_register (hw,I40E_AQ_PHY_REG_ACCESS_EXTERNAL_MODULE , - addr, offset, &value,NULL ); + addr, offset,1 , &value,NULL );if (status)return -EIO ; data[i] = (uint8_t )value;
Signature · 1 line
2.13.6
PATCH 13/20 net/i40e/base: add additional return code
In reply to Qi ZhangFirmware can return a busy state, so the i40e_asq_send_command will return I40E_ERR_NOT_READY.
--- drivers/net/i40e/base/i40e_adminq.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/i40e/base/i40e_adminq.c +2 -0
@@ -963,6 +963,8 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, cmd_completed = true;if ((enum i40e_admin_queue_err )retval ==I40E_AQ_RC_OK ) status =I40E_SUCCESS ; +else if ((enum i40e_admin_queue_err )retval ==I40E_AQ_RC_EBUSY ) + status =I40E_ERR_NOT_READY ;else status =I40E_ERR_ADMIN_QUEUE_ERROR ; hw->aq.asq_last_status = (enum i40e_admin_queue_err )retval;
Signature · 1 line
2.13.6
PATCH 14/20 net/i40e/base: add AQ command for rearrange NVM structure
In reply to Qi ZhangDuring switching between old NVM structure approach (called structured NVM) to new one (called flat NVM) or backward flash needs to be rearranged to required NVM structure. This is a part of transition from one NVM structure to another. The function is introduced to command firmware to start rearrangement process.
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 2 ++ drivers/net/i40e/base/i40e_common.c | 37 +++++++++++++++++++++++++++++++++ drivers/net/i40e/base/i40e_prototype.h | 3 +++ 3 files changed, 42 insertions(+)
drivers/net/i40e/base/i40e_adminq_cmd.h +2 -0
@@ -2293,6 +2293,8 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_phy_register_access);struct i40e_aqc_nvm_update {u8 command_flags;#define I40E_AQ_NVM_LAST_CMD 0x01 +#define I40E_AQ_NVM_REARRANGE_TO_FLAT 0x20 +#define I40E_AQ_NVM_REARRANGE_TO_STRUCT 0x40#define I40E_AQ_NVM_FLASH_ONLY 0x80#define I40E_AQ_NVM_PRESERVATION_FLAGS_SHIFT 1#define I40E_AQ_NVM_PRESERVATION_FLAGS_MASK 0x03
drivers/net/i40e/base/i40e_common.c +37 -0
@@ -4148,6 +4148,43 @@ enum i40e_status_code i40e_aq_update_nvm(struct i40e_hw *hw, u8 module_pointer, }/** +* i40e_aq_rearrange_nvm +* @hw: pointer to the hw struct +* @rearrange_nvm: defines direction of rearrangement +* @cmd_details: pointer to command details structure or NULL +* +* Rearrange NVM structure, available only for transition FW +**/ +enum i40e_status_code i40e_aq_rearrange_nvm (struct i40e_hw *hw, +u8 rearrange_nvm, +struct i40e_asq_cmd_details *cmd_details) +{ +struct i40e_aqc_nvm_update *cmd; +enum i40e_status_code status; +struct i40e_aq_desc desc; + +DEBUGFUNC ("i40e_aq_rearrange_nvm" ); + + cmd = (struct i40e_aqc_nvm_update *)&desc.params.raw; + +i40e_fill_default_direct_cmd_desc (&desc, i40e_aqc_opc_nvm_update); + + rearrange_nvm &= (I40E_AQ_NVM_REARRANGE_TO_FLAT | +I40E_AQ_NVM_REARRANGE_TO_STRUCT ); + +if (!rearrange_nvm) { + status =I40E_ERR_PARAM ; + goto i40e_aq_rearrange_nvm_exit; + } + + cmd->command_flags |= rearrange_nvm; + status =i40e_asq_send_command (hw, &desc,NULL ,0 , cmd_details); + +i40e_aq_rearrange_nvm_exit: +return status; +} + +/** * i40e_aq_nvm_progress * @hw: pointer to the hw struct * @progress: pointer to progress returned from AQ
drivers/net/i40e/base/i40e_prototype.h +3 -0
@@ -236,6 +236,9 @@ enum i40e_status_code i40e_aq_update_nvm(struct i40e_hw *hw, u8 module_pointer, u32 offset, u16 length, void *data, bool last_command, u8 preservation_flags, struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code i40e_aq_rearrange_nvm (struct i40e_hw *hw, +u8 rearrange_nvm, +struct i40e_asq_cmd_details *cmd_details);enum i40e_status_code i40e_aq_nvm_progress (struct i40e_hw *hw,u8 *progress,struct i40e_asq_cmd_details *cmd_details); enum i40e_status_code i40e_aq_get_lldp_mib(struct i40e_hw *hw, u8 bridge_type,
Signature · 1 line
2.13.6
PATCH 15/20 net/i40e/base: add FC threshold parameter for set MAC
In reply to Qi ZhangThis patch adds the default value for Flow Control Refresh Threshold to set_mac_config AdminQ command. Previously, calling this AdminQ command would overwrite the default value with 0.
--- drivers/net/i40e/base/i40e_common.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/i40e/base/i40e_common.c +4 -0
@@ -1876,6 +1876,10 @@ enum i40e_status_code i40e_aq_set_mac_config(struct i40e_hw *hw,if (crc_en) cmd->params |=I40E_AQ_SET_MAC_CONFIG_CRC_EN ; +#define I40E_AQ_SET_MAC_CONFIG_FC_DEFAULT_THRESHOLD 0x7FFF + cmd->fc_refresh_threshold = +CPU_TO_LE16 (I40E_AQ_SET_MAC_CONFIG_FC_DEFAULT_THRESHOLD ); + status =i40e_asq_send_command (hw, &desc,NULL ,0 , cmd_details);return status;
Signature · 1 line
2.13.6
PATCH 16/20 net/i40e/base: add support for carlsville device
In reply to Qi ZhangCarlsville Device use 10GBASE-T/1GBASE-T PHY with additional support for 5GBASE-T/2.5GBASE-T.
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 59 +++++++++++++++++++++++++++++++++ drivers/net/i40e/base/i40e_common.c | 10 ++++++ drivers/net/i40e/base/i40e_devids.h | 3 ++ drivers/net/i40e/base/i40e_type.h | 8 +++++ 4 files changed, 80 insertions(+)
drivers/net/i40e/base/i40e_adminq_cmd.h +59 -0
@@ -1933,12 +1933,56 @@ enum i40e_aq_phy_type {I40E_PHY_TYPE_25GBASE_LR =0x22 ,I40E_PHY_TYPE_25GBASE_AOC =0x23 ,I40E_PHY_TYPE_25GBASE_ACC =0x24 , +#ifdef CARLSVILLE_HW +I40E_PHY_TYPE_2_5GBASE_T =0x30 , +I40E_PHY_TYPE_5GBASE_T =0x31 , +#endifI40E_PHY_TYPE_MAX ,I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP =0xFD ,I40E_PHY_TYPE_EMPTY =0xFE , I40E_PHY_TYPE_DEFAULT = 0xFF, }; +#ifdef CARLSVILLE_HW +#define I40E_PHY_TYPES_BITMASK (BIT_ULL(I40E_PHY_TYPE_SGMII) | \ + BIT_ULL(I40E_PHY_TYPE_1000BASE_KX) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_KX4) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_KR) | \ + BIT_ULL(I40E_PHY_TYPE_40GBASE_KR4) | \ + BIT_ULL(I40E_PHY_TYPE_XAUI) | \ + BIT_ULL(I40E_PHY_TYPE_XFI) | \ + BIT_ULL(I40E_PHY_TYPE_SFI) | \ + BIT_ULL(I40E_PHY_TYPE_XLAUI) | \ + BIT_ULL(I40E_PHY_TYPE_XLPPI) | \ + BIT_ULL(I40E_PHY_TYPE_40GBASE_CR4_CU) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_CR1_CU) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_AOC) | \ + BIT_ULL(I40E_PHY_TYPE_40GBASE_AOC) | \ + BIT_ULL(I40E_PHY_TYPE_UNRECOGNIZED) | \ + BIT_ULL(I40E_PHY_TYPE_UNSUPPORTED) | \ + BIT_ULL(I40E_PHY_TYPE_100BASE_TX) | \ + BIT_ULL(I40E_PHY_TYPE_1000BASE_T) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_T) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_SR) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_LR) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_SFPP_CU) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_CR1) | \ + BIT_ULL(I40E_PHY_TYPE_40GBASE_CR4) | \ + BIT_ULL(I40E_PHY_TYPE_40GBASE_SR4) | \ + BIT_ULL(I40E_PHY_TYPE_40GBASE_LR4) | \ + BIT_ULL(I40E_PHY_TYPE_1000BASE_SX) | \ + BIT_ULL(I40E_PHY_TYPE_1000BASE_LX) | \ + BIT_ULL(I40E_PHY_TYPE_1000BASE_T_OPTICAL) | \ + BIT_ULL(I40E_PHY_TYPE_20GBASE_KR2) | \ + BIT_ULL(I40E_PHY_TYPE_25GBASE_KR) | \ + BIT_ULL(I40E_PHY_TYPE_25GBASE_CR) | \ + BIT_ULL(I40E_PHY_TYPE_25GBASE_SR) | \ + BIT_ULL(I40E_PHY_TYPE_25GBASE_LR) | \ + BIT_ULL(I40E_PHY_TYPE_25GBASE_AOC) | \ + BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC) | \ + BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T) | \ + BIT_ULL(I40E_PHY_TYPE_5GBASE_T)) +#else #define I40E_PHY_TYPES_BITMASK (BIT_ULL(I40E_PHY_TYPE_SGMII) | \ BIT_ULL(I40E_PHY_TYPE_1000BASE_KX) | \ BIT_ULL(I40E_PHY_TYPE_10GBASE_KX4) | \
@@ -1975,18 +2019,29 @@ enum i40e_aq_phy_type { BIT_ULL(I40E_PHY_TYPE_25GBASE_LR) | \ BIT_ULL(I40E_PHY_TYPE_25GBASE_AOC) | \ BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC)) +#endif +#ifdef CARLSVILLE_HW +#define I40E_LINK_SPEED_2_5GB_SHIFT 0x0 +#endif #define I40E_LINK_SPEED_100MB_SHIFT 0x1#define I40E_LINK_SPEED_1000MB_SHIFT 0x2#define I40E_LINK_SPEED_10GB_SHIFT 0x3#define I40E_LINK_SPEED_40GB_SHIFT 0x4#define I40E_LINK_SPEED_20GB_SHIFT 0x5#define I40E_LINK_SPEED_25GB_SHIFT 0x6 +#ifdef CARLSVILLE_HW +#define I40E_LINK_SPEED_5GB_SHIFT 0x7 +#endif enum i40e_aq_link_speed {I40E_LINK_SPEED_UNKNOWN =0 ,I40E_LINK_SPEED_100MB = (1 <<I40E_LINK_SPEED_100MB_SHIFT ),I40E_LINK_SPEED_1GB = (1 <<I40E_LINK_SPEED_1000MB_SHIFT ), +#ifdef CARLSVILLE_HW +I40E_LINK_SPEED_2_5GB = (1 <<I40E_LINK_SPEED_2_5GB_SHIFT ), +I40E_LINK_SPEED_5GB = (1 <<I40E_LINK_SPEED_5GB_SHIFT ), +#endif I40E_LINK_SPEED_10GB = (1 <<I40E_LINK_SPEED_10GB_SHIFT ),I40E_LINK_SPEED_40GB = (1 <<I40E_LINK_SPEED_40GB_SHIFT ),I40E_LINK_SPEED_20GB = (1 <<I40E_LINK_SPEED_20GB_SHIFT ),
@@ -2032,6 +2087,10 @@ struct i40e_aq_get_phy_abilities_resp {#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08#define I40E_AQ_PHY_TYPE_EXT_25G_AOC 0x10#define I40E_AQ_PHY_TYPE_EXT_25G_ACC 0x20 +#ifdef CARLSVILLE_HW +#define I40E_AQ_PHY_TYPE_EXT_2_5GBASE_T 0x40 +#define I40E_AQ_PHY_TYPE_EXT_5GBASE_T 0x80 +#endif u8 fec_cfg_curr_mod_ext_info;#define I40E_AQ_ENABLE_FEC_KR 0x01#define I40E_AQ_ENABLE_FEC_RS 0x02
drivers/net/i40e/base/i40e_common.c +10 -0
@@ -35,6 +35,9 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)case I40E_DEV_ID_QSFP_C :case I40E_DEV_ID_10G_BASE_T :case I40E_DEV_ID_10G_BASE_T4 : +#ifdef CARLSVILLE_HW +case I40E_DEV_ID_10G_BASE_T_BC : +#endif case I40E_DEV_ID_20G_KR2 :case I40E_DEV_ID_20G_KR2_A :case I40E_DEV_ID_25G_B :
@@ -1260,6 +1263,10 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)break ;case I40E_PHY_TYPE_100BASE_TX :case I40E_PHY_TYPE_1000BASE_T : +#ifdef CARLSVILLE_HW +case I40E_PHY_TYPE_2_5GBASE_T : +case I40E_PHY_TYPE_5GBASE_T : +#endif case I40E_PHY_TYPE_10GBASE_T : media =I40E_MEDIA_TYPE_BASET ;break ;
@@ -6682,6 +6689,9 @@ enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,break ;case I40E_DEV_ID_10G_BASE_T :case I40E_DEV_ID_10G_BASE_T4 : +#ifdef CARLSVILLE_HW +case I40E_DEV_ID_10G_BASE_T_BC : +#endif case I40E_DEV_ID_10G_BASE_T_X722 :case I40E_DEV_ID_25G_B :case I40E_DEV_ID_25G_SFP28 :
drivers/net/i40e/base/i40e_devids.h +3 -0
@@ -22,6 +22,9 @@#define I40E_DEV_ID_10G_BASE_T4 0x1589#define I40E_DEV_ID_25G_B 0x158A#define I40E_DEV_ID_25G_SFP28 0x158B +#ifdef CARLSVILLE_HW +#define I40E_DEV_ID_10G_BASE_T_BC 0x15FF +#endif #if defined(INTEGRATED_VF ) || defined(VF_DRIVER ) || defined(I40E_NDIS_SUPPORT )#define I40E_DEV_ID_VF 0x154C#define I40E_DEV_ID_VF_HV 0x1571
drivers/net/i40e/base/i40e_type.h +8 -0
@@ -329,6 +329,14 @@ struct i40e_phy_info { I40E_PHY_TYPE_OFFSET)#define I40E_CAP_PHY_TYPE_25GBASE_ACC BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC + \ I40E_PHY_TYPE_OFFSET) +#ifdef CARLSVILLE_HW +/* Offset for 2.5G/5G PHY Types value to bit number conversion */ +#define I40E_PHY_TYPE_OFFSET2 (-10) +#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T + \ + I40E_PHY_TYPE_OFFSET2) +#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T + \ + I40E_PHY_TYPE_OFFSET2) +#endif #define I40E_HW_CAP_MAX_GPIO 30#define I40E_HW_CAP_MDIO_PORT_MODE_MDIO 0#define I40E_HW_CAP_MDIO_PORT_MODE_I2C 1
Signature · 1 line
2.13.6
PATCH 17/20 net/i40e/base: wrap admin queue set/get PHY register funcs
In reply to Qi ZhangThese two functions are currently only used in the LED get/set functions, which are not apart of the VF driver. So the i40e_aq_set/get_phy_register functions should be wrapped so they can be removed from the VF driver.
This was brought up in the Linux community that these functions in the VF driver had no callers in the tree, so they should be removed.
--- drivers/net/i40e/base/i40e_common.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/i40e/base/i40e_common.c +2 -0
@@ -7110,6 +7110,7 @@ void i40e_write_rx_ctl(struct i40e_hw *hw, u32 reg_addr, u32 reg_val)wr32 (hw, reg_addr, reg_val); } +#ifdef PF_DRIVER /** * i40e_aq_set_phy_register * @hw: pointer to the hw struct
@@ -7187,6 +7188,7 @@ enum i40e_status_code i40e_aq_get_phy_register(struct i40e_hw *hw, return status; } +#endif /* PF_DRIVER */ #ifdef VF_DRIVER /**
Signature · 1 line
2.13.6
PATCH 18/20 net/i40e/base: add capability flag for stopping FW LLDP
In reply to Qi ZhangAdd HW capability flag to indicate that firmware supports stopping LLDP agent. This feature has been added in FW API 1.7 for XL710 devices and 1.6 for X722. Also raise expected minor version number for X722 FW API to 6.
--- drivers/net/i40e/base/i40e_adminq.c | 6 ++++++ drivers/net/i40e/base/i40e_adminq_cmd.h | 4 +++- drivers/net/i40e/base/i40e_common.c | 3 +++ drivers/net/i40e/base/i40e_type.h | 1 + 4 files changed, 13 insertions(+), 1 deletion(-)
drivers/net/i40e/base/i40e_adminq.c +6 -0
@@ -668,6 +668,12 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) hw->aq.api_maj_ver == I40E_FW_API_VERSION_MAJOR && hw->aq.api_min_ver >= I40E_MINOR_VER_GET_LINK_INFO_XL710) { hw->flags |=I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE ; + hw->flags |=I40E_HW_FLAG_FW_LLDP_STOPPABLE ; + } +if (hw->mac.type ==I40E_MAC_X722 && + hw->aq.api_maj_ver ==I40E_FW_API_VERSION_MAJOR && + hw->aq.api_min_ver >=I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722 ) { + hw->flags |=I40E_HW_FLAG_FW_LLDP_STOPPABLE ; }/* Newer versions of firmware require lock when reading the NVM */
drivers/net/i40e/base/i40e_adminq_cmd.h +3 -1
@@ -12,7 +12,7 @@*/ #define I40E_FW_API_VERSION_MAJOR 0x0001 -#define I40E_FW_API_VERSION_MINOR_X722 0x0005 +#define I40E_FW_API_VERSION_MINOR_X722 0x0006#define I40E_FW_API_VERSION_MINOR_X710 0x0007#define I40E_FW_MINOR_VERSION (_h) ((_h)->mac.type == I40E_MAC_XL710 ? \
@@ -21,6 +21,8 @@/* API version 1.7 implements additional link and PHY-specific APIs */ #define I40E_MINOR_VER_GET_LINK_INFO_XL710 0x0007 +/* API version 1.6 for X722 devices adds ability to stop FW LLDP agent */ +#define I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722 0x0006struct i40e_aq_desc {__le16 flags;
drivers/net/i40e/base/i40e_common.c +3 -0
@@ -4552,6 +4552,9 @@ i40e_aq_set_dcb_parameters(struct i40e_hw *hw, bool dcb_enable, (struct i40e_aqc_set_dcb_parameters *)&desc.params.raw;enum i40e_status_code status; +if (!(hw->flags &I40E_HW_FLAG_FW_LLDP_STOPPABLE )) +return I40E_ERR_DEVICE_NOT_SUPPORTED ; +i40e_fill_default_direct_cmd_desc (&desc, i40e_aqc_opc_set_dcb_parameters);
drivers/net/i40e/base/i40e_type.h +1 -0
@@ -720,6 +720,7 @@ struct i40e_hw {#define I40E_HW_FLAG_802_1AD_CAPABLE BIT_ULL(1)#define I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE BIT_ULL(2)#define I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK BIT_ULL(3) +#define I40E_HW_FLAG_FW_LLDP_STOPPABLE BIT_ULL(4)u64 flags;/* Used in set switch config AQ command */
Signature · 1 line
2.13.6
PATCH 19/20 net/i40e/base: add new TR bits used for cloud filters
In reply to Qi ZhangThere is a new set of TR bits that can be used when replacing the cloud filters so add them in. Also added a check to make sure that the replace cloud filters AQ command doesn't get executed on an X722 since it is not supported there.
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 3 ++- drivers/net/i40e/base/i40e_common.c | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)
drivers/net/i40e/base/i40e_adminq_cmd.h +2 -1
@@ -1554,7 +1554,8 @@ struct i40e_aqc_replace_cloud_filters_cmd {u8 old_filter_type;u8 new_filter_type;u8 tr_bit; -u8 reserved[4 ]; +u8 tr_bit2; +u8 reserved[3 ];__le32 addr_high;__le32 addr_low; };
drivers/net/i40e/base/i40e_common.c +9 -0
@@ -5990,6 +5990,14 @@ i40e_status_code i40e_aq_replace_cloud_filters(struct i40e_hw *hw,enum i40e_status_code status =I40E_SUCCESS ;int i =0 ; +/* X722 doesn't support this command */ +if (hw->mac.type ==I40E_MAC_X722 ) +return I40E_ERR_DEVICE_NOT_SUPPORTED ; + +/* need FW version greater than 6.00 */ +if (hw->aq.fw_maj_ver <6 ) +return I40E_NOT_SUPPORTED ; +i40e_fill_default_direct_cmd_desc (&desc, i40e_aqc_opc_replace_cloud_filters);
@@ -5999,6 +6007,7 @@ i40e_status_code i40e_aq_replace_cloud_filters(struct i40e_hw *hw, cmd->new_filter_type = filters->new_filter_type; cmd->valid_flags = filters->valid_flags; cmd->tr_bit = filters->tr_bit; + cmd->tr_bit2 = filters->tr_bit2; status =i40e_asq_send_command (hw, &desc, cmd_buf,sizeof (struct i40e_aqc_replace_cloud_filters_cmd_buf ),NULL );
Signature · 1 line
2.13.6
PATCH 20/20 net/i40e/base: update readme
In reply to Qi ZhangUpdate share code release version in readme.
--- drivers/net/i40e/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/base/README +1 -1
@@ -34,7 +34,7 @@ Intel® I40E driver ================== This directory contains source code of FreeBSD i40e driver of version -cid-i40e.2018.01.02.tar.gz released by the team which develops +cid-i40e.2018.09.13.tar.gz released by the team which develops basic drivers for any i40e NIC. The directory of base/ contains the original source package. This driver is valid for the product(s) listed below
Signature · 1 line
2.13.6
Quoted 64 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qi Zhang
Sent: Tuesday, September 25, 2018 10:34 AM
To: Xing, Beilei <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Zhang, Helin <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: [dpdk-dev] [PATCH 00/20] base code updateUpdate base code to cid-i40e.2018.09.13.tar.gz, which include couple AQ command enhancements and bug fixes. Also all source files' license text is replaced with SPDX tag.
Qi Zhang (20):
net/i40e/base: replace license text with SPDX tagnet/i40e/base: fix partition id calculation for X722net/i40e/base: introduce PHY type bitmasknet/i40e/base: enable cloud filter mode for switch confignet/i40e/base: add admin queue definitions for cloud filtersnet/i40e/base: enable cloud filters via tc flowernet/i40e/base: improve the polling mechanismnet/i40e/base: read LLDP config area with correct endiannessnet/i40e/base: properly clean resourcesnet/i40e/base: gracefully clean the resourcesnet/i40e/base: correct global reset timeout calculationnet/i40e/base: change AQ command for PHY accessnet/i40e/base: add additional return codenet/i40e/base: add AQ command for rearrange NVM structurenet/i40e/base: add FC threshold parameter for set MACnet/i40e/base: add support for carlsville devicenet/i40e/base: wrap admin queue set/get PHY register funcsnet/i40e/base: add capability flag for stopping FW LLDPnet/i40e/base: add new TR bits used for cloud filtersnet/i40e/base: update readmedrivers/net/i40e/base/README | 2 +- drivers/net/i40e/base/i40e_adminq.c | 50 +++---- drivers/net/i40e/base/i40e_adminq.h | 35 +---- drivers/net/i40e/base/i40e_adminq_cmd.h | 234 +++++++++++++++++++++++++----- drivers/net/i40e/base/i40e_alloc.h | 35 +---- drivers/net/i40e/base/i40e_common.c | 250 ++++++++++++++++++++++--- ------- drivers/net/i40e/base/i40e_dcb.c | 46 ++---- drivers/net/i40e/base/i40e_dcb.h | 35 +---- drivers/net/i40e/base/i40e_devids.h | 38 +---- drivers/net/i40e/base/i40e_diag.c | 35 +---- drivers/net/i40e/base/i40e_diag.h | 35 +---- drivers/net/i40e/base/i40e_hmc.c | 35 +---- drivers/net/i40e/base/i40e_hmc.h | 35 +---- drivers/net/i40e/base/i40e_lan_hmc.c | 50 ++----- drivers/net/i40e/base/i40e_lan_hmc.h | 35 +---- drivers/net/i40e/base/i40e_nvm.c | 35 +---- drivers/net/i40e/base/i40e_osdep.h | 34 +---- drivers/net/i40e/base/i40e_prototype.h | 76 ++++------ drivers/net/i40e/base/i40e_register.h | 35 +---- drivers/net/i40e/base/i40e_status.h | 35 +---- drivers/net/i40e/base/i40e_type.h | 58 ++++---- drivers/net/i40e/base/virtchnl.h | 35 +---- drivers/net/i40e/i40e_ethdev.c | 38 ++--- drivers/net/i40e/i40e_flow.c | 10 +- 24 files changed, 529 insertions(+), 777 deletions(-)
Quoted 2 lines
--
2.13.6
Zhang, Qi Z
AppliedQuoted 75 lines
-----Original Message-----
From: Xing, Beilei
Sent: Thursday, September 27, 2018 3:39 PM
To: Zhang, Qi Z <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Zhang, Helin <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: RE: [dpdk-dev] [PATCH 00/20] base code updateQuoted 34 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qi Zhang
Sent: Tuesday, September 25, 2018 10:34 AM
To: Xing, Beilei <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Zhang, Helin <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: [dpdk-dev] [PATCH 00/20] base code updateUpdate base code to cid-i40e.2018.09.13.tar.gz, which include couple AQ command enhancements and bug fixes. Also all source files' license text is replaced with SPDX tag.
Qi Zhang (20):
net/i40e/base: replace license text with SPDX tagnet/i40e/base: fix partition id calculation for X722net/i40e/base: introduce PHY type bitmasknet/i40e/base: enable cloud filter mode for switch confignet/i40e/base: add admin queue definitions for cloud filtersnet/i40e/base: enable cloud filters via tc flowernet/i40e/base: improve the polling mechanismnet/i40e/base: read LLDP config area with correct endiannessnet/i40e/base: properly clean resourcesnet/i40e/base: gracefully clean the resourcesnet/i40e/base: correct global reset timeout calculationnet/i40e/base: change AQ command for PHY accessnet/i40e/base: add additional return codenet/i40e/base: add AQ command for rearrange NVM structurenet/i40e/base: add FC threshold parameter for set MACnet/i40e/base: add support for carlsville devicenet/i40e/base: wrap admin queue set/get PHY register funcsnet/i40e/base: add capability flag for stopping FW LLDPnet/i40e/base: add new TR bits used for cloud filtersnet/i40e/base: update readmeQuoted 7 lines
drivers/net/i40e/base/README | 2 +- drivers/net/i40e/base/i40e_adminq.c | 50 +++---- drivers/net/i40e/base/i40e_adminq.h | 35 +---- drivers/net/i40e/base/i40e_adminq_cmd.h | 234 +++++++++++++++++++++++++----- drivers/net/i40e/base/i40e_alloc.h | 35 +---- drivers/net/i40e/base/i40e_common.c | 250++++++++++++++++++++++---
Quoted 21 lines
-------
drivers/net/i40e/base/i40e_dcb.c | 46 ++---- drivers/net/i40e/base/i40e_dcb.h | 35 +---- drivers/net/i40e/base/i40e_devids.h | 38 +---- drivers/net/i40e/base/i40e_diag.c | 35 +---- drivers/net/i40e/base/i40e_diag.h | 35 +---- drivers/net/i40e/base/i40e_hmc.c | 35 +---- drivers/net/i40e/base/i40e_hmc.h | 35 +---- drivers/net/i40e/base/i40e_lan_hmc.c | 50 ++----- drivers/net/i40e/base/i40e_lan_hmc.h | 35 +---- drivers/net/i40e/base/i40e_nvm.c | 35 +---- drivers/net/i40e/base/i40e_osdep.h | 34 +---- drivers/net/i40e/base/i40e_prototype.h | 76 ++++------ drivers/net/i40e/base/i40e_register.h | 35 +---- drivers/net/i40e/base/i40e_status.h | 35 +---- drivers/net/i40e/base/i40e_type.h | 58 ++++---- drivers/net/i40e/base/virtchnl.h | 35 +---- drivers/net/i40e/i40e_ethdev.c | 38 ++--- drivers/net/i40e/i40e_flow.c | 10 +- 24 files changed, 529 insertions(+), 777 deletions(-)
Quoted 4 lines
Quoted 2 lines
--
2.13.6Acked-by Beilei Xing <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi