Discussion:
[Linuxptp-devel] skb_defer_rx_timestamp cosmetics
Stephan Gatzka
2012-10-09 18:51:43 UTC
Permalink
Hello!

While investigating a totally unrelated problem I saw in
drivers/net/ethernet/freescale/fec_mpc52xx.c the following code snippet:

if (!skb_defer_rx_timestamp(rskb))
netif_rx(rskb);

Only a small minority of Ethernet driver directly call
skb_defer_rx_timestamp().

Moreover, I saw that a lot of drivers call netif_receive_skb() which
calls skb_defer_rx_timestamp itself. Would it not make sense to call
netif_receive_skb() in fec_mpc52xx.c ?

Please note that I have to admit that my knowledge of the network stack
in Linux is rather shallow...

Regards,

Stephan
Richard Cochran
2012-10-11 18:28:43 UTC
Permalink
Post by Stephan Gatzka
Hello!
While investigating a totally unrelated problem I saw in
if (!skb_defer_rx_timestamp(rskb))
netif_rx(rskb);
Only a small minority of Ethernet driver directly call
skb_defer_rx_timestamp().
Moreover, I saw that a lot of drivers call netif_receive_skb() which
calls skb_defer_rx_timestamp itself. Would it not make sense to call
netif_receive_skb() in fec_mpc52xx.c ?
The function, netif_receive_skb, is only for NAPI drivers.

You could rework the fec_mpc52xx as a NAPI driver, but it is probably
not worth the effort.

HTH,
Richard

Loading...