From: David Gibson <david@gibson.dropbear.id.au>
To: Anshu Kumari <anskuma@redhat.com>
Cc: passt-dev@passt.top, sbrivio@redhat.com, jmaloy@redhat.com,
lvivier@redhat.com
Subject: Re: [PATCH v4 2/4] dhcp: Add option overload
Date: Mon, 22 Jun 2026 12:43:46 +1000 [thread overview]
Message-ID: <ajihYsYhRa4_JLwe@zatzit> (raw)
In-Reply-To: <CADJNnV+_x5ikVvxA93PuAfVegJnt0e_WY59JDL0rgmkh9ysqdA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1819 bytes --]
On Fri, Jun 19, 2026 at 01:25:18PM +0530, Anshu Kumari wrote:
> On Fri, Jun 19, 2026 at 9:24 AM David Gibson <david@gibson.dropbear.id.au>
> wrote:
>
> > On Wed, Jun 17, 2026 at 06:52:36PM +0530, Anshu Kumari wrote:
[snip]
> > > @@ -178,17 +243,25 @@ static int fill(struct msg *m)
> > > * Put it there explicitly, unless requested via option 55.
> > > */
> > > if (opts[55].clen > 0 && !memchr(opts[55].c, 53, opts[55].clen))
> > > - fill_one(m->o, OPT_MAX, 53, &offset);
> > > + fill_one(m->o, size, 53, &offset);
> > >
> > > for (i = 0; i < opts[55].clen; i++) {
> > > o = opts[55].c[i];
> > > if (opts[o].slen != -1)
> > > - fill_one(m->o, OPT_MAX, o, &offset);
> > > + fill_one(m->o, size, o, &offset);
> > > }
> > >
> > > for (o = 0; o < 255; o++) {
> > > if (opts[o].slen != -1 && !opts[o].sent)
> > > - fill_one(m->o, OPT_MAX, o, &offset);
> > > + fill_one(m->o, size, o, &offset);
> > > + }
> > > +
> > > + *overload = fill_overflow(m, has_bootfile);
> >
> > Is there a particular reason to put fill_overflow() in its own
> > function, rather than just inline here?
> >
>
> There is no particular reason. I just thought it would be better to
> have a separate function for option overload (may be for better
> clarity).
Ok. I think the overall flow - try to fill this field, then this
field, then this field - would be a bit clearer if it were inline.
Not a big deal though.
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-06-22 3:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 13:22 [PATCH v4 0/4] Add --dhcp-boot and --dhcp-opt options Anshu Kumari
2026-06-17 13:22 ` [PATCH v4 1/4] dhcp: Refactor fill_one() to operate on a generic buffer Anshu Kumari
2026-06-19 3:26 ` David Gibson
2026-06-17 13:22 ` [PATCH v4 2/4] dhcp: Add option overload Anshu Kumari
2026-06-19 3:39 ` David Gibson
2026-06-19 7:55 ` Anshu Kumari
2026-06-22 2:43 ` David Gibson [this message]
2026-06-17 13:22 ` [PATCH v4 3/4] dhcp: Add --dhcp-opt with option table and value parser Anshu Kumari
2026-06-19 3:52 ` David Gibson
2026-06-19 7:29 ` Anshu Kumari
2026-06-22 2:42 ` David Gibson
2026-06-17 13:22 ` [PATCH v4 4/4] conf: Add --dhcp-boot command-line option Anshu Kumari
2026-06-19 3:53 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ajihYsYhRa4_JLwe@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=anskuma@redhat.com \
--cc=jmaloy@redhat.com \
--cc=lvivier@redhat.com \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).