Skip to content

Commit

Permalink
Clang format change. (sonic-net#3080)
Browse files Browse the repository at this point in the history
What I did
This PR has no real code change. It is purely clang formatting. It only applies to the P4Orch codes.
Commands that I run:
find orchagent/p4orch -name *.h -o -name .cpp | xargs clang-format -i -style="{BasedOnStyle: Microsoft, DerivePointerAlignment: false}"

find orchagent -name response_publisher -o -name return_code.h | xargs clang-format -i -style="{BasedOnStyle: Microsoft, DerivePointerAlignment: false}"
  • Loading branch information
mint570 authored and cscarpitta committed Apr 5, 2024
1 parent e213523 commit c0fcbb9
Show file tree
Hide file tree
Showing 44 changed files with 377 additions and 417 deletions.
5 changes: 3 additions & 2 deletions orchagent/p4orch/acl_rule_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "crmorch.h"
#include "dbconnector.h"
#include "intfsorch.h"
#include <nlohmann/json.hpp>
#include "logger.h"
#include "orch.h"
#include "p4orch.h"
Expand All @@ -18,6 +17,7 @@
#include "sai_serialize.h"
#include "table.h"
#include "tokenize.h"
#include <nlohmann/json.hpp>
extern "C"
{
#include "sai.h"
Expand Down Expand Up @@ -165,7 +165,8 @@ std::vector<sai_attribute_t> getMeterSaiAttrs(const P4AclMeter &p4_acl_meter)

} // namespace

ReturnCode AclRuleManager::getSaiObject(const std::string &json_key, sai_object_type_t &object_type, std::string &object_key)
ReturnCode AclRuleManager::getSaiObject(const std::string &json_key, sai_object_type_t &object_type,
std::string &object_key)
{
return StatusCode::SWSS_RC_UNIMPLEMENTED;
}
Expand Down
3 changes: 2 additions & 1 deletion orchagent/p4orch/acl_rule_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ class AclRuleManager : public ObjectManagerInterface
void enqueue(const std::string &table_name, const swss::KeyOpFieldsValuesTuple &entry) override;
void drain() override;
std::string verifyState(const std::string &key, const std::vector<swss::FieldValueTuple> &tuple) override;
ReturnCode getSaiObject(const std::string &json_key, sai_object_type_t &object_type, std::string &object_key) override;
ReturnCode getSaiObject(const std::string &json_key, sai_object_type_t &object_type,
std::string &object_key) override;

// Update counters stats for every rule in each ACL table in COUNTERS_DB, if
// counters are enabled in rules.
Expand Down
5 changes: 3 additions & 2 deletions orchagent/p4orch/acl_table_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "SaiAttributeList.h"
#include "crmorch.h"
#include "dbconnector.h"
#include <nlohmann/json.hpp>
#include "logger.h"
#include "orch.h"
#include "p4orch.h"
Expand All @@ -16,6 +15,7 @@
#include "switchorch.h"
#include "table.h"
#include "tokenize.h"
#include <nlohmann/json.hpp>
extern "C"
{
#include "sai.h"
Expand Down Expand Up @@ -205,7 +205,8 @@ ReturnCodeOr<std::vector<sai_attribute_t>> AclTableManager::getUdfSaiAttrs(const
return udf_attrs;
}

ReturnCode AclTableManager::getSaiObject(const std::string &json_key, sai_object_type_t &object_type, std::string &object_key)
ReturnCode AclTableManager::getSaiObject(const std::string &json_key, sai_object_type_t &object_type,
std::string &object_key)
{
return StatusCode::SWSS_RC_UNIMPLEMENTED;
}
Expand Down
3 changes: 2 additions & 1 deletion orchagent/p4orch/acl_table_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class AclTableManager : public ObjectManagerInterface
void enqueue(const std::string &table_name, const swss::KeyOpFieldsValuesTuple &entry) override;
void drain() override;
std::string verifyState(const std::string &key, const std::vector<swss::FieldValueTuple> &tuple) override;
ReturnCode getSaiObject(const std::string &json_key, sai_object_type_t &object_type, std::string &object_key) override;
ReturnCode getSaiObject(const std::string &json_key, sai_object_type_t &object_type,
std::string &object_key) override;

// Get ACL table definition by table name in cache. Return nullptr if not
// found.
Expand Down
2 changes: 1 addition & 1 deletion orchagent/p4orch/acl_util.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include "p4orch/acl_util.h"

#include "converter.h"
#include <nlohmann/json.hpp>
#include "logger.h"
#include "sai_serialize.h"
#include "table.h"
#include "tokenize.h"
#include <nlohmann/json.hpp>

namespace p4orch
{
Expand Down
2 changes: 1 addition & 1 deletion orchagent/p4orch/acl_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#include <string>
#include <vector>

#include <nlohmann/json.hpp>
#include "p4orch/p4orch_util.h"
#include "return_code.h"
#include <nlohmann/json.hpp>
extern "C"
{
#include "sai.h"
Expand Down
Loading

0 comments on commit c0fcbb9

Please sign in to comment.