Commit Graph

171 Commits

Author SHA1 Message Date
Viresh Kumar
328cb1c2d4
Merge pull request #77 from vireshk/i2c/logger
i2c: Initialize env_logger
2022-01-07 14:51:24 +05:30
Viresh Kumar
562428e7b9
Merge branch 'main' into i2c/logger 2022-01-06 15:50:30 +05:30
Viresh Kumar
b3acc32bd9
Merge pull request #87 from rust-vmm/dependabot/cargo/syn-1.0.85
build(deps): bump syn from 1.0.82 to 1.0.85
2022-01-06 15:50:16 +05:30
Viresh Kumar
60b139e7df
Merge branch 'main' into i2c/logger 2022-01-06 15:37:58 +05:30
Viresh Kumar
f9e7d80ef2
Merge branch 'main' into dependabot/cargo/syn-1.0.85 2022-01-06 15:25:25 +05:30
Viresh Kumar
60a4155c60
Merge pull request #86 from rust-vmm/dependabot/cargo/quote-1.0.14
build(deps): bump quote from 1.0.10 to 1.0.14
2022-01-06 15:22:16 +05:30
Viresh Kumar
2898424f0a
Merge branch 'main' into i2c/logger 2022-01-06 15:08:19 +05:30
Viresh Kumar
d6a86ed36c
Merge branch 'main' into dependabot/cargo/quote-1.0.14 2022-01-06 15:02:45 +05:30
Viresh Kumar
a22d282e1f
Merge branch 'main' into dependabot/cargo/syn-1.0.85 2022-01-06 15:02:42 +05:30
Viresh Kumar
ccc395fece
Merge pull request #82 from rust-vmm/dependabot/cargo/vhost-0.3.0
build(deps): bump vhost from 0.2.0 to 0.3.0
2022-01-06 15:01:29 +05:30
Viresh Kumar
8d8950b4cf i2c: Initialize env_logger
The i2c crate now uses log crate to publish error, info and warn
messages, but doesn't initialize a logger yet and these messages never
make it out.

Initialize the env_logger to see these messages.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-01-06 14:41:32 +05:30
Viresh Kumar
7492b83692 i2c: Fix build issues with vhost update
Update version of other dependencies and fix minor build issues.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-01-06 14:37:13 +05:30
dependabot[bot]
50312eadfc build(deps): bump vhost from 0.2.0 to 0.3.0
Bumps [vhost](https://github.com/rust-vmm/vhost) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/rust-vmm/vhost/releases)
- [Changelog](https://github.com/rust-vmm/vhost/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-vmm/vhost/compare/v0.2.0...v0.3.0)

---
updated-dependencies:
- dependency-name: vhost
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-06 14:37:13 +05:30
dependabot[bot]
2c731c07da
build(deps): bump quote from 1.0.10 to 1.0.14
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.10 to 1.0.14.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.10...1.0.14)

---
updated-dependencies:
- dependency-name: quote
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-06 09:04:49 +00:00
dependabot[bot]
38afcccfff
build(deps): bump syn from 1.0.82 to 1.0.85
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.82 to 1.0.85.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.82...1.0.85)

---
updated-dependencies:
- dependency-name: syn
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-06 09:04:47 +00:00
Viresh Kumar
faae8d3569
Merge pull request #85 from vireshk/i2c/move-around
i2c: Move i2c to top folder
2022-01-06 14:33:34 +05:30
Viresh Kumar
21e3a6ac72
Merge branch 'main' into i2c/move-around 2022-01-06 14:26:55 +05:30
Viresh Kumar
0a6a45e2c4
Merge pull request #84 from rust-vmm/dependabot/cargo/version_check-0.9.4
build(deps): bump version_check from 0.9.3 to 0.9.4
2022-01-06 13:53:56 +05:30
Viresh Kumar
677b897576 i2c: Move i2c to top folder
The workspace section in Rust documentation suggests adding new crates
in the top level directory itself instead of the src folder. Remove the
top level src folder.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-01-05 11:09:33 +05:30
Viresh Kumar
6bf7d1d6ad
Merge branch 'main' into dependabot/cargo/version_check-0.9.4 2022-01-05 10:09:01 +05:30
dependabot[bot]
1b25e07312
build(deps): bump version_check from 0.9.3 to 0.9.4
Bumps [version_check](https://github.com/SergioBenitez/version_check) from 0.9.3 to 0.9.4.
- [Release notes](https://github.com/SergioBenitez/version_check/releases)
- [Commits](https://github.com/SergioBenitez/version_check/compare/v0.9.3...v0.9.4)

---
updated-dependencies:
- dependency-name: version_check
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-05 04:37:35 +00:00
Viresh Kumar
bc742518c9
Merge pull request #81 from rust-vmm/dependabot/cargo/proc-macro2-1.0.36
build(deps): bump proc-macro2 from 1.0.33 to 1.0.36
2022-01-05 10:06:40 +05:30
dependabot[bot]
3895dcf249
build(deps): bump proc-macro2 from 1.0.33 to 1.0.36
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.33 to 1.0.36.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.33...1.0.36)

---
updated-dependencies:
- dependency-name: proc-macro2
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-04 21:37:28 +00:00
Viresh Kumar
0415d96ff3
Merge pull request #73 from rust-vmm/dependabot/cargo/libc-0.2.112
build(deps): bump libc from 0.2.111 to 0.2.112
2022-01-05 03:05:58 +05:30
dependabot[bot]
fabceddd83
build(deps): bump libc from 0.2.111 to 0.2.112
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.111 to 0.2.112.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.111...0.2.112)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-20 04:07:45 +00:00
Viresh Kumar
95503ad213
Merge pull request #71 from rust-vmm/dependabot/cargo/libc-0.2.111
build(deps): bump libc from 0.2.109 to 0.2.111
2021-12-13 14:55:08 +05:30
dependabot[bot]
737f4f4736
build(deps): bump libc from 0.2.109 to 0.2.111
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.109 to 0.2.111.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.109...0.2.111)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-13 04:07:38 +00:00
Viresh Kumar
adb938e117
Merge pull request #69 from rust-vmm/dependabot/cargo/proc-macro2-1.0.33
build(deps): bump proc-macro2 from 1.0.32 to 1.0.33
2021-12-07 15:21:49 +05:30
dependabot[bot]
8229f20c02
build(deps): bump proc-macro2 from 1.0.32 to 1.0.33
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.32 to 1.0.33.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.32...1.0.33)

