Commit 6f404e441d169afc90929ef5e451ec9779c1f11a

Authored by Michał Mirosław
Committed by David S. Miller
1 parent ebde6f8acb

net: Change netdev_fix_features messages loglevel

Those reduced to DEBUG can possibly be triggered by unprivileged processes
and are nothing exceptional. Illegal checksum combinations can only be
caused by driver bug, so promote those messages to WARN.

Since GSO without SG will now only cause DEBUG message from
netdev_fix_features(), remove the workaround from register_netdevice().

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 8 additions and 14 deletions Side-by-side Diff

... ... @@ -5186,27 +5186,27 @@
5186 5186 /* Fix illegal checksum combinations */
5187 5187 if ((features & NETIF_F_HW_CSUM) &&
5188 5188 (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {
5189   - netdev_info(dev, "mixed HW and IP checksum settings.\n");
  5189 + netdev_warn(dev, "mixed HW and IP checksum settings.\n");
5190 5190 features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM);
5191 5191 }
5192 5192  
5193 5193 if ((features & NETIF_F_NO_CSUM) &&
5194 5194 (features & (NETIF_F_HW_CSUM|NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {
5195   - netdev_info(dev, "mixed no checksumming and other settings.\n");
  5195 + netdev_warn(dev, "mixed no checksumming and other settings.\n");
5196 5196 features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM|NETIF_F_HW_CSUM);
5197 5197 }
5198 5198  
5199 5199 /* Fix illegal SG+CSUM combinations. */
5200 5200 if ((features & NETIF_F_SG) &&
5201 5201 !(features & NETIF_F_ALL_CSUM)) {
5202   - netdev_info(dev,
5203   - "Dropping NETIF_F_SG since no checksum feature.\n");
  5202 + netdev_dbg(dev,
  5203 + "Dropping NETIF_F_SG since no checksum feature.\n");
5204 5204 features &= ~NETIF_F_SG;
5205 5205 }
5206 5206  
5207 5207 /* TSO requires that SG is present as well. */
5208 5208 if ((features & NETIF_F_ALL_TSO) && !(features & NETIF_F_SG)) {
5209   - netdev_info(dev, "Dropping TSO features since no SG feature.\n");
  5209 + netdev_dbg(dev, "Dropping TSO features since no SG feature.\n");
5210 5210 features &= ~NETIF_F_ALL_TSO;
5211 5211 }
5212 5212  
... ... @@ -5216,7 +5216,7 @@
5216 5216  
5217 5217 /* Software GSO depends on SG. */
5218 5218 if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) {
5219   - netdev_info(dev, "Dropping NETIF_F_GSO since no SG feature.\n");
  5219 + netdev_dbg(dev, "Dropping NETIF_F_GSO since no SG feature.\n");
5220 5220 features &= ~NETIF_F_GSO;
5221 5221 }
5222 5222  
5223 5223  
... ... @@ -5226,13 +5226,13 @@
5226 5226 if (!((features & NETIF_F_GEN_CSUM) ||
5227 5227 (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))
5228 5228 == (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {
5229   - netdev_info(dev,
  5229 + netdev_dbg(dev,
5230 5230 "Dropping NETIF_F_UFO since no checksum offload features.\n");
5231 5231 features &= ~NETIF_F_UFO;
5232 5232 }
5233 5233  
5234 5234 if (!(features & NETIF_F_SG)) {
5235   - netdev_info(dev,
  5235 + netdev_dbg(dev,
5236 5236 "Dropping NETIF_F_UFO since no NETIF_F_SG feature.\n");
5237 5237 features &= ~NETIF_F_UFO;
5238 5238 }
... ... @@ -5413,12 +5413,6 @@
5413 5413 dev->hw_features |= NETIF_F_SOFT_FEATURES;
5414 5414 dev->features |= NETIF_F_SOFT_FEATURES;
5415 5415 dev->wanted_features = dev->features & dev->hw_features;
5416   -
5417   - /* Avoid warning from netdev_fix_features() for GSO without SG */
5418   - if (!(dev->wanted_features & NETIF_F_SG)) {
5419   - dev->wanted_features &= ~NETIF_F_GSO;
5420   - dev->features &= ~NETIF_F_GSO;
5421   - }
5422 5416  
5423 5417 /* Enable GRO and NETIF_F_HIGHDMA for vlans by default,
5424 5418 * vlan_dev_init() will do the dev->features check, so these features