All of lore.kernel.org
 help / color / mirror / Atom feed
From: ChenXiaoSong <chenxiaosong.chenxiaosong@linux.dev>
To: Steve French <smfrench@gmail.com>
Cc: David Howells <dhowells@redhat.com>,
	Steve French <sfrench@samba.org>,
	liuzhengyuan@kylinos.cn, huhai@kylinos.cn, liuyun01@kylinos.cn,
	Paulo Alcantara <pc@manguebit.org>,
	CIFS <linux-cifs@vger.kernel.org>,
	ChenXiaoSong <chenxiaosong@kylinos.cn>
Subject: Re: [PATCH 2/2] cifs: Autogenerate SMB2 error mapping table
Date: Mon, 15 Dec 2025 12:33:08 +0800	[thread overview]
Message-ID: <d72f2535-5ef7-4e7e-a2ca-c0e7c37f49ee@linux.dev> (raw)
In-Reply-To: <CAH2r5mvpz4BWM4Uua17Cg+vw-PrVpZOQLHmU8xi6XDmY8vuA=w@mail.gmail.com>

Hi David,

Based on Steve's suggestions, should we consider only using the 
`gen_smb2_mapping` script to reorder the smb2_error_map_table[] array in 
client/smb2maperror.c?

This way, we can keep the code changes minimal (of course, we might have 
the opportunity for larger changes in the future).

Thanks,
ChenXiaoSong.

On 12/15/25 12:03, Steve French wrote:
> I would prefer not a large line of code change unless some perf benefit 
> but if alongside a perf improvement or bug fix then easier to justify
> 
> Thanks,
> 
> Steve
> 
> On Sun, Dec 14, 2025, 9:12 PM ChenXiaoSong 
> <chenxiaosong.chenxiaosong@linux.dev 
> <mailto:chenxiaosong.chenxiaosong@linux.dev>> wrote:
> 
>     Personally, I think using enum is a good idea.
> 
>     Thanks,
>     ChenXiaoSong.
> 
>     On 12/12/25 17:41, David Howells wrote:
>      > Also note that the format we end up going with for smb2status.h
>     is up for
>      > discussion.  My preferred idea is something along the lines of:
>      >
>      >       enum nt_status_codes {
>      >               STATUS_SUCCESS          = 0x00000000, // 0
>      >               STATUS_WAIT_0           = STATUS_SUCCESS,
>      >               STATUS_WAIT_1           = 0x00000001, // -EIO
>      >               STATUS_WAIT_2           = 0x00000002, // -EIO
>      >               STATUS_WAIT_3           = 0x00000003, // -EIO
>      >               ...
>      >       };
>      >
>      > and switching to using cpu-endian in the code.
>      >
>      > David
> 


  parent reply	other threads:[~2025-12-15  4:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-10 23:03 Can we autogenerate smb2_error_map_table[]? David Howells
2025-12-10 23:40 ` ChenXiaoSong
     [not found]   ` <CAH2r5msTSRvKRwQYjuVP62KB5beoS99e4eYKYHQ9ZPTYejykRA@mail.gmail.com>
2025-12-11  0:11     ` ChenXiaoSong
2025-12-11 15:03       ` [PATCH 1/2] cifs: Label SMB2 statuses with errors David Howells
2025-12-12  0:19         ` ChenXiaoSong
2025-12-12  0:29           ` ChenXiaoSong
2025-12-12  9:35           ` David Howells
2025-12-11 15:04       ` [PATCH 2/2] cifs: Autogenerate SMB2 error mapping table David Howells
2025-12-11 15:33         ` ChenXiaoSong
2025-12-11 15:43           ` David Howells
2025-12-12  2:09         ` ChenXiaoSong
2025-12-12  9:41           ` David Howells
2025-12-12 10:19             ` ChenXiaoSong
2025-12-15  3:11             ` ChenXiaoSong
     [not found]               ` <CAH2r5mvpz4BWM4Uua17Cg+vw-PrVpZOQLHmU8xi6XDmY8vuA=w@mail.gmail.com>
2025-12-15  4:33                 ` ChenXiaoSong [this message]
2025-12-12  9:48           ` David Howells
2025-12-11 15:11       ` Can we autogenerate smb2_error_map_table[]? David Howells

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=d72f2535-5ef7-4e7e-a2ca-c0e7c37f49ee@linux.dev \
    --to=chenxiaosong.chenxiaosong@linux.dev \
    --cc=chenxiaosong@kylinos.cn \
    --cc=dhowells@redhat.com \
    --cc=huhai@kylinos.cn \
    --cc=linux-cifs@vger.kernel.org \
    --cc=liuyun01@kylinos.cn \
    --cc=liuzhengyuan@kylinos.cn \
    --cc=pc@manguebit.org \
    --cc=sfrench@samba.org \
    --cc=smfrench@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.