DPDK commit message
net/ixgbe/base: remove unused function prototypes
There are some function prototypes that were introduced at some point
but were never implemented, so remove them.
Signed-off-by: Chinh Cao <chinh.t.cao@intel.com>
Obtained from: DPDK (e9cc1b4)
MFC after: 1 week
DPDK commit message
net/ixgbe/base: improve SWFW semaphore acquisition
HWSW semaphore acquisition in Atom C3000 NIC is a two stage process.
Each time two semaphore acquisitions are required. Each second semaphore
failure requires re-acquisition of first semaphore. This patch decouples
the two acquisitions preventing potentially hundreds of thousands
of unnecessary loop iterations.
Signed-off-by: Barbara Skobiej <barbara.skobiej@intel.com>
Obtained from: DPDK (99f960c)
MFC after: 1 week
DPDK commit message
net/ixgbe/base: remove circular header dependency
Including one header file in second header file should be avoided, so
fix it by forward declaring the struct instead.
Signed-off-by: Barbara Skobiej <barbara.skobiej@intel.com>
Obtained from: DPDK (0bc2af5)
MFC after: 1 week
DPDK commit message
net/ixgbe/base: replace non-inclusive language
This patch removes non-inclusive language from code, user interface
and comments.
Signed-off-by: Marcin Jurczak <marcin.jurczak@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Obtained from: DPDK (f12a4bd)
MFC after: 1 week
DPDK commit message
Convert all "fall-through" comments to actual code. This aligns the code
with the kernel which no longer allows implicit fallthrough.
Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Obtained from: DPDK (ae8211f)
MFC after: 1 week
DPDK commit message
net/ixgbe/base: replace HIC with direct register access
Unify FW access method to direct register read/writes across all
Atom(R) C3000 products.
Atom(R) C3000 fiber exhibited an issue with the Host Interface Command
execution being locked when another LAN function attempted to acquire
the SWFW sync on Manageability Host. This resulted in HIC atomicity
break and bogus data being read since the other LAN function cleared
all semaphores on timeout whereas HIC execution continued after
unlock. Direct register IOSF access showed higher stability and
reliability.
Signed-off-by: Marek Mical <marekx.mical@intel.com>
Reviewed-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Reviewed-by: Eryk Rybak <eryk.roch.rybak@intel.com>
Reviewed-by: Francis Racicot <Francis.Racicot@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Obtained from: DPDK (e947f1e)
MFC after: 1 week
DPDK commit message
net/ixgbe/base: add reset count field to HW struct
Add fw_rst_cnt to store the number of resets after fw update.
This value is required to detect if the EICR.MNG event occurred
after firmware update reset.
Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Obtained from: DPDK (9ab0e9c)
MFC after: 1 week
Some function comments have mismatches between actual function names and
function name in comments, which causes warnings with kernel-doc. Fix
comments to match function names.
Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Obtained from: DPDK (7b5bc85)
MFC after: 1 week
Change max credit and credit refill to a maximum possible value, 9128.
Too small values cause the incorrect calculation of the bandwidth limits
to each traffic class for frames larger than 4088 bytes.
Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Tested-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Obtained from: DPDK (440823f)
MFC after: 1 week
DPDK commit message
Current mailbox API does not work as described in documentation and
is prone to errors (for example, it is doing locks on read). Introduce
new mailbox API and provide compatibility functions with old API.
New error codes have been introduced:
- IXGBE_ERR_CONFIG - ixgbe_mbx_operations is not correctly set
- IXGBE_ERR_TIMEOUT - mailbox operation, e.g. poll for message, timedout
- IXGBE_ERR_MBX_NOMSG - no message available on read
In addition, some refactoring has been done: mailbox structures were
defined twice: in ixgbe_type.h and ixgbe_vf.h. Move them into
ixgbe_mbx.h as this header is dedicated for mailbox.
Signed-off-by: Jakub Chylkowski <jakubx.chylkowski@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Reviewed-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Tested-by: Alice Michael <alice.michael@intel.com>
Tested-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Obtained from: DPDK (6d243d2)
MFC after: 1 week
Reapply message
This reverts commit d80c12ba68.
DPDK commit message
Current mailbox API does not work as described in documentation and
is prone to errors (for example, it is doing locks on read). Introduce
new mailbox API and provide compatibility functions with old API.
New error codes have been introduced:
- IXGBE_ERR_CONFIG - ixgbe_mbx_operations is not correctly set
- IXGBE_ERR_TIMEOUT - mailbox operation, e.g. poll for message, timedout
- IXGBE_ERR_MBX_NOMSG - no message available on read
In addition, some refactoring has been done: mailbox structures were
defined twice: in ixgbe_type.h and ixgbe_vf.h. Move them into
ixgbe_mbx.h as this header is dedicated for mailbox.
Signed-off-by: Jakub Chylkowski <jakubx.chylkowski@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Reviewed-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Tested-by: Alice Michael <alice.michael@intel.com>
Tested-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Obtained from: DPDK (6d243d2)
MFC after: 1 week
DPDK commit message
net/ixgbe/base: correct registers names to match datasheet
Some of mailbox-related registers have different names than it is
specified in datasheet. Correct these names to correspond to their
datasheet counterparts. Additionally, several calculations are changed
to no longer use magic numbers but dedicated macros instead.
Signed-off-by: Jakub Chylkowski <jakubx.chylkowski@intel.com>
Reviewed-by: Marek Zalfresso-jundzillo <marekx.zalfresso-jundzillo@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Tested-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Tested-by: Alice Michael <alice.michael@intel.com>
Obtained from: DPDK (10fd55e)
MFC after: 1 week
DPDK commit message
There is name similarity within IXGBE_VT_MSGTYPE_ACK and
PFMAILBOX.ACK / VFMAILBOX.ACK which may cause confusion. Rename MSGTYPE
macros to SUCCESS and FAILURE as they are not specified in datasheet and
now will be easily distinguishable.
Signed-off-by: Jakub Chylkowski <jakubx.chylkowski@intel.com>
Reviewed-by: Marek Zalfresso-jundzillo <marekx.zalfresso-jundzillo@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Tested-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Tested-by: Alice Michael <alice.michael@intel.com>
Obtained from: DPDK (4f675c9)
MFC after: 1 week
DPDK commit message
net/ixgbe/base: fix PHY ID for X550
Function ixgbe_get_phy_type_from_id() for X550_PHY_ID2 and
X550_PHY_ID3 always return ixgbe_phy_unknown instead of ixgbe_phy_aq
because phy ID's last 4 bits are always masked, and should not be
taken into account when selecting phy type.
This patch adds default PHY ID for X550 devices with mask on last 4
bits (0xFFFFFFF0), and fixes the switch statement to use it.
Fixes: 58ddc80 ("ixgbe/base: add new X550 PHY ids")
Cc: stable@dpdk.org
Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Obtained from: DPDK (a9f5a3b)
MFC after: 1 week
DPDK commit message
net/ixgbe/base: fix 5G link speed reported on VF
When 5000 Base-T was set on PF the VF reported 100 Base-T. This patch
changes ixgbe_check_mac_link_vf function where there was an incorrect
conditional which checks using PF mac types, now it is correctly
using VF mac types.
Fixes: 12e2090 ("net/ixgbe/base: include new speeds in VFLINK interpretation")
Cc: stable@dpdk.org
Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Obtained from: DPDK (9eb7fdb)
MFC after: 1 week
DPDK commit meesage
When VF issues a reset to PF there is a 50 msec wait plus an additional
max of 1 msec (200 * 5us) for the PF to indicate the reset is complete
before timeout.
In some cases, it is seen that the reset is timing out, in which case
the reset does not complete and an error is returned.
In order to account for this, continue to wait an initial 50 msecs, but
then allow a max of an additional 50 msecs (10,000 * 5us) for the
command to complete.
Fixes: af75078 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Obtained from: DPDK (64e714f)
MFC after: 1 week
Instead of iterating over object->memq to free pages, use a callback
in VM_RADIX_PCTRIE_RECLAIM_CALLBACK to do it.
Reviewed by: rlibby
Differential Revision: https://reviews.freebsd.org/D45588
Do not pass AF specific information to pf_test_rule() and PFLOG_PACKET()
because either the info is already available in struct pd or easy
to figure out. Makes pf_test() and pf_test6() even more similar
(with the target to remove one of them in the near future).
OK henning@
Reviewed by: zlei
Obtained from: OpenBSD, claudio <claudio@openbsd.org>, 5480721ed1
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46596
so that rules like "pass out on vr1 inet6 nat-to (vr1)" won't map
to the non routable ipv6 link local address; with suggestions and
ok claudio, henning
Reviewed by: zlei
Obtained from: OpenBSD, mikeb <mikeb@openbsd.org>, e41548933f
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46594
pf_scrub_ip() does not modify the given mbuf pointer. So don't
pass a pointer to a pointer to make the code in pf_test() clearer.
ok henning@
Reviewed by: zlei
Obtained from: OpenBSD, bluhm <bluhm@openbsd.org>, aac78b59b9
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46593
pf_test() and pf_test6() drop IPv4-ICMP6 and IPv6-ICMP packets. Do
not do the same check in pf_test_rule() again.
ok henning
Reviewed by: zlei
Obtained from: OpenBSD, bluhm <bluhm@openbsd.org>, de5c2bfb74
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46591
Break out rule counter update code into a separate function, makes the
behaviour consistent between IPv4 and IPv6.
From martin.pelikan@gmail.com
Obtained from: OpenBSD, mcbride <mcbride@openbsd.org>, ce38da5678
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46590
forces logging on all subsequent matching rules
new log opt "matches"
awesome for debugging, a rule like
match log(matches) from $testbox
will show you exactly which subsequent rules match on that packet
real ok theo assumed oks ryan & dlg bikeshedding many
Obtained from: OpenBSD, henning <henning@openbsd.org>, 1603e01ae4
Obtained from: OpenBSD, henning <henning@openbsd.org>, f496e91672
Obtained from: OpenBSD, henning <henning@openbsd.org>, 07481a9fee
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46588
factor our the code to set up pf_pdesc, a central structure in pf carrying
information about the packet we're currently dealing with, into its own
function. ok ryan dlg and additional testing sthen
Obtained from: OpenBSD, henning <henning@openbsd.org>, c4202972a3
Obtained from: OpenBSD, claudio <claudio@openbsd.org>, 78d25123ea
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46586
When printing states in debug output, print the rule number that created
it if we have it.
Requested by dlg, ok henning.
Obtained from: OpenBSD, mcbride <mcbride@openbsd.org>, c06d1661a6
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46585
In some cases the netmask gets set to a full 128 bit mask even if no
address family is selected; don't print the v6 mask if it's a v4 address.
Obtained from: OpenBSD, mcbride <mcbride@openbsd.org>, f6d7b41f07
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46584
If we fail to init TCP (or SCTP) initialization we have to remember to free
state keys as well. They will not be freed for us when we free the state until
we've inserted the state (i.e. pf_insert_state()).
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46583
Add a priv_check for PRIV_PROC_MEM_WRITE which will be blocked
by mac_veriexec if being enforced, unless the process has a maclabel
to grant priv.
Reviewed by: stevek
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D46692
The change of its description from integer to boolean didn't actually
change it to a boolean, but only made it impossible to set as either
a boolean or an integer.
Rather than make it work as a boolean parameter should, just revert
to the old (working) integer parameter, and change the documentation
to match.
PR: 274263
Reported by: andrew.hotlab at hotmail
DPDK commit message
net/e1000/base: fix link power down
Current code is a result of work to reduce duplication between various
device models. However, the logic that was replaced did not exactly
match the new logic, and as a result the link power down was not
working correctly for some NICs, and the link remained up even when
the interface is down.
Fix it to correctly power down the link under all circumstances that
were supported by old logic.
Fixes: 44dddd1 ("net/e1000/base: remove duplicated codes")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Obtained from: DPDK (a8218d0)
MFC after: 1 week
Add to the vm_radix and vm_page interfaces methods to use pctrie
iterators with vm_radix tries.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D46663
Several functions did not validate the slot index resulting in OOB read
on the heap of the slot device structure which could lead to arbitrary
reads/writes and potentially code execution.
Reported by: Synacktiv
Reviewed by: markj (earlier), jhb
Security: CVE-2024-41721
Security: HYP-02
Sponsored by: The Alpha-Omega Project
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45996
This can arise if the jail doesn't have networking configured, and if
-ss is specified, syslogd won't listen on port 514 anyway.
Add a regression test case for this as well.
PR: 238006
MFC after: 1 month