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

Long network device names #346

Closed
nwaples opened this issue Nov 1, 2023 · 4 comments
Closed

Long network device names #346

nwaples opened this issue Nov 1, 2023 · 4 comments

Comments

@nwaples
Copy link
Contributor

nwaples commented Nov 1, 2023

We have network interfaces that are reaching the maximum device name length.

(pktdev_allocate : 84) ERR: Ethernet device name is too long
(init_lport : 209) ERR: pktdev_allocate(enp24s0f0np0:10, enp24s0f0np0) failed
(pmd_af_xdp_probe : 248) ERR: Failed to init lport
(pktdev_port_setup : 50) ERR: driver probe(enp24s0f0np0:net_af_xdp) failed
2023/11/01 02:32:01 cndp init failed: pktdev_port_setup() failed for lport enp24s0f0np0:10

and

cndp init failed: pktdev_port_setup() failed for lport enp152s0f0np0:0

Is it possible to increase the PKTDEV_NAME_MAX_LEN value from 16?

@KeithWiles
Copy link
Contributor

KeithWiles commented Nov 1, 2023

I do not see why increasing it to 24 or 32 would be a problem. Will look into it, but it may increase the size of some structures to cover another cacheline as I was thinking 32 would be good.

@KeithWiles
Copy link
Contributor

I did not spot any problems increasing the size, but please verify it thanks.

Original size:

CNDP-cli:/> info size

sizeof(struct pktmbuf_s)         :   64
            CNE_PKTMBUF_HEADROOM :  192
  		Default size 2048 dataroom size 1,792
sizeof(struct cnet_metadata)     :   64
               unused space in metadata structure 24
sizeof(struct in_caddr)          :   20
sizeof(struct cnet)              :  192
sizeof(struct pcb_entry)         :  128
sizeof(struct pcb_key)           :   40
sizeof(struct msghdr)            :   56
sizeof(struct sockaddr)          :   16
sizeof(struct sockaddr_storage)  :  128
sizeof(struct stk_s)             :  352 *     2(netifs) = 704
sizeof(struct netif)             :  640 *     8(netifs) = 5120
sizeof(struct drv_entry)         :  128 *     4(netifs) = 512
sizeof(struct rt4_entry)         :   64 *  1024(netifs) = 65536
sizeof(struct rt6_entry)         :  128 *     0(netifs) = 0
sizeof(struct arp_entry)         :   16 *  1024(netifs) = 16384
sizeof(struct nd6_cache_entry)   :   64 *     0(netifs) = 0
sizeof(struct ipv4_entry)        :  192
sizeof(struct ipv6_entry)        :  192

  Total memory used 88832 bytes

sizeof(struct protosw_entry)     :   40
sizeof(struct seg_entry)         :  120
                 sizeof(__m128i) :   16
                 sizeof(__m256i) :   32
sizeof(struct vec_hdr)           :   16

New sizes:

CNDP-cli:/> info size

sizeof(struct pktmbuf_s)         :   64
            CNE_PKTMBUF_HEADROOM :  192
  		Default size 2048 dataroom size 1,792
sizeof(struct cnet_metadata)     :   64
               unused space in metadata structure 24
sizeof(struct in_caddr)          :   20
sizeof(struct cnet)              :  192
sizeof(struct pcb_entry)         :  128
sizeof(struct pcb_key)           :   40
sizeof(struct msghdr)            :   56
sizeof(struct sockaddr)          :   16
sizeof(struct sockaddr_storage)  :  128
sizeof(struct stk_s)             :  352 *     2(netifs) = 704
sizeof(struct netif)             :  640 *     8(netifs) = 5120
sizeof(struct drv_entry)         :  128 *     4(netifs) = 512
sizeof(struct rt4_entry)         :   64 *  1024(netifs) = 65536
sizeof(struct rt6_entry)         :  128 *     0(netifs) = 0
sizeof(struct arp_entry)         :   16 *  1024(netifs) = 16384
sizeof(struct nd6_cache_entry)   :   64 *     0(netifs) = 0
sizeof(struct ipv4_entry)        :  192
sizeof(struct ipv6_entry)        :  192

  Total memory used 88832 bytes

sizeof(struct protosw_entry)     :   40
sizeof(struct seg_entry)         :  120
                 sizeof(__m128i) :   16
                 sizeof(__m256i) :   32
sizeof(struct vec_hdr)           :   16

@KeithWiles
Copy link
Contributor

Please checkout the latest PR and let me know if it fixes the problem.

@nwaples
Copy link
Contributor Author

nwaples commented Nov 1, 2023

Yep it fixes the problem.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants