Skip to content

RDKBACCL-1878: Create bridge interface for BPI target from VlanManager#35

Open
manigandanj wants to merge 1 commit into
rdkcentral:mainfrom
manigandanj:vlanmanager_integration
Open

RDKBACCL-1878: Create bridge interface for BPI target from VlanManager#35
manigandanj wants to merge 1 commit into
rdkcentral:mainfrom
manigandanj:vlanmanager_integration

Conversation

@manigandanj

Copy link
Copy Markdown

Reason for change: BPI is having lan0 as EthWan interface which is already under DSA master
Test procedure: Able to ping outside IPv4 address. Checked WAN Plug-out and Plug-in.
Risks: None

Copilot AI review requested due to automatic review settings June 16, 2026 13:13
@manigandanj manigandanj requested a review from a team as a code owner June 16, 2026 13:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR adds BananaPi R4 platform-specific handling for untagged Ethernet interfaces by creating a Linux bridge instead of a MACVLAN, and hardens MAC retrieval by failing on empty MAC values.

Changes:

  • Add _PLATFORM_BANANAPI_R4_ conditional path to create a bridge and enslave the base interface.
  • Keep existing MACVLAN behavior for other platforms.
  • Treat empty MAC parameter values as a failure in EthLink_GetMacAddr.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


#if defined (_PLATFORM_BANANAPI_R4_)
v_secure_system("ip link add name %s type bridge", pEntry->Name);
v_secure_system("ip link set address %s dev %s", pEntry->MACAddress, pEntry->Name);
Comment on lines +887 to +888
v_secure_system("ip link add name %s type bridge", pEntry->Name);
v_secure_system("ip link set dev %s master %s", pEntry->BaseInterface, pEntry->Name);
Comment on lines +902 to +904
v_secure_system("ip link add name %s type bridge", pEntry->Name);
v_secure_system("ip link set address %s dev %s", pEntry->MACAddress, pEntry->Name);
v_secure_system("ip link set dev %s master %s", pEntry->BaseInterface, pEntry->Name);
Comment on lines +886 to +889
#if defined (_PLATFORM_BANANAPI_R4_)
v_secure_system("ip link add name %s type bridge", pEntry->Name);
v_secure_system("ip link set dev %s master %s", pEntry->BaseInterface, pEntry->Name);
#else
Comment on lines +901 to +905
#if defined (_PLATFORM_BANANAPI_R4_)
v_secure_system("ip link add name %s type bridge", pEntry->Name);
v_secure_system("ip link set address %s dev %s", pEntry->MACAddress, pEntry->Name);
v_secure_system("ip link set dev %s master %s", pEntry->BaseInterface, pEntry->Name);
#else

if(strlen(acTmpReturnValue) == 0)
{
CcspTraceError(("[%s][%d]Received empty param value\n", __FUNCTION__, __LINE__));
@kpandu987

Copy link
Copy Markdown

Looks okay to me

@manigandanj manigandanj force-pushed the vlanmanager_integration branch from fc09b25 to d8ef67c Compare June 17, 2026 10:26
Reason for change: BPI is having lan0 as EthWan interface which is
already under DSA master
Test procedure: Able to ping outside IPv4 address. Checked WAN Plug-out
and Plug-in.
Risks: None

Signed-off-by: Manigandan Gopalakrishnan <Manigandan_Gopalakrishnan@comcast.com>
Copilot AI review requested due to automatic review settings June 22, 2026 17:31
@manigandanj manigandanj force-pushed the vlanmanager_integration branch from d8ef67c to e08d359 Compare June 22, 2026 17:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


#if defined (_PLATFORM_BANANAPI_R4_)
v_secure_system("ip link add name %s type bridge", pEntry->Name);
v_secure_system("ip link set address %s dev %s", pEntry->MACAddress, pEntry->Name);
Comment on lines +886 to +894
#if defined (_PLATFORM_BANANAPI_R4_)
v_secure_system("ip link add name %s type bridge", pEntry->Name);
v_secure_system("ip link set dev %s master %s", pEntry->BaseInterface, pEntry->Name);
#else
CcspTraceError(("%s-%d: Failed to get MAC address, creating MACVLAN without custom MAC\n", __FUNCTION__, __LINE__));
// Create MACVLAN without setting custom MAC - kernel will assign one
v_secure_system("ip link add link %s name %s type macvlan mode private",
pEntry->BaseInterface, pEntry->Name);
#endif
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.

3 participants