summaryrefslogtreecommitdiff
path: root/src/udev
Commit message (Collapse)AuthorAgeFilesLines
* udev: teach udevadm --property=NAME and --value optionsFrantisek Sumsal2021-09-291-14/+55
| | | | | which allows limiting the properties listed by the `--query=property` option (and optionally listing only the respective values).
* udev: sort the options alphabeticallyFrantisek Sumsal2021-09-291-7/+7
|
* link: connect 5 more properties to ethtool featuresAnita Zhang2021-09-241-74/+79
| | | | | | | | | Sets up the follow properties and their corresponding ethtool feature: - ReceiveVLANCTAGHardwareAcceleration == rx-vlan-hw-parse (or rxvlan) - TransmitVLANCTAGHardwareAcceleration == tx-vlan-hw-insert (or txvlan) - ReceiveVLANCTAGFilter == rx-vlan-filter - TransmitVLANSTAGHardwareAcceleration == tx-vlan-stag-hw-insert - NTupleFilter == rx-ntuple-filter (or ntuple)
* Merge pull request #20738 from mrc0mmand/ci-llvm-13Yu Watanabe2021-09-161-1/+2
|\ | | | | ci: build with clang-13
| * tree-wide: mark set-but-not-used variables as unused to make LLVM happyFrantisek Sumsal2021-09-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LLVM 13 introduced `-Wunused-but-set-variable` diagnostic flag, which trips over some intentionally set-but-not-used variables or variables attached to cleanup handlers with side effects (`_cleanup_umask_`, `_cleanup_(notify_on_cleanup)`, `_cleanup_(restore_sigsetp)`, etc.): ``` ../src/basic/process-util.c:1257:46: error: variable 'saved_ssp' set but not used [-Werror,-Wunused-but-set-variable] _cleanup_(restore_sigsetp) sigset_t *saved_ssp = NULL; ^ 1 error generated. ```
* | ethtool-util: add more network device featuresYu Watanabe2021-09-151-2/+2
|/ | | | | Then, we can easily add new settings to configure features in .link file.
* udev-watch: retry to save watch handle with random delayYu Watanabe2021-09-131-4/+41
| | | | Also, remove the watch handle if we cannot save it.
* udev-node: do not ignore unexpected errors on removing symlink in stack ↵Yu Watanabe2021-09-121-9/+14
| | | | | | directory Only acceptable error here is -ENOENT.
* udev-node: simplify the example of raceYu Watanabe2021-09-121-5/+5
|
* udev-node: drop redundant trial of devlink creationYu Watanabe2021-09-022-12/+5
| | | | | | | | | Previously, the devlink was created based on the priority saved in udev database. So, we needed to reevaluate devlinks after database is saved. But now the priority is stored in the symlink under /run/udev/links, and the loop of devlink creation is controlled with the timestamp of the directory. So, the double evaluation is not necessary anymore.
* udev-node: add random delay on conflict in updating device node symlinkYu Watanabe2021-09-021-0/+12
| | | | | To make multiple workers not update the same device node symlink simultaneously.
* udev-node: shorten code a bit and update log messageYu Watanabe2021-09-021-3/+2
|
* udev-node: check stack directory change even if devlink is removedYu Watanabe2021-09-021-9/+6
| | | | | | | Otherwise, when multiple device additions and removals occur simultaneously, symlink to unexisting devnode may be created. Hopefully fixes #19946.
* udev-node: always atomically create symlink to device nodeYu Watanabe2021-09-021-33/+9
| | | | | | | | | | | By the previous commit, it is not necessary to distinguish if the devlink already exists. Also, I cannot find any significant advantages of the previous complecated logic, that is, first try to create directly, and then fallback to atomically creation. Moreover, such logic increases the chance of conflicts between multiple udev workers. This makes devlinks always created atomically. Hopefully, this reduces the conflicts between the workers.
* udev-node: assume no new claim to a symlink if /run/udev/links is not updatedYu Watanabe2021-09-021-5/+0
| | | | | | | During creating a symlink to a device node, if another device node which requests the same symlink is added/removed, `stat_inode_unmodified()` should always detects that. We do not need to continue the loop unconditionally.
* udev-node: always update timestamp of stack directoryYu Watanabe2021-09-021-3/+87
| | | | Please see the comments in the code.
* udev-node: save information about device node and priority in symlinkYu Watanabe2021-09-021-51/+121
| | | | | | | | | | Previously, we only store device IDs in /run/udev/links, and when creating/removing device node symlink, we create sd_device object corresponds to the IDs and read device node and priority from the object. That requires parsing uevent and udev database files. This makes link_find_prioritized() get the most prioritzed device node without parsing the files.
* udev-node: stack directory must exist when adding device node symlinkYu Watanabe2021-09-021-5/+6
|
* udev-node: split out permission handling from udev_node_add()Yu Watanabe2021-09-023-119/+106
| | | | And then merge udev_node_add() and udev_node_update_old_links().
* udev: do not remove control socket on exitYu Watanabe2021-09-013-24/+2
| | | | | | | | | As we usually do, remove old unix socket before bind. Note that systemd-udevd-control.socket has `RemoveOnStop=yes`. So, it is not necessary to be removed when the service exits. Replaces #20584 and #20588.
* udev: use link information obtained through netlinkYu Watanabe2021-08-311-108/+93
|
* udev: introduce link_info_get()Yu Watanabe2021-08-314-0/+201
|
* udev: rename struct netnames -> NetNamesYu Watanabe2021-08-311-18/+18
|
* udev: use passed rtnl in net_setup_link builtin commandYu Watanabe2021-08-313-11/+12
|
* udev: pass rtnl to builtin commandsYu Watanabe2021-08-3116-18/+20
|
* udev: simplify get_virtfn_info()Yu Watanabe2021-08-311-33/+31
|
* udev: drop redundant chase_symlinks()Yu Watanabe2021-08-311-9/+7
| | | | `sd_device_new_from_syspath()` internally calls chase_symlinks().
* udev: fix potential memleakYu Watanabe2021-08-311-2/+1
|
* udev/net: initialize coalesce tristate variablesYu Watanabe2021-08-261-0/+2
| | | | | | | | | | | Otherwise, 99-default.link may introduce something like the following warnings: ---- Aug 26 03:23:59 systemd-udevd[519]: wlan0: Could not set coalesce settings, ignoring: Operation not supported Aug 26 03:24:00 systemd-udevd[547]: wlp59s0: Could not set coalesce settings, ignoring: Operation not supported ---- Follow-up for 6c35ea5ef0231d519ff24d43a57a72cebab6a121.
* Merge pull request #20494 from bluca/snprintf_voidifyYu Watanabe2021-08-211-1/+1
|\ | | | | tree-wide: voidify unchecked snprintf calls or use snprintf_ok
| * tree-wide: voidify unchecked snprintf callsLuca Boccassi2021-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Coverity, 194 ouf of 227 times we check for snprintf return code. Voidify the rest. CID#1461512 CID#1461513 CID#1461514 CID#1461515 CID#1461516 CID#1461518 CID#1461519 CID#1461520 CID#1461522
* | link: Add support for rx-gro-hw nic featureDaan De Meyer2021-08-201-0/+1
|/
* udev: Add support for configuring nic coalescing settingsDaan De Meyer2021-08-203-51/+78
| | | | These are configured via the corresponding ethtool ioctl.
* udev: make RxChannels= or friends also accept "max"Yu Watanabe2021-08-181-8/+8
| | | | | | | | | | Follow-up for 406041b7de767316674eb6a2f98ad466577ce8a4. Also, this makes - the settings accept an empty string, - if the specified value is too large, also use the advertised maximum value. - mention the range of the value in the man page.
* udevadm: introduce -a|--action option for test-builtin commandYu Watanabe2021-08-181-7/+17
| | | | | As net_setup_link builtin requires that a device action is set for the sd_device object.
* udevadm: introduce parse_device_action() helper functionYu Watanabe2021-08-174-23/+31
|
* udevadm: introduce find_device_with_action() helper functionYu Watanabe2021-08-173-13/+26
|
* udev: skip event when its dependency cannot be checkedYu Watanabe2021-08-101-4/+18
|
* udev: do not try to find blocker again when no blocker found previouslyYu Watanabe2021-08-101-10/+35
|
* list: introduce LIST_FOREACH_BACKWARDS() macro and drop ↵Yu Watanabe2021-08-101-1/+1
| | | | LIST_FOREACH_AFTER/BEFORE()
* udev: rename is_device_busy() -> event_is_blocked()Yu Watanabe2021-08-101-17/+17
| | | | Also this rename delaying_seqnum -> blocker_seqnum.
* udev: do not try to process events if there is no free workerYu Watanabe2021-08-101-1/+1
|
* udev: propagate error on spawning a workerYu Watanabe2021-08-101-8/+15
|
* udev: add usec_add() at one more placeYu Watanabe2021-08-101-1/+1
|
* udev: make event_queue_start() return negative errno on errorYu Watanabe2021-08-101-6/+6
|
* udev: make event_free() return NULLYu Watanabe2021-08-101-3/+3
|
* udev: update log message to clarify that the error is ignoredYu Watanabe2021-08-101-3/+3
|
* udev: move several functionsYu Watanabe2021-08-101-217/+215
| | | | No functional chage.
* udev: also rename struct udev_ctrl -> UdevCtrlYu Watanabe2021-08-106-58/+58
|
* udev: rename type name e.g. struct worker -> WorkerYu Watanabe2021-08-101-47/+50
|