From: Stephen Hemminger <stephen@networkplumber.org>
To: vanshika.shukla@nxp.com
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
Wathsala Vithanage <wathsala.vithanage@arm.com>,
Bruce Richardson <bruce.richardson@intel.com>,
Gagandeep Singh <g.singh@nxp.com>,
Sachin Saxena <sachin.saxena@nxp.com>,
Anatoly Burakov <anatoly.burakov@intel.com>,
Apeksha Gupta <apeksha.gupta@nxp.com>
Subject: Re: [v2 01/12] net/enetc: Add initial ENETC4 PMD driver support
Date: Thu, 7 Nov 2024 11:39:26 -0800 [thread overview]
Message-ID: <20241107113926.30924180@hermes.local> (raw)
In-Reply-To: <20241023062433.851218-2-vanshika.shukla@nxp.com>
On Wed, 23 Oct 2024 11:54:22 +0530
vanshika.shukla@nxp.com wrote:
> +/* IOCTL */
> +#define KPG_NC_MAGIC_NUM 0xf0f0
> +#define KPG_NC_IOCTL_UPDATE _IOWR(KPG_NC_MAGIC_NUM, 1, size_t)
> +
> +
> +#define KNRM "\x1B[0m"
> +#define KRED "\x1B[31m"
> +#define KGRN "\x1B[32m"
> +#define KYEL "\x1B[33m"
> +#define KBLU "\x1B[34m"
> +#define KMAG "\x1B[35m"
> +#define KCYN "\x1B[36m"
> +#define KWHT "\x1B[37m"
> +
> +#if defined(RTE_ARCH_ARM) && defined(RTE_ARCH_64)
> +static inline void flush_tlb(void *p)
> +{
> + asm volatile("dc civac, %0" ::"r"(p));
> + asm volatile("dsb ish");
> + asm volatile("isb");
> +}
> +#endif
> +
> +static inline void mark_kpage_ncache(uint64_t huge_page)
> +{
> + int fd, ret;
> +
> + fd = open(KPG_NC_DEVICE_PATH, O_RDONLY);
> + if (fd < 0) {
> + ENETC_PMD_ERR(KYEL "Error: " KNRM "Could not open: %s",
> + KPG_NC_DEVICE_PATH);
> +
Do not add your own color stuff into logging!
It will mess up when log goes to syslog or journal.
There is a better more complete set of patchs to add generic
color support to log (still under review).
Also directly manipulating kernel page cache via non-upstream
ioctl's is a bad idea from security and portability point of view.
Do you really want to make Christoph Hellwig, and Al Viro come
after you?
If you have to do this it should be wrapped in some API in EAL, not
in the driver.
next prev parent reply other threads:[~2024-11-07 19:39 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 7:26 [v1 00/12] ENETC4 PMD support vanshika.shukla
2024-10-18 7:26 ` [v1 01/12] net/enetc: Add initial ENETC4 PMD driver support vanshika.shukla
2024-10-20 23:39 ` Stephen Hemminger
2024-10-20 23:52 ` Stephen Hemminger
2024-10-18 7:26 ` [v1 02/12] net/enetc: Add RX and TX queue APIs for ENETC4 PMD vanshika.shukla
2024-10-20 23:40 ` Stephen Hemminger
2024-10-18 7:26 ` [v1 03/12] net/enetc: Optimize ENETC4 data path vanshika.shukla
2024-10-21 0:06 ` Stephen Hemminger
2024-10-18 7:26 ` [v1 04/12] net/enetc: Add TX checksum offload and RX checksum validation vanshika.shukla
2024-10-18 7:26 ` [v1 05/12] net/enetc: Add basic statistics vanshika.shukla
2024-10-18 7:26 ` [v1 06/12] net/enetc: Add packet type parsing support vanshika.shukla
2024-10-18 7:26 ` [v1 07/12] net/enetc: Add support for multiple queues with RSS vanshika.shukla
2024-10-18 7:26 ` [v1 08/12] net/enetc: Add VF to PF messaging support and primary MAC setup vanshika.shukla
2024-10-18 7:26 ` [v1 09/12] net/enetc: Add multicast and promiscuous mode support vanshika.shukla
2024-10-18 7:26 ` [v1 10/12] net/enetc: Add link speed and status support vanshika.shukla
2024-10-18 7:26 ` [v1 11/12] net/enetc: Add link status notification support vanshika.shukla
2024-10-18 7:26 ` [v1 12/12] net/enetc: Add MAC and VLAN filter support vanshika.shukla
2024-10-23 6:24 ` [v2 00/12] ENETC4 PMD support vanshika.shukla
2024-10-23 6:24 ` [v2 01/12] net/enetc: Add initial ENETC4 PMD driver support vanshika.shukla
2024-11-07 19:39 ` Stephen Hemminger [this message]
2024-10-23 6:24 ` [v2 02/12] net/enetc: Add RX and TX queue APIs for ENETC4 PMD vanshika.shukla
2024-10-23 6:24 ` [v2 03/12] net/enetc: Optimize ENETC4 data path vanshika.shukla
2024-10-23 6:24 ` [v2 04/12] net/enetc: Add TX checksum offload and RX checksum validation vanshika.shukla
2024-10-23 6:24 ` [v2 05/12] net/enetc: Add basic statistics vanshika.shukla
2024-10-23 6:24 ` [v2 06/12] net/enetc: Add packet type parsing support vanshika.shukla
2024-10-23 6:24 ` [v2 07/12] net/enetc: Add support for multiple queues with RSS vanshika.shukla
2024-10-23 6:24 ` [v2 08/12] net/enetc: Add VF to PF messaging support and primary MAC setup vanshika.shukla
2024-10-23 6:24 ` [v2 09/12] net/enetc: Add multicast and promiscuous mode support vanshika.shukla
2024-10-23 6:24 ` [v2 10/12] net/enetc: Add link speed and status support vanshika.shukla
2024-10-23 6:24 ` [v2 11/12] net/enetc: Add link status notification support vanshika.shukla
2024-10-23 6:24 ` [v2 12/12] net/enetc: Add MAC and VLAN filter support vanshika.shukla
2024-11-07 10:24 ` [v2 00/12] ENETC4 PMD support Ferruh Yigit
2024-11-07 19:29 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241107113926.30924180@hermes.local \
--to=stephen@networkplumber.org \
--cc=anatoly.burakov@intel.com \
--cc=apeksha.gupta@nxp.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=g.singh@nxp.com \
--cc=sachin.saxena@nxp.com \
--cc=thomas@monjalon.net \
--cc=vanshika.shukla@nxp.com \
--cc=wathsala.vithanage@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).