Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IPv6 support #1057

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add IPv6 support #1057

wants to merge 2 commits into from

Conversation

mateuszkobak
Copy link

@mateuszkobak mateuszkobak commented Apr 17, 2024

Description

Enable IPv6 and ping6 in busybox

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: ia32-generic-qemu (list targets here).

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

@mateuszkobak mateuszkobak force-pushed the mateuszkobak/ipv6 branch 2 times, most recently from 6b3d52b to 84ef1b5 Compare April 18, 2024 13:06
@mateuszkobak mateuszkobak marked this pull request as ready for review April 18, 2024 13:11
Copy link

github-actions bot commented Apr 18, 2024

Unit Test Results

7 460 tests  ±0   6 745 ✅ ±0   36m 55s ⏱️ - 1m 15s
  420 suites ±0     715 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit a7dcf13. ± Comparison against base commit b3ee001.

♻️ This comment has been updated with latest results.

Comment on lines +1 to +21
#define LWIP_TCPIP_CORE_LOCKING 1
#define LWIP_SUPPORT_CUSTOM_PBUF 1
#define LWIP_NETIF_LOOPBACK 1
#define LWIP_HAVE_SLIPIF 0
#define LWIP_NETIF_API 1
#define LWIP_SOCKET 1
#define LWIP_COMPAT_SOCKETS 0
#define LWIP_ARP 1
#define LWIP_ICMP 1
#define LWIP_RAW 1
#define LWIP_DHCP 1
#define LWIP_DNS 1
#define LWIP_AUTOIP 1
#define LWIP_UDP 1
#define LWIP_TCP 1
#define LWIP_TCP_KEEPALIVE 1
#define MEM_LIBC_MALLOC 1
#define MEMP_MEM_MALLOC 1
#define LWIP_ERRNO_INCLUDE "errno.h"
#define LWIP_DNS_API_DEFINE_ERRORS 0
#define LWIP_DNS_API_DEFINE_FLAGS 0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[clang-format-pr] reported by reviewdog 🐶
suggested fix

Suggested change
#define LWIP_TCPIP_CORE_LOCKING 1
#define LWIP_SUPPORT_CUSTOM_PBUF 1
#define LWIP_NETIF_LOOPBACK 1
#define LWIP_HAVE_SLIPIF 0
#define LWIP_NETIF_API 1
#define LWIP_SOCKET 1
#define LWIP_COMPAT_SOCKETS 0
#define LWIP_ARP 1
#define LWIP_ICMP 1
#define LWIP_RAW 1
#define LWIP_DHCP 1
#define LWIP_DNS 1
#define LWIP_AUTOIP 1
#define LWIP_UDP 1
#define LWIP_TCP 1
#define LWIP_TCP_KEEPALIVE 1
#define MEM_LIBC_MALLOC 1
#define MEMP_MEM_MALLOC 1
#define LWIP_ERRNO_INCLUDE "errno.h"
#define LWIP_DNS_API_DEFINE_ERRORS 0
#define LWIP_DNS_API_DEFINE_FLAGS 0
#define LWIP_TCPIP_CORE_LOCKING 1
#define LWIP_SUPPORT_CUSTOM_PBUF 1
#define LWIP_NETIF_LOOPBACK 1
#define LWIP_HAVE_SLIPIF 0
#define LWIP_NETIF_API 1
#define LWIP_SOCKET 1
#define LWIP_COMPAT_SOCKETS 0
#define LWIP_ARP 1
#define LWIP_ICMP 1
#define LWIP_RAW 1
#define LWIP_DHCP 1
#define LWIP_DNS 1
#define LWIP_AUTOIP 1
#define LWIP_UDP 1
#define LWIP_TCP 1
#define LWIP_TCP_KEEPALIVE 1
#define MEM_LIBC_MALLOC 1
#define MEMP_MEM_MALLOC 1
#define LWIP_ERRNO_INCLUDE "errno.h"
#define LWIP_DNS_API_DEFINE_ERRORS 0
#define LWIP_DNS_API_DEFINE_FLAGS 0

Comment on lines 24 to 33
#define MEMP_NUM_NETCONN 1024
#define PPP_SUPPORT 1
#define PPPOS_SUPPORT 1
#define PAP_SUPPORT 1
#define CHAP_SUPPORT 1
#define MSCHAP_SUPPORT 1
#define LWIP_TIMEVAL_PRIVATE 0
#define LWIP_IPV6 1
#define LWIP_IPV6_AUTOCONFIG 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[clang-format-pr] reported by reviewdog 🐶
suggested fix

