Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jul 2025 12:14:05 -1000
From:      Warner Losh <imp@bsdimp.com>
To:        Kevin Bowling <kevin.bowling@kev009.com>
Cc:        Kristof Provost <kp@freebsd.org>, Krzysztof Galazka <kgalazka@freebsd.org>, Warner Losh <imp@freebsd.org>,  Eric Joyner <eric.joyner@intel.com>, src-committers <src-committers@freebsd.org>,  "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>,  "<dev-commits-src-main@freebsd.org>" <dev-commits-src-main@freebsd.org>
Subject:   Re: git: 430f1acc451c - main - ice(4): Add MAC filter and VLAN resource limits to VFs
Message-ID:  <CANCZdfqrzboT_jGqe47jYO1%2BpymFfO4Dnf62fZ2av3m7GAQSNw@mail.gmail.com>
In-Reply-To: <CAK7dMtC9BD9txMJGGomg7oobtDce2QLaRt5duG5QU16u2_7kEQ@mail.gmail.com>
References:  <202507181916.56IJGLMK001122@gitrepo.freebsd.org> <A6ABB965-BD49-492D-B3AA-0EA973C344D6@FreeBSD.org> <CANCZdfqMQ5pktZp_o8sAUEcLH=8WKaqmofmYx6EZpMNJcc=2Rg@mail.gmail.com> <F0A45EE7-B379-4CED-A8E9-089ECC14A302@FreeBSD.org> <CAK7dMtC9BD9txMJGGomg7oobtDce2QLaRt5duG5QU16u2_7kEQ@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Mon, Jul 28, 2025, 9:42 AM Kevin Bowling <kevin.bowling@kev009.com>
wrote:

> One gentle reminder in all this, kgalazka@ is under mentorship and
> should be included in especially ixl and ice work and follow ups so we
> can release him to make all these mistakes and fixes :)
>

This was my mistake for pushing the pull request without enough interaction
or testing.

Warner