---
updated-dependencies:
- dependency-name: proc-macro2
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 11:26:03 +00:00
Viresh Kumar
23fbaff1dc
Merge pull request #70 from rust-vmm/dependabot/cargo/libc-0.2.109
build(deps): bump libc from 0.2.108 to 0.2.109
2021-12-06 16:54:16 +05:30
dependabot[bot]
1c3ce2b093
build(deps): bump libc from 0.2.108 to 0.2.109
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.108 to 0.2.109.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.108...0.2.109)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 04:07:19 +00:00
Viresh Kumar
840a8fc404
Merge pull request #67 from rust-vmm/dependabot/cargo/syn-1.0.82
build(deps): bump syn from 1.0.81 to 1.0.82
2021-11-29 14:49:10 +05:30
dependabot[bot]
5a2bb0ad8a
build(deps): bump syn from 1.0.81 to 1.0.82
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.81 to 1.0.82.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.81...1.0.82)

---
updated-dependencies:
- dependency-name: syn
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 08:56:44 +00:00
Viresh Kumar
ae3958743d
Merge pull request #63 from vireshk/i2c/testing-wip
I2c/Improved testing
2021-11-29 14:25:21 +05:30
Viresh Kumar
7aecd0314c [i2c] Move process_requests to VhostUserI2cBackend
Move process_requests() as a function of VhostUserI2cBackend. No other
changes.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-11-26 09:58:31 +05:30
Viresh Kumar
a5fc3d1988
Merge branch 'main' into i2c/testing-wip 2021-11-25 17:33:12 +05:30
Viresh Kumar
9c69297bd5
Merge pull request #65 from rust-vmm/dependabot/cargo/libc-0.2.108
build(deps): bump libc from 0.2.107 to 0.2.108
2021-11-25 17:08:59 +05:30
Viresh Kumar
84e7eee6bc
Merge branch 'main' into dependabot/cargo/libc-0.2.108 2021-11-25 16:39:44 +05:30
Viresh Kumar
0805159371
Merge pull request #64 from rust-vmm/dependabot/cargo/arc-swap-1.5.0
build(deps): bump arc-swap from 1.4.0 to 1.5.0
2021-11-25 16:39:24 +05:30
Viresh Kumar
8c92046701 [i2c] Test descriptor processing
Add tests to validate processing of descriptors and read/write data.

The design is based on the virtio_queue::mock::MockSplitQueue
implementation, which is used to add a set of descriptors to the memory.
The same memory is then processed via DescriptorChain and the same set
of descriptors magically appear.

This patch adds various tests for success and failure and also validate
the data read or written.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-11-25 16:22:53 +05:30
Viresh Kumar
f96dc4e50d [i2c] Improve descriptor parsing errors
Improve descriptor parsing errors to contain more information about the
error.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-11-25 16:22:53 +05:30
Viresh Kumar
f9f3bdf845 [i2c] Break process_queue() into two parts
Break out most of the non vring specific stuff to process_requests(),
this is required for testing request processing properly.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-11-25 16:22:53 +05:30
Viresh Kumar
0cc0fe4f7a [i2c] Always update and validate buffers
Not just read-buffers, also validate write buffers for rdwr() tests.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-11-25 16:22:53 +05:30
Viresh Kumar
158b5a0bde
Merge branch 'main' into dependabot/cargo/libc-0.2.108 2021-11-25 16:21:28 +05:30
Viresh Kumar
f1667d2e0c
Merge branch 'main' into dependabot/cargo/arc-swap-1.5.0 2021-11-25 16:21:25 +05:30
Viresh Kumar
bb140619e8
Merge pull request #54 from vireshk/i2c/zero-length-transfers
[i2c] Allow zero-length requests
2021-11-25 16:20:09 +05:30
Viresh Kumar
fbab2abc79 [i2c] Allow zero-length requests
Commands like SMBUS Quick don't require a buffer for the request and are
called as zero-length requests. The specification allows such requests
under the VIRTIO_I2C_F_ZERO_LENGTH_REQUEST feature, which is mandatory
to be implemented by the devices now.

Add support for zero-length requests.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-11-22 09:55:37 +05:30
dependabot[bot]
a54ea3d3ac
build(deps): bump libc from 0.2.107 to 0.2.108
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.107 to 0.2.108.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.107...0.2.108)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 04:06:35 +00:00
dependabot[bot]
fe175baef2
build(deps): bump arc-swap from 1.4.0 to 1.5.0
Bumps [arc-swap](https://github.com/vorner/arc-swap) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/vorner/arc-swap/releases)
- [Changelog](https://github.com/vorner/arc-swap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vorner/arc-swap/compare/v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: arc-swap
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 04:06:29 +00:00
Viresh Kumar
3f53229bbb
Merge pull request #62 from vireshk/i2c/add-tests
I2c/add tests
2021-11-18 05:44:20 +05:30