Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: Changes to make jclklib available from libptpmgmt Makefile #67

Open
wants to merge 93 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
935c4a6
Add Intel files
Feb 1, 2024
0244c1c
Add additional field in TIME_STATUS_NP message
christopher-s-hall Feb 5, 2024
755491b
Initial add of JClkLib proxy code
christopher-s-hall Aug 18, 2023
0fc99a9
Add priority inheritance signaling
christopher-s-hall Oct 20, 2023
fbee4da
Doc: add README_jclklib.md
AzuraTarmiziIntel Mar 19, 2024
640460f
Doc: Add doxy comments for connect message related files.
AzuraTarmiziIntel Mar 19, 2024
dfa3dfd
Doc: Added details on connect message code flow.
AzuraTarmiziIntel Mar 20, 2024
76e15b8
Add coverity scan workflow
yoongsiang2 Mar 29, 2024
e0d1b77
Add OSSF Scorecard workflow
yoongsiang2 Mar 29, 2024
1ccea76
Apply security best practices
step-security-bot Mar 29, 2024
6517c19
Fix CodeQL build issue
yoongsiang2 Mar 29, 2024
f6c8a1f
temporary fix CI running issue
yoongsiang2 Mar 29, 2024
f001d7c
Feature: Complete the connect msg path with timeout
AzuraTarmiziIntel Apr 1, 2024
633a03d
Add new Github action for Virus Scan
yoongsiang2 Apr 15, 2024
b9bb4f2
Add new subscribe event
yoongsiang2 Apr 8, 2024
bdf06fb
Add connection between jclklib proxy and ptp4l
Apr 3, 2024
7365c8a
Add thread for ptp4l event subscription and notification
Apr 3, 2024
65ab75b
doc: Creation TEST_jclkib.md
AzuraTarmiziIntel Apr 24, 2024
674fd7e
Script: Start ptp4l program at proxy
Apr 24, 2024
49c89da
Feature: Subscription message rx and tx
AzuraTarmiziIntel Apr 5, 2024
2a52be7
feature: Add subscription files in client
AzuraTarmiziIntel Apr 9, 2024
a6bf8bd
Subscription: Send back data from Proxy to Client
yoongsiang2 Apr 23, 2024
34ef4c2
Connect: Send ptp4l_id from Proxy to Client once ptp4l is connected
Apr 25, 2024
ab3faa8
feature: Using CommonSubscribe make and parse message for Client and …
AzuraTarmiziIntel May 2, 2024
9f97c70
Subscribe: Write the ptp4l event into client's struct
Apr 29, 2024
f096580
Add notification message
yoongsiang2 Apr 30, 2024
8d893fa
jclklib: Remove less -R from Makefile
yoongsiang2 May 2, 2024
c5fd76d
jclklib: client: temporary disable BlockStopSignal()
yoongsiang2 May 2, 2024
6102431
Process notification message and add event count
May 2, 2024
a55dcdc
ptp4l_event: Adding gmpresent in the ptp event structure
AzuraTarmiziIntel May 2, 2024
fe1fe80
feature: subscribe api with current state given
AzuraTarmiziIntel May 6, 2024
8657d0f
Add status_wait API function
May 6, 2024
157a39d
jclklib: set default logging level to ERROR
yoongsiang2 May 6, 2024
5f5c0a1
Add status wait v2 (#26)
JunAnnLaiIntel May 6, 2024
7b23a9d
jclklib: remove debug printing
yoongsiang2 May 6, 2024
50cbd4d
fix event_count after status_wait
May 6, 2024
f60e184
Add gm UUID as data
May 7, 2024
cb4e6ec
jclklib: use gmOffsetValue instead of magic number
yoongsiang2 May 7, 2024
08f9328
jclklib: update API name to include jcl_ as initial
yoongsiang2 May 7, 2024
d9ce9f6
jclklib: Add timeout support in jcl_status_wait() API
yoongsiang2 May 7, 2024
5d955a9
jclklib: Add subscribed event checking
May 7, 2024
71ada14
jclklib: improve printing in test app
yoongsiang2 May 7, 2024
6726c38
jclklib: Remove the duration for ptp4l subscription
May 7, 2024
676aea4
jclklib: client: Add copyright license header
May 8, 2024
1e8feb4
jclklib: common: Add copyright license header
May 8, 2024
deccad6
jclklib: proxy: Add copyright license header
May 8, 2024
9540357
Add copyright license header for yml file
May 8, 2024
67f6208
jclklib: Add composite event support
yoongsiang2 May 8, 2024
c8baf73
jclklib: Fix incorrect composite status
yoongsiang2 May 9, 2024
3b7b3a8
jclklib: Code cleanup for proxy
May 9, 2024
bbb0750
jclklib: Add ptp4l port state event checking
May 9, 2024
7a3d1d3
jclklib: Fix the event_count is not handle properly
May 9, 2024
891b823
jclklib: Improve test app
yoongsiang2 May 9, 2024
e4ddbff
jclklib: change order of subscription mask
yoongsiang2 May 9, 2024
1e8ae73
jclklib: fix jcl_subscribe() API unable to retrieve data issue
yoongsiang2 May 9, 2024
614cdf6
jclklib: remove unused debug print
yoongsiang2 May 9, 2024
551bb9a
jclklib: continue to process TIME_STATUS_NP msg for uncalibrated state
yoongsiang2 May 9, 2024
438a693
jclklib: remove N/A printing
yoongsiang2 May 9, 2024
76f0501
jclklib: Fix formatting
yoongsiang2 May 9, 2024
899dbbe
Fix servo_state doxygen issue
yoongsiang2 May 9, 2024
05d7e04
Fix error for Tlv2JsonTest.TIME_STATUS_NP unit test
yoongsiang2 May 9, 2024
f5fe2f7
Fix invalid _ptpmProcType(servoState_e) macro
yoongsiang2 May 9, 2024
266a193
Fix error for Json2msgTest.TIME_STATUS_NP unit test
yoongsiang2 May 13, 2024
d9ed515
Fix error for PmcDumpTest.TIME_STATUS_NP unit test
yoongsiang2 May 13, 2024
07660d1
Fix c2cpp conversion for servo state enum
yoongsiang2 May 13, 2024
4affffe
Add servo state into TIME_STATUS_NP structure test
yoongsiang2 May 13, 2024
1f88dda
jclklib: Fix proxy hang issue after client is terminated
May 14, 2024
0547369
jclklib: test: add upper and lower limit for master offset
yoongsiang2 May 14, 2024
4ad70c2
jclklib: test: Add hex support to mask input
yoongsiang2 May 14, 2024
57b73df
Add license header to md
yoongsiang2 May 16, 2024
8df6a18
jclklib: update new build steps in latest libptpmgmt code base
yoongsiang2 May 16, 2024
26f5b8f
jclklib: Change to NOTIFY_CMLDS for as_capable ptp4l event
May 16, 2024
5001377
CI: update coverity based on new build steps
yoongsiang2 May 16, 2024
15282f7
CI: move coverity to jclklib folder
yoongsiang2 May 16, 2024
65b1fc9
CI: fix Codeql build issue
yoongsiang2 May 16, 2024
cfe2627
client data management: Regroup the client data accordingly.
AzuraTarmiziIntel May 9, 2024
43ec112
client data management: Fix the tuple problem
AzuraTarmiziIntel May 15, 2024
ac5b829
jclklib: reset composite event count after wait API
yoongsiang2 May 16, 2024
6ae1379
jclklib: Add debug print in proxy connect msg
yoongsiang2 May 16, 2024
a2ba8fa
jclklib: fix ptp4l_id being clear accidentally
yoongsiang2 May 16, 2024
3192313
jclklib: fix event count dint update properly issue
yoongsiang2 May 16, 2024
611b14e
jclklib: fix event count issue for composite event
yoongsiang2 May 17, 2024
1984dec
jclklib: Fix coverity scan issue
May 20, 2024
0b6b5cc
jclklib: Remove gm_present event
May 20, 2024
79c11fc
jclklib: Fix unintialized scalar variable
May 20, 2024
773ea64
jclklib: proxy: Add multi client notification support
yoongsiang2 May 20, 2024
72b2278
jclklib: Remove debug printing
May 20, 2024
faa5a96
jclklib: Remove -g flag from Makefile
May 20, 2024
e5a4b19
jclklib: Fix event count not updated properly
May 20, 2024
e0bcb2e
jclklib: Move all API related definition to jclk_init.hpp
yoongsiang2 May 20, 2024
d540df4
jclklib: Fix No rule to make target 'init.d' error
yoongsiang2 May 21, 2024
b500ac5
jclklib: Avoid notify client if ascapable is the same
yoongsiang2 May 21, 2024
342010a
Makefile: Changes to make jclklib available from libptpmgmt
AzuraTarmiziIntel May 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build_gentoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on: workflow_dispatch
env:
REGISTRY: ghcr.io

permissions:
contents: read

jobs:
gentoo:
runs-on: ubuntu-latest
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ on: [push, pull_request]
env:
USER: builder

permissions:
contents: read

jobs:
ci:
runs-on: ubuntu-latest
Expand All @@ -28,7 +31,7 @@ jobs:
names: [deb.trixie, deb.bookworm, rpmbuild, pacmanbuild, portage]
fail-fast: false
container:
image: ghcr.io/${{ github.repository_owner }}/${{ matrix.names }}:latest
image: ghcr.io/erezgeva/${{ matrix.names }}:latest
env:
GITHUB_CONTAINER: ${{ matrix.names }}

Expand Down Expand Up @@ -57,7 +60,7 @@ jobs:
names: [deb.trixie, deb.bookworm]
fail-fast: false
container:
image: ghcr.io/${{ github.repository_owner }}/${{ matrix.names }}:latest
image: ghcr.io/erezgeva/${{ matrix.names }}:latest

steps:

Expand All @@ -76,7 +79,7 @@ jobs:
names: [deb.trixie, deb.bookworm, rpmbuild, pacmanbuild, portage]
fail-fast: false
container:
image: ghcr.io/${{ github.repository_owner }}/${{ matrix.names }}:latest
image: ghcr.io/erezgeva/${{ matrix.names }}:latest
env:
GITHUB_CONTAINER: ${{ matrix.names }}

Expand Down
82 changes: 82 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# SPDX-FileCopyrightText: Copyright © 2024 Intel Corporation. All rights reserved.
#
# @author Song Yoong Siang <yoong.siang.song@intel.com>
# @copyright © 2024 Intel Corporation. All rights reserved.
# @license LGPL-3.0-or-later
#
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
###############################################################################

name: "CodeQL"

on:
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
schedule:
- cron: "0 0 * * 1"

permissions:
contents: read

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["cpp", "go", "python", "ruby"]
# CodeQL supports [ $supported-codeql-languages ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@a82bad71823183e5b120ab52d521460ecb0585fe # v2.24.9
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

- name: Install dependencies
run: sudo apt-get install -y swig libtool-bin
- name: autoheader
run: autoheader
- name: autoconf
run: autoconf
- name: configure
run: ./configure
- name: build
run: make

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@a82bad71823183e5b120ab52d521460ecb0585fe # v2.24.9
with:
category: "/language:${{matrix.language}}"
45 changes: 45 additions & 0 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# SPDX-FileCopyrightText: Copyright © 2024 Intel Corporation. All rights reserved.
#
# @author Song Yoong Siang <yoong.siang.song@intel.com>
# @copyright © 2024 Intel Corporation. All rights reserved.
# @license LGPL-3.0-or-later
#
# Visit https://scan.coverity.com/projects/libptpmgmt_iaclocklib for coverity result
###############################################################################

name: Coverity Scan

on:
push:
branches: [main]
workflow_dispatch:

jobs:
coverity:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Install dependencies
run: sudo apt-get install -y swig libtool-bin
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: autoheader
run: autoheader
- name: autoconf
run: autoconf
- name: configure
run: ./configure
- name: make
run: make
- name: install
run: sudo make install
- uses: vapier/coverity-scan-action@2068473c7bdf8c2fb984a6a40ae76ee7facd7a85 # v1.8.0
with:
working-directory: jclklib
email: ${{ secrets.COVERITY_SCAN_EMAIL }}
token: ${{ secrets.COVERITY_SCAN_TOKEN }}
project: libptpmgmt_iaclocklib
7 changes: 6 additions & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@de14547edc9944350dc0481aa5b7afb08e75f254 # v2.0.5
86 changes: 86 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# SPDX-FileCopyrightText: Copyright © 2024 Intel Corporation. All rights reserved.
#
# @author Song Yoong Siang <yoong.siang.song@intel.com>
# @copyright © 2024 Intel Corporation. All rights reserved.
# @license LGPL-3.0-or-later
#
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.
###############################################################################

name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '34 21 * * 2'
push:
branches: [ "main" ]

# Declare default permissions as read only.
permissions: read-all

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecard on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}

# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
with:
sarif_file: results.sarif
34 changes: 34 additions & 0 deletions .github/workflows/virus_scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# SPDX-FileCopyrightText: Copyright © 2024 Intel Corporation. All rights reserved.
#
# @author Song Yoong Siang <yoong.siang.song@intel.com>
# @copyright © 2024 Intel Corporation. All rights reserved.
# @license LGPL-3.0-or-later
#
# scan virus
###############################################################################

name: "Virus Scan"

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

permissions:
contents: read

jobs:
job_id:
name: Scan Virus
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4.0.0
with:
fetch-depth: 0
- name: Scan Repository
uses: hugoalh/scan-virus-ghaction@v0.20.0
with:
statistics_summary: True
Loading
Loading