Regards,
> Kevin
>
>
> On Mon, Jul 28, 2025 at 12:01 PM Kristof Provost <kp@freebsd.org> wrote:
> >
> > That’s confirmed, that has indeed fixed the arm64 LINT build errors.
> > Thanks des.
> >
> > We’re still failing riscv and i386, but those are different errors.
> >
> > The riscv one is new (or I haven’t seen it before, anyway):
> >
> > --- all_subdir_usr.bin ---
> > ld: error: undefined symbol: llvm::DisableABIBreakingChecks
> > >>> referenced by ClangScanDeps.cpp
> > >>>
>  ClangScanDeps.pieo:(llvm::VerifyDisableABIBreakingChecks)
> > c++: error: linker command failed with exit code 1 (use -v to see
> invocation)
> >
> > i386 has been failing for a while:
> >
> > --- all_subdir_sbin/recoverdisk ---
> > /usr/src/sbin/recoverdisk/recoverdisk.c:830:38: error: comparison of
> integers of different signs: 'unsigned int' and 'time_t' (aka 'int')
> [-Werror,-Wsign-compare]
> > --- all_subdir_usr.bin ---
> > --- uuencode.o ---
> > cc -target i386-unknown-freebsd15.0
> --sysroot=/usr/obj/usr/src/i386.i386/tmp
> -B/usr/obj/usr/src/i386.i386/tmp/usr/bin  -O2 -pipe -fno-common   -g
> -gz=zlib -MD  -MF.depend.uuencode.o -MTuu
> > encode.o -std=gnu17 -Wno-format-zero-length -fstack-protector-strong
> -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter
> -Wstrict-prototypes -Wmissing-prototypes -Wpoi
> > nter-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow
> -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs
> -Wold-style-definition -Wno-pointer-sign -Wdate-t
> > ime -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body
> -Wno-string-plus-int -Wno-unused-const-variable
> -Wno-error=unused-but-set-parameter -Wno-error=cast-function-type-misma
> > tch  -Qunused-arguments     -c /usr/src/usr.bin/bintrans/uuencode.c -o
> uuencode.o
> > --- all_subdir_sbin ---
> >   830 |                 if (unsaved && (t_save + snapshot) < t_now) {
> >       |                                 ~~~~~~~~~~~~~~~~~  ^ ~~~~~
> > 1 error generated.
> > *** [recoverdisk.o] Error code 1
> >
> > —
> > Kristof
> >
> > On 28 Jul 2025, at 19:45, Warner Losh wrote:
> >
> > I think DES may have just fixed this. Can you confirm?
> >
> > Warner
> >
> > On Mon, Jul 28, 2025 at 3:23 AM Kristof Provost kp@freebsd.org wrote:
> >
> > I’m not sure if it’s this specific commit or another one in the recent
> dev/ice updates, but the arm64 LINT-FDT, LINT-ACPI and LINT builds all fail.
> >
> > This is from arm64-LINT:
> >
> >     ld: error: undefined symbol: ice_iov_attach
> >     >>> referenced by if_ice_iflib.c:859
> (/usr/src/sys/dev/ice/if_ice_iflib.c:859)
> >     >>>               if_ice_iflib.o:(ice_if_attach_post)
> >
> >     ld: error: undefined symbol: ice_iov_detach
> >     >>> referenced by if_ice_iflib.c:989
> (/usr/src/sys/dev/ice/if_ice_iflib.c:989)
> >     >>>               if_ice_iflib.o:(ice_if_detach)
> >     >>> referenced by if_ice_iflib.c:2323
> (/usr/src/sys/dev/ice/if_ice_iflib.c:2323)
> >     >>>               if_ice_iflib.o:(ice_if_update_admin_status)
> >     >>> referenced by if_ice_iflib.c:2376
> (/usr/src/sys/dev/ice/if_ice_iflib.c:2376)
> >     >>>               if_ice_iflib.o:(ice_transition_safe_mode)
> >
> >     ld: error: undefined symbol: ice_iov_add_vf
> >     >>> referenced by if_ice_iflib.c:3464
> (/usr/src/sys/dev/ice/if_ice_iflib.c:3464)
> >     >>>               if_ice_iflib.o:(ice_if_iov_vf_add)
> >
> >     ld: error: undefined symbol: ice_iov_init
> >     >>> referenced by if_ice_iflib.c:3429
> (/usr/src/sys/dev/ice/if_ice_iflib.c:3429)
> >     >>>               if_ice_iflib.o:(ice_if_iov_init)
> >
> >     ld: error: undefined symbol: ice_iov_uninit
> >     >>> referenced by if_ice_iflib.c:3445
> (/usr/src/sys/dev/ice/if_ice_iflib.c:3445)
> >     >>>               if_ice_iflib.o:(ice_if_iov_uninit)
> >
> >     ld: error: undefined symbol: ice_iov_handle_vflr
> >     >>> referenced by if_ice_iflib.c:3480
> (/usr/src/sys/dev/ice/if_ice_iflib.c:3480)
> >     >>>               if_ice_iflib.o:(ice_if_vflr_handle)
> >
> >     ld: error: undefined symbol: ice_vc_notify_all_vfs_link_state
> >     >>> referenced by if_ice_iflib.c:757
> (/usr/src/sys/dev/ice/if_ice_iflib.c:757)
> >     >>>               if_ice_iflib.o:(ice_update_link_status)
> >
> >     ld: error: undefined symbol: ice_vc_handle_vf_msg
> >     >>> referenced by ice_lib.c:2285
> (/usr/src/sys/dev/ice/ice_lib.c:2285)
> >     >>>               ice_lib.o:(ice_process_ctrlq)
> >     *** [kernel.full] Error code 1
> >
> > —
> > Kristof
> >
> > On 18 Jul 2025, at 21:16, Warner Losh wrote:
> >
> > The branch main has been updated by imp:
> >
> > URL:
> https://cgit.FreeBSD.org/src/commit/?id=430f1acc451c7084d1d5aa7df7e7ecccea1a8b51
> >
> > commit 430f1acc451c7084d1d5aa7df7e7ecccea1a8b51
> > Author: Eric Joyner eric.joyner@intel.com
> > AuthorDate: 2024-10-17 22:19:09 +0000
> > Commit: Warner Losh imp@FreeBSD.org
> > CommitDate: 2025-07-18 19:16:17 +0000
> >
> > ice(4): Add MAC filter and VLAN resource limits to VFs
> >
> > Adds two new parameters to iovctl config for VLAN filter limits and MAC
> > filter limits and gives them defaults of 64 and 16, respectively.
> >
> > These are intended to limit the number of resources that a VF can
> > consume so that any one VF cannot starve an other VFs or the PF of
> > filters.
> >
> > Signed-off-by: Eric Joyner <eric.joyner@intel.com>
> > Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
> > Reviewed by: imp
> > Pull Request: https://github.com/freebsd/freebsd-src/pull/1573
> >
> > ________________________________
> >
> > sys/dev/ice/ice_iov.c | 45 ++++++++++++++++++++++++++++++++++++++++++---
> > sys/dev/ice/ice_iov.h | 8 ++++++++
> > 2 files changed, 50 insertions(+), 3 deletions(-)
> >
> > diff --git a/sys/dev/ice/ice_iov.c b/sys/dev/ice/ice_iov.c
> > index fc37a0e7679c..e06c7eb56f7a 100644
> > --- a/sys/dev/ice/ice_iov.c
> > +++ b/sys/dev/ice/ice_iov.c
> > @@ -117,6 +117,10 @@ ice_iov_attach(struct ice_softc *sc)
> > IOV_SCHEMA_HASDEFAULT, ICE_DEFAULT_VF_QUEUES);
> > pci_iov_schema_add_uint16(vf_schema, "mirror-src-vsi",
> > IOV_SCHEMA_HASDEFAULT, ICE_INVALID_MIRROR_VSI);
> >
> > pci_iov_schema_add_uint16(vf_schema, "max-vlan-allowed",
> >
> >     IOV_SCHEMA_HASDEFAULT, ICE_DEFAULT_VF_VLAN_LIMIT);
> >
> > pci_iov_schema_add_uint16(vf_schema, "max-mac-filters",
> >
> >     IOV_SCHEMA_HASDEFAULT, ICE_DEFAULT_VF_FILTER_LIMIT);
> >
> > error = pci_iov_attach(dev, pf_schema, vf_schema);
> > if (error != 0) {
> >
> > @@ -360,6 +364,9 @@ ice_iov_add_vf(struct ice_softc *sc, uint16_t vfnum,
> const nvlist_t *params)
> >
> >   vsi->mirror_src_vsi = nvlist_get_number(params, "mirror-src-vsi");
> >
> > vf->vlan_limit = nvlist_get_number(params, "max-vlan-allowed");
> >
> > vf->mac_filter_limit = nvlist_get_number(params, "max-mac-filters");
> >
> > vf->vf_flags |= VF_FLAG_VLAN_CAP;
> >
> > /* Create and setup VSI in HW */
> >
> > @@ -735,10 +742,17 @@ ice_vc_add_eth_addr_msg(struct ice_softc *sc,
> struct ice_vf *vf, u8 *msg_buf)
> > enum virtchnl_status_code v_status = VIRTCHNL_STATUS_SUCCESS;
> > struct virtchnl_ether_addr_list *addr_list;
> > struct ice_hw *hw = &sc->hw;
> >
> > u16 added_addr_cnt = 0;
> > int error = 0;
> >
> > addr_list = (struct virtchnl_ether_addr_list *)msg_buf;
> >
> > if (addr_list->num_elements >
> >
> >     (vf->mac_filter_limit - vf->mac_filter_cnt)) {
> >
> >         v_status = VIRTCHNL_STATUS_ERR_NO_MEMORY;
> >
> >         goto done;
> >
> > }
> >
> > for (int i = 0; i < addr_list->num_elements; i++) {
> >         u8 *addr = addr_list->list[i].addr;
> >
> > @@ -767,10 +781,15 @@ ice_vc_add_eth_addr_msg(struct ice_softc *sc,
> struct ice_vf *vf, u8 *msg_buf)
> > "%s: VF-%d: Error adding MAC addr for VSI %d\n",
> > func, vf->vf_num, vf->vsi->idx);
> > v_status = VIRTCHNL_STATUS_ERR_PARAM;
> >
> >                 goto done;
> >
> >                 continue;
> >         }
> >
> >         /* Don't count VF's MAC against its MAC filter limit */
> >
> >         if (memcmp(addr, vf->mac, ETHER_ADDR_LEN))
> >
> >                 added_addr_cnt++;
> > }
> >
> > vf->mac_filter_cnt += added_addr_cnt;
> >
> > done:
> > ice_aq_send_msg_to_vf(hw, vf->vf_num, VIRTCHNL_OP_ADD_ETH_ADDR,
> > v_status, NULL, 0, NULL);
> > @@ -791,6 +810,7 @@ ice_vc_del_eth_addr_msg(struct ice_softc *sc, struct
> ice_vf *vf, u8 *msg_buf)
> > enum virtchnl_status_code v_status = VIRTCHNL_STATUS_SUCCESS;
> > struct virtchnl_ether_addr_list *addr_list;
> > struct ice_hw *hw = &sc->hw;
> >
> > u16 deleted_addr_cnt = 0;
> > int error = 0;
> >
> > addr_list = (struct virtchnl_ether_addr_list *)msg_buf;
> >
> > @@ -802,11 +822,18 @@ ice_vc_del_eth_addr_msg(struct ice_softc *sc,
> struct ice_vf *vf, u8 *msg_buf)
> > "%s: VF-%d: Error removing MAC addr for VSI %d\n",
> > func, vf->vf_num, vf->vsi->idx);
> > v_status = VIRTCHNL_STATUS_ERR_PARAM;
> >
> >                 goto done;
> >
> >                 continue;
> >         }
> >
> >         /* Don't count VF's MAC against its MAC filter limit */
> >
> >         if (memcmp(addr_list->list[i].addr, vf->mac, ETHER_ADDR_LEN))
> >
> >                 deleted_addr_cnt++;
> > }
> >
> > -done:
> >
> > if (deleted_addr_cnt >= vf->mac_filter_cnt)
> >
> >         vf->mac_filter_cnt = 0;
> >
> > else
> >
> >         vf->mac_filter_cnt -= deleted_addr_cnt;
> >
> > ice_aq_send_msg_to_vf(hw, vf->vf_num, VIRTCHNL_OP_DEL_ETH_ADDR,
> >     v_status, NULL, 0, NULL);
> >
> > }
> > @@ -838,6 +865,11 @@ ice_vc_add_vlan_msg(struct ice_softc *sc, struct
> ice_vf *vf, u8 *msg_buf)
> > goto done;
> > }
> >
> > if (vlan_list->num_elements > (vf->vlan_limit - vf->vlan_cnt)) {
> >
> >         v_status = VIRTCHNL_STATUS_ERR_NO_MEMORY;
> >
> >         goto done;
> >
> > }
> >
> > status = ice_add_vlan_hw_filters(vsi, vlan_list->vlan_id,
> >                                 vlan_list->num_elements);
> > if (status) {
> >
> > @@ -849,6 +881,8 @@ ice_vc_add_vlan_msg(struct ice_softc *sc, struct
> ice_vf *vf, u8 *msg_buf)
> > goto done;
> > }
> >
> > vf->vlan_cnt += vlan_list->num_elements;
> >
> > done:
> > ice_aq_send_msg_to_vf(hw, vf->vf_num, VIRTCHNL_OP_ADD_VLAN,
> > v_status, NULL, 0, NULL);
> > @@ -892,6 +926,11 @@ ice_vc_del_vlan_msg(struct ice_softc *sc, struct
> ice_vf *vf, u8 *msg_buf)
> > goto done;
> > }
> >
> > if (vlan_list->num_elements >= vf->vlan_cnt)
> >
> >         vf->vlan_cnt = 0;
> >
> > else
> >
> >         vf->vlan_cnt -= vlan_list->num_elements;
> >
> > done:
> > ice_aq_send_msg_to_vf(hw, vf->vf_num, VIRTCHNL_OP_DEL_VLAN,
> > v_status, NULL, 0, NULL);
> > diff --git a/sys/dev/ice/ice_iov.h b/sys/dev/ice/ice_iov.h
> > index c2ac5fcd5c94..c4fb3e932e3f 100644
> > --- a/sys/dev/ice/ice_iov.h
> > +++ b/sys/dev/ice/ice_iov.h
> > @@ -85,6 +85,11 @@ struct ice_vf {
> > u16 vf_num;
> > struct virtchnl_version_info version;
> >
> > u16 mac_filter_limit;
> >
> > u16 mac_filter_cnt;
> >
> > u16 vlan_limit;
> >
> > u16 vlan_cnt;
> >
> > u16 num_irq_vectors;
> > u16 *vf_imap;
> > struct ice_irq_vector *tx_irqvs;
> >
> > @@ -101,6 +106,9 @@ struct ice_vf {
> > #define ICE_VIRTCHNL_VALID_PROMISC_FLAGS (FLAG_VF_UNICAST_PROMISC |
> > FLAG_VF_MULTICAST_PROMISC)
> >
> > +#define ICE_DEFAULT_VF_VLAN_LIMIT 64
> > +#define ICE_DEFAULT_VF_FILTER_LIMIT 16
> > +
> > int ice_iov_attach(struct ice_softc *sc);
> > int ice_iov_detach(struct ice_softc *sc);
>

[-- Attachment #2 --]
<div dir="auto"><div><br><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Jul 28, 2025, 9:42 AM Kevin Bowling &lt;<a href="mailto:kevin.bowling@kev009.com">kevin.bowling@kev009.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">One gentle reminder in all this, kgalazka@ is under mentorship and<br>
should be included in especially ixl and ice work and follow ups so we<br>
can release him to make all these mistakes and fixes :)<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">This was my mistake for pushing the pull request without enough interaction or testing.</div><div dir="auto"><br></div><div dir="auto">Warner</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Regards,<br>
Kevin<br>
<br>
<br>
On Mon, Jul 28, 2025 at 12:01 PM Kristof Provost &lt;<a href="mailto:kp@freebsd.org" target="_blank" rel="noreferrer">kp@freebsd.org</a>&gt; wrote:<br>
&gt;<br>
&gt; That’s confirmed, that has indeed fixed the arm64 LINT build errors.<br>
&gt; Thanks des.<br>
&gt;<br>
&gt; We’re still failing riscv and i386, but those are different errors.<br>
&gt;<br>
&gt; The riscv one is new (or I haven’t seen it before, anyway):<br>
&gt;<br>
&gt; --- all_subdir_usr.bin ---<br>
&gt; ld: error: undefined symbol: llvm::DisableABIBreakingChecks<br>
&gt; &gt;&gt;&gt; referenced by ClangScanDeps.cpp<br>
&gt; &gt;&gt;&gt;               ClangScanDeps.pieo:(llvm::VerifyDisableABIBreakingChecks)<br>
&gt; c++: error: linker command failed with exit code 1 (use -v to see invocation)<br>
&gt;<br>
&gt; i386 has been failing for a while:<br>
&gt;<br>
&gt; --- all_subdir_sbin/recoverdisk ---<br>
&gt; /usr/src/sbin/recoverdisk/recoverdisk.c:830:38: error: comparison of integers of different signs: &#39;unsigned int&#39; and &#39;time_t&#39; (aka &#39;int&#39;) [-Werror,-Wsign-compare]<br>
&gt; --- all_subdir_usr.bin ---<br>
&gt; --- uuencode.o ---<br>
&gt; cc -target i386-unknown-freebsd15.0 --sysroot=/usr/obj/usr/src/i386.i386/tmp -B/usr/obj/usr/src/i386.i386/tmp/usr/bin  -O2 -pipe -fno-common   -g -gz=zlib -MD  -MF.depend.uuencode.o -MTuu<br>
&gt; encode.o -std=gnu17 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpoi<br>
&gt; nter-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wold-style-definition -Wno-pointer-sign -Wdate-t<br>
&gt; ime -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-parameter -Wno-error=cast-function-type-misma<br>
&gt; tch  -Qunused-arguments     -c /usr/src/usr.bin/bintrans/uuencode.c -o uuencode.o<br>
&gt; --- all_subdir_sbin ---<br>
&gt;   830 |                 if (unsaved &amp;&amp; (t_save + snapshot) &lt; t_now) {<br>
&gt;       |                                 ~~~~~~~~~~~~~~~~~  ^ ~~~~~<br>
&gt; 1 error generated.<br>
&gt; *** [recoverdisk.o] Error code 1<br>
&gt;<br>
&gt; —<br>
&gt; Kristof<br>
&gt;<br>
&gt; On 28 Jul 2025, at 19:45, Warner Losh wrote:<br>
&gt;<br>
&gt; I think DES may have just fixed this. Can you confirm?<br>
&gt;<br>
&gt; Warner<br>
&gt;<br>
&gt; On Mon, Jul 28, 2025 at 3:23 AM Kristof Provost <a href="mailto:kp@freebsd.org" target="_blank" rel="noreferrer">kp@freebsd.org</a> wrote:<br>
&gt;<br>
&gt; I’m not sure if it’s this specific commit or another one in the recent dev/ice updates, but the arm64 LINT-FDT, LINT-ACPI and LINT builds all fail.<br>
&gt;<br>
&gt; This is from arm64-LINT:<br>
&gt;<br>
&gt;     ld: error: undefined symbol: ice_iov_attach<br>
&gt;     &gt;&gt;&gt; referenced by if_ice_iflib.c:859 (/usr/src/sys/dev/ice/if_ice_iflib.c:859)<br>
&gt;     &gt;&gt;&gt;               if_ice_iflib.o:(ice_if_attach_post)<br>
&gt;<br>
&gt;     ld: error: undefined symbol: ice_iov_detach<br>
&gt;     &gt;&gt;&gt; referenced by if_ice_iflib.c:989 (/usr/src/sys/dev/ice/if_ice_iflib.c:989)<br>
&gt;     &gt;&gt;&gt;               if_ice_iflib.o:(ice_if_detach)<br>
&gt;     &gt;&gt;&gt; referenced by if_ice_iflib.c:2323 (/usr/src/sys/dev/ice/if_ice_iflib.c:2323)<br>
&gt;     &gt;&gt;&gt;               if_ice_iflib.o:(ice_if_update_admin_status)<br>
&gt;     &gt;&gt;&gt; referenced by if_ice_iflib.c:2376 (/usr/src/sys/dev/ice/if_ice_iflib.c:2376)<br>
&gt;     &gt;&gt;&gt;               if_ice_iflib.o:(ice_transition_safe_mode)<br>
&gt;<br>
&gt;     ld: error: undefined symbol: ice_iov_add_vf<br>
&gt;     &gt;&gt;&gt; referenced by if_ice_iflib.c:3464 (/usr/src/sys/dev/ice/if_ice_iflib.c:3464)<br>
&gt;     &gt;&gt;&gt;               if_ice_iflib.o:(ice_if_iov_vf_add)<br>
&gt;<br>
&gt;     ld: error: undefined symbol: ice_iov_init<br>
&gt;     &gt;&gt;&gt; referenced by if_ice_iflib.c:3429 (/usr/src/sys/dev/ice/if_ice_iflib.c:3429)<br>
&gt;     &gt;&gt;&gt;               if_ice_iflib.o:(ice_if_iov_init)<br>
&gt;<br>
&gt;     ld: error: undefined symbol: ice_iov_uninit<br>
&gt;     &gt;&gt;&gt; referenced by if_ice_iflib.c:3445 (/usr/src/sys/dev/ice/if_ice_iflib.c:3445)<br>
&gt;     &gt;&gt;&gt;               if_ice_iflib.o:(ice_if_iov_uninit)<br>
&gt;<br>
&gt;     ld: error: undefined symbol: ice_iov_handle_vflr<br>
&gt;     &gt;&gt;&gt; referenced by if_ice_iflib.c:3480 (/usr/src/sys/dev/ice/if_ice_iflib.c:3480)<br>
&gt;     &gt;&gt;&gt;               if_ice_iflib.o:(ice_if_vflr_handle)<br>
&gt;<br>
&gt;     ld: error: undefined symbol: ice_vc_notify_all_vfs_link_state<br>
&gt;     &gt;&gt;&gt; referenced by if_ice_iflib.c:757 (/usr/src/sys/dev/ice/if_ice_iflib.c:757)<br>
&gt;     &gt;&gt;&gt;               if_ice_iflib.o:(ice_update_link_status)<br>
&gt;<br>
&gt;     ld: error: undefined symbol: ice_vc_handle_vf_msg<br>
&gt;     &gt;&gt;&gt; referenced by ice_lib.c:2285 (/usr/src/sys/dev/ice/ice_lib.c:2285)<br>
&gt;     &gt;&gt;&gt;               ice_lib.o:(ice_process_ctrlq)<br>
&gt;     *** [kernel.full] Error code 1<br>
&gt;<br>
&gt; —<br>
&gt; Kristof<br>
&gt;<br>
&gt; On 18 Jul 2025, at 21:16, Warner Losh wrote:<br>
&gt;<br>
&gt; The branch main has been updated by imp:<br>
&gt;<br>
&gt; URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=430f1acc451c7084d1d5aa7df7e7ecccea1a8b51" rel="noreferrer noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=430f1acc451c7084d1d5aa7df7e7ecccea1a8b51</a><br>;
&gt;<br>
&gt; commit 430f1acc451c7084d1d5aa7df7e7ecccea1a8b51<br>
&gt; Author: Eric Joyner <a href="mailto:eric.joyner@intel.com" target="_blank" rel="noreferrer">eric.joyner@intel.com</a><br>
&gt; AuthorDate: 2024-10-17 22:19:09 +0000<br>
&gt; Commit: Warner Losh imp@FreeBSD.org<br>
&gt; CommitDate: 2025-07-18 19:16:17 +0000<br>
&gt;<br>
&gt; ice(4): Add MAC filter and VLAN resource limits to VFs<br>
&gt;<br>
&gt; Adds two new parameters to iovctl config for VLAN filter limits and MAC<br>
&gt; filter limits and gives them defaults of 64 and 16, respectively.<br>
&gt;<br>
&gt; These are intended to limit the number of resources that a VF can<br>
&gt; consume so that any one VF cannot starve an other VFs or the PF of<br>
&gt; filters.<br>
&gt;<br>
&gt; Signed-off-by: Eric Joyner &lt;<a href="mailto:eric.joyner@intel.com" target="_blank" rel="noreferrer">eric.joyner@intel.com</a>&gt;<br>
&gt; Signed-off-by: Krzysztof Galazka &lt;<a href="mailto:krzysztof.galazka@intel.com" target="_blank" rel="noreferrer">krzysztof.galazka@intel.com</a>&gt;<br>
&gt; Reviewed by: imp<br>
&gt; Pull Request: <a href="https://github.com/freebsd/freebsd-src/pull/1573" rel="noreferrer noreferrer" target="_blank">https://github.com/freebsd/freebsd-src/pull/1573</a><br>;
&gt;<br>
&gt; ________________________________<br>
&gt;<br>
&gt; sys/dev/ice/ice_iov.c | 45 ++++++++++++++++++++++++++++++++++++++++++---<br>
&gt; sys/dev/ice/ice_iov.h | 8 ++++++++<br>
&gt; 2 files changed, 50 insertions(+), 3 deletions(-)<br>
&gt;<br>
&gt; diff --git a/sys/dev/ice/ice_iov.c b/sys/dev/ice/ice_iov.c<br>
&gt; index fc37a0e7679c..e06c7eb56f7a 100644<br>
&gt; --- a/sys/dev/ice/ice_iov.c<br>
&gt; +++ b/sys/dev/ice/ice_iov.c<br>
&gt; @@ -117,6 +117,10 @@ ice_iov_attach(struct ice_softc *sc)<br>
&gt; IOV_SCHEMA_HASDEFAULT, ICE_DEFAULT_VF_QUEUES);<br>
&gt; pci_iov_schema_add_uint16(vf_schema, &quot;mirror-src-vsi&quot;,<br>
&gt; IOV_SCHEMA_HASDEFAULT, ICE_INVALID_MIRROR_VSI);<br>
&gt;<br>
&gt; pci_iov_schema_add_uint16(vf_schema, &quot;max-vlan-allowed&quot;,<br>
&gt;<br>
&gt;     IOV_SCHEMA_HASDEFAULT, ICE_DEFAULT_VF_VLAN_LIMIT);<br>
&gt;<br>
&gt; pci_iov_schema_add_uint16(vf_schema, &quot;max-mac-filters&quot;,<br>
&gt;<br>
&gt;     IOV_SCHEMA_HASDEFAULT, ICE_DEFAULT_VF_FILTER_LIMIT);<br>
&gt;<br>
&gt; error = pci_iov_attach(dev, pf_schema, vf_schema);<br>
&gt; if (error != 0) {<br>
&gt;<br>
&gt; @@ -360,6 +364,9 @@ ice_iov_add_vf(struct ice_softc *sc, uint16_t vfnum, const nvlist_t *params)<br>
&gt;<br>
&gt;   vsi-&gt;mirror_src_vsi = nvlist_get_number(params, &quot;mirror-src-vsi&quot;);<br>
&gt;<br>
&gt; vf-&gt;vlan_limit = nvlist_get_number(params, &quot;max-vlan-allowed&quot;);<br>
&gt;<br>
&gt; vf-&gt;mac_filter_limit = nvlist_get_number(params, &quot;max-mac-filters&quot;);<br>
&gt;<br>
&gt; vf-&gt;vf_flags |= VF_FLAG_VLAN_CAP;<br>
&gt;<br>
&gt; /* Create and setup VSI in HW */<br>
&gt;<br>
&gt; @@ -735,10 +742,17 @@ ice_vc_add_eth_addr_msg(struct ice_softc *sc, struct ice_vf *vf, u8 *msg_buf)<br>
&gt; enum virtchnl_status_code v_status = VIRTCHNL_STATUS_SUCCESS;<br>
&gt; struct virtchnl_ether_addr_list *addr_list;<br>
&gt; struct ice_hw *hw = &amp;sc-&gt;hw;<br>
&gt;<br>
&gt; u16 added_addr_cnt = 0;<br>
&gt; int error = 0;<br>
&gt;<br>
&gt; addr_list = (struct virtchnl_ether_addr_list *)msg_buf;<br>
&gt;<br>
&gt; if (addr_list-&gt;num_elements &gt;<br>
&gt;<br>
&gt;     (vf-&gt;mac_filter_limit - vf-&gt;mac_filter_cnt)) {<br>
&gt;<br>
&gt;         v_status = VIRTCHNL_STATUS_ERR_NO_MEMORY;<br>
&gt;<br>
&gt;         goto done;<br>
&gt;<br>
&gt; }<br>
&gt;<br>
&gt; for (int i = 0; i &lt; addr_list-&gt;num_elements; i++) {<br>
&gt;         u8 *addr = addr_list-&gt;list[i].addr;<br>
&gt;<br>
&gt; @@ -767,10 +781,15 @@ ice_vc_add_eth_addr_msg(struct ice_softc *sc, struct ice_vf *vf, u8 *msg_buf)<br>
&gt; &quot;%s: VF-%d: Error adding MAC addr for VSI %d\n&quot;,<br>
&gt; func, vf-&gt;vf_num, vf-&gt;vsi-&gt;idx);<br>
&gt; v_status = VIRTCHNL_STATUS_ERR_PARAM;<br>
&gt;<br>
&gt;                 goto done;<br>
&gt;<br>
&gt;                 continue;<br>
&gt;         }<br>
&gt;<br>
&gt;         /* Don&#39;t count VF&#39;s MAC against its MAC filter limit */<br>
&gt;<br>
&gt;         if (memcmp(addr, vf-&gt;mac, ETHER_ADDR_LEN))<br>
&gt;<br>
&gt;                 added_addr_cnt++;<br>
&gt; }<br>
&gt;<br>
&gt; vf-&gt;mac_filter_cnt += added_addr_cnt;<br>
&gt;<br>
&gt; done:<br>
&gt; ice_aq_send_msg_to_vf(hw, vf-&gt;vf_num, VIRTCHNL_OP_ADD_ETH_ADDR,<br>
&gt; v_status, NULL, 0, NULL);<br>
&gt; @@ -791,6 +810,7 @@ ice_vc_del_eth_addr_msg(struct ice_softc *sc, struct ice_vf *vf, u8 *msg_buf)<br>
&gt; enum virtchnl_status_code v_status = VIRTCHNL_STATUS_SUCCESS;<br>
&gt; struct virtchnl_ether_addr_list *addr_list;<br>
&gt; struct ice_hw *hw = &amp;sc-&gt;hw;<br>
&gt;<br>
&gt; u16 deleted_addr_cnt = 0;<br>
&gt; int error = 0;<br>
&gt;<br>
&gt; addr_list = (struct virtchnl_ether_addr_list *)msg_buf;<br>
&gt;<br>
&gt; @@ -802,11 +822,18 @@ ice_vc_del_eth_addr_msg(struct ice_softc *sc, struct ice_vf *vf, u8 *msg_buf)<br>
&gt; &quot;%s: VF-%d: Error removing MAC addr for VSI %d\n&quot;,<br>
&gt; func, vf-&gt;vf_num, vf-&gt;vsi-&gt;idx);<br>
&gt; v_status = VIRTCHNL_STATUS_ERR_PARAM;<br>
&gt;<br>
&gt;                 goto done;<br>
&gt;<br>
&gt;                 continue;<br>
&gt;         }<br>
&gt;<br>
&gt;         /* Don&#39;t count VF&#39;s MAC against its MAC filter limit */<br>
&gt;<br>
&gt;         if (memcmp(addr_list-&gt;list[i].addr, vf-&gt;mac, ETHER_ADDR_LEN))<br>
&gt;<br>
&gt;                 deleted_addr_cnt++;<br>
&gt; }<br>
&gt;<br>
&gt; -done:<br>
&gt;<br>
&gt; if (deleted_addr_cnt &gt;= vf-&gt;mac_filter_cnt)<br>
&gt;<br>
&gt;         vf-&gt;mac_filter_cnt = 0;<br>
&gt;<br>
&gt; else<br>
&gt;<br>
&gt;         vf-&gt;mac_filter_cnt -= deleted_addr_cnt;<br>
&gt;<br>
&gt; ice_aq_send_msg_to_vf(hw, vf-&gt;vf_num, VIRTCHNL_OP_DEL_ETH_ADDR,<br>
&gt;     v_status, NULL, 0, NULL);<br>
&gt;<br>
&gt; }<br>
&gt; @@ -838,6 +865,11 @@ ice_vc_add_vlan_msg(struct ice_softc *sc, struct ice_vf *vf, u8 *msg_buf)<br>
&gt; goto done;<br>
&gt; }<br>
&gt;<br>
&gt; if (vlan_list-&gt;num_elements &gt; (vf-&gt;vlan_limit - vf-&gt;vlan_cnt)) {<br>
&gt;<br>
&gt;         v_status = VIRTCHNL_STATUS_ERR_NO_MEMORY;<br>
&gt;<br>
&gt;         goto done;<br>
&gt;<br>
&gt; }<br>
&gt;<br>
&gt; status = ice_add_vlan_hw_filters(vsi, vlan_list-&gt;vlan_id,<br>
&gt;                                 vlan_list-&gt;num_elements);<br>
&gt; if (status) {<br>
&gt;<br>
&gt; @@ -849,6 +881,8 @@ ice_vc_add_vlan_msg(struct ice_softc *sc, struct ice_vf *vf, u8 *msg_buf)<br>
&gt; goto done;<br>
&gt; }<br>
&gt;<br>
&gt; vf-&gt;vlan_cnt += vlan_list-&gt;num_elements;<br>
&gt;<br>
&gt; done:<br>
&gt; ice_aq_send_msg_to_vf(hw, vf-&gt;vf_num, VIRTCHNL_OP_ADD_VLAN,<br>
&gt; v_status, NULL, 0, NULL);<br>
&gt; @@ -892,6 +926,11 @@ ice_vc_del_vlan_msg(struct ice_softc *sc, struct ice_vf *vf, u8 *msg_buf)<br>
&gt; goto done;<br>
&gt; }<br>
&gt;<br>
&gt; if (vlan_list-&gt;num_elements &gt;= vf-&gt;vlan_cnt)<br>
&gt;<br>
&gt;         vf-&gt;vlan_cnt = 0;<br>
&gt;<br>
&gt; else<br>
&gt;<br>
&gt;         vf-&gt;vlan_cnt -= vlan_list-&gt;num_elements;<br>
&gt;<br>
&gt; done:<br>
&gt; ice_aq_send_msg_to_vf(hw, vf-&gt;vf_num, VIRTCHNL_OP_DEL_VLAN,<br>
&gt; v_status, NULL, 0, NULL);<br>
&gt; diff --git a/sys/dev/ice/ice_iov.h b/sys/dev/ice/ice_iov.h<br>
&gt; index c2ac5fcd5c94..c4fb3e932e3f 100644<br>
&gt; --- a/sys/dev/ice/ice_iov.h<br>
&gt; +++ b/sys/dev/ice/ice_iov.h<br>
&gt; @@ -85,6 +85,11 @@ struct ice_vf {<br>
&gt; u16 vf_num;<br>
&gt; struct virtchnl_version_info version;<br>
&gt;<br>
&gt; u16 mac_filter_limit;<br>
&gt;<br>
&gt; u16 mac_filter_cnt;<br>
&gt;<br>
&gt; u16 vlan_limit;<br>
&gt;<br>
&gt; u16 vlan_cnt;<br>
&gt;<br>
&gt; u16 num_irq_vectors;<br>
&gt; u16 *vf_imap;<br>
&gt; struct ice_irq_vector *tx_irqvs;<br>
&gt;<br>
&gt; @@ -101,6 +106,9 @@ struct ice_vf {<br>
&gt; #define ICE_VIRTCHNL_VALID_PROMISC_FLAGS (FLAG_VF_UNICAST_PROMISC |<br>
&gt; FLAG_VF_MULTICAST_PROMISC)<br>
&gt;<br>
&gt; +#define ICE_DEFAULT_VF_VLAN_LIMIT 64<br>
&gt; +#define ICE_DEFAULT_VF_FILTER_LIMIT 16<br>
&gt; +<br>
&gt; int ice_iov_attach(struct ice_softc *sc);<br>
&gt; int ice_iov_detach(struct ice_softc *sc);<br>
</blockquote></div></div></div>
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqrzboT_jGqe47jYO1%2BpymFfO4Dnf62fZ2av3m7GAQSNw>