[PATCH] domain_codec: optimize call to dname_enc
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Thu Jun 11 00:13:49 UTC 2020
On Thu, 11 Jun 2020 13:12:53 -0500
Martin Lewis <martin.lewis.x84 at gmail.com> wrote:
> Hi,
> Yes, looks good :)
PS: i was at first a bit thrown off by the function name to talk about
DNAME RR (as opposed to CNAME RR resp. domain_name) but in the context
of dhcp as opposed to dns it makes more sense i suppose. I'd expand the
function name to resolve ambiguity in the network context, fwiw.
thanks,
>
> Martin
>
> On Wed, 10 Jun 2020 at 10:21, Denys Vlasenko <vda.linux at googlemail.com>
> wrote:
>
> > Thanks. I addressed this a bit differently. Looks good now?
> >
> > On Tue, Jun 9, 2020 at 4:55 PM Martin Lewis <martin.lewis.x84 at gmail.com>
> > wrote:
> > >
> > > The only call to dname_enc is with cstr = NULL, so most of dname_enc's
> > logic is not used.
> > > Therefore, we can directly call convert_dname and shrink the binary size.
> > >
> > > function old new delta
> > > convert_dname - 143 +143
> > > attach_option 463 493 +30
> > > dname_enc 445 - -445
> > >
> > ------------------------------------------------------------------------------
> > > (add/remove: 1/1 grow/shrink: 1/0 up/down: 173/-445) Total: -272
> > > bytes
> > > text data bss dec hex filename
> > > 993252 16923 1872 1012047 f714f busybox_old
> > > 992980 16923 1872 1011775 f703f busybox_unstripped
> > >
> > > Signed-off-by: Martin Lewis <martin.lewis.x84 at gmail.com>
> > > ---
> > > networking/udhcp/common.c | 6 +++++-
> > > networking/udhcp/common.h | 1 +
> > > networking/udhcp/domain_codec.c | 2 +-
> > > 3 files changed, 7 insertions(+), 2 deletions(-)
More information about the busybox
mailing list