]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: rename index to port to avoid confusion
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 19 Apr 2017 13:25:50 +0000 (09:25 -0400)
committerJack Vogel <jack.vogel@oracle.com>
Tue, 10 Oct 2017 21:15:23 +0000 (14:15 -0700)
The .index field of i40e_udp_port_config represents the udp port number.
Rename this variable to port so that it is more obvious.

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 27826fd5d357d38b5cf834f9adcc70e6c2254d69)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_main.c

index fc48d6f75f429d4aa80ff8844368b301286e71ce..b03196b64172b85806adf3964e1e1dc9d6cb2135 100644 (file)
@@ -252,7 +252,7 @@ struct i40e_tc_configuration {
 
 struct i40e_udp_port_config {
        /* AdminQ command interface expects port number in Host byte order */
-       u16 index;
+       u16 port;
        u8 type;
 };
 
index 452037fc9e54c78be48273c2e911f42cbc91224d..49d4b0148f9ae51ee478774c93e2b0195d078052 100644 (file)
@@ -7400,7 +7400,7 @@ static void i40e_sync_udp_filters_subtask(struct i40e_pf *pf)
        for (i = 0; i < I40E_MAX_PF_UDP_OFFLOAD_PORTS; i++) {
                if (pf->pending_udp_bitmap & BIT_ULL(i)) {
                        pf->pending_udp_bitmap &= ~BIT_ULL(i);
-                       port = pf->udp_ports[i].index;
+                       port = pf->udp_ports[i].port;
                        if (port)
                                ret = i40e_aq_add_udp_tunnel(hw, port,
                                                        pf->udp_ports[i].type,
@@ -7417,7 +7417,7 @@ static void i40e_sync_udp_filters_subtask(struct i40e_pf *pf)
                                        i40e_stat_str(&pf->hw, ret),
                                        i40e_aq_str(&pf->hw,
                                                    pf->hw.aq.asq_last_status));
-                               pf->udp_ports[i].index = 0;
+                               pf->udp_ports[i].port = 0;
                        }
                }
        }
@@ -9062,7 +9062,7 @@ static u8 i40e_get_udp_port_idx(struct i40e_pf *pf, u16 port)
        u8 i;
 
        for (i = 0; i < I40E_MAX_PF_UDP_OFFLOAD_PORTS; i++) {
-               if (pf->udp_ports[i].index == port)
+               if (pf->udp_ports[i].port == port)
                        return i;
        }
 
@@ -9115,7 +9115,7 @@ static void i40e_udp_tunnel_add(struct net_device *netdev,
        }
 
        /* New port: add it and mark its index in the bitmap */
-       pf->udp_ports[next_idx].index = port;
+       pf->udp_ports[next_idx].port = port;
        pf->pending_udp_bitmap |= BIT_ULL(next_idx);
        pf->flags |= I40E_FLAG_UDP_FILTER_SYNC;
 }
@@ -9156,7 +9156,7 @@ static void i40e_udp_tunnel_del(struct net_device *netdev,
        /* if port exists, set it to 0 (mark for deletion)
         * and make it pending
         */
-       pf->udp_ports[idx].index = 0;
+       pf->udp_ports[idx].port = 0;
        pf->pending_udp_bitmap |= BIT_ULL(idx);
        pf->flags |= I40E_FLAG_UDP_FILTER_SYNC;