Re: [Linuxptp-devel] [PATCH 3/3] unicast: Enable sharing master tables between ports.

2019-10-21 Thread Miroslav Lichvar
On Mon, Oct 21, 2019 at 07:09:35AM -0700, Richard Cochran wrote: > On Thu, Sep 26, 2019 at 03:54:32PM +0200, Miroslav Lichvar wrote: > > Don't require each port to have its own master table specified in the > > config. Instead of ports claming configured tables, clone the table in > > each port,

Re: [Linuxptp-devel] [PATCH 3/3] unicast: Enable sharing master tables between ports.

2019-10-21 Thread Richard Cochran
On Thu, Sep 26, 2019 at 03:54:32PM +0200, Miroslav Lichvar wrote: > Don't require each port to have its own master table specified in the > config. Instead of ports claming configured tables, clone the table in > each port, so different ports don't interfere with each other. I'd like to tack on

Re: [Linuxptp-devel] [PATCH 3/3] unicast: Enable sharing master tables between ports.

2019-10-21 Thread Richard Cochran
On Mon, Oct 21, 2019 at 02:15:03PM +0200, Miroslav Lichvar wrote: > I think free(NULL) is required to be a no-op, so that test would be > unnecessary, but if there is another reason like coding style, I can > add it to the patch. Ah, right. I tend to check everything out of paranoid habit, but I

Re: [Linuxptp-devel] [PATCH 3/3] unicast: Enable sharing master tables between ports.

2019-10-21 Thread Miroslav Lichvar
On Sat, Oct 12, 2019 at 08:49:54PM -0700, Richard Cochran wrote: > On Thu, Sep 26, 2019 at 03:54:32PM +0200, Miroslav Lichvar wrote: > > + free(table->peer_name); > > This needs test for table->peer_name != NULL ... > > + if (table->peer_name) > > + cloned_table->peer_name =

Re: [Linuxptp-devel] [PATCH 3/3] unicast: Enable sharing master tables between ports.

2019-10-12 Thread Richard Cochran
On Thu, Sep 26, 2019 at 03:54:32PM +0200, Miroslav Lichvar wrote: > @@ -250,6 +252,45 @@ out: > return err; > } > > +static void free_master_table(struct unicast_master_table *table) > +{ > + struct unicast_master_address *address; > + > + while ((address = STAILQ_FIRST(>addrs)))

[Linuxptp-devel] [PATCH 3/3] unicast: Enable sharing master tables between ports.

2019-09-26 Thread Miroslav Lichvar
Don't require each port to have its own master table specified in the config. Instead of ports claming configured tables, clone the table in each port, so different ports don't interfere with each other. Signed-off-by: Miroslav Lichvar --- port.c | 3 ++- ptp4l.8 | 4 +---