diff options
author | Shannon Nelson <shannon.nelson@intel.com> | 2016-05-16 13:26:44 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2016-06-27 19:10:58 -0400 |
commit | 2d1de8283f371467c58e16ed0b27372e369f2568 (patch) | |
tree | 7c93ff1446a9cbe665ffab8638180a2ca8ee1e7b | |
parent | 5bc160319f8a1e7ea23d7136e725f9e6a4a7628a (diff) |
i40e: add VSI info to macaddr messages
Since the macaddr add and delete happens asynchronously, error
messages don't easily get associated to the actual request. Here
we add a bit of information to the error messages to help
determine the source of the error.
Change-ID: Id2d6df5287141c3579677d72d8bd21122823d79f
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index d6a5106263ce..880602f95f0c 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c | |||
@@ -1837,6 +1837,7 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi) | |||
1837 | struct i40e_hw *hw = &vsi->back->hw; | 1837 | struct i40e_hw *hw = &vsi->back->hw; |
1838 | bool promisc_forced_on = false; | 1838 | bool promisc_forced_on = false; |
1839 | bool add_happened = false; | 1839 | bool add_happened = false; |
1840 | char vsi_name[16] = "PF"; | ||
1840 | int filter_list_len = 0; | 1841 | int filter_list_len = 0; |
1841 | u32 changed_flags = 0; | 1842 | u32 changed_flags = 0; |
1842 | i40e_status aq_ret = 0; | 1843 | i40e_status aq_ret = 0; |
@@ -1864,6 +1865,11 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi) | |||
1864 | INIT_LIST_HEAD(&tmp_del_list); | 1865 | INIT_LIST_HEAD(&tmp_del_list); |
1865 | INIT_LIST_HEAD(&tmp_add_list); | 1866 | INIT_LIST_HEAD(&tmp_add_list); |
1866 | 1867 | ||
1868 | if (vsi->type == I40E_VSI_SRIOV) | ||
1869 | snprintf(vsi_name, sizeof(vsi_name) - 1, "VF %d", vsi->vf_id); | ||
1870 | else if (vsi->type != I40E_VSI_MAIN) | ||
1871 | snprintf(vsi_name, sizeof(vsi_name) - 1, "vsi %d", vsi->seid); | ||
1872 | |||
1867 | if (vsi->flags & I40E_VSI_FLAG_FILTER_CHANGED) { | 1873 | if (vsi->flags & I40E_VSI_FLAG_FILTER_CHANGED) { |
1868 | vsi->flags &= ~I40E_VSI_FLAG_FILTER_CHANGED; | 1874 | vsi->flags &= ~I40E_VSI_FLAG_FILTER_CHANGED; |
1869 | 1875 | ||
@@ -1958,8 +1964,8 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi) | |||
1958 | if (aq_ret && aq_err != I40E_AQ_RC_ENOENT) { | 1964 | if (aq_ret && aq_err != I40E_AQ_RC_ENOENT) { |
1959 | retval = -EIO; | 1965 | retval = -EIO; |
1960 | dev_err(&pf->pdev->dev, | 1966 | dev_err(&pf->pdev->dev, |
1961 | "ignoring delete macvlan error, err %s, aq_err %s while flushing a full buffer\n", | 1967 | "ignoring delete macvlan error on %s, err %s, aq_err %s while flushing a full buffer\n", |
1962 | 1968 | vsi_name, | |
1963 | i40e_stat_str(hw, aq_ret), | 1969 | i40e_stat_str(hw, aq_ret), |
1964 | i40e_aq_str(hw, aq_err)); | 1970 | i40e_aq_str(hw, aq_err)); |
1965 | } | 1971 | } |
@@ -1979,7 +1985,8 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi) | |||
1979 | 1985 | ||
1980 | if (aq_ret && aq_err != I40E_AQ_RC_ENOENT) | 1986 | if (aq_ret && aq_err != I40E_AQ_RC_ENOENT) |
1981 | dev_info(&pf->pdev->dev, | 1987 | dev_info(&pf->pdev->dev, |
1982 | "ignoring delete macvlan error, err %s aq_err %s\n", | 1988 | "ignoring delete macvlan error on %s, err %s aq_err %s\n", |
1989 | vsi_name, | ||
1983 | i40e_stat_str(hw, aq_ret), | 1990 | i40e_stat_str(hw, aq_ret), |
1984 | i40e_aq_str(hw, aq_err)); | 1991 | i40e_aq_str(hw, aq_err)); |
1985 | } | 1992 | } |
@@ -2056,7 +2063,8 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi) | |||
2056 | if (add_happened && aq_ret && aq_err != I40E_AQ_RC_EINVAL) { | 2063 | if (add_happened && aq_ret && aq_err != I40E_AQ_RC_EINVAL) { |
2057 | retval = i40e_aq_rc_to_posix(aq_ret, aq_err); | 2064 | retval = i40e_aq_rc_to_posix(aq_ret, aq_err); |
2058 | dev_info(&pf->pdev->dev, | 2065 | dev_info(&pf->pdev->dev, |
2059 | "add filter failed, err %s aq_err %s\n", | 2066 | "add filter failed on %s, err %s aq_err %s\n", |
2067 | vsi_name, | ||
2060 | i40e_stat_str(hw, aq_ret), | 2068 | i40e_stat_str(hw, aq_ret), |
2061 | i40e_aq_str(hw, aq_err)); | 2069 | i40e_aq_str(hw, aq_err)); |
2062 | if ((hw->aq.asq_last_status == I40E_AQ_RC_ENOSPC) && | 2070 | if ((hw->aq.asq_last_status == I40E_AQ_RC_ENOSPC) && |
@@ -2065,7 +2073,8 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi) | |||
2065 | promisc_forced_on = true; | 2073 | promisc_forced_on = true; |
2066 | set_bit(__I40E_FILTER_OVERFLOW_PROMISC, | 2074 | set_bit(__I40E_FILTER_OVERFLOW_PROMISC, |
2067 | &vsi->state); | 2075 | &vsi->state); |
2068 | dev_info(&pf->pdev->dev, "promiscuous mode forced on\n"); | 2076 | dev_info(&pf->pdev->dev, "promiscuous mode forced on %s\n", |
2077 | vsi_name); | ||
2069 | } | 2078 | } |
2070 | } | 2079 | } |
2071 | } | 2080 | } |
@@ -2089,7 +2098,8 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi) | |||
2089 | retval = i40e_aq_rc_to_posix(aq_ret, | 2098 | retval = i40e_aq_rc_to_posix(aq_ret, |
2090 | hw->aq.asq_last_status); | 2099 | hw->aq.asq_last_status); |
2091 | dev_info(&pf->pdev->dev, | 2100 | dev_info(&pf->pdev->dev, |
2092 | "set multi promisc failed, err %s aq_err %s\n", | 2101 | "set multi promisc failed on %s, err %s aq_err %s\n", |
2102 | vsi_name, | ||
2093 | i40e_stat_str(hw, aq_ret), | 2103 | i40e_stat_str(hw, aq_ret), |
2094 | i40e_aq_str(hw, hw->aq.asq_last_status)); | 2104 | i40e_aq_str(hw, hw->aq.asq_last_status)); |
2095 | } | 2105 | } |
@@ -2124,7 +2134,8 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi) | |||
2124 | retval = i40e_aq_rc_to_posix(aq_ret, | 2134 | retval = i40e_aq_rc_to_posix(aq_ret, |
2125 | hw->aq.asq_last_status); | 2135 | hw->aq.asq_last_status); |
2126 | dev_info(&pf->pdev->dev, | 2136 | dev_info(&pf->pdev->dev, |
2127 | "Set default VSI failed, err %s, aq_err %s\n", | 2137 | "Set default VSI failed on %s, err %s, aq_err %s\n", |
2138 | vsi_name, | ||
2128 | i40e_stat_str(hw, aq_ret), | 2139 | i40e_stat_str(hw, aq_ret), |
2129 | i40e_aq_str(hw, | 2140 | i40e_aq_str(hw, |
2130 | hw->aq.asq_last_status)); | 2141 | hw->aq.asq_last_status)); |
@@ -2141,7 +2152,8 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi) | |||
2141 | i40e_aq_rc_to_posix(aq_ret, | 2152 | i40e_aq_rc_to_posix(aq_ret, |
2142 | hw->aq.asq_last_status); | 2153 | hw->aq.asq_last_status); |
2143 | dev_info(&pf->pdev->dev, | 2154 | dev_info(&pf->pdev->dev, |
2144 | "set unicast promisc failed, err %s, aq_err %s\n", | 2155 | "set unicast promisc failed on %s, err %s, aq_err %s\n", |
2156 | vsi_name, | ||
2145 | i40e_stat_str(hw, aq_ret), | 2157 | i40e_stat_str(hw, aq_ret), |
2146 | i40e_aq_str(hw, | 2158 | i40e_aq_str(hw, |
2147 | hw->aq.asq_last_status)); | 2159 | hw->aq.asq_last_status)); |
@@ -2155,7 +2167,8 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi) | |||
2155 | i40e_aq_rc_to_posix(aq_ret, | 2167 | i40e_aq_rc_to_posix(aq_ret, |
2156 | hw->aq.asq_last_status); | 2168 | hw->aq.asq_last_status); |
2157 | dev_info(&pf->pdev->dev, | 2169 | dev_info(&pf->pdev->dev, |
2158 | "set multicast promisc failed, err %s, aq_err %s\n", | 2170 | "set multicast promisc failed on %s, err %s, aq_err %s\n", |
2171 | vsi_name, | ||
2159 | i40e_stat_str(hw, aq_ret), | 2172 | i40e_stat_str(hw, aq_ret), |
2160 | i40e_aq_str(hw, | 2173 | i40e_aq_str(hw, |
2161 | hw->aq.asq_last_status)); | 2174 | hw->aq.asq_last_status)); |