Skip to content

RDKCOM-5602: RDKBDEV-3460, RDKBACCL-1878 Create bridge interface for BPI target from VlanManager#35

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

RDKCOM-5602: RDKBDEV-3460, 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
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
…rom VlanManager

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>
@manigandanj
manigandanj force-pushed the vlanmanager_integration branch from e08d359 to 6b53917 Compare June 26, 2026 10:51
@manigandanj manigandanj changed the title RDKBACCL-1878: Create bridge interface for BPI target from VlanManager RDKBDEV-3460, RDKBACCL-1878: Create bridge interface for BPI target from VlanManager Jun 26, 2026
@pradeeptakdas pradeeptakdas changed the title RDKBDEV-3460, RDKBACCL-1878: Create bridge interface for BPI target from VlanManager RDKCOM-5602: RDKBDEV-3460, RDKBACCL-1878 Create bridge interface for BPI target from VlanManager Jun 26, 2026
@pradeeptakdas

Copy link
Copy Markdown
Contributor

As per Augusto input
we have had a look in this changes before, we don't want to introduce more device flags like PLATFORM_BANANAPI_R4_

@manigandanj

Copy link
Copy Markdown
Author

As per Augusto input we have had a look in this changes before, we don't want to introduce more device flags like PLATFORM_BANANAPI_R4_

Since lan0 is already under DSA master(eth1), we can't create macvtype type interface linking to lan0, we did not find other options. Please provide direction.

@manigandanj

Copy link
Copy Markdown
Author

Suggested to have this PR change #40 instead.

@github-actions github-actions Bot locked and limited conversation to collaborators Jul 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants