[PATCH] cfgfile: increase value length

Bruce Richardson bruce.richardson at intel.com
Wed Dec 6 16:50:31 CET 2023


On Wed, Dec 06, 2023 at 03:22:41PM +0000, Varghese, Vipin wrote:
>    [AMD Official Use Only - General]
> 
>    Thanks Bruce & Cristian for the comments.
>    An increase seems ok to me, but is an 8x increase really necessary? If
>    lines in the config files are over 1k in size, then it implies that
>    some
>    other mechanism would surely be better for configuration.
>    Can we make do with an increase to 512 only?
>    VV> We encountered this issue
>    [1]https://bugs.dpdk.org/show_bug.cgi?id=1333 trying to use multiple
>    queue with DSA. But I hear you 256 to 2048 is big jump.
>    Happy to compromise with 1K.
>    VV> Sure let me update this is v2.
>    Since there is a ABI breakage,
>    [2]https://patchwork.dpdk.org/project/dpdk/patch/20231206112952.1588-1-
>    vipin.varghese at amd.com/ I will re work and share v2.

Looking at the bugzilla, I still think even an increase to 1k is too much,
and that we should look to adjust the config file format in some way to
accomodate these longer line settings.

Taking the specific example in the bug:
* each entry in the line is wasting 5 characters with the string "lcore"
* each PCI ID is starting with 0000, so we can do like EAL does and assume
  PCI domain is "0000" if just the BDF is given. This may involve changes
  to the PCI driver in question, since i assume these queues are names
  rather than addresses, but it would make them easier to address.

If we did these two items, then:
lcore_dma=lcore10 at 0000:00:04.2-q0,lcore12 at 0000:00:04.2-q1,lcore13 at 0000:00:04.2-q2,lcore14 at 0000:00:04.2-q3,lcore15 at 0000:00:04.2-q4,lcore16 at 0000:00:04.2-q5,lcore17 at 0000:00:04.2-q6,lcore18 at 0000:00:04.2-q7,lcore19 at 0000:00:04.4-q0,lcore20 at 0000:00:04.4-q1,lcore21 at 0000:00:04.4-q2,lcore22 at 0000:00:04.4-q3,lcore23 at 0000:00:04.4-q4,lcore24 at 0000:00:04.4-q5,lcore25 at 0000:00:04.4-q6,lcore26 at 0000:00:04.4-q7

becomes:
lcore_dma=10 at 00:04.2-q0,12 at 00:04.2-q1,13 at 00:04.2-q2,14 at 00:04.2-q3,15 at 00:04.2-q4,16 at 00:04.2-q5,17 at 00:04.2-q6,18 at 00:04.2-q7,19 at 00:04.4-q0,20 at 00:04.4-q1,21 at 00:04.4-q2,22 at 00:04.4-q3,23 at 00:04.4-q4,24 at 00:04.4-q5,25 at 00:04.4-q6,26 at 00:04.4-q7

a reduction from 394 chars to 234 (10 chars per device).

However, a better alternative may be to split up the lcore_dma item
entirely, so that we always have one element per line:

lcore_dma0=lcore10 at 0000:04.2-q0
lcore_dma1=lcore12 at 0000:04.2-q1
....
lcore_dma15=lcore26 at 0000:04.4-q7

What is especially good about using this is a solution is that it can be fully
backward compatible and has no ABI issues. If an "lcore_dma=" line exists,
we can split it, otherwise look for lcore_dma0, lcore_dma1 etc.

As I stated above, the need for really long lines in a config file is a
symptom of a more serious config problem, rather than an issue with the
cfgfile lib itself.

/Bruce


More information about the dev mailing list