net: hns3: merge some repetitive macros