Re: [PATCH net-next V2 3/4] net/mlx5e: Add HW timestamping (TS) support

2015-12-24 Thread eran ben elisha
> +void mlx5e_fill_hwstamp(struct mlx5e_tstamp *tstamp, > + struct skb_shared_hwtstamps *hwts, > + u64 timestamp) > +{ > + unsigned long flags; > + u64 nsec; > + > + memset(hwts, 0, sizeof(struct skb_shared_hwtstamps)); > +

Re: [PATCH net-next V2 3/4] net/mlx5e: Add HW timestamping (TS) support

2015-12-22 Thread Saeed Mahameed
On Mon, Dec 21, 2015 at 8:35 PM, Richard Cochran wrote: > On Mon, Dec 21, 2015 at 04:35:23PM +0200, Saeed Mahameed wrote: >> think of a case where: >> CPU1: is just about to call >> "schedule_delayed_work(>overflow_work, >> tstamp->overflow_period);" >> CPU2:

Re: [PATCH net-next V2 3/4] net/mlx5e: Add HW timestamping (TS) support

2015-12-22 Thread Saeed Mahameed
On Mon, Dec 21, 2015 at 11:15 AM, Richard Cochran wrote: > On Sun, Dec 20, 2015 at 11:46:30PM +0200, Saeed Mahameed wrote: >> +/* Should run once every mlx5e_tstamp->overflow_period */ >> +static void mlx5e_timestamp_overflow(struct work_struct *work) >> +{ >> +

Re: [PATCH net-next V2 3/4] net/mlx5e: Add HW timestamping (TS) support

2015-12-22 Thread Richard Cochran
On Tue, Dec 22, 2015 at 12:00:52PM +0200, Saeed Mahameed wrote: > Ok, but what will happen if somehow tstamp->overflow_period is zero ? > the work will run too rapidly. > don't we need to have protection against such case. Why not return an error in that case? Thanks, Richard -- To unsubscribe

Re: [PATCH net-next V2 3/4] net/mlx5e: Add HW timestamping (TS) support

2015-12-21 Thread Richard Cochran
On Mon, Dec 21, 2015 at 04:35:23PM +0200, Saeed Mahameed wrote: > think of a case where: > CPU1: is just about to call > "schedule_delayed_work(>overflow_work, > tstamp->overflow_period);" > CPU2: cancel_delayed_work > > In this case cancel_dalyed_work_sync (CPU2) will wait for CPU1 to > complete

Re: [PATCH net-next V2 3/4] net/mlx5e: Add HW timestamping (TS) support

2015-12-21 Thread Richard Cochran
On Sun, Dec 20, 2015 at 11:46:30PM +0200, Saeed Mahameed wrote: > +/* Should run once every mlx5e_tstamp->overflow_period */ > +static void mlx5e_timestamp_overflow(struct work_struct *work) > +{ > + struct delayed_work *dwork = to_delayed_work(work); > + struct mlx5e_tstamp *tstamp =

Re: [PATCH net-next V2 3/4] net/mlx5e: Add HW timestamping (TS) support

2015-12-21 Thread Saeed Mahameed
On Mon, Dec 21, 2015 at 11:15 AM, Richard Cochran wrote: > On Sun, Dec 20, 2015 at 11:46:30PM +0200, Saeed Mahameed wrote: >> +/* Should run once every mlx5e_tstamp->overflow_period */ >> +static void mlx5e_timestamp_overflow(struct work_struct *work) >> +{ >> +

[PATCH net-next V2 3/4] net/mlx5e: Add HW timestamping (TS) support

2015-12-20 Thread Saeed Mahameed
From: Eran Ben Elisha Add support for enable/disable HW timestamping for incoming and/or outgoing packets. To enable/disable HW timestamping appropriate ioctl should be used. Currently HWTSTAMP_FILTER_ALL/NONE and HWTSAMP_TX_ON/OFF only are supported. Make all relevant