Skip to content

Commit 4350eea

Browse files
Disable All Groupcast Functionality by Default (#72047)
* Initial updates to zap, gni, all devices args, python tests * Remove args.gni file that wasnt needed * Fix compile issues * Update python tests all devices app args * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Zap regen * Remove unimplemented app arg * max groups per fabric revert to legacy unless for constructor * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Cast to uint16_t and make hex value lowercase * add todo * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 1685bfb commit 4350eea

32 files changed

Lines changed: 66 additions & 568 deletions

File tree

examples/all-clusters-app/linux/args.gni

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ openthread_project_core_config_file = rebase_path(
5151
get_path_info(
5252
"${chip_root}/third_party/openthread/repo/examples/platforms/simulation/openthread-core-simulation-config.h",
5353
"abspath"))
54-
chip_config_enable_groupcast = true
54+
chip_config_enable_groupcast = false

examples/all-devices-app/all-devices-common/devices/root-node/RootNodeDevice.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,17 @@ CHIP_ERROR RootNodeDevice::Register(EndpointId endpointId, CodeDrivenDataModelPr
9393
ReturnErrorOnFailure(provider.AddCluster(mGroupKeyManagementCluster.Registration()));
9494

9595
#if CHIP_CONFIG_ENABLE_GROUPCAST
96-
mGroupcastCluster.Create(GroupcastContext{ .fabricTable = mContext.fabricTable,
97-
.groupDataProvider = mContext.groupDataProvider,
98-
.timerDelegate = mContext.timerDelegate,
99-
.accessControl = mContext.accessControl },
100-
BitFlags<Clusters::Groupcast::Feature>(Clusters::Groupcast::Feature::kListener,
101-
Clusters::Groupcast::Feature::kSender,
102-
Clusters::Groupcast::Feature::kPerGroup));
103-
ReturnErrorOnFailure(provider.AddCluster(mGroupcastCluster.Registration()));
96+
if (mContext.groupDataProvider.IsGroupcastEnabled())
97+
{
98+
mGroupcastCluster.Create(GroupcastContext{ .fabricTable = mContext.fabricTable,
99+
.groupDataProvider = mContext.groupDataProvider,
100+
.timerDelegate = mContext.timerDelegate,
101+
.accessControl = mContext.accessControl },
102+
BitFlags<Clusters::Groupcast::Feature>(Clusters::Groupcast::Feature::kListener,
103+
Clusters::Groupcast::Feature::kSender,
104+
Clusters::Groupcast::Feature::kPerGroup));
105+
ReturnErrorOnFailure(provider.AddCluster(mGroupcastCluster.Registration()));
106+
}
104107
#endif // CHIP_CONFIG_ENABLE_GROUPCAST
105108

106109
mSoftwareDiagnosticsServerCluster.Create(SoftwareDiagnosticsServerCluster::OptionalAttributeSet{},

examples/all-devices-app/posix/app_options/AppOptions.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ constexpr uint16_t kOptionProductId = 0xffd6;
3737
constexpr uint16_t kOptionPort = 0xffd7;
3838
constexpr uint16_t kOptionInterfaceId = 0xffd8;
3939
constexpr uint16_t kOptionBLE = 0xffd9;
40+
constexpr uint16_t kOptionGroupcast = 0xffda;
4041

4142
DeviceTypeParser AppOptions::sParser;
4243
AppOptions::AppConfig AppOptions::mConfig;
@@ -113,6 +114,10 @@ bool AppOptions::AllDevicesAppOptionHandler(const char * program, OptionSet * op
113114
case kOptionInterfaceId:
114115
mConfig.interfaceId = static_cast<uint32_t>(strtoul(value, nullptr, 0));
115116
return true;
117+
case kOptionGroupcast:
118+
mConfig.enableGroupcast = true;
119+
ChipLogProgress(AppServer, "Groupcast usage enabled");
120+
return true;
116121
default:
117122
ChipLogError(Support, "%s: INTERNAL ERROR: Unhandled option: %s\n", program, name);
118123
return false;
@@ -137,6 +142,7 @@ OptionSet * AppOptions::GetOptions()
137142
{ "product-id", kArgumentRequired, kOptionProductId },
138143
{ "port", kArgumentRequired, kOptionPort },
139144
{ "interface-id", kArgumentRequired, kOptionInterfaceId },
145+
{ "groupcast", kNoArgument, kOptionGroupcast },
140146
{}, // need empty terminator
141147
};
142148

examples/all-devices-app/posix/app_options/AppOptions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class AppOptions
4141
std::optional<uint16_t> productId;
4242
std::optional<uint16_t> port;
4343
std::optional<uint32_t> interfaceId;
44+
bool enableGroupcast = false;
4445
};
4546

4647
static chip::ArgParser::OptionSet * GetOptions();

examples/all-devices-app/posix/main.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,14 @@ void RunApplication(AppMainLoopImplementation * mainLoop = nullptr)
204204
SuccessOrDie(initParams.InitializeStaticResourcesBeforeServerInit());
205205

206206
#if CHIP_CONFIG_ENABLE_GROUPCAST
207-
static chip::Access::Examples::GroupAuxiliaryAccessControlDelegate groupAuxDelegate(&gGroupDataProvider,
208-
&Server::GetInstance().GetFabricTable());
209-
initParams.groupAuxiliaryAccessControlDelegate = &groupAuxDelegate;
210-
gGroupDataProvider.SetGroupcastEnabled(true);
207+
// TODO(#72056): Once groupcast is enabled by default, this should not be dependent on the app argument.
208+
if (AppOptions::GetConfig().enableGroupcast)
209+
{
210+
static chip::Access::Examples::GroupAuxiliaryAccessControlDelegate groupAuxDelegate(
211+
&gGroupDataProvider, &Server::GetInstance().GetFabricTable());
212+
initParams.groupAuxiliaryAccessControlDelegate = &groupAuxDelegate;
213+
gGroupDataProvider.SetGroupcastEnabled(true);
214+
}
211215
#endif // CHIP_CONFIG_ENABLE_GROUPCAST
212216

213217
gGroupDataProvider.SetStorageDelegate(initParams.persistentStorageDelegate);

examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter

Lines changed: 0 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -2398,116 +2398,6 @@ provisional cluster ScenesManagement = 98 {
23982398
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
23992399
}
24002400

2401-
/** The Groupcast cluster manages the content of the node-wide multicast Group membership that is part of the underlying interaction layer. */
2402-
provisional cluster Groupcast = 101 {
2403-
revision 1;
2404-
2405-
enum GroupcastTestResultEnum : enum8 {
2406-
kSuccess = 0;
2407-
kGeneralError = 1;
2408-
kMessageReplay = 2;
2409-
kFailedAuth = 3;
2410-
kNoAvailableKey = 4;
2411-
kSendFailure = 5;
2412-
}
2413-
2414-
enum GroupcastTestingEnum : enum8 {
2415-
kDisableTesting = 0;
2416-
kEnableListenerTesting = 1;
2417-
kEnableSenderTesting = 2;
2418-
}
2419-
2420-
enum MulticastAddrPolicyEnum : enum8 {
2421-
kIanaAddr = 0;
2422-
kPerGroup = 1;
2423-
}
2424-
2425-
bitmap Feature : bitmap32 {
2426-
kListener = 0x1;
2427-
kSender = 0x2;
2428-
kPerGroup = 0x4;
2429-
}
2430-
2431-
fabric_scoped struct MembershipStruct {
2432-
group_id groupID = 0;
2433-
optional endpoint_no endpoints[] = 1;
2434-
fabric_sensitive int16u keySetID = 2;
2435-
optional boolean hasAuxiliaryACL = 3;
2436-
MulticastAddrPolicyEnum mcastAddrPolicy = 4;
2437-
fabric_idx fabricIndex = 254;
2438-
}
2439-
2440-
provisional fabric_sensitive info event access(read: administer) GroupcastTesting = 0 {
2441-
optional octet_string sourceIpAddress = 0;
2442-
optional octet_string destinationIpAddress = 1;
2443-
optional group_id groupID = 2;
2444-
optional endpoint_no endpointID = 3;
2445-
optional cluster_id clusterID = 4;
2446-
optional int32u elementID = 5;
2447-
optional boolean accessAllowed = 6;
2448-
GroupcastTestResultEnum groupcastTestResult = 7;
2449-
fabric_idx fabricIndex = 254;
2450-
}
2451-
2452-
provisional readonly attribute MembershipStruct membership[] = 0;
2453-
provisional readonly attribute int16u maxMembershipCount = 1;
2454-
provisional readonly attribute int16u maxMcastAddrCount = 2;
2455-
provisional readonly attribute int16u usedMcastAddrCount = 3;
2456-
provisional readonly attribute fabric_idx fabricUnderTest = 4;
2457-
readonly attribute command_id generatedCommandList[] = 65528;
2458-
readonly attribute command_id acceptedCommandList[] = 65529;
2459-
readonly attribute attrib_id attributeList[] = 65531;
2460-
readonly attribute bitmap32 featureMap = 65532;
2461-
readonly attribute int16u clusterRevision = 65533;
2462-
2463-
request struct JoinGroupRequest {
2464-
group_id groupID = 0;
2465-
endpoint_no endpoints[] = 1;
2466-
int16u keySetID = 2;
2467-
optional octet_string<16> key = 3;
2468-
optional boolean useAuxiliaryACL = 4;
2469-
optional boolean replaceEndpoints = 5;
2470-
optional MulticastAddrPolicyEnum mcastAddrPolicy = 6;
2471-
}
2472-
2473-
request struct LeaveGroupRequest {
2474-
group_id groupID = 0;
2475-
optional endpoint_no endpoints[] = 1;
2476-
}
2477-
2478-
response struct LeaveGroupResponse = 2 {
2479-
group_id groupID = 0;
2480-
endpoint_no endpoints[] = 1;
2481-
}
2482-
2483-
request struct UpdateGroupKeyRequest {
2484-
group_id groupID = 0;
2485-
int16u keySetID = 1;
2486-
optional octet_string<16> key = 2;
2487-
}
2488-
2489-
request struct ConfigureAuxiliaryACLRequest {
2490-
group_id groupID = 0;
2491-
boolean useAuxiliaryACL = 1;
2492-
}
2493-
2494-
request struct GroupcastTestingRequest {
2495-
GroupcastTestingEnum testOperation = 0;
2496-
optional int16u durationSeconds = 1;
2497-
}
2498-
2499-
/** This command SHALL be used to instruct the server to join a multicast group. */
2500-
fabric command access(invoke: manage) JoinGroup(JoinGroupRequest): DefaultSuccess = 0;
2501-
/** This command SHALL allow a maintainer to request that the server withdraws itself or specific endpoints from a specific group or from all groups of this client's fabric. */
2502-
fabric command access(invoke: manage) LeaveGroup(LeaveGroupRequest): LeaveGroupResponse = 1;
2503-
/** This command SHALL allow a fabric administrator to update the OperationalGroupKey associated with the existing group identified by GroupID, which is already joined. */
2504-
fabric command access(invoke: manage) UpdateGroupKey(UpdateGroupKeyRequest): DefaultSuccess = 3;
2505-
/** This command SHALL allow an Administrator to enable or disable the generation of AuxiliaryACL entries in the Access Control Cluster based on the groups joined (see Groupcast Auxiliary ACL Handling). */
2506-
fabric command access(invoke: administer) ConfigureAuxiliaryACL(ConfigureAuxiliaryACLRequest): DefaultSuccess = 4;
2507-
/** This command SHALL allow an Administrator to configure test modes that allow validation of Groupcast communication. */
2508-
fabric command access(invoke: administer) GroupcastTesting(GroupcastTestingRequest): DefaultSuccess = 5;
2509-
}
2510-
25112401
/** Attributes and commands for controlling the color properties of a color-capable light. */
25122402
cluster ColorControl = 768 {
25132403
revision 9;
@@ -3145,26 +3035,6 @@ endpoint 0 {
31453035
callback attribute featureMap;
31463036
callback attribute clusterRevision;
31473037
}
3148-
3149-
server cluster Groupcast {
3150-
emits event GroupcastTesting;
3151-
callback attribute membership;
3152-
callback attribute maxMembershipCount;
3153-
callback attribute maxMcastAddrCount;
3154-
callback attribute usedMcastAddrCount;
3155-
callback attribute fabricUnderTest;
3156-
callback attribute generatedCommandList;
3157-
callback attribute acceptedCommandList;
3158-
callback attribute attributeList;
3159-
ram attribute featureMap default = 1;
3160-
callback attribute clusterRevision default = 1;
3161-
3162-
handle command JoinGroup;
3163-
handle command LeaveGroup;
3164-
handle command UpdateGroupKey;
3165-
handle command ConfigureAuxiliaryACL;
3166-
handle command GroupcastTesting;
3167-
}
31683038
}
31693039
endpoint 1 {
31703040
device type ma_dimmablelight = 257, version 1;

examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.zap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3918,7 +3918,7 @@
39183918
"mfgCode": null,
39193919
"define": "GROUPCAST_CLUSTER",
39203920
"side": "server",
3921-
"enabled": 1,
3921+
"enabled": 0,
39223922
"apiMaturity": "provisional",
39233923
"commands": [
39243924
{

examples/lighting-app-data-mode-no-unique-id/linux/args.gni

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ chip_enable_rotating_device_id = true
3434

3535
chip_enable_read_client = false
3636

37-
chip_config_enable_groupcast = true
37+
chip_config_enable_groupcast = false

examples/lighting-app/lighting-common/lighting-app.matter

Lines changed: 0 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -2189,116 +2189,6 @@ cluster UserLabel = 65 {
21892189
readonly attribute int16u clusterRevision = 65533;
21902190
}
21912191

2192-
/** The Groupcast cluster manages the content of the node-wide multicast Group membership that is part of the underlying interaction layer. */
2193-
provisional cluster Groupcast = 101 {
2194-
revision 1;
2195-
2196-
enum GroupcastTestResultEnum : enum8 {
2197-
kSuccess = 0;
2198-
kGeneralError = 1;
2199-
kMessageReplay = 2;
2200-
kFailedAuth = 3;
2201-
kNoAvailableKey = 4;
2202-
kSendFailure = 5;
2203-
}
2204-
2205-
enum GroupcastTestingEnum : enum8 {
2206-
kDisableTesting = 0;
2207-
kEnableListenerTesting = 1;
2208-
kEnableSenderTesting = 2;
2209-
}
2210-
2211-
enum MulticastAddrPolicyEnum : enum8 {
2212-
kIanaAddr = 0;
2213-
kPerGroup = 1;
2214-
}
2215-
2216-
bitmap Feature : bitmap32 {
2217-
kListener = 0x1;
2218-
kSender = 0x2;
2219-
kPerGroup = 0x4;
2220-
}
2221-
2222-
fabric_scoped struct MembershipStruct {
2223-
group_id groupID = 0;
2224-
optional endpoint_no endpoints[] = 1;
2225-
fabric_sensitive int16u keySetID = 2;
2226-
optional boolean hasAuxiliaryACL = 3;
2227-
MulticastAddrPolicyEnum mcastAddrPolicy = 4;
2228-
fabric_idx fabricIndex = 254;
2229-
}
2230-
2231-
provisional fabric_sensitive info event access(read: administer) GroupcastTesting = 0 {
2232-
optional octet_string sourceIpAddress = 0;
2233-
optional octet_string destinationIpAddress = 1;
2234-
optional group_id groupID = 2;
2235-
optional endpoint_no endpointID = 3;
2236-
optional cluster_id clusterID = 4;
2237-
optional int32u elementID = 5;
2238-
optional boolean accessAllowed = 6;
2239-
GroupcastTestResultEnum groupcastTestResult = 7;
2240-
fabric_idx fabricIndex = 254;
2241-
}
2242-
2243-
provisional readonly attribute MembershipStruct membership[] = 0;
2244-
provisional readonly attribute int16u maxMembershipCount = 1;
2245-
provisional readonly attribute int16u maxMcastAddrCount = 2;
2246-
provisional readonly attribute int16u usedMcastAddrCount = 3;
2247-
provisional readonly attribute fabric_idx fabricUnderTest = 4;
2248-
readonly attribute command_id generatedCommandList[] = 65528;
2249-
readonly attribute command_id acceptedCommandList[] = 65529;
2250-
readonly attribute attrib_id attributeList[] = 65531;
2251-
readonly attribute bitmap32 featureMap = 65532;
2252-
readonly attribute int16u clusterRevision = 65533;
2253-
2254-
request struct JoinGroupRequest {
2255-
group_id groupID = 0;
2256-
endpoint_no endpoints[] = 1;
2257-
int16u keySetID = 2;
2258-
optional octet_string<16> key = 3;
2259-
optional boolean useAuxiliaryACL = 4;
2260-
optional boolean replaceEndpoints = 5;
2261-
optional MulticastAddrPolicyEnum mcastAddrPolicy = 6;
2262-
}
2263-
2264-
request struct LeaveGroupRequest {
2265-
group_id groupID = 0;
2266-
optional endpoint_no endpoints[] = 1;
2267-
}
2268-
2269-
response struct LeaveGroupResponse = 2 {
2270-
group_id groupID = 0;
2271-
endpoint_no endpoints[] = 1;
2272-
}
2273-
2274-
request struct UpdateGroupKeyRequest {
2275-
group_id groupID = 0;
2276-
int16u keySetID = 1;
2277-
optional octet_string<16> key = 2;
2278-
}
2279-
2280-
request struct ConfigureAuxiliaryACLRequest {
2281-
group_id groupID = 0;
2282-
boolean useAuxiliaryACL = 1;
2283-
}
2284-
2285-
request struct GroupcastTestingRequest {
2286-
GroupcastTestingEnum testOperation = 0;
2287-
optional int16u durationSeconds = 1;
2288-
}
2289-
2290-
/** This command SHALL be used to instruct the server to join a multicast group. */
2291-
fabric command access(invoke: manage) JoinGroup(JoinGroupRequest): DefaultSuccess = 0;
2292-
/** This command SHALL allow a maintainer to request that the server withdraws itself or specific endpoints from a specific group or from all groups of this client's fabric. */
2293-
fabric command access(invoke: manage) LeaveGroup(LeaveGroupRequest): LeaveGroupResponse = 1;
2294-
/** This command SHALL allow a fabric administrator to update the OperationalGroupKey associated with the existing group identified by GroupID, which is already joined. */
2295-
fabric command access(invoke: manage) UpdateGroupKey(UpdateGroupKeyRequest): DefaultSuccess = 3;
2296-
/** This command SHALL allow an Administrator to enable or disable the generation of AuxiliaryACL entries in the Access Control Cluster based on the groups joined (see Groupcast Auxiliary ACL Handling). */
2297-
fabric command access(invoke: administer) ConfigureAuxiliaryACL(ConfigureAuxiliaryACLRequest): DefaultSuccess = 4;
2298-
/** This command SHALL allow an Administrator to configure test modes that allow validation of Groupcast communication. */
2299-
fabric command access(invoke: administer) GroupcastTesting(GroupcastTestingRequest): DefaultSuccess = 5;
2300-
}
2301-
23022192
/** Attributes and commands for controlling the color properties of a color-capable light. */
23032193
cluster ColorControl = 768 {
23042194
revision 9;
@@ -2958,26 +2848,6 @@ endpoint 0 {
29582848
callback attribute featureMap;
29592849
callback attribute clusterRevision;
29602850
}
2961-
2962-
server cluster Groupcast {
2963-
emits event GroupcastTesting;
2964-
callback attribute membership;
2965-
callback attribute maxMembershipCount;
2966-
callback attribute maxMcastAddrCount;
2967-
callback attribute usedMcastAddrCount;
2968-
callback attribute fabricUnderTest;
2969-
callback attribute generatedCommandList;
2970-
callback attribute acceptedCommandList;
2971-
callback attribute attributeList;
2972-
ram attribute featureMap default = 1;
2973-
callback attribute clusterRevision default = 1;
2974-
2975-
handle command JoinGroup;
2976-
handle command LeaveGroup;
2977-
handle command UpdateGroupKey;
2978-
handle command ConfigureAuxiliaryACL;
2979-
handle command GroupcastTesting;
2980-
}
29812851
}
29822852
endpoint 1 {
29832853
device type ma_colortemperaturelight = 268, version 4;

examples/lighting-app/lighting-common/lighting-app.zap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4316,7 +4316,7 @@
43164316
"mfgCode": null,
43174317
"define": "GROUPCAST_CLUSTER",
43184318
"side": "server",
4319-
"enabled": 1,
4319+
"enabled": 0,
43204320
"commands": [
43214321
{
43224322
"name": "JoinGroup",

0 commit comments

Comments
 (0)