|
58 | 58 | #include <net/tc_act/tc_gact.h>
|
59 | 59 | #include <net/tc_act/tc_mirred.h>
|
60 | 60 | #include <net/vxlan.h>
|
| 61 | +#include <net/mpls.h> |
61 | 62 |
|
62 | 63 | #include "ixgbe.h"
|
63 | 64 | #include "ixgbe_common.h"
|
@@ -1451,7 +1452,7 @@ static int __ixgbe_notify_dca(struct device *dev, void *data)
|
1451 | 1452 | IXGBE_DCA_CTRL_DCA_MODE_CB2);
|
1452 | 1453 | break;
|
1453 | 1454 | }
|
1454 |
| - /* Fall Through since DCA is disabled. */ |
| 1455 | + /* fall through - DCA is disabled. */ |
1455 | 1456 | case DCA_PROVIDER_REMOVE:
|
1456 | 1457 | if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
|
1457 | 1458 | dca_remove_requester(dev);
|
@@ -2232,6 +2233,7 @@ static struct sk_buff *ixgbe_run_xdp(struct ixgbe_adapter *adapter,
|
2232 | 2233 | break;
|
2233 | 2234 | default:
|
2234 | 2235 | bpf_warn_invalid_xdp_action(act);
|
| 2236 | + /* fallthrough */ |
2235 | 2237 | case XDP_ABORTED:
|
2236 | 2238 | trace_xdp_exception(rx_ring->netdev, xdp_prog, act);
|
2237 | 2239 | /* fallthrough -- handle aborts by dropping packet */
|
@@ -2638,8 +2640,7 @@ static void ixgbe_check_overtemp_subtask(struct ixgbe_adapter *adapter)
|
2638 | 2640 | if (test_bit(__IXGBE_DOWN, &adapter->state))
|
2639 | 2641 | return;
|
2640 | 2642 |
|
2641 |
| - if (!(adapter->flags2 & IXGBE_FLAG2_TEMP_SENSOR_CAPABLE) && |
2642 |
| - !(adapter->flags2 & IXGBE_FLAG2_TEMP_SENSOR_EVENT)) |
| 2643 | + if (!(adapter->flags2 & IXGBE_FLAG2_TEMP_SENSOR_EVENT)) |
2643 | 2644 | return;
|
2644 | 2645 |
|
2645 | 2646 | adapter->flags2 &= ~IXGBE_FLAG2_TEMP_SENSOR_EVENT;
|
@@ -3105,23 +3106,23 @@ int ixgbe_poll(struct napi_struct *napi, int budget)
|
3105 | 3106 | static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter)
|
3106 | 3107 | {
|
3107 | 3108 | struct net_device *netdev = adapter->netdev;
|
| 3109 | + unsigned int ri = 0, ti = 0; |
3108 | 3110 | int vector, err;
|
3109 |
| - int ri = 0, ti = 0; |
3110 | 3111 |
|
3111 | 3112 | for (vector = 0; vector < adapter->num_q_vectors; vector++) {
|
3112 | 3113 | struct ixgbe_q_vector *q_vector = adapter->q_vector[vector];
|
3113 | 3114 | struct msix_entry *entry = &adapter->msix_entries[vector];
|
3114 | 3115 |
|
3115 | 3116 | if (q_vector->tx.ring && q_vector->rx.ring) {
|
3116 |
| - snprintf(q_vector->name, sizeof(q_vector->name) - 1, |
3117 |
| - "%s-%s-%d", netdev->name, "TxRx", ri++); |
| 3117 | + snprintf(q_vector->name, sizeof(q_vector->name), |
| 3118 | + "%s-TxRx-%u", netdev->name, ri++); |
3118 | 3119 | ti++;
|
3119 | 3120 | } else if (q_vector->rx.ring) {
|
3120 |
| - snprintf(q_vector->name, sizeof(q_vector->name) - 1, |
3121 |
| - "%s-%s-%d", netdev->name, "rx", ri++); |
| 3121 | + snprintf(q_vector->name, sizeof(q_vector->name), |
| 3122 | + "%s-rx-%u", netdev->name, ri++); |
3122 | 3123 | } else if (q_vector->tx.ring) {
|
3123 |
| - snprintf(q_vector->name, sizeof(q_vector->name) - 1, |
3124 |
| - "%s-%s-%d", netdev->name, "tx", ti++); |
| 3124 | + snprintf(q_vector->name, sizeof(q_vector->name), |
| 3125 | + "%s-tx-%u", netdev->name, ti++); |
3125 | 3126 | } else {
|
3126 | 3127 | /* skip this unused q_vector */
|
3127 | 3128 | continue;
|
@@ -3802,6 +3803,9 @@ static void ixgbe_setup_mrqc(struct ixgbe_adapter *adapter)
|
3802 | 3803 | mrqc = IXGBE_MRQC_VMDQRSS32EN;
|
3803 | 3804 | else
|
3804 | 3805 | mrqc = IXGBE_MRQC_VMDQRSS64EN;
|
| 3806 | + |
| 3807 | + /* Enable L3/L4 for Tx Switched packets */ |
| 3808 | + mrqc |= IXGBE_MRQC_L3L4TXSWEN; |
3805 | 3809 | } else {
|
3806 | 3810 | if (tcs > 4)
|
3807 | 3811 | mrqc = IXGBE_MRQC_RTRSS8TCEN;
|
@@ -4174,7 +4178,7 @@ static void ixgbe_setup_rdrxctl(struct ixgbe_adapter *adapter)
|
4174 | 4178 | case ixgbe_mac_x550em_a:
|
4175 | 4179 | if (adapter->num_vfs)
|
4176 | 4180 | rdrxctl |= IXGBE_RDRXCTL_PSP;
|
4177 |
| - /* fall through for older HW */ |
| 4181 | + /* fall through */ |
4178 | 4182 | case ixgbe_mac_82599EB:
|
4179 | 4183 | case ixgbe_mac_X540:
|
4180 | 4184 | /* Disable RSC for ACK packets */
|
@@ -6183,8 +6187,6 @@ int ixgbe_setup_tx_resources(struct ixgbe_ring *tx_ring)
|
6183 | 6187 | if (!tx_ring->tx_buffer_info)
|
6184 | 6188 | goto err;
|
6185 | 6189 |
|
6186 |
| - u64_stats_init(&tx_ring->syncp); |
6187 |
| - |
6188 | 6190 | /* round up to nearest 4K */
|
6189 | 6191 | tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc);
|
6190 | 6192 | tx_ring->size = ALIGN(tx_ring->size, 4096);
|
@@ -6278,8 +6280,6 @@ int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
|
6278 | 6280 | if (!rx_ring->rx_buffer_info)
|
6279 | 6281 | goto err;
|
6280 | 6282 |
|
6281 |
| - u64_stats_init(&rx_ring->syncp); |
6282 |
| - |
6283 | 6283 | /* Round up to nearest 4K */
|
6284 | 6284 | rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc);
|
6285 | 6285 | rx_ring->size = ALIGN(rx_ring->size, 4096);
|
@@ -6886,6 +6886,7 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
|
6886 | 6886 | hwstats->o2bspc += IXGBE_READ_REG(hw, IXGBE_O2BSPC);
|
6887 | 6887 | hwstats->b2ospc += IXGBE_READ_REG(hw, IXGBE_B2OSPC);
|
6888 | 6888 | hwstats->b2ogprc += IXGBE_READ_REG(hw, IXGBE_B2OGPRC);
|
| 6889 | + /* fall through */ |
6889 | 6890 | case ixgbe_mac_82599EB:
|
6890 | 6891 | for (i = 0; i < 16; i++)
|
6891 | 6892 | adapter->hw_rx_no_dma_resources +=
|
@@ -7667,7 +7668,10 @@ static int ixgbe_tso(struct ixgbe_ring *tx_ring,
|
7667 | 7668 | if (err < 0)
|
7668 | 7669 | return err;
|
7669 | 7670 |
|
7670 |
| - ip.hdr = skb_network_header(skb); |
| 7671 | + if (eth_p_mpls(first->protocol)) |
| 7672 | + ip.hdr = skb_inner_network_header(skb); |
| 7673 | + else |
| 7674 | + ip.hdr = skb_network_header(skb); |
7671 | 7675 | l4.hdr = skb_checksum_start(skb);
|
7672 | 7676 |
|
7673 | 7677 | /* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */
|
@@ -8205,6 +8209,7 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb,
|
8205 | 8209 |
|
8206 | 8210 | if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED)
|
8207 | 8211 | break;
|
| 8212 | + /* fall through */ |
8208 | 8213 | default:
|
8209 | 8214 | return fallback(dev, skb);
|
8210 | 8215 | }
|
@@ -9929,6 +9934,7 @@ bool ixgbe_wol_supported(struct ixgbe_adapter *adapter, u16 device_id,
|
9929 | 9934 | /* only support first port */
|
9930 | 9935 | if (hw->bus.func != 0)
|
9931 | 9936 | break;
|
| 9937 | + /* fall through */ |
9932 | 9938 | case IXGBE_SUBDEV_ID_82599_SP_560FLR:
|
9933 | 9939 | case IXGBE_SUBDEV_ID_82599_SFP:
|
9934 | 9940 | case IXGBE_SUBDEV_ID_82599_RNDC:
|
@@ -10191,7 +10197,11 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
10191 | 10197 |
|
10192 | 10198 | netdev->vlan_features |= netdev->features | NETIF_F_TSO_MANGLEID;
|
10193 | 10199 | netdev->hw_enc_features |= netdev->vlan_features;
|
10194 |
| - netdev->mpls_features |= NETIF_F_HW_CSUM; |
| 10200 | + netdev->mpls_features |= NETIF_F_SG | |
| 10201 | + NETIF_F_TSO | |
| 10202 | + NETIF_F_TSO6 | |
| 10203 | + NETIF_F_HW_CSUM; |
| 10204 | + netdev->mpls_features |= IXGBE_GSO_PARTIAL_FEATURES; |
10195 | 10205 |
|
10196 | 10206 | /* set this bit last since it cannot be part of vlan_features */
|
10197 | 10207 | netdev->features |= NETIF_F_HW_VLAN_CTAG_FILTER |
|
@@ -10275,6 +10285,10 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
10275 | 10285 | if (err)
|
10276 | 10286 | goto err_sw_init;
|
10277 | 10287 |
|
| 10288 | + for (i = 0; i < adapter->num_rx_queues; i++) |
| 10289 | + u64_stats_init(&adapter->rx_ring[i]->syncp); |
| 10290 | + for (i = 0; i < adapter->num_tx_queues; i++) |
| 10291 | + u64_stats_init(&adapter->tx_ring[i]->syncp); |
10278 | 10292 | for (i = 0; i < adapter->num_xdp_queues; i++)
|
10279 | 10293 | u64_stats_init(&adapter->xdp_ring[i]->syncp);
|
10280 | 10294 |
|
|
0 commit comments