On Tue, Jul 12, 2016 at 02:18:32PM -0700, David Miller wrote: > From: Brenden Blanco <bbla...@plumgrid.com> > Date: Tue, 12 Jul 2016 00:51:29 -0700 > > > + mlx4_en_free_resources(priv); > > + > > old_prog = xchg(&priv->prog, prog); > > if (old_prog) > > bpf_prog_put(old_prog); > > > > - return 0; > > + err = mlx4_en_alloc_resources(priv); > > + if (err) { > > + en_err(priv, "Failed reallocating port resources\n"); > > + goto out; > > + } > > + if (port_up) { > > + err = mlx4_en_start_port(dev); > > + if (err) > > + en_err(priv, "Failed starting port\n"); > > A failed configuration operation should _NEVER_ leave the interface in > an inoperative state like these error paths do. > > You must instead preallocate the necessary resources, and only change > the chip's configuration and commit to the new settings once you have > successfully allocated those resources. I'll see what I can do here.
- [PATCH v8 00/11] Add driver bpf hook for early packet drop ... Brenden Blanco
- [PATCH v8 05/11] Add sample for adding simple drop pro... Brenden Blanco
- [PATCH v8 06/11] net/mlx4_en: add page recycle to prep... Brenden Blanco
- Re: [PATCH v8 06/11] net/mlx4_en: add page recycle... David Miller
- Re: [PATCH v8 06/11] net/mlx4_en: add page rec... Brenden Blanco
- Re: [PATCH v8 06/11] net/mlx4_en: add page... Tariq Toukan
- Re: [PATCH v8 06/11] net/mlx4_en: add... Brenden Blanco
- Re: [PATCH v8 06/11] net/mlx4_en:... Brenden Blanco
- Re: [PATCH v8 06/11] net/mlx4... Brenden Blanco
- RE: [PATCH v8 06/11] net/mlx4_en: add page recycle... Tariq Toukan
- [PATCH v8 02/11] net: add ndo to setup/query xdp prog ... Brenden Blanco
- [PATCH v8 11/11] bpf: add sample for xdp forwarding an... Brenden Blanco
- [PATCH v8 07/11] bpf: add XDP_TX xdp_action for direct... Brenden Blanco
- [PATCH v8 08/11] net/mlx4_en: break out tx_desc write ... Brenden Blanco