All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: lwip: dns depend on enabled protocol config instead of command
@ 2025-07-12  5:01 E Shattow
  2025-07-14  1:52 ` E Shattow
  0 siblings, 1 reply; 5+ messages in thread
From: E Shattow @ 2025-07-12  5:01 UTC (permalink / raw)
  To: Jerome Forissier, Joe Hershberger, Ramon Fried, Tom Rini,
	Tim Harvey
  Cc: E Shattow, u-boot

Allow dns when enabled CONFIG_PROT_DNS_LWIP=y CONFIG_CMD_DNS=n

Fixes: a383869d6b58 ("net: lwip: move dns init to common function")
Signed-off-by: E Shattow <e@freeshell.de>
---
 net/lwip/net-lwip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c
index 3918d57d7e5..5d247c3721b 100644
--- a/net/lwip/net-lwip.c
+++ b/net/lwip/net-lwip.c
@@ -147,7 +147,7 @@ static int get_udev_ipv4_info(struct udevice *dev, ip4_addr_t *ip,
  */
 int net_lwip_dns_init(void)
 {
-#if CONFIG_IS_ENABLED(CMD_DNS)
+#if CONFIG_IS_ENABLED(PROT_DNS_LWIP)
 	bool has_server = false;
 	ip_addr_t ns;
 	char *nsenv;

base-commit: 6bb0679377abb01a82db1ce69b5bf1d40aa02ace
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: lwip: dns depend on enabled protocol config instead of command
  2025-07-12  5:01 [PATCH] net: lwip: dns depend on enabled protocol config instead of command E Shattow
@ 2025-07-14  1:52 ` E Shattow
  2025-07-18 10:29   ` Jerome Forissier
  0 siblings, 1 reply; 5+ messages in thread
From: E Shattow @ 2025-07-14  1:52 UTC (permalink / raw)
  To: Jerome Forissier, Joe Hershberger, Ramon Fried, Tom Rini,
	Tim Harvey; +Cc: u-boot



On 7/11/25 22:01, E Shattow wrote:
> Allow dns when enabled CONFIG_PROT_DNS_LWIP=y CONFIG_CMD_DNS=n
> 
> Fixes: a383869d6b58 ("net: lwip: move dns init to common function")
> Signed-off-by: E Shattow <e@freeshell.de>
> ---
>  net/lwip/net-lwip.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c
> index 3918d57d7e5..5d247c3721b 100644
> --- a/net/lwip/net-lwip.c
> +++ b/net/lwip/net-lwip.c
> @@ -147,7 +147,7 @@ static int get_udev_ipv4_info(struct udevice *dev, ip4_addr_t *ip,
>   */
>  int net_lwip_dns_init(void)
>  {
> -#if CONFIG_IS_ENABLED(CMD_DNS)
> +#if CONFIG_IS_ENABLED(PROT_DNS_LWIP)
>  	bool has_server = false;
>  	ip_addr_t ns;
>  	char *nsenv;
> 
> base-commit: 6bb0679377abb01a82db1ce69b5bf1d40aa02ace

Postscript: There was recently a U-Boot release and the above patch only
applies to origin/master (is apparently not needed or applicable to
origin/next). However on origin/next there are similar troubles where
DNS is disabled unless the dns command is enabled in several network
commands, which is something I can test for but am not the expert to
make a patch or suggestion for.

-E

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: lwip: dns depend on enabled protocol config instead of command
  2025-07-14  1:52 ` E Shattow
@ 2025-07-18 10:29   ` Jerome Forissier
  2025-07-18 13:25     ` Quentin Schulz
  0 siblings, 1 reply; 5+ messages in thread
From: Jerome Forissier @ 2025-07-18 10:29 UTC (permalink / raw)
  To: E Shattow, Joe Hershberger, Ramon Fried, Tom Rini, Tim Harvey; +Cc: u-boot

Hi E,

