]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: update error message when trying to add invalid filters
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 5 Apr 2017 11:50:53 +0000 (07:50 -0400)
committerJack Vogel <jack.vogel@oracle.com>
Tue, 10 Oct 2017 21:15:22 +0000 (14:15 -0700)
Re-word the error message displayed when adding a filter with an
invalid flow type. Additionally, report a distinct error message when
the IPv4 protocol is at fault.

Change-ID: Iba3d85b87f8d383c97c8bdd180df34a6adf3ee67
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26785018
(cherry picked from commit a346fb836c712b43fc7bd925534eb8c23b3b61f0)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c

index baebd237c134f3195f2f5e81ec0aecd7210587a2..1b6439557674a84d4d836356cda2611d6ebd195a 100644 (file)
@@ -534,14 +534,15 @@ int i40e_add_del_fdir(struct i40e_vsi *vsi,
                        break;
                default:
                        /* We cannot support masking based on protocol */
-                       goto unsupported_flow;
+                       dev_info(&pf->pdev->dev, "Unsupported IPv4 protocol 0x%02x\n",
+                                input->ip4_proto);
+                       return -EINVAL;
                }
                break;
        default:
-unsupported_flow:
-               dev_info(&pf->pdev->dev, "Could not specify spec type %d\n",
+               dev_info(&pf->pdev->dev, "Unsupported flow type 0x%02x\n",
                         input->flow_type);
-               ret = -EINVAL;
+               return -EINVAL;
        }
 
        /* The buffer allocated here will be normally be freed by