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

Configure Feed

Select the types of activity you want to include in your feed.

can: rx-offload: rename rx_offload_get_echo_skb() -> can_rx_offload_get_echo_skb_queue_timestamp()

Rename the rx_offload_get_echo_skb() function to
can_rx_offload_get_echo_skb_queue_timestamp(), since it inserts the
echo skb into the rx-offload queue sorted by timestamp.

This is a preparation for adding
can_rx_offload_get_echo_skb_queue_tail(), which adds the echo skb to
the end of the queue. This is intended for devices that do not support
timestamps.

Link: https://lore.kernel.org/all/20230718-gs_usb-rx-offload-v2-1-716e542d14d5@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

+19 -18
+5 -4
drivers/net/can/dev/rx-offload.c
··· 240 240 } 241 241 EXPORT_SYMBOL_GPL(can_rx_offload_queue_timestamp); 242 242 243 - unsigned int can_rx_offload_get_echo_skb(struct can_rx_offload *offload, 244 - unsigned int idx, u32 timestamp, 245 - unsigned int *frame_len_ptr) 243 + unsigned int 244 + can_rx_offload_get_echo_skb_queue_timestamp(struct can_rx_offload *offload, 245 + unsigned int idx, u32 timestamp, 246 + unsigned int *frame_len_ptr) 246 247 { 247 248 struct net_device *dev = offload->dev; 248 249 struct net_device_stats *stats = &dev->stats; ··· 263 262 264 263 return len; 265 264 } 266 - EXPORT_SYMBOL_GPL(can_rx_offload_get_echo_skb); 265 + EXPORT_SYMBOL_GPL(can_rx_offload_get_echo_skb_queue_timestamp); 267 266 268 267 int can_rx_offload_queue_tail(struct can_rx_offload *offload, 269 268 struct sk_buff *skb)
+2 -2
drivers/net/can/flexcan/flexcan-core.c
··· 1097 1097 1098 1098 handled = IRQ_HANDLED; 1099 1099 stats->tx_bytes += 1100 - can_rx_offload_get_echo_skb(&priv->offload, 0, 1101 - reg_ctrl << 16, NULL); 1100 + can_rx_offload_get_echo_skb_queue_timestamp(&priv->offload, 0, 1101 + reg_ctrl << 16, NULL); 1102 1102 stats->tx_packets++; 1103 1103 1104 1104 /* after sending a RTR frame MB is in RX mode */
+4 -4
drivers/net/can/m_can/m_can.c
··· 1016 1016 1017 1017 if (cdev->is_peripheral) 1018 1018 stats->tx_bytes += 1019 - can_rx_offload_get_echo_skb(&cdev->offload, 1020 - msg_mark, 1021 - timestamp, 1022 - NULL); 1019 + can_rx_offload_get_echo_skb_queue_timestamp(&cdev->offload, 1020 + msg_mark, 1021 + timestamp, 1022 + NULL); 1023 1023 else 1024 1024 stats->tx_bytes += can_get_echo_skb(dev, msg_mark, NULL); 1025 1025
+3 -3
drivers/net/can/spi/mcp251xfd/mcp251xfd-tef.c
··· 111 111 if (skb) 112 112 mcp251xfd_skb_set_timestamp(priv, skb, hw_tef_obj->ts); 113 113 stats->tx_bytes += 114 - can_rx_offload_get_echo_skb(&priv->offload, 115 - tef_tail, hw_tef_obj->ts, 116 - frame_len_ptr); 114 + can_rx_offload_get_echo_skb_queue_timestamp(&priv->offload, 115 + tef_tail, hw_tef_obj->ts, 116 + frame_len_ptr); 117 117 stats->tx_packets++; 118 118 priv->tef->tail++; 119 119
+2 -2
drivers/net/can/ti_hecc.c
··· 747 747 spin_unlock_irqrestore(&priv->mbx_lock, flags); 748 748 stamp = hecc_read_stamp(priv, mbxno); 749 749 stats->tx_bytes += 750 - can_rx_offload_get_echo_skb(&priv->offload, 751 - mbxno, stamp, NULL); 750 + can_rx_offload_get_echo_skb_queue_timestamp(&priv->offload, 751 + mbxno, stamp, NULL); 752 752 stats->tx_packets++; 753 753 --priv->tx_tail; 754 754 }
+3 -3
include/linux/can/rx-offload.h
··· 44 44 int can_rx_offload_irq_offload_fifo(struct can_rx_offload *offload); 45 45 int can_rx_offload_queue_timestamp(struct can_rx_offload *offload, 46 46 struct sk_buff *skb, u32 timestamp); 47 - unsigned int can_rx_offload_get_echo_skb(struct can_rx_offload *offload, 48 - unsigned int idx, u32 timestamp, 49 - unsigned int *frame_len_ptr); 47 + unsigned int can_rx_offload_get_echo_skb_queue_timestamp(struct can_rx_offload *offload, 48 + unsigned int idx, u32 timestamp, 49 + unsigned int *frame_len_ptr); 50 50 int can_rx_offload_queue_tail(struct can_rx_offload *offload, 51 51 struct sk_buff *skb); 52 52 void can_rx_offload_irq_finish(struct can_rx_offload *offload);