On 7/14/25 03:52, E Shattow wrote:
> 
> 
> On 7/11/25 22:01, E Shattow wrote:
>> Allow dns when enabled CONFIG_PROT_DNS_LWIP=y CONFIG_CMD_DNS=n
>>
>> Fixes: a383869d6b58 ("net: lwip: move dns init to common function")
>> Signed-off-by: E Shattow <e@freeshell.de>
>> ---
>>  net/lwip/net-lwip.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c
>> index 3918d57d7e5..5d247c3721b 100644
>> --- a/net/lwip/net-lwip.c
>> +++ b/net/lwip/net-lwip.c
>> @@ -147,7 +147,7 @@ static int get_udev_ipv4_info(struct udevice *dev, ip4_addr_t *ip,
>>   */
>>  int net_lwip_dns_init(void)
>>  {
>> -#if CONFIG_IS_ENABLED(CMD_DNS)
>> +#if CONFIG_IS_ENABLED(PROT_DNS_LWIP)
>>  	bool has_server = false;
>>  	ip_addr_t ns;
>>  	char *nsenv;
>>
>> base-commit: 6bb0679377abb01a82db1ce69b5bf1d40aa02ace

I think the proper way is to introduce a new "DNS" Kconfig symbol to
differentiate between DNS support and the DNS command itself. PROT_DNS_LWIP
should remain an internal symbol not exposed to the user and selected
automatically when DNS is enabled. DNS would apply to both NET and NET_LWIP.

We already have a similar mechanism in place for WGET and CMD_WGET.

> 
> Postscript: There was recently a U-Boot release and the above patch only
> applies to origin/master (is apparently not needed or applicable to
> origin/next). However on origin/next there are similar troubles where
> DNS is disabled unless the dns command is enabled in several network
> commands, which is something I can test for but am not the expert to
> make a patch or suggestion for.

IIUC origin/next is not the proper reference at this point in the release
cycle, so I would say it doesn't matter.

I will send a patch shortly to introduce CONFIG_DNS. I am currently running
CI.

Regards,
-- 
Jerome

> 
> -E

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: lwip: dns depend on enabled protocol config instead of command
  2025-07-18 10:29   ` Jerome Forissier
@ 2025-07-18 13:25     ` Quentin Schulz
  2025-07-19  3:04       ` E Shattow
  0 siblings, 1 reply; 5+ messages in thread
From: Quentin Schulz @ 2025-07-18 13:25 UTC (permalink / raw)
  To: Jerome Forissier, E Shattow, Joe Hershberger, Ramon Fried,
	Tom Rini, Tim Harvey
  Cc: u-boot

Hi Jerome, E,

On 7/18/25 12:29 PM, Jerome Forissier wrote:
> Hi E,
> 
> On 7/14/25 03:52, E Shattow wrote:
>>
>>
>> On 7/11/25 22:01, E Shattow wrote:
>>> Allow dns when enabled CONFIG_PROT_DNS_LWIP=y CONFIG_CMD_DNS=n
>>>
>>> Fixes: a383869d6b58 ("net: lwip: move dns init to common function")
>>> Signed-off-by: E Shattow <e@freeshell.de>
>>> ---
>>>   net/lwip/net-lwip.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c
>>> index 3918d57d7e5..5d247c3721b 100644
>>> --- a/net/lwip/net-lwip.c
>>> +++ b/net/lwip/net-lwip.c
>>> @@ -147,7 +147,7 @@ static int get_udev_ipv4_info(struct udevice *dev, ip4_addr_t *ip,
>>>    */
>>>   int net_lwip_dns_init(void)
>>>   {
>>> -#if CONFIG_IS_ENABLED(CMD_DNS)
>>> +#if CONFIG_IS_ENABLED(PROT_DNS_LWIP)
>>>   	bool has_server = false;
>>>   	ip_addr_t ns;
>>>   	char *nsenv;
>>>
>>> base-commit: 6bb0679377abb01a82db1ce69b5bf1d40aa02ace
> 
> I think the proper way is to introduce a new "DNS" Kconfig symbol to
> differentiate between DNS support and the DNS command itself. PROT_DNS_LWIP
> should remain an internal symbol not exposed to the user and selected
> automatically when DNS is enabled. DNS would apply to both NET and NET_LWIP.
> 
> We already have a similar mechanism in place for WGET and CMD_WGET.
> 
>>
>> Postscript: There was recently a U-Boot release and the above patch only
>> applies to origin/master (is apparently not needed or applicable to
>> origin/next). However on origin/next there are similar troubles where
>> DNS is disabled unless the dns command is enabled in several network
>> commands, which is something I can test for but am not the expert to
>> make a patch or suggestion for.
> 
> IIUC origin/next is not the proper reference at this point in the release
> cycle, so I would say it doesn't matter.
> 

next is pushed only after -rc2. We are currently in the merge window, so 
master is the target for patches, c.f. 
https://docs.u-boot.org/en/latest/develop/release_cycle.html#release-cycle

Cheers,
Quentin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: lwip: dns depend on enabled protocol config instead of command
  2025-07-18 13:25     ` Quentin Schulz
@ 2025-07-19  3:04       ` E Shattow
  0 siblings, 0 replies; 5+ messages in thread
From: E Shattow @ 2025-07-19  3:04 UTC (permalink / raw)
  To: Quentin Schulz, Jerome Forissier, Joe Hershberger, Ramon Fried,
	Tom Rini, Tim Harvey
  Cc: u-boot

Hi Quentin, Jerome,

On 7/18/25 06:25, Quentin Schulz wrote:
> Hi Jerome, E,
> 
> On 7/18/25 12:29 PM, Jerome Forissier wrote:
>> Hi E,
>>
>> On 7/14/25 03:52, E Shattow wrote:
>>>
>>>
>>> On 7/11/25 22:01, E Shattow wrote:
>>>> Allow dns when enabled CONFIG_PROT_DNS_LWIP=y CONFIG_CMD_DNS=n
>>>>
>>>> Fixes: a383869d6b58 ("net: lwip: move dns init to common function")
>>>> Signed-off-by: E Shattow <e@freeshell.de>
>>>> ---
>>>>   net/lwip/net-lwip.c | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c
>>>> index 3918d57d7e5..5d247c3721b 100644
>>>> --- a/net/lwip/net-lwip.c
>>>> +++ b/net/lwip/net-lwip.c
>>>> @@ -147,7 +147,7 @@ static int get_udev_ipv4_info(struct udevice
>>>> *dev, ip4_addr_t *ip,
>>>>    */
>>>>   int net_lwip_dns_init(void)
>>>>   {
>>>> -#if CONFIG_IS_ENABLED(CMD_DNS)
>>>> +#if CONFIG_IS_ENABLED(PROT_DNS_LWIP)
>>>>       bool has_server = false;
>>>>       ip_addr_t ns;
>>>>       char *nsenv;
>>>>
>>>> base-commit: 6bb0679377abb01a82db1ce69b5bf1d40aa02ace
>>
>> I think the proper way is to introduce a new "DNS" Kconfig symbol to
>> differentiate between DNS support and the DNS command itself.
>> PROT_DNS_LWIP
>> should remain an internal symbol not exposed to the user and selected
>> automatically when DNS is enabled. DNS would apply to both NET and
>> NET_LWIP.
>>
>> We already have a similar mechanism in place for WGET and CMD_WGET.
>>
>>>
>>> Postscript: There was recently a U-Boot release and the above patch only
>>> applies to origin/master (is apparently not needed or applicable to
>>> origin/next). However on origin/next there are similar troubles where
>>> DNS is disabled unless the dns command is enabled in several network
>>> commands, which is something I can test for but am not the expert to
>>> make a patch or suggestion for.
>>
>> IIUC origin/next is not the proper reference at this point in the release
>> cycle, so I would say it doesn't matter.
>>
> 
> next is pushed only after -rc2. We are currently in the merge window, so
> master is the target for patches, c.f. https://docs.u-boot.org/en/
> latest/develop/release_cycle.html#release-cycle
> 
> Cheers,
> Quentin

Acknowledged. Disregard my patch here. Thanks! -E

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-19  3:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-12  5:01 [PATCH] net: lwip: dns depend on enabled protocol config instead of command E Shattow
2025-07-14  1:52 ` E Shattow
2025-07-18 10:29   ` Jerome Forissier
2025-07-18 13:25     ` Quentin Schulz
2025-07-19  3:04       ` E Shattow

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.