]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
net: macb: Process tx timestamp only on ptp packets
authorHarini Katakam <harini.katakam@xilinx.com>
Fri, 31 Aug 2018 06:13:05 +0000 (11:43 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 7 Nov 2018 10:03:31 +0000 (11:03 +0100)
The current implementation timestamps all packets and also processes
the BD timestamp for the same. This is not necessary and increases
overhead.
Hence update DMA BD settings to timestamp only PTP packets.

Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Acked-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/net/ethernet/cadence/macb_ptp.c

index 36608f352156c6bbe4c7f773bb276c240c786639..bba898f929f65f0a947b8c0c65a04837eda79aa0 100755 (executable)
@@ -469,7 +469,7 @@ int gem_set_hwtst(struct net_device *dev, struct ifreq *ifr, int cmd)
                if (gem_ptp_set_one_step_sync(bp, 1) != 0)
                        return -ERANGE;
        case HWTSTAMP_TX_ON:
-               tx_bd_control = TSTAMP_ALL_FRAMES;
+               tx_bd_control = TSTAMP_ALL_PTP_FRAMES;
                break;
        default:
                return -ERANGE;