realtek: eth: drop pick queue functions
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Fri, 30 Jan 2026 12:49:39 +0000 (13:49 +0100)
committerRobert Marko <robimarko@gmail.com>
Sun, 1 Feb 2026 10:27:58 +0000 (11:27 +0100)
The operating system has enough features to control the transmit
queues. There is no need to provide a hard coded distribution
function. Especially differentiating between a round robin for
RTL83xx and high/low priority for RTL93xx makes no sense. All
devices have the same low/high priority queues.

Simply present two "generic" queues to the kernel.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21778
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c

index 3f5621179a5ea66d0f996d37ce91e399224a4bcd..f47a8c538aeee00eeeed2229c24cd70aa1830878 100644 (file)
@@ -1063,29 +1063,6 @@ txdone:
        return ret;
 }
 
-/* Return queue number for TX. On the RTL83XX, these queues have equal priority
- * so we do round-robin
- */
-static u16 rteth_83xx_pick_tx_queue(struct net_device *dev, struct sk_buff *skb,
-                                struct net_device *sb_dev)
-{
-       static u8 last;
-
-       last++;
-       return last % TXRINGS;
-}
-
-/* Return queue number for TX. On the RTL93XX, queue 1 is the high priority queue
- */
-static u16 rteth_93xx_pick_tx_queue(struct net_device *dev, struct sk_buff *skb,
-                                struct net_device *sb_dev)
-{
-       if (skb->priority >= TC_PRIO_CONTROL)
-               return 1;
-
-       return 0;
-}
-
 static int rtl838x_hw_receive(struct net_device *dev, int r, int budget)
 {
        struct rteth_ctrl *ctrl = netdev_priv(dev);
@@ -1493,7 +1470,6 @@ static const struct net_device_ops rteth_838x_netdev_ops = {
        .ndo_open = rteth_open,
        .ndo_stop = rteth_stop,
        .ndo_start_xmit = rteth_start_xmit,
-       .ndo_select_queue = rteth_83xx_pick_tx_queue,
        .ndo_set_mac_address = rteth_set_mac_address,
        .ndo_validate_addr = eth_validate_addr,
        .ndo_set_rx_mode = rteth_838x_set_rx_mode,
@@ -1537,7 +1513,6 @@ static const struct net_device_ops rteth_839x_netdev_ops = {
        .ndo_open = rteth_open,
        .ndo_stop = rteth_stop,
        .ndo_start_xmit = rteth_start_xmit,
-       .ndo_select_queue = rteth_83xx_pick_tx_queue,
        .ndo_set_mac_address = rteth_set_mac_address,
        .ndo_validate_addr = eth_validate_addr,
        .ndo_set_rx_mode = rteth_839x_set_rx_mode,
@@ -1581,7 +1556,6 @@ static const struct net_device_ops rteth_930x_netdev_ops = {
        .ndo_open = rteth_open,
        .ndo_stop = rteth_stop,
        .ndo_start_xmit = rteth_start_xmit,
-       .ndo_select_queue = rteth_93xx_pick_tx_queue,
        .ndo_set_mac_address = rteth_set_mac_address,
        .ndo_validate_addr = eth_validate_addr,
        .ndo_set_rx_mode = rteth_930x_set_rx_mode,
@@ -1631,7 +1605,6 @@ static const struct net_device_ops rteth_931x_netdev_ops = {
        .ndo_open = rteth_open,
        .ndo_stop = rteth_stop,
        .ndo_start_xmit = rteth_start_xmit,
-       .ndo_select_queue = rteth_93xx_pick_tx_queue,
        .ndo_set_mac_address = rteth_set_mac_address,
        .ndo_validate_addr = eth_validate_addr,
        .ndo_set_rx_mode = rtl931x_eth_set_multicast_list,