Suggested change
#define MEMP_NUM_NETCONN 1024
#define PPP_SUPPORT 1
#define PPPOS_SUPPORT 1
#define PAP_SUPPORT 1
#define CHAP_SUPPORT 1
#define MSCHAP_SUPPORT 1
#define LWIP_TIMEVAL_PRIVATE 0
#define LWIP_IPV6 1
#define LWIP_IPV6_AUTOCONFIG 1
#define MEMP_NUM_NETCONN 1024
#define PPP_SUPPORT 1
#define PPPOS_SUPPORT 1
#define PAP_SUPPORT 1
#define CHAP_SUPPORT 1
#define MSCHAP_SUPPORT 1
#define LWIP_TIMEVAL_PRIVATE 0
#define LWIP_IPV6 1
#define LWIP_IPV6_AUTOCONFIG 1

Comment on lines +35 to +38
#if 0 // debugging LWiP PPPoS
#define LWIP_DEBUG 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[clang-format-pr] reported by reviewdog 🐶
suggested fix

Suggested change
#if 0 // debugging LWiP PPPoS
#define LWIP_DEBUG 1
#if 0 // debugging LWiP PPPoS
#define LWIP_DEBUG 1

Comment on lines +38 to +41
#define LWIP_DBG_TYPES_ON LWIP_DBG_ON
#define PPP_DEBUG LWIP_DBG_ON

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[clang-format-pr] reported by reviewdog 🐶
suggested fix

Suggested change
#define LWIP_DBG_TYPES_ON LWIP_DBG_ON
#define PPP_DEBUG LWIP_DBG_ON
#define LWIP_DBG_TYPES_ON LWIP_DBG_ON
#define PPP_DEBUG LWIP_DBG_ON

#endif

#if 0
#define LWIP_DEBUG 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[clang-format-pr] reported by reviewdog 🐶
suggested fix

Suggested change
#define LWIP_DEBUG 1
#define LWIP_DEBUG 1

Comment on lines +45 to +49
#define LWIP_DBG_TYPES_ON LWIP_DBG_ON
#define PBUF_DEBUG LWIP_DBG_OFF
#define SOCKETS_DEBUG LWIP_DBG_ON

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[clang-format-pr] reported by reviewdog 🐶
suggested fix

Suggested change
#define LWIP_DBG_TYPES_ON LWIP_DBG_ON
#define PBUF_DEBUG LWIP_DBG_OFF
#define SOCKETS_DEBUG LWIP_DBG_ON
#define LWIP_DBG_TYPES_ON LWIP_DBG_ON
#define PBUF_DEBUG LWIP_DBG_OFF
#define SOCKETS_DEBUG LWIP_DBG_ON

Comment on lines +69 to +90
#define TCP_MSS 1460
#define TCP_WND (32 * TCP_MSS)
#define TCP_SND_BUF TCP_WND
#define ETH_PAD_SIZE 2
#define ETHARP_TABLE_MATCH_NETIF 1
#define IP_REASSEMBLY 1
#define IP_FRAG 1
#define SO_REUSE 1
#define DEFAULT_THREAD_STACKSIZE (4 * 4096)
#define TCPIP_THREAD_STACKSIZE (4 * 4096)
#define TCPIP_THREAD_PRIO 3
#define TCPIP_MBOX_SIZE 256
#define DEFAULT_RAW_RECVMBOX_SIZE 32
#define DEFAULT_UDP_RECVMBOX_SIZE 32
#define DEFAULT_TCP_RECVMBOX_SIZE 32
#define DEFAULT_ACCEPTMBOX_SIZE 32
#define LWIP_HOOK_FILENAME "phoenix-hooks.h"
#define LWIP_EXT_PF 1
#define LWIP_NETIF_STATUS_CALLBACK 1
#define LWIP_DHCP_AUTOIP_COOP 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[clang-format-pr] reported by reviewdog 🐶
suggested fix

