On Thu, 2020-10-01 at 16:23 -0700, Jakub Kicinski wrote:
> On Thu, 1 Oct 2020 12:52:37 -0700 sa...@kernel.org wrote:
> > +static int cmd_alloc_index_retry(struct mlx5_cmd *cmd)
> > +{
> > + unsigned long alloc_end = jiffies + msecs_to_jiffies(1000);
> > + int idx;
> > +
> > +retry:
> > + idx
On Thu, 1 Oct 2020 12:52:37 -0700 sa...@kernel.org wrote:
> +static int cmd_alloc_index_retry(struct mlx5_cmd *cmd)
> +{
> + unsigned long alloc_end = jiffies + msecs_to_jiffies(1000);
> + int idx;
> +
> +retry:
> + idx = cmd_alloc_index(cmd);
> + if (idx < 0 && time_before(jiffies
From: Eran Ben Elisha
It is possible that new command entry index allocation will temporarily
fail. The new command holds the semaphore, so it means that a free entry
should be ready soon. Add one second retry mechanism before returning an
error.
Patch "net/mlx5: Avoid possible free of command e