WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: how can i use lldpctl and lldpd and lldpcli command in tincore version14  (Read 1824 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11860
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #15 on: February 17, 2025, 11:11:21 PM »
Hi yimding
Try installing  firmware-intel.tcz.

Offline yimding

  • Newbie
  • *
  • Posts: 20
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #16 on: February 18, 2025, 02:01:49 AM »
@Rich
i try to install firmware-intel.tcz in my os, and exec modprobe -r ice && modprobe ice
strill has error
Code: [Select]
ice: module unloaded
ice: Intel(R) Ethernet Connection E800 Series Linux Driver
ice: Copyright (c) 2018, Intel Corporation.
ice 0000:1f:00.0: Direct firmware load for intel/ice/ddp/ice.pkg failed with error -2
ice 0000:1f:00.0: Falling back to sysfs fallback for: intel/ice/ddp/ice.pkg
ice 0000:1f:00.0: The DDP package file was not found or could not be read. Entering Safe Mode
ice 0000:1f:00.0: not enough device MSI-X vectors. wanted = 66, available = 2
ice 0000:1f:00.0: Reducing request to 1 MSI-X vectors for LAN traffic.
ice 0000:1f:00.0: RDMA is not supported on this device
ice 0000:1f:00.1: Direct firmware load for intel/ice/ddp/ice.pkg failed with error -2
ice 0000:1f:00.1: Falling back to sysfs fallback for: intel/ice/ddp/ice.pkg
ice 0000:1f:00.1: The DDP package file was not found or could not be read. Entering Safe Mode
ice 0000:1f:00.1: not enough device MSI-X vectors. wanted = 66, available = 2
ice 0000:1f:00.1: Reducing request to 1 MSI-X vectors for LAN traffic.
ice 0000:1f:00.1: RDMA is not supported on this device
ice 0000:1f:00.0 eth2: NIC Link is up 25 Gbps Full Duplex, Requested FEC: RS-FEC, Negotiated FEC: FC-FEC/BASE-R, Autoneg Advertised: Off, Autoneg Negotiated: False, Flow Control: None

and i can norr find this path "intel/ice/ddp/ice.pkg" in my system

just can see

Code: [Select]
root@yim:/# find / -name ice
/usr/local/lib/firmware/intel/ice
/tmp/tcloop/intel-firmware/usr/local/lib/firmware/intel/ice
/lib/modules/6.1.2-tinycore64/kernel/drivers/net/ethernet/intel/ice
/sys/bus/pci/drivers/ice
/sys/module/ice

Code: [Select]
root@yim:/# cd /usr/local/lib/firmware/intel/ice/ddp
ddp-comms/          ddp-wireless_edge/  ddp/
root@yim:/# cd /usr/local/lib/firmware/intel/ice/ddp
root@yim:/usr/local/lib/firmware/intel/ice/ddp# ls
ice-1.3.30.0.pkg
root@yim:/usr/local/lib/firmware/intel/ice/ddp#

    [Edit]: Added code tags added.  Rich
« Last Edit: February 18, 2025, 09:08:53 AM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11860
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #17 on: February 18, 2025, 09:09:35 AM »
Hi yimding
Please use  Code Tags  when posting commands and responses seen in a terminal. To use  Code Tags  click on the  #  icon
above the reply box and paste your text between the  Code Tags  as shown in this example:

Quote
[code][   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517[/code]

It will appear like this in your post:
Code: [Select]
[   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517

Code Tags  serve as visual markers between what you are trying to say and the information you are posting. They also preserve
spacing so column aligned data displays properly. Code tags also automatically add horizontal and or vertical scrollbars
to accommodate long lines and listings.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11860
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #18 on: February 18, 2025, 09:09:53 AM »
Hi yimding
See if this fixes it:
Code: [Select]
sudo mkdir -p /lib/firmware/intel/ice/ddp
sudo cp /tmp/tcloop/intel-firmware/usr/local/lib/firmware/intel/ice/ddp/ice-1.3.30.0.pkg /lib/firmware/intel/ice/ddp/ice.pkg
sudo modprobe -r ice
sudo modprobe ice

Offline yimding

  • Newbie
  • *
  • Posts: 20
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #19 on: February 18, 2025, 10:01:40 AM »
@Rich
Hi Rich, thanks for your help, ice had load rightly

when i rebuild my os, i do followe below step
Code: [Select]
1. mkdir -p /lib/firmware/intel/ice/ddp/
2. mount firmware-intel.tcz, and get ice-xxxx.pkg
3. cp ice-xxxx.pkg /lib/firmware/intel/ice/ddp/ice.pkg
4. rebuild my os
5. deploy it in my server
6. dmesg
ice 0000:1f:00.0: The DDP package was successfully loaded: [b]ICE OS Default Package version 1.3.30.0[/b]
ipmi_si IPI0001:00: Using irq 10
ipmi_si IPI0001:00: IPMI message handler: Found new BMC (man_id: 0x0002a2, prod_id: 0x0100, dev_id: 0x20)
ipmi_si IPI0001:00: IPMI kcs interface initialized
ipmi_ssif: IPMI SSIF Interface driver
ice 0000:1f:00.0: PTP init successful
ice 0000:1f:00.0: 126.024 Gb/s available PCIe bandwidth (16.0 GT/s PCIe x8 link)
ice 0000:1f:00.1: DDP package already present on device: [b]ICE OS Default Package version 1.3.30.0[/b]
random: crng init done
Adding 131737436k swap on /dev/zram0.  Priority:-2 extents:1 across:131737436k SS
ice 0000:1f:00.1: PTP init successful
this means ice driver load success

but i still can not get neighbor device info when i exec lldpctl, this make me very concern
Code: [Select]
# lldpctl
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------

# tcpdump -i eth2 ether proto 0x88cc -A -s0 -t -c 1 -vvv
tcpdump: listening on eth2, link-type EN10MB (Ethernet), capture size 262144 bytes
LLDP, length 168
Chassis ID TLV (1), length 7
  Subtype MAC address (4): 92:13:04:4c:6e:9d (oui Unknown)
  0x0000:  0492 1304 4c6e 9d
Port ID TLV (2), length 7
  Subtype MAC address (3): 30:3e:a7:0f:2b:d0 (oui Unknown)
  0x0000:  0330 3ea7 0f2b d0
Time to Live TLV (3), length 2: TTL 120s
  0x0000:  0078
System Name TLV (5), length 6: yimding
  0x0000:  7061 7970 616c
System Description TLV (6), length 86
  TinyCoreLinux 14.0 Linux 6.1.2-tinycore64 #612 SMP Mon Jan  2 17:24:30 UTC 2023 x86_64
  0x0000:  5469 6e79 436f 7265 4c69 6e75 7820 3134
  0x0010:  2e30 204c 696e 7578 2036 2e31 2e32 2d74
  0x0020:  696e 7963 6f72 6536 3420 2336 3132 2053
  0x0030:  4d50 204d 6f6e 204a 616e 2020 3220 3137
  0x0040:  3a32 343a 3330 2055 5443 2032 3032 3320
  0x0050:  7838 365f 3634
System Capabilities TLV (7), length 4
  System  Capabilities [Bridge, WLAN AP, Router, Station Only] (0x009c)
  Enabled Capabilities [Station Only] (0x0080)
  0x0000:  009c 0080
Management Address TLV (8), length 12
  Management Address length 5, AFI IPv4 (1): 10.160.64.93
  Interface Index Interface Numbering (2): 6
  0x0000:  0501 0aa0 405d 0200 0000 0600
Port Description TLV (4), length 4: eth2
  0x0000:  6574 6832
Organization specific TLV (127), length 9: OUI IEEE 802.3 Private (0x00120f)
  Link aggregation Subtype (3)
    aggregation status [supported], aggregation port ID 0
  0x0000:  0012 0f03 0100 0000 00
Organization specific TLV (127), length 9: OUI IEEE 802.3 Private (0x00120f)
  MAC/PHY configuration/status Subtype (1)
    autonegotiation [none] (0x00)
    PMD autoneg capability [unknown] (0x0000)
    MAU type unknown (0x0072)
  0x0000:  0012 0f01 0000 0000 72
End TLV (0), length 0
......Ln....0>..+....x
.yimdingl.VTinyCoreLinux 14.0 Linux 6.1.2-tinycore64 #612 SMP Mon Jan  2 17:24:30 UTC 2023 x86_64..........
.@]........eth2. .......... ........r..
1 packet captured
1 packet received by filter
0 packets dropped by kernel
281 packets dropped by interface

could you give some advice
« Last Edit: February 18, 2025, 10:06:17 AM by yimding »

Offline yimding

  • Newbie
  • *
  • Posts: 20
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #20 on: February 18, 2025, 10:19:28 AM »
@Rich
when i test in ubuntu20.04 in my dell660 server
i move ice.pkg to other dir, and reload ice driver, i can not get neighbor info by lldpctl
then i move ice.pkg to right dir, and reload ice driver, i can get neighbor info by lldpctl

This means that whether the DDP package is loaded normally does have an impact on LLDP. However, I've resolved the issue of abnormal loading of the DDP package in TinyCore, but I still can't obtain the information of neighbor devices.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11860
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #21 on: February 18, 2025, 10:27:21 AM »
Hi yimding
From what I've read, lldpctl is obsolete and kept for backward compatibility.
lldpcli is the preferred command:
Code: [Select]
lldpcli show neighbors
I also saw something about NAT causing neighbors not to show up, and
that bridging needed to be used. You might have to google that one, I'm
not familiar with that technique.

Offline yimding

  • Newbie
  • *
  • Posts: 20
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #22 on: February 18, 2025, 12:23:03 PM »
@Rich
I sincerely appreciate your detailed and useful reply.

Offline yimding

  • Newbie
  • *
  • Posts: 20
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #23 on: February 19, 2025, 12:01:34 PM »
Hi Rich
i want compile the latest ice driver, and i want to know how to compile in tinycore 14, could you give some document about  this

now i have install compiletc gcc and make

i copy ice source code in os,and cd to src, then i exec make
Code: [Select]
cd src/
tc@box:~/ice-1.16.3/src$ make
make: /bin/bash: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
common.mk:71: *** Kernel header files not in any of the expected locations.
common.mk:72: *** Install the appropriate kernel development package, e.g.
common.mk:73: *** kernel-devel, for building kernel modules and try again.  Stop

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14958
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #24 on: February 19, 2025, 12:08:05 PM »
You need to load the compiletc extension.

It also looks like the bash extension is needed.

You can search the forum on how to prepare the tinycore kernel source.

See also the extension making section of the wiki.
« Last Edit: February 19, 2025, 12:10:50 PM by Juanito »

Offline yimding

  • Newbie
  • *
  • Posts: 20
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #25 on: February 19, 2025, 12:21:25 PM »
i installed bash.tcz
then make
Code: [Select]
tc@box:~/ice-1.16.3/src$ make install
common.mk:71: *** Kernel header files not in any of the expected locations.
common.mk:72: *** Install the appropriate kernel development package, e.g.
common.mk:73: *** kernel-devel, for building kernel modules and try again.  Stop.
tc@box:~/ice-1.16.3/src$ tce-load -wi linux-headers-$(uname -r).tcz
Downloading: linux-headers-6.1.2-tinycore64.tcz
Connecting to repo.tinycorelinux.net (128.127.66.77:80)
wget: server returned error: HTTP/1.1 404 Not Found
md5sum: linux-headers-6.1.2-tinycore64.tcz.md5.txt: No such file or directory
Error on linux-headers-6.1.2-tinycore64.tcz
tc@box:~/ice-1.16.3/src$

how can i get linux-header?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14958
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #26 on: February 19, 2025, 12:23:40 PM »
As said, load the compiletc extension.

After that prepare the kernel source.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14958
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #27 on: February 19, 2025, 12:35:12 PM »
Something like this should prepare the kernel source:
Code: [Select]
tce-load -i compiletc perl5 ncursesw-dev bc glibc_apps elfutils-dev

wget http://tinycorelinux.net/14.x/x86_64/release/src/kernel/linux-6.1.2-patched.txz
wget http://tinycorelinux.net/14.x/x86_64/release/src/kernel/Module.symvers-6.1.2-tinycore64.gz
wget http://tinycorelinux.net/14.x/x86_64/release/src/kernel/config-6.1.2-tinycore64

gunzip Module.symvers-6.1.2-tinycore64.gz
tar xf linux-6.1.2-patched.txz
cd linux-6.1.2

make mrproper
cp ../config-6.1.2-tinycore64 .config
make oldconfig
make prepare
make modules_prepare

mv ../Module.symvers-6.1.2-tinycore64 Module.symvers
make SUBDIRS=scripts/mod
« Last Edit: February 20, 2025, 04:52:36 AM by Juanito »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14958
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #28 on: February 20, 2025, 08:19:48 AM »
Once you have the tinycore kernel source prepared, you will need to make a symlink to the source.

If, for example the prepared source is at /usr/src/linux-6.1.2, then you need:
Code: [Select]
sudo ln -s /usr/src/linux-6.1.2 /lib/modules/6.1.2-tinycore64/build
After loading the coreutils extension you can compile ice-1.16.3:
Code: [Select]
cd ice-1.16.3/src
make

However, when I try with tc-16.x, the build fails with:
Code: [Select]
/usr/src/ethernet-linux-ice/src/kcompat_gnss.c:224:27: error: 'no_llseek' undeclared here (not in a function); did you mean 'noop_llseek'?
  224 |         .llseek         = no_llseek,
      |                           ^~~~~~~~~
« Last Edit: February 20, 2025, 09:02:30 AM by Juanito »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11860
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #29 on: February 20, 2025, 09:04:43 AM »
Hi Juanito
A search of the kernel source for no_llseek turned up this:
Code: [Select]
tc@box:~$ grep -Ris "no_llseek" Downloads/linux-6.12.11/*
Downloads/linux-6.12.11/Documentation/filesystems/porting.rst:no_llseek is gone; don't set .llseek to that - just leave it NULL instead.
Downloads/linux-6.12.11/scripts/coccinelle/api/stream_open.cocci:@ has_no_llseek @
Downloads/linux-6.12.11/scripts/coccinelle/api/stream_open.cocci:@ maybe_stream depends on (!has_llseek || has_no_llseek || has_noop_llseek) && !has_mmap && !has_copy_file_range && !has_remap_file_range && !has_read_iter && !has_write_iter && !has_splice_read && !has_splice_write @
So the documentation suggests it's gone.

A search of the kernel source for noop_llseek turned up this:
Code: [Select]
Downloads/linux-6.12.11/fs/read_write.c: * able to perform the seek. In this case you use noop_llseek() instead of
Downloads/linux-6.12.11/fs/read_write.c:loff_t noop_llseek(struct file *file, loff_t offset, int whence)
Downloads/linux-6.12.11/fs/read_write.c:EXPORT_SYMBOL(noop_llseek);
Downloads/linux-6.12.11/fs/cachefiles/daemon.c: .llseek         = noop_llseek,
Downloads/linux-6.12.11/fs/dlm/plock.c: .llseek  = noop_llseek,
Downloads/linux-6.12.11/fs/dlm/user.c:  .llseek  = noop_llseek,
Downloads/linux-6.12.11/fs/dlm/user.c:  .llseek  = noop_llseek,
Downloads/linux-6.12.11/fs/dlm/user.c:  .llseek  = noop_llseek,
Downloads/linux-6.12.11/fs/coda/psdev.c:        .llseek         = noop_llseek,
Downloads/linux-6.12.11/fs/coda/pioctl.c:       .llseek         = noop_llseek,
Downloads/linux-6.12.11/fs/fuse/cuse.c: .llseek         = noop_llseek,
Downloads/linux-6.12.11/fs/eventpoll.c: .llseek         = noop_llseek,
Downloads/linux-6.12.11/fs/btrfs/super.c:       .llseek = noop_llseek,
Downloads/linux-6.12.11/fs/ecryptfs/miscdev.c:  .llseek  = noop_llseek,
Downloads/linux-6.12.11/fs/char_dev.c:  .llseek = noop_llseek,
Downloads/linux-6.12.11/include/drm/drm_accel.h:        .llseek         = noop_llseek, \
Downloads/linux-6.12.11/include/drm/drm_gem_dma_helper.h:               .llseek         = noop_llseek,\
Downloads/linux-6.12.11/include/drm/drm_gem.h:  .llseek         = noop_llseek,\
Downloads/linux-6.12.11/include/linux/fs.h:extern loff_t noop_llseek(struct file *file, loff_t offset, int whence);
Downloads/linux-6.12.11/ipc/shm.c:      .llseek         = noop_llseek,
Downloads/linux-6.12.11/ipc/shm.c:      .llseek         = noop_llseek,
Downloads/linux-6.12.11/kernel/trace/blktrace.c:        .llseek =       noop_llseek,
Downloads/linux-6.12.11/kernel/power/qos.c:     .llseek = noop_llseek,
Downloads/linux-6.12.11/kernel/gcov/fs.c:       .llseek = noop_llseek,
Downloads/linux-6.12.11/net/atm/proc.c: .proc_lseek     = noop_llseek,
Downloads/linux-6.12.11/net/mac80211/debugfs.c: .llseek = noop_llseek,
Downloads/linux-6.12.11/samples/kfifo/inttype-example.c:        .proc_lseek     = noop_llseek,
Downloads/linux-6.12.11/samples/kfifo/record-example.c: .proc_lseek     = noop_llseek,
Downloads/linux-6.12.11/samples/kfifo/bytestream-example.c:     .proc_lseek     = noop_llseek,
Downloads/linux-6.12.11/scripts/coccinelle/api/stream_open.cocci:@ has_noop_llseek @
Downloads/linux-6.12.11/scripts/coccinelle/api/stream_open.cocci:    .llseek = noop_llseek,
Downloads/linux-6.12.11/scripts/coccinelle/api/stream_open.cocci:@ maybe_stream depends on (!has_llseek || has_no_llseek || has_noop_llseek) && !has_mmap && !has_copy_file_range && !has_remap_file_range && !has_read_iter && !has_write_iter && !has_splice_read && !has_splice_write @
Downloads/linux-6.12.11/security/tomoyo/securityfs_if.c:        .llseek  = noop_llseek,
Downloads/linux-6.12.11/sound/sound_core.c:     .llseek = noop_llseek,
Downloads/linux-6.12.11/sound/core/sound.c:     .llseek =       noop_llseek,
Downloads/linux-6.12.11/sound/core/timer.c:     .llseek = noop_llseek,
Downloads/linux-6.12.11/sound/core/seq/oss/seq_oss.c:   .llseek =       noop_llseek,
Downloads/linux-6.12.11/virt/kvm/kvm_main.c:    .llseek         = noop_llseek,
Downloads/linux-6.12.11/virt/kvm/kvm_main.c:    .llseek = noop_llseek,
Downloads/linux-6.12.11/virt/kvm/kvm_main.c:    .llseek = noop_llseek,
Downloads/linux-6.12.11/virt/kvm/kvm_main.c:    .llseek         = noop_llseek,
Downloads/linux-6.12.11/virt/kvm/kvm_main.c:    .llseek         = noop_llseek,
You can see noop_llseek is defined in /fs/read_write.c and used all over the place.
The list shown is not complete. I only posted about 1/4 of it.

So it looks like  no_llseek  should be changed to  noop_llseek.