Suggested change
#define TCP_MSS 1460
#define TCP_WND (32 * TCP_MSS)
#define TCP_SND_BUF TCP_WND
#define ETH_PAD_SIZE 2
#define ETHARP_TABLE_MATCH_NETIF 1
#define IP_REASSEMBLY 1
#define IP_FRAG 1
#define SO_REUSE 1
#define DEFAULT_THREAD_STACKSIZE (4 * 4096)
#define TCPIP_THREAD_STACKSIZE (4 * 4096)
#define TCPIP_THREAD_PRIO 3
#define TCPIP_MBOX_SIZE 256
#define DEFAULT_RAW_RECVMBOX_SIZE 32
#define DEFAULT_UDP_RECVMBOX_SIZE 32
#define DEFAULT_TCP_RECVMBOX_SIZE 32
#define DEFAULT_ACCEPTMBOX_SIZE 32
#define LWIP_HOOK_FILENAME "phoenix-hooks.h"
#define LWIP_EXT_PF 1
#define LWIP_NETIF_STATUS_CALLBACK 1
#define LWIP_DHCP_AUTOIP_COOP 1
#define TCP_MSS 1460
#define TCP_WND (32 * TCP_MSS)
#define TCP_SND_BUF TCP_WND
#define ETH_PAD_SIZE 2
#define ETHARP_TABLE_MATCH_NETIF 1
#define IP_REASSEMBLY 1
#define IP_FRAG 1
#define SO_REUSE 1
#define DEFAULT_THREAD_STACKSIZE (4 * 4096)
#define TCPIP_THREAD_STACKSIZE (4 * 4096)
#define TCPIP_THREAD_PRIO 3
#define TCPIP_MBOX_SIZE 256
#define DEFAULT_RAW_RECVMBOX_SIZE 32
#define DEFAULT_UDP_RECVMBOX_SIZE 32
#define DEFAULT_TCP_RECVMBOX_SIZE 32
#define DEFAULT_ACCEPTMBOX_SIZE 32
#define LWIP_HOOK_FILENAME "phoenix-hooks.h"
#define LWIP_EXT_PF 1
#define LWIP_NETIF_STATUS_CALLBACK 1
#define LWIP_DHCP_AUTOIP_COOP 1

Comment on lines +90 to +93
#define LWIP_SO_RCVTIMEO 1
#define ifreq lwip_ifreq

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[clang-format-pr] reported by reviewdog 🐶
suggested fix

Suggested change
#define LWIP_SO_RCVTIMEO 1
#define ifreq lwip_ifreq
#define LWIP_SO_RCVTIMEO 1
#define ifreq lwip_ifreq

busybox_config Outdated
@@ -792,7 +792,7 @@ CONFIG_FEATURE_LESS_MAXLINES=0
#
# Networking Utilities
#
# CONFIG_FEATURE_IPV6 is not set
CONFIG_FEATURE_IPV6=y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure - maybe you should provide also custom busybox config only for ia32? (as for armv7a9-zynq7000-zedboard)

#define CHAP_SUPPORT 1
#define MSCHAP_SUPPORT 1
#define LWIP_TIMEVAL_PRIVATE 0
#define LWIP_IPV6 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • maybe move it to separate section so the addition of ipv6 (over default config would be more visible
  • consider defining larger LWIP_IFSTATUS_DEV_BUFFER_SIZE if you feel the need (multiple ipv6 addresses?

 * libphoenix 72389ef...052023c (1):
   > Add support for IPv6

 * phoenix-rtos-lwip c52c569...565b7ba (4):
   > Update submodule
   > Add IPv6 address autoconfiguration
   > drivers/rtl8139cp.c: Change multicast filters
   > port/sockets.c: Fix IPv6 ioctls

 * phoenix-rtos-ports 46f7c3d...bba10b4 (3):
   > busybox: Add IPv6 support for ifconfig
   > busybox: Fix ping6
   > busybox: include net/ip6_route.h in busybox route.c

JIRA: COG-42
Comment on lines +24 to +30
#define MEMP_NUM_NETCONN 1024
#define PPP_SUPPORT 1
#define PPPOS_SUPPORT 1
#define PAP_SUPPORT 1
#define CHAP_SUPPORT 1
#define MSCHAP_SUPPORT 1
#define LWIP_TIMEVAL_PRIVATE 0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[clang-format-pr] reported by reviewdog 🐶
suggested fix

Suggested change
#define MEMP_NUM_NETCONN 1024
#define PPP_SUPPORT 1
#define PPPOS_SUPPORT 1
#define PAP_SUPPORT 1
#define CHAP_SUPPORT 1
#define MSCHAP_SUPPORT 1
#define LWIP_TIMEVAL_PRIVATE 0
#define MEMP_NUM_NETCONN 1024
#define PPP_SUPPORT 1
#define PPPOS_SUPPORT 1
#define PAP_SUPPORT 1
#define CHAP_SUPPORT 1
#define MSCHAP_SUPPORT 1
#define LWIP_TIMEVAL_PRIVATE 0

Comment on lines +32 to +33
#define LWIP_IPV6 1
#define LWIP_IPV6_AUTOCONFIG 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[clang-format-pr] reported by reviewdog 🐶
suggested fix

Suggested change
#define LWIP_IPV6 1
#define LWIP_IPV6_AUTOCONFIG 1
#define LWIP_IPV6 1
#define LWIP_IPV6_AUTOCONFIG 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants