File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -283,7 +283,18 @@ impl PortManager {
283283 }
284284 async fn do_init ( & mut self , switch : & SwitchConnection ) -> Result < ( ) , RBFRTError > {
285285 let req = table:: Request :: new ( "$PORT_STR_INFO" ) ;
286- let all_ports = switch. get_table_entries ( req) . await ?;
286+
287+ // For some reason, the CPU ports are not included if querying without a match key, despite them being present in the $PORT_STR_INFO table.
288+ // So we manually query for them.
289+ let mut all_port_reqs: Vec < table:: Request > = ( 0 ..4 )
290+ . map ( |i| {
291+ table:: Request :: new ( "$PORT_STR_INFO" )
292+ . match_key ( "$PORT_NAME" , MatchValue :: exact ( format ! ( "33/{}" , i) ) )
293+ } )
294+ . collect ( ) ;
295+ all_port_reqs. push ( req) ;
296+
297+ let all_ports = switch. get_tables_entries ( all_port_reqs) . await ?;
287298
288299 for entry in & all_ports {
289300 let e = entry. get_action_data ( "$DEV_PORT" ) ?;
You can’t perform that action at this time.
0 commit comments