Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sfc: Remove support for siena high priority queue

This also removes TC support code, since that was never supported for EF10.
TC support for EF100 is not handled from efx.c.

Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com>
Acked-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Martin Habets and committed by
David S. Miller
f294c1f7 e714e5b2

+2 -50
-1
drivers/net/ethernet/sfc/efx.c
··· 605 605 #endif 606 606 .ndo_get_phys_port_id = efx_get_phys_port_id, 607 607 .ndo_get_phys_port_name = efx_get_phys_port_name, 608 - .ndo_setup_tc = efx_setup_tc, 609 608 #ifdef CONFIG_RFS_ACCEL 610 609 .ndo_rx_flow_steer = efx_filter_rfs, 611 610 #endif
-2
drivers/net/ethernet/sfc/efx.h
··· 30 30 tx_queue, skb); 31 31 } 32 32 void efx_xmit_done_single(struct efx_tx_queue *tx_queue); 33 - int efx_setup_tc(struct net_device *net_dev, enum tc_setup_type type, 34 - void *type_data); 35 33 extern unsigned int efx_piobuf_size; 36 34 37 35 /* RX */
+1 -3
drivers/net/ethernet/sfc/net_driver.h
··· 67 67 #define EFX_MAX_CORE_TX_QUEUES (EFX_MAX_TX_TC * EFX_MAX_CHANNELS) 68 68 #define EFX_TXQ_TYPE_OUTER_CSUM 1 /* Outer checksum offload */ 69 69 #define EFX_TXQ_TYPE_INNER_CSUM 2 /* Inner checksum offload */ 70 - #define EFX_TXQ_TYPE_HIGHPRI 4 /* High-priority (for TC) */ 71 - #define EFX_TXQ_TYPES 8 72 - /* HIGHPRI is Siena-only, and INNER_CSUM is EF10, so no need for both */ 70 + #define EFX_TXQ_TYPES 4 73 71 #define EFX_MAX_TXQ_PER_CHANNEL 4 74 72 #define EFX_MAX_TX_QUEUES (EFX_MAX_TXQ_PER_CHANNEL * EFX_MAX_CHANNELS) 75 73
+1 -44
drivers/net/ethernet/sfc/tx.c
··· 517 517 unsigned index, type; 518 518 519 519 EFX_WARN_ON_PARANOID(!netif_device_present(net_dev)); 520 - 521 520 index = skb_get_queue_mapping(skb); 522 521 type = efx_tx_csum_type_skb(skb); 523 - if (index >= efx->n_tx_channels) { 524 - index -= efx->n_tx_channels; 525 - type |= EFX_TXQ_TYPE_HIGHPRI; 526 - } 527 522 528 523 /* PTP "event" packet */ 529 524 if (unlikely(efx_xmit_with_hwtstamp(skb)) && ··· 598 603 /* Must be inverse of queue lookup in efx_hard_start_xmit() */ 599 604 tx_queue->core_txq = 600 605 netdev_get_tx_queue(efx->net_dev, 601 - tx_queue->channel->channel + 602 - ((tx_queue->type & EFX_TXQ_TYPE_HIGHPRI) ? 603 - efx->n_tx_channels : 0)); 604 - } 605 - 606 - int efx_setup_tc(struct net_device *net_dev, enum tc_setup_type type, 607 - void *type_data) 608 - { 609 - struct efx_nic *efx = efx_netdev_priv(net_dev); 610 - struct tc_mqprio_qopt *mqprio = type_data; 611 - unsigned tc, num_tc; 612 - 613 - if (type != TC_SETUP_QDISC_MQPRIO) 614 - return -EOPNOTSUPP; 615 - 616 - /* Only Siena supported highpri queues */ 617 - if (efx_nic_rev(efx) > EFX_REV_SIENA_A0) 618 - return -EOPNOTSUPP; 619 - 620 - num_tc = mqprio->num_tc; 621 - 622 - if (num_tc > EFX_MAX_TX_TC) 623 - return -EINVAL; 624 - 625 - mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS; 626 - 627 - if (num_tc == net_dev->num_tc) 628 - return 0; 629 - 630 - for (tc = 0; tc < num_tc; tc++) { 631 - net_dev->tc_to_txq[tc].offset = tc * efx->n_tx_channels; 632 - net_dev->tc_to_txq[tc].count = efx->n_tx_channels; 633 - } 634 - 635 - net_dev->num_tc = num_tc; 636 - 637 - return netif_set_real_num_tx_queues(net_dev, 638 - max_t(int, num_tc, 1) * 639 - efx->n_tx_channels); 606 + tx_queue->channel->channel); 640 607 }